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 : 184606818 : gimple_with_possible_nonzero_bits2 (tree t, tree *res_ops, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
11 : : {
12 : 184606818 : const tree type = TREE_TYPE (t);
13 : 184606818 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14 : 184606818 : switch (TREE_CODE (t))
15 : : {
16 : 178438760 : case SSA_NAME:
17 : 178438760 : if (gimple *_d1 = get_def (valueize, t))
18 : : {
19 : 59772763 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
20 : 67486725 : switch (gimple_assign_rhs_code (_a1))
21 : : {
22 : 3425163 : case BIT_AND_EXPR:
23 : 3425163 : {
24 : 3425163 : tree _p0 = gimple_assign_rhs1 (_a1);
25 : 3425163 : _p0 = do_valueize (valueize, _p0);
26 : 3425163 : tree _p1 = gimple_assign_rhs2 (_a1);
27 : 3425163 : _p1 = do_valueize (valueize, _p1);
28 : 3425163 : if (tree_swap_operands_p (_p0, _p1))
29 : 60060 : std::swap (_p0, _p1);
30 : 3425163 : if (gimple_with_possible_nonzero_bits (_p0, valueize))
31 : : {
32 : 3416163 : {
33 : 3416163 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
34 : 3416163 : {
35 : 3416163 : res_ops[0] = captures[0];
36 : 3416163 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 29, __FILE__, __LINE__, false);
37 : 3416163 : return true;
38 : : }
39 : : }
40 : : }
41 : 9000 : if (gimple_with_possible_nonzero_bits (_p1, valueize))
42 : : {
43 : 0 : {
44 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
45 : 0 : {
46 : 0 : res_ops[0] = captures[0];
47 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 29, __FILE__, __LINE__, false);
48 : 0 : return true;
49 : : }
50 : : }
51 : : }
52 : 181190655 : break;
53 : : }
54 : : default:;
55 : : }
56 : : }
57 : : break;
58 : 181190655 : default:;
59 : : }
60 : 181190655 : if (gimple_with_possible_nonzero_bits (t, valueize))
61 : : {
62 : 168446730 : {
63 : 168446730 : tree captures[1] ATTRIBUTE_UNUSED = { t };
64 : 168446730 : {
65 : 168446730 : res_ops[0] = captures[0];
66 : 168446730 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 30, __FILE__, __LINE__, false);
67 : 168446730 : return true;
68 : : }
69 : : }
70 : : }
71 : : return false;
72 : : }
73 : :
74 : : bool
75 : 1106212 : gimple_max_value (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
76 : : {
77 : 1106212 : const tree type = TREE_TYPE (t);
78 : 1106212 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
79 : 1106212 : if (uniform_integer_cst_p (t))
80 : : {
81 : 704109 : {
82 : 704109 : {
83 : 704109 : tree int_cst = uniform_integer_cst_p (t);
84 : 704109 : tree itype = TREE_TYPE (int_cst);
85 : 1408218 : if ((INTEGRAL_TYPE_P (itype)
86 : 149416 : || POINTER_TYPE_P (itype))
87 : 1557589 : && wi::eq_p (wi::to_wide (int_cst), wi::max_value (itype))
88 : : )
89 : : {
90 : 16903 : {
91 : 16903 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 34, __FILE__, __LINE__, false);
92 : 16903 : return true;
93 : : }
94 : : }
95 : : }
96 : : }
97 : : }
98 : : return false;
99 : : }
100 : :
101 : : bool
102 : 3926 : gimple_float16_value_p (tree t, tree (*valueize)(tree) ATTRIBUTE_UNUSED)
103 : : {
104 : 3926 : const tree type = TREE_TYPE (t);
105 : 3926 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
106 : 3926 : {
107 : 3926 : tree captures[1] ATTRIBUTE_UNUSED = { t };
108 : 3926 : if (TYPE_MAIN_VARIANT (TREE_TYPE (captures[0])) == float16_type_node
109 : : )
110 : : {
111 : 918 : {
112 : 918 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 46, __FILE__, __LINE__, false);
113 : 918 : return true;
114 : : }
115 : : }
116 : : }
117 : : return false;
118 : : }
119 : :
120 : : bool
121 : 84 : gimple_simplify_1 (gimple_match_op *res_op, gimple_seq *seq,
122 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
123 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
124 : : const combined_fn ARG_UNUSED (COPYSIGN_ALL))
125 : : {
126 : 84 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
127 : 84 : gimple_seq *lseq = seq;
128 : 84 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail160;
129 : 84 : {
130 : 84 : res_op->set_op (ABS_EXPR, type, 1);
131 : 84 : res_op->ops[0] = captures[0];
132 : 84 : res_op->resimplify (lseq, valueize);
133 : 84 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 54, __FILE__, __LINE__, true);
134 : : return true;
135 : : }
136 : 0 : next_after_fail160:;
137 : 0 : return false;
138 : : }
139 : :
140 : : bool
141 : 81 : gimple_simplify_4 (gimple_match_op *res_op, gimple_seq *seq,
142 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
143 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
144 : : const enum tree_code ARG_UNUSED (op))
145 : : {
146 : 81 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
147 : 81 : if (INTEGRAL_TYPE_P (type)
148 : : )
149 : : {
150 : 81 : gimple_seq *lseq = seq;
151 : 81 : if (lseq
152 : 43 : && (!single_use (captures[0])
153 : 23 : || !single_use (captures[3])))
154 : 58 : lseq = NULL;
155 : 81 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail163;
156 : 81 : {
157 : 81 : res_op->set_op (RSHIFT_EXPR, type, 2);
158 : 81 : {
159 : 81 : tree _o1[2], _r1;
160 : 81 : _o1[0] = captures[1];
161 : 81 : _o1[1] = captures[4];
162 : 81 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
163 : 81 : tem_op.resimplify (lseq, valueize);
164 : 81 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
165 : 81 : if (!_r1) goto next_after_fail163;
166 : 23 : res_op->ops[0] = _r1;
167 : : }
168 : 23 : res_op->ops[1] = captures[2];
169 : 23 : res_op->resimplify (lseq, valueize);
170 : 23 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 57, __FILE__, __LINE__, true);
171 : 23 : return true;
172 : : }
173 : : next_after_fail163:;
174 : : }
175 : : return false;
176 : : }
177 : :
178 : : bool
179 : 4609889 : gimple_simplify_10 (gimple_match_op *res_op, gimple_seq *seq,
180 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
181 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
182 : : const enum tree_code ARG_UNUSED (op))
183 : : {
184 : 4609889 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
185 : 4609889 : {
186 : 4609889 : bool wascmp;
187 : 4609889 : if (types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
188 : 4609889 : && bitwise_inverted_equal_p (captures[0], captures[1], wascmp)
189 : : )
190 : : {
191 : 149 : gimple_seq *lseq = seq;
192 : 149 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail169;
193 : 149 : {
194 : 149 : res_op->set_op (NOP_EXPR, type, 1);
195 : 298 : res_op->ops[0] = wascmp
196 : 149 : ? constant_boolean_node (true, type)
197 : 8 : : build_all_ones_cst (TREE_TYPE (captures[0]));
198 : 149 : res_op->resimplify (lseq, valueize);
199 : 149 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 63, __FILE__, __LINE__, true);
200 : 149 : return true;
201 : : }
202 : 0 : next_after_fail169:;
203 : : }
204 : : }
205 : 4609740 : return false;
206 : : }
207 : :
208 : : bool
209 : 0 : gimple_simplify_13 (gimple_match_op *res_op, gimple_seq *seq,
210 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
211 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
212 : : {
213 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
214 : 0 : gimple_seq *lseq = seq;
215 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail172;
216 : 0 : {
217 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
218 : 0 : res_op->ops[0] = captures[0];
219 : 0 : res_op->resimplify (lseq, valueize);
220 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 66, __FILE__, __LINE__, true);
221 : : return true;
222 : : }
223 : 0 : next_after_fail172:;
224 : 0 : return false;
225 : : }
226 : :
227 : : bool
228 : 2698 : gimple_simplify_16 (gimple_match_op *res_op, gimple_seq *seq,
229 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
230 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
231 : : {
232 : 2698 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
233 : 2698 : if (bitwise_equal_p (captures[0], captures[2])
234 : : )
235 : : {
236 : 154 : gimple_seq *lseq = seq;
237 : 154 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail175;
238 : 154 : {
239 : 154 : res_op->set_op (NOP_EXPR, type, 1);
240 : 154 : {
241 : 154 : tree _o1[1], _r1;
242 : 154 : {
243 : 154 : tree _o2[2], _r2;
244 : 154 : _o2[0] = captures[0];
245 : 154 : {
246 : 154 : tree _o3[1], _r3;
247 : 154 : _o3[0] = captures[1];
248 : 154 : if (TREE_TYPE (_o2[0]) != TREE_TYPE (_o3[0])
249 : 154 : && !useless_type_conversion_p (TREE_TYPE (_o2[0]), TREE_TYPE (_o3[0])))
250 : : {
251 : 42 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o2[0]), _o3[0]);
252 : 42 : tem_op.resimplify (lseq, valueize);
253 : 42 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
254 : 42 : if (!_r3) goto next_after_fail175;
255 : : }
256 : : else
257 : : _r3 = _o3[0];
258 : 133 : _o2[1] = _r3;
259 : : }
260 : 133 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
261 : 133 : tem_op.resimplify (lseq, valueize);
262 : 133 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
263 : 133 : if (!_r2) goto next_after_fail175;
264 : 77 : _o1[0] = _r2;
265 : : }
266 : 77 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
267 : 77 : tem_op.resimplify (lseq, valueize);
268 : 77 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
269 : 77 : if (!_r1) goto next_after_fail175;
270 : 77 : res_op->ops[0] = _r1;
271 : : }
272 : 77 : res_op->resimplify (lseq, valueize);
273 : 77 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 69, __FILE__, __LINE__, true);
274 : 77 : return true;
275 : : }
276 : : next_after_fail175:;
277 : : }
278 : : return false;
279 : : }
280 : :
281 : : bool
282 : 34 : gimple_simplify_26 (gimple_match_op *res_op, gimple_seq *seq,
283 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
284 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
285 : : {
286 : 34 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
287 : 34 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
288 : 34 : && tree_nop_conversion_p (type, TREE_TYPE (captures[2]))
289 : : )
290 : : {
291 : 30 : gimple_seq *lseq = seq;
292 : 30 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail185;
293 : 30 : {
294 : 30 : res_op->set_op (BIT_XOR_EXPR, type, 2);
295 : 30 : {
296 : 30 : tree _o1[1], _r1;
297 : 30 : _o1[0] = captures[1];
298 : 30 : if (type != TREE_TYPE (_o1[0])
299 : 30 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
300 : : {
301 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
302 : 0 : tem_op.resimplify (lseq, valueize);
303 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
304 : 0 : if (!_r1) goto next_after_fail185;
305 : : }
306 : : else
307 : : _r1 = _o1[0];
308 : 30 : res_op->ops[0] = _r1;
309 : : }
310 : 30 : {
311 : 30 : tree _o1[1], _r1;
312 : 30 : _o1[0] = captures[2];
313 : 30 : if (type != TREE_TYPE (_o1[0])
314 : 30 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
315 : : {
316 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
317 : 0 : tem_op.resimplify (lseq, valueize);
318 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
319 : 0 : if (!_r1) goto next_after_fail185;
320 : : }
321 : : else
322 : : _r1 = _o1[0];
323 : 30 : res_op->ops[1] = _r1;
324 : : }
325 : 30 : res_op->resimplify (lseq, valueize);
326 : 30 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 79, __FILE__, __LINE__, true);
327 : 30 : return true;
328 : : }
329 : : next_after_fail185:;
330 : : }
331 : : return false;
332 : : }
333 : :
334 : : bool
335 : 48 : gimple_simplify_33 (gimple_match_op *res_op, gimple_seq *seq,
336 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
337 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
338 : : const enum tree_code ARG_UNUSED (op))
339 : : {
340 : 48 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
341 : 48 : if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_WRAPS (type)
342 : 222 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[3])) == 0
343 : : )
344 : : {
345 : 10 : gimple_seq *lseq = seq;
346 : 10 : if (lseq
347 : 4 : && (!single_use (captures[0])
348 : 4 : || !single_use (captures[3])))
349 : 6 : lseq = NULL;
350 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail195;
351 : 10 : {
352 : 10 : res_op->set_op (MULT_EXPR, type, 2);
353 : 10 : res_op->ops[0] = captures[1];
354 : 10 : res_op->ops[1] = wide_int_to_tree (type, wi::to_wide (captures[2]) + wi::to_wide (captures[4]));
355 : 10 : res_op->resimplify (lseq, valueize);
356 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 87, __FILE__, __LINE__, true);
357 : 10 : return true;
358 : : }
359 : 0 : next_after_fail195:;
360 : : }
361 : : return false;
362 : : }
363 : :
364 : : bool
365 : 1838 : gimple_simplify_37 (gimple_match_op *res_op, gimple_seq *seq,
366 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
367 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
368 : : const enum tree_code ARG_UNUSED (op))
369 : : {
370 : 1838 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
371 : 3676 : if (INTEGRAL_TYPE_P (type)
372 : 1790 : && tree_int_cst_sgn (captures[2]) > 0
373 : 9046 : && (tree_nonzero_bits (captures[0]) & tree_nonzero_bits (captures[1])) == 0
374 : : )
375 : : {
376 : 192 : {
377 : 192 : tree t = type;
378 : 192 : if (!TYPE_OVERFLOW_WRAPS (t))
379 : 4 : t = unsigned_type_for (t);
380 : 192 : wide_int wone = wi::one (TYPE_PRECISION (t));
381 : 192 : wide_int c = wi::add (wi::lshift (wone, wi::to_wide (captures[2])), wone);
382 : 192 : gimple_seq *lseq = seq;
383 : 192 : if (lseq
384 : 190 : && (!single_use (captures[0])))
385 : 2 : lseq = NULL;
386 : 192 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail199;
387 : 192 : {
388 : 192 : res_op->set_op (NOP_EXPR, type, 1);
389 : 192 : {
390 : 192 : tree _o1[2], _r1;
391 : 192 : {
392 : 192 : tree _o2[1], _r2;
393 : 192 : _o2[0] = captures[1];
394 : 192 : if (t != TREE_TYPE (_o2[0])
395 : 192 : && !useless_type_conversion_p (t, TREE_TYPE (_o2[0])))
396 : : {
397 : 4 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t, _o2[0]);
398 : 4 : tem_op.resimplify (lseq, valueize);
399 : 4 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
400 : 4 : if (!_r2) goto next_after_fail199;
401 : : }
402 : : else
403 : : _r2 = _o2[0];
404 : 191 : _o1[0] = _r2;
405 : : }
406 : 191 : _o1[1] = wide_int_to_tree (t, c);
407 : 191 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, t, _o1[0], _o1[1]);
408 : 191 : tem_op.resimplify (lseq, valueize);
409 : 191 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
410 : 191 : if (!_r1) goto next_after_fail199;
411 : 190 : res_op->ops[0] = _r1;
412 : : }
413 : 190 : res_op->resimplify (lseq, valueize);
414 : 190 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 91, __FILE__, __LINE__, true);
415 : 190 : return true;
416 : : }
417 : 2 : next_after_fail199:;
418 : 192 : }
419 : : }
420 : : return false;
421 : : }
422 : :
423 : : bool
424 : 35160 : gimple_simplify_49 (gimple_match_op *res_op, gimple_seq *seq,
425 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
426 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
427 : : {
428 : 35160 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
429 : 31 : if (ANY_INTEGRAL_TYPE_P (type)
430 : 35160 : && TYPE_OVERFLOW_WRAPS (type)
431 : 40306 : && !integer_all_onesp (captures[1])
432 : : )
433 : : {
434 : 5045 : gimple_seq *lseq = seq;
435 : 5045 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail215;
436 : 5045 : {
437 : 5045 : res_op->set_op (PLUS_EXPR, type, 2);
438 : 5045 : {
439 : 5045 : tree _o1[2], _r1;
440 : 5045 : _o1[0] = captures[1];
441 : 5045 : _o1[1] = captures[0];
442 : 5045 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
443 : 5045 : tem_op.resimplify (lseq, valueize);
444 : 5045 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
445 : 5045 : if (!_r1) goto next_after_fail215;
446 : 3577 : res_op->ops[0] = _r1;
447 : : }
448 : 3577 : res_op->ops[1] = build_minus_one_cst (type);
449 : 3577 : res_op->resimplify (lseq, valueize);
450 : 3577 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 107, __FILE__, __LINE__, true);
451 : 3577 : return true;
452 : : }
453 : : next_after_fail215:;
454 : : }
455 : : else
456 : : {
457 : 60230 : if (INTEGRAL_TYPE_P (type)
458 : 30112 : && TREE_CODE (captures[1]) == INTEGER_CST
459 : 90342 : && wi::to_wide (captures[1]) != wi::min_value (TYPE_PRECISION (type),
460 : : SIGNED)
461 : : )
462 : : {
463 : 379 : gimple_seq *lseq = seq;
464 : 379 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail216;
465 : 379 : {
466 : 379 : res_op->set_op (MINUS_EXPR, type, 2);
467 : 379 : {
468 : 379 : tree _o1[2], _r1;
469 : 379 : _o1[0] = captures[1];
470 : 379 : _o1[1] = build_minus_one_cst (type);
471 : 379 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
472 : 379 : tem_op.resimplify (lseq, valueize);
473 : 379 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
474 : 379 : if (!_r1) goto next_after_fail216;
475 : 379 : res_op->ops[0] = _r1;
476 : : }
477 : 379 : res_op->ops[1] = captures[0];
478 : 379 : res_op->resimplify (lseq, valueize);
479 : 379 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 108, __FILE__, __LINE__, true);
480 : 379 : return true;
481 : : }
482 : : next_after_fail216:;
483 : : }
484 : : }
485 : : return false;
486 : : }
487 : :
488 : : bool
489 : 77279 : gimple_simplify_60 (gimple_match_op *res_op, gimple_seq *seq,
490 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
491 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
492 : : const enum tree_code ARG_UNUSED (op))
493 : : {
494 : 77279 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
495 : 77279 : if (!TYPE_SATURATING (type)
496 : : )
497 : : {
498 : 77279 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
499 : 154558 : && !FIXED_POINT_TYPE_P (type)
500 : : )
501 : : {
502 : 77279 : if (TREE_CODE (TREE_TYPE (captures[2])) == INTEGER_TYPE
503 : 77279 : && TREE_CODE (type) == INTEGER_TYPE
504 : 77279 : && TYPE_PRECISION (type) > TYPE_PRECISION (TREE_TYPE (captures[2]))
505 : 110592 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))
506 : 46368 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[2]))
507 : 178943 : && TYPE_OVERFLOW_WRAPS (type)
508 : : )
509 : : {
510 : 4140 : gimple_seq *lseq = seq;
511 : 4140 : if (lseq
512 : 815 : && (!single_use (captures[0])
513 : 151 : || !single_use (captures[1])))
514 : 4040 : lseq = NULL;
515 : 4140 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail235;
516 : 4140 : {
517 : 4140 : res_op->set_op (PLUS_EXPR, type, 2);
518 : 4140 : {
519 : 4140 : tree _o1[1], _r1;
520 : 4140 : _o1[0] = captures[2];
521 : 4140 : if (type != TREE_TYPE (_o1[0])
522 : 4140 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
523 : : {
524 : 4140 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
525 : 4140 : tem_op.resimplify (lseq, valueize);
526 : 4140 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
527 : 4140 : if (!_r1) goto next_after_fail235;
528 : : }
529 : : else
530 : : _r1 = _o1[0];
531 : 749 : res_op->ops[0] = _r1;
532 : : }
533 : 749 : {
534 : 749 : tree _o1[2], _r1;
535 : 749 : _o1[0] = captures[4];
536 : 749 : {
537 : 749 : tree _o2[1], _r2;
538 : 749 : _o2[0] = captures[3];
539 : 749 : if (type != TREE_TYPE (_o2[0])
540 : 749 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
541 : : {
542 : 749 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
543 : 749 : tem_op.resimplify (lseq, valueize);
544 : 749 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
545 : 749 : if (!_r2) goto next_after_fail235;
546 : : }
547 : : else
548 : : _r2 = _o2[0];
549 : 749 : _o1[1] = _r2;
550 : : }
551 : 749 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
552 : 749 : tem_op.resimplify (lseq, valueize);
553 : 749 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
554 : 749 : if (!_r1) goto next_after_fail235;
555 : 749 : res_op->ops[1] = _r1;
556 : : }
557 : 749 : res_op->resimplify (lseq, valueize);
558 : 749 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 127, __FILE__, __LINE__, true);
559 : 749 : return true;
560 : : }
561 : : next_after_fail235:;
562 : : }
563 : : }
564 : : }
565 : : return false;
566 : : }
567 : :
568 : : bool
569 : 4497 : gimple_simplify_69 (gimple_match_op *res_op, gimple_seq *seq,
570 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
571 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
572 : : {
573 : 4497 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
574 : 4497 : if (VECTOR_TYPE_P (type)
575 : 4497 : && known_eq (TYPE_VECTOR_SUBPARTS (type),
576 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (captures[3])))
577 : 13491 : && (TYPE_MODE (TREE_TYPE (type))
578 : 4497 : == TYPE_MODE (TREE_TYPE (TREE_TYPE (captures[3]))))
579 : : )
580 : : {
581 : 4497 : gimple_seq *lseq = seq;
582 : 4497 : if (lseq
583 : 1186 : && (!single_use (captures[1])))
584 : 3587 : lseq = NULL;
585 : 4497 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail245;
586 : 4497 : {
587 : 4497 : res_op->set_op (MINUS_EXPR, type, 2);
588 : 4497 : res_op->ops[0] = captures[0];
589 : 4497 : {
590 : 4497 : tree _o1[1], _r1;
591 : 4497 : {
592 : 4497 : tree _o2[3], _r2;
593 : 4497 : _o2[0] = captures[2];
594 : 4497 : {
595 : 4497 : tree _o3[1], _r3;
596 : 4497 : _o3[0] = captures[3];
597 : 4497 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
598 : 4497 : tem_op.resimplify (lseq, valueize);
599 : 4497 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
600 : 4497 : if (!_r3) goto next_after_fail245;
601 : 4497 : _o2[1] = _r3;
602 : : }
603 : 4497 : _o2[2] = captures[4];
604 : 4497 : gimple_match_op tem_op (res_op->cond.any_else (), VEC_COND_EXPR, TREE_TYPE (_o2[1]), _o2[0], _o2[1], _o2[2]);
605 : 4497 : tem_op.resimplify (lseq, valueize);
606 : 4497 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
607 : 4497 : if (!_r2) goto next_after_fail245;
608 : 910 : _o1[0] = _r2;
609 : : }
610 : 910 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, type, _o1[0]);
611 : 910 : tem_op.resimplify (lseq, valueize);
612 : 910 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
613 : 910 : if (!_r1) goto next_after_fail245;
614 : 910 : res_op->ops[1] = _r1;
615 : : }
616 : 910 : res_op->resimplify (lseq, valueize);
617 : 910 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 137, __FILE__, __LINE__, true);
618 : 910 : return true;
619 : : }
620 : : next_after_fail245:;
621 : : }
622 : : return false;
623 : : }
624 : :
625 : : bool
626 : 0 : gimple_simplify_77 (gimple_match_op *res_op, gimple_seq *seq,
627 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
628 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
629 : : {
630 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
631 : 0 : if (INTEGRAL_TYPE_P (type)
632 : : )
633 : : {
634 : 0 : gimple_seq *lseq = seq;
635 : 0 : if (lseq
636 : 0 : && (!single_use (captures[0])
637 : 0 : || !single_use (captures[2])
638 : 0 : || !single_use (captures[3])))
639 : 0 : lseq = NULL;
640 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail253;
641 : 0 : {
642 : 0 : res_op->set_op (MINUS_EXPR, type, 2);
643 : 0 : res_op->ops[0] = captures[1];
644 : 0 : {
645 : 0 : tree _o1[2], _r1;
646 : 0 : _o1[0] = captures[4];
647 : 0 : _o1[1] = captures[1];
648 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_MOD_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
649 : 0 : tem_op.resimplify (lseq, valueize);
650 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
651 : 0 : if (!_r1) goto next_after_fail253;
652 : 0 : res_op->ops[1] = _r1;
653 : : }
654 : 0 : res_op->resimplify (lseq, valueize);
655 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 145, __FILE__, __LINE__, true);
656 : 0 : return true;
657 : : }
658 : : next_after_fail253:;
659 : : }
660 : : return false;
661 : : }
662 : :
663 : : bool
664 : 1895 : gimple_simplify_85 (gimple_match_op *res_op, gimple_seq *seq,
665 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
666 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
667 : : {
668 : 1895 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
669 : 1895 : if (!TYPE_SATURATING (type)
670 : : )
671 : : {
672 : 1895 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
673 : 1895 : && !TYPE_OVERFLOW_SANITIZED (type)
674 : : )
675 : : {
676 : 134 : {
677 : 134 : tree t1 = type;
678 : 134 : if (INTEGRAL_TYPE_P (type)
679 : 268 : && TYPE_OVERFLOW_WRAPS (type) != TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1])))
680 : 134 : t1 = TYPE_OVERFLOW_WRAPS (type) ? type : TREE_TYPE (captures[1]);
681 : 134 : gimple_seq *lseq = seq;
682 : 134 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail261;
683 : 134 : {
684 : 134 : res_op->set_op (NOP_EXPR, type, 1);
685 : 134 : {
686 : 134 : tree _o1[2], _r1;
687 : 134 : {
688 : 134 : tree _o2[1], _r2;
689 : 134 : _o2[0] = captures[0];
690 : 134 : if (t1 != TREE_TYPE (_o2[0])
691 : 134 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
692 : : {
693 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
694 : 0 : tem_op.resimplify (lseq, valueize);
695 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
696 : 0 : if (!_r2) goto next_after_fail261;
697 : : }
698 : : else
699 : : _r2 = _o2[0];
700 : 134 : _o1[0] = _r2;
701 : : }
702 : 134 : {
703 : 134 : tree _o2[1], _r2;
704 : 134 : _o2[0] = captures[1];
705 : 134 : if (t1 != TREE_TYPE (_o2[0])
706 : 134 : && !useless_type_conversion_p (t1, TREE_TYPE (_o2[0])))
707 : : {
708 : 134 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, t1, _o2[0]);
709 : 134 : tem_op.resimplify (lseq, valueize);
710 : 134 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
711 : 134 : if (!_r2) goto next_after_fail261;
712 : : }
713 : : else
714 : : _r2 = _o2[0];
715 : 54 : _o1[1] = _r2;
716 : : }
717 : 54 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
718 : 54 : tem_op.resimplify (lseq, valueize);
719 : 54 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
720 : 54 : if (!_r1) goto next_after_fail261;
721 : 37 : res_op->ops[0] = _r1;
722 : : }
723 : 37 : res_op->resimplify (lseq, valueize);
724 : 37 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 152, __FILE__, __LINE__, true);
725 : 37 : return true;
726 : : }
727 : : next_after_fail261:;
728 : : }
729 : : }
730 : : }
731 : : return false;
732 : : }
733 : :
734 : : bool
735 : 19970 : gimple_simplify_95 (gimple_match_op *res_op, gimple_seq *seq,
736 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
737 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
738 : : {
739 : 19970 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
740 : 19970 : if (!TYPE_SATURATING (type)
741 : : )
742 : : {
743 : 19970 : if ((!FLOAT_TYPE_P (type) || flag_associative_math)
744 : 39940 : && !FIXED_POINT_TYPE_P (type)
745 : : )
746 : : {
747 : 19970 : if (INTEGRAL_TYPE_P (type)
748 : 19970 : && TYPE_OVERFLOW_UNDEFINED (type)
749 : 40 : && element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
750 : 19982 : && element_precision (type) <= element_precision (TREE_TYPE (captures[2]))
751 : : )
752 : : {
753 : 12 : {
754 : 12 : tree utype = unsigned_type_for (type);
755 : 12 : gimple_seq *lseq = seq;
756 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail276;
757 : 12 : {
758 : 12 : res_op->set_op (NOP_EXPR, type, 1);
759 : 12 : {
760 : 12 : tree _o1[2], _r1;
761 : 12 : {
762 : 12 : tree _o2[1], _r2;
763 : 12 : _o2[0] = captures[1];
764 : 12 : if (utype != TREE_TYPE (_o2[0])
765 : 12 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
766 : : {
767 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
768 : 0 : tem_op.resimplify (lseq, valueize);
769 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
770 : 0 : if (!_r2) goto next_after_fail276;
771 : : }
772 : : else
773 : : _r2 = _o2[0];
774 : 12 : _o1[0] = _r2;
775 : : }
776 : 12 : {
777 : 12 : tree _o2[1], _r2;
778 : 12 : _o2[0] = captures[2];
779 : 12 : if (utype != TREE_TYPE (_o2[0])
780 : 12 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
781 : : {
782 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
783 : 0 : tem_op.resimplify (lseq, valueize);
784 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
785 : 0 : if (!_r2) goto next_after_fail276;
786 : : }
787 : : else
788 : : _r2 = _o2[0];
789 : 12 : _o1[1] = _r2;
790 : : }
791 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
792 : 12 : tem_op.resimplify (lseq, valueize);
793 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
794 : 12 : if (!_r1) goto next_after_fail276;
795 : 6 : res_op->ops[0] = _r1;
796 : : }
797 : 6 : res_op->resimplify (lseq, valueize);
798 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 167, __FILE__, __LINE__, true);
799 : 6 : return true;
800 : : }
801 : : next_after_fail276:;
802 : : }
803 : : }
804 : : else
805 : : {
806 : 19958 : if (((element_precision (type) <= element_precision (TREE_TYPE (captures[1])))
807 : 19958 : == (element_precision (type) <= element_precision (TREE_TYPE (captures[2]))))
808 : 19958 : && (element_precision (type) <= element_precision (TREE_TYPE (captures[1]))
809 : 82 : || (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
810 : 82 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
811 : 82 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
812 : 44 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[2]))))
813 : : )
814 : : {
815 : 19920 : gimple_seq *lseq = seq;
816 : 19920 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail277;
817 : 19920 : {
818 : 19920 : res_op->set_op (MINUS_EXPR, type, 2);
819 : 19920 : {
820 : 19920 : tree _o1[1], _r1;
821 : 19920 : _o1[0] = captures[1];
822 : 19920 : if (type != TREE_TYPE (_o1[0])
823 : 19920 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
824 : : {
825 : 19920 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
826 : 19920 : tem_op.resimplify (lseq, valueize);
827 : 19920 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
828 : 19920 : if (!_r1) goto next_after_fail277;
829 : : }
830 : : else
831 : : _r1 = _o1[0];
832 : 2797 : res_op->ops[0] = _r1;
833 : : }
834 : 2797 : {
835 : 2797 : tree _o1[1], _r1;
836 : 2797 : _o1[0] = captures[2];
837 : 2797 : if (type != TREE_TYPE (_o1[0])
838 : 2797 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
839 : : {
840 : 2797 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
841 : 2797 : tem_op.resimplify (lseq, valueize);
842 : 2797 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
843 : 2797 : if (!_r1) goto next_after_fail277;
844 : : }
845 : : else
846 : : _r1 = _o1[0];
847 : 2795 : res_op->ops[1] = _r1;
848 : : }
849 : 2795 : res_op->resimplify (lseq, valueize);
850 : 2795 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 168, __FILE__, __LINE__, true);
851 : 2795 : return true;
852 : : }
853 : : next_after_fail277:;
854 : : }
855 : : }
856 : : }
857 : : }
858 : : return false;
859 : : }
860 : :
861 : : bool
862 : 0 : gimple_simplify_119 (gimple_match_op *res_op, gimple_seq *seq,
863 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
864 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
865 : : {
866 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
867 : 0 : gimple_seq *lseq = seq;
868 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail301;
869 : 0 : {
870 : 0 : tree tem;
871 : 0 : tem = captures[0];
872 : 0 : res_op->set_value (tem);
873 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 187, __FILE__, __LINE__, true);
874 : : return true;
875 : : }
876 : 0 : next_after_fail301:;
877 : 0 : return false;
878 : : }
879 : :
880 : : bool
881 : 0 : gimple_simplify_126 (gimple_match_op *res_op, gimple_seq *seq,
882 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
883 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
884 : : const enum tree_code ARG_UNUSED (op))
885 : : {
886 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
887 : 0 : if (tree_nop_conversion_p (type, TREE_TYPE (captures[3]))
888 : 0 : && tree_nop_conversion_p (type, TREE_TYPE (captures[6]))
889 : : )
890 : : {
891 : 0 : if (single_use (captures[4]) && single_use (captures[5])
892 : : )
893 : : {
894 : 0 : gimple_seq *lseq = seq;
895 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail308;
896 : 0 : {
897 : 0 : res_op->set_op (op, type, 2);
898 : 0 : res_op->ops[0] = captures[0];
899 : 0 : {
900 : 0 : tree _o1[1], _r1;
901 : 0 : _o1[0] = captures[6];
902 : 0 : if (type != TREE_TYPE (_o1[0])
903 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
904 : : {
905 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
906 : 0 : tem_op.resimplify (lseq, valueize);
907 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
908 : 0 : if (!_r1) goto next_after_fail308;
909 : : }
910 : : else
911 : : _r1 = _o1[0];
912 : 0 : res_op->ops[1] = _r1;
913 : : }
914 : 0 : res_op->resimplify (lseq, valueize);
915 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 192, __FILE__, __LINE__, true);
916 : 0 : return true;
917 : : }
918 : : next_after_fail308:;
919 : : }
920 : : else
921 : : {
922 : 0 : if (single_use (captures[0]) && single_use (captures[1])
923 : : )
924 : : {
925 : 0 : gimple_seq *lseq = seq;
926 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail309;
927 : 0 : {
928 : 0 : res_op->set_op (op, type, 2);
929 : 0 : {
930 : 0 : tree _o1[1], _r1;
931 : 0 : _o1[0] = captures[3];
932 : 0 : if (type != TREE_TYPE (_o1[0])
933 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
934 : : {
935 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
936 : 0 : tem_op.resimplify (lseq, valueize);
937 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
938 : 0 : if (!_r1) goto next_after_fail309;
939 : : }
940 : : else
941 : : _r1 = _o1[0];
942 : 0 : res_op->ops[0] = _r1;
943 : : }
944 : 0 : res_op->ops[1] = captures[4];
945 : 0 : res_op->resimplify (lseq, valueize);
946 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 193, __FILE__, __LINE__, true);
947 : 0 : return true;
948 : : }
949 : : next_after_fail309:;
950 : : }
951 : : }
952 : : }
953 : : return false;
954 : : }
955 : :
956 : : bool
957 : 1 : gimple_simplify_138 (gimple_match_op *res_op, gimple_seq *seq,
958 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
959 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
960 : : const enum tree_code ARG_UNUSED (bitop),
961 : : const enum tree_code ARG_UNUSED (rbitop))
962 : : {
963 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
964 : 1 : if (bitop == BIT_AND_EXPR
965 : : )
966 : : {
967 : 1 : gimple_seq *lseq = seq;
968 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail324;
969 : 1 : {
970 : 1 : tree tem;
971 : 1 : tem = build_zero_cst (type);
972 : 1 : res_op->set_value (tem);
973 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 199, __FILE__, __LINE__, true);
974 : 1 : return true;
975 : : }
976 : 0 : next_after_fail324:;
977 : : }
978 : : else
979 : : {
980 : 0 : gimple_seq *lseq = seq;
981 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail325;
982 : 0 : {
983 : 0 : tree tem;
984 : 0 : tem = build_minus_one_cst (type);
985 : 0 : res_op->set_value (tem);
986 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 200, __FILE__, __LINE__, true);
987 : 0 : return true;
988 : : }
989 : 0 : next_after_fail325:;
990 : : }
991 : : return false;
992 : : }
993 : :
994 : : bool
995 : 73 : gimple_simplify_145 (gimple_match_op *res_op, gimple_seq *seq,
996 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
997 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
998 : : const enum tree_code ARG_UNUSED (cmp),
999 : : const enum tree_code ARG_UNUSED (icmp))
1000 : : {
1001 : 73 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1002 : 73 : if (invert_tree_comparison (cmp, HONOR_NANS (captures[2])) == icmp
1003 : : )
1004 : : {
1005 : 0 : gimple_seq *lseq = seq;
1006 : 0 : if (lseq
1007 : 0 : && (!single_use (captures[0])
1008 : 0 : || !single_use (captures[5])))
1009 : 0 : lseq = NULL;
1010 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail335;
1011 : 0 : {
1012 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
1013 : 0 : res_op->ops[0] = captures[1];
1014 : 0 : res_op->ops[1] = captures[4];
1015 : 0 : res_op->ops[2] = captures[7];
1016 : 0 : res_op->resimplify (lseq, valueize);
1017 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 208, __FILE__, __LINE__, true);
1018 : 0 : return true;
1019 : : }
1020 : 0 : next_after_fail335:;
1021 : : }
1022 : : return false;
1023 : : }
1024 : :
1025 : : bool
1026 : 0 : gimple_simplify_152 (gimple_match_op *res_op, gimple_seq *seq,
1027 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1028 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1029 : : {
1030 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1031 : 0 : gimple_seq *lseq = seq;
1032 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail360;
1033 : 0 : {
1034 : 0 : tree tem;
1035 : 0 : tem = captures[2];
1036 : 0 : res_op->set_value (tem);
1037 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 209, __FILE__, __LINE__, true);
1038 : : return true;
1039 : : }
1040 : 0 : next_after_fail360:;
1041 : 0 : return false;
1042 : : }
1043 : :
1044 : : bool
1045 : 46 : gimple_simplify_156 (gimple_match_op *res_op, gimple_seq *seq,
1046 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1047 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1048 : : const enum tree_code ARG_UNUSED (code2),
1049 : : const enum tree_code ARG_UNUSED (code1))
1050 : : {
1051 : 46 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1052 : 46 : if ((TREE_CODE (captures[2]) == INTEGER_CST
1053 : 39 : && TREE_CODE (captures[5]) == INTEGER_CST)
1054 : 83 : || ((INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1055 : 0 : || POINTER_TYPE_P (TREE_TYPE (captures[2])))
1056 : 44 : && bitwise_equal_p (captures[2], captures[5]))
1057 : : )
1058 : : {
1059 : 2 : {
1060 : 2 : bool one_before = false;
1061 : 2 : bool one_after = false;
1062 : 2 : int cmp = 0;
1063 : 2 : bool allbits = true;
1064 : 2 : if (TREE_CODE (captures[2]) == INTEGER_CST
1065 : 2 : && TREE_CODE (captures[5]) == INTEGER_CST)
1066 : : {
1067 : 2 : allbits = TYPE_PRECISION (TREE_TYPE (captures[2])) <= TYPE_PRECISION (TREE_TYPE (captures[5]));
1068 : 2 : auto t1 = wi::to_wide (fold_convert (TREE_TYPE (captures[5]), captures[2]));
1069 : 2 : auto t2 = wi::to_wide (captures[5]);
1070 : 2 : cmp = wi::cmp (t1, t2, TYPE_SIGN (TREE_TYPE (captures[5])));
1071 : 2 : if (cmp < 0
1072 : 2 : && t1 == t2 - 1)
1073 : : one_before = true;
1074 : 2 : if (cmp > 0
1075 : 2 : && t1 == t2 + 1)
1076 : : one_after = true;
1077 : : }
1078 : 2 : bool val;
1079 : 2 : switch (code2)
1080 : : {
1081 : 0 : case EQ_EXPR: val = (cmp == 0); break;
1082 : 0 : case NE_EXPR: val = (cmp != 0); break;
1083 : 0 : case LT_EXPR: val = (cmp < 0); break;
1084 : 2 : case GT_EXPR: val = (cmp > 0); break;
1085 : 0 : case LE_EXPR: val = (cmp <= 0); break;
1086 : 0 : case GE_EXPR: val = (cmp >= 0); break;
1087 : 0 : default: gcc_unreachable ();
1088 : : }
1089 : 2 : if (code1 == EQ_EXPR && val
1090 : : )
1091 : : {
1092 : 2 : gimple_seq *lseq = seq;
1093 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail365;
1094 : 2 : {
1095 : 2 : tree tem;
1096 : 2 : tem = captures[3];
1097 : 2 : res_op->set_value (tem);
1098 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 212, __FILE__, __LINE__, true);
1099 : 2 : return true;
1100 : : }
1101 : 0 : next_after_fail365:;
1102 : : }
1103 : : else
1104 : : {
1105 : 0 : if (code1 == NE_EXPR && val && allbits
1106 : : )
1107 : : {
1108 : 0 : gimple_seq *lseq = seq;
1109 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail366;
1110 : 0 : {
1111 : 0 : tree tem;
1112 : 0 : tem = constant_boolean_node (true, type);
1113 : 0 : res_op->set_value (tem);
1114 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 213, __FILE__, __LINE__, true);
1115 : 0 : return true;
1116 : : }
1117 : 0 : next_after_fail366:;
1118 : 0 : }
1119 : : else
1120 : : {
1121 : 0 : if (code1 == NE_EXPR && !val && allbits
1122 : : )
1123 : : {
1124 : 0 : gimple_seq *lseq = seq;
1125 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail367;
1126 : 0 : {
1127 : 0 : tree tem;
1128 : 0 : tem = captures[0];
1129 : 0 : res_op->set_value (tem);
1130 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 214, __FILE__, __LINE__, true);
1131 : 0 : return true;
1132 : : }
1133 : 0 : next_after_fail367:;
1134 : 0 : }
1135 : : else
1136 : : {
1137 : 0 : if (code1 == EQ_EXPR
1138 : 0 : && code2 == GT_EXPR
1139 : 0 : && cmp == 0
1140 : 0 : && allbits
1141 : : )
1142 : : {
1143 : 0 : gimple_seq *lseq = seq;
1144 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail368;
1145 : 0 : {
1146 : 0 : res_op->set_op (GE_EXPR, type, 2);
1147 : 0 : res_op->ops[0] = captures[4];
1148 : 0 : res_op->ops[1] = captures[5];
1149 : 0 : res_op->resimplify (lseq, valueize);
1150 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 215, __FILE__, __LINE__, true);
1151 : 0 : return true;
1152 : : }
1153 : 0 : next_after_fail368:;
1154 : 0 : }
1155 : : else
1156 : : {
1157 : 0 : if (code1 == EQ_EXPR
1158 : 0 : && code2 == LT_EXPR
1159 : 0 : && cmp == 0
1160 : 0 : && allbits
1161 : : )
1162 : : {
1163 : 0 : gimple_seq *lseq = seq;
1164 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail369;
1165 : 0 : {
1166 : 0 : res_op->set_op (LE_EXPR, type, 2);
1167 : 0 : res_op->ops[0] = captures[4];
1168 : 0 : res_op->ops[1] = captures[5];
1169 : 0 : res_op->resimplify (lseq, valueize);
1170 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 216, __FILE__, __LINE__, true);
1171 : 0 : return true;
1172 : : }
1173 : 0 : next_after_fail369:;
1174 : 0 : }
1175 : : else
1176 : : {
1177 : 0 : if (code1 == EQ_EXPR
1178 : 0 : && code2 == GE_EXPR
1179 : : && one_before
1180 : 0 : && allbits
1181 : : )
1182 : : {
1183 : 0 : gimple_seq *lseq = seq;
1184 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail370;
1185 : 0 : {
1186 : 0 : res_op->set_op (GE_EXPR, type, 2);
1187 : 0 : res_op->ops[0] = captures[4];
1188 : 0 : {
1189 : 0 : tree _o1[1], _r1;
1190 : 0 : _o1[0] = captures[2];
1191 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
1192 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
1193 : : {
1194 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
1195 : 0 : tem_op.resimplify (lseq, valueize);
1196 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1197 : 0 : if (!_r1) goto next_after_fail370;
1198 : : }
1199 : : else
1200 : : _r1 = _o1[0];
1201 : 0 : res_op->ops[1] = _r1;
1202 : : }
1203 : 0 : res_op->resimplify (lseq, valueize);
1204 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 217, __FILE__, __LINE__, true);
1205 : 0 : return true;
1206 : : }
1207 : : next_after_fail370:;
1208 : : }
1209 : : else
1210 : : {
1211 : 0 : if (code1 == EQ_EXPR
1212 : 0 : && code2 == LE_EXPR
1213 : : && one_after
1214 : 0 : && allbits
1215 : : )
1216 : : {
1217 : 0 : gimple_seq *lseq = seq;
1218 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail371;
1219 : 0 : {
1220 : 0 : res_op->set_op (LE_EXPR, type, 2);
1221 : 0 : res_op->ops[0] = captures[4];
1222 : 0 : {
1223 : 0 : tree _o1[1], _r1;
1224 : 0 : _o1[0] = captures[2];
1225 : 0 : if (TREE_TYPE (res_op->ops[0]) != TREE_TYPE (_o1[0])
1226 : 0 : && !useless_type_conversion_p (TREE_TYPE (res_op->ops[0]), TREE_TYPE (_o1[0])))
1227 : : {
1228 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (res_op->ops[0]), _o1[0]);
1229 : 0 : tem_op.resimplify (lseq, valueize);
1230 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1231 : 0 : if (!_r1) goto next_after_fail371;
1232 : : }
1233 : : else
1234 : : _r1 = _o1[0];
1235 : 0 : res_op->ops[1] = _r1;
1236 : : }
1237 : 0 : res_op->resimplify (lseq, valueize);
1238 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 218, __FILE__, __LINE__, true);
1239 : 0 : return true;
1240 : : }
1241 : : next_after_fail371:;
1242 : : }
1243 : : }
1244 : : }
1245 : : }
1246 : : }
1247 : : }
1248 : : }
1249 : : }
1250 : : }
1251 : : return false;
1252 : : }
1253 : :
1254 : : bool
1255 : 1201 : gimple_simplify_187 (gimple_match_op *res_op, gimple_seq *seq,
1256 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1257 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
1258 : : {
1259 : 1201 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1260 : 1201 : if (! FLOAT_TYPE_P (type)
1261 : 2402 : && tree_nop_conversion_p (type, TREE_TYPE (captures[1]))
1262 : : )
1263 : : {
1264 : 363 : gimple_seq *lseq = seq;
1265 : 363 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail409;
1266 : 363 : {
1267 : 363 : res_op->set_op (LSHIFT_EXPR, type, 2);
1268 : 363 : res_op->ops[0] = captures[0];
1269 : 363 : res_op->ops[1] = captures[2];
1270 : 363 : res_op->resimplify (lseq, valueize);
1271 : 363 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 238, __FILE__, __LINE__, true);
1272 : 363 : return true;
1273 : : }
1274 : 0 : next_after_fail409:;
1275 : : }
1276 : : return false;
1277 : : }
1278 : :
1279 : : bool
1280 : 1 : gimple_simplify_198 (gimple_match_op *res_op, gimple_seq *seq,
1281 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1282 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1283 : : const combined_fn ARG_UNUSED (SQRT_ALL))
1284 : : {
1285 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1286 : 1 : if (flag_unsafe_math_optimizations
1287 : : )
1288 : : {
1289 : 1 : if (!tree_expr_maybe_signaling_nan_p (captures[1])
1290 : : )
1291 : : {
1292 : 1 : gimple_seq *lseq = seq;
1293 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail423;
1294 : 1 : {
1295 : 1 : tree tem;
1296 : 1 : tem = captures[1];
1297 : 1 : res_op->set_value (tem);
1298 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 248, __FILE__, __LINE__, true);
1299 : 1 : return true;
1300 : : }
1301 : 0 : next_after_fail423:;
1302 : : }
1303 : : }
1304 : : return false;
1305 : : }
1306 : :
1307 : : bool
1308 : 1893 : gimple_simplify_204 (gimple_match_op *res_op, gimple_seq *seq,
1309 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1310 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1311 : : const enum tree_code ARG_UNUSED (cmp),
1312 : : const enum tree_code ARG_UNUSED (mod))
1313 : : {
1314 : 1893 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1315 : 1893 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1316 : : )
1317 : : {
1318 : 1893 : {
1319 : 1893 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
1320 : 1893 : gimple_seq *lseq = seq;
1321 : 1893 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail429;
1322 : 1893 : {
1323 : 1893 : res_op->set_op (cmp, type, 2);
1324 : 1893 : {
1325 : 1893 : tree _o1[2], _r1;
1326 : 1893 : {
1327 : 1893 : tree _o2[1], _r2;
1328 : 1893 : _o2[0] = captures[0];
1329 : 1893 : if (utype != TREE_TYPE (_o2[0])
1330 : 1893 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
1331 : : {
1332 : 1893 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
1333 : 1893 : tem_op.resimplify (lseq, valueize);
1334 : 1893 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1335 : 1893 : if (!_r2) goto next_after_fail429;
1336 : : }
1337 : : else
1338 : : _r2 = _o2[0];
1339 : 720 : _o1[0] = _r2;
1340 : : }
1341 : 720 : {
1342 : 720 : tree _o2[1], _r2;
1343 : 720 : _o2[0] = captures[1];
1344 : 720 : if (utype != TREE_TYPE (_o2[0])
1345 : 720 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
1346 : : {
1347 : 720 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
1348 : 720 : tem_op.resimplify (lseq, valueize);
1349 : 720 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1350 : 720 : if (!_r2) goto next_after_fail429;
1351 : : }
1352 : : else
1353 : : _r2 = _o2[0];
1354 : 720 : _o1[1] = _r2;
1355 : : }
1356 : 720 : gimple_match_op tem_op (res_op->cond.any_else (), mod, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1357 : 720 : tem_op.resimplify (lseq, valueize);
1358 : 720 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1359 : 720 : if (!_r1) goto next_after_fail429;
1360 : 720 : res_op->ops[0] = _r1;
1361 : : }
1362 : 720 : {
1363 : 720 : tree _o1[1], _r1;
1364 : 720 : _o1[0] = captures[2];
1365 : 720 : if (utype != TREE_TYPE (_o1[0])
1366 : 720 : && !useless_type_conversion_p (utype, TREE_TYPE (_o1[0])))
1367 : : {
1368 : 720 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o1[0]);
1369 : 720 : tem_op.resimplify (lseq, valueize);
1370 : 720 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1371 : 720 : if (!_r1) goto next_after_fail429;
1372 : : }
1373 : : else
1374 : : _r1 = _o1[0];
1375 : 720 : res_op->ops[1] = _r1;
1376 : : }
1377 : 720 : res_op->resimplify (lseq, valueize);
1378 : 720 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 254, __FILE__, __LINE__, true);
1379 : 720 : return true;
1380 : : }
1381 : : next_after_fail429:;
1382 : : }
1383 : : }
1384 : : return false;
1385 : : }
1386 : :
1387 : : bool
1388 : 80603 : gimple_simplify_219 (gimple_match_op *res_op, gimple_seq *seq,
1389 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1390 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1391 : : const enum tree_code ARG_UNUSED (neeq))
1392 : : {
1393 : 80603 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1394 : 80603 : {
1395 : 80603 : poly_int64 diff; tree inner_type = TREE_TYPE (captures[2]);
1396 : 80603 : if (ptr_difference_const (captures[0], captures[1], &diff)
1397 : : )
1398 : : {
1399 : 2271 : gimple_seq *lseq = seq;
1400 : 2271 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail460;
1401 : 2271 : {
1402 : 2271 : res_op->set_op (neeq, type, 2);
1403 : 2271 : res_op->ops[0] = build_int_cst_type (inner_type, diff);
1404 : 2271 : res_op->ops[1] = captures[2];
1405 : 2271 : res_op->resimplify (lseq, valueize);
1406 : 2271 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 283, __FILE__, __LINE__, true);
1407 : 2271 : return true;
1408 : : }
1409 : 0 : next_after_fail460:;
1410 : : }
1411 : : }
1412 : 78332 : return false;
1413 : : }
1414 : :
1415 : : bool
1416 : 4239 : gimple_simplify_226 (gimple_match_op *res_op, gimple_seq *seq,
1417 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1418 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1419 : : const enum tree_code ARG_UNUSED (cmp))
1420 : : {
1421 : 4239 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1422 : 4239 : if (wi::lt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
1423 : 4239 : TYPE_SIGN (TREE_TYPE (captures[0])))
1424 : : )
1425 : : {
1426 : 4 : gimple_seq *lseq = seq;
1427 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail467;
1428 : 4 : {
1429 : 4 : tree tem;
1430 : 4 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1431 : 4 : res_op->set_value (tem);
1432 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 290, __FILE__, __LINE__, true);
1433 : 4 : return true;
1434 : : }
1435 : 0 : next_after_fail467:;
1436 : : }
1437 : : else
1438 : : {
1439 : 4235 : if (wi::gt_p (wi::to_wide (captures[1]), wi::to_wide (captures[2]),
1440 : 4235 : TYPE_SIGN (TREE_TYPE (captures[0])))
1441 : : )
1442 : : {
1443 : 4235 : gimple_seq *lseq = seq;
1444 : 4235 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail468;
1445 : 4235 : {
1446 : 4235 : res_op->set_op (cmp, type, 2);
1447 : 4235 : res_op->ops[0] = captures[0];
1448 : 4235 : res_op->ops[1] = captures[2];
1449 : 4235 : res_op->resimplify (lseq, valueize);
1450 : 4235 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 291, __FILE__, __LINE__, true);
1451 : 4235 : return true;
1452 : : }
1453 : 0 : next_after_fail468:;
1454 : : }
1455 : : }
1456 : : return false;
1457 : : }
1458 : :
1459 : : bool
1460 : 39 : gimple_simplify_233 (gimple_match_op *res_op, gimple_seq *seq,
1461 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1462 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1463 : : const enum tree_code ARG_UNUSED (cmp),
1464 : : const enum tree_code ARG_UNUSED (icmp))
1465 : : {
1466 : 39 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1467 : 39 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1468 : : )
1469 : : {
1470 : 39 : gimple_seq *lseq = seq;
1471 : 39 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail485;
1472 : 39 : {
1473 : 39 : res_op->set_op (icmp, type, 2);
1474 : 39 : res_op->ops[0] = captures[1];
1475 : 39 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
1476 : 39 : res_op->resimplify (lseq, valueize);
1477 : 39 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 308, __FILE__, __LINE__, true);
1478 : 39 : return true;
1479 : : }
1480 : 0 : next_after_fail485:;
1481 : : }
1482 : : return false;
1483 : : }
1484 : :
1485 : : bool
1486 : 35 : gimple_simplify_239 (gimple_match_op *res_op, gimple_seq *seq,
1487 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1488 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1489 : : const enum tree_code ARG_UNUSED (cmp),
1490 : : const combined_fn ARG_UNUSED (bswap))
1491 : : {
1492 : 35 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1493 : 35 : {
1494 : 35 : tree ctype = TREE_TYPE (captures[0]);
1495 : 35 : gimple_seq *lseq = seq;
1496 : 35 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail492;
1497 : 35 : {
1498 : 35 : res_op->set_op (cmp, type, 2);
1499 : 35 : {
1500 : 35 : tree _o1[1], _r1;
1501 : 35 : _o1[0] = captures[1];
1502 : 35 : if (ctype != TREE_TYPE (_o1[0])
1503 : 35 : && !useless_type_conversion_p (ctype, TREE_TYPE (_o1[0])))
1504 : : {
1505 : 21 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, ctype, _o1[0]);
1506 : 21 : tem_op.resimplify (lseq, valueize);
1507 : 21 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1508 : 21 : if (!_r1) goto next_after_fail492;
1509 : : }
1510 : : else
1511 : : _r1 = _o1[0];
1512 : 35 : res_op->ops[0] = _r1;
1513 : : }
1514 : 35 : {
1515 : 35 : tree _o1[1], _r1;
1516 : 35 : _o1[0] = captures[2];
1517 : 35 : if (ctype != TREE_TYPE (_o1[0])
1518 : 35 : && !useless_type_conversion_p (ctype, TREE_TYPE (_o1[0])))
1519 : : {
1520 : 21 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, ctype, _o1[0]);
1521 : 21 : tem_op.resimplify (lseq, valueize);
1522 : 21 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1523 : 21 : if (!_r1) goto next_after_fail492;
1524 : : }
1525 : : else
1526 : : _r1 = _o1[0];
1527 : 35 : res_op->ops[1] = _r1;
1528 : : }
1529 : 35 : res_op->resimplify (lseq, valueize);
1530 : 35 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 315, __FILE__, __LINE__, true);
1531 : : return true;
1532 : : }
1533 : : next_after_fail492:;
1534 : : }
1535 : : return false;
1536 : : }
1537 : :
1538 : : bool
1539 : 1357 : gimple_simplify_249 (gimple_match_op *res_op, gimple_seq *seq,
1540 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1541 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1542 : : const enum tree_code ARG_UNUSED (cmp))
1543 : : {
1544 : 1357 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1545 : 1357 : if (single_use (captures[1]) && single_use (captures[3])
1546 : : )
1547 : : {
1548 : 965 : {
1549 : 965 : tree otype = TREE_TYPE (captures[0]);
1550 : 965 : gimple_seq *lseq = seq;
1551 : 965 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail508;
1552 : 965 : {
1553 : 965 : res_op->set_op (cmp, type, 2);
1554 : 965 : {
1555 : 965 : tree _o1[1], _r1;
1556 : 965 : _o1[0] = captures[4];
1557 : 965 : if (otype != TREE_TYPE (_o1[0])
1558 : 965 : && !useless_type_conversion_p (otype, TREE_TYPE (_o1[0])))
1559 : : {
1560 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, otype, _o1[0]);
1561 : 6 : tem_op.resimplify (lseq, valueize);
1562 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1563 : 6 : if (!_r1) goto next_after_fail508;
1564 : : }
1565 : : else
1566 : : _r1 = _o1[0];
1567 : 963 : res_op->ops[0] = _r1;
1568 : : }
1569 : 963 : {
1570 : 963 : tree _o1[1], _r1;
1571 : 963 : _o1[0] = captures[2];
1572 : 963 : if (otype != TREE_TYPE (_o1[0])
1573 : 963 : && !useless_type_conversion_p (otype, TREE_TYPE (_o1[0])))
1574 : : {
1575 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, otype, _o1[0]);
1576 : 0 : tem_op.resimplify (lseq, valueize);
1577 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1578 : 0 : if (!_r1) goto next_after_fail508;
1579 : : }
1580 : : else
1581 : : _r1 = _o1[0];
1582 : 963 : res_op->ops[1] = _r1;
1583 : : }
1584 : 963 : res_op->resimplify (lseq, valueize);
1585 : 963 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 330, __FILE__, __LINE__, true);
1586 : 963 : return true;
1587 : : }
1588 : : next_after_fail508:;
1589 : : }
1590 : : }
1591 : : return false;
1592 : : }
1593 : :
1594 : : bool
1595 : 46 : gimple_simplify_256 (gimple_match_op *res_op, gimple_seq *seq,
1596 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1597 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1598 : : const combined_fn ARG_UNUSED (sq),
1599 : : const enum tree_code ARG_UNUSED (cmp))
1600 : : {
1601 : 46 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1602 : 46 : if (flag_unsafe_math_optimizations && ! flag_errno_math
1603 : : )
1604 : : {
1605 : 38 : if (! HONOR_NANS (captures[0])
1606 : : )
1607 : : {
1608 : 38 : gimple_seq *lseq = seq;
1609 : 38 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail547;
1610 : 38 : {
1611 : 38 : res_op->set_op (cmp, type, 2);
1612 : 38 : res_op->ops[0] = captures[0];
1613 : 38 : res_op->ops[1] = captures[1];
1614 : 38 : res_op->resimplify (lseq, valueize);
1615 : 38 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 368, __FILE__, __LINE__, true);
1616 : 38 : return true;
1617 : : }
1618 : 0 : next_after_fail547:;
1619 : : }
1620 : : }
1621 : : return false;
1622 : : }
1623 : :
1624 : : bool
1625 : 9469 : gimple_simplify_261 (gimple_match_op *res_op, gimple_seq *seq,
1626 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1627 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1628 : : const enum tree_code ARG_UNUSED (cmp),
1629 : : const enum tree_code ARG_UNUSED (scmp))
1630 : : {
1631 : 9469 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1632 : 16728 : if (FLOAT_TYPE_P (TREE_TYPE (captures[0]))
1633 : 16728 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1634 : 7259 : && (cmp == EQ_EXPR
1635 : 7259 : || cmp == NE_EXPR
1636 : 5204 : || TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[0]))))
1637 : : )
1638 : : {
1639 : 6818 : {
1640 : 6818 : tree tem = const_unop (NEGATE_EXPR, TREE_TYPE (captures[0]), captures[1]);
1641 : 6818 : if (tem && !TREE_OVERFLOW (tem)
1642 : : )
1643 : : {
1644 : 6818 : gimple_seq *lseq = seq;
1645 : 6818 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail561;
1646 : 6818 : {
1647 : 6818 : res_op->set_op (scmp, type, 2);
1648 : 6818 : res_op->ops[0] = captures[0];
1649 : 6818 : res_op->ops[1] = tem;
1650 : 6818 : res_op->resimplify (lseq, valueize);
1651 : 6818 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 382, __FILE__, __LINE__, true);
1652 : 6818 : return true;
1653 : : }
1654 : 0 : next_after_fail561:;
1655 : : }
1656 : : }
1657 : : }
1658 : : return false;
1659 : : }
1660 : :
1661 : : bool
1662 : 4473 : gimple_simplify_264 (gimple_match_op *res_op, gimple_seq *seq,
1663 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1664 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1665 : : const enum tree_code ARG_UNUSED (cmp))
1666 : : {
1667 : 4473 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1668 : 4473 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
1669 : 8858 : && wi::bit_and_not (wi::to_wide (captures[2]), wi::to_wide (captures[3])) != 0
1670 : : )
1671 : : {
1672 : 0 : gimple_seq *lseq = seq;
1673 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail576;
1674 : 0 : {
1675 : 0 : tree tem;
1676 : 0 : tem = constant_boolean_node (cmp == NE_EXPR, type);
1677 : 0 : res_op->set_value (tem);
1678 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 390, __FILE__, __LINE__, true);
1679 : 0 : return true;
1680 : : }
1681 : 0 : next_after_fail576:;
1682 : : }
1683 : : return false;
1684 : : }
1685 : :
1686 : : bool
1687 : 117 : gimple_simplify_267 (gimple_match_op *res_op, gimple_seq *seq,
1688 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1689 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1690 : : const enum tree_code ARG_UNUSED (cmp))
1691 : : {
1692 : 117 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1693 : 117 : gimple_seq *lseq = seq;
1694 : 117 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail582;
1695 : 117 : {
1696 : 117 : res_op->set_op (cmp, type, 2);
1697 : 117 : res_op->ops[0] = captures[1];
1698 : 117 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
1699 : 117 : res_op->resimplify (lseq, valueize);
1700 : 117 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 396, __FILE__, __LINE__, true);
1701 : : return true;
1702 : : }
1703 : 0 : next_after_fail582:;
1704 : 0 : return false;
1705 : : }
1706 : :
1707 : : bool
1708 : 0 : gimple_simplify_269 (gimple_match_op *res_op, gimple_seq *seq,
1709 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1710 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1711 : : const enum tree_code ARG_UNUSED (cmp))
1712 : : {
1713 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1714 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[2]))
1715 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
1716 : 0 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1717 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[1])) == TYPE_PRECISION (TREE_TYPE (captures[2]))
1718 : 0 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (TREE_TYPE (captures[1]))
1719 : 0 : && !wi::neg_p (wi::to_wide (captures[3]))
1720 : : )
1721 : : {
1722 : 0 : gimple_seq *lseq = seq;
1723 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail584;
1724 : 0 : {
1725 : 0 : res_op->set_op (cmp, type, 2);
1726 : 0 : {
1727 : 0 : tree _o1[2], _r1;
1728 : 0 : _o1[0] = captures[2];
1729 : 0 : {
1730 : 0 : tree _o2[1], _r2;
1731 : 0 : {
1732 : 0 : tree _o3[1], _r3;
1733 : 0 : _o3[0] = captures[3];
1734 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_NOT_EXPR, TREE_TYPE (_o3[0]), _o3[0]);
1735 : 0 : tem_op.resimplify (lseq, valueize);
1736 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
1737 : 0 : if (!_r3) goto next_after_fail584;
1738 : 0 : _o2[0] = _r3;
1739 : : }
1740 : 0 : if (TREE_TYPE (_o1[0]) != TREE_TYPE (_o2[0])
1741 : 0 : && !useless_type_conversion_p (TREE_TYPE (_o1[0]), TREE_TYPE (_o2[0])))
1742 : : {
1743 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, TREE_TYPE (_o1[0]), _o2[0]);
1744 : 0 : tem_op.resimplify (lseq, valueize);
1745 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
1746 : 0 : if (!_r2) goto next_after_fail584;
1747 : : }
1748 : : else
1749 : : _r2 = _o2[0];
1750 : 0 : _o1[1] = _r2;
1751 : : }
1752 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1753 : 0 : tem_op.resimplify (lseq, valueize);
1754 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1755 : 0 : if (!_r1) goto next_after_fail584;
1756 : 0 : res_op->ops[0] = _r1;
1757 : : }
1758 : 0 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[2]));
1759 : 0 : res_op->resimplify (lseq, valueize);
1760 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 398, __FILE__, __LINE__, true);
1761 : 0 : return true;
1762 : : }
1763 : : next_after_fail584:;
1764 : : }
1765 : : return false;
1766 : : }
1767 : :
1768 : : bool
1769 : 58 : gimple_simplify_277 (gimple_match_op *res_op, gimple_seq *seq,
1770 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1771 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1772 : : const enum tree_code ARG_UNUSED (cmp),
1773 : : const enum tree_code ARG_UNUSED (ncmp))
1774 : : {
1775 : 58 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1776 : 116 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
1777 : 58 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
1778 : 116 : && types_match (captures[0], captures[2])
1779 : : )
1780 : : {
1781 : 10 : gimple_seq *lseq = seq;
1782 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail592;
1783 : 10 : {
1784 : 10 : res_op->set_op (ncmp, type, 2);
1785 : 10 : {
1786 : 10 : tree _o1[2], _r1;
1787 : 10 : _o1[0] = captures[0];
1788 : 10 : _o1[1] = captures[2];
1789 : 10 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
1790 : 10 : tem_op.resimplify (lseq, valueize);
1791 : 10 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
1792 : 10 : if (!_r1) goto next_after_fail592;
1793 : 4 : res_op->ops[0] = _r1;
1794 : : }
1795 : 4 : res_op->ops[1] = captures[1];
1796 : 4 : res_op->resimplify (lseq, valueize);
1797 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 405, __FILE__, __LINE__, true);
1798 : 4 : return true;
1799 : : }
1800 : : next_after_fail592:;
1801 : : }
1802 : : return false;
1803 : : }
1804 : :
1805 : : bool
1806 : 98785 : gimple_simplify_282 (gimple_match_op *res_op, gimple_seq *seq,
1807 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1808 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1809 : : const enum tree_code ARG_UNUSED (cmp))
1810 : : {
1811 : 98785 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1812 : 98785 : {
1813 : 98785 : poly_int64 off0, off1;
1814 : 98785 : tree base0, base1;
1815 : 98785 : int equal = address_compare (cmp, TREE_TYPE (captures[0]), captures[1], captures[2], base0, base1,
1816 : : off0, off1,
1817 : :
1818 : : );
1819 : 98785 : if (equal == 1
1820 : : )
1821 : : {
1822 : 62760 : if (cmp == EQ_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
1823 : : )
1824 : : {
1825 : 14233 : gimple_seq *lseq = seq;
1826 : 14233 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail604;
1827 : 14233 : {
1828 : 14233 : tree tem;
1829 : 14233 : tem = constant_boolean_node (known_eq (off0, off1), type);
1830 : 14233 : res_op->set_value (tem);
1831 : 14233 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 408, __FILE__, __LINE__, true);
1832 : 67062 : return true;
1833 : : }
1834 : 0 : next_after_fail604:;
1835 : : }
1836 : : else
1837 : : {
1838 : 30626 : if (cmp == NE_EXPR && (known_eq (off0, off1) || known_ne (off0, off1))
1839 : : )
1840 : : {
1841 : 30626 : gimple_seq *lseq = seq;
1842 : 30626 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail605;
1843 : 30626 : {
1844 : 30626 : tree tem;
1845 : 30626 : tem = constant_boolean_node (known_ne (off0, off1), type);
1846 : 30626 : res_op->set_value (tem);
1847 : 30626 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 409, __FILE__, __LINE__, true);
1848 : 30626 : return true;
1849 : : }
1850 : 0 : next_after_fail605:;
1851 : : }
1852 : : else
1853 : : {
1854 : 7179 : if (cmp == LT_EXPR && (known_lt (off0, off1) || known_ge (off0, off1))
1855 : : )
1856 : : {
1857 : 7179 : gimple_seq *lseq = seq;
1858 : 7179 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail606;
1859 : 7179 : {
1860 : 7179 : tree tem;
1861 : 7179 : tem = constant_boolean_node (known_lt (off0, off1), type);
1862 : 7179 : res_op->set_value (tem);
1863 : 7179 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 410, __FILE__, __LINE__, true);
1864 : 7179 : return true;
1865 : : }
1866 : 0 : next_after_fail606:;
1867 : : }
1868 : : else
1869 : : {
1870 : 3047 : if (cmp == LE_EXPR && (known_le (off0, off1) || known_gt (off0, off1))
1871 : : )
1872 : : {
1873 : 3047 : gimple_seq *lseq = seq;
1874 : 3047 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail607;
1875 : 3047 : {
1876 : 3047 : tree tem;
1877 : 3047 : tem = constant_boolean_node (known_le (off0, off1), type);
1878 : 3047 : res_op->set_value (tem);
1879 : 3047 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 411, __FILE__, __LINE__, true);
1880 : 3047 : return true;
1881 : : }
1882 : 0 : next_after_fail607:;
1883 : : }
1884 : : else
1885 : : {
1886 : 2634 : if (cmp == GE_EXPR && (known_ge (off0, off1) || known_lt (off0, off1))
1887 : : )
1888 : : {
1889 : 2634 : gimple_seq *lseq = seq;
1890 : 2634 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail608;
1891 : 2634 : {
1892 : 2634 : tree tem;
1893 : 2634 : tem = constant_boolean_node (known_ge (off0, off1), type);
1894 : 2634 : res_op->set_value (tem);
1895 : 2634 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 412, __FILE__, __LINE__, true);
1896 : 2634 : return true;
1897 : : }
1898 : 0 : next_after_fail608:;
1899 : : }
1900 : : else
1901 : : {
1902 : 5041 : if (cmp == GT_EXPR && (known_gt (off0, off1) || known_le (off0, off1))
1903 : : )
1904 : : {
1905 : 5041 : gimple_seq *lseq = seq;
1906 : 5041 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail609;
1907 : 5041 : {
1908 : 5041 : tree tem;
1909 : 5041 : tem = constant_boolean_node (known_gt (off0, off1), type);
1910 : 5041 : res_op->set_value (tem);
1911 : 5041 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 413, __FILE__, __LINE__, true);
1912 : 5041 : return true;
1913 : : }
1914 : 0 : next_after_fail609:;
1915 : : }
1916 : : }
1917 : : }
1918 : : }
1919 : : }
1920 : : }
1921 : : }
1922 : : else
1923 : : {
1924 : 36025 : if (equal == 0
1925 : : )
1926 : : {
1927 : 4302 : if (cmp == EQ_EXPR
1928 : : )
1929 : : {
1930 : 1727 : gimple_seq *lseq = seq;
1931 : 1727 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail610;
1932 : 1727 : {
1933 : 1727 : tree tem;
1934 : 1727 : tem = constant_boolean_node (false, type);
1935 : 1727 : res_op->set_value (tem);
1936 : 1727 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 414, __FILE__, __LINE__, true);
1937 : 1727 : return true;
1938 : : }
1939 : 0 : next_after_fail610:;
1940 : : }
1941 : : else
1942 : : {
1943 : 2575 : if (cmp == NE_EXPR
1944 : : )
1945 : : {
1946 : 2575 : gimple_seq *lseq = seq;
1947 : 2575 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail611;
1948 : 2575 : {
1949 : 2575 : tree tem;
1950 : 2575 : tem = constant_boolean_node (true, type);
1951 : 2575 : res_op->set_value (tem);
1952 : 2575 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 415, __FILE__, __LINE__, true);
1953 : 2575 : return true;
1954 : : }
1955 : 0 : next_after_fail611:;
1956 : : }
1957 : : }
1958 : : }
1959 : : }
1960 : : }
1961 : 31723 : return false;
1962 : : }
1963 : :
1964 : : bool
1965 : 1329826 : gimple_simplify_294 (gimple_match_op *res_op, gimple_seq *seq,
1966 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1967 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1968 : : const enum tree_code ARG_UNUSED (cmp),
1969 : : const enum tree_code ARG_UNUSED (icmp),
1970 : : const enum tree_code ARG_UNUSED (ncmp))
1971 : : {
1972 : 1329826 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1973 : 1329826 : if (types_match (type, TREE_TYPE (captures[0]))
1974 : : )
1975 : : {
1976 : 1167596 : gimple_seq *lseq = seq;
1977 : 1167596 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail634;
1978 : 1167596 : {
1979 : 1167596 : res_op->set_op (cmp, type, 2);
1980 : 1167596 : res_op->ops[0] = captures[1];
1981 : 1167596 : res_op->ops[1] = captures[2];
1982 : 1167596 : res_op->resimplify (lseq, valueize);
1983 : 1167596 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 438, __FILE__, __LINE__, true);
1984 : 1167596 : return true;
1985 : : }
1986 : 0 : next_after_fail634:;
1987 : : }
1988 : : return false;
1989 : : }
1990 : :
1991 : : bool
1992 : 3962 : gimple_simplify_298 (gimple_match_op *res_op, gimple_seq *seq,
1993 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
1994 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
1995 : : const combined_fn ARG_UNUSED (copysigns))
1996 : : {
1997 : 3962 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
1998 : 3962 : if (!REAL_VALUE_NEGATIVE (TREE_REAL_CST (captures[1]))
1999 : : )
2000 : : {
2001 : 187 : gimple_seq *lseq = seq;
2002 : 187 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail639;
2003 : 187 : {
2004 : 187 : res_op->set_op (ABS_EXPR, type, 1);
2005 : 187 : res_op->ops[0] = captures[0];
2006 : 187 : res_op->resimplify (lseq, valueize);
2007 : 187 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 443, __FILE__, __LINE__, true);
2008 : 187 : return true;
2009 : : }
2010 : 0 : next_after_fail639:;
2011 : : }
2012 : : else
2013 : : {
2014 : 3775 : if (!direct_internal_fn_supported_p (IFN_COPYSIGN, type,
2015 : : OPTIMIZE_FOR_BOTH)
2016 : : )
2017 : : {
2018 : 7 : gimple_seq *lseq = seq;
2019 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail640;
2020 : 7 : {
2021 : 7 : res_op->set_op (NEGATE_EXPR, type, 1);
2022 : 7 : {
2023 : 7 : tree _o1[1], _r1;
2024 : 7 : _o1[0] = captures[0];
2025 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2026 : 7 : tem_op.resimplify (lseq, valueize);
2027 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2028 : 7 : if (!_r1) goto next_after_fail640;
2029 : 7 : res_op->ops[0] = _r1;
2030 : : }
2031 : 7 : res_op->resimplify (lseq, valueize);
2032 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 444, __FILE__, __LINE__, true);
2033 : 7 : return true;
2034 : : }
2035 : : next_after_fail640:;
2036 : : }
2037 : : }
2038 : : return false;
2039 : : }
2040 : :
2041 : : bool
2042 : 0 : gimple_simplify_310 (gimple_match_op *res_op, gimple_seq *seq,
2043 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2044 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2045 : : const enum tree_code ARG_UNUSED (div))
2046 : : {
2047 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2048 : 0 : if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type))
2049 : 0 : && TYPE_OVERFLOW_UNDEFINED (type)
2050 : 0 : && !integer_zerop (captures[0])
2051 : 0 : && (!flag_non_call_exceptions || tree_expr_nonzero_p (captures[0]))
2052 : : )
2053 : : {
2054 : 0 : gimple_seq *lseq = seq;
2055 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail654;
2056 : 0 : {
2057 : 0 : tree tem;
2058 : 0 : tem = build_minus_one_cst (type);
2059 : 0 : res_op->set_value (tem);
2060 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 456, __FILE__, __LINE__, true);
2061 : 0 : return true;
2062 : : }
2063 : 0 : next_after_fail654:;
2064 : : }
2065 : : return false;
2066 : : }
2067 : :
2068 : : bool
2069 : 617 : gimple_simplify_316 (gimple_match_op *res_op, gimple_seq *seq,
2070 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2071 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2072 : : const enum tree_code ARG_UNUSED (div))
2073 : : {
2074 : 617 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2075 : 617 : {
2076 : 617 : value_range vr0, vr1, vr2, vr3, vr4;
2077 : 617 : if (INTEGRAL_TYPE_P (type)
2078 : 1234 : && get_range_query (cfun)->range_of_expr (vr1, captures[3])
2079 : 1234 : && get_range_query (cfun)->range_of_expr (vr2, captures[4])
2080 : 617 : && range_op_handler (MULT_EXPR).overflow_free_p (vr1, vr2)
2081 : 1024 : && get_range_query (cfun)->range_of_expr (vr0, captures[1])
2082 : 1024 : && get_range_query (cfun)->range_of_expr (vr3, captures[2])
2083 : 1114 : && range_op_handler (PLUS_EXPR).overflow_free_p (vr0, vr3)
2084 : 1004 : && get_range_query (cfun)->range_of_expr (vr4, captures[0])
2085 : 502 : && !vr4.undefined_p ()
2086 : 1119 : && (TYPE_UNSIGNED (type)
2087 : 501 : || (vr0.nonnegative_p () && vr4.nonnegative_p ())
2088 : 498 : || (vr0.nonpositive_p () && vr4.nonpositive_p ()))
2089 : : )
2090 : : {
2091 : 5 : gimple_seq *lseq = seq;
2092 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail664;
2093 : 5 : {
2094 : 5 : res_op->set_op (PLUS_EXPR, type, 2);
2095 : 5 : {
2096 : 5 : tree _o1[2], _r1;
2097 : 5 : _o1[0] = captures[1];
2098 : 5 : _o1[1] = captures[4];
2099 : 5 : gimple_match_op tem_op (res_op->cond.any_else (), div, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2100 : 5 : tem_op.resimplify (lseq, valueize);
2101 : 5 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2102 : 5 : if (!_r1) goto next_after_fail664;
2103 : 5 : res_op->ops[0] = _r1;
2104 : : }
2105 : 5 : res_op->ops[1] = captures[3];
2106 : 5 : res_op->resimplify (lseq, valueize);
2107 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 466, __FILE__, __LINE__, true);
2108 : 5 : return true;
2109 : : }
2110 : 612 : next_after_fail664:;
2111 : : }
2112 : 617 : }
2113 : 612 : return false;
2114 : : }
2115 : :
2116 : : bool
2117 : 0 : gimple_simplify_330 (gimple_match_op *res_op, gimple_seq *seq,
2118 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2119 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2120 : : const combined_fn ARG_UNUSED (SINH),
2121 : : const combined_fn ARG_UNUSED (COSH),
2122 : : const combined_fn ARG_UNUSED (TANH))
2123 : : {
2124 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2125 : 0 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
2126 : : )
2127 : : {
2128 : 0 : gimple_seq *lseq = seq;
2129 : 0 : if (lseq
2130 : 0 : && (!single_use (captures[0])
2131 : 0 : || !single_use (captures[2])))
2132 : 0 : lseq = NULL;
2133 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail680;
2134 : 0 : {
2135 : 0 : res_op->set_op (TANH, type, 1);
2136 : 0 : res_op->ops[0] = captures[1];
2137 : 0 : res_op->resimplify (lseq, valueize);
2138 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 482, __FILE__, __LINE__, true);
2139 : 0 : return true;
2140 : : }
2141 : 0 : next_after_fail680:;
2142 : : }
2143 : : return false;
2144 : : }
2145 : :
2146 : : bool
2147 : 399 : gimple_simplify_337 (gimple_match_op *res_op, gimple_seq *seq,
2148 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2149 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2150 : : const enum tree_code ARG_UNUSED (cmp))
2151 : : {
2152 : 399 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2153 : 399 : if (TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2154 : : )
2155 : : {
2156 : 113 : gimple_seq *lseq = seq;
2157 : 113 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail688;
2158 : 113 : {
2159 : 113 : tree tem;
2160 : 113 : tem = constant_boolean_node (cmp == LT_EXPR, type);
2161 : 113 : res_op->set_value (tem);
2162 : 113 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 490, __FILE__, __LINE__, true);
2163 : 113 : return true;
2164 : : }
2165 : 0 : next_after_fail688:;
2166 : : }
2167 : : return false;
2168 : : }
2169 : :
2170 : : bool
2171 : 405512 : gimple_simplify_341 (gimple_match_op *res_op, gimple_seq *seq,
2172 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2173 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2174 : : const enum tree_code ARG_UNUSED (op))
2175 : : {
2176 : 405512 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2177 : 811020 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
2178 : 810596 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1]))
2179 : 120381 : && !TYPE_OVERFLOW_SANITIZED (TREE_TYPE (captures[1]))
2180 : 931191 : && (CONSTANT_CLASS_P (captures[1]) || single_use (captures[0]))
2181 : : )
2182 : : {
2183 : 8089 : gimple_seq *lseq = seq;
2184 : 8089 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail693;
2185 : 8089 : {
2186 : 8089 : res_op->set_op (op, type, 2);
2187 : 8089 : res_op->ops[0] = captures[1];
2188 : 8089 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
2189 : 8089 : res_op->resimplify (lseq, valueize);
2190 : 8089 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 495, __FILE__, __LINE__, true);
2191 : 8089 : return true;
2192 : : }
2193 : 0 : next_after_fail693:;
2194 : : }
2195 : : return false;
2196 : : }
2197 : :
2198 : : bool
2199 : 40803 : gimple_simplify_348 (gimple_match_op *res_op, gimple_seq *seq,
2200 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2201 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2202 : : const enum tree_code ARG_UNUSED (cmp),
2203 : : const enum tree_code ARG_UNUSED (out))
2204 : : {
2205 : 40803 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2206 : 40803 : if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (captures[1]))
2207 : 40803 : && types_match (TREE_TYPE (captures[3]), TREE_TYPE (captures[0]))
2208 : 40803 : && tree_nop_conversion_p (TREE_TYPE (captures[2]), TREE_TYPE (captures[3]))
2209 : 75171 : && wi::to_wide (captures[4]) != 0
2210 : 40803 : && single_use (captures[1])
2211 : : )
2212 : : {
2213 : 6435 : {
2214 : 6435 : unsigned int prec = TYPE_PRECISION (TREE_TYPE (captures[3]));
2215 : 6435 : signop sign = TYPE_SIGN (TREE_TYPE (captures[3]));
2216 : 6435 : gimple_seq *lseq = seq;
2217 : 6435 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail701;
2218 : 6435 : {
2219 : 6435 : res_op->set_op (out, type, 2);
2220 : 6435 : res_op->ops[0] = captures[3];
2221 : 6435 : res_op->ops[1] = wide_int_to_tree (TREE_TYPE (captures[3]),
2222 : 6435 : wi::max_value (prec, sign)
2223 : 19305 : - wi::to_wide (captures[4]));
2224 : 6435 : res_op->resimplify (lseq, valueize);
2225 : 6435 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 503, __FILE__, __LINE__, true);
2226 : 6435 : return true;
2227 : : }
2228 : 0 : next_after_fail701:;
2229 : : }
2230 : : }
2231 : : return false;
2232 : : }
2233 : :
2234 : : bool
2235 : 23 : gimple_simplify_357 (gimple_match_op *res_op, gimple_seq *seq,
2236 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2237 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2238 : : const enum tree_code ARG_UNUSED (cmp),
2239 : : const enum tree_code ARG_UNUSED (out))
2240 : : {
2241 : 23 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2242 : 23 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2243 : 23 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2244 : : )
2245 : : {
2246 : 23 : gimple_seq *lseq = seq;
2247 : 23 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail742;
2248 : 23 : {
2249 : 23 : res_op->set_op (out, type, 2);
2250 : 23 : {
2251 : 23 : tree _o1[1], _r1;
2252 : 23 : _o1[0] = captures[0];
2253 : 23 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
2254 : 23 : tem_op.resimplify (lseq, valueize);
2255 : 23 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2256 : 23 : if (!_r1) goto next_after_fail742;
2257 : 12 : res_op->ops[0] = _r1;
2258 : : }
2259 : 12 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
2260 : 12 : res_op->resimplify (lseq, valueize);
2261 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 527, __FILE__, __LINE__, true);
2262 : 12 : return true;
2263 : : }
2264 : : next_after_fail742:;
2265 : : }
2266 : : return false;
2267 : : }
2268 : :
2269 : : bool
2270 : 274966 : gimple_simplify_363 (gimple_match_op *res_op, gimple_seq *seq,
2271 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2272 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2273 : : const enum tree_code ARG_UNUSED (cmp),
2274 : : const enum tree_code ARG_UNUSED (icmp))
2275 : : {
2276 : 274966 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2277 : 541634 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
2278 : 274966 : && TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2279 : 154229 : && TYPE_PRECISION (TREE_TYPE (captures[0])) > 1
2280 : 429195 : && (wi::to_wide (captures[2])
2281 : 583424 : == wi::max_value (TYPE_PRECISION (TREE_TYPE (captures[0])), SIGNED) - 1)
2282 : : )
2283 : : {
2284 : 21 : {
2285 : 21 : tree stype = signed_type_for (TREE_TYPE (captures[0]));
2286 : 21 : gimple_seq *lseq = seq;
2287 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail754;
2288 : 21 : {
2289 : 21 : res_op->set_op (icmp, type, 2);
2290 : 21 : {
2291 : 21 : tree _o1[1], _r1;
2292 : 21 : _o1[0] = captures[0];
2293 : 21 : if (stype != TREE_TYPE (_o1[0])
2294 : 21 : && !useless_type_conversion_p (stype, TREE_TYPE (_o1[0])))
2295 : : {
2296 : 21 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, stype, _o1[0]);
2297 : 21 : tem_op.resimplify (lseq, valueize);
2298 : 21 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2299 : 21 : if (!_r1) goto next_after_fail754;
2300 : : }
2301 : : else
2302 : : _r1 = _o1[0];
2303 : 21 : res_op->ops[0] = _r1;
2304 : : }
2305 : 21 : res_op->ops[1] = build_int_cst (stype, 0);
2306 : 21 : res_op->resimplify (lseq, valueize);
2307 : 21 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 539, __FILE__, __LINE__, true);
2308 : 21 : return true;
2309 : : }
2310 : : next_after_fail754:;
2311 : : }
2312 : : }
2313 : : return false;
2314 : : }
2315 : :
2316 : : bool
2317 : 13 : gimple_simplify_368 (gimple_match_op *res_op, gimple_seq *seq,
2318 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2319 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2320 : : const enum tree_code ARG_UNUSED (cmp),
2321 : : const enum tree_code ARG_UNUSED (out))
2322 : : {
2323 : 13 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2324 : 13 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
2325 : 13 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (captures[2]))
2326 : : )
2327 : : {
2328 : 7 : gimple_seq *lseq = seq;
2329 : 7 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail759;
2330 : 7 : {
2331 : 7 : res_op->set_op (out, type, 2);
2332 : 7 : {
2333 : 7 : tree _o1[1], _r1;
2334 : 7 : _o1[0] = captures[0];
2335 : 7 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
2336 : 7 : tem_op.resimplify (lseq, valueize);
2337 : 7 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2338 : 7 : if (!_r1) goto next_after_fail759;
2339 : 2 : res_op->ops[0] = _r1;
2340 : : }
2341 : 2 : res_op->ops[1] = build_zero_cst (TREE_TYPE (captures[1]));
2342 : 2 : res_op->resimplify (lseq, valueize);
2343 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 527, __FILE__, __LINE__, true);
2344 : 2 : return true;
2345 : : }
2346 : : next_after_fail759:;
2347 : : }
2348 : : return false;
2349 : : }
2350 : :
2351 : : bool
2352 : 22217 : gimple_simplify_375 (gimple_match_op *res_op, gimple_seq *seq,
2353 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2354 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2355 : : const enum tree_code ARG_UNUSED (shiftrotate))
2356 : : {
2357 : 22217 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2358 : 22217 : gimple_seq *lseq = seq;
2359 : 22217 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail770;
2360 : 22217 : {
2361 : 22217 : tree tem;
2362 : 22217 : tem = captures[0];
2363 : 22217 : res_op->set_value (tem);
2364 : 22217 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 551, __FILE__, __LINE__, true);
2365 : : return true;
2366 : : }
2367 : 0 : next_after_fail770:;
2368 : 0 : return false;
2369 : : }
2370 : :
2371 : : bool
2372 : 159 : gimple_simplify_378 (gimple_match_op *res_op, gimple_seq *seq,
2373 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2374 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2375 : : const enum tree_code ARG_UNUSED (shiftrotate))
2376 : : {
2377 : 159 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2378 : 159 : {
2379 : 159 : tree tem = uniform_vector_p (captures[1]);
2380 : 159 : if (tem
2381 : : )
2382 : : {
2383 : 0 : gimple_seq *lseq = seq;
2384 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail773;
2385 : 0 : {
2386 : 0 : res_op->set_op (shiftrotate, type, 2);
2387 : 0 : res_op->ops[0] = captures[0];
2388 : 0 : res_op->ops[1] = tem;
2389 : 0 : res_op->resimplify (lseq, valueize);
2390 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 553, __FILE__, __LINE__, true);
2391 : 0 : return true;
2392 : : }
2393 : 0 : next_after_fail773:;
2394 : : }
2395 : : }
2396 : : return false;
2397 : : }
2398 : :
2399 : : bool
2400 : 104 : gimple_simplify_384 (gimple_match_op *res_op, gimple_seq *seq,
2401 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2402 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2403 : : const combined_fn ARG_UNUSED (bswap))
2404 : : {
2405 : 104 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2406 : 104 : if (BITS_PER_UNIT == 8
2407 : : && CHAR_TYPE_SIZE == 8
2408 : 104 : && tree_fits_uhwi_p (captures[2])
2409 : : )
2410 : : {
2411 : 104 : {
2412 : 104 : unsigned HOST_WIDE_INT prec = TYPE_PRECISION (TREE_TYPE (captures[0]));
2413 : 104 : unsigned HOST_WIDE_INT bits = tree_to_uhwi (captures[2]);
2414 : 104 : tree st = TYPE_PRECISION (type) > prec ? TREE_TYPE (captures[0]) : type;
2415 : 104 : if (TYPE_PRECISION (type) > prec
2416 : 2 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
2417 : 0 : && TYPE_UNSIGNED (type)
2418 : 104 : && bits < prec && bits + 8 >= prec
2419 : : )
2420 : : {
2421 : 0 : {
2422 : 0 : tree nst = build_int_cst (integer_type_node, prec - 8);
2423 : 0 : gimple_seq *lseq = seq;
2424 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail783;
2425 : 0 : {
2426 : 0 : res_op->set_op (RSHIFT_EXPR, type, 2);
2427 : 0 : {
2428 : 0 : tree _o1[1], _r1;
2429 : 0 : {
2430 : 0 : tree _o2[2], _r2;
2431 : 0 : {
2432 : 0 : tree _o3[1], _r3;
2433 : 0 : _o3[0] = captures[1];
2434 : 0 : if (st != TREE_TYPE (_o3[0])
2435 : 0 : && !useless_type_conversion_p (st, TREE_TYPE (_o3[0])))
2436 : : {
2437 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, st, _o3[0]);
2438 : 0 : tem_op.resimplify (lseq, valueize);
2439 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2440 : 0 : if (!_r3) goto next_after_fail783;
2441 : : }
2442 : : else
2443 : : _r3 = _o3[0];
2444 : 0 : _o2[0] = _r3;
2445 : : }
2446 : 0 : _o2[1] = nst;
2447 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LSHIFT_EXPR, st, _o2[0], _o2[1]);
2448 : 0 : tem_op.resimplify (lseq, valueize);
2449 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2450 : 0 : if (!_r2) goto next_after_fail783;
2451 : 0 : _o1[0] = _r2;
2452 : : }
2453 : 0 : if (type != TREE_TYPE (_o1[0])
2454 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2455 : : {
2456 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2457 : 0 : tem_op.resimplify (lseq, valueize);
2458 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2459 : 0 : if (!_r1) goto next_after_fail783;
2460 : : }
2461 : : else
2462 : : _r1 = _o1[0];
2463 : 0 : res_op->ops[0] = _r1;
2464 : : }
2465 : 0 : res_op->ops[1] = captures[2];
2466 : 0 : res_op->resimplify (lseq, valueize);
2467 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 562, __FILE__, __LINE__, true);
2468 : 0 : return true;
2469 : : }
2470 : : next_after_fail783:;
2471 : : }
2472 : : }
2473 : : else
2474 : : {
2475 : 104 : if (bits + 8 == prec
2476 : : )
2477 : : {
2478 : 0 : if (TYPE_UNSIGNED (st)
2479 : : )
2480 : : {
2481 : 0 : gimple_seq *lseq = seq;
2482 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail784;
2483 : 0 : {
2484 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2485 : 0 : {
2486 : 0 : tree _o1[1], _r1;
2487 : 0 : _o1[0] = captures[1];
2488 : 0 : if (unsigned_char_type_node != TREE_TYPE (_o1[0])
2489 : 0 : && !useless_type_conversion_p (unsigned_char_type_node, TREE_TYPE (_o1[0])))
2490 : : {
2491 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, unsigned_char_type_node, _o1[0]);
2492 : 0 : tem_op.resimplify (lseq, valueize);
2493 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2494 : 0 : if (!_r1) goto next_after_fail784;
2495 : : }
2496 : : else
2497 : : _r1 = _o1[0];
2498 : 0 : res_op->ops[0] = _r1;
2499 : : }
2500 : 0 : res_op->resimplify (lseq, valueize);
2501 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 563, __FILE__, __LINE__, true);
2502 : 0 : return true;
2503 : : }
2504 : : next_after_fail784:;
2505 : : }
2506 : : else
2507 : : {
2508 : 0 : gimple_seq *lseq = seq;
2509 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail785;
2510 : 0 : {
2511 : 0 : res_op->set_op (NOP_EXPR, type, 1);
2512 : 0 : {
2513 : 0 : tree _o1[1], _r1;
2514 : 0 : _o1[0] = captures[1];
2515 : 0 : if (signed_char_type_node != TREE_TYPE (_o1[0])
2516 : 0 : && !useless_type_conversion_p (signed_char_type_node, TREE_TYPE (_o1[0])))
2517 : : {
2518 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, signed_char_type_node, _o1[0]);
2519 : 0 : tem_op.resimplify (lseq, valueize);
2520 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2521 : 0 : if (!_r1) goto next_after_fail785;
2522 : : }
2523 : : else
2524 : : _r1 = _o1[0];
2525 : 0 : res_op->ops[0] = _r1;
2526 : : }
2527 : 0 : res_op->resimplify (lseq, valueize);
2528 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 564, __FILE__, __LINE__, true);
2529 : 0 : return true;
2530 : : }
2531 : : next_after_fail785:;
2532 : : }
2533 : : }
2534 : : else
2535 : : {
2536 : 104 : if (bits < prec && bits + 8 > prec
2537 : : )
2538 : : {
2539 : 2 : {
2540 : 2 : tree nst = build_int_cst (integer_type_node, bits & 7);
2541 : 2 : tree bt = TYPE_UNSIGNED (st) ? unsigned_char_type_node
2542 : 2 : : signed_char_type_node;
2543 : 2 : gimple_seq *lseq = seq;
2544 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail786;
2545 : 2 : {
2546 : 2 : res_op->set_op (NOP_EXPR, type, 1);
2547 : 2 : {
2548 : 2 : tree _o1[2], _r1;
2549 : 2 : {
2550 : 2 : tree _o2[1], _r2;
2551 : 2 : _o2[0] = captures[1];
2552 : 2 : if (bt != TREE_TYPE (_o2[0])
2553 : 2 : && !useless_type_conversion_p (bt, TREE_TYPE (_o2[0])))
2554 : : {
2555 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, bt, _o2[0]);
2556 : 2 : tem_op.resimplify (lseq, valueize);
2557 : 2 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2558 : 2 : if (!_r2) goto next_after_fail786;
2559 : : }
2560 : : else
2561 : : _r2 = _o2[0];
2562 : 1 : _o1[0] = _r2;
2563 : : }
2564 : 1 : _o1[1] = nst;
2565 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, bt, _o1[0], _o1[1]);
2566 : 1 : tem_op.resimplify (lseq, valueize);
2567 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2568 : 1 : if (!_r1) goto next_after_fail786;
2569 : 1 : res_op->ops[0] = _r1;
2570 : : }
2571 : 1 : res_op->resimplify (lseq, valueize);
2572 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 565, __FILE__, __LINE__, true);
2573 : 1 : return true;
2574 : : }
2575 : : next_after_fail786:;
2576 : : }
2577 : : }
2578 : : }
2579 : : }
2580 : : }
2581 : : }
2582 : : return false;
2583 : : }
2584 : :
2585 : : bool
2586 : 441 : gimple_simplify_403 (gimple_match_op *res_op, gimple_seq *seq,
2587 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2588 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2589 : : const combined_fn ARG_UNUSED (POW))
2590 : : {
2591 : 441 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2592 : 441 : gimple_seq *lseq = seq;
2593 : 441 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail820;
2594 : 441 : {
2595 : 441 : tree tem;
2596 : 441 : tem = captures[0];
2597 : 441 : res_op->set_value (tem);
2598 : 441 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 587, __FILE__, __LINE__, true);
2599 : : return true;
2600 : : }
2601 : 0 : next_after_fail820:;
2602 : 0 : return false;
2603 : : }
2604 : :
2605 : : bool
2606 : 14 : gimple_simplify_405 (gimple_match_op *res_op, gimple_seq *seq,
2607 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2608 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2609 : : const combined_fn ARG_UNUSED (copysigns),
2610 : : const combined_fn ARG_UNUSED (hypots))
2611 : : {
2612 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2613 : 14 : gimple_seq *lseq = seq;
2614 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail822;
2615 : 14 : {
2616 : 14 : res_op->set_op (hypots, type, 2);
2617 : 14 : res_op->ops[0] = captures[0];
2618 : 14 : res_op->ops[1] = captures[2];
2619 : 14 : res_op->resimplify (lseq, valueize);
2620 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 589, __FILE__, __LINE__, true);
2621 : : return true;
2622 : : }
2623 : 0 : next_after_fail822:;
2624 : 0 : return false;
2625 : : }
2626 : :
2627 : : bool
2628 : 9 : gimple_simplify_407 (gimple_match_op *res_op, gimple_seq *seq,
2629 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2630 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2631 : : const combined_fn ARG_UNUSED (HYPOT))
2632 : : {
2633 : 9 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2634 : 9 : gimple_seq *lseq = seq;
2635 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail824;
2636 : 9 : {
2637 : 9 : res_op->set_op (ABS_EXPR, type, 1);
2638 : 9 : res_op->ops[0] = captures[0];
2639 : 9 : res_op->resimplify (lseq, valueize);
2640 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 591, __FILE__, __LINE__, true);
2641 : : return true;
2642 : : }
2643 : 0 : next_after_fail824:;
2644 : 0 : return false;
2645 : : }
2646 : :
2647 : : bool
2648 : 105632 : gimple_simplify_410 (gimple_match_op *res_op, gimple_seq *seq,
2649 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2650 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2651 : : {
2652 : 105632 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2653 : 105632 : if (! TYPE_UNSIGNED (type)
2654 : 18747 : && ! HONOR_SIGN_DEPENDENT_ROUNDING (type)
2655 : 124379 : && single_use (captures[0])
2656 : : )
2657 : : {
2658 : 10969 : gimple_seq *lseq = seq;
2659 : 10969 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail827;
2660 : 10969 : {
2661 : 10969 : res_op->set_op (MULT_EXPR, type, 2);
2662 : 10969 : res_op->ops[0] = captures[1];
2663 : 10969 : {
2664 : 10969 : tree _o1[1], _r1;
2665 : 10969 : _o1[0] = captures[2];
2666 : 10969 : gimple_match_op tem_op (res_op->cond.any_else (), NEGATE_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
2667 : 10969 : tem_op.resimplify (lseq, valueize);
2668 : 10969 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2669 : 10969 : if (!_r1) goto next_after_fail827;
2670 : 10726 : res_op->ops[1] = _r1;
2671 : : }
2672 : 10726 : res_op->resimplify (lseq, valueize);
2673 : 10726 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 594, __FILE__, __LINE__, true);
2674 : 10726 : return true;
2675 : : }
2676 : : next_after_fail827:;
2677 : : }
2678 : : return false;
2679 : : }
2680 : :
2681 : : bool
2682 : 8203797 : gimple_simplify_415 (gimple_match_op *res_op, gimple_seq *seq,
2683 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2684 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2685 : : {
2686 : 8203797 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2687 : 8203797 : {
2688 : 8203797 : bool wascmp;
2689 : 8203797 : if (types_match (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2690 : 8203797 : && bitwise_inverted_equal_p (captures[0], captures[1], wascmp)
2691 : : )
2692 : : {
2693 : 1694 : gimple_seq *lseq = seq;
2694 : 1694 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail833;
2695 : 1694 : {
2696 : 1694 : tree tem;
2697 : 1694 : tem = wascmp ? constant_boolean_node (false, type) : build_zero_cst (type);
2698 : 1694 : res_op->set_value (tem);
2699 : 1694 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 600, __FILE__, __LINE__, true);
2700 : 1694 : return true;
2701 : : }
2702 : 0 : next_after_fail833:;
2703 : : }
2704 : : }
2705 : 8202103 : return false;
2706 : : }
2707 : :
2708 : : bool
2709 : 1 : gimple_simplify_419 (gimple_match_op *res_op, gimple_seq *seq,
2710 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2711 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2712 : : {
2713 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2714 : 1 : gimple_seq *lseq = seq;
2715 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail837;
2716 : 1 : {
2717 : 1 : res_op->set_op (BIT_AND_EXPR, type, 2);
2718 : 1 : res_op->ops[0] = captures[0];
2719 : 1 : res_op->ops[1] = captures[1];
2720 : 1 : res_op->resimplify (lseq, valueize);
2721 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 604, __FILE__, __LINE__, true);
2722 : : return true;
2723 : : }
2724 : 0 : next_after_fail837:;
2725 : 0 : return false;
2726 : : }
2727 : :
2728 : : bool
2729 : 12706 : gimple_simplify_423 (gimple_match_op *res_op, gimple_seq *seq,
2730 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2731 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2732 : : const enum tree_code ARG_UNUSED (bitop),
2733 : : const enum tree_code ARG_UNUSED (op))
2734 : : {
2735 : 12706 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2736 : 12706 : {
2737 : 12706 : tree pmop[2];
2738 : 12706 : tree utype = fold_bit_and_mask (TREE_TYPE (captures[1]), captures[5], op, captures[1], bitop,
2739 : : captures[2], captures[3], captures[4], ERROR_MARK, NULL_TREE,
2740 : : NULL_TREE, pmop);
2741 : 12706 : if (utype
2742 : : )
2743 : : {
2744 : 9240 : gimple_seq *lseq = seq;
2745 : 9240 : if (lseq
2746 : 3291 : && (!single_use (captures[0])
2747 : 2744 : || !single_use (captures[1])))
2748 : 9217 : lseq = NULL;
2749 : 9240 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail841;
2750 : 9240 : {
2751 : 9240 : res_op->set_op (NOP_EXPR, type, 1);
2752 : 9240 : {
2753 : 9240 : tree _o1[2], _r1;
2754 : 9240 : {
2755 : 9240 : tree _o2[2], _r2;
2756 : 9240 : {
2757 : 9240 : tree _o3[1], _r3;
2758 : 9240 : _o3[0] = pmop[0];
2759 : 9240 : if (utype != TREE_TYPE (_o3[0])
2760 : 9240 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
2761 : : {
2762 : 230 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
2763 : 230 : tem_op.resimplify (lseq, valueize);
2764 : 230 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2765 : 230 : if (!_r3) goto next_after_fail841;
2766 : : }
2767 : : else
2768 : : _r3 = _o3[0];
2769 : 9019 : _o2[0] = _r3;
2770 : : }
2771 : 9019 : {
2772 : 9019 : tree _o3[1], _r3;
2773 : 9019 : _o3[0] = pmop[1];
2774 : 9019 : if (utype != TREE_TYPE (_o3[0])
2775 : 9019 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
2776 : : {
2777 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
2778 : 9 : tem_op.resimplify (lseq, valueize);
2779 : 9 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2780 : 9 : if (!_r3) goto next_after_fail841;
2781 : : }
2782 : : else
2783 : : _r3 = _o3[0];
2784 : 9019 : _o2[1] = _r3;
2785 : : }
2786 : 9019 : gimple_match_op tem_op (res_op->cond.any_else (), op, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
2787 : 9019 : tem_op.resimplify (lseq, valueize);
2788 : 9019 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2789 : 9019 : if (!_r2) goto next_after_fail841;
2790 : 953 : _o1[0] = _r2;
2791 : : }
2792 : 953 : {
2793 : 953 : tree _o2[1], _r2;
2794 : 953 : _o2[0] = captures[5];
2795 : 953 : if (utype != TREE_TYPE (_o2[0])
2796 : 953 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
2797 : : {
2798 : 9 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
2799 : 9 : tem_op.resimplify (lseq, valueize);
2800 : 9 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2801 : 9 : if (!_r2) goto next_after_fail841;
2802 : : }
2803 : : else
2804 : : _r2 = _o2[0];
2805 : 953 : _o1[1] = _r2;
2806 : : }
2807 : 953 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
2808 : 953 : tem_op.resimplify (lseq, valueize);
2809 : 953 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2810 : 953 : if (!_r1) goto next_after_fail841;
2811 : 23 : res_op->ops[0] = _r1;
2812 : : }
2813 : 23 : res_op->resimplify (lseq, valueize);
2814 : 23 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 607, __FILE__, __LINE__, true);
2815 : 23 : return true;
2816 : : }
2817 : 12683 : next_after_fail841:;
2818 : : }
2819 : : }
2820 : 12683 : return false;
2821 : : }
2822 : :
2823 : : bool
2824 : 20 : gimple_simplify_439 (gimple_match_op *res_op, gimple_seq *seq,
2825 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2826 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2827 : : const combined_fn ARG_UNUSED (bswap))
2828 : : {
2829 : 20 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2830 : 20 : if (BITS_PER_UNIT == 8
2831 : 20 : && tree_fits_uhwi_p (captures[3])
2832 : 20 : && tree_fits_uhwi_p (captures[4])
2833 : : )
2834 : : {
2835 : 20 : {
2836 : 20 : unsigned HOST_WIDE_INT prec = TYPE_PRECISION (TREE_TYPE (captures[1]));
2837 : 20 : unsigned HOST_WIDE_INT bits = tree_to_uhwi (captures[3]);
2838 : 20 : unsigned HOST_WIDE_INT mask = tree_to_uhwi (captures[4]);
2839 : 20 : unsigned HOST_WIDE_INT lo = bits & 7;
2840 : 20 : unsigned HOST_WIDE_INT hi = bits - lo;
2841 : 20 : if (bits < prec
2842 : 20 : && mask < (256u>>lo)
2843 : 25 : && bits < TYPE_PRECISION (TREE_TYPE(captures[0]))
2844 : : )
2845 : : {
2846 : 5 : {
2847 : 5 : unsigned HOST_WIDE_INT ns = (prec - (hi + 8)) + lo;
2848 : 5 : if (ns == 0
2849 : : )
2850 : : {
2851 : 0 : gimple_seq *lseq = seq;
2852 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail861;
2853 : 0 : {
2854 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
2855 : 0 : {
2856 : 0 : tree _o1[1], _r1;
2857 : 0 : _o1[0] = captures[2];
2858 : 0 : if (type != TREE_TYPE (_o1[0])
2859 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2860 : : {
2861 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2862 : 0 : tem_op.resimplify (lseq, valueize);
2863 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2864 : 0 : if (!_r1) goto next_after_fail861;
2865 : : }
2866 : : else
2867 : : _r1 = _o1[0];
2868 : 0 : res_op->ops[0] = _r1;
2869 : : }
2870 : 0 : res_op->ops[1] = captures[4];
2871 : 0 : res_op->resimplify (lseq, valueize);
2872 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 623, __FILE__, __LINE__, true);
2873 : 0 : return true;
2874 : : }
2875 : : next_after_fail861:;
2876 : : }
2877 : : else
2878 : : {
2879 : 5 : {
2880 : 5 : tree utype = unsigned_type_for (TREE_TYPE (captures[2]));
2881 : 5 : tree nst = build_int_cst (integer_type_node, ns);
2882 : 5 : gimple_seq *lseq = seq;
2883 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail862;
2884 : 5 : {
2885 : 5 : res_op->set_op (BIT_AND_EXPR, type, 2);
2886 : 5 : {
2887 : 5 : tree _o1[1], _r1;
2888 : 5 : {
2889 : 5 : tree _o2[2], _r2;
2890 : 5 : {
2891 : 5 : tree _o3[1], _r3;
2892 : 5 : _o3[0] = captures[2];
2893 : 5 : if (utype != TREE_TYPE (_o3[0])
2894 : 5 : && !useless_type_conversion_p (utype, TREE_TYPE (_o3[0])))
2895 : : {
2896 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o3[0]);
2897 : 0 : tem_op.resimplify (lseq, valueize);
2898 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
2899 : 0 : if (!_r3) goto next_after_fail862;
2900 : : }
2901 : : else
2902 : : _r3 = _o3[0];
2903 : 5 : _o2[0] = _r3;
2904 : : }
2905 : 5 : _o2[1] = nst;
2906 : 5 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, utype, _o2[0], _o2[1]);
2907 : 5 : tem_op.resimplify (lseq, valueize);
2908 : 5 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
2909 : 5 : if (!_r2) goto next_after_fail862;
2910 : 1 : _o1[0] = _r2;
2911 : : }
2912 : 1 : if (type != TREE_TYPE (_o1[0])
2913 : 1 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
2914 : : {
2915 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
2916 : 0 : tem_op.resimplify (lseq, valueize);
2917 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
2918 : 0 : if (!_r1) goto next_after_fail862;
2919 : : }
2920 : : else
2921 : : _r1 = _o1[0];
2922 : 1 : res_op->ops[0] = _r1;
2923 : : }
2924 : 1 : res_op->ops[1] = captures[4];
2925 : 1 : res_op->resimplify (lseq, valueize);
2926 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 624, __FILE__, __LINE__, true);
2927 : 1 : return true;
2928 : : }
2929 : : next_after_fail862:;
2930 : : }
2931 : : }
2932 : : }
2933 : : }
2934 : : }
2935 : : }
2936 : : return false;
2937 : : }
2938 : :
2939 : : bool
2940 : 17 : gimple_simplify_453 (gimple_match_op *res_op, gimple_seq *seq,
2941 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2942 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2943 : : {
2944 : 17 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2945 : 17 : gimple_seq *lseq = seq;
2946 : 17 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail910;
2947 : 17 : {
2948 : 17 : tree tem;
2949 : 17 : tem = captures[2];
2950 : 17 : res_op->set_value (tem);
2951 : 17 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 644, __FILE__, __LINE__, true);
2952 : : return true;
2953 : : }
2954 : 0 : next_after_fail910:;
2955 : 0 : return false;
2956 : : }
2957 : :
2958 : : bool
2959 : 14 : gimple_simplify_454 (gimple_match_op *res_op, gimple_seq *seq,
2960 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2961 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
2962 : : {
2963 : 14 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2964 : 14 : gimple_seq *lseq = seq;
2965 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail911;
2966 : 14 : {
2967 : 14 : tree tem;
2968 : 14 : tem = captures[2];
2969 : 14 : res_op->set_value (tem);
2970 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 645, __FILE__, __LINE__, true);
2971 : : return true;
2972 : : }
2973 : 0 : next_after_fail911:;
2974 : 0 : return false;
2975 : : }
2976 : :
2977 : : bool
2978 : 24831 : gimple_simplify_457 (gimple_match_op *res_op, gimple_seq *seq,
2979 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
2980 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
2981 : : const enum tree_code ARG_UNUSED (shift))
2982 : : {
2983 : 24831 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
2984 : 24831 : if (tree_nop_conversion_p (TREE_TYPE (captures[0]), TREE_TYPE (captures[1]))
2985 : 24831 : && TYPE_PRECISION (type) <= HOST_BITS_PER_WIDE_INT
2986 : 24831 : && tree_fits_uhwi_p (captures[4])
2987 : 24831 : && tree_to_uhwi (captures[4]) > 0
2988 : 49661 : && tree_to_uhwi (captures[4]) < TYPE_PRECISION (type)
2989 : : )
2990 : : {
2991 : 24830 : {
2992 : 24830 : unsigned int shiftc = tree_to_uhwi (captures[4]);
2993 : 24830 : unsigned HOST_WIDE_INT mask = TREE_INT_CST_LOW (captures[5]);
2994 : 24830 : unsigned HOST_WIDE_INT newmask, zerobits = 0;
2995 : 24830 : tree shift_type = TREE_TYPE (captures[2]);
2996 : 24830 : unsigned int prec;
2997 : 24830 : if (shift == LSHIFT_EXPR)
2998 : 8765 : zerobits = ((HOST_WIDE_INT_1U << shiftc) - 1);
2999 : 16065 : else if (shift == RSHIFT_EXPR
3000 : 16065 : && type_has_mode_precision_p (shift_type))
3001 : : {
3002 : 16065 : prec = TYPE_PRECISION (TREE_TYPE (captures[2]));
3003 : 16065 : tree arg00 = captures[3];
3004 : 16065 : if (captures[2] != captures[3]
3005 : 16065 : && TYPE_UNSIGNED (TREE_TYPE (captures[3])))
3006 : : {
3007 : 11351 : tree inner_type = TREE_TYPE (captures[3]);
3008 : 11351 : if (type_has_mode_precision_p (inner_type)
3009 : 11351 : && TYPE_PRECISION (inner_type) < prec)
3010 : : {
3011 : 3148 : prec = TYPE_PRECISION (inner_type);
3012 : 3148 : if (shiftc < prec)
3013 : 3148 : shift_type = inner_type;
3014 : : }
3015 : : }
3016 : 16065 : zerobits = HOST_WIDE_INT_M1U;
3017 : 16065 : if (shiftc < prec)
3018 : : {
3019 : 16065 : zerobits >>= HOST_BITS_PER_WIDE_INT - shiftc;
3020 : 16065 : zerobits <<= prec - shiftc;
3021 : : }
3022 : 16065 : if (!TYPE_UNSIGNED (TREE_TYPE (captures[2]))
3023 : 16065 : && prec == TYPE_PRECISION (TREE_TYPE (captures[2])))
3024 : : {
3025 : 3361 : if ((mask & zerobits) == 0)
3026 : 2349 : shift_type = unsigned_type_for (TREE_TYPE (captures[2]));
3027 : : else
3028 : : zerobits = 0;
3029 : : }
3030 : : }
3031 : 24830 : if ((mask & zerobits) == mask
3032 : : )
3033 : : {
3034 : 31 : gimple_seq *lseq = seq;
3035 : 31 : if (lseq
3036 : : && (!single_use (captures[0])
3037 : : || !single_use (captures[1])))
3038 : 31 : lseq = NULL;
3039 : 31 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail914;
3040 : 31 : {
3041 : 31 : tree tem;
3042 : 31 : tem = build_int_cst (type, 0);
3043 : 31 : res_op->set_value (tem);
3044 : 31 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 620, __FILE__, __LINE__, true);
3045 : 31 : return true;
3046 : : }
3047 : 0 : next_after_fail914:;
3048 : : }
3049 : : else
3050 : : {
3051 : 24799 : {
3052 : 24799 : newmask = mask | zerobits;
3053 : 24799 : if (newmask != mask && (newmask & (newmask + 1)) == 0
3054 : : )
3055 : : {
3056 : : {
3057 : 15873 : for (prec = BITS_PER_UNIT;
3058 : 21316 : prec < HOST_BITS_PER_WIDE_INT; prec <<= 1)
3059 : 16107 : if (newmask == (HOST_WIDE_INT_1U << prec) - 1)
3060 : : break;
3061 : 5443 : if (prec < HOST_BITS_PER_WIDE_INT
3062 : 5209 : || newmask == HOST_WIDE_INT_M1U
3063 : : )
3064 : : {
3065 : 284 : {
3066 : 284 : tree newmaskt = build_int_cst_type (TREE_TYPE (captures[5]), newmask);
3067 : 284 : if (!tree_int_cst_equal (newmaskt, captures[5])
3068 : : )
3069 : : {
3070 : 284 : if (shift_type != TREE_TYPE (captures[2])
3071 : : )
3072 : : {
3073 : 34 : gimple_seq *lseq = seq;
3074 : 34 : if (lseq
3075 : 11 : && (!single_use (captures[0])
3076 : 11 : || !single_use (captures[1])))
3077 : 23 : lseq = NULL;
3078 : 34 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail915;
3079 : 34 : {
3080 : 34 : res_op->set_op (BIT_AND_EXPR, type, 2);
3081 : 34 : {
3082 : 34 : tree _o1[1], _r1;
3083 : 34 : {
3084 : 34 : tree _o2[2], _r2;
3085 : 34 : {
3086 : 34 : tree _o3[1], _r3;
3087 : 34 : _o3[0] = captures[2];
3088 : 34 : if (shift_type != TREE_TYPE (_o3[0])
3089 : 34 : && !useless_type_conversion_p (shift_type, TREE_TYPE (_o3[0])))
3090 : : {
3091 : 34 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, shift_type, _o3[0]);
3092 : 34 : tem_op.resimplify (lseq, valueize);
3093 : 34 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
3094 : 34 : if (!_r3) goto next_after_fail915;
3095 : : }
3096 : : else
3097 : : _r3 = _o3[0];
3098 : 31 : _o2[0] = _r3;
3099 : : }
3100 : 31 : _o2[1] = captures[4];
3101 : 31 : gimple_match_op tem_op (res_op->cond.any_else (), shift, shift_type, _o2[0], _o2[1]);
3102 : 31 : tem_op.resimplify (lseq, valueize);
3103 : 31 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3104 : 31 : if (!_r2) goto next_after_fail915;
3105 : 11 : _o1[0] = _r2;
3106 : : }
3107 : 11 : if (type != TREE_TYPE (_o1[0])
3108 : 11 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3109 : : {
3110 : 11 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
3111 : 11 : tem_op.resimplify (lseq, valueize);
3112 : 11 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3113 : 11 : if (!_r1) goto next_after_fail915;
3114 : : }
3115 : : else
3116 : : _r1 = _o1[0];
3117 : 11 : res_op->ops[0] = _r1;
3118 : : }
3119 : 11 : res_op->ops[1] = newmaskt;
3120 : 11 : res_op->resimplify (lseq, valueize);
3121 : 11 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 621, __FILE__, __LINE__, true);
3122 : 11 : return true;
3123 : : }
3124 : : next_after_fail915:;
3125 : : }
3126 : : else
3127 : : {
3128 : 250 : gimple_seq *lseq = seq;
3129 : 250 : if (lseq
3130 : 179 : && (!single_use (captures[0])
3131 : 179 : || !single_use (captures[1])))
3132 : 71 : lseq = NULL;
3133 : 250 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail916;
3134 : 250 : {
3135 : 250 : res_op->set_op (BIT_AND_EXPR, type, 2);
3136 : 250 : res_op->ops[0] = captures[0];
3137 : 250 : res_op->ops[1] = newmaskt;
3138 : 250 : res_op->resimplify (lseq, valueize);
3139 : 250 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 622, __FILE__, __LINE__, true);
3140 : 250 : return true;
3141 : : }
3142 : 0 : next_after_fail916:;
3143 : : }
3144 : : }
3145 : : }
3146 : : }
3147 : : }
3148 : : }
3149 : : }
3150 : : }
3151 : : }
3152 : : }
3153 : : return false;
3154 : : }
3155 : :
3156 : : bool
3157 : 1036 : gimple_simplify_480 (gimple_match_op *res_op, gimple_seq *seq,
3158 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3159 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3160 : : const enum tree_code ARG_UNUSED (minmax))
3161 : : {
3162 : 1036 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3163 : 1036 : gimple_seq *lseq = seq;
3164 : 1036 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail945;
3165 : 1036 : {
3166 : 1036 : tree tem;
3167 : 1036 : tem = captures[0];
3168 : 1036 : res_op->set_value (tem);
3169 : 1036 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 668, __FILE__, __LINE__, true);
3170 : : return true;
3171 : : }
3172 : 0 : next_after_fail945:;
3173 : 0 : return false;
3174 : : }
3175 : :
3176 : : bool
3177 : 6 : gimple_simplify_483 (gimple_match_op *res_op, gimple_seq *seq,
3178 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3179 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3180 : : {
3181 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3182 : 6 : if (TREE_CODE (type) != COMPLEX_TYPE
3183 : 6 : && (! ANY_INTEGRAL_TYPE_P (type)
3184 : 6 : || TYPE_OVERFLOW_UNDEFINED (type))
3185 : : )
3186 : : {
3187 : 6 : gimple_seq *lseq = seq;
3188 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail948;
3189 : 6 : {
3190 : 6 : res_op->set_op (NEGATE_EXPR, type, 1);
3191 : 6 : {
3192 : 6 : tree _o1[1], _r1;
3193 : 6 : _o1[0] = captures[0];
3194 : 6 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
3195 : 6 : tem_op.resimplify (lseq, valueize);
3196 : 6 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3197 : 6 : if (!_r1) goto next_after_fail948;
3198 : 2 : res_op->ops[0] = _r1;
3199 : : }
3200 : 2 : res_op->resimplify (lseq, valueize);
3201 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 670, __FILE__, __LINE__, true);
3202 : 2 : return true;
3203 : : }
3204 : : next_after_fail948:;
3205 : : }
3206 : : return false;
3207 : : }
3208 : :
3209 : : bool
3210 : 0 : gimple_simplify_491 (gimple_match_op *res_op, gimple_seq *seq,
3211 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3212 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3213 : : {
3214 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3215 : 0 : if (TREE_CODE (type) != COMPLEX_TYPE
3216 : 0 : && (! ANY_INTEGRAL_TYPE_P (type)
3217 : 0 : || TYPE_OVERFLOW_UNDEFINED (type))
3218 : : )
3219 : : {
3220 : 0 : gimple_seq *lseq = seq;
3221 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail968;
3222 : 0 : {
3223 : 0 : res_op->set_op (ABS_EXPR, type, 1);
3224 : 0 : res_op->ops[0] = captures[0];
3225 : 0 : res_op->resimplify (lseq, valueize);
3226 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 678, __FILE__, __LINE__, true);
3227 : 0 : return true;
3228 : : }
3229 : 0 : next_after_fail968:;
3230 : : }
3231 : : return false;
3232 : : }
3233 : :
3234 : : bool
3235 : 7 : gimple_simplify_496 (gimple_match_op *res_op, gimple_seq *seq,
3236 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3237 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3238 : : {
3239 : 7 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3240 : 7 : if (ANY_INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_UNDEFINED (type)
3241 : : )
3242 : : {
3243 : 0 : gimple_seq *lseq = seq;
3244 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail973;
3245 : 0 : {
3246 : 0 : res_op->set_op (MAX_EXPR, type, 2);
3247 : 0 : res_op->ops[0] = captures[2];
3248 : 0 : res_op->ops[1] = captures[1];
3249 : 0 : res_op->resimplify (lseq, valueize);
3250 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 683, __FILE__, __LINE__, true);
3251 : 0 : return true;
3252 : : }
3253 : 0 : next_after_fail973:;
3254 : : }
3255 : : return false;
3256 : : }
3257 : :
3258 : : bool
3259 : 3662 : gimple_simplify_503 (gimple_match_op *res_op, gimple_seq *seq,
3260 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3261 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3262 : : const enum tree_code ARG_UNUSED (op))
3263 : : {
3264 : 3662 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3265 : 3662 : if (INTEGRAL_TYPE_P (type)
3266 : 3656 : && TYPE_PRECISION (type) > 1
3267 : 7318 : && (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])))
3268 : : )
3269 : : {
3270 : 3656 : gimple_seq *lseq = seq;
3271 : 3656 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail980;
3272 : 3656 : {
3273 : 3656 : res_op->set_op (op, type, 2);
3274 : 3656 : {
3275 : 3656 : tree _o1[2], _r1;
3276 : 3656 : {
3277 : 3656 : tree _o2[1], _r2;
3278 : 3656 : _o2[0] = captures[0];
3279 : 3656 : if (type != TREE_TYPE (_o2[0])
3280 : 3656 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
3281 : : {
3282 : 2452 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
3283 : 2452 : tem_op.resimplify (lseq, valueize);
3284 : 2452 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3285 : 2452 : if (!_r2) goto next_after_fail980;
3286 : : }
3287 : : else
3288 : : _r2 = _o2[0];
3289 : 3609 : _o1[0] = _r2;
3290 : : }
3291 : 3609 : _o1[1] = captures[1];
3292 : 3609 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3293 : 3609 : tem_op.resimplify (lseq, valueize);
3294 : 3609 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3295 : 3609 : if (!_r1) goto next_after_fail980;
3296 : 3306 : res_op->ops[0] = _r1;
3297 : : }
3298 : 3306 : res_op->ops[1] = captures[2];
3299 : 3306 : res_op->resimplify (lseq, valueize);
3300 : 3306 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 690, __FILE__, __LINE__, true);
3301 : 3306 : return true;
3302 : : }
3303 : : next_after_fail980:;
3304 : : }
3305 : : return false;
3306 : : }
3307 : :
3308 : : bool
3309 : 72655 : gimple_simplify_513 (gimple_match_op *res_op, gimple_seq *seq,
3310 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3311 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3312 : : const enum tree_code ARG_UNUSED (eqne))
3313 : : {
3314 : 72655 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3315 : 142356 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3316 : 66555 : && INTEGRAL_TYPE_P (type)
3317 : 211701 : && (wi::to_widest (captures[2]) + 1 == wi::to_widest (captures[3])
3318 : 130349 : || wi::to_widest (captures[2]) == wi::to_widest (captures[3]) + 1)
3319 : : )
3320 : : {
3321 : 15292 : {
3322 : 15292 : value_range r;
3323 : 30584 : get_range_query (cfun)->range_of_expr (r, captures[0]);
3324 : 15292 : if (r.undefined_p ())
3325 : 20 : r.set_varying (TREE_TYPE (captures[0]));
3326 : 15292 : wide_int min = r.lower_bound ();
3327 : 15292 : wide_int max = r.upper_bound ();
3328 : 30584 : if (min + 1 == max
3329 : 15292 : && (wi::to_wide (captures[1]) == min
3330 : 15318 : || wi::to_wide (captures[1]) == max)
3331 : : )
3332 : : {
3333 : 5630 : {
3334 : 5630 : tree arg0 = captures[2], arg1 = captures[3];
3335 : 5630 : tree type1;
3336 : 5630 : if ((eqne == EQ_EXPR) ^ (wi::to_wide (captures[1]) == min))
3337 : 2005 : std::swap (arg0, arg1);
3338 : 5630 : if (TYPE_PRECISION (TREE_TYPE (captures[0])) > TYPE_PRECISION (type))
3339 : 138 : type1 = TREE_TYPE (captures[0]);
3340 : : else
3341 : : type1 = type;
3342 : 5630 : auto prec = TYPE_PRECISION (type1);
3343 : 5630 : auto unsign = TYPE_UNSIGNED (type1);
3344 : 5630 : if (TREE_CODE (type1) == BOOLEAN_TYPE)
3345 : 0 : type1 = build_nonstandard_integer_type (prec, unsign);
3346 : 5630 : min = wide_int::from (min, prec,
3347 : 11260 : TYPE_SIGN (TREE_TYPE (captures[0])));
3348 : 5630 : wide_int a = wide_int::from (wi::to_wide (arg0), prec,
3349 : 11260 : TYPE_SIGN (type));
3350 : 5630 : enum tree_code code;
3351 : 5630 : wi::overflow_type ovf;
3352 : 5630 : if (tree_int_cst_lt (arg0, arg1))
3353 : : {
3354 : 5000 : code = PLUS_EXPR;
3355 : 5000 : a -= min;
3356 : 5000 : if (!unsign)
3357 : : {
3358 : 2524 : wi::add (min + (wi::neg_p (a) ? 0 : 1), a, SIGNED, &ovf);
3359 : 1280 : if (ovf)
3360 : 0 : type1 = unsigned_type_for (type1);
3361 : : }
3362 : : }
3363 : : else
3364 : : {
3365 : 630 : code = MINUS_EXPR;
3366 : 630 : a += min;
3367 : 630 : if (!unsign)
3368 : : {
3369 : 518 : wi::sub (a, min + (wi::neg_p (min) ? 0 : 1), SIGNED, &ovf);
3370 : 259 : if (ovf)
3371 : 0 : type1 = unsigned_type_for (type1);
3372 : : }
3373 : : }
3374 : 5630 : tree arg = wide_int_to_tree (type1, a);
3375 : 5630 : if (code == PLUS_EXPR
3376 : : )
3377 : : {
3378 : 5000 : gimple_seq *lseq = seq;
3379 : 5000 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1039;
3380 : 5000 : {
3381 : 5000 : res_op->set_op (NOP_EXPR, type, 1);
3382 : 5000 : {
3383 : 5000 : tree _o1[2], _r1;
3384 : 5000 : {
3385 : 5000 : tree _o2[1], _r2;
3386 : 5000 : _o2[0] = captures[0];
3387 : 5000 : if (type1 != TREE_TYPE (_o2[0])
3388 : 5000 : && !useless_type_conversion_p (type1, TREE_TYPE (_o2[0])))
3389 : : {
3390 : 2244 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type1, _o2[0]);
3391 : 2244 : tem_op.resimplify (lseq, valueize);
3392 : 2244 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3393 : 2244 : if (!_r2) goto next_after_fail1039;
3394 : : }
3395 : : else
3396 : : _r2 = _o2[0];
3397 : 5000 : _o1[0] = _r2;
3398 : : }
3399 : 5000 : _o1[1] = arg;
3400 : 5000 : gimple_match_op tem_op (res_op->cond.any_else (), PLUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3401 : 5000 : tem_op.resimplify (lseq, valueize);
3402 : 5000 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3403 : 5000 : if (!_r1) goto next_after_fail1039;
3404 : 4977 : res_op->ops[0] = _r1;
3405 : : }
3406 : 4977 : res_op->resimplify (lseq, valueize);
3407 : 4977 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 713, __FILE__, __LINE__, true);
3408 : 4977 : return true;
3409 : : }
3410 : 28 : next_after_fail1039:;
3411 : : }
3412 : : else
3413 : : {
3414 : 630 : gimple_seq *lseq = seq;
3415 : 630 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1040;
3416 : 630 : {
3417 : 630 : res_op->set_op (NOP_EXPR, type, 1);
3418 : 630 : {
3419 : 630 : tree _o1[2], _r1;
3420 : 630 : _o1[0] = arg;
3421 : 630 : {
3422 : 630 : tree _o2[1], _r2;
3423 : 630 : _o2[0] = captures[0];
3424 : 630 : if (type1 != TREE_TYPE (_o2[0])
3425 : 630 : && !useless_type_conversion_p (type1, TREE_TYPE (_o2[0])))
3426 : : {
3427 : 403 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type1, _o2[0]);
3428 : 403 : tem_op.resimplify (lseq, valueize);
3429 : 403 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3430 : 403 : if (!_r2) goto next_after_fail1040;
3431 : : }
3432 : : else
3433 : : _r2 = _o2[0];
3434 : 630 : _o1[1] = _r2;
3435 : : }
3436 : 630 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3437 : 630 : tem_op.resimplify (lseq, valueize);
3438 : 630 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3439 : 630 : if (!_r1) goto next_after_fail1040;
3440 : 625 : res_op->ops[0] = _r1;
3441 : : }
3442 : 625 : res_op->resimplify (lseq, valueize);
3443 : 625 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 714, __FILE__, __LINE__, true);
3444 : 625 : return true;
3445 : : }
3446 : 28 : next_after_fail1040:;
3447 : : }
3448 : 5630 : }
3449 : : }
3450 : 15292 : }
3451 : : }
3452 : : return false;
3453 : : }
3454 : :
3455 : : bool
3456 : 0 : gimple_simplify_528 (gimple_match_op *res_op, gimple_seq *seq,
3457 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3458 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3459 : : {
3460 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3461 : 0 : if (wi::abs (wi::to_wide (captures[1])) == wi::to_wide (captures[3])
3462 : : )
3463 : : {
3464 : 0 : if (ABSU_EXPR != ABSU_EXPR && wi::only_sign_bit_p (wi::to_wide (captures[1]))
3465 : : )
3466 : : {
3467 : : {
3468 : : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
3469 : : gimple_seq *lseq = seq;
3470 : : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1056;
3471 : : {
3472 : : res_op->set_op (NOP_EXPR, type, 1);
3473 : : {
3474 : : tree _o1[1], _r1;
3475 : : _o1[0] = captures[0];
3476 : : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o1[0]);
3477 : : tem_op.resimplify (lseq, valueize);
3478 : : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3479 : : if (!_r1) goto next_after_fail1056;
3480 : : res_op->ops[0] = _r1;
3481 : : }
3482 : : res_op->resimplify (lseq, valueize);
3483 : : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 722, __FILE__, __LINE__, true);
3484 : : return true;
3485 : : }
3486 : : next_after_fail1056:;
3487 : : }
3488 : : }
3489 : : else
3490 : : {
3491 : 0 : gimple_seq *lseq = seq;
3492 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1057;
3493 : 0 : {
3494 : 0 : tree tem;
3495 : 0 : tem = captures[2];
3496 : 0 : res_op->set_value (tem);
3497 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 723, __FILE__, __LINE__, true);
3498 : 0 : return true;
3499 : : }
3500 : 0 : next_after_fail1057:;
3501 : : }
3502 : : }
3503 : : return false;
3504 : : }
3505 : :
3506 : : bool
3507 : 0 : gimple_simplify_536 (gimple_match_op *res_op, gimple_seq *seq,
3508 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3509 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3510 : : const enum tree_code ARG_UNUSED (cmp))
3511 : : {
3512 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3513 : 0 : if (!HONOR_SIGNED_ZEROS (type)
3514 : : )
3515 : : {
3516 : 0 : gimple_seq *lseq = seq;
3517 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1065;
3518 : 0 : {
3519 : 0 : tree tem;
3520 : 0 : tem = captures[3];
3521 : 0 : res_op->set_value (tem);
3522 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 727, __FILE__, __LINE__, true);
3523 : 0 : return true;
3524 : : }
3525 : 0 : next_after_fail1065:;
3526 : : }
3527 : : return false;
3528 : : }
3529 : :
3530 : : bool
3531 : 1024 : gimple_simplify_541 (gimple_match_op *res_op, gimple_seq *seq,
3532 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3533 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3534 : : {
3535 : 1024 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3536 : 1024 : if (!POINTER_TYPE_P (type) && integer_pow2p (captures[2])
3537 : : )
3538 : : {
3539 : 0 : {
3540 : 0 : int shift = (wi::exact_log2 (wi::to_wide (captures[2]))
3541 : 0 : - wi::exact_log2 (wi::to_wide (captures[1])));
3542 : 0 : if (shift > 0
3543 : : )
3544 : : {
3545 : 0 : gimple_seq *lseq = seq;
3546 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1070;
3547 : 0 : {
3548 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
3549 : 0 : {
3550 : 0 : tree _o1[2], _r1;
3551 : 0 : {
3552 : 0 : tree _o2[1], _r2;
3553 : 0 : _o2[0] = captures[0];
3554 : 0 : if (type != TREE_TYPE (_o2[0])
3555 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o2[0])))
3556 : : {
3557 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o2[0]);
3558 : 0 : tem_op.resimplify (lseq, valueize);
3559 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3560 : 0 : if (!_r2) goto next_after_fail1070;
3561 : : }
3562 : : else
3563 : : _r2 = _o2[0];
3564 : 0 : _o1[0] = _r2;
3565 : : }
3566 : 0 : _o1[1] = build_int_cst (integer_type_node, shift);
3567 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), LSHIFT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
3568 : 0 : tem_op.resimplify (lseq, valueize);
3569 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3570 : 0 : if (!_r1) goto next_after_fail1070;
3571 : 0 : res_op->ops[0] = _r1;
3572 : : }
3573 : 0 : res_op->ops[1] = captures[2];
3574 : 0 : res_op->resimplify (lseq, valueize);
3575 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 733, __FILE__, __LINE__, true);
3576 : 0 : return true;
3577 : : }
3578 : : next_after_fail1070:;
3579 : : }
3580 : : else
3581 : : {
3582 : 0 : gimple_seq *lseq = seq;
3583 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1071;
3584 : 0 : {
3585 : 0 : res_op->set_op (BIT_AND_EXPR, type, 2);
3586 : 0 : {
3587 : 0 : tree _o1[1], _r1;
3588 : 0 : {
3589 : 0 : tree _o2[2], _r2;
3590 : 0 : _o2[0] = captures[0];
3591 : 0 : _o2[1] = build_int_cst (integer_type_node, -shift);
3592 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), RSHIFT_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3593 : 0 : tem_op.resimplify (lseq, valueize);
3594 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3595 : 0 : if (!_r2) goto next_after_fail1071;
3596 : 0 : _o1[0] = _r2;
3597 : : }
3598 : 0 : if (type != TREE_TYPE (_o1[0])
3599 : 0 : && !useless_type_conversion_p (type, TREE_TYPE (_o1[0])))
3600 : : {
3601 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type, _o1[0]);
3602 : 0 : tem_op.resimplify (lseq, valueize);
3603 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3604 : 0 : if (!_r1) goto next_after_fail1071;
3605 : : }
3606 : : else
3607 : : _r1 = _o1[0];
3608 : 0 : res_op->ops[0] = _r1;
3609 : : }
3610 : 0 : res_op->ops[1] = captures[2];
3611 : 0 : res_op->resimplify (lseq, valueize);
3612 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 734, __FILE__, __LINE__, true);
3613 : 0 : return true;
3614 : : }
3615 : : next_after_fail1071:;
3616 : : }
3617 : : }
3618 : : }
3619 : : return false;
3620 : : }
3621 : :
3622 : : bool
3623 : 6 : gimple_simplify_557 (gimple_match_op *res_op, gimple_seq *seq,
3624 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3625 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3626 : : const combined_fn ARG_UNUSED (func))
3627 : : {
3628 : 6 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3629 : 6 : gimple_seq *lseq = seq;
3630 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1097;
3631 : 6 : {
3632 : 6 : tree tem;
3633 : 6 : tem = captures[2];
3634 : 6 : res_op->set_value (tem);
3635 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 750, __FILE__, __LINE__, true);
3636 : : return true;
3637 : : }
3638 : 0 : next_after_fail1097:;
3639 : 0 : return false;
3640 : : }
3641 : :
3642 : : bool
3643 : 0 : gimple_simplify_562 (gimple_match_op *res_op, gimple_seq *seq,
3644 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3645 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3646 : : {
3647 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3648 : 0 : {
3649 : 0 : int val;
3650 : 0 : internal_fn ifn = IFN_LAST;
3651 : 0 : if (TREE_CODE (TREE_TYPE (captures[2])) == BITINT_TYPE)
3652 : : ifn = IFN_CLZ;
3653 : 0 : else if (direct_internal_fn_supported_p (IFN_CLZ, TREE_TYPE (captures[2]),
3654 : : OPTIMIZE_FOR_BOTH))
3655 : : ifn = IFN_CLZ;
3656 : : if (ifn == IFN_CLZ
3657 : : )
3658 : : {
3659 : 0 : gimple_seq *lseq = seq;
3660 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1102;
3661 : 0 : {
3662 : 0 : res_op->set_op (CFN_CLZ, type, 2);
3663 : 0 : res_op->ops[0] = captures[2];
3664 : 0 : res_op->ops[1] = captures[3];
3665 : 0 : res_op->resimplify (lseq, valueize);
3666 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 753, __FILE__, __LINE__, true);
3667 : 0 : return true;
3668 : : }
3669 : 0 : next_after_fail1102:;
3670 : : }
3671 : : }
3672 : : return false;
3673 : : }
3674 : :
3675 : : bool
3676 : 146536 : gimple_simplify_569 (gimple_match_op *res_op, gimple_seq *seq,
3677 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3678 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3679 : : {
3680 : 146536 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3681 : 293072 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3682 : 146536 : && TYPE_MAX_VALUE (TREE_TYPE (captures[1]))
3683 : 146536 : && types_match (TREE_TYPE (captures[1]), TREE_TYPE (TREE_TYPE (captures[0])))
3684 : 212864 : && int_fits_type_p (captures[2], TREE_TYPE (captures[1]))
3685 : : )
3686 : : {
3687 : 51979 : if (TYPE_UNSIGNED (TREE_TYPE (captures[1]))
3688 : : )
3689 : : {
3690 : 27694 : gimple_seq *lseq = seq;
3691 : 27694 : if (lseq
3692 : 9549 : && (!single_use (captures[0])))
3693 : 26534 : lseq = NULL;
3694 : 27694 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1109;
3695 : 27694 : {
3696 : 27694 : res_op->set_op (NOP_EXPR, type, 1);
3697 : 27694 : {
3698 : 27694 : tree _o1[2], _r1;
3699 : 27694 : _o1[0] = captures[1];
3700 : 27694 : {
3701 : 27694 : tree _o2[2], _r2;
3702 : 27694 : _o2[0] = TYPE_MAX_VALUE (TREE_TYPE (captures[1]));
3703 : 27694 : _o2[1] = captures[2];
3704 : 27694 : gimple_match_op tem_op (res_op->cond.any_else (), TRUNC_DIV_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3705 : 27694 : tem_op.resimplify (NULL, valueize);
3706 : 27694 : _r2 = maybe_push_res_to_seq (&tem_op, NULL);
3707 : 27694 : if (!_r2) goto next_after_fail1109;
3708 : 27694 : _o1[1] = _r2;
3709 : : }
3710 : 27694 : gimple_match_op tem_op (res_op->cond.any_else (), GT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3711 : 27694 : tem_op.resimplify (lseq, valueize);
3712 : 27694 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3713 : 27694 : if (!_r1) goto next_after_fail1109;
3714 : 1264 : res_op->ops[0] = _r1;
3715 : : }
3716 : 1264 : res_op->resimplify (lseq, valueize);
3717 : 1264 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 757, __FILE__, __LINE__, true);
3718 : 1264 : return true;
3719 : : }
3720 : : next_after_fail1109:;
3721 : : }
3722 : : else
3723 : : {
3724 : 24285 : if (TYPE_MIN_VALUE (TREE_TYPE (captures[1]))
3725 : : )
3726 : : {
3727 : 24285 : if (integer_minus_onep (captures[2])
3728 : : )
3729 : : {
3730 : 1504 : gimple_seq *lseq = seq;
3731 : 1504 : if (lseq
3732 : 533 : && (!single_use (captures[0])))
3733 : 1432 : lseq = NULL;
3734 : 1504 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1110;
3735 : 1504 : {
3736 : 1504 : res_op->set_op (NOP_EXPR, type, 1);
3737 : 1504 : {
3738 : 1504 : tree _o1[2], _r1;
3739 : 1504 : _o1[0] = captures[1];
3740 : 1504 : _o1[1] = TYPE_MIN_VALUE (TREE_TYPE (captures[1]));
3741 : 1504 : gimple_match_op tem_op (res_op->cond.any_else (), EQ_EXPR, boolean_type_node, _o1[0], _o1[1]);
3742 : 1504 : tem_op.resimplify (lseq, valueize);
3743 : 1504 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3744 : 1504 : if (!_r1) goto next_after_fail1110;
3745 : 72 : res_op->ops[0] = _r1;
3746 : : }
3747 : 72 : res_op->resimplify (lseq, valueize);
3748 : 72 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 758, __FILE__, __LINE__, true);
3749 : 72 : return true;
3750 : : }
3751 : : next_after_fail1110:;
3752 : : }
3753 : : else
3754 : : {
3755 : 22781 : {
3756 : 22781 : tree div = fold_convert (TREE_TYPE (captures[1]), captures[2]);
3757 : 45562 : tree lo = int_const_binop (TRUNC_DIV_EXPR,
3758 : 22781 : TYPE_MIN_VALUE (TREE_TYPE (captures[1])), div);
3759 : 45562 : tree hi = int_const_binop (TRUNC_DIV_EXPR,
3760 : 22781 : TYPE_MAX_VALUE (TREE_TYPE (captures[1])), div);
3761 : 22781 : tree etype = range_check_type (TREE_TYPE (captures[1]));
3762 : 22781 : if (etype)
3763 : : {
3764 : 22781 : if (wi::neg_p (wi::to_wide (div)))
3765 : 1556 : std::swap (lo, hi);
3766 : 22781 : lo = fold_convert (etype, lo);
3767 : 22781 : hi = fold_convert (etype, hi);
3768 : 22781 : hi = int_const_binop (MINUS_EXPR, hi, lo);
3769 : : }
3770 : 22781 : if (etype
3771 : : )
3772 : : {
3773 : 22781 : gimple_seq *lseq = seq;
3774 : 22781 : if (lseq
3775 : 7833 : && (!single_use (captures[0])))
3776 : 21716 : lseq = NULL;
3777 : 22781 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1111;
3778 : 22781 : {
3779 : 22781 : res_op->set_op (NOP_EXPR, type, 1);
3780 : 22781 : {
3781 : 22781 : tree _o1[2], _r1;
3782 : 22781 : {
3783 : 22781 : tree _o2[2], _r2;
3784 : 22781 : {
3785 : 22781 : tree _o3[1], _r3;
3786 : 22781 : _o3[0] = captures[1];
3787 : 22781 : if (etype != TREE_TYPE (_o3[0])
3788 : 22781 : && !useless_type_conversion_p (etype, TREE_TYPE (_o3[0])))
3789 : : {
3790 : 22781 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, etype, _o3[0]);
3791 : 22781 : tem_op.resimplify (lseq, valueize);
3792 : 22781 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
3793 : 22781 : if (!_r3) goto next_after_fail1111;
3794 : : }
3795 : : else
3796 : : _r3 = _o3[0];
3797 : 1065 : _o2[0] = _r3;
3798 : : }
3799 : 1065 : _o2[1] = lo;
3800 : 1065 : gimple_match_op tem_op (res_op->cond.any_else (), MINUS_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
3801 : 1065 : tem_op.resimplify (lseq, valueize);
3802 : 1065 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3803 : 1065 : if (!_r2) goto next_after_fail1111;
3804 : 1065 : _o1[0] = _r2;
3805 : : }
3806 : 1065 : _o1[1] = hi;
3807 : 1065 : gimple_match_op tem_op (res_op->cond.any_else (), GT_EXPR, boolean_type_node, _o1[0], _o1[1]);
3808 : 1065 : tem_op.resimplify (lseq, valueize);
3809 : 1065 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3810 : 1065 : if (!_r1) goto next_after_fail1111;
3811 : 1065 : res_op->ops[0] = _r1;
3812 : : }
3813 : 1065 : res_op->resimplify (lseq, valueize);
3814 : 1065 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 759, __FILE__, __LINE__, true);
3815 : 1065 : return true;
3816 : : }
3817 : : next_after_fail1111:;
3818 : : }
3819 : : }
3820 : : }
3821 : : }
3822 : : }
3823 : : }
3824 : : return false;
3825 : : }
3826 : :
3827 : : bool
3828 : 1110 : gimple_simplify_605 (gimple_match_op *res_op, gimple_seq *seq,
3829 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3830 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3831 : : const combined_fn ARG_UNUSED (froms),
3832 : : const combined_fn ARG_UNUSED (tos))
3833 : : {
3834 : 1110 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3835 : 1110 : if (optimize && canonicalize_math_p ()
3836 : 2220 : && targetm.libc_has_function (function_c99_misc, NULL_TREE)
3837 : : )
3838 : : {
3839 : 1110 : gimple_seq *lseq = seq;
3840 : 1110 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1147;
3841 : 1110 : {
3842 : 1110 : res_op->set_op (NOP_EXPR, type, 1);
3843 : 1110 : {
3844 : 1110 : tree _o1[1], _r1;
3845 : 1110 : _o1[0] = captures[0];
3846 : 1110 : gimple_match_op tem_op (res_op->cond.any_else (), tos, TREE_TYPE (_o1[0]), _o1[0]);
3847 : 1110 : tem_op.resimplify (lseq, valueize);
3848 : 1110 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3849 : 1110 : if (!_r1) goto next_after_fail1147;
3850 : 555 : res_op->ops[0] = _r1;
3851 : : }
3852 : 555 : res_op->resimplify (lseq, valueize);
3853 : 555 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 790, __FILE__, __LINE__, true);
3854 : 555 : return true;
3855 : : }
3856 : : next_after_fail1147:;
3857 : : }
3858 : : return false;
3859 : : }
3860 : :
3861 : : bool
3862 : 249 : gimple_simplify_616 (gimple_match_op *res_op, gimple_seq *seq,
3863 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3864 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3865 : : const combined_fn ARG_UNUSED (rints))
3866 : : {
3867 : 249 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3868 : 249 : if (canonicalize_math_p ()
3869 : : )
3870 : : {
3871 : 249 : if (!flag_errno_math
3872 : : )
3873 : : {
3874 : 120 : gimple_seq *lseq = seq;
3875 : 120 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1158;
3876 : 120 : {
3877 : 120 : res_op->set_op (FIX_TRUNC_EXPR, type, 1);
3878 : 120 : res_op->ops[0] = captures[0];
3879 : 120 : res_op->resimplify (lseq, valueize);
3880 : 120 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 801, __FILE__, __LINE__, true);
3881 : 120 : return true;
3882 : : }
3883 : 0 : next_after_fail1158:;
3884 : : }
3885 : : }
3886 : : return false;
3887 : : }
3888 : :
3889 : : bool
3890 : 1 : gimple_simplify_624 (gimple_match_op *res_op, gimple_seq *seq,
3891 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3892 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures))
3893 : : {
3894 : 1 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3895 : 1 : if (canonicalize_math_after_vectorization_p ()
3896 : : )
3897 : : {
3898 : 1 : gimple_seq *lseq = seq;
3899 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1166;
3900 : 1 : {
3901 : 1 : res_op->set_op (CFN_FMA, type, 3);
3902 : 1 : res_op->ops[0] = captures[0];
3903 : 1 : res_op->ops[1] = captures[1];
3904 : 1 : res_op->ops[2] = captures[2];
3905 : 1 : res_op->resimplify (lseq, valueize);
3906 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 809, __FILE__, __LINE__, true);
3907 : 1 : return true;
3908 : : }
3909 : 0 : next_after_fail1166:;
3910 : : }
3911 : : return false;
3912 : : }
3913 : :
3914 : : bool
3915 : 8 : gimple_simplify_632 (gimple_match_op *res_op, gimple_seq *seq,
3916 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3917 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3918 : : const combined_fn ARG_UNUSED (bswap),
3919 : : const combined_fn ARG_UNUSED (popcount))
3920 : : {
3921 : 8 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3922 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3923 : 16 : && INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
3924 : : )
3925 : : {
3926 : 8 : {
3927 : 8 : tree type0 = TREE_TYPE (captures[0]);
3928 : 8 : tree type1 = TREE_TYPE (captures[1]);
3929 : 8 : unsigned int prec0 = TYPE_PRECISION (type0);
3930 : 8 : unsigned int prec1 = TYPE_PRECISION (type1);
3931 : 8 : if (prec0 == prec1 || (prec0 > prec1 && TYPE_UNSIGNED (type1))
3932 : : )
3933 : : {
3934 : 8 : gimple_seq *lseq = seq;
3935 : 8 : if (lseq
3936 : 4 : && (!single_use (captures[0])
3937 : 4 : || !single_use (captures[1])))
3938 : 4 : lseq = NULL;
3939 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1178;
3940 : 8 : {
3941 : 8 : res_op->set_op (popcount, type, 1);
3942 : 8 : {
3943 : 8 : tree _o1[1], _r1;
3944 : 8 : {
3945 : 8 : tree _o2[1], _r2;
3946 : 8 : _o2[0] = captures[2];
3947 : 8 : if (type1 != TREE_TYPE (_o2[0])
3948 : 8 : && !useless_type_conversion_p (type1, TREE_TYPE (_o2[0])))
3949 : : {
3950 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type1, _o2[0]);
3951 : 0 : tem_op.resimplify (lseq, valueize);
3952 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
3953 : 0 : if (!_r2) goto next_after_fail1178;
3954 : : }
3955 : : else
3956 : : _r2 = _o2[0];
3957 : 8 : _o1[0] = _r2;
3958 : : }
3959 : 8 : if (type0 != TREE_TYPE (_o1[0])
3960 : 8 : && !useless_type_conversion_p (type0, TREE_TYPE (_o1[0])))
3961 : : {
3962 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, type0, _o1[0]);
3963 : 0 : tem_op.resimplify (lseq, valueize);
3964 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
3965 : 0 : if (!_r1) goto next_after_fail1178;
3966 : : }
3967 : : else
3968 : : _r1 = _o1[0];
3969 : 8 : res_op->ops[0] = _r1;
3970 : : }
3971 : 8 : res_op->resimplify (lseq, valueize);
3972 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 816, __FILE__, __LINE__, true);
3973 : 8 : return true;
3974 : : }
3975 : : next_after_fail1178:;
3976 : : }
3977 : : }
3978 : : }
3979 : : return false;
3980 : : }
3981 : :
3982 : : bool
3983 : 36 : gimple_simplify_641 (gimple_match_op *res_op, gimple_seq *seq,
3984 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
3985 : : const tree ARG_UNUSED (type), tree *ARG_UNUSED (captures),
3986 : : const combined_fn ARG_UNUSED (FFS),
3987 : : const combined_fn ARG_UNUSED (CTZ))
3988 : : {
3989 : 36 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
3990 : 72 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
3991 : 72 : && direct_internal_fn_supported_p (IFN_CTZ, TREE_TYPE (captures[0]),
3992 : : OPTIMIZE_FOR_SPEED)
3993 : : )
3994 : : {
3995 : 36 : {
3996 : 36 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
3997 : 36 : gimple_seq *lseq = seq;
3998 : 36 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1190;
3999 : 36 : {
4000 : 36 : res_op->set_op (PLUS_EXPR, type, 2);
4001 : 36 : {
4002 : 36 : tree _o1[1], _r1;
4003 : 36 : {
4004 : 36 : tree _o2[1], _r2;
4005 : 36 : _o2[0] = captures[0];
4006 : 36 : if (utype != TREE_TYPE (_o2[0])
4007 : 36 : && !useless_type_conversion_p (utype, TREE_TYPE (_o2[0])))
4008 : : {
4009 : 36 : gimple_match_op tem_op (res_op->cond.any_else (), NOP_EXPR, utype, _o2[0]);
4010 : 36 : tem_op.resimplify (lseq, valueize);
4011 : 36 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
4012 : 36 : if (!_r2) goto next_after_fail1190;
4013 : : }
4014 : : else
4015 : : _r2 = _o2[0];
4016 : 34 : _o1[0] = _r2;
4017 : : }
4018 : 34 : gimple_match_op tem_op (res_op->cond.any_else (), CTZ, type, _o1[0]);
4019 : 34 : tem_op.resimplify (lseq, valueize);
4020 : 34 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4021 : 34 : if (!_r1) goto next_after_fail1190;
4022 : 34 : res_op->ops[0] = _r1;
4023 : : }
4024 : 34 : res_op->ops[1] = build_one_cst (type);
4025 : 34 : res_op->resimplify (lseq, valueize);
4026 : 34 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 829, __FILE__, __LINE__, true);
4027 : 34 : return true;
4028 : : }
4029 : : next_after_fail1190:;
4030 : : }
4031 : : }
4032 : : return false;
4033 : : }
4034 : :
4035 : : bool
4036 : 426206 : gimple_simplify_ABS_EXPR (gimple_match_op *res_op, gimple_seq *seq,
4037 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4038 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4039 : : {
4040 : 426206 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4041 : 426206 : switch (TREE_CODE (_p0))
4042 : : {
4043 : 415432 : case SSA_NAME:
4044 : 415432 : if (gimple *_d1 = get_def (valueize, _p0))
4045 : : {
4046 : 284098 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4047 : 296332 : switch (gimple_assign_rhs_code (_a1))
4048 : : {
4049 : 8157 : CASE_CONVERT:
4050 : 8157 : {
4051 : 8157 : tree _q20 = gimple_assign_rhs1 (_a1);
4052 : 8157 : _q20 = do_valueize (valueize, _q20);
4053 : 8157 : {
4054 : 8157 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4055 : 16314 : if (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
4056 : 2895 : && !TYPE_UNSIGNED (TREE_TYPE (captures[0]))
4057 : 9624 : && element_precision (type) > element_precision (TREE_TYPE (captures[0]))
4058 : : )
4059 : : {
4060 : 684 : {
4061 : 684 : tree utype = unsigned_type_for (TREE_TYPE (captures[0]));
4062 : 684 : gimple_seq *lseq = seq;
4063 : 684 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1200;
4064 : 684 : {
4065 : 684 : res_op->set_op (NOP_EXPR, type, 1);
4066 : 684 : {
4067 : 684 : tree _o1[1], _r1;
4068 : 684 : _o1[0] = captures[0];
4069 : 684 : gimple_match_op tem_op (res_op->cond.any_else (), ABSU_EXPR, utype, _o1[0]);
4070 : 684 : tem_op.resimplify (lseq, valueize);
4071 : 684 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4072 : 684 : if (!_r1) goto next_after_fail1200;
4073 : 333 : res_op->ops[0] = _r1;
4074 : : }
4075 : 333 : res_op->resimplify (lseq, valueize);
4076 : 333 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 839, __FILE__, __LINE__, true);
4077 : 333 : return true;
4078 : : }
4079 : : next_after_fail1200:;
4080 : : }
4081 : : }
4082 : : }
4083 : : break;
4084 : : }
4085 : 94 : case ABS_EXPR:
4086 : 94 : {
4087 : 94 : tree _q20 = gimple_assign_rhs1 (_a1);
4088 : 94 : _q20 = do_valueize (valueize, _q20);
4089 : 94 : {
4090 : 94 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4091 : 94 : gimple_seq *lseq = seq;
4092 : 94 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1201;
4093 : 94 : {
4094 : 94 : tree tem;
4095 : 94 : tem = captures[0];
4096 : 94 : res_op->set_value (tem);
4097 : 94 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 840, __FILE__, __LINE__, true);
4098 : 94 : return true;
4099 : : }
4100 : 0 : next_after_fail1201:;
4101 : : }
4102 : 0 : break;
4103 : : }
4104 : 695 : case NEGATE_EXPR:
4105 : 695 : {
4106 : 695 : tree _q20 = gimple_assign_rhs1 (_a1);
4107 : 695 : _q20 = do_valueize (valueize, _q20);
4108 : 695 : {
4109 : 695 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4110 : 695 : gimple_seq *lseq = seq;
4111 : 695 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1202;
4112 : 695 : {
4113 : 695 : res_op->set_op (ABS_EXPR, type, 1);
4114 : 695 : res_op->ops[0] = captures[0];
4115 : 695 : res_op->resimplify (lseq, valueize);
4116 : 695 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 841, __FILE__, __LINE__, true);
4117 : 695 : return true;
4118 : : }
4119 : 0 : next_after_fail1202:;
4120 : : }
4121 : 0 : break;
4122 : : }
4123 : 0 : case VEC_COND_EXPR:
4124 : 0 : {
4125 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4126 : 0 : _q20 = do_valueize (valueize, _q20);
4127 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4128 : 0 : _q21 = do_valueize (valueize, _q21);
4129 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
4130 : 0 : _q22 = do_valueize (valueize, _q22);
4131 : 0 : {
4132 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22 };
4133 : 0 : gimple_seq *lseq = seq;
4134 : 0 : if (lseq
4135 : 0 : && (!single_use (captures[0])))
4136 : 0 : lseq = NULL;
4137 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1203;
4138 : 0 : {
4139 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
4140 : 0 : res_op->ops[0] = captures[1];
4141 : 0 : {
4142 : 0 : tree _o1[1], _r1;
4143 : 0 : _o1[0] = captures[2];
4144 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4145 : 0 : tem_op.resimplify (NULL, valueize);
4146 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
4147 : 0 : if (!_r1) goto next_after_fail1203;
4148 : 0 : res_op->ops[1] = _r1;
4149 : : }
4150 : 0 : {
4151 : 0 : tree _o1[1], _r1;
4152 : 0 : _o1[0] = captures[3];
4153 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), ABS_EXPR, TREE_TYPE (_o1[0]), _o1[0]);
4154 : 0 : tem_op.resimplify (NULL, valueize);
4155 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
4156 : 0 : if (!_r1) goto next_after_fail1203;
4157 : 0 : res_op->ops[2] = _r1;
4158 : : }
4159 : 0 : res_op->resimplify (lseq, valueize);
4160 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 842, __FILE__, __LINE__, true);
4161 : 0 : return true;
4162 : : }
4163 : 0 : next_after_fail1203:;
4164 : : }
4165 : 0 : break;
4166 : : }
4167 : : default:;
4168 : : }
4169 : 57006 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
4170 : 5667 : switch (gimple_call_combined_fn (_c1))
4171 : : {
4172 : 12 : case CFN_BUILT_IN_COPYSIGNF16:
4173 : 12 : if (gimple_call_num_args (_c1) == 2)
4174 : : {
4175 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
4176 : 12 : _q20 = do_valueize (valueize, _q20);
4177 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
4178 : 12 : _q21 = do_valueize (valueize, _q21);
4179 : 12 : {
4180 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4181 : 12 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF16))
4182 : 12 : return true;
4183 : : }
4184 : : }
4185 : : break;
4186 : 0 : case CFN_BUILT_IN_COPYSIGNF32:
4187 : 0 : if (gimple_call_num_args (_c1) == 2)
4188 : : {
4189 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4190 : 0 : _q20 = do_valueize (valueize, _q20);
4191 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4192 : 0 : _q21 = do_valueize (valueize, _q21);
4193 : 0 : {
4194 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4195 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32))
4196 : 0 : return true;
4197 : : }
4198 : : }
4199 : : break;
4200 : 0 : case CFN_BUILT_IN_COPYSIGNF64:
4201 : 0 : if (gimple_call_num_args (_c1) == 2)
4202 : : {
4203 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4204 : 0 : _q20 = do_valueize (valueize, _q20);
4205 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4206 : 0 : _q21 = do_valueize (valueize, _q21);
4207 : 0 : {
4208 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4209 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64))
4210 : 0 : return true;
4211 : : }
4212 : : }
4213 : : break;
4214 : 0 : case CFN_BUILT_IN_COPYSIGNF128X:
4215 : 0 : if (gimple_call_num_args (_c1) == 2)
4216 : : {
4217 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4218 : 0 : _q20 = do_valueize (valueize, _q20);
4219 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4220 : 0 : _q21 = do_valueize (valueize, _q21);
4221 : 0 : {
4222 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4223 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128X))
4224 : 0 : return true;
4225 : : }
4226 : : }
4227 : : break;
4228 : 12 : case CFN_BUILT_IN_COPYSIGNF128:
4229 : 12 : if (gimple_call_num_args (_c1) == 2)
4230 : : {
4231 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
4232 : 12 : _q20 = do_valueize (valueize, _q20);
4233 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
4234 : 12 : _q21 = do_valueize (valueize, _q21);
4235 : 12 : {
4236 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4237 : 12 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF128))
4238 : 12 : return true;
4239 : : }
4240 : : }
4241 : : break;
4242 : 0 : case CFN_BUILT_IN_COPYSIGNF32X:
4243 : 0 : if (gimple_call_num_args (_c1) == 2)
4244 : : {
4245 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4246 : 0 : _q20 = do_valueize (valueize, _q20);
4247 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4248 : 0 : _q21 = do_valueize (valueize, _q21);
4249 : 0 : {
4250 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4251 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF32X))
4252 : 0 : return true;
4253 : : }
4254 : : }
4255 : : break;
4256 : 0 : case CFN_BUILT_IN_COPYSIGNF64X:
4257 : 0 : if (gimple_call_num_args (_c1) == 2)
4258 : : {
4259 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4260 : 0 : _q20 = do_valueize (valueize, _q20);
4261 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4262 : 0 : _q21 = do_valueize (valueize, _q21);
4263 : 0 : {
4264 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4265 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF64X))
4266 : 0 : return true;
4267 : : }
4268 : : }
4269 : : break;
4270 : 24 : case CFN_BUILT_IN_COPYSIGN:
4271 : 24 : if (gimple_call_num_args (_c1) == 2)
4272 : : {
4273 : 24 : tree _q20 = gimple_call_arg (_c1, 0);
4274 : 24 : _q20 = do_valueize (valueize, _q20);
4275 : 24 : tree _q21 = gimple_call_arg (_c1, 1);
4276 : 24 : _q21 = do_valueize (valueize, _q21);
4277 : 24 : {
4278 : 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4279 : 24 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN))
4280 : 24 : return true;
4281 : : }
4282 : : }
4283 : : break;
4284 : 24 : case CFN_BUILT_IN_COPYSIGNF:
4285 : 24 : if (gimple_call_num_args (_c1) == 2)
4286 : : {
4287 : 24 : tree _q20 = gimple_call_arg (_c1, 0);
4288 : 24 : _q20 = do_valueize (valueize, _q20);
4289 : 24 : tree _q21 = gimple_call_arg (_c1, 1);
4290 : 24 : _q21 = do_valueize (valueize, _q21);
4291 : 24 : {
4292 : 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4293 : 24 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF))
4294 : 24 : return true;
4295 : : }
4296 : : }
4297 : : break;
4298 : 12 : case CFN_BUILT_IN_COPYSIGNL:
4299 : 12 : if (gimple_call_num_args (_c1) == 2)
4300 : : {
4301 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
4302 : 12 : _q20 = do_valueize (valueize, _q20);
4303 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
4304 : 12 : _q21 = do_valueize (valueize, _q21);
4305 : 12 : {
4306 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4307 : 12 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL))
4308 : 12 : return true;
4309 : : }
4310 : : }
4311 : : break;
4312 : 0 : case CFN_COPYSIGN:
4313 : 0 : if (gimple_call_num_args (_c1) == 2)
4314 : : {
4315 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
4316 : 0 : _q20 = do_valueize (valueize, _q20);
4317 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
4318 : 0 : _q21 = do_valueize (valueize, _q21);
4319 : 0 : {
4320 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
4321 : 0 : if (gimple_simplify_1 (res_op, seq, valueize, type, captures, CFN_COPYSIGN))
4322 : 0 : return true;
4323 : : }
4324 : : }
4325 : : break;
4326 : : default:;
4327 : : }
4328 : : }
4329 : : break;
4330 : 425000 : default:;
4331 : : }
4332 : 425000 : if (tree_expr_nonnegative_p (_p0))
4333 : : {
4334 : 760 : {
4335 : 760 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4336 : 760 : gimple_seq *lseq = seq;
4337 : 760 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1204;
4338 : 760 : {
4339 : 760 : tree tem;
4340 : 760 : tem = captures[0];
4341 : 760 : res_op->set_value (tem);
4342 : 760 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 843, __FILE__, __LINE__, true);
4343 : 760 : return true;
4344 : : }
4345 : 0 : next_after_fail1204:;
4346 : : }
4347 : : }
4348 : : return false;
4349 : : }
4350 : :
4351 : : bool
4352 : 1868586 : gimple_simplify_FLOAT_EXPR (gimple_match_op *res_op, gimple_seq *seq,
4353 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4354 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4355 : : {
4356 : 1868586 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4357 : 1868586 : {
4358 : 1868586 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
4359 : 1868586 : if ((
4360 : : 1
4361 : 1868586 : && useless_type_conversion_p (type, TREE_TYPE (captures[0])))
4362 : : || (
4363 : :
4364 : : && type == TREE_TYPE (captures[0]))
4365 : : )
4366 : : {
4367 : 0 : gimple_seq *lseq = seq;
4368 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1297;
4369 : 0 : {
4370 : 0 : tree tem;
4371 : 0 : tem = captures[0];
4372 : 0 : res_op->set_value (tem);
4373 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 849, __FILE__, __LINE__, true);
4374 : 0 : return true;
4375 : : }
4376 : 0 : next_after_fail1297:;
4377 : : }
4378 : : }
4379 : 1868586 : switch (TREE_CODE (_p0))
4380 : : {
4381 : 1802746 : case SSA_NAME:
4382 : 1802746 : if (gimple *_d1 = get_def (valueize, _p0))
4383 : : {
4384 : 1209722 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4385 : 1219333 : switch (gimple_assign_rhs_code (_a1))
4386 : : {
4387 : 85925 : CASE_CONVERT:
4388 : 85925 : {
4389 : 85925 : tree _q20 = gimple_assign_rhs1 (_a1);
4390 : 85925 : _q20 = do_valueize (valueize, _q20);
4391 : 85925 : {
4392 : 85925 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4393 : 85925 : {
4394 : 85925 : tree inside_type = TREE_TYPE (captures[1]);
4395 : 85925 : tree inter_type = TREE_TYPE (captures[0]);
4396 : 85925 : int inside_int = INTEGRAL_TYPE_P (inside_type);
4397 : 85925 : int inside_ptr = POINTER_TYPE_P (inside_type);
4398 : 85925 : int inside_float = FLOAT_TYPE_P (inside_type);
4399 : 85925 : int inside_vec = VECTOR_TYPE_P (inside_type);
4400 : 85925 : unsigned int inside_prec = element_precision (inside_type);
4401 : 85925 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
4402 : 85925 : int inter_int = INTEGRAL_TYPE_P (inter_type);
4403 : 85925 : int inter_ptr = POINTER_TYPE_P (inter_type);
4404 : 85925 : int inter_float = FLOAT_TYPE_P (inter_type);
4405 : 85925 : int inter_vec = VECTOR_TYPE_P (inter_type);
4406 : 85925 : unsigned int inter_prec = element_precision (inter_type);
4407 : 85925 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
4408 : 85925 : int final_int = INTEGRAL_TYPE_P (type);
4409 : 85925 : int final_ptr = POINTER_TYPE_P (type);
4410 : 85925 : int final_float = FLOAT_TYPE_P (type);
4411 : 85925 : int final_vec = VECTOR_TYPE_P (type);
4412 : 85925 : unsigned int final_prec = element_precision (type);
4413 : 85925 : int final_unsignedp = TYPE_UNSIGNED (type);
4414 : 85925 : if (((
4415 : : 1
4416 : 85925 : && useless_type_conversion_p (type, inside_type))
4417 : : || (
4418 : :
4419 : : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
4420 : 0 : && (((inter_int || inter_ptr) && final_int)
4421 : 0 : || (inter_float && final_float))
4422 : 85925 : && inter_prec >= final_prec
4423 : : )
4424 : : {
4425 : 0 : gimple_seq *lseq = seq;
4426 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1298;
4427 : 0 : {
4428 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4429 : 0 : res_op->ops[0] = captures[1];
4430 : 0 : res_op->resimplify (lseq, valueize);
4431 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
4432 : 0 : return true;
4433 : : }
4434 : 0 : next_after_fail1298:;
4435 : : }
4436 : : else
4437 : : {
4438 : 85925 : if (((inter_int && inside_int) || (inter_float && inside_float))
4439 : 85808 : && (final_int || final_float)
4440 : 85808 : && inter_prec >= inside_prec
4441 : 53903 : && (inter_float || inter_unsignedp == inside_unsignedp)
4442 : : )
4443 : : {
4444 : 874 : gimple_seq *lseq = seq;
4445 : 874 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1299;
4446 : 874 : {
4447 : 874 : res_op->set_op (FLOAT_EXPR, type, 1);
4448 : 874 : res_op->ops[0] = captures[1];
4449 : 874 : res_op->resimplify (lseq, valueize);
4450 : 874 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
4451 : 874 : return true;
4452 : : }
4453 : 0 : next_after_fail1299:;
4454 : 0 : }
4455 : : else
4456 : : {
4457 : 85051 : if (inside_int && inter_int && final_int
4458 : 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
4459 : 0 : && inside_unsignedp && !inter_unsignedp)
4460 : 0 : || final_prec == inter_prec
4461 : 0 : || (inside_prec < inter_prec && inter_prec > final_prec
4462 : 0 : && !inside_unsignedp && inter_unsignedp))
4463 : : )
4464 : : {
4465 : 0 : gimple_seq *lseq = seq;
4466 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1300;
4467 : 0 : {
4468 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4469 : 0 : res_op->ops[0] = captures[1];
4470 : 0 : res_op->resimplify (lseq, valueize);
4471 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 852, __FILE__, __LINE__, true);
4472 : 0 : return true;
4473 : : }
4474 : 0 : next_after_fail1300:;
4475 : 0 : }
4476 : : else
4477 : : {
4478 : 85051 : if (! inside_float && ! inter_float && ! final_float
4479 : : && ! inside_vec && ! inter_vec && ! final_vec
4480 : 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
4481 : 0 : && ! (inside_int && inter_int
4482 : 0 : && inter_unsignedp != inside_unsignedp
4483 : 0 : && inter_prec < final_prec)
4484 : 0 : && ((inter_unsignedp && inter_prec > inside_prec)
4485 : 0 : == (final_unsignedp && final_prec > inter_prec))
4486 : 0 : && ! (inside_ptr && inter_prec != final_prec)
4487 : 0 : && ! (final_ptr && inside_prec != inter_prec)
4488 : : )
4489 : : {
4490 : 0 : gimple_seq *lseq = seq;
4491 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1301;
4492 : 0 : {
4493 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4494 : 0 : res_op->ops[0] = captures[1];
4495 : 0 : res_op->resimplify (lseq, valueize);
4496 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
4497 : 0 : return true;
4498 : : }
4499 : 0 : next_after_fail1301:;
4500 : 0 : }
4501 : : else
4502 : : {
4503 : 85051 : if (inside_int && inter_int && final_int
4504 : 84934 : && final_prec <= inside_prec
4505 : 0 : && inter_prec >= inside_prec
4506 : : )
4507 : : {
4508 : 0 : gimple_seq *lseq = seq;
4509 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1302;
4510 : 0 : {
4511 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4512 : 0 : res_op->ops[0] = captures[1];
4513 : 0 : res_op->resimplify (lseq, valueize);
4514 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 854, __FILE__, __LINE__, true);
4515 : 0 : return true;
4516 : : }
4517 : 0 : next_after_fail1302:;
4518 : 0 : }
4519 : : else
4520 : : {
4521 : 85051 : if (1
4522 : 85051 : && final_int && inter_int && inside_int
4523 : 0 : && final_prec == inside_prec
4524 : 0 : && final_prec > inter_prec
4525 : 0 : && inter_unsignedp
4526 : : )
4527 : : {
4528 : 0 : gimple_seq *lseq = seq;
4529 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1303;
4530 : 0 : {
4531 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4532 : 0 : {
4533 : 0 : tree _o1[2], _r1;
4534 : 0 : _o1[0] = captures[1];
4535 : 0 : _o1[1] = wide_int_to_tree
4536 : 0 : (inside_type,
4537 : 0 : wi::mask (inter_prec, false,
4538 : 0 : TYPE_PRECISION (inside_type)));
4539 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4540 : 0 : tem_op.resimplify (lseq, valueize);
4541 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4542 : 0 : if (!_r1) goto next_after_fail1303;
4543 : 0 : res_op->ops[0] = _r1;
4544 : : }
4545 : 0 : res_op->resimplify (lseq, valueize);
4546 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 855, __FILE__, __LINE__, true);
4547 : 0 : return true;
4548 : : }
4549 : 85051 : next_after_fail1303:;
4550 : : }
4551 : : else
4552 : : {
4553 : 85051 : if (1
4554 : 85051 : && inside_int && inter_float && final_int &&
4555 : 85051 : (unsigned) significand_size (TYPE_MODE (inter_type))
4556 : 0 : >= inside_prec - !inside_unsignedp
4557 : : )
4558 : : {
4559 : 0 : gimple_seq *lseq = seq;
4560 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1304;
4561 : 0 : {
4562 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4563 : 0 : res_op->ops[0] = captures[1];
4564 : 0 : res_op->resimplify (lseq, valueize);
4565 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 856, __FILE__, __LINE__, true);
4566 : 0 : return true;
4567 : : }
4568 : 0 : next_after_fail1304:;
4569 : : }
4570 : : }
4571 : : }
4572 : : }
4573 : : }
4574 : : }
4575 : : }
4576 : : }
4577 : : }
4578 : 85051 : break;
4579 : : }
4580 : 0 : case FLOAT_EXPR:
4581 : 0 : {
4582 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4583 : 0 : _q20 = do_valueize (valueize, _q20);
4584 : 0 : {
4585 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
4586 : 0 : {
4587 : 0 : tree inside_type = TREE_TYPE (captures[1]);
4588 : 0 : tree inter_type = TREE_TYPE (captures[0]);
4589 : 0 : int inside_int = INTEGRAL_TYPE_P (inside_type);
4590 : 0 : int inside_ptr = POINTER_TYPE_P (inside_type);
4591 : 0 : int inside_float = FLOAT_TYPE_P (inside_type);
4592 : 0 : int inside_vec = VECTOR_TYPE_P (inside_type);
4593 : 0 : unsigned int inside_prec = element_precision (inside_type);
4594 : 0 : int inside_unsignedp = TYPE_UNSIGNED (inside_type);
4595 : 0 : int inter_int = INTEGRAL_TYPE_P (inter_type);
4596 : 0 : int inter_ptr = POINTER_TYPE_P (inter_type);
4597 : 0 : int inter_float = FLOAT_TYPE_P (inter_type);
4598 : 0 : int inter_vec = VECTOR_TYPE_P (inter_type);
4599 : 0 : unsigned int inter_prec = element_precision (inter_type);
4600 : 0 : int inter_unsignedp = TYPE_UNSIGNED (inter_type);
4601 : 0 : int final_int = INTEGRAL_TYPE_P (type);
4602 : 0 : int final_ptr = POINTER_TYPE_P (type);
4603 : 0 : int final_float = FLOAT_TYPE_P (type);
4604 : 0 : int final_vec = VECTOR_TYPE_P (type);
4605 : 0 : unsigned int final_prec = element_precision (type);
4606 : 0 : int final_unsignedp = TYPE_UNSIGNED (type);
4607 : 0 : if (((
4608 : : 1
4609 : 0 : && useless_type_conversion_p (type, inside_type))
4610 : : || (
4611 : :
4612 : : && TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (inside_type)))
4613 : 0 : && (((inter_int || inter_ptr) && final_int)
4614 : 0 : || (inter_float && final_float))
4615 : 0 : && inter_prec >= final_prec
4616 : : )
4617 : : {
4618 : 0 : gimple_seq *lseq = seq;
4619 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1305;
4620 : 0 : {
4621 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4622 : 0 : res_op->ops[0] = captures[1];
4623 : 0 : res_op->resimplify (lseq, valueize);
4624 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 850, __FILE__, __LINE__, true);
4625 : 0 : return true;
4626 : : }
4627 : 0 : next_after_fail1305:;
4628 : : }
4629 : : else
4630 : : {
4631 : 0 : if (((inter_int && inside_int) || (inter_float && inside_float))
4632 : 0 : && (final_int || final_float)
4633 : 0 : && inter_prec >= inside_prec
4634 : 0 : && (inter_float || inter_unsignedp == inside_unsignedp)
4635 : : )
4636 : : {
4637 : 0 : gimple_seq *lseq = seq;
4638 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1306;
4639 : 0 : {
4640 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4641 : 0 : res_op->ops[0] = captures[1];
4642 : 0 : res_op->resimplify (lseq, valueize);
4643 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 851, __FILE__, __LINE__, true);
4644 : 0 : return true;
4645 : : }
4646 : 0 : next_after_fail1306:;
4647 : 0 : }
4648 : : else
4649 : : {
4650 : 0 : if (inside_int && inter_int && final_int
4651 : 0 : && ((inside_prec < inter_prec && inter_prec < final_prec
4652 : 0 : && inside_unsignedp && !inter_unsignedp)
4653 : 0 : || final_prec == inter_prec
4654 : 0 : || (inside_prec < inter_prec && inter_prec > final_prec
4655 : 0 : && !inside_unsignedp && inter_unsignedp))
4656 : : )
4657 : : {
4658 : 0 : gimple_seq *lseq = seq;
4659 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1307;
4660 : 0 : {
4661 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4662 : 0 : res_op->ops[0] = captures[1];
4663 : 0 : res_op->resimplify (lseq, valueize);
4664 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 852, __FILE__, __LINE__, true);
4665 : 0 : return true;
4666 : : }
4667 : 0 : next_after_fail1307:;
4668 : 0 : }
4669 : : else
4670 : : {
4671 : 0 : if (! inside_float && ! inter_float && ! final_float
4672 : : && ! inside_vec && ! inter_vec && ! final_vec
4673 : 0 : && (inter_prec >= inside_prec || inter_prec >= final_prec)
4674 : 0 : && ! (inside_int && inter_int
4675 : 0 : && inter_unsignedp != inside_unsignedp
4676 : 0 : && inter_prec < final_prec)
4677 : 0 : && ((inter_unsignedp && inter_prec > inside_prec)
4678 : 0 : == (final_unsignedp && final_prec > inter_prec))
4679 : 0 : && ! (inside_ptr && inter_prec != final_prec)
4680 : 0 : && ! (final_ptr && inside_prec != inter_prec)
4681 : : )
4682 : : {
4683 : 0 : gimple_seq *lseq = seq;
4684 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1308;
4685 : 0 : {
4686 : 0 : res_op->set_op (FLOAT_EXPR, type, 1);
4687 : 0 : res_op->ops[0] = captures[1];
4688 : 0 : res_op->resimplify (lseq, valueize);
4689 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 853, __FILE__, __LINE__, true);
4690 : 0 : return true;
4691 : : }
4692 : 0 : next_after_fail1308:;
4693 : 0 : }
4694 : : else
4695 : : {
4696 : 0 : if (inside_int && inter_int && final_int
4697 : 0 : && final_prec <= inside_prec
4698 : 0 : && inter_prec >= inside_prec
4699 : : )
4700 : : {
4701 : 0 : gimple_seq *lseq = seq;
4702 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1309;
4703 : 0 : {
4704 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4705 : 0 : res_op->ops[0] = captures[1];
4706 : 0 : res_op->resimplify (lseq, valueize);
4707 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 854, __FILE__, __LINE__, true);
4708 : 0 : return true;
4709 : : }
4710 : 0 : next_after_fail1309:;
4711 : 0 : }
4712 : : else
4713 : : {
4714 : 0 : if (1
4715 : 0 : && final_int && inter_int && inside_int
4716 : 0 : && final_prec == inside_prec
4717 : 0 : && final_prec > inter_prec
4718 : 0 : && inter_unsignedp
4719 : : )
4720 : : {
4721 : 0 : gimple_seq *lseq = seq;
4722 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1310;
4723 : 0 : {
4724 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4725 : 0 : {
4726 : 0 : tree _o1[2], _r1;
4727 : 0 : _o1[0] = captures[1];
4728 : 0 : _o1[1] = wide_int_to_tree
4729 : 0 : (inside_type,
4730 : 0 : wi::mask (inter_prec, false,
4731 : 0 : TYPE_PRECISION (inside_type)));
4732 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
4733 : 0 : tem_op.resimplify (lseq, valueize);
4734 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
4735 : 0 : if (!_r1) goto next_after_fail1310;
4736 : 0 : res_op->ops[0] = _r1;
4737 : : }
4738 : 0 : res_op->resimplify (lseq, valueize);
4739 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 855, __FILE__, __LINE__, true);
4740 : 0 : return true;
4741 : : }
4742 : 0 : next_after_fail1310:;
4743 : : }
4744 : : else
4745 : : {
4746 : 0 : if (1
4747 : 0 : && inside_int && inter_float && final_int &&
4748 : 0 : (unsigned) significand_size (TYPE_MODE (inter_type))
4749 : 0 : >= inside_prec - !inside_unsignedp
4750 : : )
4751 : : {
4752 : 0 : gimple_seq *lseq = seq;
4753 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1311;
4754 : 0 : {
4755 : 0 : res_op->set_op (NOP_EXPR, type, 1);
4756 : 0 : res_op->ops[0] = captures[1];
4757 : 0 : res_op->resimplify (lseq, valueize);
4758 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 856, __FILE__, __LINE__, true);
4759 : 0 : return true;
4760 : : }
4761 : 0 : next_after_fail1311:;
4762 : : }
4763 : : }
4764 : : }
4765 : : }
4766 : : }
4767 : : }
4768 : : }
4769 : : }
4770 : : }
4771 : 0 : break;
4772 : : }
4773 : 11861 : case FIX_TRUNC_EXPR:
4774 : 11861 : {
4775 : 11861 : tree _q20 = gimple_assign_rhs1 (_a1);
4776 : 11861 : _q20 = do_valueize (valueize, _q20);
4777 : 11861 : {
4778 : 11861 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
4779 : 11861 : if (!flag_trapping_math
4780 : 1015 : && !HONOR_SIGNED_ZEROS (type)
4781 : 619 : && types_match (type, TREE_TYPE (captures[0]))
4782 : 12448 : && direct_internal_fn_supported_p (IFN_TRUNC, type,
4783 : : OPTIMIZE_FOR_BOTH)
4784 : : )
4785 : : {
4786 : 0 : gimple_seq *lseq = seq;
4787 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1312;
4788 : 0 : {
4789 : 0 : res_op->set_op (CFN_TRUNC, type, 1);
4790 : 0 : res_op->ops[0] = captures[0];
4791 : 0 : res_op->resimplify (lseq, valueize);
4792 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 892, __FILE__, __LINE__, true);
4793 : 0 : return true;
4794 : : }
4795 : 0 : next_after_fail1312:;
4796 : : }
4797 : : }
4798 : : break;
4799 : : }
4800 : : default:;
4801 : : }
4802 : : }
4803 : : break;
4804 : : default:;
4805 : : }
4806 : : return false;
4807 : : }
4808 : :
4809 : : bool
4810 : 108 : gimple_simplify_CFN_BUILT_IN_BSWAP128 (gimple_match_op *res_op, gimple_seq *seq,
4811 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
4812 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
4813 : : {
4814 : 108 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
4815 : 108 : switch (TREE_CODE (_p0))
4816 : : {
4817 : 105 : case SSA_NAME:
4818 : 105 : if (gimple *_d1 = get_def (valueize, _p0))
4819 : : {
4820 : 64 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
4821 : 54 : switch (gimple_assign_rhs_code (_a1))
4822 : : {
4823 : 0 : case BIT_NOT_EXPR:
4824 : 0 : {
4825 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4826 : 0 : _q20 = do_valueize (valueize, _q20);
4827 : 0 : switch (TREE_CODE (_q20))
4828 : : {
4829 : 0 : case SSA_NAME:
4830 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4831 : : {
4832 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4833 : 0 : switch (gimple_call_combined_fn (_c2))
4834 : : {
4835 : 0 : case CFN_BUILT_IN_BSWAP128:
4836 : 0 : if (gimple_call_num_args (_c2) == 1)
4837 : : {
4838 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4839 : 0 : _q30 = do_valueize (valueize, _q30);
4840 : 0 : {
4841 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q30 };
4842 : 0 : if (gimple_simplify_572 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128))
4843 : 0 : return true;
4844 : : }
4845 : : }
4846 : : break;
4847 : : default:;
4848 : : }
4849 : : }
4850 : : break;
4851 : : default:;
4852 : : }
4853 : : break;
4854 : : }
4855 : 0 : case BIT_XOR_EXPR:
4856 : 0 : {
4857 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4858 : 0 : _q20 = do_valueize (valueize, _q20);
4859 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4860 : 0 : _q21 = do_valueize (valueize, _q21);
4861 : 0 : if (tree_swap_operands_p (_q20, _q21))
4862 : 0 : std::swap (_q20, _q21);
4863 : 0 : switch (TREE_CODE (_q20))
4864 : : {
4865 : 0 : case SSA_NAME:
4866 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4867 : : {
4868 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4869 : 0 : switch (gimple_call_combined_fn (_c2))
4870 : : {
4871 : 0 : case CFN_BUILT_IN_BSWAP128:
4872 : 0 : if (gimple_call_num_args (_c2) == 1)
4873 : : {
4874 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4875 : 0 : _q30 = do_valueize (valueize, _q30);
4876 : 0 : {
4877 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4878 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP128))
4879 : 0 : return true;
4880 : : }
4881 : : }
4882 : : break;
4883 : : default:;
4884 : : }
4885 : : }
4886 : : break;
4887 : 0 : default:;
4888 : : }
4889 : 0 : switch (TREE_CODE (_q21))
4890 : : {
4891 : 0 : case SSA_NAME:
4892 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4893 : : {
4894 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4895 : 0 : switch (gimple_call_combined_fn (_c2))
4896 : : {
4897 : 0 : case CFN_BUILT_IN_BSWAP128:
4898 : 0 : if (gimple_call_num_args (_c2) == 1)
4899 : : {
4900 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4901 : 0 : _q40 = do_valueize (valueize, _q40);
4902 : 0 : {
4903 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4904 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, CFN_BUILT_IN_BSWAP128))
4905 : 0 : return true;
4906 : : }
4907 : : }
4908 : : break;
4909 : : default:;
4910 : : }
4911 : : }
4912 : : break;
4913 : : default:;
4914 : : }
4915 : 108 : break;
4916 : : }
4917 : 0 : case BIT_IOR_EXPR:
4918 : 0 : {
4919 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4920 : 0 : _q20 = do_valueize (valueize, _q20);
4921 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4922 : 0 : _q21 = do_valueize (valueize, _q21);
4923 : 0 : if (tree_swap_operands_p (_q20, _q21))
4924 : 0 : std::swap (_q20, _q21);
4925 : 0 : switch (TREE_CODE (_q20))
4926 : : {
4927 : 0 : case SSA_NAME:
4928 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4929 : : {
4930 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4931 : 0 : switch (gimple_call_combined_fn (_c2))
4932 : : {
4933 : 0 : case CFN_BUILT_IN_BSWAP128:
4934 : 0 : if (gimple_call_num_args (_c2) == 1)
4935 : : {
4936 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4937 : 0 : _q30 = do_valueize (valueize, _q30);
4938 : 0 : {
4939 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
4940 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP128))
4941 : 0 : return true;
4942 : : }
4943 : : }
4944 : : break;
4945 : : default:;
4946 : : }
4947 : : }
4948 : : break;
4949 : 0 : default:;
4950 : : }
4951 : 0 : switch (TREE_CODE (_q21))
4952 : : {
4953 : 0 : case SSA_NAME:
4954 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
4955 : : {
4956 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4957 : 0 : switch (gimple_call_combined_fn (_c2))
4958 : : {
4959 : 0 : case CFN_BUILT_IN_BSWAP128:
4960 : 0 : if (gimple_call_num_args (_c2) == 1)
4961 : : {
4962 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
4963 : 0 : _q40 = do_valueize (valueize, _q40);
4964 : 0 : {
4965 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
4966 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, CFN_BUILT_IN_BSWAP128))
4967 : 0 : return true;
4968 : : }
4969 : : }
4970 : : break;
4971 : : default:;
4972 : : }
4973 : : }
4974 : : break;
4975 : : default:;
4976 : : }
4977 : 108 : break;
4978 : : }
4979 : 0 : case BIT_AND_EXPR:
4980 : 0 : {
4981 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
4982 : 0 : _q20 = do_valueize (valueize, _q20);
4983 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
4984 : 0 : _q21 = do_valueize (valueize, _q21);
4985 : 0 : if (tree_swap_operands_p (_q20, _q21))
4986 : 0 : std::swap (_q20, _q21);
4987 : 0 : switch (TREE_CODE (_q20))
4988 : : {
4989 : 0 : case SSA_NAME:
4990 : 0 : if (gimple *_d2 = get_def (valueize, _q20))
4991 : : {
4992 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
4993 : 0 : switch (gimple_call_combined_fn (_c2))
4994 : : {
4995 : 0 : case CFN_BUILT_IN_BSWAP128:
4996 : 0 : if (gimple_call_num_args (_c2) == 1)
4997 : : {
4998 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
4999 : 0 : _q30 = do_valueize (valueize, _q30);
5000 : 0 : {
5001 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
5002 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP128))
5003 : 0 : return true;
5004 : : }
5005 : : }
5006 : : break;
5007 : : default:;
5008 : : }
5009 : : }
5010 : : break;
5011 : 0 : default:;
5012 : : }
5013 : 0 : switch (TREE_CODE (_q21))
5014 : : {
5015 : 0 : case SSA_NAME:
5016 : 0 : if (gimple *_d2 = get_def (valueize, _q21))
5017 : : {
5018 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
5019 : 0 : switch (gimple_call_combined_fn (_c2))
5020 : : {
5021 : 0 : case CFN_BUILT_IN_BSWAP128:
5022 : 0 : if (gimple_call_num_args (_c2) == 1)
5023 : : {
5024 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
5025 : 0 : _q40 = do_valueize (valueize, _q40);
5026 : 0 : {
5027 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
5028 : 0 : if (gimple_simplify_573 (res_op, seq, valueize, type, captures, BIT_AND_EXPR, CFN_BUILT_IN_BSWAP128))
5029 : 0 : return true;
5030 : : }
5031 : : }
5032 : : break;
5033 : : default:;
5034 : : }
5035 : : }
5036 : : break;
5037 : : default:;
5038 : : }
5039 : 108 : break;
5040 : : }
5041 : : default:;
5042 : : }
5043 : 10 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5044 : 4 : switch (gimple_call_combined_fn (_c1))
5045 : : {
5046 : 4 : case CFN_BUILT_IN_BSWAP128:
5047 : 4 : if (gimple_call_num_args (_c1) == 1)
5048 : : {
5049 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
5050 : 4 : _q20 = do_valueize (valueize, _q20);
5051 : 4 : {
5052 : 4 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5053 : 4 : if (gimple_simplify_571 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128))
5054 : 4 : return true;
5055 : : }
5056 : : }
5057 : : break;
5058 : : default:;
5059 : : }
5060 : : }
5061 : : break;
5062 : : default:;
5063 : : }
5064 : : return false;
5065 : : }
5066 : :
5067 : : bool
5068 : 735 : gimple_simplify_CFN_BUILT_IN_LOG2L (gimple_match_op *res_op, gimple_seq *seq,
5069 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5070 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5071 : : {
5072 : 735 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5073 : 735 : switch (TREE_CODE (_p0))
5074 : : {
5075 : 388 : case SSA_NAME:
5076 : 388 : if (gimple *_d1 = get_def (valueize, _p0))
5077 : : {
5078 : 250 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5079 : 84 : switch (gimple_call_combined_fn (_c1))
5080 : : {
5081 : 12 : case CFN_BUILT_IN_SQRTL:
5082 : 12 : if (gimple_call_num_args (_c1) == 1)
5083 : : {
5084 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5085 : 12 : _q20 = do_valueize (valueize, _q20);
5086 : 12 : {
5087 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5088 : 12 : if (flag_unsafe_math_optimizations
5089 : : )
5090 : : {
5091 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5092 : : )
5093 : : {
5094 : 12 : {
5095 : 12 : tree x;
5096 : 12 : switch (CFN_BUILT_IN_SQRTL)
5097 : : {
5098 : 12 : CASE_CFN_SQRT:
5099 : 12 : x = build_real (type, dconsthalf);
5100 : 12 : break;
5101 : : CASE_CFN_CBRT:
5102 : : x = build_real_truncate (type, dconst_third ());
5103 : : break;
5104 : : default:
5105 : : gcc_unreachable ();
5106 : : }
5107 : 12 : gimple_seq *lseq = seq;
5108 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1392;
5109 : 12 : {
5110 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5111 : 12 : res_op->ops[0] = x;
5112 : 12 : {
5113 : 12 : tree _o1[1], _r1;
5114 : 12 : _o1[0] = captures[0];
5115 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o1[0]), _o1[0]);
5116 : 12 : tem_op.resimplify (lseq, valueize);
5117 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5118 : 12 : if (!_r1) goto next_after_fail1392;
5119 : 6 : res_op->ops[1] = _r1;
5120 : : }
5121 : 6 : res_op->resimplify (lseq, valueize);
5122 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5123 : 6 : return true;
5124 : : }
5125 : : next_after_fail1392:;
5126 : : }
5127 : : }
5128 : : }
5129 : : }
5130 : : }
5131 : : break;
5132 : 12 : case CFN_BUILT_IN_EXP10L:
5133 : 12 : if (gimple_call_num_args (_c1) == 1)
5134 : : {
5135 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5136 : 12 : _q20 = do_valueize (valueize, _q20);
5137 : 12 : {
5138 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5139 : 12 : if (flag_unsafe_math_optimizations
5140 : : )
5141 : : {
5142 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5143 : : )
5144 : : {
5145 : 12 : {
5146 : 12 : tree x;
5147 : 12 : switch (CFN_BUILT_IN_EXP10L)
5148 : : {
5149 : : CASE_CFN_EXP:
5150 : : x = build_real_truncate (type, dconst_e ());
5151 : : break;
5152 : : CASE_CFN_EXP2:
5153 : : x = build_real (type, dconst2);
5154 : : break;
5155 : 12 : CASE_CFN_EXP10:
5156 : 12 : CASE_CFN_POW10:
5157 : 12 : {
5158 : 12 : REAL_VALUE_TYPE dconst10;
5159 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5160 : 12 : x = build_real (type, dconst10);
5161 : : }
5162 : 12 : break;
5163 : : default:
5164 : : gcc_unreachable ();
5165 : : }
5166 : 12 : gimple_seq *lseq = seq;
5167 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1393;
5168 : 12 : {
5169 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5170 : 12 : {
5171 : 12 : tree _o1[1], _r1;
5172 : 12 : _o1[0] = x;
5173 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o1[0]), _o1[0]);
5174 : 12 : tem_op.resimplify (lseq, valueize);
5175 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5176 : 12 : if (!_r1) goto next_after_fail1393;
5177 : 12 : res_op->ops[0] = _r1;
5178 : : }
5179 : 12 : res_op->ops[1] = captures[0];
5180 : 12 : res_op->resimplify (lseq, valueize);
5181 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5182 : 12 : return true;
5183 : : }
5184 : : next_after_fail1393:;
5185 : : }
5186 : : }
5187 : : }
5188 : : }
5189 : : }
5190 : : break;
5191 : 12 : case CFN_BUILT_IN_EXPL:
5192 : 12 : if (gimple_call_num_args (_c1) == 1)
5193 : : {
5194 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5195 : 12 : _q20 = do_valueize (valueize, _q20);
5196 : 12 : {
5197 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5198 : 12 : if (flag_unsafe_math_optimizations
5199 : : )
5200 : : {
5201 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5202 : : )
5203 : : {
5204 : 12 : {
5205 : 12 : tree x;
5206 : 12 : switch (CFN_BUILT_IN_EXPL)
5207 : : {
5208 : 12 : CASE_CFN_EXP:
5209 : 12 : x = build_real_truncate (type, dconst_e ());
5210 : 12 : break;
5211 : : CASE_CFN_EXP2:
5212 : : x = build_real (type, dconst2);
5213 : : break;
5214 : : CASE_CFN_EXP10:
5215 : : CASE_CFN_POW10:
5216 : : {
5217 : : REAL_VALUE_TYPE dconst10;
5218 : : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5219 : : x = build_real (type, dconst10);
5220 : : }
5221 : : break;
5222 : : default:
5223 : : gcc_unreachable ();
5224 : : }
5225 : 12 : gimple_seq *lseq = seq;
5226 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1394;
5227 : 12 : {
5228 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5229 : 12 : {
5230 : 12 : tree _o1[1], _r1;
5231 : 12 : _o1[0] = x;
5232 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o1[0]), _o1[0]);
5233 : 12 : tem_op.resimplify (lseq, valueize);
5234 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5235 : 12 : if (!_r1) goto next_after_fail1394;
5236 : 12 : res_op->ops[0] = _r1;
5237 : : }
5238 : 12 : res_op->ops[1] = captures[0];
5239 : 12 : res_op->resimplify (lseq, valueize);
5240 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5241 : 12 : return true;
5242 : : }
5243 : : next_after_fail1394:;
5244 : : }
5245 : : }
5246 : : }
5247 : : }
5248 : : }
5249 : : break;
5250 : 12 : case CFN_BUILT_IN_POWL:
5251 : 12 : if (gimple_call_num_args (_c1) == 2)
5252 : : {
5253 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5254 : 12 : _q20 = do_valueize (valueize, _q20);
5255 : 12 : tree _q21 = gimple_call_arg (_c1, 1);
5256 : 12 : _q21 = do_valueize (valueize, _q21);
5257 : 12 : {
5258 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
5259 : 12 : if (gimple_simplify_599 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LOG2L, CFN_BUILT_IN_POWL))
5260 : 6 : return true;
5261 : : }
5262 : : }
5263 : : break;
5264 : 12 : case CFN_BUILT_IN_POW10L:
5265 : 12 : if (gimple_call_num_args (_c1) == 1)
5266 : : {
5267 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5268 : 12 : _q20 = do_valueize (valueize, _q20);
5269 : 12 : {
5270 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5271 : 12 : if (flag_unsafe_math_optimizations
5272 : : )
5273 : : {
5274 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5275 : : )
5276 : : {
5277 : 12 : {
5278 : 12 : tree x;
5279 : 12 : switch (CFN_BUILT_IN_POW10L)
5280 : : {
5281 : : CASE_CFN_EXP:
5282 : : x = build_real_truncate (type, dconst_e ());
5283 : : break;
5284 : : CASE_CFN_EXP2:
5285 : : x = build_real (type, dconst2);
5286 : : break;
5287 : 12 : CASE_CFN_EXP10:
5288 : 12 : CASE_CFN_POW10:
5289 : 12 : {
5290 : 12 : REAL_VALUE_TYPE dconst10;
5291 : 12 : real_from_integer (&dconst10, VOIDmode, 10, SIGNED);
5292 : 12 : x = build_real (type, dconst10);
5293 : : }
5294 : 12 : break;
5295 : : default:
5296 : : gcc_unreachable ();
5297 : : }
5298 : 12 : gimple_seq *lseq = seq;
5299 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1395;
5300 : 12 : {
5301 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5302 : 12 : {
5303 : 12 : tree _o1[1], _r1;
5304 : 12 : _o1[0] = x;
5305 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o1[0]), _o1[0]);
5306 : 12 : tem_op.resimplify (lseq, valueize);
5307 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5308 : 12 : if (!_r1) goto next_after_fail1395;
5309 : 12 : res_op->ops[0] = _r1;
5310 : : }
5311 : 12 : res_op->ops[1] = captures[0];
5312 : 12 : res_op->resimplify (lseq, valueize);
5313 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 904, __FILE__, __LINE__, true);
5314 : 12 : return true;
5315 : : }
5316 : : next_after_fail1395:;
5317 : : }
5318 : : }
5319 : : }
5320 : : }
5321 : : }
5322 : : break;
5323 : 12 : case CFN_BUILT_IN_CBRTL:
5324 : 12 : if (gimple_call_num_args (_c1) == 1)
5325 : : {
5326 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5327 : 12 : _q20 = do_valueize (valueize, _q20);
5328 : 12 : {
5329 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5330 : 12 : if (flag_unsafe_math_optimizations
5331 : : )
5332 : : {
5333 : 12 : if (SCALAR_FLOAT_TYPE_P (type)
5334 : : )
5335 : : {
5336 : 12 : {
5337 : 12 : tree x;
5338 : 12 : switch (CFN_BUILT_IN_CBRTL)
5339 : : {
5340 : : CASE_CFN_SQRT:
5341 : : x = build_real (type, dconsthalf);
5342 : : break;
5343 : 12 : CASE_CFN_CBRT:
5344 : 12 : x = build_real_truncate (type, dconst_third ());
5345 : 12 : break;
5346 : : default:
5347 : : gcc_unreachable ();
5348 : : }
5349 : 12 : gimple_seq *lseq = seq;
5350 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1396;
5351 : 12 : {
5352 : 12 : res_op->set_op (MULT_EXPR, type, 2);
5353 : 12 : res_op->ops[0] = x;
5354 : 12 : {
5355 : 12 : tree _o1[1], _r1;
5356 : 12 : _o1[0] = captures[0];
5357 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_LOG2L, TREE_TYPE (_o1[0]), _o1[0]);
5358 : 12 : tem_op.resimplify (lseq, valueize);
5359 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
5360 : 12 : if (!_r1) goto next_after_fail1396;
5361 : 6 : res_op->ops[1] = _r1;
5362 : : }
5363 : 6 : res_op->resimplify (lseq, valueize);
5364 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 903, __FILE__, __LINE__, true);
5365 : 6 : return true;
5366 : : }
5367 : : next_after_fail1396:;
5368 : : }
5369 : : }
5370 : : }
5371 : : }
5372 : : }
5373 : : break;
5374 : 12 : case CFN_BUILT_IN_EXP2L:
5375 : 12 : if (gimple_call_num_args (_c1) == 1)
5376 : : {
5377 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5378 : 12 : _q20 = do_valueize (valueize, _q20);
5379 : 12 : {
5380 : 12 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5381 : 12 : if (flag_unsafe_math_optimizations
5382 : : )
5383 : : {
5384 : 12 : gimple_seq *lseq = seq;
5385 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1397;
5386 : 12 : {
5387 : 12 : tree tem;
5388 : 12 : tem = captures[0];
5389 : 12 : res_op->set_value (tem);
5390 : 12 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 905, __FILE__, __LINE__, true);
5391 : 12 : return true;
5392 : : }
5393 : 0 : next_after_fail1397:;
5394 : : }
5395 : : }
5396 : : }
5397 : : break;
5398 : : default:;
5399 : : }
5400 : : }
5401 : : break;
5402 : : default:;
5403 : : }
5404 : : return false;
5405 : : }
5406 : :
5407 : : bool
5408 : 1326 : gimple_simplify_CFN_BUILT_IN_EXP2L (gimple_match_op *res_op, gimple_seq *seq,
5409 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5410 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5411 : : {
5412 : 1326 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5413 : 1326 : switch (TREE_CODE (_p0))
5414 : : {
5415 : 347 : case SSA_NAME:
5416 : 347 : if (gimple *_d1 = get_def (valueize, _p0))
5417 : : {
5418 : 235 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5419 : 6 : switch (gimple_call_combined_fn (_c1))
5420 : : {
5421 : 6 : case CFN_BUILT_IN_LOG2L:
5422 : 6 : if (gimple_call_num_args (_c1) == 1)
5423 : : {
5424 : 6 : tree _q20 = gimple_call_arg (_c1, 0);
5425 : 6 : _q20 = do_valueize (valueize, _q20);
5426 : 6 : {
5427 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5428 : 6 : if (flag_unsafe_math_optimizations
5429 : : )
5430 : : {
5431 : 6 : gimple_seq *lseq = seq;
5432 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1430;
5433 : 6 : {
5434 : 6 : tree tem;
5435 : 6 : tem = captures[0];
5436 : 6 : res_op->set_value (tem);
5437 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 906, __FILE__, __LINE__, true);
5438 : 6 : return true;
5439 : : }
5440 : 0 : next_after_fail1430:;
5441 : : }
5442 : : }
5443 : : }
5444 : : break;
5445 : : default:;
5446 : : }
5447 : : }
5448 : : break;
5449 : : default:;
5450 : : }
5451 : : return false;
5452 : : }
5453 : :
5454 : : bool
5455 : 535 : gimple_simplify_CFN_BUILT_IN_POW10L (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 : 535 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5460 : 535 : switch (TREE_CODE (_p0))
5461 : : {
5462 : 455 : case SSA_NAME:
5463 : 455 : if (gimple *_d1 = get_def (valueize, _p0))
5464 : : {
5465 : 319 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5466 : 6 : switch (gimple_call_combined_fn (_c1))
5467 : : {
5468 : 6 : case CFN_BUILT_IN_LOG10L:
5469 : 6 : if (gimple_call_num_args (_c1) == 1)
5470 : : {
5471 : 6 : tree _q20 = gimple_call_arg (_c1, 0);
5472 : 6 : _q20 = do_valueize (valueize, _q20);
5473 : 6 : {
5474 : 6 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5475 : 6 : if (flag_unsafe_math_optimizations
5476 : : )
5477 : : {
5478 : 6 : gimple_seq *lseq = seq;
5479 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1438;
5480 : 6 : {
5481 : 6 : tree tem;
5482 : 6 : tem = captures[0];
5483 : 6 : res_op->set_value (tem);
5484 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 906, __FILE__, __LINE__, true);
5485 : 6 : return true;
5486 : : }
5487 : 0 : next_after_fail1438:;
5488 : : }
5489 : : }
5490 : : }
5491 : : break;
5492 : : default:;
5493 : : }
5494 : : }
5495 : : break;
5496 : : default:;
5497 : : }
5498 : : return false;
5499 : : }
5500 : :
5501 : : bool
5502 : 966 : gimple_simplify_CFN_BUILT_IN_TANF (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 : 966 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5507 : 966 : switch (TREE_CODE (_p0))
5508 : : {
5509 : 926 : case SSA_NAME:
5510 : 926 : if (gimple *_d1 = get_def (valueize, _p0))
5511 : : {
5512 : 576 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5513 : 56 : switch (gimple_call_combined_fn (_c1))
5514 : : {
5515 : 2 : case CFN_BUILT_IN_ATANF:
5516 : 2 : if (gimple_call_num_args (_c1) == 1)
5517 : : {
5518 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
5519 : 2 : _q20 = do_valueize (valueize, _q20);
5520 : 2 : {
5521 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5522 : 2 : if (gimple_simplify_600 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANF, CFN_BUILT_IN_ATANF))
5523 : 2 : return true;
5524 : : }
5525 : : }
5526 : : break;
5527 : : default:;
5528 : : }
5529 : : }
5530 : : break;
5531 : : default:;
5532 : : }
5533 : : return false;
5534 : : }
5535 : :
5536 : : bool
5537 : 1075 : gimple_simplify_CFN_BUILT_IN_TAN (gimple_match_op *res_op, gimple_seq *seq,
5538 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5539 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5540 : : {
5541 : 1075 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5542 : 1075 : switch (TREE_CODE (_p0))
5543 : : {
5544 : 1020 : case SSA_NAME:
5545 : 1020 : if (gimple *_d1 = get_def (valueize, _p0))
5546 : : {
5547 : 599 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5548 : 62 : switch (gimple_call_combined_fn (_c1))
5549 : : {
5550 : 8 : case CFN_BUILT_IN_ATAN:
5551 : 8 : if (gimple_call_num_args (_c1) == 1)
5552 : : {
5553 : 8 : tree _q20 = gimple_call_arg (_c1, 0);
5554 : 8 : _q20 = do_valueize (valueize, _q20);
5555 : 8 : {
5556 : 8 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5557 : 8 : if (gimple_simplify_600 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TAN, CFN_BUILT_IN_ATAN))
5558 : 8 : return true;
5559 : : }
5560 : : }
5561 : : break;
5562 : : default:;
5563 : : }
5564 : : }
5565 : : break;
5566 : : default:;
5567 : : }
5568 : : return false;
5569 : : }
5570 : :
5571 : : bool
5572 : 1160 : gimple_simplify_CFN_BUILT_IN_TANL (gimple_match_op *res_op, gimple_seq *seq,
5573 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5574 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5575 : : {
5576 : 1160 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5577 : 1160 : switch (TREE_CODE (_p0))
5578 : : {
5579 : 1117 : case SSA_NAME:
5580 : 1117 : if (gimple *_d1 = get_def (valueize, _p0))
5581 : : {
5582 : 615 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5583 : 50 : switch (gimple_call_combined_fn (_c1))
5584 : : {
5585 : 2 : case CFN_BUILT_IN_ATANL:
5586 : 2 : if (gimple_call_num_args (_c1) == 1)
5587 : : {
5588 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
5589 : 2 : _q20 = do_valueize (valueize, _q20);
5590 : 2 : {
5591 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5592 : 2 : if (gimple_simplify_600 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TANL, CFN_BUILT_IN_ATANL))
5593 : 2 : return true;
5594 : : }
5595 : : }
5596 : : break;
5597 : : default:;
5598 : : }
5599 : : }
5600 : : break;
5601 : : default:;
5602 : : }
5603 : : return false;
5604 : : }
5605 : :
5606 : : bool
5607 : 0 : gimple_simplify_CFN_TAN (gimple_match_op *res_op, gimple_seq *seq,
5608 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5609 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5610 : : {
5611 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5612 : 0 : switch (TREE_CODE (_p0))
5613 : : {
5614 : 0 : case SSA_NAME:
5615 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5616 : : {
5617 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5618 : 0 : switch (gimple_call_combined_fn (_c1))
5619 : : {
5620 : 0 : case CFN_ATAN:
5621 : 0 : if (gimple_call_num_args (_c1) == 1)
5622 : : {
5623 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5624 : 0 : _q20 = do_valueize (valueize, _q20);
5625 : 0 : {
5626 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5627 : 0 : if (gimple_simplify_600 (res_op, seq, valueize, type, captures, CFN_TAN, CFN_ATAN))
5628 : 0 : return true;
5629 : : }
5630 : : }
5631 : : break;
5632 : : default:;
5633 : : }
5634 : : }
5635 : : break;
5636 : : default:;
5637 : : }
5638 : : return false;
5639 : : }
5640 : :
5641 : : bool
5642 : 5555 : gimple_simplify_CFN_BUILT_IN_SINF (gimple_match_op *res_op, gimple_seq *seq,
5643 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5644 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5645 : : {
5646 : 5555 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5647 : 5555 : switch (TREE_CODE (_p0))
5648 : : {
5649 : 5405 : case SSA_NAME:
5650 : 5405 : if (gimple *_d1 = get_def (valueize, _p0))
5651 : : {
5652 : 2926 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5653 : 128 : switch (gimple_call_combined_fn (_c1))
5654 : : {
5655 : 12 : case CFN_BUILT_IN_ATANF:
5656 : 12 : if (gimple_call_num_args (_c1) == 1)
5657 : : {
5658 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
5659 : 12 : _q20 = do_valueize (valueize, _q20);
5660 : 12 : {
5661 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
5662 : 12 : if (gimple_simplify_601 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SINF, CFN_BUILT_IN_ATANF, CFN_BUILT_IN_SQRTF, CFN_BUILT_IN_COPYSIGNF))
5663 : 2 : return true;
5664 : : }
5665 : : }
5666 : : break;
5667 : : default:;
5668 : : }
5669 : : }
5670 : : break;
5671 : : default:;
5672 : : }
5673 : : return false;
5674 : : }
5675 : :
5676 : : bool
5677 : 6805 : gimple_simplify_CFN_BUILT_IN_SIN (gimple_match_op *res_op, gimple_seq *seq,
5678 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5679 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5680 : : {
5681 : 6805 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5682 : 6805 : switch (TREE_CODE (_p0))
5683 : : {
5684 : 6507 : case SSA_NAME:
5685 : 6507 : if (gimple *_d1 = get_def (valueize, _p0))
5686 : : {
5687 : 3536 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5688 : 187 : switch (gimple_call_combined_fn (_c1))
5689 : : {
5690 : 42 : case CFN_BUILT_IN_ATAN:
5691 : 42 : if (gimple_call_num_args (_c1) == 1)
5692 : : {
5693 : 42 : tree _q20 = gimple_call_arg (_c1, 0);
5694 : 42 : _q20 = do_valueize (valueize, _q20);
5695 : 42 : {
5696 : 42 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
5697 : 42 : if (gimple_simplify_601 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SIN, CFN_BUILT_IN_ATAN, CFN_BUILT_IN_SQRT, CFN_BUILT_IN_COPYSIGN))
5698 : 8 : return true;
5699 : : }
5700 : : }
5701 : : break;
5702 : : default:;
5703 : : }
5704 : : }
5705 : : break;
5706 : : default:;
5707 : : }
5708 : : return false;
5709 : : }
5710 : :
5711 : : bool
5712 : 1606 : gimple_simplify_CFN_BUILT_IN_SINHF (gimple_match_op *res_op, gimple_seq *seq,
5713 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5714 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5715 : : {
5716 : 1606 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5717 : 1606 : switch (TREE_CODE (_p0))
5718 : : {
5719 : 1535 : case SSA_NAME:
5720 : 1535 : if (gimple *_d1 = get_def (valueize, _p0))
5721 : : {
5722 : 835 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5723 : 21 : switch (gimple_call_combined_fn (_c1))
5724 : : {
5725 : 21 : case CFN_BUILT_IN_ATANHF:
5726 : 21 : if (gimple_call_num_args (_c1) == 1)
5727 : : {
5728 : 21 : tree _q20 = gimple_call_arg (_c1, 0);
5729 : 21 : _q20 = do_valueize (valueize, _q20);
5730 : 21 : {
5731 : 21 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
5732 : 21 : if (gimple_simplify_602 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_SINHF, CFN_BUILT_IN_ATANHF, CFN_BUILT_IN_SQRTF))
5733 : 1 : return true;
5734 : : }
5735 : : }
5736 : : break;
5737 : : default:;
5738 : : }
5739 : : }
5740 : : break;
5741 : : default:;
5742 : : }
5743 : : return false;
5744 : : }
5745 : :
5746 : : bool
5747 : 3426 : gimple_simplify_CFN_BUILT_IN_TRUNCF (gimple_match_op *res_op, gimple_seq *seq,
5748 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5749 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5750 : : {
5751 : 3426 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5752 : 3426 : switch (TREE_CODE (_p0))
5753 : : {
5754 : 3359 : case SSA_NAME:
5755 : 3359 : if (gimple *_d1 = get_def (valueize, _p0))
5756 : : {
5757 : 1804 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5758 : 0 : switch (gimple_call_combined_fn (_c1))
5759 : : {
5760 : 0 : case CFN_BUILT_IN_TRUNCF:
5761 : 0 : if (gimple_call_num_args (_c1) == 1)
5762 : : {
5763 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5764 : 0 : _q20 = do_valueize (valueize, _q20);
5765 : 0 : {
5766 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5767 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF))
5768 : 0 : return true;
5769 : : }
5770 : : }
5771 : : break;
5772 : : default:;
5773 : : }
5774 : : }
5775 : : break;
5776 : 3426 : default:;
5777 : : }
5778 : 3426 : if (integer_valued_real_p (_p0))
5779 : : {
5780 : 10 : {
5781 : 10 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5782 : 10 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF))
5783 : 10 : return true;
5784 : : }
5785 : : }
5786 : : return false;
5787 : : }
5788 : :
5789 : : bool
5790 : 0 : gimple_simplify_CFN_BUILT_IN_TRUNCF128X (gimple_match_op *res_op, gimple_seq *seq,
5791 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5792 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5793 : : {
5794 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5795 : 0 : switch (TREE_CODE (_p0))
5796 : : {
5797 : 0 : case SSA_NAME:
5798 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5799 : : {
5800 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5801 : 0 : switch (gimple_call_combined_fn (_c1))
5802 : : {
5803 : 0 : case CFN_BUILT_IN_TRUNCF128X:
5804 : 0 : if (gimple_call_num_args (_c1) == 1)
5805 : : {
5806 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5807 : 0 : _q20 = do_valueize (valueize, _q20);
5808 : 0 : {
5809 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5810 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF128X))
5811 : 0 : return true;
5812 : : }
5813 : : }
5814 : : break;
5815 : : default:;
5816 : : }
5817 : : }
5818 : : break;
5819 : 0 : default:;
5820 : : }
5821 : 0 : if (integer_valued_real_p (_p0))
5822 : : {
5823 : 0 : {
5824 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5825 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_TRUNCF128X))
5826 : 0 : return true;
5827 : : }
5828 : : }
5829 : : return false;
5830 : : }
5831 : :
5832 : : bool
5833 : 0 : gimple_simplify_CFN_BUILT_IN_FLOORF32X (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_FLOORF32X:
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_FLOORF32X))
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_FLOORF32X))
5869 : 0 : return true;
5870 : : }
5871 : : }
5872 : 0 : if (tree_expr_nonnegative_p (_p0))
5873 : : {
5874 : 0 : {
5875 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5876 : 0 : if (gimple_simplify_607 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FLOORF32X, CFN_BUILT_IN_TRUNCF32X))
5877 : 0 : return true;
5878 : : }
5879 : : }
5880 : : return false;
5881 : : }
5882 : :
5883 : : bool
5884 : 0 : gimple_simplify_CFN_BUILT_IN_CEILF32 (gimple_match_op *res_op, gimple_seq *seq,
5885 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5886 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5887 : : {
5888 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5889 : 0 : switch (TREE_CODE (_p0))
5890 : : {
5891 : 0 : case SSA_NAME:
5892 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5893 : : {
5894 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5895 : 0 : switch (gimple_call_combined_fn (_c1))
5896 : : {
5897 : 0 : case CFN_BUILT_IN_CEILF32:
5898 : 0 : if (gimple_call_num_args (_c1) == 1)
5899 : : {
5900 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5901 : 0 : _q20 = do_valueize (valueize, _q20);
5902 : 0 : {
5903 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5904 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEILF32))
5905 : 0 : return true;
5906 : : }
5907 : : }
5908 : : break;
5909 : : default:;
5910 : : }
5911 : : }
5912 : : break;
5913 : 0 : default:;
5914 : : }
5915 : 0 : if (integer_valued_real_p (_p0))
5916 : : {
5917 : 0 : {
5918 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5919 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_CEILF32))
5920 : 0 : return true;
5921 : : }
5922 : : }
5923 : : return false;
5924 : : }
5925 : :
5926 : : bool
5927 : 1789 : gimple_simplify_CFN_BUILT_IN_ROUNDF (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 : 1789 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5932 : 1789 : switch (TREE_CODE (_p0))
5933 : : {
5934 : 1723 : case SSA_NAME:
5935 : 1723 : if (gimple *_d1 = get_def (valueize, _p0))
5936 : : {
5937 : 1073 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5938 : 0 : switch (gimple_call_combined_fn (_c1))
5939 : : {
5940 : 0 : case CFN_BUILT_IN_ROUNDF:
5941 : 0 : if (gimple_call_num_args (_c1) == 1)
5942 : : {
5943 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5944 : 0 : _q20 = do_valueize (valueize, _q20);
5945 : 0 : {
5946 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5947 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF))
5948 : 0 : return true;
5949 : : }
5950 : : }
5951 : : break;
5952 : : default:;
5953 : : }
5954 : : }
5955 : : break;
5956 : 1789 : default:;
5957 : : }
5958 : 1789 : if (integer_valued_real_p (_p0))
5959 : : {
5960 : 7 : {
5961 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
5962 : 7 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF))
5963 : 7 : return true;
5964 : : }
5965 : : }
5966 : : return false;
5967 : : }
5968 : :
5969 : : bool
5970 : 0 : gimple_simplify_CFN_BUILT_IN_ROUNDF128X (gimple_match_op *res_op, gimple_seq *seq,
5971 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
5972 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
5973 : : {
5974 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
5975 : 0 : switch (TREE_CODE (_p0))
5976 : : {
5977 : 0 : case SSA_NAME:
5978 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
5979 : : {
5980 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
5981 : 0 : switch (gimple_call_combined_fn (_c1))
5982 : : {
5983 : 0 : case CFN_BUILT_IN_ROUNDF128X:
5984 : 0 : if (gimple_call_num_args (_c1) == 1)
5985 : : {
5986 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
5987 : 0 : _q20 = do_valueize (valueize, _q20);
5988 : 0 : {
5989 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
5990 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF128X))
5991 : 0 : return true;
5992 : : }
5993 : : }
5994 : : break;
5995 : : default:;
5996 : : }
5997 : : }
5998 : : break;
5999 : 0 : default:;
6000 : : }
6001 : 0 : if (integer_valued_real_p (_p0))
6002 : : {
6003 : 0 : {
6004 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6005 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ROUNDF128X))
6006 : 0 : return true;
6007 : : }
6008 : : }
6009 : : return false;
6010 : : }
6011 : :
6012 : : bool
6013 : 0 : gimple_simplify_CFN_BUILT_IN_NEARBYINTF32X (gimple_match_op *res_op, gimple_seq *seq,
6014 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6015 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6016 : : {
6017 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6018 : 0 : switch (TREE_CODE (_p0))
6019 : : {
6020 : 0 : case SSA_NAME:
6021 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
6022 : : {
6023 : 0 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6024 : 0 : switch (gimple_call_combined_fn (_c1))
6025 : : {
6026 : 0 : case CFN_BUILT_IN_NEARBYINTF32X:
6027 : 0 : if (gimple_call_num_args (_c1) == 1)
6028 : : {
6029 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6030 : 0 : _q20 = do_valueize (valueize, _q20);
6031 : 0 : {
6032 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6033 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTF32X))
6034 : 0 : return true;
6035 : : }
6036 : : }
6037 : : break;
6038 : : default:;
6039 : : }
6040 : : }
6041 : : break;
6042 : 0 : default:;
6043 : : }
6044 : 0 : if (integer_valued_real_p (_p0))
6045 : : {
6046 : 0 : {
6047 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6048 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_NEARBYINTF32X))
6049 : 0 : return true;
6050 : : }
6051 : : }
6052 : : return false;
6053 : : }
6054 : :
6055 : : bool
6056 : 154 : gimple_simplify_CFN_BUILT_IN_RINTF16 (gimple_match_op *res_op, gimple_seq *seq,
6057 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6058 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6059 : : {
6060 : 154 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6061 : 154 : switch (TREE_CODE (_p0))
6062 : : {
6063 : 152 : case SSA_NAME:
6064 : 152 : if (gimple *_d1 = get_def (valueize, _p0))
6065 : : {
6066 : 100 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6067 : 0 : switch (gimple_call_combined_fn (_c1))
6068 : : {
6069 : 0 : case CFN_BUILT_IN_RINTF16:
6070 : 0 : if (gimple_call_num_args (_c1) == 1)
6071 : : {
6072 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6073 : 0 : _q20 = do_valueize (valueize, _q20);
6074 : 0 : {
6075 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6076 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF16))
6077 : 0 : return true;
6078 : : }
6079 : : }
6080 : : break;
6081 : : default:;
6082 : : }
6083 : : }
6084 : : break;
6085 : 154 : default:;
6086 : : }
6087 : 154 : if (integer_valued_real_p (_p0))
6088 : : {
6089 : 0 : {
6090 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6091 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_RINTF16))
6092 : 0 : return true;
6093 : : }
6094 : : }
6095 : : return false;
6096 : : }
6097 : :
6098 : : bool
6099 : 235 : gimple_simplify_CFN_RINT (gimple_match_op *res_op, gimple_seq *seq,
6100 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6101 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6102 : : {
6103 : 235 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6104 : 235 : switch (TREE_CODE (_p0))
6105 : : {
6106 : 235 : case SSA_NAME:
6107 : 235 : if (gimple *_d1 = get_def (valueize, _p0))
6108 : : {
6109 : 135 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6110 : 0 : switch (gimple_call_combined_fn (_c1))
6111 : : {
6112 : 0 : case CFN_RINT:
6113 : 0 : if (gimple_call_num_args (_c1) == 1)
6114 : : {
6115 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6116 : 0 : _q20 = do_valueize (valueize, _q20);
6117 : 0 : {
6118 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6119 : 0 : if (gimple_simplify_603 (res_op, seq, valueize, type, captures, CFN_RINT))
6120 : 0 : return true;
6121 : : }
6122 : : }
6123 : : break;
6124 : : default:;
6125 : : }
6126 : : }
6127 : : break;
6128 : 235 : default:;
6129 : : }
6130 : 235 : if (integer_valued_real_p (_p0))
6131 : : {
6132 : 0 : {
6133 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6134 : 0 : if (gimple_simplify_604 (res_op, seq, valueize, type, captures, CFN_RINT))
6135 : 0 : return true;
6136 : : }
6137 : : }
6138 : : return false;
6139 : : }
6140 : :
6141 : : bool
6142 : 130 : gimple_simplify_CFN_BUILT_IN_LLCEILL (gimple_match_op *res_op, gimple_seq *seq,
6143 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6144 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6145 : : {
6146 : 130 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6147 : 130 : switch (TREE_CODE (_p0))
6148 : : {
6149 : 98 : case SSA_NAME:
6150 : 98 : if (gimple *_d1 = get_def (valueize, _p0))
6151 : : {
6152 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6153 : 0 : switch (gimple_assign_rhs_code (_a1))
6154 : : {
6155 : 0 : CASE_CONVERT:
6156 : 0 : {
6157 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6158 : 0 : _q20 = do_valueize (valueize, _q20);
6159 : 0 : if (gimple_double_value_p (_q20, valueize))
6160 : : {
6161 : 0 : {
6162 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6163 : 0 : if (gimple_simplify_610 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLCEILL, CFN_BUILT_IN_LLCEIL))
6164 : 0 : return true;
6165 : : }
6166 : : }
6167 : 0 : if (gimple_float_value_p (_q20, valueize))
6168 : : {
6169 : 0 : {
6170 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6171 : 0 : if (gimple_simplify_611 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLCEILL, CFN_BUILT_IN_LLCEILF))
6172 : 0 : return true;
6173 : : }
6174 : : }
6175 : : break;
6176 : : }
6177 : : default:;
6178 : : }
6179 : : }
6180 : : break;
6181 : 130 : default:;
6182 : : }
6183 : 130 : if (integer_valued_real_p (_p0))
6184 : : {
6185 : 20 : {
6186 : 20 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6187 : 20 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLCEILL))
6188 : 20 : return true;
6189 : : }
6190 : : }
6191 : 110 : {
6192 : 110 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6193 : 110 : if (gimple_simplify_615 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_ICEILL, CFN_BUILT_IN_LCEILL, CFN_BUILT_IN_LLCEILL))
6194 : 110 : return true;
6195 : : }
6196 : 0 : return false;
6197 : : }
6198 : :
6199 : : bool
6200 : 270 : gimple_simplify_CFN_BUILT_IN_LLRINTL (gimple_match_op *res_op, gimple_seq *seq,
6201 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6202 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6203 : : {
6204 : 270 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6205 : 270 : switch (TREE_CODE (_p0))
6206 : : {
6207 : 219 : case SSA_NAME:
6208 : 219 : if (gimple *_d1 = get_def (valueize, _p0))
6209 : : {
6210 : 83 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6211 : 0 : switch (gimple_assign_rhs_code (_a1))
6212 : : {
6213 : 0 : CASE_CONVERT:
6214 : 0 : {
6215 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6216 : 0 : _q20 = do_valueize (valueize, _q20);
6217 : 0 : if (gimple_double_value_p (_q20, valueize))
6218 : : {
6219 : 0 : {
6220 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6221 : 0 : if (gimple_simplify_610 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL, CFN_BUILT_IN_LLRINT))
6222 : 0 : return true;
6223 : : }
6224 : : }
6225 : 0 : if (gimple_float_value_p (_q20, valueize))
6226 : : {
6227 : 0 : {
6228 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6229 : 0 : if (gimple_simplify_611 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL, CFN_BUILT_IN_LLRINTF))
6230 : 0 : return true;
6231 : : }
6232 : : }
6233 : : break;
6234 : : }
6235 : : default:;
6236 : : }
6237 : : }
6238 : : break;
6239 : 270 : default:;
6240 : : }
6241 : 270 : if (integer_valued_real_p (_p0))
6242 : : {
6243 : 31 : {
6244 : 31 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6245 : 31 : if (gimple_simplify_616 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLRINTL))
6246 : 20 : return true;
6247 : : }
6248 : : }
6249 : 250 : {
6250 : 250 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6251 : 250 : if (gimple_simplify_615 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IRINTL, CFN_BUILT_IN_LRINTL, CFN_BUILT_IN_LLRINTL))
6252 : 208 : return true;
6253 : : }
6254 : 42 : return false;
6255 : : }
6256 : :
6257 : : bool
6258 : 296 : gimple_simplify_CFN_BUILT_IN_LLROUND (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 : 296 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6263 : 296 : switch (TREE_CODE (_p0))
6264 : : {
6265 : 236 : case SSA_NAME:
6266 : 236 : if (gimple *_d1 = get_def (valueize, _p0))
6267 : : {
6268 : 108 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6269 : 44 : 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_LLROUND, CFN_BUILT_IN_LLROUNDF))
6280 : 0 : return true;
6281 : : }
6282 : : }
6283 : : break;
6284 : : }
6285 : : default:;
6286 : : }
6287 : : }
6288 : : break;
6289 : 296 : default:;
6290 : : }
6291 : 296 : if (integer_valued_real_p (_p0))
6292 : : {
6293 : 21 : {
6294 : 21 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6295 : 21 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLROUND))
6296 : 21 : return true;
6297 : : }
6298 : : }
6299 : 275 : {
6300 : 275 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6301 : 275 : if (gimple_simplify_615 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IROUND, CFN_BUILT_IN_LROUND, CFN_BUILT_IN_LLROUND))
6302 : 217 : return true;
6303 : : }
6304 : 58 : return false;
6305 : : }
6306 : :
6307 : : bool
6308 : 0 : gimple_simplify_CFN_LLFLOOR (gimple_match_op *res_op, gimple_seq *seq,
6309 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6310 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6311 : : {
6312 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6313 : 0 : if (tree_expr_nonnegative_p (_p0))
6314 : : {
6315 : 0 : {
6316 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6317 : 0 : if (gimple_simplify_612 (res_op, seq, valueize, type, captures, CFN_LLFLOOR))
6318 : 0 : return true;
6319 : : }
6320 : : }
6321 : 0 : if (integer_valued_real_p (_p0))
6322 : : {
6323 : 0 : {
6324 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6325 : 0 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_LLFLOOR))
6326 : 0 : return true;
6327 : : }
6328 : : }
6329 : 0 : {
6330 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6331 : 0 : if (gimple_simplify_615 (res_op, seq, valueize, type, captures, CFN_IFLOOR, CFN_LFLOOR, CFN_LLFLOOR))
6332 : 0 : return true;
6333 : : }
6334 : 0 : return false;
6335 : : }
6336 : :
6337 : : bool
6338 : 422 : gimple_simplify_CFN_BUILT_IN_LLROUNDF (gimple_match_op *res_op, gimple_seq *seq,
6339 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6340 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6341 : : {
6342 : 422 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6343 : 422 : if (integer_valued_real_p (_p0))
6344 : : {
6345 : 21 : {
6346 : 21 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6347 : 21 : if (gimple_simplify_613 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_LLROUNDF))
6348 : 21 : return true;
6349 : : }
6350 : : }
6351 : 401 : {
6352 : 401 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6353 : 401 : if (gimple_simplify_615 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_IROUNDF, CFN_BUILT_IN_LROUNDF, CFN_BUILT_IN_LLROUNDF))
6354 : 313 : return true;
6355 : : }
6356 : 88 : return false;
6357 : : }
6358 : :
6359 : : bool
6360 : 891 : gimple_simplify_CFN_BUILT_IN_CPROJ (gimple_match_op *res_op, gimple_seq *seq,
6361 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6362 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6363 : : {
6364 : 891 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6365 : 891 : {
6366 : 891 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6367 : 891 : if (!HONOR_INFINITIES (type)
6368 : : )
6369 : : {
6370 : 21 : gimple_seq *lseq = seq;
6371 : 21 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1492;
6372 : 21 : {
6373 : 21 : tree tem;
6374 : 21 : tem = captures[0];
6375 : 21 : res_op->set_value (tem);
6376 : 21 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 916, __FILE__, __LINE__, true);
6377 : 21 : return true;
6378 : : }
6379 : 0 : next_after_fail1492:;
6380 : : }
6381 : : }
6382 : 870 : switch (TREE_CODE (_p0))
6383 : : {
6384 : 813 : case SSA_NAME:
6385 : 813 : if (gimple *_d1 = get_def (valueize, _p0))
6386 : : {
6387 : 474 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6388 : 656 : switch (gimple_assign_rhs_code (_a1))
6389 : : {
6390 : 280 : case COMPLEX_EXPR:
6391 : 280 : {
6392 : 280 : tree _q20 = gimple_assign_rhs1 (_a1);
6393 : 280 : _q20 = do_valueize (valueize, _q20);
6394 : 280 : tree _q21 = gimple_assign_rhs2 (_a1);
6395 : 280 : _q21 = do_valueize (valueize, _q21);
6396 : 280 : switch (TREE_CODE (_q20))
6397 : : {
6398 : 56 : case REAL_CST:
6399 : 56 : {
6400 : 56 : if (tree_expr_nonnegative_p (_q21))
6401 : : {
6402 : 56 : {
6403 : 56 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6404 : 56 : if (real_isinf (TREE_REAL_CST_PTR (captures[0]))
6405 : : )
6406 : : {
6407 : 56 : gimple_seq *lseq = seq;
6408 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1493;
6409 : 56 : {
6410 : 56 : tree tem;
6411 : 56 : tem = build_complex_inf (type, false);
6412 : 56 : res_op->set_value (tem);
6413 : 56 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 917, __FILE__, __LINE__, true);
6414 : 56 : return true;
6415 : : }
6416 : 0 : next_after_fail1493:;
6417 : : }
6418 : : }
6419 : : }
6420 : : break;
6421 : : }
6422 : 224 : default:;
6423 : : }
6424 : 224 : switch (TREE_CODE (_q21))
6425 : : {
6426 : 224 : case REAL_CST:
6427 : 224 : {
6428 : 224 : {
6429 : 224 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6430 : 224 : if (real_isinf (TREE_REAL_CST_PTR (captures[1]))
6431 : : )
6432 : : {
6433 : 224 : gimple_seq *lseq = seq;
6434 : 224 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1494;
6435 : 224 : {
6436 : 224 : tree tem;
6437 : 224 : tem = build_complex_inf (type, TREE_REAL_CST_PTR (captures[1])->sign);
6438 : 224 : res_op->set_value (tem);
6439 : 224 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 918, __FILE__, __LINE__, true);
6440 : 224 : return true;
6441 : : }
6442 : 0 : next_after_fail1494:;
6443 : : }
6444 : : }
6445 : 0 : break;
6446 : : }
6447 : : default:;
6448 : : }
6449 : : break;
6450 : : }
6451 : : default:;
6452 : : }
6453 : : }
6454 : : break;
6455 : : default:;
6456 : : }
6457 : : return false;
6458 : : }
6459 : :
6460 : : bool
6461 : 639 : gimple_simplify_CFN_BUILT_IN_PARITYLL (gimple_match_op *res_op, gimple_seq *seq,
6462 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6463 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6464 : : {
6465 : 639 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6466 : 639 : switch (TREE_CODE (_p0))
6467 : : {
6468 : 627 : case SSA_NAME:
6469 : 627 : if (gimple *_d1 = get_def (valueize, _p0))
6470 : : {
6471 : 348 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6472 : 327 : switch (gimple_assign_rhs_code (_a1))
6473 : : {
6474 : 2 : case BIT_NOT_EXPR:
6475 : 2 : {
6476 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
6477 : 2 : _q20 = do_valueize (valueize, _q20);
6478 : 2 : {
6479 : 2 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
6480 : 2 : if (gimple_simplify_635 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYLL))
6481 : 2 : return true;
6482 : : }
6483 : 0 : break;
6484 : : }
6485 : 64 : CASE_CONVERT:
6486 : 64 : {
6487 : 64 : tree _q20 = gimple_assign_rhs1 (_a1);
6488 : 64 : _q20 = do_valueize (valueize, _q20);
6489 : 64 : switch (TREE_CODE (_q20))
6490 : : {
6491 : 64 : case SSA_NAME:
6492 : 64 : if (gimple *_d2 = get_def (valueize, _q20))
6493 : : {
6494 : 62 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6495 : 24 : switch (gimple_assign_rhs_code (_a2))
6496 : : {
6497 : 0 : case LROTATE_EXPR:
6498 : 0 : {
6499 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
6500 : 0 : _q30 = do_valueize (valueize, _q30);
6501 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
6502 : 0 : _q31 = do_valueize (valueize, _q31);
6503 : 0 : {
6504 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6505 : 0 : if (gimple_simplify_637 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYLL))
6506 : 0 : return true;
6507 : : }
6508 : 0 : break;
6509 : : }
6510 : 0 : case RROTATE_EXPR:
6511 : 0 : {
6512 : 0 : tree _q30 = gimple_assign_rhs1 (_a2);
6513 : 0 : _q30 = do_valueize (valueize, _q30);
6514 : 0 : tree _q31 = gimple_assign_rhs2 (_a2);
6515 : 0 : _q31 = do_valueize (valueize, _q31);
6516 : 0 : {
6517 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q31 };
6518 : 0 : if (gimple_simplify_637 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYLL))
6519 : 0 : return true;
6520 : : }
6521 : 0 : break;
6522 : : }
6523 : : default:;
6524 : : }
6525 : 49 : else if (gcall *_c2 = dyn_cast <gcall *> (_d2))
6526 : 2 : switch (gimple_call_combined_fn (_c2))
6527 : : {
6528 : 0 : case CFN_BUILT_IN_BSWAP128:
6529 : 0 : if (gimple_call_num_args (_c2) == 1)
6530 : : {
6531 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6532 : 0 : _q30 = do_valueize (valueize, _q30);
6533 : 0 : {
6534 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6535 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYLL))
6536 : 0 : return true;
6537 : : }
6538 : : }
6539 : : break;
6540 : 2 : case CFN_BUILT_IN_BSWAP16:
6541 : 2 : if (gimple_call_num_args (_c2) == 1)
6542 : : {
6543 : 2 : tree _q30 = gimple_call_arg (_c2, 0);
6544 : 2 : _q30 = do_valueize (valueize, _q30);
6545 : 2 : {
6546 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6547 : 2 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYLL))
6548 : 1 : return true;
6549 : : }
6550 : : }
6551 : : break;
6552 : 0 : case CFN_BUILT_IN_BSWAP32:
6553 : 0 : if (gimple_call_num_args (_c2) == 1)
6554 : : {
6555 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6556 : 0 : _q30 = do_valueize (valueize, _q30);
6557 : 0 : {
6558 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6559 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYLL))
6560 : 0 : return true;
6561 : : }
6562 : : }
6563 : : break;
6564 : 0 : case CFN_BUILT_IN_BSWAP64:
6565 : 0 : if (gimple_call_num_args (_c2) == 1)
6566 : : {
6567 : 0 : tree _q30 = gimple_call_arg (_c2, 0);
6568 : 0 : _q30 = do_valueize (valueize, _q30);
6569 : 0 : {
6570 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q30 };
6571 : 0 : if (gimple_simplify_636 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYLL))
6572 : 0 : return true;
6573 : : }
6574 : : }
6575 : : break;
6576 : : default:;
6577 : : }
6578 : : }
6579 : : break;
6580 : 63 : default:;
6581 : : }
6582 : 63 : {
6583 : 63 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q20 };
6584 : 63 : if (gimple_simplify_638 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYLL))
6585 : 8 : return true;
6586 : : }
6587 : 55 : break;
6588 : : }
6589 : 0 : case LROTATE_EXPR:
6590 : 0 : {
6591 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
6592 : 0 : _q20 = do_valueize (valueize, _q20);
6593 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
6594 : 0 : _q21 = do_valueize (valueize, _q21);
6595 : 0 : {
6596 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
6597 : 0 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, LROTATE_EXPR, CFN_BUILT_IN_PARITYLL))
6598 : 0 : return true;
6599 : : }
6600 : 0 : break;
6601 : : }
6602 : 2 : case RROTATE_EXPR:
6603 : 2 : {
6604 : 2 : tree _q20 = gimple_assign_rhs1 (_a1);
6605 : 2 : _q20 = do_valueize (valueize, _q20);
6606 : 2 : tree _q21 = gimple_assign_rhs2 (_a1);
6607 : 2 : _q21 = do_valueize (valueize, _q21);
6608 : 2 : {
6609 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _q21 };
6610 : 2 : if (gimple_simplify_640 (res_op, seq, valueize, type, captures, RROTATE_EXPR, CFN_BUILT_IN_PARITYLL))
6611 : 2 : return true;
6612 : : }
6613 : 0 : break;
6614 : : }
6615 : : default:;
6616 : : }
6617 : 125 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
6618 : 2 : switch (gimple_call_combined_fn (_c1))
6619 : : {
6620 : 0 : case CFN_BUILT_IN_BSWAP128:
6621 : 0 : if (gimple_call_num_args (_c1) == 1)
6622 : : {
6623 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6624 : 0 : _q20 = do_valueize (valueize, _q20);
6625 : 0 : {
6626 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6627 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP128, CFN_BUILT_IN_PARITYLL))
6628 : 0 : return true;
6629 : : }
6630 : : }
6631 : : break;
6632 : 0 : case CFN_BUILT_IN_BSWAP16:
6633 : 0 : if (gimple_call_num_args (_c1) == 1)
6634 : : {
6635 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6636 : 0 : _q20 = do_valueize (valueize, _q20);
6637 : 0 : {
6638 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6639 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP16, CFN_BUILT_IN_PARITYLL))
6640 : 0 : return true;
6641 : : }
6642 : : }
6643 : : break;
6644 : 0 : case CFN_BUILT_IN_BSWAP32:
6645 : 0 : if (gimple_call_num_args (_c1) == 1)
6646 : : {
6647 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
6648 : 0 : _q20 = do_valueize (valueize, _q20);
6649 : 0 : {
6650 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6651 : 0 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP32, CFN_BUILT_IN_PARITYLL))
6652 : 0 : return true;
6653 : : }
6654 : : }
6655 : : break;
6656 : 2 : case CFN_BUILT_IN_BSWAP64:
6657 : 2 : if (gimple_call_num_args (_c1) == 1)
6658 : : {
6659 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
6660 : 2 : _q20 = do_valueize (valueize, _q20);
6661 : 2 : {
6662 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p0, _q20 };
6663 : 2 : if (gimple_simplify_639 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_BSWAP64, CFN_BUILT_IN_PARITYLL))
6664 : 2 : return true;
6665 : : }
6666 : : }
6667 : : break;
6668 : : default:;
6669 : : }
6670 : : }
6671 : : break;
6672 : 624 : default:;
6673 : : }
6674 : 624 : {
6675 : 624 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6676 : 624 : if (gimple_simplify_634 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYLL))
6677 : 3 : return true;
6678 : : }
6679 : 621 : return false;
6680 : : }
6681 : :
6682 : : bool
6683 : 1088 : gimple_simplify_CFN_REDUC_MIN (gimple_match_op *res_op, gimple_seq *seq,
6684 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6685 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0)
6686 : : {
6687 : 1088 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6688 : 1088 : switch (TREE_CODE (_p0))
6689 : : {
6690 : 1088 : case SSA_NAME:
6691 : 1088 : if (gimple *_d1 = get_def (valueize, _p0))
6692 : : {
6693 : 393 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6694 : 340 : switch (gimple_assign_rhs_code (_a1))
6695 : : {
6696 : 266 : case MIN_EXPR:
6697 : 266 : {
6698 : 266 : tree _q20 = gimple_assign_rhs1 (_a1);
6699 : 266 : _q20 = do_valueize (valueize, _q20);
6700 : 266 : tree _q21 = gimple_assign_rhs2 (_a1);
6701 : 266 : _q21 = do_valueize (valueize, _q21);
6702 : 266 : if (tree_swap_operands_p (_q20, _q21))
6703 : 3 : std::swap (_q20, _q21);
6704 : 266 : switch (TREE_CODE (_q21))
6705 : : {
6706 : 10 : case VECTOR_CST:
6707 : 10 : {
6708 : 10 : {
6709 : 10 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
6710 : 10 : gimple_seq *lseq = seq;
6711 : 10 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1502;
6712 : 10 : {
6713 : 10 : res_op->set_op (MIN_EXPR, type, 2);
6714 : 10 : {
6715 : 10 : tree _o1[1], _r1;
6716 : 10 : _o1[0] = captures[0];
6717 : 10 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_MIN, type, _o1[0]);
6718 : 10 : tem_op.resimplify (lseq, valueize);
6719 : 10 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6720 : 10 : if (!_r1) goto next_after_fail1502;
6721 : 10 : res_op->ops[0] = _r1;
6722 : : }
6723 : 10 : {
6724 : 10 : tree _o1[1], _r1;
6725 : 10 : _o1[0] = captures[1];
6726 : 10 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_REDUC_MIN, type, _o1[0]);
6727 : 10 : tem_op.resimplify (lseq, valueize);
6728 : 10 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
6729 : 10 : if (!_r1) goto next_after_fail1502;
6730 : 10 : res_op->ops[1] = _r1;
6731 : : }
6732 : 10 : res_op->resimplify (lseq, valueize);
6733 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 919, __FILE__, __LINE__, true);
6734 : 10 : return true;
6735 : : }
6736 : 0 : next_after_fail1502:;
6737 : : }
6738 : 0 : break;
6739 : : }
6740 : : default:;
6741 : : }
6742 : 1088 : break;
6743 : : }
6744 : : default:;
6745 : : }
6746 : : }
6747 : : break;
6748 : : default:;
6749 : : }
6750 : : return false;
6751 : : }
6752 : :
6753 : : bool
6754 : 629662 : gimple_simplify_BIT_XOR_EXPR (gimple_match_op *res_op, gimple_seq *seq,
6755 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
6756 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
6757 : : {
6758 : 629662 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
6759 : 629662 : switch (TREE_CODE (_p0))
6760 : : {
6761 : 621013 : case SSA_NAME:
6762 : 621013 : if (gimple *_d1 = get_def (valueize, _p0))
6763 : : {
6764 : 503041 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6765 : 595646 : switch (gimple_assign_rhs_code (_a1))
6766 : : {
6767 : 18480 : case PLUS_EXPR:
6768 : 18480 : {
6769 : 18480 : tree _q20 = gimple_assign_rhs1 (_a1);
6770 : 18480 : _q20 = do_valueize (valueize, _q20);
6771 : 18480 : tree _q21 = gimple_assign_rhs2 (_a1);
6772 : 18480 : _q21 = do_valueize (valueize, _q21);
6773 : 18480 : if (tree_swap_operands_p (_q20, _q21))
6774 : 1300 : std::swap (_q20, _q21);
6775 : 18480 : switch (TREE_CODE (_q21))
6776 : : {
6777 : 14652 : case SSA_NAME:
6778 : 14652 : if (gimple *_d2 = get_def (valueize, _q21))
6779 : : {
6780 : 14476 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6781 : 14684 : switch (gimple_assign_rhs_code (_a2))
6782 : : {
6783 : 294 : case RSHIFT_EXPR:
6784 : 294 : {
6785 : 294 : tree _q40 = gimple_assign_rhs1 (_a2);
6786 : 294 : _q40 = do_valueize (valueize, _q40);
6787 : 294 : tree _q41 = gimple_assign_rhs2 (_a2);
6788 : 294 : _q41 = do_valueize (valueize, _q41);
6789 : 294 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
6790 : : {
6791 : 34 : switch (TREE_CODE (_q41))
6792 : : {
6793 : 34 : case INTEGER_CST:
6794 : 34 : {
6795 : 34 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
6796 : : {
6797 : 34 : {
6798 : 34 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q41 };
6799 : 34 : if (gimple_simplify_2 (res_op, seq, valueize, type, captures))
6800 : 34 : return true;
6801 : : }
6802 : : }
6803 : : break;
6804 : : }
6805 : : default:;
6806 : : }
6807 : : }
6808 : : break;
6809 : : }
6810 : : default:;
6811 : : }
6812 : : }
6813 : : break;
6814 : 18446 : default:;
6815 : : }
6816 : 18446 : switch (TREE_CODE (_q20))
6817 : : {
6818 : 18446 : case SSA_NAME:
6819 : 18446 : if (gimple *_d2 = get_def (valueize, _q20))
6820 : : {
6821 : 18109 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6822 : 17590 : switch (gimple_assign_rhs_code (_a2))
6823 : : {
6824 : 1231 : case RSHIFT_EXPR:
6825 : 1231 : {
6826 : 1231 : tree _q30 = gimple_assign_rhs1 (_a2);
6827 : 1231 : _q30 = do_valueize (valueize, _q30);
6828 : 1231 : tree _q31 = gimple_assign_rhs2 (_a2);
6829 : 1231 : _q31 = do_valueize (valueize, _q31);
6830 : 1231 : switch (TREE_CODE (_q31))
6831 : : {
6832 : 1231 : case INTEGER_CST:
6833 : 1231 : {
6834 : 1231 : if ((_q21 == _q30 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q30, 0) && types_match (_q21, _q30)))
6835 : : {
6836 : 14 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
6837 : : {
6838 : 14 : {
6839 : 14 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q20, _q31 };
6840 : 14 : if (gimple_simplify_2 (res_op, seq, valueize, type, captures))
6841 : 14 : return true;
6842 : : }
6843 : : }
6844 : : }
6845 : : break;
6846 : : }
6847 : : default:;
6848 : : }
6849 : : break;
6850 : : }
6851 : : default:;
6852 : : }
6853 : : }
6854 : : break;
6855 : : default:;
6856 : : }
6857 : 629614 : break;
6858 : : }
6859 : : default:;
6860 : : }
6861 : : }
6862 : : break;
6863 : 629614 : default:;
6864 : : }
6865 : 629614 : switch (TREE_CODE (_p1))
6866 : : {
6867 : 415753 : case SSA_NAME:
6868 : 415753 : if (gimple *_d1 = get_def (valueize, _p1))
6869 : : {
6870 : 342388 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6871 : 418230 : switch (gimple_assign_rhs_code (_a1))
6872 : : {
6873 : 20679 : case PLUS_EXPR:
6874 : 20679 : {
6875 : 20679 : tree _q30 = gimple_assign_rhs1 (_a1);
6876 : 20679 : _q30 = do_valueize (valueize, _q30);
6877 : 20679 : tree _q31 = gimple_assign_rhs2 (_a1);
6878 : 20679 : _q31 = do_valueize (valueize, _q31);
6879 : 20679 : if (tree_swap_operands_p (_q30, _q31))
6880 : 1491 : std::swap (_q30, _q31);
6881 : 20679 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
6882 : : {
6883 : 150 : switch (TREE_CODE (_q31))
6884 : : {
6885 : 150 : case SSA_NAME:
6886 : 150 : if (gimple *_d2 = get_def (valueize, _q31))
6887 : : {
6888 : 144 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6889 : 144 : switch (gimple_assign_rhs_code (_a2))
6890 : : {
6891 : 0 : case RSHIFT_EXPR:
6892 : 0 : {
6893 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
6894 : 0 : _q60 = do_valueize (valueize, _q60);
6895 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
6896 : 0 : _q61 = do_valueize (valueize, _q61);
6897 : 0 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
6898 : : {
6899 : 0 : switch (TREE_CODE (_q61))
6900 : : {
6901 : 0 : case INTEGER_CST:
6902 : 0 : {
6903 : 0 : {
6904 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q61 };
6905 : 0 : if (gimple_simplify_2 (res_op, seq, valueize, type, captures))
6906 : 0 : return true;
6907 : : }
6908 : 0 : break;
6909 : : }
6910 : : default:;
6911 : : }
6912 : : }
6913 : : break;
6914 : : }
6915 : : default:;
6916 : : }
6917 : : }
6918 : : break;
6919 : : default:;
6920 : : }
6921 : : }
6922 : 20679 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
6923 : : {
6924 : 6570 : switch (TREE_CODE (_q30))
6925 : : {
6926 : 6570 : case SSA_NAME:
6927 : 6570 : if (gimple *_d2 = get_def (valueize, _q30))
6928 : : {
6929 : 6467 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
6930 : 6125 : switch (gimple_assign_rhs_code (_a2))
6931 : : {
6932 : 27 : case RSHIFT_EXPR:
6933 : 27 : {
6934 : 27 : tree _q50 = gimple_assign_rhs1 (_a2);
6935 : 27 : _q50 = do_valueize (valueize, _q50);
6936 : 27 : tree _q51 = gimple_assign_rhs2 (_a2);
6937 : 27 : _q51 = do_valueize (valueize, _q51);
6938 : 27 : switch (TREE_CODE (_q51))
6939 : : {
6940 : 27 : case INTEGER_CST:
6941 : 27 : {
6942 : 27 : if ((_q31 == _q50 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _q50, 0) && types_match (_q31, _q50)))
6943 : : {
6944 : 0 : {
6945 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _p0, _q51 };
6946 : 0 : if (gimple_simplify_2 (res_op, seq, valueize, type, captures))
6947 : 0 : return true;
6948 : : }
6949 : : }
6950 : : break;
6951 : : }
6952 : : default:;
6953 : : }
6954 : : break;
6955 : : }
6956 : : default:;
6957 : : }
6958 : : }
6959 : : break;
6960 : : default:;
6961 : : }
6962 : : }
6963 : 629614 : break;
6964 : : }
6965 : : default:;
6966 : : }
6967 : : }
6968 : : break;
6969 : 629614 : default:;
6970 : : }
6971 : 629614 : if (integer_zerop (_p1))
6972 : : {
6973 : 21379 : {
6974 : 21379 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
6975 : 21379 : gimple_seq *lseq = seq;
6976 : 21379 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1506;
6977 : 21379 : {
6978 : 21379 : tree tem;
6979 : 21379 : tem = captures[0];
6980 : 21379 : res_op->set_value (tem);
6981 : 21379 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 920, __FILE__, __LINE__, true);
6982 : 21379 : return true;
6983 : : }
6984 : 0 : next_after_fail1506:;
6985 : : }
6986 : : }
6987 : 608235 : switch (TREE_CODE (_p0))
6988 : : {
6989 : 599586 : case SSA_NAME:
6990 : 599586 : if (gimple *_d1 = get_def (valueize, _p0))
6991 : : {
6992 : 495002 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
6993 : 586632 : switch (gimple_assign_rhs_code (_a1))
6994 : : {
6995 : 14196 : case LSHIFT_EXPR:
6996 : 14196 : {
6997 : 14196 : tree _q20 = gimple_assign_rhs1 (_a1);
6998 : 14196 : _q20 = do_valueize (valueize, _q20);
6999 : 14196 : tree _q21 = gimple_assign_rhs2 (_a1);
7000 : 14196 : _q21 = do_valueize (valueize, _q21);
7001 : 14196 : switch (TREE_CODE (_p1))
7002 : : {
7003 : 11858 : case SSA_NAME:
7004 : 11858 : if (gimple *_d2 = get_def (valueize, _p1))
7005 : : {
7006 : 11658 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7007 : 11242 : switch (gimple_assign_rhs_code (_a2))
7008 : : {
7009 : 86 : case LSHIFT_EXPR:
7010 : 86 : {
7011 : 86 : tree _q50 = gimple_assign_rhs1 (_a2);
7012 : 86 : _q50 = do_valueize (valueize, _q50);
7013 : 86 : tree _q51 = gimple_assign_rhs2 (_a2);
7014 : 86 : _q51 = do_valueize (valueize, _q51);
7015 : 86 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7016 : : {
7017 : 0 : {
7018 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
7019 : 0 : if (gimple_simplify_3 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7020 : 0 : return true;
7021 : : }
7022 : : }
7023 : : break;
7024 : : }
7025 : : default:;
7026 : : }
7027 : : }
7028 : : break;
7029 : : default:;
7030 : : }
7031 : : break;
7032 : : }
7033 : 20909 : case RSHIFT_EXPR:
7034 : 20909 : {
7035 : 20909 : tree _q20 = gimple_assign_rhs1 (_a1);
7036 : 20909 : _q20 = do_valueize (valueize, _q20);
7037 : 20909 : tree _q21 = gimple_assign_rhs2 (_a1);
7038 : 20909 : _q21 = do_valueize (valueize, _q21);
7039 : 20909 : switch (TREE_CODE (_p1))
7040 : : {
7041 : 19001 : case SSA_NAME:
7042 : 19001 : if (gimple *_d2 = get_def (valueize, _p1))
7043 : : {
7044 : 16998 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7045 : 18330 : switch (gimple_assign_rhs_code (_a2))
7046 : : {
7047 : 1794 : case RSHIFT_EXPR:
7048 : 1794 : {
7049 : 1794 : tree _q50 = gimple_assign_rhs1 (_a2);
7050 : 1794 : _q50 = do_valueize (valueize, _q50);
7051 : 1794 : tree _q51 = gimple_assign_rhs2 (_a2);
7052 : 1794 : _q51 = do_valueize (valueize, _q51);
7053 : 1794 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
7054 : : {
7055 : 9 : {
7056 : 9 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50 };
7057 : 9 : if (gimple_simplify_4 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7058 : 3 : return true;
7059 : : }
7060 : : }
7061 : : break;
7062 : : }
7063 : : default:;
7064 : : }
7065 : : }
7066 : : break;
7067 : : default:;
7068 : : }
7069 : : break;
7070 : : }
7071 : 24443 : case BIT_AND_EXPR:
7072 : 24443 : {
7073 : 24443 : tree _q20 = gimple_assign_rhs1 (_a1);
7074 : 24443 : _q20 = do_valueize (valueize, _q20);
7075 : 24443 : tree _q21 = gimple_assign_rhs2 (_a1);
7076 : 24443 : _q21 = do_valueize (valueize, _q21);
7077 : 24443 : if (tree_swap_operands_p (_q20, _q21))
7078 : 857 : std::swap (_q20, _q21);
7079 : 24443 : switch (TREE_CODE (_p1))
7080 : : {
7081 : 16766 : case SSA_NAME:
7082 : 16766 : if (gimple *_d2 = get_def (valueize, _p1))
7083 : : {
7084 : 14522 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7085 : 16387 : switch (gimple_assign_rhs_code (_a2))
7086 : : {
7087 : 1396 : case BIT_AND_EXPR:
7088 : 1396 : {
7089 : 1396 : tree _q50 = gimple_assign_rhs1 (_a2);
7090 : 1396 : _q50 = do_valueize (valueize, _q50);
7091 : 1396 : tree _q51 = gimple_assign_rhs2 (_a2);
7092 : 1396 : _q51 = do_valueize (valueize, _q51);
7093 : 1396 : if (tree_swap_operands_p (_q50, _q51))
7094 : 29 : std::swap (_q50, _q51);
7095 : 1396 : {
7096 : 1396 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q51 };
7097 : 1396 : if (gimple_simplify_5 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7098 : 0 : return true;
7099 : : }
7100 : 1396 : {
7101 : 1396 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q51, _q50 };
7102 : 1396 : if (gimple_simplify_5 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7103 : 0 : return true;
7104 : : }
7105 : 1396 : {
7106 : 1396 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _q50, _q51 };
7107 : 1396 : if (gimple_simplify_5 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7108 : 0 : return true;
7109 : : }
7110 : 1396 : {
7111 : 1396 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _q51, _q50 };
7112 : 1396 : if (gimple_simplify_5 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7113 : 0 : return true;
7114 : : }
7115 : 1396 : break;
7116 : : }
7117 : : default:;
7118 : : }
7119 : : }
7120 : : break;
7121 : 24443 : default:;
7122 : : }
7123 : 24443 : switch (TREE_CODE (_q21))
7124 : : {
7125 : 10192 : case SSA_NAME:
7126 : 10192 : if (gimple *_d2 = get_def (valueize, _q21))
7127 : : {
7128 : 8989 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7129 : 8714 : switch (gimple_assign_rhs_code (_a2))
7130 : : {
7131 : 296 : case BIT_NOT_EXPR:
7132 : 296 : {
7133 : 296 : tree _q40 = gimple_assign_rhs1 (_a2);
7134 : 296 : _q40 = do_valueize (valueize, _q40);
7135 : 296 : switch (TREE_CODE (_p1))
7136 : : {
7137 : 147 : case SSA_NAME:
7138 : 147 : if (gimple *_d3 = get_def (valueize, _p1))
7139 : : {
7140 : 147 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7141 : 147 : switch (gimple_assign_rhs_code (_a3))
7142 : : {
7143 : 0 : case BIT_NOT_EXPR:
7144 : 0 : {
7145 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
7146 : 0 : _q60 = do_valueize (valueize, _q60);
7147 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
7148 : : {
7149 : 0 : {
7150 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
7151 : 0 : if (gimple_simplify_6 (res_op, seq, valueize, type, captures))
7152 : 0 : return true;
7153 : : }
7154 : : }
7155 : : break;
7156 : : }
7157 : : default:;
7158 : : }
7159 : : }
7160 : : break;
7161 : : default:;
7162 : : }
7163 : : break;
7164 : : }
7165 : : default:;
7166 : : }
7167 : : }
7168 : : break;
7169 : 24443 : default:;
7170 : : }
7171 : 24443 : switch (TREE_CODE (_q20))
7172 : : {
7173 : 24443 : case SSA_NAME:
7174 : 24443 : if (gimple *_d2 = get_def (valueize, _q20))
7175 : : {
7176 : 23915 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7177 : 26463 : switch (gimple_assign_rhs_code (_a2))
7178 : : {
7179 : 305 : case BIT_NOT_EXPR:
7180 : 305 : {
7181 : 305 : tree _q30 = gimple_assign_rhs1 (_a2);
7182 : 305 : _q30 = do_valueize (valueize, _q30);
7183 : 305 : switch (TREE_CODE (_p1))
7184 : : {
7185 : 234 : case SSA_NAME:
7186 : 234 : if (gimple *_d3 = get_def (valueize, _p1))
7187 : : {
7188 : 216 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7189 : 216 : switch (gimple_assign_rhs_code (_a3))
7190 : : {
7191 : 0 : case BIT_NOT_EXPR:
7192 : 0 : {
7193 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
7194 : 0 : _q60 = do_valueize (valueize, _q60);
7195 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
7196 : : {
7197 : 0 : {
7198 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q30 };
7199 : 0 : if (gimple_simplify_6 (res_op, seq, valueize, type, captures))
7200 : 0 : return true;
7201 : : }
7202 : : }
7203 : : break;
7204 : : }
7205 : : default:;
7206 : : }
7207 : : }
7208 : : break;
7209 : 305 : default:;
7210 : : }
7211 : 305 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
7212 : : {
7213 : 0 : {
7214 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q21 };
7215 : 0 : if (gimple_simplify_7 (res_op, seq, valueize, type, captures))
7216 : 0 : return true;
7217 : : }
7218 : : }
7219 : : break;
7220 : : }
7221 : : default:;
7222 : : }
7223 : : }
7224 : : break;
7225 : 24443 : default:;
7226 : : }
7227 : 24443 : switch (TREE_CODE (_q21))
7228 : : {
7229 : 10192 : case SSA_NAME:
7230 : 10192 : if (gimple *_d2 = get_def (valueize, _q21))
7231 : : {
7232 : 8989 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7233 : 8714 : switch (gimple_assign_rhs_code (_a2))
7234 : : {
7235 : 296 : case BIT_NOT_EXPR:
7236 : 296 : {
7237 : 296 : tree _q40 = gimple_assign_rhs1 (_a2);
7238 : 296 : _q40 = do_valueize (valueize, _q40);
7239 : 296 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
7240 : : {
7241 : 0 : {
7242 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q20 };
7243 : 0 : if (gimple_simplify_7 (res_op, seq, valueize, type, captures))
7244 : 0 : return true;
7245 : : }
7246 : : }
7247 : : break;
7248 : : }
7249 : : default:;
7250 : : }
7251 : : }
7252 : : break;
7253 : : default:;
7254 : : }
7255 : 608232 : break;
7256 : : }
7257 : 392 : case BIT_NOT_EXPR:
7258 : 392 : {
7259 : 392 : tree _q20 = gimple_assign_rhs1 (_a1);
7260 : 392 : _q20 = do_valueize (valueize, _q20);
7261 : 392 : switch (TREE_CODE (_p1))
7262 : : {
7263 : 200 : case SSA_NAME:
7264 : 200 : if (gimple *_d2 = get_def (valueize, _p1))
7265 : : {
7266 : 194 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7267 : 169 : switch (gimple_assign_rhs_code (_a2))
7268 : : {
7269 : 0 : case BIT_AND_EXPR:
7270 : 0 : {
7271 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
7272 : 0 : _q40 = do_valueize (valueize, _q40);
7273 : 0 : tree _q41 = gimple_assign_rhs2 (_a2);
7274 : 0 : _q41 = do_valueize (valueize, _q41);
7275 : 0 : if (tree_swap_operands_p (_q40, _q41))
7276 : 0 : std::swap (_q40, _q41);
7277 : 0 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _q20, 0) && types_match (_q40, _q20)))
7278 : : {
7279 : 0 : switch (TREE_CODE (_q41))
7280 : : {
7281 : 0 : case SSA_NAME:
7282 : 0 : if (gimple *_d3 = get_def (valueize, _q41))
7283 : : {
7284 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7285 : 0 : switch (gimple_assign_rhs_code (_a3))
7286 : : {
7287 : 0 : case BIT_NOT_EXPR:
7288 : 0 : {
7289 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
7290 : 0 : _q60 = do_valueize (valueize, _q60);
7291 : 0 : {
7292 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _q60 };
7293 : 0 : if (gimple_simplify_6 (res_op, seq, valueize, type, captures))
7294 : 0 : return true;
7295 : : }
7296 : 0 : break;
7297 : : }
7298 : : default:;
7299 : : }
7300 : : }
7301 : : break;
7302 : : default:;
7303 : : }
7304 : : }
7305 : 0 : switch (TREE_CODE (_q40))
7306 : : {
7307 : 0 : case SSA_NAME:
7308 : 0 : if (gimple *_d3 = get_def (valueize, _q40))
7309 : : {
7310 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7311 : 0 : switch (gimple_assign_rhs_code (_a3))
7312 : : {
7313 : 0 : case BIT_NOT_EXPR:
7314 : 0 : {
7315 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
7316 : 0 : _q50 = do_valueize (valueize, _q50);
7317 : 0 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _q20, 0) && types_match (_q41, _q20)))
7318 : : {
7319 : 0 : {
7320 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q20, _q50 };
7321 : 0 : if (gimple_simplify_6 (res_op, seq, valueize, type, captures))
7322 : 0 : return true;
7323 : : }
7324 : : }
7325 : : break;
7326 : : }
7327 : : default:;
7328 : : }
7329 : : }
7330 : : break;
7331 : : default:;
7332 : : }
7333 : 608232 : break;
7334 : : }
7335 : : default:;
7336 : : }
7337 : : }
7338 : : break;
7339 : : default:;
7340 : : }
7341 : : break;
7342 : : }
7343 : : default:;
7344 : : }
7345 : : }
7346 : : break;
7347 : 608232 : default:;
7348 : : }
7349 : 608232 : switch (TREE_CODE (_p1))
7350 : : {
7351 : 415750 : case SSA_NAME:
7352 : 415750 : if (gimple *_d1 = get_def (valueize, _p1))
7353 : : {
7354 : 342385 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7355 : 418227 : switch (gimple_assign_rhs_code (_a1))
7356 : : {
7357 : 9992 : case BIT_AND_EXPR:
7358 : 9992 : {
7359 : 9992 : tree _q30 = gimple_assign_rhs1 (_a1);
7360 : 9992 : _q30 = do_valueize (valueize, _q30);
7361 : 9992 : tree _q31 = gimple_assign_rhs2 (_a1);
7362 : 9992 : _q31 = do_valueize (valueize, _q31);
7363 : 9992 : if (tree_swap_operands_p (_q30, _q31))
7364 : 353 : std::swap (_q30, _q31);
7365 : 9992 : switch (TREE_CODE (_q30))
7366 : : {
7367 : 9992 : case SSA_NAME:
7368 : 9992 : if (gimple *_d2 = get_def (valueize, _q30))
7369 : : {
7370 : 9270 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7371 : 8693 : switch (gimple_assign_rhs_code (_a2))
7372 : : {
7373 : 554 : case BIT_NOT_EXPR:
7374 : 554 : {
7375 : 554 : tree _q40 = gimple_assign_rhs1 (_a2);
7376 : 554 : _q40 = do_valueize (valueize, _q40);
7377 : 554 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
7378 : : {
7379 : 1 : {
7380 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
7381 : 1 : if (gimple_simplify_7 (res_op, seq, valueize, type, captures))
7382 : 1 : return true;
7383 : : }
7384 : : }
7385 : : break;
7386 : : }
7387 : : default:;
7388 : : }
7389 : : }
7390 : : break;
7391 : 9991 : default:;
7392 : : }
7393 : 9991 : switch (TREE_CODE (_q31))
7394 : : {
7395 : 6258 : case SSA_NAME:
7396 : 6258 : if (gimple *_d2 = get_def (valueize, _q31))
7397 : : {
7398 : 5978 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7399 : 5493 : switch (gimple_assign_rhs_code (_a2))
7400 : : {
7401 : 55 : case BIT_NOT_EXPR:
7402 : 55 : {
7403 : 55 : tree _q50 = gimple_assign_rhs1 (_a2);
7404 : 55 : _q50 = do_valueize (valueize, _q50);
7405 : 55 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
7406 : : {
7407 : 0 : {
7408 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q30 };
7409 : 0 : if (gimple_simplify_7 (res_op, seq, valueize, type, captures))
7410 : 0 : return true;
7411 : : }
7412 : : }
7413 : : break;
7414 : : }
7415 : : default:;
7416 : : }
7417 : : }
7418 : : break;
7419 : : default:;
7420 : : }
7421 : 608231 : break;
7422 : : }
7423 : : default:;
7424 : : }
7425 : : }
7426 : : break;
7427 : 608231 : default:;
7428 : : }
7429 : 608231 : switch (TREE_CODE (_p0))
7430 : : {
7431 : 599582 : case SSA_NAME:
7432 : 599582 : if (gimple *_d1 = get_def (valueize, _p0))
7433 : : {
7434 : 494998 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7435 : 586629 : switch (gimple_assign_rhs_code (_a1))
7436 : : {
7437 : 5178 : case BIT_IOR_EXPR:
7438 : 5178 : {
7439 : 5178 : tree _q20 = gimple_assign_rhs1 (_a1);
7440 : 5178 : _q20 = do_valueize (valueize, _q20);
7441 : 5178 : tree _q21 = gimple_assign_rhs2 (_a1);
7442 : 5178 : _q21 = do_valueize (valueize, _q21);
7443 : 5178 : if (tree_swap_operands_p (_q20, _q21))
7444 : 249 : std::swap (_q20, _q21);
7445 : 5178 : switch (TREE_CODE (_q20))
7446 : : {
7447 : 5178 : case SSA_NAME:
7448 : 5178 : if (gimple *_d2 = get_def (valueize, _q20))
7449 : : {
7450 : 5114 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7451 : 4944 : switch (gimple_assign_rhs_code (_a2))
7452 : : {
7453 : 1892 : case BIT_NOT_EXPR:
7454 : 1892 : {
7455 : 1892 : tree _q30 = gimple_assign_rhs1 (_a2);
7456 : 1892 : _q30 = do_valueize (valueize, _q30);
7457 : 1892 : {
7458 : 1892 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _p1 };
7459 : 1892 : if (gimple_simplify_8 (res_op, seq, valueize, type, captures))
7460 : 3 : return true;
7461 : : }
7462 : 1889 : break;
7463 : : }
7464 : : default:;
7465 : : }
7466 : : }
7467 : : break;
7468 : 5175 : default:;
7469 : : }
7470 : 5175 : switch (TREE_CODE (_q21))
7471 : : {
7472 : 4769 : case SSA_NAME:
7473 : 4769 : if (gimple *_d2 = get_def (valueize, _q21))
7474 : : {
7475 : 4377 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7476 : 4199 : switch (gimple_assign_rhs_code (_a2))
7477 : : {
7478 : 17 : case BIT_NOT_EXPR:
7479 : 17 : {
7480 : 17 : tree _q40 = gimple_assign_rhs1 (_a2);
7481 : 17 : _q40 = do_valueize (valueize, _q40);
7482 : 17 : {
7483 : 17 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q20, _p1 };
7484 : 17 : if (gimple_simplify_8 (res_op, seq, valueize, type, captures))
7485 : 13 : return true;
7486 : : }
7487 : 4 : break;
7488 : : }
7489 : : default:;
7490 : : }
7491 : : }
7492 : : break;
7493 : : default:;
7494 : : }
7495 : 608215 : break;
7496 : : }
7497 : : default:;
7498 : : }
7499 : : }
7500 : : break;
7501 : 608215 : default:;
7502 : : }
7503 : 608215 : switch (TREE_CODE (_p1))
7504 : : {
7505 : 415749 : case SSA_NAME:
7506 : 415749 : if (gimple *_d1 = get_def (valueize, _p1))
7507 : : {
7508 : 342384 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7509 : 418226 : switch (gimple_assign_rhs_code (_a1))
7510 : : {
7511 : 2043 : case BIT_IOR_EXPR:
7512 : 2043 : {
7513 : 2043 : tree _q30 = gimple_assign_rhs1 (_a1);
7514 : 2043 : _q30 = do_valueize (valueize, _q30);
7515 : 2043 : tree _q31 = gimple_assign_rhs2 (_a1);
7516 : 2043 : _q31 = do_valueize (valueize, _q31);
7517 : 2043 : if (tree_swap_operands_p (_q30, _q31))
7518 : 221 : std::swap (_q30, _q31);
7519 : 2043 : switch (TREE_CODE (_q30))
7520 : : {
7521 : 2043 : case SSA_NAME:
7522 : 2043 : if (gimple *_d2 = get_def (valueize, _q30))
7523 : : {
7524 : 1826 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7525 : 1963 : switch (gimple_assign_rhs_code (_a2))
7526 : : {
7527 : 128 : case BIT_NOT_EXPR:
7528 : 128 : {
7529 : 128 : tree _q40 = gimple_assign_rhs1 (_a2);
7530 : 128 : _q40 = do_valueize (valueize, _q40);
7531 : 128 : {
7532 : 128 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _q31, _p0 };
7533 : 128 : if (gimple_simplify_8 (res_op, seq, valueize, type, captures))
7534 : 0 : return true;
7535 : : }
7536 : 128 : break;
7537 : : }
7538 : : default:;
7539 : : }
7540 : : }
7541 : : break;
7542 : 2043 : default:;
7543 : : }
7544 : 2043 : switch (TREE_CODE (_q31))
7545 : : {
7546 : 1921 : case SSA_NAME:
7547 : 1921 : if (gimple *_d2 = get_def (valueize, _q31))
7548 : : {
7549 : 1829 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7550 : 1644 : switch (gimple_assign_rhs_code (_a2))
7551 : : {
7552 : 640 : case BIT_NOT_EXPR:
7553 : 640 : {
7554 : 640 : tree _q50 = gimple_assign_rhs1 (_a2);
7555 : 640 : _q50 = do_valueize (valueize, _q50);
7556 : 640 : {
7557 : 640 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q31, _q50, _q30, _p0 };
7558 : 640 : if (gimple_simplify_8 (res_op, seq, valueize, type, captures))
7559 : 0 : return true;
7560 : : }
7561 : 640 : break;
7562 : : }
7563 : : default:;
7564 : : }
7565 : : }
7566 : : break;
7567 : : default:;
7568 : : }
7569 : 608215 : break;
7570 : : }
7571 : : default:;
7572 : : }
7573 : : }
7574 : : break;
7575 : 608215 : default:;
7576 : : }
7577 : 608215 : switch (TREE_CODE (_p0))
7578 : : {
7579 : 599566 : case SSA_NAME:
7580 : 599566 : if (gimple *_d1 = get_def (valueize, _p0))
7581 : : {
7582 : 494982 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7583 : 586613 : switch (gimple_assign_rhs_code (_a1))
7584 : : {
7585 : 24443 : case BIT_AND_EXPR:
7586 : 24443 : {
7587 : 24443 : tree _q20 = gimple_assign_rhs1 (_a1);
7588 : 24443 : _q20 = do_valueize (valueize, _q20);
7589 : 24443 : tree _q21 = gimple_assign_rhs2 (_a1);
7590 : 24443 : _q21 = do_valueize (valueize, _q21);
7591 : 24443 : if (tree_swap_operands_p (_q20, _q21))
7592 : 857 : std::swap (_q20, _q21);
7593 : 24443 : switch (TREE_CODE (_q20))
7594 : : {
7595 : 24443 : case SSA_NAME:
7596 : 24443 : if (gimple *_d2 = get_def (valueize, _q20))
7597 : : {
7598 : 23915 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7599 : 26463 : switch (gimple_assign_rhs_code (_a2))
7600 : : {
7601 : 305 : case BIT_NOT_EXPR:
7602 : 305 : {
7603 : 305 : tree _q30 = gimple_assign_rhs1 (_a2);
7604 : 305 : _q30 = do_valueize (valueize, _q30);
7605 : 305 : {
7606 : 305 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _q21, _p1 };
7607 : 305 : if (gimple_simplify_9 (res_op, seq, valueize, type, captures))
7608 : 7 : return true;
7609 : : }
7610 : 298 : break;
7611 : : }
7612 : : default:;
7613 : : }
7614 : : }
7615 : : break;
7616 : 24436 : default:;
7617 : : }
7618 : 24436 : switch (TREE_CODE (_q21))
7619 : : {
7620 : 10192 : case SSA_NAME:
7621 : 10192 : if (gimple *_d2 = get_def (valueize, _q21))
7622 : : {
7623 : 8989 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7624 : 8714 : switch (gimple_assign_rhs_code (_a2))
7625 : : {
7626 : 296 : case BIT_NOT_EXPR:
7627 : 296 : {
7628 : 296 : tree _q40 = gimple_assign_rhs1 (_a2);
7629 : 296 : _q40 = do_valueize (valueize, _q40);
7630 : 296 : {
7631 : 296 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q21, _q40, _q20, _p1 };
7632 : 296 : if (gimple_simplify_9 (res_op, seq, valueize, type, captures))
7633 : 0 : return true;
7634 : : }
7635 : 296 : break;
7636 : : }
7637 : : default:;
7638 : : }
7639 : : }
7640 : : break;
7641 : : default:;
7642 : : }
7643 : 608208 : break;
7644 : : }
7645 : : default:;
7646 : : }
7647 : : }
7648 : : break;
7649 : 608208 : default:;
7650 : : }
7651 : 608208 : switch (TREE_CODE (_p1))
7652 : : {
7653 : 415749 : case SSA_NAME:
7654 : 415749 : if (gimple *_d1 = get_def (valueize, _p1))
7655 : : {
7656 : 342384 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7657 : 418226 : switch (gimple_assign_rhs_code (_a1))
7658 : : {
7659 : 9991 : case BIT_AND_EXPR:
7660 : 9991 : {
7661 : 9991 : tree _q30 = gimple_assign_rhs1 (_a1);
7662 : 9991 : _q30 = do_valueize (valueize, _q30);
7663 : 9991 : tree _q31 = gimple_assign_rhs2 (_a1);
7664 : 9991 : _q31 = do_valueize (valueize, _q31);
7665 : 9991 : if (tree_swap_operands_p (_q30, _q31))
7666 : 353 : std::swap (_q30, _q31);
7667 : 9991 : switch (TREE_CODE (_q30))
7668 : : {
7669 : 9991 : case SSA_NAME:
7670 : 9991 : if (gimple *_d2 = get_def (valueize, _q30))
7671 : : {
7672 : 9269 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7673 : 8692 : switch (gimple_assign_rhs_code (_a2))
7674 : : {
7675 : 553 : case BIT_NOT_EXPR:
7676 : 553 : {
7677 : 553 : tree _q40 = gimple_assign_rhs1 (_a2);
7678 : 553 : _q40 = do_valueize (valueize, _q40);
7679 : 553 : {
7680 : 553 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _q31, _p0 };
7681 : 553 : if (gimple_simplify_9 (res_op, seq, valueize, type, captures))
7682 : 1 : return true;
7683 : : }
7684 : 552 : break;
7685 : : }
7686 : : default:;
7687 : : }
7688 : : }
7689 : : break;
7690 : 9990 : default:;
7691 : : }
7692 : 9990 : switch (TREE_CODE (_q31))
7693 : : {
7694 : 6257 : case SSA_NAME:
7695 : 6257 : if (gimple *_d2 = get_def (valueize, _q31))
7696 : : {
7697 : 5977 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7698 : 5493 : switch (gimple_assign_rhs_code (_a2))
7699 : : {
7700 : 55 : case BIT_NOT_EXPR:
7701 : 55 : {
7702 : 55 : tree _q50 = gimple_assign_rhs1 (_a2);
7703 : 55 : _q50 = do_valueize (valueize, _q50);
7704 : 55 : {
7705 : 55 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q31, _q50, _q30, _p0 };
7706 : 55 : if (gimple_simplify_9 (res_op, seq, valueize, type, captures))
7707 : 0 : return true;
7708 : : }
7709 : 55 : break;
7710 : : }
7711 : : default:;
7712 : : }
7713 : : }
7714 : : break;
7715 : : default:;
7716 : : }
7717 : 608207 : break;
7718 : : }
7719 : : default:;
7720 : : }
7721 : : }
7722 : : break;
7723 : 608207 : default:;
7724 : : }
7725 : 608207 : switch (TREE_CODE (_p0))
7726 : : {
7727 : 599558 : case SSA_NAME:
7728 : 599558 : if (gimple *_d1 = get_def (valueize, _p0))
7729 : : {
7730 : 494974 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
7731 : 586606 : switch (gimple_assign_rhs_code (_a1))
7732 : : {
7733 : 55239 : CASE_CONVERT:
7734 : 55239 : {
7735 : 55239 : tree _q20 = gimple_assign_rhs1 (_a1);
7736 : 55239 : _q20 = do_valueize (valueize, _q20);
7737 : 55239 : switch (TREE_CODE (_p1))
7738 : : {
7739 : 42827 : case SSA_NAME:
7740 : 42827 : if (gimple *_d2 = get_def (valueize, _p1))
7741 : : {
7742 : 41833 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7743 : 38628 : switch (gimple_assign_rhs_code (_a2))
7744 : : {
7745 : 19319 : CASE_CONVERT:
7746 : 19319 : {
7747 : 19319 : tree _q40 = gimple_assign_rhs1 (_a2);
7748 : 19319 : _q40 = do_valueize (valueize, _q40);
7749 : 19319 : {
7750 : 19319 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
7751 : 19319 : if (gimple_simplify_10 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7752 : 0 : return true;
7753 : : }
7754 : 19319 : break;
7755 : : }
7756 : : default:;
7757 : : }
7758 : : }
7759 : : break;
7760 : 55239 : default:;
7761 : : }
7762 : 55239 : switch (TREE_CODE (_q20))
7763 : : {
7764 : 55184 : case SSA_NAME:
7765 : 55184 : if (gimple *_d2 = get_def (valueize, _q20))
7766 : : {
7767 : 53207 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7768 : 62684 : switch (gimple_assign_rhs_code (_a2))
7769 : : {
7770 : 2531 : case BIT_AND_EXPR:
7771 : 2531 : {
7772 : 2531 : tree _q30 = gimple_assign_rhs1 (_a2);
7773 : 2531 : _q30 = do_valueize (valueize, _q30);
7774 : 2531 : tree _q31 = gimple_assign_rhs2 (_a2);
7775 : 2531 : _q31 = do_valueize (valueize, _q31);
7776 : 2531 : if (tree_swap_operands_p (_q30, _q31))
7777 : 26 : std::swap (_q30, _q31);
7778 : 2531 : switch (TREE_CODE (_q31))
7779 : : {
7780 : 2223 : case INTEGER_CST:
7781 : 2223 : {
7782 : 2223 : switch (TREE_CODE (_p1))
7783 : : {
7784 : 2178 : case SSA_NAME:
7785 : 2178 : if (gimple *_d3 = get_def (valueize, _p1))
7786 : : {
7787 : 2169 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7788 : 2573 : switch (gimple_assign_rhs_code (_a3))
7789 : : {
7790 : 37 : CASE_CONVERT:
7791 : 37 : {
7792 : 37 : tree _q60 = gimple_assign_rhs1 (_a3);
7793 : 37 : _q60 = do_valueize (valueize, _q60);
7794 : 37 : switch (TREE_CODE (_q60))
7795 : : {
7796 : 37 : case SSA_NAME:
7797 : 37 : if (gimple *_d4 = get_def (valueize, _q60))
7798 : : {
7799 : 37 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
7800 : 49 : switch (gimple_assign_rhs_code (_a4))
7801 : : {
7802 : 25 : case BIT_AND_EXPR:
7803 : 25 : {
7804 : 25 : tree _q70 = gimple_assign_rhs1 (_a4);
7805 : 25 : _q70 = do_valueize (valueize, _q70);
7806 : 25 : tree _q71 = gimple_assign_rhs2 (_a4);
7807 : 25 : _q71 = do_valueize (valueize, _q71);
7808 : 25 : if (tree_swap_operands_p (_q70, _q71))
7809 : 0 : std::swap (_q70, _q71);
7810 : 25 : switch (TREE_CODE (_q71))
7811 : : {
7812 : 25 : case INTEGER_CST:
7813 : 25 : {
7814 : 25 : {
7815 : 25 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _q60, _q70, _q71 };
7816 : 25 : if (gimple_simplify_11 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7817 : 0 : return true;
7818 : : }
7819 : 25 : break;
7820 : : }
7821 : : default:;
7822 : : }
7823 : 55239 : break;
7824 : : }
7825 : : default:;
7826 : : }
7827 : : }
7828 : : break;
7829 : : default:;
7830 : : }
7831 : : break;
7832 : : }
7833 : 0 : case BIT_AND_EXPR:
7834 : 0 : {
7835 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
7836 : 0 : _q60 = do_valueize (valueize, _q60);
7837 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
7838 : 0 : _q61 = do_valueize (valueize, _q61);
7839 : 0 : if (tree_swap_operands_p (_q60, _q61))
7840 : 0 : std::swap (_q60, _q61);
7841 : 0 : switch (TREE_CODE (_q61))
7842 : : {
7843 : 0 : case INTEGER_CST:
7844 : 0 : {
7845 : 0 : {
7846 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _q20, _q30, _q31, _p1, _q60, _q61 };
7847 : 0 : if (gimple_simplify_11 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
7848 : 0 : return true;
7849 : : }
7850 : 0 : break;
7851 : : }
7852 : : default:;
7853 : : }
7854 : 55239 : break;
7855 : : }
7856 : : default:;
7857 : : }
7858 : : }
7859 : : break;
7860 : : default:;
7861 : : }
7862 : : break;
7863 : : }
7864 : : default:;
7865 : : }
7866 : 55239 : break;
7867 : : }
7868 : 392 : case BIT_IOR_EXPR:
7869 : 392 : {
7870 : 392 : tree _q30 = gimple_assign_rhs1 (_a2);
7871 : 392 : _q30 = do_valueize (valueize, _q30);
7872 : 392 : tree _q31 = gimple_assign_rhs2 (_a2);
7873 : 392 : _q31 = do_valueize (valueize, _q31);
7874 : 392 : if (tree_swap_operands_p (_q30, _q31))
7875 : 25 : std::swap (_q30, _q31);
7876 : 392 : switch (TREE_CODE (_p1))
7877 : : {
7878 : 291 : case SSA_NAME:
7879 : 291 : if (gimple *_d3 = get_def (valueize, _p1))
7880 : : {
7881 : 291 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7882 : 351 : switch (gimple_assign_rhs_code (_a3))
7883 : : {
7884 : 32 : CASE_CONVERT:
7885 : 32 : {
7886 : 32 : tree _q60 = gimple_assign_rhs1 (_a3);
7887 : 32 : _q60 = do_valueize (valueize, _q60);
7888 : 32 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
7889 : : {
7890 : 0 : {
7891 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7892 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7893 : 0 : return true;
7894 : : }
7895 : : }
7896 : 32 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
7897 : : {
7898 : 0 : {
7899 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7900 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7901 : 0 : return true;
7902 : : }
7903 : : }
7904 : : break;
7905 : : }
7906 : : default:;
7907 : : }
7908 : : }
7909 : : break;
7910 : 392 : default:;
7911 : : }
7912 : 392 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
7913 : : {
7914 : 0 : {
7915 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q30 };
7916 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7917 : 0 : return true;
7918 : : }
7919 : : }
7920 : 392 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
7921 : : {
7922 : 0 : {
7923 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q31 };
7924 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7925 : 0 : return true;
7926 : : }
7927 : : }
7928 : 55239 : break;
7929 : : }
7930 : : default:;
7931 : : }
7932 : : }
7933 : : break;
7934 : 55239 : default:;
7935 : : }
7936 : 55239 : switch (TREE_CODE (_p1))
7937 : : {
7938 : 42827 : case SSA_NAME:
7939 : 42827 : if (gimple *_d2 = get_def (valueize, _p1))
7940 : : {
7941 : 41833 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
7942 : 38628 : switch (gimple_assign_rhs_code (_a2))
7943 : : {
7944 : 19319 : CASE_CONVERT:
7945 : 19319 : {
7946 : 19319 : tree _q40 = gimple_assign_rhs1 (_a2);
7947 : 19319 : _q40 = do_valueize (valueize, _q40);
7948 : 19319 : switch (TREE_CODE (_q40))
7949 : : {
7950 : 19319 : case SSA_NAME:
7951 : 19319 : if (gimple *_d3 = get_def (valueize, _q40))
7952 : : {
7953 : 19186 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
7954 : 19355 : switch (gimple_assign_rhs_code (_a3))
7955 : : {
7956 : 119 : case BIT_IOR_EXPR:
7957 : 119 : {
7958 : 119 : tree _q50 = gimple_assign_rhs1 (_a3);
7959 : 119 : _q50 = do_valueize (valueize, _q50);
7960 : 119 : tree _q51 = gimple_assign_rhs2 (_a3);
7961 : 119 : _q51 = do_valueize (valueize, _q51);
7962 : 119 : if (tree_swap_operands_p (_q50, _q51))
7963 : 0 : std::swap (_q50, _q51);
7964 : 119 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
7965 : : {
7966 : 0 : {
7967 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
7968 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7969 : 0 : return true;
7970 : : }
7971 : : }
7972 : 119 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
7973 : : {
7974 : 0 : {
7975 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
7976 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
7977 : 0 : return true;
7978 : : }
7979 : : }
7980 : 608207 : break;
7981 : : }
7982 : : default:;
7983 : : }
7984 : : }
7985 : : break;
7986 : : default:;
7987 : : }
7988 : : break;
7989 : : }
7990 : 155 : case BIT_IOR_EXPR:
7991 : 155 : {
7992 : 155 : tree _q40 = gimple_assign_rhs1 (_a2);
7993 : 155 : _q40 = do_valueize (valueize, _q40);
7994 : 155 : tree _q41 = gimple_assign_rhs2 (_a2);
7995 : 155 : _q41 = do_valueize (valueize, _q41);
7996 : 155 : if (tree_swap_operands_p (_q40, _q41))
7997 : 21 : std::swap (_q40, _q41);
7998 : 155 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
7999 : : {
8000 : 0 : {
8001 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _q20 };
8002 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8003 : 0 : return true;
8004 : : }
8005 : : }
8006 : 155 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
8007 : : {
8008 : 0 : {
8009 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _q20 };
8010 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8011 : 0 : return true;
8012 : : }
8013 : : }
8014 : 608207 : break;
8015 : : }
8016 : : default:;
8017 : : }
8018 : : }
8019 : : break;
8020 : : default:;
8021 : : }
8022 : : break;
8023 : : }
8024 : : default:;
8025 : : }
8026 : : }
8027 : : break;
8028 : 608207 : default:;
8029 : : }
8030 : 608207 : {
8031 : 608207 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8032 : 608207 : if (gimple_simplify_10 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
8033 : 52 : return true;
8034 : : }
8035 : 608155 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
8036 : : {
8037 : 1159 : {
8038 : 1159 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
8039 : 1159 : gimple_seq *lseq = seq;
8040 : 1159 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1507;
8041 : 1159 : {
8042 : 1159 : tree tem;
8043 : 1159 : tem = build_zero_cst (type);
8044 : 1159 : res_op->set_value (tem);
8045 : 1159 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 921, __FILE__, __LINE__, true);
8046 : 1159 : return true;
8047 : : }
8048 : 0 : next_after_fail1507:;
8049 : : }
8050 : : }
8051 : 606996 : if (integer_all_onesp (_p1))
8052 : : {
8053 : 83521 : {
8054 : 83521 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
8055 : 83521 : gimple_seq *lseq = seq;
8056 : 83521 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1508;
8057 : 83521 : {
8058 : 83521 : res_op->set_op (BIT_NOT_EXPR, type, 1);
8059 : 83521 : res_op->ops[0] = captures[0];
8060 : 83521 : res_op->resimplify (lseq, valueize);
8061 : 83521 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 922, __FILE__, __LINE__, true);
8062 : 83521 : return true;
8063 : : }
8064 : 0 : next_after_fail1508:;
8065 : : }
8066 : : }
8067 : 523475 : switch (TREE_CODE (_p0))
8068 : : {
8069 : 514826 : case SSA_NAME:
8070 : 514826 : if (gimple *_d1 = get_def (valueize, _p0))
8071 : : {
8072 : 412241 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
8073 : 504277 : switch (gimple_assign_rhs_code (_a1))
8074 : : {
8075 : 4931 : case BIT_IOR_EXPR:
8076 : 4931 : {
8077 : 4931 : tree _q20 = gimple_assign_rhs1 (_a1);
8078 : 4931 : _q20 = do_valueize (valueize, _q20);
8079 : 4931 : tree _q21 = gimple_assign_rhs2 (_a1);
8080 : 4931 : _q21 = do_valueize (valueize, _q21);
8081 : 4931 : if (tree_swap_operands_p (_q20, _q21))
8082 : 249 : std::swap (_q20, _q21);
8083 : 4931 : switch (TREE_CODE (_p1))
8084 : : {
8085 : 4487 : case SSA_NAME:
8086 : 4487 : if (gimple *_d2 = get_def (valueize, _p1))
8087 : : {
8088 : 4076 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8089 : 4806 : switch (gimple_assign_rhs_code (_a2))
8090 : : {
8091 : 190 : case BIT_IOR_EXPR:
8092 : 190 : {
8093 : 190 : tree _q50 = gimple_assign_rhs1 (_a2);
8094 : 190 : _q50 = do_valueize (valueize, _q50);
8095 : 190 : tree _q51 = gimple_assign_rhs2 (_a2);
8096 : 190 : _q51 = do_valueize (valueize, _q51);
8097 : 190 : if (tree_swap_operands_p (_q50, _q51))
8098 : 24 : std::swap (_q50, _q51);
8099 : 190 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8100 : : {
8101 : 0 : switch (TREE_CODE (_q51))
8102 : : {
8103 : 0 : case SSA_NAME:
8104 : 0 : if (gimple *_d3 = get_def (valueize, _q51))
8105 : : {
8106 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8107 : 0 : switch (gimple_assign_rhs_code (_a3))
8108 : : {
8109 : 0 : case BIT_NOT_EXPR:
8110 : 0 : {
8111 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
8112 : 0 : _q70 = do_valueize (valueize, _q70);
8113 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
8114 : : {
8115 : 0 : {
8116 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8117 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8118 : 0 : return true;
8119 : : }
8120 : : }
8121 : : break;
8122 : : }
8123 : : default:;
8124 : : }
8125 : : }
8126 : : break;
8127 : : default:;
8128 : : }
8129 : : }
8130 : 190 : switch (TREE_CODE (_q50))
8131 : : {
8132 : 190 : case SSA_NAME:
8133 : 190 : if (gimple *_d3 = get_def (valueize, _q50))
8134 : : {
8135 : 160 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8136 : 160 : switch (gimple_assign_rhs_code (_a3))
8137 : : {
8138 : 0 : case BIT_NOT_EXPR:
8139 : 0 : {
8140 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8141 : 0 : _q60 = do_valueize (valueize, _q60);
8142 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
8143 : : {
8144 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
8145 : : {
8146 : 0 : {
8147 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8148 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8149 : 0 : return true;
8150 : : }
8151 : : }
8152 : : }
8153 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8154 : : {
8155 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8156 : : {
8157 : 0 : {
8158 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8159 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8160 : 0 : return true;
8161 : : }
8162 : : }
8163 : : }
8164 : : break;
8165 : : }
8166 : : default:;
8167 : : }
8168 : : }
8169 : : break;
8170 : 190 : default:;
8171 : : }
8172 : 190 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
8173 : : {
8174 : 0 : switch (TREE_CODE (_q51))
8175 : : {
8176 : 0 : case SSA_NAME:
8177 : 0 : if (gimple *_d3 = get_def (valueize, _q51))
8178 : : {
8179 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8180 : 0 : switch (gimple_assign_rhs_code (_a3))
8181 : : {
8182 : 0 : case BIT_NOT_EXPR:
8183 : 0 : {
8184 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
8185 : 0 : _q70 = do_valueize (valueize, _q70);
8186 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
8187 : : {
8188 : 0 : {
8189 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
8190 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8191 : 0 : return true;
8192 : : }
8193 : : }
8194 : : break;
8195 : : }
8196 : : default:;
8197 : : }
8198 : : }
8199 : : break;
8200 : : default:;
8201 : : }
8202 : : }
8203 : 4931 : break;
8204 : : }
8205 : : default:;
8206 : : }
8207 : : }
8208 : : break;
8209 : 4931 : default:;
8210 : : }
8211 : 4931 : switch (TREE_CODE (_q21))
8212 : : {
8213 : 4525 : case SSA_NAME:
8214 : 4525 : if (gimple *_d2 = get_def (valueize, _q21))
8215 : : {
8216 : 4133 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8217 : 3958 : switch (gimple_assign_rhs_code (_a2))
8218 : : {
8219 : 0 : case BIT_NOT_EXPR:
8220 : 0 : {
8221 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8222 : 0 : _q40 = do_valueize (valueize, _q40);
8223 : 0 : switch (TREE_CODE (_p1))
8224 : : {
8225 : 0 : case SSA_NAME:
8226 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
8227 : : {
8228 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8229 : 0 : switch (gimple_assign_rhs_code (_a3))
8230 : : {
8231 : 0 : case BIT_IOR_EXPR:
8232 : 0 : {
8233 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8234 : 0 : _q60 = do_valueize (valueize, _q60);
8235 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8236 : 0 : _q61 = do_valueize (valueize, _q61);
8237 : 0 : if (tree_swap_operands_p (_q60, _q61))
8238 : 0 : std::swap (_q60, _q61);
8239 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8240 : : {
8241 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
8242 : : {
8243 : 0 : {
8244 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8245 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8246 : 0 : return true;
8247 : : }
8248 : : }
8249 : : }
8250 : 4931 : break;
8251 : : }
8252 : : default:;
8253 : : }
8254 : : }
8255 : : break;
8256 : : default:;
8257 : : }
8258 : : break;
8259 : : }
8260 : : default:;
8261 : : }
8262 : : }
8263 : : break;
8264 : 4931 : default:;
8265 : : }
8266 : 4931 : switch (TREE_CODE (_q20))
8267 : : {
8268 : 4931 : case SSA_NAME:
8269 : 4931 : if (gimple *_d2 = get_def (valueize, _q20))
8270 : : {
8271 : 4867 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8272 : 4698 : switch (gimple_assign_rhs_code (_a2))
8273 : : {
8274 : 1888 : case BIT_NOT_EXPR:
8275 : 1888 : {
8276 : 1888 : tree _q30 = gimple_assign_rhs1 (_a2);
8277 : 1888 : _q30 = do_valueize (valueize, _q30);
8278 : 1888 : switch (TREE_CODE (_p1))
8279 : : {
8280 : 1888 : case SSA_NAME:
8281 : 1888 : if (gimple *_d3 = get_def (valueize, _p1))
8282 : : {
8283 : 1600 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8284 : 1600 : switch (gimple_assign_rhs_code (_a3))
8285 : : {
8286 : 0 : case BIT_IOR_EXPR:
8287 : 0 : {
8288 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8289 : 0 : _q60 = do_valueize (valueize, _q60);
8290 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8291 : 0 : _q61 = do_valueize (valueize, _q61);
8292 : 0 : if (tree_swap_operands_p (_q60, _q61))
8293 : 0 : std::swap (_q60, _q61);
8294 : 0 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
8295 : : {
8296 : 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
8297 : : {
8298 : 0 : {
8299 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q30 };
8300 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8301 : 0 : return true;
8302 : : }
8303 : : }
8304 : : }
8305 : 0 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
8306 : : {
8307 : 0 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
8308 : : {
8309 : 0 : {
8310 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q30 };
8311 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8312 : 0 : return true;
8313 : : }
8314 : : }
8315 : 0 : switch (TREE_CODE (_q61))
8316 : : {
8317 : 0 : case SSA_NAME:
8318 : 0 : if (gimple *_d4 = get_def (valueize, _q61))
8319 : : {
8320 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
8321 : 0 : switch (gimple_assign_rhs_code (_a4))
8322 : : {
8323 : 0 : case BIT_NOT_EXPR:
8324 : 0 : {
8325 : 0 : tree _q80 = gimple_assign_rhs1 (_a4);
8326 : 0 : _q80 = do_valueize (valueize, _q80);
8327 : 0 : if ((_q80 == _q21 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q21, 0) && types_match (_q80, _q21)))
8328 : : {
8329 : 0 : {
8330 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
8331 : 0 : if (gimple_simplify_14 (res_op, seq, valueize, type, captures))
8332 : 0 : return true;
8333 : : }
8334 : : }
8335 : : break;
8336 : : }
8337 : : default:;
8338 : : }
8339 : : }
8340 : : break;
8341 : : default:;
8342 : : }
8343 : : }
8344 : 0 : switch (TREE_CODE (_q60))
8345 : : {
8346 : 0 : case SSA_NAME:
8347 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
8348 : : {
8349 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
8350 : 0 : switch (gimple_assign_rhs_code (_a4))
8351 : : {
8352 : 0 : case BIT_NOT_EXPR:
8353 : 0 : {
8354 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
8355 : 0 : _q70 = do_valueize (valueize, _q70);
8356 : 0 : if ((_q70 == _q21 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q21, 0) && types_match (_q70, _q21)))
8357 : : {
8358 : 0 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
8359 : : {
8360 : 0 : {
8361 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q21 };
8362 : 0 : if (gimple_simplify_14 (res_op, seq, valueize, type, captures))
8363 : 0 : return true;
8364 : : }
8365 : : }
8366 : : }
8367 : : break;
8368 : : }
8369 : : default:;
8370 : : }
8371 : : }
8372 : : break;
8373 : : default:;
8374 : : }
8375 : 1888 : break;
8376 : : }
8377 : 0 : case BIT_XOR_EXPR:
8378 : 0 : {
8379 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8380 : 0 : _q60 = do_valueize (valueize, _q60);
8381 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8382 : 0 : _q61 = do_valueize (valueize, _q61);
8383 : 0 : if (tree_swap_operands_p (_q60, _q61))
8384 : 0 : std::swap (_q60, _q61);
8385 : 0 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
8386 : : {
8387 : 0 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
8388 : : {
8389 : 0 : {
8390 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q30, _q21, _p1 };
8391 : 0 : if (gimple_simplify_15 (res_op, seq, valueize, type, captures))
8392 : 0 : return true;
8393 : : }
8394 : : }
8395 : : }
8396 : 1888 : break;
8397 : : }
8398 : : default:;
8399 : : }
8400 : : }
8401 : : break;
8402 : 1888 : default:;
8403 : : }
8404 : 1888 : {
8405 : 1888 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q21, _p1 };
8406 : 1888 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
8407 : 0 : return true;
8408 : : }
8409 : 1888 : break;
8410 : : }
8411 : : default:;
8412 : : }
8413 : : }
8414 : : break;
8415 : 4931 : default:;
8416 : : }
8417 : 4931 : switch (TREE_CODE (_q21))
8418 : : {
8419 : 4525 : case SSA_NAME:
8420 : 4525 : if (gimple *_d2 = get_def (valueize, _q21))
8421 : : {
8422 : 4133 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8423 : 3958 : switch (gimple_assign_rhs_code (_a2))
8424 : : {
8425 : 0 : case BIT_NOT_EXPR:
8426 : 0 : {
8427 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8428 : 0 : _q40 = do_valueize (valueize, _q40);
8429 : 0 : switch (TREE_CODE (_p1))
8430 : : {
8431 : 0 : case SSA_NAME:
8432 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
8433 : : {
8434 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8435 : 0 : switch (gimple_assign_rhs_code (_a3))
8436 : : {
8437 : 0 : case BIT_IOR_EXPR:
8438 : 0 : {
8439 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8440 : 0 : _q60 = do_valueize (valueize, _q60);
8441 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8442 : 0 : _q61 = do_valueize (valueize, _q61);
8443 : 0 : if (tree_swap_operands_p (_q60, _q61))
8444 : 0 : std::swap (_q60, _q61);
8445 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
8446 : : {
8447 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
8448 : : {
8449 : 0 : {
8450 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
8451 : 0 : if (gimple_simplify_13 (res_op, seq, valueize, type, captures))
8452 : 0 : return true;
8453 : : }
8454 : : }
8455 : : }
8456 : 4931 : break;
8457 : : }
8458 : 0 : case BIT_XOR_EXPR:
8459 : 0 : {
8460 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8461 : 0 : _q60 = do_valueize (valueize, _q60);
8462 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8463 : 0 : _q61 = do_valueize (valueize, _q61);
8464 : 0 : if (tree_swap_operands_p (_q60, _q61))
8465 : 0 : std::swap (_q60, _q61);
8466 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
8467 : : {
8468 : 0 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
8469 : : {
8470 : 0 : {
8471 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q40, _q20, _p1 };
8472 : 0 : if (gimple_simplify_15 (res_op, seq, valueize, type, captures))
8473 : 0 : return true;
8474 : : }
8475 : : }
8476 : : }
8477 : 4931 : break;
8478 : : }
8479 : : default:;
8480 : : }
8481 : : }
8482 : : break;
8483 : : default:;
8484 : : }
8485 : : break;
8486 : : }
8487 : : default:;
8488 : : }
8489 : : }
8490 : : break;
8491 : 4931 : default:;
8492 : : }
8493 : 4931 : switch (TREE_CODE (_p1))
8494 : : {
8495 : 4487 : case SSA_NAME:
8496 : 4487 : if (gimple *_d2 = get_def (valueize, _p1))
8497 : : {
8498 : 4076 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8499 : 4806 : switch (gimple_assign_rhs_code (_a2))
8500 : : {
8501 : 0 : case BIT_AND_EXPR:
8502 : 0 : {
8503 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8504 : 0 : _q50 = do_valueize (valueize, _q50);
8505 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
8506 : 0 : _q51 = do_valueize (valueize, _q51);
8507 : 0 : if (tree_swap_operands_p (_q50, _q51))
8508 : 0 : std::swap (_q50, _q51);
8509 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8510 : : {
8511 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8512 : : {
8513 : 0 : {
8514 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8515 : 0 : if (gimple_simplify_17 (res_op, seq, valueize, type, captures))
8516 : 0 : return true;
8517 : : }
8518 : : }
8519 : : }
8520 : 4923 : break;
8521 : : }
8522 : 111 : case BIT_XOR_EXPR:
8523 : 111 : {
8524 : 111 : tree _q50 = gimple_assign_rhs1 (_a2);
8525 : 111 : _q50 = do_valueize (valueize, _q50);
8526 : 111 : tree _q51 = gimple_assign_rhs2 (_a2);
8527 : 111 : _q51 = do_valueize (valueize, _q51);
8528 : 111 : if (tree_swap_operands_p (_q50, _q51))
8529 : 10 : std::swap (_q50, _q51);
8530 : 111 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8531 : : {
8532 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8533 : : {
8534 : 8 : {
8535 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8536 : 8 : if (gimple_simplify_18 (res_op, seq, valueize, type, captures))
8537 : 8 : return true;
8538 : : }
8539 : : }
8540 : : }
8541 : 4923 : break;
8542 : : }
8543 : : default:;
8544 : : }
8545 : : }
8546 : : break;
8547 : 4923 : default:;
8548 : : }
8549 : 4923 : switch (TREE_CODE (_q21))
8550 : : {
8551 : 4517 : case SSA_NAME:
8552 : 4517 : if (gimple *_d2 = get_def (valueize, _q21))
8553 : : {
8554 : 4125 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8555 : 3958 : switch (gimple_assign_rhs_code (_a2))
8556 : : {
8557 : 0 : case BIT_NOT_EXPR:
8558 : 0 : {
8559 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8560 : 0 : _q40 = do_valueize (valueize, _q40);
8561 : 0 : switch (TREE_CODE (_p1))
8562 : : {
8563 : 0 : case SSA_NAME:
8564 : 0 : if (gimple *_d3 = get_def (valueize, _p1))
8565 : : {
8566 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8567 : 0 : switch (gimple_assign_rhs_code (_a3))
8568 : : {
8569 : 0 : case BIT_IOR_EXPR:
8570 : 0 : {
8571 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8572 : 0 : _q60 = do_valueize (valueize, _q60);
8573 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
8574 : 0 : _q61 = do_valueize (valueize, _q61);
8575 : 0 : if (tree_swap_operands_p (_q60, _q61))
8576 : 0 : std::swap (_q60, _q61);
8577 : 0 : if ((_q60 == _q40 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q40, 0) && types_match (_q60, _q40)))
8578 : : {
8579 : 0 : switch (TREE_CODE (_q61))
8580 : : {
8581 : 0 : case SSA_NAME:
8582 : 0 : if (gimple *_d4 = get_def (valueize, _q61))
8583 : : {
8584 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
8585 : 0 : switch (gimple_assign_rhs_code (_a4))
8586 : : {
8587 : 0 : case BIT_NOT_EXPR:
8588 : 0 : {
8589 : 0 : tree _q80 = gimple_assign_rhs1 (_a4);
8590 : 0 : _q80 = do_valueize (valueize, _q80);
8591 : 0 : if ((_q80 == _q20 && ! TREE_SIDE_EFFECTS (_q80)) || (operand_equal_p (_q80, _q20, 0) && types_match (_q80, _q20)))
8592 : : {
8593 : 0 : {
8594 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
8595 : 0 : if (gimple_simplify_14 (res_op, seq, valueize, type, captures))
8596 : 0 : return true;
8597 : : }
8598 : : }
8599 : : break;
8600 : : }
8601 : : default:;
8602 : : }
8603 : : }
8604 : : break;
8605 : : default:;
8606 : : }
8607 : : }
8608 : 0 : switch (TREE_CODE (_q60))
8609 : : {
8610 : 0 : case SSA_NAME:
8611 : 0 : if (gimple *_d4 = get_def (valueize, _q60))
8612 : : {
8613 : 0 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
8614 : 0 : switch (gimple_assign_rhs_code (_a4))
8615 : : {
8616 : 0 : case BIT_NOT_EXPR:
8617 : 0 : {
8618 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
8619 : 0 : _q70 = do_valueize (valueize, _q70);
8620 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
8621 : : {
8622 : 0 : if ((_q61 == _q40 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q40, 0) && types_match (_q61, _q40)))
8623 : : {
8624 : 0 : {
8625 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q40, _q20 };
8626 : 0 : if (gimple_simplify_14 (res_op, seq, valueize, type, captures))
8627 : 0 : return true;
8628 : : }
8629 : : }
8630 : : }
8631 : : break;
8632 : : }
8633 : : default:;
8634 : : }
8635 : : }
8636 : : break;
8637 : : default:;
8638 : : }
8639 : 4923 : break;
8640 : : }
8641 : : default:;
8642 : : }
8643 : : }
8644 : : break;
8645 : : default:;
8646 : : }
8647 : : break;
8648 : : }
8649 : : default:;
8650 : : }
8651 : : }
8652 : : break;
8653 : 4923 : default:;
8654 : : }
8655 : 4923 : switch (TREE_CODE (_p1))
8656 : : {
8657 : 4479 : case SSA_NAME:
8658 : 4479 : if (gimple *_d2 = get_def (valueize, _p1))
8659 : : {
8660 : 4068 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8661 : 4798 : switch (gimple_assign_rhs_code (_a2))
8662 : : {
8663 : 226 : CASE_CONVERT:
8664 : 226 : {
8665 : 226 : tree _q50 = gimple_assign_rhs1 (_a2);
8666 : 226 : _q50 = do_valueize (valueize, _q50);
8667 : 226 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
8668 : : {
8669 : 0 : {
8670 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q20 };
8671 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8672 : 0 : return true;
8673 : : }
8674 : : }
8675 : 226 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q21, 0))
8676 : : {
8677 : 0 : {
8678 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q21 };
8679 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8680 : 0 : return true;
8681 : : }
8682 : : }
8683 : : break;
8684 : : }
8685 : : default:;
8686 : : }
8687 : : }
8688 : : break;
8689 : 4923 : default:;
8690 : : }
8691 : 4923 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q20, 0))
8692 : : {
8693 : 0 : {
8694 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q20 };
8695 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8696 : 0 : return true;
8697 : : }
8698 : : }
8699 : 4923 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
8700 : : {
8701 : 0 : {
8702 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q21 };
8703 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
8704 : 0 : return true;
8705 : : }
8706 : : }
8707 : 4923 : {
8708 : 4923 : tree _q20_pops[1];
8709 : 4923 : if (gimple_nop_convert (_q20, _q20_pops, valueize))
8710 : : {
8711 : 17 : tree _q30 = _q20_pops[0];
8712 : 17 : switch (TREE_CODE (_q30))
8713 : : {
8714 : 17 : case SSA_NAME:
8715 : 17 : if (gimple *_d2 = get_def (valueize, _q30))
8716 : : {
8717 : 17 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8718 : 5 : switch (gimple_assign_rhs_code (_a2))
8719 : : {
8720 : 0 : case BIT_NOT_EXPR:
8721 : 0 : {
8722 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8723 : 0 : _q40 = do_valueize (valueize, _q40);
8724 : 0 : {
8725 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q21, _p1 };
8726 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
8727 : 0 : return true;
8728 : : }
8729 : 0 : break;
8730 : : }
8731 : : default:;
8732 : : }
8733 : : }
8734 : : break;
8735 : : default:;
8736 : : }
8737 : : }
8738 : : }
8739 : 4923 : switch (TREE_CODE (_q21))
8740 : : {
8741 : 4517 : case SSA_NAME:
8742 : 4517 : if (gimple *_d2 = get_def (valueize, _q21))
8743 : : {
8744 : 4125 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8745 : 3958 : switch (gimple_assign_rhs_code (_a2))
8746 : : {
8747 : 0 : case BIT_NOT_EXPR:
8748 : 0 : {
8749 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
8750 : 0 : _q40 = do_valueize (valueize, _q40);
8751 : 0 : {
8752 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q20, _p1 };
8753 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
8754 : 0 : return true;
8755 : : }
8756 : 0 : break;
8757 : : }
8758 : : default:;
8759 : : }
8760 : : }
8761 : : break;
8762 : 4923 : default:;
8763 : : }
8764 : 4923 : {
8765 : 4923 : tree _q21_pops[1];
8766 : 4923 : if (gimple_nop_convert (_q21, _q21_pops, valueize))
8767 : : {
8768 : 15 : tree _q40 = _q21_pops[0];
8769 : 15 : switch (TREE_CODE (_q40))
8770 : : {
8771 : 3 : case SSA_NAME:
8772 : 3 : if (gimple *_d2 = get_def (valueize, _q40))
8773 : : {
8774 : 3 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8775 : 3 : switch (gimple_assign_rhs_code (_a2))
8776 : : {
8777 : 0 : case BIT_NOT_EXPR:
8778 : 0 : {
8779 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
8780 : 0 : _q50 = do_valueize (valueize, _q50);
8781 : 0 : {
8782 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q20, _p1 };
8783 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
8784 : 0 : return true;
8785 : : }
8786 : 0 : break;
8787 : : }
8788 : : default:;
8789 : : }
8790 : : }
8791 : : break;
8792 : : default:;
8793 : : }
8794 : : }
8795 : : }
8796 : 4923 : break;
8797 : : }
8798 : 37330 : case BIT_XOR_EXPR:
8799 : 37330 : {
8800 : 37330 : tree _q20 = gimple_assign_rhs1 (_a1);
8801 : 37330 : _q20 = do_valueize (valueize, _q20);
8802 : 37330 : tree _q21 = gimple_assign_rhs2 (_a1);
8803 : 37330 : _q21 = do_valueize (valueize, _q21);
8804 : 37330 : if (tree_swap_operands_p (_q20, _q21))
8805 : 1574 : std::swap (_q20, _q21);
8806 : 37330 : switch (TREE_CODE (_p1))
8807 : : {
8808 : 34318 : case SSA_NAME:
8809 : 34318 : if (gimple *_d2 = get_def (valueize, _p1))
8810 : : {
8811 : 33083 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8812 : 39867 : switch (gimple_assign_rhs_code (_a2))
8813 : : {
8814 : 169 : case BIT_IOR_EXPR:
8815 : 169 : {
8816 : 169 : tree _q50 = gimple_assign_rhs1 (_a2);
8817 : 169 : _q50 = do_valueize (valueize, _q50);
8818 : 169 : tree _q51 = gimple_assign_rhs2 (_a2);
8819 : 169 : _q51 = do_valueize (valueize, _q51);
8820 : 169 : if (tree_swap_operands_p (_q50, _q51))
8821 : 98 : std::swap (_q50, _q51);
8822 : 169 : switch (TREE_CODE (_q50))
8823 : : {
8824 : 169 : case SSA_NAME:
8825 : 169 : if (gimple *_d3 = get_def (valueize, _q50))
8826 : : {
8827 : 142 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8828 : 118 : switch (gimple_assign_rhs_code (_a3))
8829 : : {
8830 : 0 : case BIT_NOT_EXPR:
8831 : 0 : {
8832 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
8833 : 0 : _q60 = do_valueize (valueize, _q60);
8834 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
8835 : : {
8836 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8837 : : {
8838 : 0 : {
8839 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q20, _q21, _p0 };
8840 : 0 : if (gimple_simplify_15 (res_op, seq, valueize, type, captures))
8841 : 0 : return true;
8842 : : }
8843 : : }
8844 : : }
8845 : : break;
8846 : : }
8847 : : default:;
8848 : : }
8849 : : }
8850 : : break;
8851 : 169 : default:;
8852 : : }
8853 : 169 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
8854 : : {
8855 : 0 : switch (TREE_CODE (_q51))
8856 : : {
8857 : 0 : case SSA_NAME:
8858 : 0 : if (gimple *_d3 = get_def (valueize, _q51))
8859 : : {
8860 : 0 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
8861 : 0 : switch (gimple_assign_rhs_code (_a3))
8862 : : {
8863 : 0 : case BIT_NOT_EXPR:
8864 : 0 : {
8865 : 0 : tree _q70 = gimple_assign_rhs1 (_a3);
8866 : 0 : _q70 = do_valueize (valueize, _q70);
8867 : 0 : if ((_q70 == _q20 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q20, 0) && types_match (_q70, _q20)))
8868 : : {
8869 : 0 : {
8870 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q20, _q21, _p0 };
8871 : 0 : if (gimple_simplify_15 (res_op, seq, valueize, type, captures))
8872 : 0 : return true;
8873 : : }
8874 : : }
8875 : : break;
8876 : : }
8877 : : default:;
8878 : : }
8879 : : }
8880 : : break;
8881 : : default:;
8882 : : }
8883 : : }
8884 : 169 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8885 : : {
8886 : 23 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8887 : : {
8888 : 8 : {
8889 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8890 : 8 : if (gimple_simplify_18 (res_op, seq, valueize, type, captures))
8891 : 8 : return true;
8892 : : }
8893 : : }
8894 : : }
8895 : 37314 : break;
8896 : : }
8897 : 1677 : case BIT_AND_EXPR:
8898 : 1677 : {
8899 : 1677 : tree _q50 = gimple_assign_rhs1 (_a2);
8900 : 1677 : _q50 = do_valueize (valueize, _q50);
8901 : 1677 : tree _q51 = gimple_assign_rhs2 (_a2);
8902 : 1677 : _q51 = do_valueize (valueize, _q51);
8903 : 1677 : if (tree_swap_operands_p (_q50, _q51))
8904 : 15 : std::swap (_q50, _q51);
8905 : 1677 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8906 : : {
8907 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8908 : : {
8909 : 8 : {
8910 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8911 : 8 : if (gimple_simplify_19 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
8912 : 8 : return true;
8913 : : }
8914 : : }
8915 : : }
8916 : 37314 : break;
8917 : : }
8918 : 1054 : CASE_CONVERT:
8919 : 1054 : {
8920 : 1054 : tree _q50 = gimple_assign_rhs1 (_a2);
8921 : 1054 : _q50 = do_valueize (valueize, _q50);
8922 : 1054 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q21, 0))
8923 : : {
8924 : 0 : {
8925 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q21 };
8926 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
8927 : 0 : return true;
8928 : : }
8929 : : }
8930 : 1054 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
8931 : : {
8932 : 0 : {
8933 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q20 };
8934 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
8935 : 0 : return true;
8936 : : }
8937 : : }
8938 : : break;
8939 : : }
8940 : : default:;
8941 : : }
8942 : : }
8943 : : break;
8944 : 37314 : default:;
8945 : : }
8946 : 37314 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q21, 0))
8947 : : {
8948 : 144 : {
8949 : 144 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q21 };
8950 : 144 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
8951 : 144 : return true;
8952 : : }
8953 : : }
8954 : 37170 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q20, 0))
8955 : : {
8956 : 21 : {
8957 : 21 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q20 };
8958 : 21 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
8959 : 21 : return true;
8960 : : }
8961 : : }
8962 : 523195 : break;
8963 : : }
8964 : 24148 : case BIT_AND_EXPR:
8965 : 24148 : {
8966 : 24148 : tree _q20 = gimple_assign_rhs1 (_a1);
8967 : 24148 : _q20 = do_valueize (valueize, _q20);
8968 : 24148 : tree _q21 = gimple_assign_rhs2 (_a1);
8969 : 24148 : _q21 = do_valueize (valueize, _q21);
8970 : 24148 : if (tree_swap_operands_p (_q20, _q21))
8971 : 845 : std::swap (_q20, _q21);
8972 : 24148 : switch (TREE_CODE (_p1))
8973 : : {
8974 : 16765 : case SSA_NAME:
8975 : 16765 : if (gimple *_d2 = get_def (valueize, _p1))
8976 : : {
8977 : 14521 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
8978 : 16386 : switch (gimple_assign_rhs_code (_a2))
8979 : : {
8980 : 213 : case BIT_IOR_EXPR:
8981 : 213 : {
8982 : 213 : tree _q50 = gimple_assign_rhs1 (_a2);
8983 : 213 : _q50 = do_valueize (valueize, _q50);
8984 : 213 : tree _q51 = gimple_assign_rhs2 (_a2);
8985 : 213 : _q51 = do_valueize (valueize, _q51);
8986 : 213 : if (tree_swap_operands_p (_q50, _q51))
8987 : 0 : std::swap (_q50, _q51);
8988 : 213 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
8989 : : {
8990 : 8 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
8991 : : {
8992 : 8 : {
8993 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
8994 : 8 : if (gimple_simplify_17 (res_op, seq, valueize, type, captures))
8995 : 8 : return true;
8996 : : }
8997 : : }
8998 : : }
8999 : 24130 : break;
9000 : : }
9001 : 3185 : case BIT_XOR_EXPR:
9002 : 3185 : {
9003 : 3185 : tree _q50 = gimple_assign_rhs1 (_a2);
9004 : 3185 : _q50 = do_valueize (valueize, _q50);
9005 : 3185 : tree _q51 = gimple_assign_rhs2 (_a2);
9006 : 3185 : _q51 = do_valueize (valueize, _q51);
9007 : 3185 : if (tree_swap_operands_p (_q50, _q51))
9008 : 218 : std::swap (_q50, _q51);
9009 : 3185 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
9010 : : {
9011 : 10 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
9012 : : {
9013 : 10 : {
9014 : 10 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
9015 : 10 : if (gimple_simplify_19 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
9016 : 10 : return true;
9017 : : }
9018 : : }
9019 : : }
9020 : 24130 : break;
9021 : : }
9022 : : default:;
9023 : : }
9024 : : }
9025 : : break;
9026 : 24130 : default:;
9027 : : }
9028 : 24130 : switch (TREE_CODE (_q21))
9029 : : {
9030 : 13251 : case INTEGER_CST:
9031 : 13251 : {
9032 : 13251 : switch (TREE_CODE (_p1))
9033 : : {
9034 : 6189 : case SSA_NAME:
9035 : 6189 : if (gimple *_d2 = get_def (valueize, _p1))
9036 : : {
9037 : 5140 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9038 : 6433 : switch (gimple_assign_rhs_code (_a2))
9039 : : {
9040 : 170 : CASE_CONVERT:
9041 : 170 : {
9042 : 170 : tree _q50 = gimple_assign_rhs1 (_a2);
9043 : 170 : _q50 = do_valueize (valueize, _q50);
9044 : 170 : switch (TREE_CODE (_q50))
9045 : : {
9046 : 170 : case SSA_NAME:
9047 : 170 : if (gimple *_d3 = get_def (valueize, _q50))
9048 : : {
9049 : 170 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
9050 : 261 : switch (gimple_assign_rhs_code (_a3))
9051 : : {
9052 : 0 : case BIT_AND_EXPR:
9053 : 0 : {
9054 : 0 : tree _q60 = gimple_assign_rhs1 (_a3);
9055 : 0 : _q60 = do_valueize (valueize, _q60);
9056 : 0 : tree _q61 = gimple_assign_rhs2 (_a3);
9057 : 0 : _q61 = do_valueize (valueize, _q61);
9058 : 0 : if (tree_swap_operands_p (_q60, _q61))
9059 : 0 : std::swap (_q60, _q61);
9060 : 0 : switch (TREE_CODE (_q61))
9061 : : {
9062 : 0 : case INTEGER_CST:
9063 : 0 : {
9064 : 0 : {
9065 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q50, _q60, _q61 };
9066 : 0 : if (gimple_simplify_11 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
9067 : 0 : return true;
9068 : : }
9069 : 0 : break;
9070 : : }
9071 : : default:;
9072 : : }
9073 : 523195 : break;
9074 : : }
9075 : : default:;
9076 : : }
9077 : : }
9078 : : break;
9079 : : default:;
9080 : : }
9081 : : break;
9082 : : }
9083 : 507 : case BIT_AND_EXPR:
9084 : 507 : {
9085 : 507 : tree _q50 = gimple_assign_rhs1 (_a2);
9086 : 507 : _q50 = do_valueize (valueize, _q50);
9087 : 507 : tree _q51 = gimple_assign_rhs2 (_a2);
9088 : 507 : _q51 = do_valueize (valueize, _q51);
9089 : 507 : if (tree_swap_operands_p (_q50, _q51))
9090 : 0 : std::swap (_q50, _q51);
9091 : 507 : switch (TREE_CODE (_q51))
9092 : : {
9093 : 507 : case INTEGER_CST:
9094 : 507 : {
9095 : 507 : {
9096 : 507 : tree captures[6] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q50, _q51 };
9097 : 507 : if (gimple_simplify_11 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
9098 : 73 : return true;
9099 : : }
9100 : 434 : break;
9101 : : }
9102 : : default:;
9103 : : }
9104 : 523195 : break;
9105 : : }
9106 : : default:;
9107 : : }
9108 : : }
9109 : : break;
9110 : : default:;
9111 : : }
9112 : : break;
9113 : : }
9114 : : default:;
9115 : : }
9116 : 523195 : break;
9117 : : }
9118 : : default:;
9119 : : }
9120 : : }
9121 : : break;
9122 : 523195 : default:;
9123 : : }
9124 : 523195 : switch (TREE_CODE (_p1))
9125 : : {
9126 : 414389 : case SSA_NAME:
9127 : 414389 : if (gimple *_d1 = get_def (valueize, _p1))
9128 : : {
9129 : 341278 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9130 : 416322 : switch (gimple_assign_rhs_code (_a1))
9131 : : {
9132 : 35445 : CASE_CONVERT:
9133 : 35445 : {
9134 : 35445 : tree _q30 = gimple_assign_rhs1 (_a1);
9135 : 35445 : _q30 = do_valueize (valueize, _q30);
9136 : 35445 : switch (TREE_CODE (_q30))
9137 : : {
9138 : 35445 : case SSA_NAME:
9139 : 35445 : if (gimple *_d2 = get_def (valueize, _q30))
9140 : : {
9141 : 34623 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9142 : 34886 : switch (gimple_assign_rhs_code (_a2))
9143 : : {
9144 : 324 : case BIT_IOR_EXPR:
9145 : 324 : {
9146 : 324 : tree _q40 = gimple_assign_rhs1 (_a2);
9147 : 324 : _q40 = do_valueize (valueize, _q40);
9148 : 324 : tree _q41 = gimple_assign_rhs2 (_a2);
9149 : 324 : _q41 = do_valueize (valueize, _q41);
9150 : 324 : if (tree_swap_operands_p (_q40, _q41))
9151 : 13 : std::swap (_q40, _q41);
9152 : 324 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
9153 : : {
9154 : 0 : {
9155 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
9156 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
9157 : 0 : return true;
9158 : : }
9159 : : }
9160 : 324 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
9161 : : {
9162 : 0 : {
9163 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
9164 : 0 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
9165 : 0 : return true;
9166 : : }
9167 : : }
9168 : 523179 : break;
9169 : : }
9170 : : default:;
9171 : : }
9172 : : }
9173 : : break;
9174 : : default:;
9175 : : }
9176 : : break;
9177 : : }
9178 : 2027 : case BIT_IOR_EXPR:
9179 : 2027 : {
9180 : 2027 : tree _q30 = gimple_assign_rhs1 (_a1);
9181 : 2027 : _q30 = do_valueize (valueize, _q30);
9182 : 2027 : tree _q31 = gimple_assign_rhs2 (_a1);
9183 : 2027 : _q31 = do_valueize (valueize, _q31);
9184 : 2027 : if (tree_swap_operands_p (_q30, _q31))
9185 : 219 : std::swap (_q30, _q31);
9186 : 2027 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
9187 : : {
9188 : 5 : {
9189 : 5 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
9190 : 5 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
9191 : 5 : return true;
9192 : : }
9193 : : }
9194 : 2022 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
9195 : : {
9196 : 11 : {
9197 : 11 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _p0 };
9198 : 11 : if (gimple_simplify_12 (res_op, seq, valueize, type, captures))
9199 : 11 : return true;
9200 : : }
9201 : : }
9202 : 523179 : break;
9203 : : }
9204 : : default:;
9205 : : }
9206 : : }
9207 : : break;
9208 : 523179 : default:;
9209 : : }
9210 : 523179 : {
9211 : 523179 : tree _p0_pops[1];
9212 : 523179 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
9213 : : {
9214 : 9806 : tree _q20 = _p0_pops[0];
9215 : 9806 : switch (TREE_CODE (_q20))
9216 : : {
9217 : 9751 : case SSA_NAME:
9218 : 9751 : if (gimple *_d1 = get_def (valueize, _q20))
9219 : : {
9220 : 9433 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9221 : 6979 : switch (gimple_assign_rhs_code (_a1))
9222 : : {
9223 : 69 : case BIT_IOR_EXPR:
9224 : 69 : {
9225 : 69 : tree _q30 = gimple_assign_rhs1 (_a1);
9226 : 69 : _q30 = do_valueize (valueize, _q30);
9227 : 69 : tree _q31 = gimple_assign_rhs2 (_a1);
9228 : 69 : _q31 = do_valueize (valueize, _q31);
9229 : 69 : if (tree_swap_operands_p (_q30, _q31))
9230 : 6 : std::swap (_q30, _q31);
9231 : 69 : {
9232 : 69 : tree _q30_pops[1];
9233 : 69 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
9234 : : {
9235 : 13 : tree _q40 = _q30_pops[0];
9236 : 13 : switch (TREE_CODE (_q40))
9237 : : {
9238 : 13 : case SSA_NAME:
9239 : 13 : if (gimple *_d2 = get_def (valueize, _q40))
9240 : : {
9241 : 13 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9242 : 1 : switch (gimple_assign_rhs_code (_a2))
9243 : : {
9244 : 0 : case BIT_NOT_EXPR:
9245 : 0 : {
9246 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9247 : 0 : _q50 = do_valueize (valueize, _q50);
9248 : 0 : {
9249 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q31, _p1 };
9250 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9251 : 0 : return true;
9252 : : }
9253 : 0 : break;
9254 : : }
9255 : : default:;
9256 : : }
9257 : : }
9258 : : break;
9259 : : default:;
9260 : : }
9261 : : }
9262 : : }
9263 : 69 : {
9264 : 69 : tree _q31_pops[1];
9265 : 69 : if (gimple_nop_convert (_q31, _q31_pops, valueize))
9266 : : {
9267 : 12 : tree _q50 = _q31_pops[0];
9268 : 12 : switch (TREE_CODE (_q50))
9269 : : {
9270 : 0 : case SSA_NAME:
9271 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
9272 : : {
9273 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9274 : 0 : switch (gimple_assign_rhs_code (_a2))
9275 : : {
9276 : 0 : case BIT_NOT_EXPR:
9277 : 0 : {
9278 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
9279 : 0 : _q60 = do_valueize (valueize, _q60);
9280 : 0 : {
9281 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q60, _q30, _p1 };
9282 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9283 : 0 : return true;
9284 : : }
9285 : 0 : break;
9286 : : }
9287 : : default:;
9288 : : }
9289 : : }
9290 : : break;
9291 : : default:;
9292 : : }
9293 : : }
9294 : : }
9295 : 69 : switch (TREE_CODE (_q30))
9296 : : {
9297 : 69 : case SSA_NAME:
9298 : 69 : if (gimple *_d2 = get_def (valueize, _q30))
9299 : : {
9300 : 69 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9301 : 69 : switch (gimple_assign_rhs_code (_a2))
9302 : : {
9303 : 0 : case BIT_NOT_EXPR:
9304 : 0 : {
9305 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
9306 : 0 : _q40 = do_valueize (valueize, _q40);
9307 : 0 : {
9308 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q31, _p1 };
9309 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9310 : 0 : return true;
9311 : : }
9312 : 0 : break;
9313 : : }
9314 : : default:;
9315 : : }
9316 : : }
9317 : : break;
9318 : 69 : default:;
9319 : : }
9320 : 69 : switch (TREE_CODE (_q31))
9321 : : {
9322 : 69 : case SSA_NAME:
9323 : 69 : if (gimple *_d2 = get_def (valueize, _q31))
9324 : : {
9325 : 69 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9326 : 69 : switch (gimple_assign_rhs_code (_a2))
9327 : : {
9328 : 0 : case BIT_NOT_EXPR:
9329 : 0 : {
9330 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9331 : 0 : _q50 = do_valueize (valueize, _q50);
9332 : 0 : {
9333 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q30, _p1 };
9334 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9335 : 0 : return true;
9336 : : }
9337 : 0 : break;
9338 : : }
9339 : : default:;
9340 : : }
9341 : : }
9342 : : break;
9343 : : default:;
9344 : : }
9345 : 523179 : break;
9346 : : }
9347 : : default:;
9348 : : }
9349 : : }
9350 : : break;
9351 : : default:;
9352 : : }
9353 : : }
9354 : : }
9355 : 523179 : switch (TREE_CODE (_p1))
9356 : : {
9357 : 414373 : case SSA_NAME:
9358 : 414373 : if (gimple *_d1 = get_def (valueize, _p1))
9359 : : {
9360 : 341262 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9361 : 416306 : switch (gimple_assign_rhs_code (_a1))
9362 : : {
9363 : 2011 : case BIT_IOR_EXPR:
9364 : 2011 : {
9365 : 2011 : tree _q30 = gimple_assign_rhs1 (_a1);
9366 : 2011 : _q30 = do_valueize (valueize, _q30);
9367 : 2011 : tree _q31 = gimple_assign_rhs2 (_a1);
9368 : 2011 : _q31 = do_valueize (valueize, _q31);
9369 : 2011 : if (tree_swap_operands_p (_q30, _q31))
9370 : 219 : std::swap (_q30, _q31);
9371 : 2011 : {
9372 : 2011 : tree _q30_pops[1];
9373 : 2011 : if (gimple_nop_convert (_q30, _q30_pops, valueize))
9374 : : {
9375 : 72 : tree _q40 = _q30_pops[0];
9376 : 72 : switch (TREE_CODE (_q40))
9377 : : {
9378 : 72 : case SSA_NAME:
9379 : 72 : if (gimple *_d2 = get_def (valueize, _q40))
9380 : : {
9381 : 72 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9382 : 72 : switch (gimple_assign_rhs_code (_a2))
9383 : : {
9384 : 42 : case BIT_NOT_EXPR:
9385 : 42 : {
9386 : 42 : tree _q50 = gimple_assign_rhs1 (_a2);
9387 : 42 : _q50 = do_valueize (valueize, _q50);
9388 : 42 : {
9389 : 42 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q31, _p0 };
9390 : 42 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9391 : 21 : return true;
9392 : : }
9393 : 21 : break;
9394 : : }
9395 : : default:;
9396 : : }
9397 : : }
9398 : : break;
9399 : : default:;
9400 : : }
9401 : : }
9402 : : }
9403 : 1990 : {
9404 : 1990 : tree _q31_pops[1];
9405 : 1990 : if (gimple_nop_convert (_q31, _q31_pops, valueize))
9406 : : {
9407 : 0 : tree _q50 = _q31_pops[0];
9408 : 0 : switch (TREE_CODE (_q50))
9409 : : {
9410 : 0 : case SSA_NAME:
9411 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
9412 : : {
9413 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9414 : 0 : switch (gimple_assign_rhs_code (_a2))
9415 : : {
9416 : 0 : case BIT_NOT_EXPR:
9417 : 0 : {
9418 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
9419 : 0 : _q60 = do_valueize (valueize, _q60);
9420 : 0 : {
9421 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q60, _q30, _p0 };
9422 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9423 : 0 : return true;
9424 : : }
9425 : 0 : break;
9426 : : }
9427 : : default:;
9428 : : }
9429 : : }
9430 : : break;
9431 : : default:;
9432 : : }
9433 : : }
9434 : : }
9435 : 1990 : switch (TREE_CODE (_q30))
9436 : : {
9437 : 1990 : case SSA_NAME:
9438 : 1990 : if (gimple *_d2 = get_def (valueize, _q30))
9439 : : {
9440 : 1773 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9441 : 1927 : switch (gimple_assign_rhs_code (_a2))
9442 : : {
9443 : 128 : case BIT_NOT_EXPR:
9444 : 128 : {
9445 : 128 : tree _q40 = gimple_assign_rhs1 (_a2);
9446 : 128 : _q40 = do_valueize (valueize, _q40);
9447 : 128 : {
9448 : 128 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q31, _p0 };
9449 : 128 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9450 : 56 : return true;
9451 : : }
9452 : 72 : break;
9453 : : }
9454 : : default:;
9455 : : }
9456 : : }
9457 : : break;
9458 : 1934 : default:;
9459 : : }
9460 : 1934 : switch (TREE_CODE (_q31))
9461 : : {
9462 : 1812 : case SSA_NAME:
9463 : 1812 : if (gimple *_d2 = get_def (valueize, _q31))
9464 : : {
9465 : 1720 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9466 : 1628 : switch (gimple_assign_rhs_code (_a2))
9467 : : {
9468 : 640 : case BIT_NOT_EXPR:
9469 : 640 : {
9470 : 640 : tree _q50 = gimple_assign_rhs1 (_a2);
9471 : 640 : _q50 = do_valueize (valueize, _q50);
9472 : 640 : {
9473 : 640 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q30, _p0 };
9474 : 640 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9475 : 0 : return true;
9476 : : }
9477 : 640 : break;
9478 : : }
9479 : : default:;
9480 : : }
9481 : : }
9482 : : break;
9483 : : default:;
9484 : : }
9485 : 523102 : break;
9486 : : }
9487 : : default:;
9488 : : }
9489 : : }
9490 : : break;
9491 : 523102 : default:;
9492 : : }
9493 : 523102 : {
9494 : 523102 : tree _p1_pops[1];
9495 : 523102 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
9496 : : {
9497 : 6097 : tree _q30 = _p1_pops[0];
9498 : 6097 : switch (TREE_CODE (_q30))
9499 : : {
9500 : 6097 : case SSA_NAME:
9501 : 6097 : if (gimple *_d1 = get_def (valueize, _q30))
9502 : : {
9503 : 5741 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9504 : 4711 : switch (gimple_assign_rhs_code (_a1))
9505 : : {
9506 : 22 : case BIT_IOR_EXPR:
9507 : 22 : {
9508 : 22 : tree _q40 = gimple_assign_rhs1 (_a1);
9509 : 22 : _q40 = do_valueize (valueize, _q40);
9510 : 22 : tree _q41 = gimple_assign_rhs2 (_a1);
9511 : 22 : _q41 = do_valueize (valueize, _q41);
9512 : 22 : if (tree_swap_operands_p (_q40, _q41))
9513 : 0 : std::swap (_q40, _q41);
9514 : 22 : {
9515 : 22 : tree _q40_pops[1];
9516 : 22 : if (gimple_nop_convert (_q40, _q40_pops, valueize))
9517 : : {
9518 : 0 : tree _q50 = _q40_pops[0];
9519 : 0 : switch (TREE_CODE (_q50))
9520 : : {
9521 : 0 : case SSA_NAME:
9522 : 0 : if (gimple *_d2 = get_def (valueize, _q50))
9523 : : {
9524 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9525 : 0 : switch (gimple_assign_rhs_code (_a2))
9526 : : {
9527 : 0 : case BIT_NOT_EXPR:
9528 : 0 : {
9529 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
9530 : 0 : _q60 = do_valueize (valueize, _q60);
9531 : 0 : {
9532 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q60, _q41, _p0 };
9533 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9534 : 0 : return true;
9535 : : }
9536 : 0 : break;
9537 : : }
9538 : : default:;
9539 : : }
9540 : : }
9541 : : break;
9542 : : default:;
9543 : : }
9544 : : }
9545 : : }
9546 : 22 : {
9547 : 22 : tree _q41_pops[1];
9548 : 22 : if (gimple_nop_convert (_q41, _q41_pops, valueize))
9549 : : {
9550 : 0 : tree _q60 = _q41_pops[0];
9551 : 0 : switch (TREE_CODE (_q60))
9552 : : {
9553 : 0 : case SSA_NAME:
9554 : 0 : if (gimple *_d2 = get_def (valueize, _q60))
9555 : : {
9556 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9557 : 0 : switch (gimple_assign_rhs_code (_a2))
9558 : : {
9559 : 0 : case BIT_NOT_EXPR:
9560 : 0 : {
9561 : 0 : tree _q70 = gimple_assign_rhs1 (_a2);
9562 : 0 : _q70 = do_valueize (valueize, _q70);
9563 : 0 : {
9564 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q70, _q40, _p0 };
9565 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9566 : 0 : return true;
9567 : : }
9568 : 0 : break;
9569 : : }
9570 : : default:;
9571 : : }
9572 : : }
9573 : : break;
9574 : : default:;
9575 : : }
9576 : : }
9577 : : }
9578 : 22 : switch (TREE_CODE (_q40))
9579 : : {
9580 : 22 : case SSA_NAME:
9581 : 22 : if (gimple *_d2 = get_def (valueize, _q40))
9582 : : {
9583 : 22 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9584 : 22 : switch (gimple_assign_rhs_code (_a2))
9585 : : {
9586 : 0 : case BIT_NOT_EXPR:
9587 : 0 : {
9588 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
9589 : 0 : _q50 = do_valueize (valueize, _q50);
9590 : 0 : {
9591 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q41, _p0 };
9592 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9593 : 0 : return true;
9594 : : }
9595 : 0 : break;
9596 : : }
9597 : : default:;
9598 : : }
9599 : : }
9600 : : break;
9601 : 22 : default:;
9602 : : }
9603 : 22 : switch (TREE_CODE (_q41))
9604 : : {
9605 : 22 : case SSA_NAME:
9606 : 22 : if (gimple *_d2 = get_def (valueize, _q41))
9607 : : {
9608 : 22 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9609 : 22 : switch (gimple_assign_rhs_code (_a2))
9610 : : {
9611 : 0 : case BIT_NOT_EXPR:
9612 : 0 : {
9613 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
9614 : 0 : _q60 = do_valueize (valueize, _q60);
9615 : 0 : {
9616 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q60, _q40, _p0 };
9617 : 0 : if (gimple_simplify_16 (res_op, seq, valueize, type, captures))
9618 : 0 : return true;
9619 : : }
9620 : 0 : break;
9621 : : }
9622 : : default:;
9623 : : }
9624 : : }
9625 : : break;
9626 : : default:;
9627 : : }
9628 : 523102 : break;
9629 : : }
9630 : : default:;
9631 : : }
9632 : : }
9633 : : break;
9634 : : default:;
9635 : : }
9636 : : }
9637 : : }
9638 : 523102 : switch (TREE_CODE (_p0))
9639 : : {
9640 : 514453 : case SSA_NAME:
9641 : 514453 : if (gimple *_d1 = get_def (valueize, _p0))
9642 : : {
9643 : 411868 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9644 : 503953 : switch (gimple_assign_rhs_code (_a1))
9645 : : {
9646 : 54339 : CASE_CONVERT:
9647 : 54339 : {
9648 : 54339 : tree _q20 = gimple_assign_rhs1 (_a1);
9649 : 54339 : _q20 = do_valueize (valueize, _q20);
9650 : 54339 : switch (TREE_CODE (_q20))
9651 : : {
9652 : 54284 : case SSA_NAME:
9653 : 54284 : if (gimple *_d2 = get_def (valueize, _q20))
9654 : : {
9655 : 52307 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9656 : 61322 : switch (gimple_assign_rhs_code (_a2))
9657 : : {
9658 : 1321 : case BIT_NOT_EXPR:
9659 : 1321 : {
9660 : 1321 : tree _q30 = gimple_assign_rhs1 (_a2);
9661 : 1321 : _q30 = do_valueize (valueize, _q30);
9662 : 1321 : switch (TREE_CODE (_p1))
9663 : : {
9664 : 1297 : case SSA_NAME:
9665 : 1297 : if (gimple *_d3 = get_def (valueize, _p1))
9666 : : {
9667 : 1293 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
9668 : 1328 : switch (gimple_assign_rhs_code (_a3))
9669 : : {
9670 : 264 : CASE_CONVERT:
9671 : 264 : {
9672 : 264 : tree _q50 = gimple_assign_rhs1 (_a3);
9673 : 264 : _q50 = do_valueize (valueize, _q50);
9674 : 264 : switch (TREE_CODE (_q50))
9675 : : {
9676 : 264 : case SSA_NAME:
9677 : 264 : if (gimple *_d4 = get_def (valueize, _q50))
9678 : : {
9679 : 239 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
9680 : 179 : switch (gimple_assign_rhs_code (_a4))
9681 : : {
9682 : 28 : case BIT_NOT_EXPR:
9683 : 28 : {
9684 : 28 : tree _q60 = gimple_assign_rhs1 (_a4);
9685 : 28 : _q60 = do_valueize (valueize, _q60);
9686 : 28 : {
9687 : 28 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q60 };
9688 : 28 : if (gimple_simplify_21 (res_op, seq, valueize, type, captures))
9689 : 0 : return true;
9690 : : }
9691 : 28 : break;
9692 : : }
9693 : : default:;
9694 : : }
9695 : : }
9696 : : break;
9697 : : default:;
9698 : : }
9699 : : break;
9700 : : }
9701 : 0 : case BIT_NOT_EXPR:
9702 : 0 : {
9703 : 0 : tree _q50 = gimple_assign_rhs1 (_a3);
9704 : 0 : _q50 = do_valueize (valueize, _q50);
9705 : 0 : {
9706 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _q50 };
9707 : 0 : if (gimple_simplify_21 (res_op, seq, valueize, type, captures))
9708 : 0 : return true;
9709 : : }
9710 : 0 : break;
9711 : : }
9712 : : default:;
9713 : : }
9714 : : }
9715 : : break;
9716 : 24 : case INTEGER_CST:
9717 : 24 : {
9718 : 24 : {
9719 : 24 : tree captures[2] ATTRIBUTE_UNUSED = { _q30, _p1 };
9720 : 24 : if (gimple_simplify_22 (res_op, seq, valueize, type, captures))
9721 : 0 : return true;
9722 : : }
9723 : 24 : break;
9724 : : }
9725 : : default:;
9726 : : }
9727 : : break;
9728 : : }
9729 : : default:;
9730 : : }
9731 : : }
9732 : : break;
9733 : : default:;
9734 : : }
9735 : : break;
9736 : : }
9737 : 216 : case BIT_NOT_EXPR:
9738 : 216 : {
9739 : 216 : tree _q20 = gimple_assign_rhs1 (_a1);
9740 : 216 : _q20 = do_valueize (valueize, _q20);
9741 : 216 : switch (TREE_CODE (_p1))
9742 : : {
9743 : 200 : case SSA_NAME:
9744 : 200 : if (gimple *_d2 = get_def (valueize, _p1))
9745 : : {
9746 : 194 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9747 : 169 : switch (gimple_assign_rhs_code (_a2))
9748 : : {
9749 : 7 : CASE_CONVERT:
9750 : 7 : {
9751 : 7 : tree _q40 = gimple_assign_rhs1 (_a2);
9752 : 7 : _q40 = do_valueize (valueize, _q40);
9753 : 7 : switch (TREE_CODE (_q40))
9754 : : {
9755 : 7 : case SSA_NAME:
9756 : 7 : if (gimple *_d3 = get_def (valueize, _q40))
9757 : : {
9758 : 7 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
9759 : 7 : switch (gimple_assign_rhs_code (_a3))
9760 : : {
9761 : 7 : case BIT_NOT_EXPR:
9762 : 7 : {
9763 : 7 : tree _q50 = gimple_assign_rhs1 (_a3);
9764 : 7 : _q50 = do_valueize (valueize, _q50);
9765 : 7 : {
9766 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q50 };
9767 : 7 : if (gimple_simplify_21 (res_op, seq, valueize, type, captures))
9768 : 7 : return true;
9769 : : }
9770 : 0 : break;
9771 : : }
9772 : : default:;
9773 : : }
9774 : : }
9775 : : break;
9776 : : default:;
9777 : : }
9778 : : break;
9779 : : }
9780 : 37 : case BIT_NOT_EXPR:
9781 : 37 : {
9782 : 37 : tree _q40 = gimple_assign_rhs1 (_a2);
9783 : 37 : _q40 = do_valueize (valueize, _q40);
9784 : 37 : {
9785 : 37 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
9786 : 37 : if (gimple_simplify_21 (res_op, seq, valueize, type, captures))
9787 : 37 : return true;
9788 : : }
9789 : 0 : break;
9790 : : }
9791 : : default:;
9792 : : }
9793 : : }
9794 : : break;
9795 : 16 : case INTEGER_CST:
9796 : 16 : {
9797 : 16 : {
9798 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
9799 : 16 : if (gimple_simplify_22 (res_op, seq, valueize, type, captures))
9800 : 16 : return true;
9801 : : }
9802 : 0 : break;
9803 : : }
9804 : 156 : default:;
9805 : : }
9806 : 156 : {
9807 : 156 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p0, _q20, _p1 };
9808 : 156 : if (gimple_simplify_23 (res_op, seq, valueize, type, captures))
9809 : 107 : return true;
9810 : : }
9811 : 49 : break;
9812 : : }
9813 : 24044 : case BIT_AND_EXPR:
9814 : 24044 : {
9815 : 24044 : tree _q20 = gimple_assign_rhs1 (_a1);
9816 : 24044 : _q20 = do_valueize (valueize, _q20);
9817 : 24044 : tree _q21 = gimple_assign_rhs2 (_a1);
9818 : 24044 : _q21 = do_valueize (valueize, _q21);
9819 : 24044 : if (tree_swap_operands_p (_q20, _q21))
9820 : 845 : std::swap (_q20, _q21);
9821 : 24044 : if ((_p1 == _q21 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q21, 0) && types_match (_p1, _q21)))
9822 : : {
9823 : 2434 : {
9824 : 2434 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
9825 : 2434 : if (gimple_simplify_24 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9826 : 1274 : return true;
9827 : : }
9828 : : }
9829 : 22770 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
9830 : : {
9831 : 24 : {
9832 : 24 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q21, _q20 };
9833 : 24 : if (gimple_simplify_24 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9834 : 24 : return true;
9835 : : }
9836 : : }
9837 : 22746 : switch (TREE_CODE (_p1))
9838 : : {
9839 : 16637 : case SSA_NAME:
9840 : 16637 : if (gimple *_d2 = get_def (valueize, _p1))
9841 : : {
9842 : 14393 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9843 : 16258 : switch (gimple_assign_rhs_code (_a2))
9844 : : {
9845 : 1322 : case BIT_AND_EXPR:
9846 : 1322 : {
9847 : 1322 : tree _q50 = gimple_assign_rhs1 (_a2);
9848 : 1322 : _q50 = do_valueize (valueize, _q50);
9849 : 1322 : tree _q51 = gimple_assign_rhs2 (_a2);
9850 : 1322 : _q51 = do_valueize (valueize, _q51);
9851 : 1322 : if (tree_swap_operands_p (_q50, _q51))
9852 : 29 : std::swap (_q50, _q51);
9853 : 1322 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
9854 : : {
9855 : 18 : {
9856 : 18 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q51, _q20 };
9857 : 18 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9858 : 18 : return true;
9859 : : }
9860 : : }
9861 : 1304 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
9862 : : {
9863 : 0 : {
9864 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q50, _q20 };
9865 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9866 : 0 : return true;
9867 : : }
9868 : : }
9869 : 1304 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q21, 0))
9870 : : {
9871 : 0 : {
9872 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _q51, _q21 };
9873 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9874 : 0 : return true;
9875 : : }
9876 : : }
9877 : 1304 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q21, 0))
9878 : : {
9879 : 124 : {
9880 : 124 : tree captures[4] ATTRIBUTE_UNUSED = { _q21, _q20, _q50, _q21 };
9881 : 124 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9882 : 109 : return true;
9883 : : }
9884 : : }
9885 : 521510 : break;
9886 : : }
9887 : : default:;
9888 : : }
9889 : : }
9890 : : break;
9891 : : default:;
9892 : : }
9893 : 521510 : break;
9894 : : }
9895 : : default:;
9896 : : }
9897 : : }
9898 : : break;
9899 : 521510 : default:;
9900 : : }
9901 : 521510 : switch (TREE_CODE (_p1))
9902 : : {
9903 : 413994 : case SSA_NAME:
9904 : 413994 : if (gimple *_d1 = get_def (valueize, _p1))
9905 : : {
9906 : 340889 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9907 : 415938 : switch (gimple_assign_rhs_code (_a1))
9908 : : {
9909 : 9781 : case BIT_AND_EXPR:
9910 : 9781 : {
9911 : 9781 : tree _q30 = gimple_assign_rhs1 (_a1);
9912 : 9781 : _q30 = do_valueize (valueize, _q30);
9913 : 9781 : tree _q31 = gimple_assign_rhs2 (_a1);
9914 : 9781 : _q31 = do_valueize (valueize, _q31);
9915 : 9781 : if (tree_swap_operands_p (_q30, _q31))
9916 : 351 : std::swap (_q30, _q31);
9917 : 9781 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || (operand_equal_p (_q31, _p0, 0) && types_match (_q31, _p0)))
9918 : : {
9919 : 1 : {
9920 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q30, _p0 };
9921 : 1 : if (gimple_simplify_24 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9922 : 1 : return true;
9923 : : }
9924 : : }
9925 : 9780 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
9926 : : {
9927 : 50 : {
9928 : 50 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _q31, _p0 };
9929 : 50 : if (gimple_simplify_24 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
9930 : 50 : return true;
9931 : : }
9932 : : }
9933 : 521459 : break;
9934 : : }
9935 : : default:;
9936 : : }
9937 : : }
9938 : : break;
9939 : 521459 : default:;
9940 : : }
9941 : 521459 : switch (TREE_CODE (_p0))
9942 : : {
9943 : 512810 : case SSA_NAME:
9944 : 512810 : if (gimple *_d1 = get_def (valueize, _p0))
9945 : : {
9946 : 410225 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
9947 : 502301 : switch (gimple_assign_rhs_code (_a1))
9948 : : {
9949 : 54329 : CASE_CONVERT:
9950 : 54329 : {
9951 : 54329 : tree _q20 = gimple_assign_rhs1 (_a1);
9952 : 54329 : _q20 = do_valueize (valueize, _q20);
9953 : 54329 : switch (TREE_CODE (_q20))
9954 : : {
9955 : 54274 : case SSA_NAME:
9956 : 54274 : if (gimple *_d2 = get_def (valueize, _q20))
9957 : : {
9958 : 52297 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
9959 : 61308 : switch (gimple_assign_rhs_code (_a2))
9960 : : {
9961 : 2502 : case BIT_AND_EXPR:
9962 : 2502 : {
9963 : 2502 : tree _q30 = gimple_assign_rhs1 (_a2);
9964 : 2502 : _q30 = do_valueize (valueize, _q30);
9965 : 2502 : tree _q31 = gimple_assign_rhs2 (_a2);
9966 : 2502 : _q31 = do_valueize (valueize, _q31);
9967 : 2502 : if (tree_swap_operands_p (_q30, _q31))
9968 : 26 : std::swap (_q30, _q31);
9969 : 2502 : switch (TREE_CODE (_p1))
9970 : : {
9971 : 2361 : case SSA_NAME:
9972 : 2361 : if (gimple *_d3 = get_def (valueize, _p1))
9973 : : {
9974 : 2336 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
9975 : 2801 : switch (gimple_assign_rhs_code (_a3))
9976 : : {
9977 : 29 : CASE_CONVERT:
9978 : 29 : {
9979 : 29 : tree _q60 = gimple_assign_rhs1 (_a3);
9980 : 29 : _q60 = do_valueize (valueize, _q60);
9981 : 29 : switch (TREE_CODE (_q60))
9982 : : {
9983 : 29 : case SSA_NAME:
9984 : 29 : if (gimple *_d4 = get_def (valueize, _q60))
9985 : : {
9986 : 29 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
9987 : 55 : switch (gimple_assign_rhs_code (_a4))
9988 : : {
9989 : 0 : case BIT_AND_EXPR:
9990 : 0 : {
9991 : 0 : tree _q70 = gimple_assign_rhs1 (_a4);
9992 : 0 : _q70 = do_valueize (valueize, _q70);
9993 : 0 : tree _q71 = gimple_assign_rhs2 (_a4);
9994 : 0 : _q71 = do_valueize (valueize, _q71);
9995 : 0 : if (tree_swap_operands_p (_q70, _q71))
9996 : 0 : std::swap (_q70, _q71);
9997 : 0 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q30, 0))
9998 : : {
9999 : 0 : {
10000 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q71, _q30 };
10001 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
10002 : 0 : return true;
10003 : : }
10004 : : }
10005 : 0 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q30, 0))
10006 : : {
10007 : 0 : {
10008 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q70, _q30 };
10009 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
10010 : 0 : return true;
10011 : : }
10012 : : }
10013 : 0 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || operand_equal_p (_q70, _q31, 0))
10014 : : {
10015 : 0 : {
10016 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q71, _q31 };
10017 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
10018 : 0 : return true;
10019 : : }
10020 : : }
10021 : 0 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || operand_equal_p (_q71, _q31, 0))
10022 : : {
10023 : 0 : {
10024 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _q31, _q30, _q70, _q31 };
10025 : 0 : if (gimple_simplify_25 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR, BIT_AND_EXPR))
10026 : 0 : return true;
10027 : : }
10028 : : }
10029 : 54322 : break;
10030 : : }
10031 : : default:;
10032 : : }
10033 : : }
10034 : : break;
10035 : : default:;
10036 : : }
10037 : : break;
10038 : : }
10039 : : default:;
10040 : : }
10041 : : }
10042 : : break;
10043 : : default:;
10044 : : }
10045 : 54322 : break;
10046 : : }
10047 : 739 : case BIT_XOR_EXPR:
10048 : 739 : {
10049 : 739 : tree _q30 = gimple_assign_rhs1 (_a2);
10050 : 739 : _q30 = do_valueize (valueize, _q30);
10051 : 739 : tree _q31 = gimple_assign_rhs2 (_a2);
10052 : 739 : _q31 = do_valueize (valueize, _q31);
10053 : 739 : if (tree_swap_operands_p (_q30, _q31))
10054 : 58 : std::swap (_q30, _q31);
10055 : 739 : switch (TREE_CODE (_p1))
10056 : : {
10057 : 704 : case SSA_NAME:
10058 : 704 : if (gimple *_d3 = get_def (valueize, _p1))
10059 : : {
10060 : 679 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10061 : 714 : switch (gimple_assign_rhs_code (_a3))
10062 : : {
10063 : 285 : CASE_CONVERT:
10064 : 285 : {
10065 : 285 : tree _q60 = gimple_assign_rhs1 (_a3);
10066 : 285 : _q60 = do_valueize (valueize, _q60);
10067 : 285 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q31, 0))
10068 : : {
10069 : 0 : {
10070 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q31 };
10071 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10072 : 0 : return true;
10073 : : }
10074 : : }
10075 : 285 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || operand_equal_p (_q60, _q30, 0))
10076 : : {
10077 : 0 : {
10078 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q30 };
10079 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10080 : 0 : return true;
10081 : : }
10082 : : }
10083 : : break;
10084 : : }
10085 : : default:;
10086 : : }
10087 : : }
10088 : : break;
10089 : 739 : default:;
10090 : : }
10091 : 739 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q31, 0))
10092 : : {
10093 : 7 : {
10094 : 7 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q31 };
10095 : 7 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10096 : 7 : return true;
10097 : : }
10098 : : }
10099 : 732 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || operand_equal_p (_p1, _q30, 0))
10100 : : {
10101 : 0 : {
10102 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q30 };
10103 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10104 : 0 : return true;
10105 : : }
10106 : : }
10107 : 54322 : break;
10108 : : }
10109 : : default:;
10110 : : }
10111 : : }
10112 : : break;
10113 : 54322 : default:;
10114 : : }
10115 : 54322 : switch (TREE_CODE (_p1))
10116 : : {
10117 : 42757 : case SSA_NAME:
10118 : 42757 : if (gimple *_d2 = get_def (valueize, _p1))
10119 : : {
10120 : 41763 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10121 : 38558 : switch (gimple_assign_rhs_code (_a2))
10122 : : {
10123 : 19287 : CASE_CONVERT:
10124 : 19287 : {
10125 : 19287 : tree _q40 = gimple_assign_rhs1 (_a2);
10126 : 19287 : _q40 = do_valueize (valueize, _q40);
10127 : 19287 : switch (TREE_CODE (_q40))
10128 : : {
10129 : 19287 : case SSA_NAME:
10130 : 19287 : if (gimple *_d3 = get_def (valueize, _q40))
10131 : : {
10132 : 19154 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10133 : 19321 : switch (gimple_assign_rhs_code (_a3))
10134 : : {
10135 : 34 : case BIT_XOR_EXPR:
10136 : 34 : {
10137 : 34 : tree _q50 = gimple_assign_rhs1 (_a3);
10138 : 34 : _q50 = do_valueize (valueize, _q50);
10139 : 34 : tree _q51 = gimple_assign_rhs2 (_a3);
10140 : 34 : _q51 = do_valueize (valueize, _q51);
10141 : 34 : if (tree_swap_operands_p (_q50, _q51))
10142 : 0 : std::swap (_q50, _q51);
10143 : 34 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || operand_equal_p (_q51, _q20, 0))
10144 : : {
10145 : 0 : {
10146 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q50, _q51, _q20 };
10147 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10148 : 0 : return true;
10149 : : }
10150 : : }
10151 : 34 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || operand_equal_p (_q50, _q20, 0))
10152 : : {
10153 : 0 : {
10154 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q51, _q50, _q20 };
10155 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10156 : 0 : return true;
10157 : : }
10158 : : }
10159 : 521452 : break;
10160 : : }
10161 : : default:;
10162 : : }
10163 : : }
10164 : : break;
10165 : : default:;
10166 : : }
10167 : : break;
10168 : : }
10169 : 2214 : case BIT_XOR_EXPR:
10170 : 2214 : {
10171 : 2214 : tree _q40 = gimple_assign_rhs1 (_a2);
10172 : 2214 : _q40 = do_valueize (valueize, _q40);
10173 : 2214 : tree _q41 = gimple_assign_rhs2 (_a2);
10174 : 2214 : _q41 = do_valueize (valueize, _q41);
10175 : 2214 : if (tree_swap_operands_p (_q40, _q41))
10176 : 159 : std::swap (_q40, _q41);
10177 : 2214 : if ((_q41 == _q20 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _q20, 0))
10178 : : {
10179 : 0 : {
10180 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _q20 };
10181 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10182 : 0 : return true;
10183 : : }
10184 : : }
10185 : 2214 : if ((_q40 == _q20 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _q20, 0))
10186 : : {
10187 : 0 : {
10188 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _q20 };
10189 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10190 : 0 : return true;
10191 : : }
10192 : : }
10193 : 521452 : break;
10194 : : }
10195 : : default:;
10196 : : }
10197 : : }
10198 : : break;
10199 : : default:;
10200 : : }
10201 : : break;
10202 : : }
10203 : : default:;
10204 : : }
10205 : : }
10206 : : break;
10207 : 521452 : default:;
10208 : : }
10209 : 521452 : switch (TREE_CODE (_p1))
10210 : : {
10211 : 413943 : case SSA_NAME:
10212 : 413943 : if (gimple *_d1 = get_def (valueize, _p1))
10213 : : {
10214 : 340838 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10215 : 415887 : switch (gimple_assign_rhs_code (_a1))
10216 : : {
10217 : 35438 : CASE_CONVERT:
10218 : 35438 : {
10219 : 35438 : tree _q30 = gimple_assign_rhs1 (_a1);
10220 : 35438 : _q30 = do_valueize (valueize, _q30);
10221 : 35438 : switch (TREE_CODE (_q30))
10222 : : {
10223 : 35438 : case SSA_NAME:
10224 : 35438 : if (gimple *_d2 = get_def (valueize, _q30))
10225 : : {
10226 : 34616 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10227 : 34879 : switch (gimple_assign_rhs_code (_a2))
10228 : : {
10229 : 517 : case BIT_XOR_EXPR:
10230 : 517 : {
10231 : 517 : tree _q40 = gimple_assign_rhs1 (_a2);
10232 : 517 : _q40 = do_valueize (valueize, _q40);
10233 : 517 : tree _q41 = gimple_assign_rhs2 (_a2);
10234 : 517 : _q41 = do_valueize (valueize, _q41);
10235 : 517 : if (tree_swap_operands_p (_q40, _q41))
10236 : 22 : std::swap (_q40, _q41);
10237 : 517 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || operand_equal_p (_q41, _p0, 0))
10238 : : {
10239 : 0 : {
10240 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _p0 };
10241 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10242 : 0 : return true;
10243 : : }
10244 : : }
10245 : 517 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || operand_equal_p (_q40, _p0, 0))
10246 : : {
10247 : 0 : {
10248 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _p0 };
10249 : 0 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10250 : 0 : return true;
10251 : : }
10252 : : }
10253 : 521034 : break;
10254 : : }
10255 : : default:;
10256 : : }
10257 : : }
10258 : : break;
10259 : : default:;
10260 : : }
10261 : : break;
10262 : : }
10263 : 25355 : case BIT_XOR_EXPR:
10264 : 25355 : {
10265 : 25355 : tree _q30 = gimple_assign_rhs1 (_a1);
10266 : 25355 : _q30 = do_valueize (valueize, _q30);
10267 : 25355 : tree _q31 = gimple_assign_rhs2 (_a1);
10268 : 25355 : _q31 = do_valueize (valueize, _q31);
10269 : 25355 : if (tree_swap_operands_p (_q30, _q31))
10270 : 2066 : std::swap (_q30, _q31);
10271 : 25355 : if ((_q31 == _p0 && ! TREE_SIDE_EFFECTS (_q31)) || operand_equal_p (_q31, _p0, 0))
10272 : : {
10273 : 297 : {
10274 : 297 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _p0 };
10275 : 297 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10276 : 297 : return true;
10277 : : }
10278 : : }
10279 : 25058 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || operand_equal_p (_q30, _p0, 0))
10280 : : {
10281 : 121 : {
10282 : 121 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _p0 };
10283 : 121 : if (gimple_simplify_20 (res_op, seq, valueize, type, captures))
10284 : 121 : return true;
10285 : : }
10286 : : }
10287 : 521034 : break;
10288 : : }
10289 : : default:;
10290 : : }
10291 : : }
10292 : : break;
10293 : 521034 : default:;
10294 : : }
10295 : 521034 : switch (TREE_CODE (_p0))
10296 : : {
10297 : 512385 : case SSA_NAME:
10298 : 512385 : if (gimple *_d1 = get_def (valueize, _p0))
10299 : : {
10300 : 409803 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10301 : 501624 : switch (gimple_assign_rhs_code (_a1))
10302 : : {
10303 : 54237 : CASE_CONVERT:
10304 : 54237 : {
10305 : 54237 : tree _q20 = gimple_assign_rhs1 (_a1);
10306 : 54237 : _q20 = do_valueize (valueize, _q20);
10307 : 54237 : switch (TREE_CODE (_q20))
10308 : : {
10309 : 54182 : case SSA_NAME:
10310 : 54182 : if (gimple *_d2 = get_def (valueize, _q20))
10311 : : {
10312 : 52205 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10313 : 61213 : switch (gimple_assign_rhs_code (_a2))
10314 : : {
10315 : 698 : case BIT_XOR_EXPR:
10316 : 698 : {
10317 : 698 : tree _q30 = gimple_assign_rhs1 (_a2);
10318 : 698 : _q30 = do_valueize (valueize, _q30);
10319 : 698 : tree _q31 = gimple_assign_rhs2 (_a2);
10320 : 698 : _q31 = do_valueize (valueize, _q31);
10321 : 698 : if (tree_swap_operands_p (_q30, _q31))
10322 : 58 : std::swap (_q30, _q31);
10323 : 698 : switch (TREE_CODE (_p1))
10324 : : {
10325 : 670 : case SSA_NAME:
10326 : 670 : if (gimple *_d3 = get_def (valueize, _p1))
10327 : : {
10328 : 645 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10329 : 680 : switch (gimple_assign_rhs_code (_a3))
10330 : : {
10331 : 285 : CASE_CONVERT:
10332 : 285 : {
10333 : 285 : tree _q60 = gimple_assign_rhs1 (_a3);
10334 : 285 : _q60 = do_valueize (valueize, _q60);
10335 : 285 : switch (TREE_CODE (_q60))
10336 : : {
10337 : 285 : case SSA_NAME:
10338 : 285 : if (gimple *_d4 = get_def (valueize, _q60))
10339 : : {
10340 : 274 : if (gassign *_a4 = dyn_cast <gassign *> (_d4))
10341 : 518 : switch (gimple_assign_rhs_code (_a4))
10342 : : {
10343 : 4 : case BIT_XOR_EXPR:
10344 : 4 : {
10345 : 4 : tree _q70 = gimple_assign_rhs1 (_a4);
10346 : 4 : _q70 = do_valueize (valueize, _q70);
10347 : 4 : tree _q71 = gimple_assign_rhs2 (_a4);
10348 : 4 : _q71 = do_valueize (valueize, _q71);
10349 : 4 : if (tree_swap_operands_p (_q70, _q71))
10350 : 0 : std::swap (_q70, _q71);
10351 : 4 : if ((_q70 == _q30 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q30, 0) && types_match (_q70, _q30)))
10352 : : {
10353 : 2 : {
10354 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q71 };
10355 : 2 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10356 : 0 : return true;
10357 : : }
10358 : : }
10359 : 4 : if ((_q71 == _q30 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q30, 0) && types_match (_q71, _q30)))
10360 : : {
10361 : 0 : {
10362 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q70 };
10363 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10364 : 0 : return true;
10365 : : }
10366 : : }
10367 : 4 : if ((_q70 == _q31 && ! TREE_SIDE_EFFECTS (_q70)) || (operand_equal_p (_q70, _q31, 0) && types_match (_q70, _q31)))
10368 : : {
10369 : 2 : {
10370 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q71 };
10371 : 2 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10372 : 0 : return true;
10373 : : }
10374 : : }
10375 : 4 : if ((_q71 == _q31 && ! TREE_SIDE_EFFECTS (_q71)) || (operand_equal_p (_q71, _q31, 0) && types_match (_q71, _q31)))
10376 : : {
10377 : 0 : {
10378 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q70 };
10379 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10380 : 0 : return true;
10381 : : }
10382 : : }
10383 : 54237 : break;
10384 : : }
10385 : : default:;
10386 : : }
10387 : : }
10388 : : break;
10389 : : default:;
10390 : : }
10391 : : break;
10392 : : }
10393 : 22 : case BIT_XOR_EXPR:
10394 : 22 : {
10395 : 22 : tree _q60 = gimple_assign_rhs1 (_a3);
10396 : 22 : _q60 = do_valueize (valueize, _q60);
10397 : 22 : tree _q61 = gimple_assign_rhs2 (_a3);
10398 : 22 : _q61 = do_valueize (valueize, _q61);
10399 : 22 : if (tree_swap_operands_p (_q60, _q61))
10400 : 0 : std::swap (_q60, _q61);
10401 : 22 : if ((_q60 == _q30 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q30, 0) && types_match (_q60, _q30)))
10402 : : {
10403 : 0 : {
10404 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q61 };
10405 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10406 : 0 : return true;
10407 : : }
10408 : : }
10409 : 22 : if ((_q61 == _q30 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q30, 0) && types_match (_q61, _q30)))
10410 : : {
10411 : 0 : {
10412 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q60 };
10413 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10414 : 0 : return true;
10415 : : }
10416 : : }
10417 : 22 : if ((_q60 == _q31 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q31, 0) && types_match (_q60, _q31)))
10418 : : {
10419 : 0 : {
10420 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q61 };
10421 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10422 : 0 : return true;
10423 : : }
10424 : : }
10425 : 22 : if ((_q61 == _q31 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q31, 0) && types_match (_q61, _q31)))
10426 : : {
10427 : 0 : {
10428 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q60 };
10429 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10430 : 0 : return true;
10431 : : }
10432 : : }
10433 : 54237 : break;
10434 : : }
10435 : : default:;
10436 : : }
10437 : : }
10438 : : break;
10439 : : default:;
10440 : : }
10441 : 54237 : break;
10442 : : }
10443 : : default:;
10444 : : }
10445 : : }
10446 : : break;
10447 : 54237 : default:;
10448 : : }
10449 : 54237 : switch (TREE_CODE (_p1))
10450 : : {
10451 : 42672 : case SSA_NAME:
10452 : 42672 : if (gimple *_d2 = get_def (valueize, _p1))
10453 : : {
10454 : 41678 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10455 : 38473 : switch (gimple_assign_rhs_code (_a2))
10456 : : {
10457 : 19287 : CASE_CONVERT:
10458 : 19287 : {
10459 : 19287 : tree _q40 = gimple_assign_rhs1 (_a2);
10460 : 19287 : _q40 = do_valueize (valueize, _q40);
10461 : 19287 : {
10462 : 19287 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
10463 : 19287 : if (gimple_simplify_27 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
10464 : 339 : return true;
10465 : : }
10466 : 18948 : break;
10467 : : }
10468 : : default:;
10469 : : }
10470 : : }
10471 : : break;
10472 : 53898 : default:;
10473 : : }
10474 : 53898 : {
10475 : 53898 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _p1 };
10476 : 53898 : if (gimple_simplify_28 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
10477 : 3111 : return true;
10478 : : }
10479 : 50787 : break;
10480 : : }
10481 : 37113 : case BIT_XOR_EXPR:
10482 : 37113 : {
10483 : 37113 : tree _q20 = gimple_assign_rhs1 (_a1);
10484 : 37113 : _q20 = do_valueize (valueize, _q20);
10485 : 37113 : tree _q21 = gimple_assign_rhs2 (_a1);
10486 : 37113 : _q21 = do_valueize (valueize, _q21);
10487 : 37113 : if (tree_swap_operands_p (_q20, _q21))
10488 : 1572 : std::swap (_q20, _q21);
10489 : 37113 : switch (TREE_CODE (_p1))
10490 : : {
10491 : 34233 : case SSA_NAME:
10492 : 34233 : if (gimple *_d2 = get_def (valueize, _p1))
10493 : : {
10494 : 33007 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10495 : 39791 : switch (gimple_assign_rhs_code (_a2))
10496 : : {
10497 : 1038 : CASE_CONVERT:
10498 : 1038 : {
10499 : 1038 : tree _q50 = gimple_assign_rhs1 (_a2);
10500 : 1038 : _q50 = do_valueize (valueize, _q50);
10501 : 1038 : switch (TREE_CODE (_q50))
10502 : : {
10503 : 1038 : case SSA_NAME:
10504 : 1038 : if (gimple *_d3 = get_def (valueize, _q50))
10505 : : {
10506 : 1012 : if (gassign *_a3 = dyn_cast <gassign *> (_d3))
10507 : 1230 : switch (gimple_assign_rhs_code (_a3))
10508 : : {
10509 : 71 : case BIT_XOR_EXPR:
10510 : 71 : {
10511 : 71 : tree _q60 = gimple_assign_rhs1 (_a3);
10512 : 71 : _q60 = do_valueize (valueize, _q60);
10513 : 71 : tree _q61 = gimple_assign_rhs2 (_a3);
10514 : 71 : _q61 = do_valueize (valueize, _q61);
10515 : 71 : if (tree_swap_operands_p (_q60, _q61))
10516 : 2 : std::swap (_q60, _q61);
10517 : 71 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
10518 : : {
10519 : 0 : {
10520 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q61 };
10521 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10522 : 0 : return true;
10523 : : }
10524 : : }
10525 : 71 : if ((_q61 == _q20 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q20, 0) && types_match (_q61, _q20)))
10526 : : {
10527 : 0 : {
10528 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q60 };
10529 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10530 : 0 : return true;
10531 : : }
10532 : : }
10533 : 71 : if ((_q60 == _q21 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q21, 0) && types_match (_q60, _q21)))
10534 : : {
10535 : 0 : {
10536 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q61 };
10537 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10538 : 0 : return true;
10539 : : }
10540 : : }
10541 : 71 : if ((_q61 == _q21 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q21, 0) && types_match (_q61, _q21)))
10542 : : {
10543 : 0 : {
10544 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q60 };
10545 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10546 : 0 : return true;
10547 : : }
10548 : : }
10549 : 37083 : break;
10550 : : }
10551 : : default:;
10552 : : }
10553 : : }
10554 : : break;
10555 : : default:;
10556 : : }
10557 : : break;
10558 : : }
10559 : 2565 : case BIT_XOR_EXPR:
10560 : 2565 : {
10561 : 2565 : tree _q50 = gimple_assign_rhs1 (_a2);
10562 : 2565 : _q50 = do_valueize (valueize, _q50);
10563 : 2565 : tree _q51 = gimple_assign_rhs2 (_a2);
10564 : 2565 : _q51 = do_valueize (valueize, _q51);
10565 : 2565 : if (tree_swap_operands_p (_q50, _q51))
10566 : 271 : std::swap (_q50, _q51);
10567 : 2565 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10568 : : {
10569 : 2 : {
10570 : 2 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q51 };
10571 : 2 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10572 : 2 : return true;
10573 : : }
10574 : : }
10575 : 2563 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10576 : : {
10577 : 0 : {
10578 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _q50 };
10579 : 0 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10580 : 0 : return true;
10581 : : }
10582 : : }
10583 : 2563 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10584 : : {
10585 : 4 : {
10586 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q51 };
10587 : 4 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10588 : 4 : return true;
10589 : : }
10590 : : }
10591 : 2559 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10592 : : {
10593 : 24 : {
10594 : 24 : tree captures[3] ATTRIBUTE_UNUSED = { _q21, _q20, _q50 };
10595 : 24 : if (gimple_simplify_26 (res_op, seq, valueize, type, captures))
10596 : 24 : return true;
10597 : : }
10598 : : }
10599 : 37083 : break;
10600 : : }
10601 : : default:;
10602 : : }
10603 : : }
10604 : : break;
10605 : 37083 : default:;
10606 : : }
10607 : 37083 : if (CONSTANT_CLASS_P (_q21))
10608 : : {
10609 : 1043 : if (CONSTANT_CLASS_P (_p1))
10610 : : {
10611 : 73 : {
10612 : 73 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
10613 : 73 : if (gimple_simplify_29 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
10614 : 73 : return true;
10615 : : }
10616 : : }
10617 : : }
10618 : 517479 : break;
10619 : : }
10620 : 22619 : case BIT_AND_EXPR:
10621 : 22619 : {
10622 : 22619 : tree _q20 = gimple_assign_rhs1 (_a1);
10623 : 22619 : _q20 = do_valueize (valueize, _q20);
10624 : 22619 : tree _q21 = gimple_assign_rhs2 (_a1);
10625 : 22619 : _q21 = do_valueize (valueize, _q21);
10626 : 22619 : if (tree_swap_operands_p (_q20, _q21))
10627 : 845 : std::swap (_q20, _q21);
10628 : 22619 : if (gimple_truth_valued_p (_q20, valueize))
10629 : : {
10630 : 30 : if (gimple_truth_valued_p (_q21, valueize))
10631 : : {
10632 : 30 : switch (TREE_CODE (_p1))
10633 : : {
10634 : 30 : case SSA_NAME:
10635 : 30 : if (gimple *_d2 = get_def (valueize, _p1))
10636 : : {
10637 : 30 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10638 : 2 : switch (gimple_assign_rhs_code (_a2))
10639 : : {
10640 : 2 : case EQ_EXPR:
10641 : 2 : {
10642 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
10643 : 2 : _q50 = do_valueize (valueize, _q50);
10644 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
10645 : 2 : _q51 = do_valueize (valueize, _q51);
10646 : 2 : if (tree_swap_operands_p (_q50, _q51))
10647 : 0 : std::swap (_q50, _q51);
10648 : 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10649 : : {
10650 : 2 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10651 : : {
10652 : 2 : {
10653 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10654 : 2 : gimple_seq *lseq = seq;
10655 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1509;
10656 : 2 : {
10657 : 2 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10658 : 2 : {
10659 : 2 : tree _o1[2], _r1;
10660 : 2 : _o1[0] = captures[0];
10661 : 2 : _o1[1] = captures[1];
10662 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10663 : 2 : tem_op.resimplify (lseq, valueize);
10664 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10665 : 2 : if (!_r1) goto next_after_fail1509;
10666 : 1 : res_op->ops[0] = _r1;
10667 : : }
10668 : 1 : res_op->resimplify (lseq, valueize);
10669 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10670 : 1 : return true;
10671 : : }
10672 : 1 : next_after_fail1509:;
10673 : : }
10674 : 1 : {
10675 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10676 : 1 : gimple_seq *lseq = seq;
10677 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1510;
10678 : 1 : {
10679 : 1 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10680 : 1 : {
10681 : 1 : tree _o1[2], _r1;
10682 : 1 : _o1[0] = captures[0];
10683 : 1 : _o1[1] = captures[1];
10684 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10685 : 1 : tem_op.resimplify (lseq, valueize);
10686 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10687 : 1 : if (!_r1) goto next_after_fail1510;
10688 : 0 : res_op->ops[0] = _r1;
10689 : : }
10690 : 0 : res_op->resimplify (lseq, valueize);
10691 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10692 : 0 : return true;
10693 : : }
10694 : 1 : next_after_fail1510:;
10695 : : }
10696 : : }
10697 : : }
10698 : 1 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10699 : : {
10700 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10701 : : {
10702 : 0 : {
10703 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10704 : 0 : gimple_seq *lseq = seq;
10705 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1511;
10706 : 0 : {
10707 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10708 : 0 : {
10709 : 0 : tree _o1[2], _r1;
10710 : 0 : _o1[0] = captures[0];
10711 : 0 : _o1[1] = captures[1];
10712 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10713 : 0 : tem_op.resimplify (lseq, valueize);
10714 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10715 : 0 : if (!_r1) goto next_after_fail1511;
10716 : 0 : res_op->ops[0] = _r1;
10717 : : }
10718 : 0 : res_op->resimplify (lseq, valueize);
10719 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10720 : 0 : return true;
10721 : : }
10722 : 0 : next_after_fail1511:;
10723 : : }
10724 : 0 : {
10725 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10726 : 0 : gimple_seq *lseq = seq;
10727 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1512;
10728 : 0 : {
10729 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10730 : 0 : {
10731 : 0 : tree _o1[2], _r1;
10732 : 0 : _o1[0] = captures[0];
10733 : 0 : _o1[1] = captures[1];
10734 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10735 : 0 : tem_op.resimplify (lseq, valueize);
10736 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10737 : 0 : if (!_r1) goto next_after_fail1512;
10738 : 0 : res_op->ops[0] = _r1;
10739 : : }
10740 : 0 : res_op->resimplify (lseq, valueize);
10741 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10742 : 0 : return true;
10743 : : }
10744 : 0 : next_after_fail1512:;
10745 : : }
10746 : : }
10747 : : }
10748 : 517479 : break;
10749 : : }
10750 : : default:;
10751 : : }
10752 : : }
10753 : : break;
10754 : : default:;
10755 : : }
10756 : : }
10757 : : }
10758 : 517479 : break;
10759 : : }
10760 : 627 : case EQ_EXPR:
10761 : 627 : {
10762 : 627 : tree _q20 = gimple_assign_rhs1 (_a1);
10763 : 627 : _q20 = do_valueize (valueize, _q20);
10764 : 627 : tree _q21 = gimple_assign_rhs2 (_a1);
10765 : 627 : _q21 = do_valueize (valueize, _q21);
10766 : 627 : if (tree_swap_operands_p (_q20, _q21))
10767 : 0 : std::swap (_q20, _q21);
10768 : 627 : switch (TREE_CODE (_p1))
10769 : : {
10770 : 627 : case SSA_NAME:
10771 : 627 : if (gimple *_d2 = get_def (valueize, _p1))
10772 : : {
10773 : 622 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
10774 : 602 : switch (gimple_assign_rhs_code (_a2))
10775 : : {
10776 : 1 : case BIT_AND_EXPR:
10777 : 1 : {
10778 : 1 : tree _q50 = gimple_assign_rhs1 (_a2);
10779 : 1 : _q50 = do_valueize (valueize, _q50);
10780 : 1 : tree _q51 = gimple_assign_rhs2 (_a2);
10781 : 1 : _q51 = do_valueize (valueize, _q51);
10782 : 1 : if (tree_swap_operands_p (_q50, _q51))
10783 : 0 : std::swap (_q50, _q51);
10784 : 1 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
10785 : : {
10786 : 1 : if (gimple_truth_valued_p (_q50, valueize))
10787 : : {
10788 : 1 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
10789 : : {
10790 : 1 : if (gimple_truth_valued_p (_q51, valueize))
10791 : : {
10792 : 1 : {
10793 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10794 : 1 : gimple_seq *lseq = seq;
10795 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1513;
10796 : 1 : {
10797 : 1 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10798 : 1 : {
10799 : 1 : tree _o1[2], _r1;
10800 : 1 : _o1[0] = captures[0];
10801 : 1 : _o1[1] = captures[1];
10802 : 1 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10803 : 1 : tem_op.resimplify (lseq, valueize);
10804 : 1 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10805 : 1 : if (!_r1) goto next_after_fail1513;
10806 : 1 : res_op->ops[0] = _r1;
10807 : : }
10808 : 1 : res_op->resimplify (lseq, valueize);
10809 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10810 : 1 : return true;
10811 : : }
10812 : 0 : next_after_fail1513:;
10813 : : }
10814 : 0 : {
10815 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10816 : 0 : gimple_seq *lseq = seq;
10817 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1514;
10818 : 0 : {
10819 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10820 : 0 : {
10821 : 0 : tree _o1[2], _r1;
10822 : 0 : _o1[0] = captures[0];
10823 : 0 : _o1[1] = captures[1];
10824 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10825 : 0 : tem_op.resimplify (lseq, valueize);
10826 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10827 : 0 : if (!_r1) goto next_after_fail1514;
10828 : 0 : res_op->ops[0] = _r1;
10829 : : }
10830 : 0 : res_op->resimplify (lseq, valueize);
10831 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10832 : 0 : return true;
10833 : : }
10834 : 0 : next_after_fail1514:;
10835 : : }
10836 : : }
10837 : : }
10838 : : }
10839 : : }
10840 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
10841 : : {
10842 : 0 : if (gimple_truth_valued_p (_q50, valueize))
10843 : : {
10844 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
10845 : : {
10846 : 0 : if (gimple_truth_valued_p (_q51, valueize))
10847 : : {
10848 : 0 : {
10849 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
10850 : 0 : gimple_seq *lseq = seq;
10851 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1515;
10852 : 0 : {
10853 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10854 : 0 : {
10855 : 0 : tree _o1[2], _r1;
10856 : 0 : _o1[0] = captures[0];
10857 : 0 : _o1[1] = captures[1];
10858 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10859 : 0 : tem_op.resimplify (lseq, valueize);
10860 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10861 : 0 : if (!_r1) goto next_after_fail1515;
10862 : 0 : res_op->ops[0] = _r1;
10863 : : }
10864 : 0 : res_op->resimplify (lseq, valueize);
10865 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10866 : 0 : return true;
10867 : : }
10868 : 0 : next_after_fail1515:;
10869 : : }
10870 : 0 : {
10871 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
10872 : 0 : gimple_seq *lseq = seq;
10873 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1516;
10874 : 0 : {
10875 : 0 : res_op->set_op (BIT_NOT_EXPR, type, 1);
10876 : 0 : {
10877 : 0 : tree _o1[2], _r1;
10878 : 0 : _o1[0] = captures[0];
10879 : 0 : _o1[1] = captures[1];
10880 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_IOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
10881 : 0 : tem_op.resimplify (lseq, valueize);
10882 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
10883 : 0 : if (!_r1) goto next_after_fail1516;
10884 : 0 : res_op->ops[0] = _r1;
10885 : : }
10886 : 0 : res_op->resimplify (lseq, valueize);
10887 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 923, __FILE__, __LINE__, true);
10888 : 0 : return true;
10889 : : }
10890 : 0 : next_after_fail1516:;
10891 : : }
10892 : : }
10893 : : }
10894 : : }
10895 : : }
10896 : 517479 : break;
10897 : : }
10898 : : default:;
10899 : : }
10900 : : }
10901 : : break;
10902 : : default:;
10903 : : }
10904 : 517479 : break;
10905 : : }
10906 : : default:;
10907 : : }
10908 : : }
10909 : : break;
10910 : 517479 : default:;
10911 : : }
10912 : 517479 : {
10913 : 517479 : tree _p0_pops[1];
10914 : 517479 : if (gimple_logical_inverted_value (_p0, _p0_pops, valueize))
10915 : : {
10916 : 472 : tree _q20 = _p0_pops[0];
10917 : 472 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
10918 : : {
10919 : 0 : if (gimple_truth_valued_p (_p1, valueize))
10920 : : {
10921 : 0 : {
10922 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _q20 };
10923 : 0 : if (gimple_simplify_30 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
10924 : 0 : return true;
10925 : : }
10926 : : }
10927 : : }
10928 : : }
10929 : : }
10930 : 517479 : {
10931 : 517479 : tree _p0_pops[1];
10932 : 517479 : if (gimple_nop_convert (_p0, _p0_pops, valueize))
10933 : : {
10934 : 9410 : tree _q20 = _p0_pops[0];
10935 : 9410 : switch (TREE_CODE (_q20))
10936 : : {
10937 : 9355 : case SSA_NAME:
10938 : 9355 : if (gimple *_d1 = get_def (valueize, _q20))
10939 : : {
10940 : 9089 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10941 : 6690 : switch (gimple_assign_rhs_code (_a1))
10942 : : {
10943 : 163 : case BIT_NOT_EXPR:
10944 : 163 : {
10945 : 163 : tree _q30 = gimple_assign_rhs1 (_a1);
10946 : 163 : _q30 = do_valueize (valueize, _q30);
10947 : 163 : {
10948 : 163 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q30, _p1 };
10949 : 163 : if (gimple_simplify_31 (res_op, seq, valueize, type, captures))
10950 : 5 : return true;
10951 : : }
10952 : 158 : break;
10953 : : }
10954 : : default:;
10955 : : }
10956 : : }
10957 : : break;
10958 : : default:;
10959 : : }
10960 : : }
10961 : : }
10962 : 517474 : if (gimple_truth_valued_p (_p0, valueize))
10963 : : {
10964 : 37114 : {
10965 : 37114 : tree _p1_pops[1];
10966 : 37114 : if (gimple_logical_inverted_value (_p1, _p1_pops, valueize))
10967 : : {
10968 : 713 : tree _q30 = _p1_pops[0];
10969 : 713 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
10970 : : {
10971 : 0 : {
10972 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
10973 : 0 : if (gimple_simplify_30 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
10974 : 0 : return true;
10975 : : }
10976 : : }
10977 : : }
10978 : : }
10979 : : }
10980 : 517474 : switch (TREE_CODE (_p1))
10981 : : {
10982 : 413149 : case SSA_NAME:
10983 : 413149 : if (gimple *_d1 = get_def (valueize, _p1))
10984 : : {
10985 : 340044 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
10986 : 415093 : switch (gimple_assign_rhs_code (_a1))
10987 : : {
10988 : 300 : case BIT_NOT_EXPR:
10989 : 300 : {
10990 : 300 : tree _q30 = gimple_assign_rhs1 (_a1);
10991 : 300 : _q30 = do_valueize (valueize, _q30);
10992 : 300 : {
10993 : 300 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _p1, _q30, _p0 };
10994 : 300 : if (gimple_simplify_23 (res_op, seq, valueize, type, captures))
10995 : 113 : return true;
10996 : : }
10997 : 187 : break;
10998 : : }
10999 : : default:;
11000 : : }
11001 : : }
11002 : : break;
11003 : 517361 : default:;
11004 : : }
11005 : 517361 : {
11006 : 517361 : tree _p1_pops[1];
11007 : 517361 : if (gimple_nop_convert (_p1, _p1_pops, valueize))
11008 : : {
11009 : 5903 : tree _q30 = _p1_pops[0];
11010 : 5903 : switch (TREE_CODE (_q30))
11011 : : {
11012 : 5903 : case SSA_NAME:
11013 : 5903 : if (gimple *_d1 = get_def (valueize, _q30))
11014 : : {
11015 : 5559 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11016 : 4507 : switch (gimple_assign_rhs_code (_a1))
11017 : : {
11018 : 107 : case BIT_NOT_EXPR:
11019 : 107 : {
11020 : 107 : tree _q40 = gimple_assign_rhs1 (_a1);
11021 : 107 : _q40 = do_valueize (valueize, _q40);
11022 : 107 : {
11023 : 107 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q30, _q40, _p0 };
11024 : 107 : if (gimple_simplify_31 (res_op, seq, valueize, type, captures))
11025 : 0 : return true;
11026 : : }
11027 : 107 : break;
11028 : : }
11029 : : default:;
11030 : : }
11031 : : }
11032 : : break;
11033 : : default:;
11034 : : }
11035 : : }
11036 : : }
11037 : 517361 : switch (TREE_CODE (_p0))
11038 : : {
11039 : 508712 : case SSA_NAME:
11040 : 508712 : if (gimple *_d1 = get_def (valueize, _p0))
11041 : : {
11042 : 406130 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
11043 : 497905 : switch (gimple_assign_rhs_code (_a1))
11044 : : {
11045 : 4923 : case BIT_IOR_EXPR:
11046 : 4923 : {
11047 : 4923 : tree _q20 = gimple_assign_rhs1 (_a1);
11048 : 4923 : _q20 = do_valueize (valueize, _q20);
11049 : 4923 : tree _q21 = gimple_assign_rhs2 (_a1);
11050 : 4923 : _q21 = do_valueize (valueize, _q21);
11051 : 4923 : if (tree_swap_operands_p (_q20, _q21))
11052 : 249 : std::swap (_q20, _q21);
11053 : 4923 : switch (TREE_CODE (_q21))
11054 : : {
11055 : 406 : case INTEGER_CST:
11056 : 406 : {
11057 : 406 : switch (TREE_CODE (_p1))
11058 : : {
11059 : 224 : case INTEGER_CST:
11060 : 224 : {
11061 : 224 : {
11062 : 224 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1 };
11063 : 224 : if (gimple_simplify_32 (res_op, seq, valueize, type, captures, BIT_IOR_EXPR, BIT_XOR_EXPR))
11064 : 1 : return true;
11065 : : }
11066 : 223 : break;
11067 : : }
11068 : : default:;
11069 : : }
11070 : : break;
11071 : : }
11072 : : default:;
11073 : : }
11074 : 517171 : break;
11075 : : }
11076 : 1199 : case LT_EXPR:
11077 : 1199 : {
11078 : 1199 : tree _q20 = gimple_assign_rhs1 (_a1);
11079 : 1199 : _q20 = do_valueize (valueize, _q20);
11080 : 1199 : tree _q21 = gimple_assign_rhs2 (_a1);
11081 : 1199 : _q21 = do_valueize (valueize, _q21);
11082 : 1199 : switch (TREE_CODE (_p1))
11083 : : {
11084 : 1199 : case SSA_NAME:
11085 : 1199 : if (gimple *_d2 = get_def (valueize, _p1))
11086 : : {
11087 : 1181 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11088 : 1179 : switch (gimple_assign_rhs_code (_a2))
11089 : : {
11090 : 172 : case GT_EXPR:
11091 : 172 : {
11092 : 172 : tree _q50 = gimple_assign_rhs1 (_a2);
11093 : 172 : _q50 = do_valueize (valueize, _q50);
11094 : 172 : tree _q51 = gimple_assign_rhs2 (_a2);
11095 : 172 : _q51 = do_valueize (valueize, _q51);
11096 : 172 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11097 : : {
11098 : 20 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11099 : : {
11100 : 20 : {
11101 : 20 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11102 : 20 : const enum tree_code cmp1 = LT_EXPR;
11103 : 20 : const enum tree_code cmp2 = GT_EXPR;
11104 : 20 : const enum tree_code rcmp = NE_EXPR;
11105 : 20 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11106 : : )
11107 : : {
11108 : 20 : gimple_seq *lseq = seq;
11109 : 20 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1517;
11110 : 20 : {
11111 : 20 : res_op->set_op (rcmp, type, 2);
11112 : 20 : res_op->ops[0] = captures[0];
11113 : 20 : res_op->ops[1] = captures[1];
11114 : 20 : res_op->resimplify (lseq, valueize);
11115 : 20 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11116 : 20 : return true;
11117 : : }
11118 : 0 : next_after_fail1517:;
11119 : : }
11120 : : }
11121 : 0 : {
11122 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11123 : 0 : const enum tree_code cmp1 = LT_EXPR;
11124 : 0 : const enum tree_code cmp2 = GT_EXPR;
11125 : 0 : const enum tree_code rcmp = NE_EXPR;
11126 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11127 : : )
11128 : : {
11129 : 0 : gimple_seq *lseq = seq;
11130 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1518;
11131 : 0 : {
11132 : 0 : res_op->set_op (rcmp, type, 2);
11133 : 0 : res_op->ops[0] = captures[0];
11134 : 0 : res_op->ops[1] = captures[1];
11135 : 0 : res_op->resimplify (lseq, valueize);
11136 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11137 : 0 : return true;
11138 : : }
11139 : 0 : next_after_fail1518:;
11140 : : }
11141 : : }
11142 : : }
11143 : : }
11144 : : break;
11145 : : }
11146 : 91 : case EQ_EXPR:
11147 : 91 : {
11148 : 91 : tree _q50 = gimple_assign_rhs1 (_a2);
11149 : 91 : _q50 = do_valueize (valueize, _q50);
11150 : 91 : tree _q51 = gimple_assign_rhs2 (_a2);
11151 : 91 : _q51 = do_valueize (valueize, _q51);
11152 : 91 : if (tree_swap_operands_p (_q50, _q51))
11153 : 0 : std::swap (_q50, _q51);
11154 : 91 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11155 : : {
11156 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11157 : : {
11158 : 16 : {
11159 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11160 : 16 : const enum tree_code cmp1 = LT_EXPR;
11161 : 16 : const enum tree_code cmp2 = EQ_EXPR;
11162 : 16 : const enum tree_code rcmp = LE_EXPR;
11163 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11164 : : )
11165 : : {
11166 : 16 : gimple_seq *lseq = seq;
11167 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1519;
11168 : 16 : {
11169 : 16 : res_op->set_op (rcmp, type, 2);
11170 : 16 : res_op->ops[0] = captures[0];
11171 : 16 : res_op->ops[1] = captures[1];
11172 : 16 : res_op->resimplify (lseq, valueize);
11173 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11174 : 16 : return true;
11175 : : }
11176 : 0 : next_after_fail1519:;
11177 : : }
11178 : : }
11179 : : }
11180 : : }
11181 : 75 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11182 : : {
11183 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11184 : : {
11185 : 0 : {
11186 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11187 : 0 : const enum tree_code cmp1 = LT_EXPR;
11188 : 0 : const enum tree_code cmp2 = EQ_EXPR;
11189 : 0 : const enum tree_code rcmp = LE_EXPR;
11190 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11191 : : )
11192 : : {
11193 : 0 : gimple_seq *lseq = seq;
11194 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1520;
11195 : 0 : {
11196 : 0 : res_op->set_op (rcmp, type, 2);
11197 : 0 : res_op->ops[0] = captures[0];
11198 : 0 : res_op->ops[1] = captures[1];
11199 : 0 : res_op->resimplify (lseq, valueize);
11200 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11201 : 0 : return true;
11202 : : }
11203 : 0 : next_after_fail1520:;
11204 : : }
11205 : : }
11206 : : }
11207 : : }
11208 : 517171 : break;
11209 : : }
11210 : 18 : case NE_EXPR:
11211 : 18 : {
11212 : 18 : tree _q50 = gimple_assign_rhs1 (_a2);
11213 : 18 : _q50 = do_valueize (valueize, _q50);
11214 : 18 : tree _q51 = gimple_assign_rhs2 (_a2);
11215 : 18 : _q51 = do_valueize (valueize, _q51);
11216 : 18 : if (tree_swap_operands_p (_q50, _q51))
11217 : 0 : std::swap (_q50, _q51);
11218 : 18 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11219 : : {
11220 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11221 : : {
11222 : 16 : {
11223 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11224 : 16 : const enum tree_code cmp1 = LT_EXPR;
11225 : 16 : const enum tree_code cmp2 = NE_EXPR;
11226 : 16 : const enum tree_code rcmp = GT_EXPR;
11227 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11228 : : )
11229 : : {
11230 : 16 : gimple_seq *lseq = seq;
11231 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1521;
11232 : 16 : {
11233 : 16 : res_op->set_op (rcmp, type, 2);
11234 : 16 : res_op->ops[0] = captures[0];
11235 : 16 : res_op->ops[1] = captures[1];
11236 : 16 : res_op->resimplify (lseq, valueize);
11237 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11238 : 16 : return true;
11239 : : }
11240 : 0 : next_after_fail1521:;
11241 : : }
11242 : : }
11243 : : }
11244 : : }
11245 : 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11246 : : {
11247 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11248 : : {
11249 : 0 : {
11250 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11251 : 0 : const enum tree_code cmp1 = LT_EXPR;
11252 : 0 : const enum tree_code cmp2 = NE_EXPR;
11253 : 0 : const enum tree_code rcmp = GT_EXPR;
11254 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11255 : : )
11256 : : {
11257 : 0 : gimple_seq *lseq = seq;
11258 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1522;
11259 : 0 : {
11260 : 0 : res_op->set_op (rcmp, type, 2);
11261 : 0 : res_op->ops[0] = captures[0];
11262 : 0 : res_op->ops[1] = captures[1];
11263 : 0 : res_op->resimplify (lseq, valueize);
11264 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11265 : 0 : return true;
11266 : : }
11267 : 0 : next_after_fail1522:;
11268 : : }
11269 : : }
11270 : : }
11271 : : }
11272 : 517171 : break;
11273 : : }
11274 : 243 : case LT_EXPR:
11275 : 243 : {
11276 : 243 : tree _q50 = gimple_assign_rhs1 (_a2);
11277 : 243 : _q50 = do_valueize (valueize, _q50);
11278 : 243 : tree _q51 = gimple_assign_rhs2 (_a2);
11279 : 243 : _q51 = do_valueize (valueize, _q51);
11280 : 243 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11281 : : {
11282 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11283 : : {
11284 : 0 : {
11285 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11286 : 0 : const enum tree_code cmp1 = LT_EXPR;
11287 : 0 : const enum tree_code cmp2 = GT_EXPR;
11288 : 0 : const enum tree_code rcmp = NE_EXPR;
11289 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11290 : : )
11291 : : {
11292 : 0 : gimple_seq *lseq = seq;
11293 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1523;
11294 : 0 : {
11295 : 0 : res_op->set_op (rcmp, type, 2);
11296 : 0 : res_op->ops[0] = captures[0];
11297 : 0 : res_op->ops[1] = captures[1];
11298 : 0 : res_op->resimplify (lseq, valueize);
11299 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11300 : 0 : return true;
11301 : : }
11302 : 0 : next_after_fail1523:;
11303 : : }
11304 : : }
11305 : 0 : {
11306 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11307 : 0 : const enum tree_code cmp1 = LT_EXPR;
11308 : 0 : const enum tree_code cmp2 = GT_EXPR;
11309 : 0 : const enum tree_code rcmp = NE_EXPR;
11310 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11311 : : )
11312 : : {
11313 : 0 : gimple_seq *lseq = seq;
11314 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1524;
11315 : 0 : {
11316 : 0 : res_op->set_op (rcmp, type, 2);
11317 : 0 : res_op->ops[0] = captures[0];
11318 : 0 : res_op->ops[1] = captures[1];
11319 : 0 : res_op->resimplify (lseq, valueize);
11320 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11321 : 0 : return true;
11322 : : }
11323 : 0 : next_after_fail1524:;
11324 : : }
11325 : : }
11326 : : }
11327 : : }
11328 : : break;
11329 : : }
11330 : : default:;
11331 : : }
11332 : : }
11333 : : break;
11334 : : default:;
11335 : : }
11336 : : break;
11337 : : }
11338 : 647 : case LE_EXPR:
11339 : 647 : {
11340 : 647 : tree _q20 = gimple_assign_rhs1 (_a1);
11341 : 647 : _q20 = do_valueize (valueize, _q20);
11342 : 647 : tree _q21 = gimple_assign_rhs2 (_a1);
11343 : 647 : _q21 = do_valueize (valueize, _q21);
11344 : 647 : switch (TREE_CODE (_p1))
11345 : : {
11346 : 647 : case SSA_NAME:
11347 : 647 : if (gimple *_d2 = get_def (valueize, _p1))
11348 : : {
11349 : 639 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11350 : 648 : switch (gimple_assign_rhs_code (_a2))
11351 : : {
11352 : 16 : case GE_EXPR:
11353 : 16 : {
11354 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
11355 : 16 : _q50 = do_valueize (valueize, _q50);
11356 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
11357 : 16 : _q51 = do_valueize (valueize, _q51);
11358 : 16 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11359 : : {
11360 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11361 : : {
11362 : 16 : {
11363 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11364 : 16 : const enum tree_code cmp1 = LE_EXPR;
11365 : 16 : const enum tree_code cmp2 = GE_EXPR;
11366 : 16 : const enum tree_code rcmp = NE_EXPR;
11367 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11368 : : )
11369 : : {
11370 : 16 : gimple_seq *lseq = seq;
11371 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1525;
11372 : 16 : {
11373 : 16 : res_op->set_op (rcmp, type, 2);
11374 : 16 : res_op->ops[0] = captures[0];
11375 : 16 : res_op->ops[1] = captures[1];
11376 : 16 : res_op->resimplify (lseq, valueize);
11377 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11378 : 16 : return true;
11379 : : }
11380 : 0 : next_after_fail1525:;
11381 : : }
11382 : : }
11383 : 0 : {
11384 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11385 : 0 : const enum tree_code cmp1 = LE_EXPR;
11386 : 0 : const enum tree_code cmp2 = GE_EXPR;
11387 : 0 : const enum tree_code rcmp = NE_EXPR;
11388 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11389 : : )
11390 : : {
11391 : 0 : gimple_seq *lseq = seq;
11392 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1526;
11393 : 0 : {
11394 : 0 : res_op->set_op (rcmp, type, 2);
11395 : 0 : res_op->ops[0] = captures[0];
11396 : 0 : res_op->ops[1] = captures[1];
11397 : 0 : res_op->resimplify (lseq, valueize);
11398 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11399 : 0 : return true;
11400 : : }
11401 : 0 : next_after_fail1526:;
11402 : : }
11403 : : }
11404 : : }
11405 : : }
11406 : : break;
11407 : : }
11408 : 19 : case EQ_EXPR:
11409 : 19 : {
11410 : 19 : tree _q50 = gimple_assign_rhs1 (_a2);
11411 : 19 : _q50 = do_valueize (valueize, _q50);
11412 : 19 : tree _q51 = gimple_assign_rhs2 (_a2);
11413 : 19 : _q51 = do_valueize (valueize, _q51);
11414 : 19 : if (tree_swap_operands_p (_q50, _q51))
11415 : 0 : std::swap (_q50, _q51);
11416 : 19 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11417 : : {
11418 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11419 : : {
11420 : 16 : {
11421 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11422 : 16 : const enum tree_code cmp1 = LE_EXPR;
11423 : 16 : const enum tree_code cmp2 = EQ_EXPR;
11424 : 16 : const enum tree_code rcmp = LT_EXPR;
11425 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11426 : : )
11427 : : {
11428 : 16 : gimple_seq *lseq = seq;
11429 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1527;
11430 : 16 : {
11431 : 16 : res_op->set_op (rcmp, type, 2);
11432 : 16 : res_op->ops[0] = captures[0];
11433 : 16 : res_op->ops[1] = captures[1];
11434 : 16 : res_op->resimplify (lseq, valueize);
11435 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11436 : 16 : return true;
11437 : : }
11438 : 0 : next_after_fail1527:;
11439 : : }
11440 : : }
11441 : : }
11442 : : }
11443 : 3 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11444 : : {
11445 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11446 : : {
11447 : 0 : {
11448 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11449 : 0 : const enum tree_code cmp1 = LE_EXPR;
11450 : 0 : const enum tree_code cmp2 = EQ_EXPR;
11451 : 0 : const enum tree_code rcmp = LT_EXPR;
11452 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11453 : : )
11454 : : {
11455 : 0 : gimple_seq *lseq = seq;
11456 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1528;
11457 : 0 : {
11458 : 0 : res_op->set_op (rcmp, type, 2);
11459 : 0 : res_op->ops[0] = captures[0];
11460 : 0 : res_op->ops[1] = captures[1];
11461 : 0 : res_op->resimplify (lseq, valueize);
11462 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11463 : 0 : return true;
11464 : : }
11465 : 0 : next_after_fail1528:;
11466 : : }
11467 : : }
11468 : : }
11469 : : }
11470 : 517171 : break;
11471 : : }
11472 : 74 : case NE_EXPR:
11473 : 74 : {
11474 : 74 : tree _q50 = gimple_assign_rhs1 (_a2);
11475 : 74 : _q50 = do_valueize (valueize, _q50);
11476 : 74 : tree _q51 = gimple_assign_rhs2 (_a2);
11477 : 74 : _q51 = do_valueize (valueize, _q51);
11478 : 74 : if (tree_swap_operands_p (_q50, _q51))
11479 : 0 : std::swap (_q50, _q51);
11480 : 74 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11481 : : {
11482 : 16 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11483 : : {
11484 : 16 : {
11485 : 16 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11486 : 16 : const enum tree_code cmp1 = LE_EXPR;
11487 : 16 : const enum tree_code cmp2 = NE_EXPR;
11488 : 16 : const enum tree_code rcmp = GE_EXPR;
11489 : 16 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11490 : : )
11491 : : {
11492 : 16 : gimple_seq *lseq = seq;
11493 : 16 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1529;
11494 : 16 : {
11495 : 16 : res_op->set_op (rcmp, type, 2);
11496 : 16 : res_op->ops[0] = captures[0];
11497 : 16 : res_op->ops[1] = captures[1];
11498 : 16 : res_op->resimplify (lseq, valueize);
11499 : 16 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11500 : 16 : return true;
11501 : : }
11502 : 0 : next_after_fail1529:;
11503 : : }
11504 : : }
11505 : : }
11506 : : }
11507 : 58 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11508 : : {
11509 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11510 : : {
11511 : 0 : {
11512 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11513 : 0 : const enum tree_code cmp1 = LE_EXPR;
11514 : 0 : const enum tree_code cmp2 = NE_EXPR;
11515 : 0 : const enum tree_code rcmp = GE_EXPR;
11516 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11517 : : )
11518 : : {
11519 : 0 : gimple_seq *lseq = seq;
11520 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1530;
11521 : 0 : {
11522 : 0 : res_op->set_op (rcmp, type, 2);
11523 : 0 : res_op->ops[0] = captures[0];
11524 : 0 : res_op->ops[1] = captures[1];
11525 : 0 : res_op->resimplify (lseq, valueize);
11526 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11527 : 0 : return true;
11528 : : }
11529 : 0 : next_after_fail1530:;
11530 : : }
11531 : : }
11532 : : }
11533 : : }
11534 : 517171 : break;
11535 : : }
11536 : 27 : case LE_EXPR:
11537 : 27 : {
11538 : 27 : tree _q50 = gimple_assign_rhs1 (_a2);
11539 : 27 : _q50 = do_valueize (valueize, _q50);
11540 : 27 : tree _q51 = gimple_assign_rhs2 (_a2);
11541 : 27 : _q51 = do_valueize (valueize, _q51);
11542 : 27 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11543 : : {
11544 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11545 : : {
11546 : 0 : {
11547 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11548 : 0 : const enum tree_code cmp1 = LE_EXPR;
11549 : 0 : const enum tree_code cmp2 = GE_EXPR;
11550 : 0 : const enum tree_code rcmp = NE_EXPR;
11551 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11552 : : )
11553 : : {
11554 : 0 : gimple_seq *lseq = seq;
11555 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1531;
11556 : 0 : {
11557 : 0 : res_op->set_op (rcmp, type, 2);
11558 : 0 : res_op->ops[0] = captures[0];
11559 : 0 : res_op->ops[1] = captures[1];
11560 : 0 : res_op->resimplify (lseq, valueize);
11561 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11562 : 0 : return true;
11563 : : }
11564 : 0 : next_after_fail1531:;
11565 : : }
11566 : : }
11567 : 0 : {
11568 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11569 : 0 : const enum tree_code cmp1 = LE_EXPR;
11570 : 0 : const enum tree_code cmp2 = GE_EXPR;
11571 : 0 : const enum tree_code rcmp = NE_EXPR;
11572 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11573 : : )
11574 : : {
11575 : 0 : gimple_seq *lseq = seq;
11576 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1532;
11577 : 0 : {
11578 : 0 : res_op->set_op (rcmp, type, 2);
11579 : 0 : res_op->ops[0] = captures[0];
11580 : 0 : res_op->ops[1] = captures[1];
11581 : 0 : res_op->resimplify (lseq, valueize);
11582 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11583 : 0 : return true;
11584 : : }
11585 : 0 : next_after_fail1532:;
11586 : : }
11587 : : }
11588 : : }
11589 : : }
11590 : : break;
11591 : : }
11592 : : default:;
11593 : : }
11594 : : }
11595 : : break;
11596 : : default:;
11597 : : }
11598 : : break;
11599 : : }
11600 : 1701 : case GT_EXPR:
11601 : 1701 : {
11602 : 1701 : tree _q20 = gimple_assign_rhs1 (_a1);
11603 : 1701 : _q20 = do_valueize (valueize, _q20);
11604 : 1701 : tree _q21 = gimple_assign_rhs2 (_a1);
11605 : 1701 : _q21 = do_valueize (valueize, _q21);
11606 : 1701 : switch (TREE_CODE (_p1))
11607 : : {
11608 : 1701 : case SSA_NAME:
11609 : 1701 : if (gimple *_d2 = get_def (valueize, _p1))
11610 : : {
11611 : 1683 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11612 : 1735 : switch (gimple_assign_rhs_code (_a2))
11613 : : {
11614 : 77 : case GT_EXPR:
11615 : 77 : {
11616 : 77 : tree _q50 = gimple_assign_rhs1 (_a2);
11617 : 77 : _q50 = do_valueize (valueize, _q50);
11618 : 77 : tree _q51 = gimple_assign_rhs2 (_a2);
11619 : 77 : _q51 = do_valueize (valueize, _q51);
11620 : 77 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11621 : : {
11622 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11623 : : {
11624 : 0 : {
11625 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11626 : 0 : const enum tree_code cmp1 = LT_EXPR;
11627 : 0 : const enum tree_code cmp2 = GT_EXPR;
11628 : 0 : const enum tree_code rcmp = NE_EXPR;
11629 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11630 : : )
11631 : : {
11632 : 0 : gimple_seq *lseq = seq;
11633 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1533;
11634 : 0 : {
11635 : 0 : res_op->set_op (rcmp, type, 2);
11636 : 0 : res_op->ops[0] = captures[0];
11637 : 0 : res_op->ops[1] = captures[1];
11638 : 0 : res_op->resimplify (lseq, valueize);
11639 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11640 : 0 : return true;
11641 : : }
11642 : 0 : next_after_fail1533:;
11643 : : }
11644 : : }
11645 : 0 : {
11646 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11647 : 0 : const enum tree_code cmp1 = LT_EXPR;
11648 : 0 : const enum tree_code cmp2 = GT_EXPR;
11649 : 0 : const enum tree_code rcmp = NE_EXPR;
11650 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11651 : : )
11652 : : {
11653 : 0 : gimple_seq *lseq = seq;
11654 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1534;
11655 : 0 : {
11656 : 0 : res_op->set_op (rcmp, type, 2);
11657 : 0 : res_op->ops[0] = captures[0];
11658 : 0 : res_op->ops[1] = captures[1];
11659 : 0 : res_op->resimplify (lseq, valueize);
11660 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11661 : 0 : return true;
11662 : : }
11663 : 0 : next_after_fail1534:;
11664 : : }
11665 : : }
11666 : : }
11667 : : }
11668 : : break;
11669 : : }
11670 : 17 : case EQ_EXPR:
11671 : 17 : {
11672 : 17 : tree _q50 = gimple_assign_rhs1 (_a2);
11673 : 17 : _q50 = do_valueize (valueize, _q50);
11674 : 17 : tree _q51 = gimple_assign_rhs2 (_a2);
11675 : 17 : _q51 = do_valueize (valueize, _q51);
11676 : 17 : if (tree_swap_operands_p (_q50, _q51))
11677 : 0 : std::swap (_q50, _q51);
11678 : 17 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11679 : : {
11680 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11681 : : {
11682 : 0 : {
11683 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11684 : 0 : const enum tree_code cmp1 = LT_EXPR;
11685 : 0 : const enum tree_code cmp2 = EQ_EXPR;
11686 : 0 : const enum tree_code rcmp = LE_EXPR;
11687 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11688 : : )
11689 : : {
11690 : 0 : gimple_seq *lseq = seq;
11691 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1535;
11692 : 0 : {
11693 : 0 : res_op->set_op (rcmp, type, 2);
11694 : 0 : res_op->ops[0] = captures[0];
11695 : 0 : res_op->ops[1] = captures[1];
11696 : 0 : res_op->resimplify (lseq, valueize);
11697 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11698 : 0 : return true;
11699 : : }
11700 : 0 : next_after_fail1535:;
11701 : : }
11702 : : }
11703 : : }
11704 : : }
11705 : 17 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11706 : : {
11707 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11708 : : {
11709 : 14 : {
11710 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11711 : 14 : const enum tree_code cmp1 = LT_EXPR;
11712 : 14 : const enum tree_code cmp2 = EQ_EXPR;
11713 : 14 : const enum tree_code rcmp = LE_EXPR;
11714 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11715 : : )
11716 : : {
11717 : 14 : gimple_seq *lseq = seq;
11718 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1536;
11719 : 14 : {
11720 : 14 : res_op->set_op (rcmp, type, 2);
11721 : 14 : res_op->ops[0] = captures[0];
11722 : 14 : res_op->ops[1] = captures[1];
11723 : 14 : res_op->resimplify (lseq, valueize);
11724 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11725 : 14 : return true;
11726 : : }
11727 : 0 : next_after_fail1536:;
11728 : : }
11729 : : }
11730 : : }
11731 : : }
11732 : 517171 : break;
11733 : : }
11734 : 222 : case NE_EXPR:
11735 : 222 : {
11736 : 222 : tree _q50 = gimple_assign_rhs1 (_a2);
11737 : 222 : _q50 = do_valueize (valueize, _q50);
11738 : 222 : tree _q51 = gimple_assign_rhs2 (_a2);
11739 : 222 : _q51 = do_valueize (valueize, _q51);
11740 : 222 : if (tree_swap_operands_p (_q50, _q51))
11741 : 0 : std::swap (_q50, _q51);
11742 : 222 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11743 : : {
11744 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11745 : : {
11746 : 0 : {
11747 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11748 : 0 : const enum tree_code cmp1 = LT_EXPR;
11749 : 0 : const enum tree_code cmp2 = NE_EXPR;
11750 : 0 : const enum tree_code rcmp = GT_EXPR;
11751 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11752 : : )
11753 : : {
11754 : 0 : gimple_seq *lseq = seq;
11755 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1537;
11756 : 0 : {
11757 : 0 : res_op->set_op (rcmp, type, 2);
11758 : 0 : res_op->ops[0] = captures[0];
11759 : 0 : res_op->ops[1] = captures[1];
11760 : 0 : res_op->resimplify (lseq, valueize);
11761 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11762 : 0 : return true;
11763 : : }
11764 : 0 : next_after_fail1537:;
11765 : : }
11766 : : }
11767 : : }
11768 : : }
11769 : 222 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11770 : : {
11771 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11772 : : {
11773 : 14 : {
11774 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11775 : 14 : const enum tree_code cmp1 = LT_EXPR;
11776 : 14 : const enum tree_code cmp2 = NE_EXPR;
11777 : 14 : const enum tree_code rcmp = GT_EXPR;
11778 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11779 : : )
11780 : : {
11781 : 14 : gimple_seq *lseq = seq;
11782 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1538;
11783 : 14 : {
11784 : 14 : res_op->set_op (rcmp, type, 2);
11785 : 14 : res_op->ops[0] = captures[0];
11786 : 14 : res_op->ops[1] = captures[1];
11787 : 14 : res_op->resimplify (lseq, valueize);
11788 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11789 : 14 : return true;
11790 : : }
11791 : 0 : next_after_fail1538:;
11792 : : }
11793 : : }
11794 : : }
11795 : : }
11796 : 517171 : break;
11797 : : }
11798 : 18 : case LT_EXPR:
11799 : 18 : {
11800 : 18 : tree _q50 = gimple_assign_rhs1 (_a2);
11801 : 18 : _q50 = do_valueize (valueize, _q50);
11802 : 18 : tree _q51 = gimple_assign_rhs2 (_a2);
11803 : 18 : _q51 = do_valueize (valueize, _q51);
11804 : 18 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11805 : : {
11806 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11807 : : {
11808 : 14 : {
11809 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11810 : 14 : const enum tree_code cmp1 = LT_EXPR;
11811 : 14 : const enum tree_code cmp2 = GT_EXPR;
11812 : 14 : const enum tree_code rcmp = NE_EXPR;
11813 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11814 : : )
11815 : : {
11816 : 14 : gimple_seq *lseq = seq;
11817 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1539;
11818 : 14 : {
11819 : 14 : res_op->set_op (rcmp, type, 2);
11820 : 14 : res_op->ops[0] = captures[0];
11821 : 14 : res_op->ops[1] = captures[1];
11822 : 14 : res_op->resimplify (lseq, valueize);
11823 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11824 : 14 : return true;
11825 : : }
11826 : 0 : next_after_fail1539:;
11827 : : }
11828 : : }
11829 : 0 : {
11830 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11831 : 0 : const enum tree_code cmp1 = LT_EXPR;
11832 : 0 : const enum tree_code cmp2 = GT_EXPR;
11833 : 0 : const enum tree_code rcmp = NE_EXPR;
11834 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11835 : : )
11836 : : {
11837 : 0 : gimple_seq *lseq = seq;
11838 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1540;
11839 : 0 : {
11840 : 0 : res_op->set_op (rcmp, type, 2);
11841 : 0 : res_op->ops[0] = captures[0];
11842 : 0 : res_op->ops[1] = captures[1];
11843 : 0 : res_op->resimplify (lseq, valueize);
11844 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11845 : 0 : return true;
11846 : : }
11847 : 0 : next_after_fail1540:;
11848 : : }
11849 : : }
11850 : : }
11851 : : }
11852 : : break;
11853 : : }
11854 : : default:;
11855 : : }
11856 : : }
11857 : : break;
11858 : : default:;
11859 : : }
11860 : : break;
11861 : : }
11862 : 894 : case GE_EXPR:
11863 : 894 : {
11864 : 894 : tree _q20 = gimple_assign_rhs1 (_a1);
11865 : 894 : _q20 = do_valueize (valueize, _q20);
11866 : 894 : tree _q21 = gimple_assign_rhs2 (_a1);
11867 : 894 : _q21 = do_valueize (valueize, _q21);
11868 : 894 : switch (TREE_CODE (_p1))
11869 : : {
11870 : 894 : case SSA_NAME:
11871 : 894 : if (gimple *_d2 = get_def (valueize, _p1))
11872 : : {
11873 : 878 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
11874 : 842 : switch (gimple_assign_rhs_code (_a2))
11875 : : {
11876 : 83 : case GE_EXPR:
11877 : 83 : {
11878 : 83 : tree _q50 = gimple_assign_rhs1 (_a2);
11879 : 83 : _q50 = do_valueize (valueize, _q50);
11880 : 83 : tree _q51 = gimple_assign_rhs2 (_a2);
11881 : 83 : _q51 = do_valueize (valueize, _q51);
11882 : 83 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11883 : : {
11884 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11885 : : {
11886 : 0 : {
11887 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11888 : 0 : const enum tree_code cmp1 = LE_EXPR;
11889 : 0 : const enum tree_code cmp2 = GE_EXPR;
11890 : 0 : const enum tree_code rcmp = NE_EXPR;
11891 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11892 : : )
11893 : : {
11894 : 0 : gimple_seq *lseq = seq;
11895 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1541;
11896 : 0 : {
11897 : 0 : res_op->set_op (rcmp, type, 2);
11898 : 0 : res_op->ops[0] = captures[0];
11899 : 0 : res_op->ops[1] = captures[1];
11900 : 0 : res_op->resimplify (lseq, valueize);
11901 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11902 : 0 : return true;
11903 : : }
11904 : 0 : next_after_fail1541:;
11905 : : }
11906 : : }
11907 : 0 : {
11908 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
11909 : 0 : const enum tree_code cmp1 = LE_EXPR;
11910 : 0 : const enum tree_code cmp2 = GE_EXPR;
11911 : 0 : const enum tree_code rcmp = NE_EXPR;
11912 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11913 : : )
11914 : : {
11915 : 0 : gimple_seq *lseq = seq;
11916 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1542;
11917 : 0 : {
11918 : 0 : res_op->set_op (rcmp, type, 2);
11919 : 0 : res_op->ops[0] = captures[0];
11920 : 0 : res_op->ops[1] = captures[1];
11921 : 0 : res_op->resimplify (lseq, valueize);
11922 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11923 : 0 : return true;
11924 : : }
11925 : 0 : next_after_fail1542:;
11926 : : }
11927 : : }
11928 : : }
11929 : : }
11930 : : break;
11931 : : }
11932 : 23 : case EQ_EXPR:
11933 : 23 : {
11934 : 23 : tree _q50 = gimple_assign_rhs1 (_a2);
11935 : 23 : _q50 = do_valueize (valueize, _q50);
11936 : 23 : tree _q51 = gimple_assign_rhs2 (_a2);
11937 : 23 : _q51 = do_valueize (valueize, _q51);
11938 : 23 : if (tree_swap_operands_p (_q50, _q51))
11939 : 0 : std::swap (_q50, _q51);
11940 : 23 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
11941 : : {
11942 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
11943 : : {
11944 : 0 : {
11945 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11946 : 0 : const enum tree_code cmp1 = LE_EXPR;
11947 : 0 : const enum tree_code cmp2 = EQ_EXPR;
11948 : 0 : const enum tree_code rcmp = LT_EXPR;
11949 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11950 : : )
11951 : : {
11952 : 0 : gimple_seq *lseq = seq;
11953 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1543;
11954 : 0 : {
11955 : 0 : res_op->set_op (rcmp, type, 2);
11956 : 0 : res_op->ops[0] = captures[0];
11957 : 0 : res_op->ops[1] = captures[1];
11958 : 0 : res_op->resimplify (lseq, valueize);
11959 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11960 : 0 : return true;
11961 : : }
11962 : 0 : next_after_fail1543:;
11963 : : }
11964 : : }
11965 : : }
11966 : : }
11967 : 23 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
11968 : : {
11969 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
11970 : : {
11971 : 14 : {
11972 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
11973 : 14 : const enum tree_code cmp1 = LE_EXPR;
11974 : 14 : const enum tree_code cmp2 = EQ_EXPR;
11975 : 14 : const enum tree_code rcmp = LT_EXPR;
11976 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
11977 : : )
11978 : : {
11979 : 14 : gimple_seq *lseq = seq;
11980 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1544;
11981 : 14 : {
11982 : 14 : res_op->set_op (rcmp, type, 2);
11983 : 14 : res_op->ops[0] = captures[0];
11984 : 14 : res_op->ops[1] = captures[1];
11985 : 14 : res_op->resimplify (lseq, valueize);
11986 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
11987 : 14 : return true;
11988 : : }
11989 : 0 : next_after_fail1544:;
11990 : : }
11991 : : }
11992 : : }
11993 : : }
11994 : 517171 : break;
11995 : : }
11996 : 121 : case NE_EXPR:
11997 : 121 : {
11998 : 121 : tree _q50 = gimple_assign_rhs1 (_a2);
11999 : 121 : _q50 = do_valueize (valueize, _q50);
12000 : 121 : tree _q51 = gimple_assign_rhs2 (_a2);
12001 : 121 : _q51 = do_valueize (valueize, _q51);
12002 : 121 : if (tree_swap_operands_p (_q50, _q51))
12003 : 15 : std::swap (_q50, _q51);
12004 : 121 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12005 : : {
12006 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12007 : : {
12008 : 0 : {
12009 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12010 : 0 : const enum tree_code cmp1 = LE_EXPR;
12011 : 0 : const enum tree_code cmp2 = NE_EXPR;
12012 : 0 : const enum tree_code rcmp = GE_EXPR;
12013 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12014 : : )
12015 : : {
12016 : 0 : gimple_seq *lseq = seq;
12017 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1545;
12018 : 0 : {
12019 : 0 : res_op->set_op (rcmp, type, 2);
12020 : 0 : res_op->ops[0] = captures[0];
12021 : 0 : res_op->ops[1] = captures[1];
12022 : 0 : res_op->resimplify (lseq, valueize);
12023 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12024 : 0 : return true;
12025 : : }
12026 : 0 : next_after_fail1545:;
12027 : : }
12028 : : }
12029 : : }
12030 : : }
12031 : 121 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12032 : : {
12033 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12034 : : {
12035 : 14 : {
12036 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12037 : 14 : const enum tree_code cmp1 = LE_EXPR;
12038 : 14 : const enum tree_code cmp2 = NE_EXPR;
12039 : 14 : const enum tree_code rcmp = GE_EXPR;
12040 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12041 : : )
12042 : : {
12043 : 14 : gimple_seq *lseq = seq;
12044 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1546;
12045 : 14 : {
12046 : 14 : res_op->set_op (rcmp, type, 2);
12047 : 14 : res_op->ops[0] = captures[0];
12048 : 14 : res_op->ops[1] = captures[1];
12049 : 14 : res_op->resimplify (lseq, valueize);
12050 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12051 : 14 : return true;
12052 : : }
12053 : 0 : next_after_fail1546:;
12054 : : }
12055 : : }
12056 : : }
12057 : : }
12058 : 517171 : break;
12059 : : }
12060 : 14 : case LE_EXPR:
12061 : 14 : {
12062 : 14 : tree _q50 = gimple_assign_rhs1 (_a2);
12063 : 14 : _q50 = do_valueize (valueize, _q50);
12064 : 14 : tree _q51 = gimple_assign_rhs2 (_a2);
12065 : 14 : _q51 = do_valueize (valueize, _q51);
12066 : 14 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12067 : : {
12068 : 14 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12069 : : {
12070 : 14 : {
12071 : 14 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12072 : 14 : const enum tree_code cmp1 = LE_EXPR;
12073 : 14 : const enum tree_code cmp2 = GE_EXPR;
12074 : 14 : const enum tree_code rcmp = NE_EXPR;
12075 : 14 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12076 : : )
12077 : : {
12078 : 14 : gimple_seq *lseq = seq;
12079 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1547;
12080 : 14 : {
12081 : 14 : res_op->set_op (rcmp, type, 2);
12082 : 14 : res_op->ops[0] = captures[0];
12083 : 14 : res_op->ops[1] = captures[1];
12084 : 14 : res_op->resimplify (lseq, valueize);
12085 : 14 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12086 : 14 : return true;
12087 : : }
12088 : 0 : next_after_fail1547:;
12089 : : }
12090 : : }
12091 : 0 : {
12092 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12093 : 0 : const enum tree_code cmp1 = LE_EXPR;
12094 : 0 : const enum tree_code cmp2 = GE_EXPR;
12095 : 0 : const enum tree_code rcmp = NE_EXPR;
12096 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12097 : : )
12098 : : {
12099 : 0 : gimple_seq *lseq = seq;
12100 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1548;
12101 : 0 : {
12102 : 0 : res_op->set_op (rcmp, type, 2);
12103 : 0 : res_op->ops[0] = captures[0];
12104 : 0 : res_op->ops[1] = captures[1];
12105 : 0 : res_op->resimplify (lseq, valueize);
12106 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12107 : 0 : return true;
12108 : : }
12109 : 0 : next_after_fail1548:;
12110 : : }
12111 : : }
12112 : : }
12113 : : }
12114 : : break;
12115 : : }
12116 : : default:;
12117 : : }
12118 : : }
12119 : : break;
12120 : : default:;
12121 : : }
12122 : : break;
12123 : : }
12124 : 626 : case EQ_EXPR:
12125 : 626 : {
12126 : 626 : tree _q20 = gimple_assign_rhs1 (_a1);
12127 : 626 : _q20 = do_valueize (valueize, _q20);
12128 : 626 : tree _q21 = gimple_assign_rhs2 (_a1);
12129 : 626 : _q21 = do_valueize (valueize, _q21);
12130 : 626 : if (tree_swap_operands_p (_q20, _q21))
12131 : 0 : std::swap (_q20, _q21);
12132 : 626 : switch (TREE_CODE (_p1))
12133 : : {
12134 : 626 : case SSA_NAME:
12135 : 626 : if (gimple *_d2 = get_def (valueize, _p1))
12136 : : {
12137 : 621 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12138 : 601 : switch (gimple_assign_rhs_code (_a2))
12139 : : {
12140 : 2 : case LT_EXPR:
12141 : 2 : {
12142 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
12143 : 2 : _q50 = do_valueize (valueize, _q50);
12144 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
12145 : 2 : _q51 = do_valueize (valueize, _q51);
12146 : 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12147 : : {
12148 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12149 : : {
12150 : 0 : {
12151 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12152 : 0 : const enum tree_code cmp1 = LT_EXPR;
12153 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12154 : 0 : const enum tree_code rcmp = LE_EXPR;
12155 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12156 : : )
12157 : : {
12158 : 0 : gimple_seq *lseq = seq;
12159 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1549;
12160 : 0 : {
12161 : 0 : res_op->set_op (rcmp, type, 2);
12162 : 0 : res_op->ops[0] = captures[0];
12163 : 0 : res_op->ops[1] = captures[1];
12164 : 0 : res_op->resimplify (lseq, valueize);
12165 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12166 : 0 : return true;
12167 : : }
12168 : 0 : next_after_fail1549:;
12169 : : }
12170 : : }
12171 : : }
12172 : : }
12173 : 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12174 : : {
12175 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12176 : : {
12177 : 0 : {
12178 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12179 : 0 : const enum tree_code cmp1 = LT_EXPR;
12180 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12181 : 0 : const enum tree_code rcmp = LE_EXPR;
12182 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12183 : : )
12184 : : {
12185 : 0 : gimple_seq *lseq = seq;
12186 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1550;
12187 : 0 : {
12188 : 0 : res_op->set_op (rcmp, type, 2);
12189 : 0 : res_op->ops[0] = captures[0];
12190 : 0 : res_op->ops[1] = captures[1];
12191 : 0 : res_op->resimplify (lseq, valueize);
12192 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12193 : 0 : return true;
12194 : : }
12195 : 0 : next_after_fail1550:;
12196 : : }
12197 : : }
12198 : : }
12199 : : }
12200 : : break;
12201 : : }
12202 : 0 : case LE_EXPR:
12203 : 0 : {
12204 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
12205 : 0 : _q50 = do_valueize (valueize, _q50);
12206 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
12207 : 0 : _q51 = do_valueize (valueize, _q51);
12208 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12209 : : {
12210 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12211 : : {
12212 : 0 : {
12213 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12214 : 0 : const enum tree_code cmp1 = LE_EXPR;
12215 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12216 : 0 : const enum tree_code rcmp = LT_EXPR;
12217 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12218 : : )
12219 : : {
12220 : 0 : gimple_seq *lseq = seq;
12221 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1551;
12222 : 0 : {
12223 : 0 : res_op->set_op (rcmp, type, 2);
12224 : 0 : res_op->ops[0] = captures[0];
12225 : 0 : res_op->ops[1] = captures[1];
12226 : 0 : res_op->resimplify (lseq, valueize);
12227 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12228 : 0 : return true;
12229 : : }
12230 : 0 : next_after_fail1551:;
12231 : : }
12232 : : }
12233 : : }
12234 : : }
12235 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12236 : : {
12237 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12238 : : {
12239 : 0 : {
12240 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12241 : 0 : const enum tree_code cmp1 = LE_EXPR;
12242 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12243 : 0 : const enum tree_code rcmp = LT_EXPR;
12244 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12245 : : )
12246 : : {
12247 : 0 : gimple_seq *lseq = seq;
12248 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1552;
12249 : 0 : {
12250 : 0 : res_op->set_op (rcmp, type, 2);
12251 : 0 : res_op->ops[0] = captures[0];
12252 : 0 : res_op->ops[1] = captures[1];
12253 : 0 : res_op->resimplify (lseq, valueize);
12254 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12255 : 0 : return true;
12256 : : }
12257 : 0 : next_after_fail1552:;
12258 : : }
12259 : : }
12260 : : }
12261 : : }
12262 : : break;
12263 : : }
12264 : 5 : case GT_EXPR:
12265 : 5 : {
12266 : 5 : tree _q50 = gimple_assign_rhs1 (_a2);
12267 : 5 : _q50 = do_valueize (valueize, _q50);
12268 : 5 : tree _q51 = gimple_assign_rhs2 (_a2);
12269 : 5 : _q51 = do_valueize (valueize, _q51);
12270 : 5 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12271 : : {
12272 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12273 : : {
12274 : 0 : {
12275 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12276 : 0 : const enum tree_code cmp1 = LT_EXPR;
12277 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12278 : 0 : const enum tree_code rcmp = LE_EXPR;
12279 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12280 : : )
12281 : : {
12282 : 0 : gimple_seq *lseq = seq;
12283 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1553;
12284 : 0 : {
12285 : 0 : res_op->set_op (rcmp, type, 2);
12286 : 0 : res_op->ops[0] = captures[0];
12287 : 0 : res_op->ops[1] = captures[1];
12288 : 0 : res_op->resimplify (lseq, valueize);
12289 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12290 : 0 : return true;
12291 : : }
12292 : 0 : next_after_fail1553:;
12293 : : }
12294 : : }
12295 : : }
12296 : : }
12297 : 5 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12298 : : {
12299 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12300 : : {
12301 : 0 : {
12302 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12303 : 0 : const enum tree_code cmp1 = LT_EXPR;
12304 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12305 : 0 : const enum tree_code rcmp = LE_EXPR;
12306 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12307 : : )
12308 : : {
12309 : 0 : gimple_seq *lseq = seq;
12310 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1554;
12311 : 0 : {
12312 : 0 : res_op->set_op (rcmp, type, 2);
12313 : 0 : res_op->ops[0] = captures[0];
12314 : 0 : res_op->ops[1] = captures[1];
12315 : 0 : res_op->resimplify (lseq, valueize);
12316 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12317 : 0 : return true;
12318 : : }
12319 : 0 : next_after_fail1554:;
12320 : : }
12321 : : }
12322 : : }
12323 : : }
12324 : : break;
12325 : : }
12326 : 43 : case GE_EXPR:
12327 : 43 : {
12328 : 43 : tree _q50 = gimple_assign_rhs1 (_a2);
12329 : 43 : _q50 = do_valueize (valueize, _q50);
12330 : 43 : tree _q51 = gimple_assign_rhs2 (_a2);
12331 : 43 : _q51 = do_valueize (valueize, _q51);
12332 : 43 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12333 : : {
12334 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12335 : : {
12336 : 0 : {
12337 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12338 : 0 : const enum tree_code cmp1 = LE_EXPR;
12339 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12340 : 0 : const enum tree_code rcmp = LT_EXPR;
12341 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12342 : : )
12343 : : {
12344 : 0 : gimple_seq *lseq = seq;
12345 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1555;
12346 : 0 : {
12347 : 0 : res_op->set_op (rcmp, type, 2);
12348 : 0 : res_op->ops[0] = captures[0];
12349 : 0 : res_op->ops[1] = captures[1];
12350 : 0 : res_op->resimplify (lseq, valueize);
12351 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12352 : 0 : return true;
12353 : : }
12354 : 0 : next_after_fail1555:;
12355 : : }
12356 : : }
12357 : : }
12358 : : }
12359 : 43 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12360 : : {
12361 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12362 : : {
12363 : 0 : {
12364 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12365 : 0 : const enum tree_code cmp1 = LE_EXPR;
12366 : 0 : const enum tree_code cmp2 = EQ_EXPR;
12367 : 0 : const enum tree_code rcmp = LT_EXPR;
12368 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12369 : : )
12370 : : {
12371 : 0 : gimple_seq *lseq = seq;
12372 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1556;
12373 : 0 : {
12374 : 0 : res_op->set_op (rcmp, type, 2);
12375 : 0 : res_op->ops[0] = captures[0];
12376 : 0 : res_op->ops[1] = captures[1];
12377 : 0 : res_op->resimplify (lseq, valueize);
12378 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12379 : 0 : return true;
12380 : : }
12381 : 0 : next_after_fail1556:;
12382 : : }
12383 : : }
12384 : : }
12385 : : }
12386 : : break;
12387 : : }
12388 : : default:;
12389 : : }
12390 : : }
12391 : : break;
12392 : : default:;
12393 : : }
12394 : 517171 : break;
12395 : : }
12396 : 1474 : case NE_EXPR:
12397 : 1474 : {
12398 : 1474 : tree _q20 = gimple_assign_rhs1 (_a1);
12399 : 1474 : _q20 = do_valueize (valueize, _q20);
12400 : 1474 : tree _q21 = gimple_assign_rhs2 (_a1);
12401 : 1474 : _q21 = do_valueize (valueize, _q21);
12402 : 1474 : if (tree_swap_operands_p (_q20, _q21))
12403 : 14 : std::swap (_q20, _q21);
12404 : 1474 : switch (TREE_CODE (_p1))
12405 : : {
12406 : 1474 : case SSA_NAME:
12407 : 1474 : if (gimple *_d2 = get_def (valueize, _p1))
12408 : : {
12409 : 1468 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12410 : 1436 : switch (gimple_assign_rhs_code (_a2))
12411 : : {
12412 : 0 : case LT_EXPR:
12413 : 0 : {
12414 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
12415 : 0 : _q50 = do_valueize (valueize, _q50);
12416 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
12417 : 0 : _q51 = do_valueize (valueize, _q51);
12418 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12419 : : {
12420 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12421 : : {
12422 : 0 : {
12423 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12424 : 0 : const enum tree_code cmp1 = LT_EXPR;
12425 : 0 : const enum tree_code cmp2 = NE_EXPR;
12426 : 0 : const enum tree_code rcmp = GT_EXPR;
12427 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12428 : : )
12429 : : {
12430 : 0 : gimple_seq *lseq = seq;
12431 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1557;
12432 : 0 : {
12433 : 0 : res_op->set_op (rcmp, type, 2);
12434 : 0 : res_op->ops[0] = captures[0];
12435 : 0 : res_op->ops[1] = captures[1];
12436 : 0 : res_op->resimplify (lseq, valueize);
12437 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12438 : 0 : return true;
12439 : : }
12440 : 0 : next_after_fail1557:;
12441 : : }
12442 : : }
12443 : : }
12444 : : }
12445 : 0 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12446 : : {
12447 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12448 : : {
12449 : 0 : {
12450 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12451 : 0 : const enum tree_code cmp1 = LT_EXPR;
12452 : 0 : const enum tree_code cmp2 = NE_EXPR;
12453 : 0 : const enum tree_code rcmp = GT_EXPR;
12454 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12455 : : )
12456 : : {
12457 : 0 : gimple_seq *lseq = seq;
12458 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1558;
12459 : 0 : {
12460 : 0 : res_op->set_op (rcmp, type, 2);
12461 : 0 : res_op->ops[0] = captures[0];
12462 : 0 : res_op->ops[1] = captures[1];
12463 : 0 : res_op->resimplify (lseq, valueize);
12464 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12465 : 0 : return true;
12466 : : }
12467 : 0 : next_after_fail1558:;
12468 : : }
12469 : : }
12470 : : }
12471 : : }
12472 : : break;
12473 : : }
12474 : 107 : case LE_EXPR:
12475 : 107 : {
12476 : 107 : tree _q50 = gimple_assign_rhs1 (_a2);
12477 : 107 : _q50 = do_valueize (valueize, _q50);
12478 : 107 : tree _q51 = gimple_assign_rhs2 (_a2);
12479 : 107 : _q51 = do_valueize (valueize, _q51);
12480 : 107 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12481 : : {
12482 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12483 : : {
12484 : 0 : {
12485 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12486 : 0 : const enum tree_code cmp1 = LE_EXPR;
12487 : 0 : const enum tree_code cmp2 = NE_EXPR;
12488 : 0 : const enum tree_code rcmp = GE_EXPR;
12489 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12490 : : )
12491 : : {
12492 : 0 : gimple_seq *lseq = seq;
12493 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1559;
12494 : 0 : {
12495 : 0 : res_op->set_op (rcmp, type, 2);
12496 : 0 : res_op->ops[0] = captures[0];
12497 : 0 : res_op->ops[1] = captures[1];
12498 : 0 : res_op->resimplify (lseq, valueize);
12499 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12500 : 0 : return true;
12501 : : }
12502 : 0 : next_after_fail1559:;
12503 : : }
12504 : : }
12505 : : }
12506 : : }
12507 : 107 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12508 : : {
12509 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12510 : : {
12511 : 0 : {
12512 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12513 : 0 : const enum tree_code cmp1 = LE_EXPR;
12514 : 0 : const enum tree_code cmp2 = NE_EXPR;
12515 : 0 : const enum tree_code rcmp = GE_EXPR;
12516 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12517 : : )
12518 : : {
12519 : 0 : gimple_seq *lseq = seq;
12520 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1560;
12521 : 0 : {
12522 : 0 : res_op->set_op (rcmp, type, 2);
12523 : 0 : res_op->ops[0] = captures[0];
12524 : 0 : res_op->ops[1] = captures[1];
12525 : 0 : res_op->resimplify (lseq, valueize);
12526 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12527 : 0 : return true;
12528 : : }
12529 : 0 : next_after_fail1560:;
12530 : : }
12531 : : }
12532 : : }
12533 : : }
12534 : : break;
12535 : : }
12536 : 94 : case GT_EXPR:
12537 : 94 : {
12538 : 94 : tree _q50 = gimple_assign_rhs1 (_a2);
12539 : 94 : _q50 = do_valueize (valueize, _q50);
12540 : 94 : tree _q51 = gimple_assign_rhs2 (_a2);
12541 : 94 : _q51 = do_valueize (valueize, _q51);
12542 : 94 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12543 : : {
12544 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12545 : : {
12546 : 0 : {
12547 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12548 : 0 : const enum tree_code cmp1 = LT_EXPR;
12549 : 0 : const enum tree_code cmp2 = NE_EXPR;
12550 : 0 : const enum tree_code rcmp = GT_EXPR;
12551 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12552 : : )
12553 : : {
12554 : 0 : gimple_seq *lseq = seq;
12555 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1561;
12556 : 0 : {
12557 : 0 : res_op->set_op (rcmp, type, 2);
12558 : 0 : res_op->ops[0] = captures[0];
12559 : 0 : res_op->ops[1] = captures[1];
12560 : 0 : res_op->resimplify (lseq, valueize);
12561 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12562 : 0 : return true;
12563 : : }
12564 : 0 : next_after_fail1561:;
12565 : : }
12566 : : }
12567 : : }
12568 : : }
12569 : 94 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12570 : : {
12571 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12572 : : {
12573 : 0 : {
12574 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12575 : 0 : const enum tree_code cmp1 = LT_EXPR;
12576 : 0 : const enum tree_code cmp2 = NE_EXPR;
12577 : 0 : const enum tree_code rcmp = GT_EXPR;
12578 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12579 : : )
12580 : : {
12581 : 0 : gimple_seq *lseq = seq;
12582 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1562;
12583 : 0 : {
12584 : 0 : res_op->set_op (rcmp, type, 2);
12585 : 0 : res_op->ops[0] = captures[0];
12586 : 0 : res_op->ops[1] = captures[1];
12587 : 0 : res_op->resimplify (lseq, valueize);
12588 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12589 : 0 : return true;
12590 : : }
12591 : 0 : next_after_fail1562:;
12592 : : }
12593 : : }
12594 : : }
12595 : : }
12596 : : break;
12597 : : }
12598 : 2 : case GE_EXPR:
12599 : 2 : {
12600 : 2 : tree _q50 = gimple_assign_rhs1 (_a2);
12601 : 2 : _q50 = do_valueize (valueize, _q50);
12602 : 2 : tree _q51 = gimple_assign_rhs2 (_a2);
12603 : 2 : _q51 = do_valueize (valueize, _q51);
12604 : 2 : if ((_q50 == _q21 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q21, 0) && types_match (_q50, _q21)))
12605 : : {
12606 : 0 : if ((_q51 == _q20 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q20, 0) && types_match (_q51, _q20)))
12607 : : {
12608 : 0 : {
12609 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
12610 : 0 : const enum tree_code cmp1 = LE_EXPR;
12611 : 0 : const enum tree_code cmp2 = NE_EXPR;
12612 : 0 : const enum tree_code rcmp = GE_EXPR;
12613 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12614 : : )
12615 : : {
12616 : 0 : gimple_seq *lseq = seq;
12617 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1563;
12618 : 0 : {
12619 : 0 : res_op->set_op (rcmp, type, 2);
12620 : 0 : res_op->ops[0] = captures[0];
12621 : 0 : res_op->ops[1] = captures[1];
12622 : 0 : res_op->resimplify (lseq, valueize);
12623 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12624 : 0 : return true;
12625 : : }
12626 : 0 : next_after_fail1563:;
12627 : : }
12628 : : }
12629 : : }
12630 : : }
12631 : 2 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12632 : : {
12633 : 0 : if ((_q51 == _q21 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _q21, 0) && types_match (_q51, _q21)))
12634 : : {
12635 : 0 : {
12636 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q21, _q20 };
12637 : 0 : const enum tree_code cmp1 = LE_EXPR;
12638 : 0 : const enum tree_code cmp2 = NE_EXPR;
12639 : 0 : const enum tree_code rcmp = GE_EXPR;
12640 : 0 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0])) || POINTER_TYPE_P (TREE_TYPE (captures[0]))
12641 : : )
12642 : : {
12643 : 0 : gimple_seq *lseq = seq;
12644 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1564;
12645 : 0 : {
12646 : 0 : res_op->set_op (rcmp, type, 2);
12647 : 0 : res_op->ops[0] = captures[0];
12648 : 0 : res_op->ops[1] = captures[1];
12649 : 0 : res_op->resimplify (lseq, valueize);
12650 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 924, __FILE__, __LINE__, true);
12651 : 0 : return true;
12652 : : }
12653 : 0 : next_after_fail1564:;
12654 : : }
12655 : : }
12656 : : }
12657 : : }
12658 : : break;
12659 : : }
12660 : : default:;
12661 : : }
12662 : : }
12663 : : break;
12664 : : default:;
12665 : : }
12666 : 517171 : break;
12667 : : }
12668 : 5982 : case MULT_EXPR:
12669 : 5982 : {
12670 : 5982 : tree _q20 = gimple_assign_rhs1 (_a1);
12671 : 5982 : _q20 = do_valueize (valueize, _q20);
12672 : 5982 : tree _q21 = gimple_assign_rhs2 (_a1);
12673 : 5982 : _q21 = do_valueize (valueize, _q21);
12674 : 5982 : if (tree_swap_operands_p (_q20, _q21))
12675 : 16 : std::swap (_q20, _q21);
12676 : 5982 : switch (TREE_CODE (_q21))
12677 : : {
12678 : 5349 : case INTEGER_CST:
12679 : 5349 : {
12680 : 5349 : switch (TREE_CODE (_p1))
12681 : : {
12682 : 4937 : case SSA_NAME:
12683 : 4937 : if (gimple *_d2 = get_def (valueize, _p1))
12684 : : {
12685 : 4520 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12686 : 3319 : switch (gimple_assign_rhs_code (_a2))
12687 : : {
12688 : 380 : case MULT_EXPR:
12689 : 380 : {
12690 : 380 : tree _q50 = gimple_assign_rhs1 (_a2);
12691 : 380 : _q50 = do_valueize (valueize, _q50);
12692 : 380 : tree _q51 = gimple_assign_rhs2 (_a2);
12693 : 380 : _q51 = do_valueize (valueize, _q51);
12694 : 380 : if (tree_swap_operands_p (_q50, _q51))
12695 : 0 : std::swap (_q50, _q51);
12696 : 380 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12697 : : {
12698 : 27 : switch (TREE_CODE (_q51))
12699 : : {
12700 : 27 : case INTEGER_CST:
12701 : 27 : {
12702 : 27 : {
12703 : 27 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
12704 : 27 : if (gimple_simplify_33 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12705 : 5 : return true;
12706 : : }
12707 : 22 : break;
12708 : : }
12709 : : default:;
12710 : : }
12711 : : }
12712 : 5344 : break;
12713 : : }
12714 : 0 : case LSHIFT_EXPR:
12715 : 0 : {
12716 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
12717 : 0 : _q50 = do_valueize (valueize, _q50);
12718 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
12719 : 0 : _q51 = do_valueize (valueize, _q51);
12720 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12721 : : {
12722 : 0 : switch (TREE_CODE (_q51))
12723 : : {
12724 : 0 : case INTEGER_CST:
12725 : 0 : {
12726 : 0 : {
12727 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
12728 : 0 : if (gimple_simplify_34 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12729 : 0 : return true;
12730 : : }
12731 : 0 : break;
12732 : : }
12733 : : default:;
12734 : : }
12735 : : }
12736 : : break;
12737 : : }
12738 : : default:;
12739 : : }
12740 : : }
12741 : : break;
12742 : 5344 : default:;
12743 : : }
12744 : 5344 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
12745 : : {
12746 : 97 : {
12747 : 97 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
12748 : 97 : if (gimple_simplify_35 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12749 : 0 : return true;
12750 : : }
12751 : : }
12752 : : break;
12753 : : }
12754 : : default:;
12755 : : }
12756 : 517171 : break;
12757 : : }
12758 : 14191 : case LSHIFT_EXPR:
12759 : 14191 : {
12760 : 14191 : tree _q20 = gimple_assign_rhs1 (_a1);
12761 : 14191 : _q20 = do_valueize (valueize, _q20);
12762 : 14191 : tree _q21 = gimple_assign_rhs2 (_a1);
12763 : 14191 : _q21 = do_valueize (valueize, _q21);
12764 : 14191 : switch (TREE_CODE (_q21))
12765 : : {
12766 : 10483 : case INTEGER_CST:
12767 : 10483 : {
12768 : 10483 : switch (TREE_CODE (_p1))
12769 : : {
12770 : 8256 : case SSA_NAME:
12771 : 8256 : if (gimple *_d2 = get_def (valueize, _p1))
12772 : : {
12773 : 8092 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12774 : 8038 : switch (gimple_assign_rhs_code (_a2))
12775 : : {
12776 : 0 : case MULT_EXPR:
12777 : 0 : {
12778 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
12779 : 0 : _q50 = do_valueize (valueize, _q50);
12780 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
12781 : 0 : _q51 = do_valueize (valueize, _q51);
12782 : 0 : if (tree_swap_operands_p (_q50, _q51))
12783 : 0 : std::swap (_q50, _q51);
12784 : 0 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12785 : : {
12786 : 0 : switch (TREE_CODE (_q51))
12787 : : {
12788 : 0 : case INTEGER_CST:
12789 : 0 : {
12790 : 0 : {
12791 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p1, _q20, _q51, _p0, _q21 };
12792 : 0 : if (gimple_simplify_34 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12793 : 0 : return true;
12794 : : }
12795 : 0 : break;
12796 : : }
12797 : : default:;
12798 : : }
12799 : : }
12800 : 517171 : break;
12801 : : }
12802 : : default:;
12803 : : }
12804 : : }
12805 : : break;
12806 : : default:;
12807 : : }
12808 : : break;
12809 : : }
12810 : : default:;
12811 : : }
12812 : : break;
12813 : : }
12814 : : default:;
12815 : : }
12816 : : }
12817 : : break;
12818 : 517171 : default:;
12819 : : }
12820 : 517171 : switch (TREE_CODE (_p1))
12821 : : {
12822 : 412847 : case SSA_NAME:
12823 : 412847 : if (gimple *_d1 = get_def (valueize, _p1))
12824 : : {
12825 : 339742 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12826 : 414791 : switch (gimple_assign_rhs_code (_a1))
12827 : : {
12828 : 7699 : case MULT_EXPR:
12829 : 7699 : {
12830 : 7699 : tree _q30 = gimple_assign_rhs1 (_a1);
12831 : 7699 : _q30 = do_valueize (valueize, _q30);
12832 : 7699 : tree _q31 = gimple_assign_rhs2 (_a1);
12833 : 7699 : _q31 = do_valueize (valueize, _q31);
12834 : 7699 : if (tree_swap_operands_p (_q30, _q31))
12835 : 117 : std::swap (_q30, _q31);
12836 : 7699 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
12837 : : {
12838 : 121 : switch (TREE_CODE (_q31))
12839 : : {
12840 : 121 : case INTEGER_CST:
12841 : 121 : {
12842 : 121 : {
12843 : 121 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
12844 : 121 : if (gimple_simplify_35 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12845 : 0 : return true;
12846 : : }
12847 : 121 : break;
12848 : : }
12849 : : default:;
12850 : : }
12851 : : }
12852 : 517171 : break;
12853 : : }
12854 : : default:;
12855 : : }
12856 : : }
12857 : : break;
12858 : 517171 : default:;
12859 : : }
12860 : 517171 : switch (TREE_CODE (_p0))
12861 : : {
12862 : 508522 : case SSA_NAME:
12863 : 508522 : if (gimple *_d1 = get_def (valueize, _p0))
12864 : : {
12865 : 405940 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12866 : 497715 : switch (gimple_assign_rhs_code (_a1))
12867 : : {
12868 : 14191 : case LSHIFT_EXPR:
12869 : 14191 : {
12870 : 14191 : tree _q20 = gimple_assign_rhs1 (_a1);
12871 : 14191 : _q20 = do_valueize (valueize, _q20);
12872 : 14191 : tree _q21 = gimple_assign_rhs2 (_a1);
12873 : 14191 : _q21 = do_valueize (valueize, _q21);
12874 : 14191 : switch (TREE_CODE (_q21))
12875 : : {
12876 : 10483 : case INTEGER_CST:
12877 : 10483 : {
12878 : 10483 : switch (TREE_CODE (_p1))
12879 : : {
12880 : 8256 : case SSA_NAME:
12881 : 8256 : if (gimple *_d2 = get_def (valueize, _p1))
12882 : : {
12883 : 8092 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12884 : 8038 : switch (gimple_assign_rhs_code (_a2))
12885 : : {
12886 : 86 : case LSHIFT_EXPR:
12887 : 86 : {
12888 : 86 : tree _q50 = gimple_assign_rhs1 (_a2);
12889 : 86 : _q50 = do_valueize (valueize, _q50);
12890 : 86 : tree _q51 = gimple_assign_rhs2 (_a2);
12891 : 86 : _q51 = do_valueize (valueize, _q51);
12892 : 86 : if ((_q50 == _q20 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _q20, 0) && types_match (_q50, _q20)))
12893 : : {
12894 : 3 : switch (TREE_CODE (_q51))
12895 : : {
12896 : 3 : case INTEGER_CST:
12897 : 3 : {
12898 : 3 : {
12899 : 3 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _p1, _q51 };
12900 : 3 : if (gimple_simplify_36 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12901 : 2 : return true;
12902 : : }
12903 : 1 : break;
12904 : : }
12905 : : default:;
12906 : : }
12907 : : }
12908 : : break;
12909 : : }
12910 : : default:;
12911 : : }
12912 : : }
12913 : : break;
12914 : 10481 : default:;
12915 : : }
12916 : 10481 : if ((_p1 == _q20 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q20, 0) && types_match (_p1, _q20)))
12917 : : {
12918 : 94 : {
12919 : 94 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q21 };
12920 : 94 : if (gimple_simplify_37 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12921 : 1 : return true;
12922 : : }
12923 : : }
12924 : : break;
12925 : : }
12926 : : default:;
12927 : : }
12928 : : break;
12929 : : }
12930 : : default:;
12931 : : }
12932 : : }
12933 : : break;
12934 : 517168 : default:;
12935 : : }
12936 : 517168 : switch (TREE_CODE (_p1))
12937 : : {
12938 : 412844 : case SSA_NAME:
12939 : 412844 : if (gimple *_d1 = get_def (valueize, _p1))
12940 : : {
12941 : 339739 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
12942 : 414788 : switch (gimple_assign_rhs_code (_a1))
12943 : : {
12944 : 7553 : case LSHIFT_EXPR:
12945 : 7553 : {
12946 : 7553 : tree _q30 = gimple_assign_rhs1 (_a1);
12947 : 7553 : _q30 = do_valueize (valueize, _q30);
12948 : 7553 : tree _q31 = gimple_assign_rhs2 (_a1);
12949 : 7553 : _q31 = do_valueize (valueize, _q31);
12950 : 7553 : if ((_q30 == _p0 && ! TREE_SIDE_EFFECTS (_q30)) || (operand_equal_p (_q30, _p0, 0) && types_match (_q30, _p0)))
12951 : : {
12952 : 792 : switch (TREE_CODE (_q31))
12953 : : {
12954 : 772 : case INTEGER_CST:
12955 : 772 : {
12956 : 772 : {
12957 : 772 : tree captures[3] ATTRIBUTE_UNUSED = { _p1, _p0, _q31 };
12958 : 772 : if (gimple_simplify_37 (res_op, seq, valueize, type, captures, BIT_XOR_EXPR))
12959 : 0 : return true;
12960 : : }
12961 : 772 : break;
12962 : : }
12963 : : default:;
12964 : : }
12965 : : }
12966 : : break;
12967 : : }
12968 : 7699 : case MULT_EXPR:
12969 : 7699 : {
12970 : 7699 : tree _q30 = gimple_assign_rhs1 (_a1);
12971 : 7699 : _q30 = do_valueize (valueize, _q30);
12972 : 7699 : tree _q31 = gimple_assign_rhs2 (_a1);
12973 : 7699 : _q31 = do_valueize (valueize, _q31);
12974 : 7699 : if (tree_swap_operands_p (_q30, _q31))
12975 : 117 : std::swap (_q30, _q31);
12976 : 7699 : switch (TREE_CODE (_q30))
12977 : : {
12978 : 7699 : case SSA_NAME:
12979 : 7699 : if (gimple *_d2 = get_def (valueize, _q30))
12980 : : {
12981 : 7041 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
12982 : 4128 : switch (gimple_assign_rhs_code (_a2))
12983 : : {
12984 : 970 : case BIT_XOR_EXPR:
12985 : 970 : {
12986 : 970 : tree _q40 = gimple_assign_rhs1 (_a2);
12987 : 970 : _q40 = do_valueize (valueize, _q40);
12988 : 970 : tree _q41 = gimple_assign_rhs2 (_a2);
12989 : 970 : _q41 = do_valueize (valueize, _q41);
12990 : 970 : if (tree_swap_operands_p (_q40, _q41))
12991 : 108 : std::swap (_q40, _q41);
12992 : 970 : if ((_q40 == _p0 && ! TREE_SIDE_EFFECTS (_q40)) || (operand_equal_p (_q40, _p0, 0) && types_match (_q40, _p0)))
12993 : : {
12994 : 0 : if (gimple_zero_one_valued_p (_q31, valueize))
12995 : : {
12996 : 0 : {
12997 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q41, _q31 };
12998 : 0 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
12999 : 0 : return true;
13000 : : }
13001 : : }
13002 : : }
13003 : 970 : if ((_q41 == _p0 && ! TREE_SIDE_EFFECTS (_q41)) || (operand_equal_p (_q41, _p0, 0) && types_match (_q41, _p0)))
13004 : : {
13005 : 0 : if (gimple_zero_one_valued_p (_q31, valueize))
13006 : : {
13007 : 0 : {
13008 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q40, _q31 };
13009 : 0 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13010 : 0 : return true;
13011 : : }
13012 : : }
13013 : : }
13014 : 7699 : break;
13015 : : }
13016 : : default:;
13017 : : }
13018 : : }
13019 : : break;
13020 : 7699 : default:;
13021 : : }
13022 : 7699 : if (gimple_zero_one_valued_p (_q30, valueize))
13023 : : {
13024 : 1118 : switch (TREE_CODE (_q31))
13025 : : {
13026 : 125 : case SSA_NAME:
13027 : 125 : if (gimple *_d2 = get_def (valueize, _q31))
13028 : : {
13029 : 118 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13030 : 75 : switch (gimple_assign_rhs_code (_a2))
13031 : : {
13032 : 68 : case BIT_XOR_EXPR:
13033 : 68 : {
13034 : 68 : tree _q50 = gimple_assign_rhs1 (_a2);
13035 : 68 : _q50 = do_valueize (valueize, _q50);
13036 : 68 : tree _q51 = gimple_assign_rhs2 (_a2);
13037 : 68 : _q51 = do_valueize (valueize, _q51);
13038 : 68 : if (tree_swap_operands_p (_q50, _q51))
13039 : 2 : std::swap (_q50, _q51);
13040 : 68 : if ((_q50 == _p0 && ! TREE_SIDE_EFFECTS (_q50)) || (operand_equal_p (_q50, _p0, 0) && types_match (_q50, _p0)))
13041 : : {
13042 : 18 : {
13043 : 18 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q51, _q30 };
13044 : 18 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13045 : 16 : return true;
13046 : : }
13047 : : }
13048 : 52 : if ((_q51 == _p0 && ! TREE_SIDE_EFFECTS (_q51)) || (operand_equal_p (_q51, _p0, 0) && types_match (_q51, _p0)))
13049 : : {
13050 : 50 : {
13051 : 50 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q50, _q30 };
13052 : 50 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13053 : 40 : return true;
13054 : : }
13055 : : }
13056 : 517112 : break;
13057 : : }
13058 : : default:;
13059 : : }
13060 : : }
13061 : : break;
13062 : : default:;
13063 : : }
13064 : : }
13065 : 517112 : break;
13066 : : }
13067 : : default:;
13068 : : }
13069 : : }
13070 : : break;
13071 : 517112 : default:;
13072 : : }
13073 : 517112 : switch (TREE_CODE (_p0))
13074 : : {
13075 : 508463 : case SSA_NAME:
13076 : 508463 : if (gimple *_d1 = get_def (valueize, _p0))
13077 : : {
13078 : 405881 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13079 : 497600 : switch (gimple_assign_rhs_code (_a1))
13080 : : {
13081 : 5977 : case MULT_EXPR:
13082 : 5977 : {
13083 : 5977 : tree _q20 = gimple_assign_rhs1 (_a1);
13084 : 5977 : _q20 = do_valueize (valueize, _q20);
13085 : 5977 : tree _q21 = gimple_assign_rhs2 (_a1);
13086 : 5977 : _q21 = do_valueize (valueize, _q21);
13087 : 5977 : if (tree_swap_operands_p (_q20, _q21))
13088 : 16 : std::swap (_q20, _q21);
13089 : 5977 : switch (TREE_CODE (_q20))
13090 : : {
13091 : 5977 : case SSA_NAME:
13092 : 5977 : if (gimple *_d2 = get_def (valueize, _q20))
13093 : : {
13094 : 5527 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13095 : 3967 : switch (gimple_assign_rhs_code (_a2))
13096 : : {
13097 : 2105 : case BIT_XOR_EXPR:
13098 : 2105 : {
13099 : 2105 : tree _q30 = gimple_assign_rhs1 (_a2);
13100 : 2105 : _q30 = do_valueize (valueize, _q30);
13101 : 2105 : tree _q31 = gimple_assign_rhs2 (_a2);
13102 : 2105 : _q31 = do_valueize (valueize, _q31);
13103 : 2105 : if (tree_swap_operands_p (_q30, _q31))
13104 : 165 : std::swap (_q30, _q31);
13105 : 2105 : if (gimple_zero_one_valued_p (_q21, valueize))
13106 : : {
13107 : 0 : if ((_p1 == _q30 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q30, 0) && types_match (_p1, _q30)))
13108 : : {
13109 : 0 : {
13110 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _q31, _q21 };
13111 : 0 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13112 : 0 : return true;
13113 : : }
13114 : : }
13115 : 0 : if ((_p1 == _q31 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q31, 0) && types_match (_p1, _q31)))
13116 : : {
13117 : 0 : {
13118 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q31, _q30, _q21 };
13119 : 0 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13120 : 0 : return true;
13121 : : }
13122 : : }
13123 : : }
13124 : 5977 : break;
13125 : : }
13126 : : default:;
13127 : : }
13128 : : }
13129 : : break;
13130 : 5977 : default:;
13131 : : }
13132 : 5977 : if (gimple_zero_one_valued_p (_q20, valueize))
13133 : : {
13134 : 245 : switch (TREE_CODE (_q21))
13135 : : {
13136 : 54 : case SSA_NAME:
13137 : 54 : if (gimple *_d2 = get_def (valueize, _q21))
13138 : : {
13139 : 54 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13140 : 41 : switch (gimple_assign_rhs_code (_a2))
13141 : : {
13142 : 22 : case BIT_XOR_EXPR:
13143 : 22 : {
13144 : 22 : tree _q40 = gimple_assign_rhs1 (_a2);
13145 : 22 : _q40 = do_valueize (valueize, _q40);
13146 : 22 : tree _q41 = gimple_assign_rhs2 (_a2);
13147 : 22 : _q41 = do_valueize (valueize, _q41);
13148 : 22 : if (tree_swap_operands_p (_q40, _q41))
13149 : 0 : std::swap (_q40, _q41);
13150 : 22 : if ((_p1 == _q40 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q40, 0) && types_match (_p1, _q40)))
13151 : : {
13152 : 6 : {
13153 : 6 : tree captures[3] ATTRIBUTE_UNUSED = { _q40, _q41, _q20 };
13154 : 6 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13155 : 6 : return true;
13156 : : }
13157 : : }
13158 : 16 : if ((_p1 == _q41 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _q41, 0) && types_match (_p1, _q41)))
13159 : : {
13160 : 0 : {
13161 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q41, _q40, _q20 };
13162 : 0 : if (gimple_simplify_38 (res_op, seq, valueize, type, captures))
13163 : 0 : return true;
13164 : : }
13165 : : }
13166 : 517106 : break;
13167 : : }
13168 : : default:;
13169 : : }
13170 : : }
13171 : : break;
13172 : : default:;
13173 : : }
13174 : : }
13175 : 517106 : break;
13176 : : }
13177 : 56 : case VEC_COND_EXPR:
13178 : 56 : {
13179 : 56 : tree _q20 = gimple_assign_rhs1 (_a1);
13180 : 56 : _q20 = do_valueize (valueize, _q20);
13181 : 56 : tree _q21 = gimple_assign_rhs2 (_a1);
13182 : 56 : _q21 = do_valueize (valueize, _q21);
13183 : 56 : tree _q22 = gimple_assign_rhs3 (_a1);
13184 : 56 : _q22 = do_valueize (valueize, _q22);
13185 : 56 : switch (TREE_CODE (_p1))
13186 : : {
13187 : 56 : case SSA_NAME:
13188 : 56 : if (gimple *_d2 = get_def (valueize, _p1))
13189 : : {
13190 : 52 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13191 : 58 : switch (gimple_assign_rhs_code (_a2))
13192 : : {
13193 : 14 : case VEC_COND_EXPR:
13194 : 14 : {
13195 : 14 : tree _q60 = gimple_assign_rhs1 (_a2);
13196 : 14 : _q60 = do_valueize (valueize, _q60);
13197 : 14 : tree _q61 = gimple_assign_rhs2 (_a2);
13198 : 14 : _q61 = do_valueize (valueize, _q61);
13199 : 14 : tree _q62 = gimple_assign_rhs3 (_a2);
13200 : 14 : _q62 = do_valueize (valueize, _q62);
13201 : 14 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
13202 : : {
13203 : 0 : {
13204 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
13205 : 0 : if (TREE_CODE_CLASS (BIT_XOR_EXPR) != tcc_comparison
13206 : : || types_match (type, TREE_TYPE (captures[2]))
13207 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
13208 : : || (optimize_vectors_before_lowering_p ()
13209 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
13210 : : TREE_TYPE (captures[1]), ERROR_MARK))
13211 : : )
13212 : : {
13213 : 0 : gimple_seq *lseq = seq;
13214 : 0 : if (lseq
13215 : 0 : && (!single_use (captures[0])
13216 : 0 : || !single_use (captures[4])))
13217 : 0 : lseq = NULL;
13218 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1565;
13219 : 0 : {
13220 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
13221 : 0 : res_op->ops[0] = captures[1];
13222 : 0 : {
13223 : 0 : tree _o1[2], _r1;
13224 : 0 : _o1[0] = captures[2];
13225 : 0 : _o1[1] = captures[5];
13226 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13227 : 0 : tem_op.resimplify (NULL, valueize);
13228 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13229 : 0 : if (!_r1) goto next_after_fail1565;
13230 : 0 : res_op->ops[1] = _r1;
13231 : : }
13232 : 0 : {
13233 : 0 : tree _o1[2], _r1;
13234 : 0 : _o1[0] = captures[3];
13235 : 0 : _o1[1] = captures[6];
13236 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13237 : 0 : tem_op.resimplify (NULL, valueize);
13238 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13239 : 0 : if (!_r1) goto next_after_fail1565;
13240 : 0 : res_op->ops[2] = _r1;
13241 : : }
13242 : 0 : res_op->resimplify (lseq, valueize);
13243 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 925, __FILE__, __LINE__, true);
13244 : 0 : return true;
13245 : : }
13246 : 0 : next_after_fail1565:;
13247 : : }
13248 : : }
13249 : : }
13250 : : break;
13251 : : }
13252 : : default:;
13253 : : }
13254 : : }
13255 : : break;
13256 : 56 : default:;
13257 : : }
13258 : 56 : {
13259 : 56 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
13260 : 56 : if (TREE_CODE_CLASS (BIT_XOR_EXPR) != tcc_comparison
13261 : : || types_match (type, TREE_TYPE (captures[2]))
13262 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
13263 : : || (optimize_vectors_before_lowering_p ()
13264 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
13265 : : TREE_TYPE (captures[1]), ERROR_MARK))
13266 : : )
13267 : : {
13268 : 56 : gimple_seq *lseq = seq;
13269 : 56 : if (lseq
13270 : 22 : && (!single_use (captures[0])))
13271 : 37 : lseq = NULL;
13272 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1566;
13273 : 56 : {
13274 : 56 : res_op->set_op (VEC_COND_EXPR, type, 3);
13275 : 56 : res_op->ops[0] = captures[1];
13276 : 56 : {
13277 : 56 : tree _o1[2], _r1;
13278 : 56 : _o1[0] = captures[2];
13279 : 56 : _o1[1] = captures[4];
13280 : 56 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13281 : 56 : tem_op.resimplify (NULL, valueize);
13282 : 56 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13283 : 56 : if (!_r1) goto next_after_fail1566;
13284 : 0 : res_op->ops[1] = _r1;
13285 : : }
13286 : 0 : {
13287 : 0 : tree _o1[2], _r1;
13288 : 0 : _o1[0] = captures[3];
13289 : 0 : _o1[1] = captures[4];
13290 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13291 : 0 : tem_op.resimplify (NULL, valueize);
13292 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13293 : 0 : if (!_r1) goto next_after_fail1566;
13294 : 0 : res_op->ops[2] = _r1;
13295 : : }
13296 : 0 : res_op->resimplify (lseq, valueize);
13297 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
13298 : 0 : return true;
13299 : : }
13300 : 56 : next_after_fail1566:;
13301 : : }
13302 : : }
13303 : 56 : break;
13304 : : }
13305 : : default:;
13306 : : }
13307 : : }
13308 : : break;
13309 : 517106 : default:;
13310 : : }
13311 : 517106 : switch (TREE_CODE (_p1))
13312 : : {
13313 : 412782 : case SSA_NAME:
13314 : 412782 : if (gimple *_d1 = get_def (valueize, _p1))
13315 : : {
13316 : 339677 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13317 : 414732 : switch (gimple_assign_rhs_code (_a1))
13318 : : {
13319 : 135 : case VEC_COND_EXPR:
13320 : 135 : {
13321 : 135 : tree _q30 = gimple_assign_rhs1 (_a1);
13322 : 135 : _q30 = do_valueize (valueize, _q30);
13323 : 135 : tree _q31 = gimple_assign_rhs2 (_a1);
13324 : 135 : _q31 = do_valueize (valueize, _q31);
13325 : 135 : tree _q32 = gimple_assign_rhs3 (_a1);
13326 : 135 : _q32 = do_valueize (valueize, _q32);
13327 : 135 : {
13328 : 135 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
13329 : 135 : if (TREE_CODE_CLASS (BIT_XOR_EXPR) != tcc_comparison
13330 : : || types_match (type, TREE_TYPE (captures[3]))
13331 : : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]), ERROR_MARK)
13332 : : || (optimize_vectors_before_lowering_p ()
13333 : : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]),
13334 : : TREE_TYPE (captures[2]), ERROR_MARK))
13335 : : )
13336 : : {
13337 : 135 : gimple_seq *lseq = seq;
13338 : 135 : if (lseq
13339 : 56 : && (!single_use (captures[1])))
13340 : 87 : lseq = NULL;
13341 : 135 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1567;
13342 : 135 : {
13343 : 135 : res_op->set_op (VEC_COND_EXPR, type, 3);
13344 : 135 : res_op->ops[0] = captures[2];
13345 : 135 : {
13346 : 135 : tree _o1[2], _r1;
13347 : 135 : _o1[0] = captures[0];
13348 : 135 : _o1[1] = captures[3];
13349 : 135 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13350 : 135 : tem_op.resimplify (NULL, valueize);
13351 : 135 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13352 : 135 : if (!_r1) goto next_after_fail1567;
13353 : 0 : res_op->ops[1] = _r1;
13354 : : }
13355 : 0 : {
13356 : 0 : tree _o1[2], _r1;
13357 : 0 : _o1[0] = captures[0];
13358 : 0 : _o1[1] = captures[4];
13359 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
13360 : 0 : tem_op.resimplify (NULL, valueize);
13361 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
13362 : 0 : if (!_r1) goto next_after_fail1567;
13363 : 0 : res_op->ops[2] = _r1;
13364 : : }
13365 : 0 : res_op->resimplify (lseq, valueize);
13366 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
13367 : 0 : return true;
13368 : : }
13369 : 135 : next_after_fail1567:;
13370 : : }
13371 : : }
13372 : 135 : break;
13373 : : }
13374 : : default:;
13375 : : }
13376 : : }
13377 : : break;
13378 : 517106 : default:;
13379 : : }
13380 : 517106 : switch (TREE_CODE (_p0))
13381 : : {
13382 : 508457 : case SSA_NAME:
13383 : 508457 : if (gimple *_d1 = get_def (valueize, _p0))
13384 : : {
13385 : 405875 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13386 : 497594 : switch (gimple_assign_rhs_code (_a1))
13387 : : {
13388 : 1147 : case LT_EXPR:
13389 : 1147 : {
13390 : 1147 : tree _q20 = gimple_assign_rhs1 (_a1);
13391 : 1147 : _q20 = do_valueize (valueize, _q20);
13392 : 1147 : tree _q21 = gimple_assign_rhs2 (_a1);
13393 : 1147 : _q21 = do_valueize (valueize, _q21);
13394 : 1147 : if (integer_truep (_p1))
13395 : : {
13396 : 0 : {
13397 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13398 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, LT_EXPR, GE_EXPR, UNGE_EXPR))
13399 : 0 : return true;
13400 : : }
13401 : : }
13402 : 1147 : if (integer_zerop (_q21))
13403 : : {
13404 : 514 : switch (TREE_CODE (_p1))
13405 : : {
13406 : 514 : case SSA_NAME:
13407 : 514 : if (gimple *_d2 = get_def (valueize, _p1))
13408 : : {
13409 : 514 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13410 : 506 : switch (gimple_assign_rhs_code (_a2))
13411 : : {
13412 : 163 : case LT_EXPR:
13413 : 163 : {
13414 : 163 : tree _q50 = gimple_assign_rhs1 (_a2);
13415 : 163 : _q50 = do_valueize (valueize, _q50);
13416 : 163 : tree _q51 = gimple_assign_rhs2 (_a2);
13417 : 163 : _q51 = do_valueize (valueize, _q51);
13418 : 163 : if (integer_zerop (_q51))
13419 : : {
13420 : 75 : {
13421 : 75 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q50 };
13422 : 75 : if (gimple_simplify_40 (res_op, seq, valueize, type, captures, LT_EXPR))
13423 : 5 : return true;
13424 : : }
13425 : : }
13426 : : break;
13427 : : }
13428 : 0 : case GE_EXPR:
13429 : 0 : {
13430 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
13431 : 0 : _q50 = do_valueize (valueize, _q50);
13432 : 0 : tree _q51 = gimple_assign_rhs2 (_a2);
13433 : 0 : _q51 = do_valueize (valueize, _q51);
13434 : 0 : if (integer_zerop (_q51))
13435 : : {
13436 : 0 : {
13437 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q50 };
13438 : 0 : if (gimple_simplify_41 (res_op, seq, valueize, type, captures))
13439 : 0 : return true;
13440 : : }
13441 : : }
13442 : : break;
13443 : : }
13444 : : default:;
13445 : : }
13446 : : }
13447 : : break;
13448 : : default:;
13449 : : }
13450 : : }
13451 : : break;
13452 : : }
13453 : 599 : case LE_EXPR:
13454 : 599 : {
13455 : 599 : tree _q20 = gimple_assign_rhs1 (_a1);
13456 : 599 : _q20 = do_valueize (valueize, _q20);
13457 : 599 : tree _q21 = gimple_assign_rhs2 (_a1);
13458 : 599 : _q21 = do_valueize (valueize, _q21);
13459 : 599 : if (integer_truep (_p1))
13460 : : {
13461 : 0 : {
13462 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13463 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, LE_EXPR, GT_EXPR, UNGT_EXPR))
13464 : 0 : return true;
13465 : : }
13466 : : }
13467 : : break;
13468 : : }
13469 : 626 : case EQ_EXPR:
13470 : 626 : {
13471 : 626 : tree _q20 = gimple_assign_rhs1 (_a1);
13472 : 626 : _q20 = do_valueize (valueize, _q20);
13473 : 626 : tree _q21 = gimple_assign_rhs2 (_a1);
13474 : 626 : _q21 = do_valueize (valueize, _q21);
13475 : 626 : if (tree_swap_operands_p (_q20, _q21))
13476 : 0 : std::swap (_q20, _q21);
13477 : 626 : if (integer_truep (_p1))
13478 : : {
13479 : 0 : {
13480 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13481 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, EQ_EXPR, NE_EXPR, NE_EXPR))
13482 : 0 : return true;
13483 : : }
13484 : : }
13485 : 517099 : break;
13486 : : }
13487 : 1474 : case NE_EXPR:
13488 : 1474 : {
13489 : 1474 : tree _q20 = gimple_assign_rhs1 (_a1);
13490 : 1474 : _q20 = do_valueize (valueize, _q20);
13491 : 1474 : tree _q21 = gimple_assign_rhs2 (_a1);
13492 : 1474 : _q21 = do_valueize (valueize, _q21);
13493 : 1474 : if (tree_swap_operands_p (_q20, _q21))
13494 : 14 : std::swap (_q20, _q21);
13495 : 1474 : if (integer_truep (_p1))
13496 : : {
13497 : 0 : {
13498 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13499 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, NE_EXPR, EQ_EXPR, EQ_EXPR))
13500 : 0 : return true;
13501 : : }
13502 : : }
13503 : 517099 : break;
13504 : : }
13505 : 852 : case GE_EXPR:
13506 : 852 : {
13507 : 852 : tree _q20 = gimple_assign_rhs1 (_a1);
13508 : 852 : _q20 = do_valueize (valueize, _q20);
13509 : 852 : tree _q21 = gimple_assign_rhs2 (_a1);
13510 : 852 : _q21 = do_valueize (valueize, _q21);
13511 : 852 : if (integer_truep (_p1))
13512 : : {
13513 : 0 : {
13514 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13515 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, GE_EXPR, LT_EXPR, UNLT_EXPR))
13516 : 0 : return true;
13517 : : }
13518 : : }
13519 : 852 : if (integer_zerop (_q21))
13520 : : {
13521 : 110 : switch (TREE_CODE (_p1))
13522 : : {
13523 : 110 : case SSA_NAME:
13524 : 110 : if (gimple *_d2 = get_def (valueize, _p1))
13525 : : {
13526 : 110 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13527 : 110 : switch (gimple_assign_rhs_code (_a2))
13528 : : {
13529 : 1 : case GE_EXPR:
13530 : 1 : {
13531 : 1 : tree _q50 = gimple_assign_rhs1 (_a2);
13532 : 1 : _q50 = do_valueize (valueize, _q50);
13533 : 1 : tree _q51 = gimple_assign_rhs2 (_a2);
13534 : 1 : _q51 = do_valueize (valueize, _q51);
13535 : 1 : if (integer_zerop (_q51))
13536 : : {
13537 : 1 : {
13538 : 1 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q50 };
13539 : 1 : if (gimple_simplify_40 (res_op, seq, valueize, type, captures, GE_EXPR))
13540 : 1 : return true;
13541 : : }
13542 : : }
13543 : : break;
13544 : : }
13545 : 16 : case LT_EXPR:
13546 : 16 : {
13547 : 16 : tree _q50 = gimple_assign_rhs1 (_a2);
13548 : 16 : _q50 = do_valueize (valueize, _q50);
13549 : 16 : tree _q51 = gimple_assign_rhs2 (_a2);
13550 : 16 : _q51 = do_valueize (valueize, _q51);
13551 : 16 : if (integer_zerop (_q51))
13552 : : {
13553 : 0 : {
13554 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p1, _q50, _p0, _q20 };
13555 : 0 : if (gimple_simplify_41 (res_op, seq, valueize, type, captures))
13556 : 0 : return true;
13557 : : }
13558 : : }
13559 : : break;
13560 : : }
13561 : : default:;
13562 : : }
13563 : : }
13564 : : break;
13565 : : default:;
13566 : : }
13567 : : }
13568 : : break;
13569 : : }
13570 : 1659 : case GT_EXPR:
13571 : 1659 : {
13572 : 1659 : tree _q20 = gimple_assign_rhs1 (_a1);
13573 : 1659 : _q20 = do_valueize (valueize, _q20);
13574 : 1659 : tree _q21 = gimple_assign_rhs2 (_a1);
13575 : 1659 : _q21 = do_valueize (valueize, _q21);
13576 : 1659 : if (integer_truep (_p1))
13577 : : {
13578 : 0 : {
13579 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13580 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, GT_EXPR, LE_EXPR, UNLE_EXPR))
13581 : 0 : return true;
13582 : : }
13583 : : }
13584 : : break;
13585 : : }
13586 : 234 : case UNORDERED_EXPR:
13587 : 234 : {
13588 : 234 : tree _q20 = gimple_assign_rhs1 (_a1);
13589 : 234 : _q20 = do_valueize (valueize, _q20);
13590 : 234 : tree _q21 = gimple_assign_rhs2 (_a1);
13591 : 234 : _q21 = do_valueize (valueize, _q21);
13592 : 234 : if (tree_swap_operands_p (_q20, _q21))
13593 : 0 : std::swap (_q20, _q21);
13594 : 234 : if (integer_truep (_p1))
13595 : : {
13596 : 0 : {
13597 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13598 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, ORDERED_EXPR, ORDERED_EXPR))
13599 : 0 : return true;
13600 : : }
13601 : : }
13602 : 517099 : break;
13603 : : }
13604 : 10 : case ORDERED_EXPR:
13605 : 10 : {
13606 : 10 : tree _q20 = gimple_assign_rhs1 (_a1);
13607 : 10 : _q20 = do_valueize (valueize, _q20);
13608 : 10 : tree _q21 = gimple_assign_rhs2 (_a1);
13609 : 10 : _q21 = do_valueize (valueize, _q21);
13610 : 10 : if (tree_swap_operands_p (_q20, _q21))
13611 : 0 : std::swap (_q20, _q21);
13612 : 10 : if (integer_truep (_p1))
13613 : : {
13614 : 0 : {
13615 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13616 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, ORDERED_EXPR, UNORDERED_EXPR, UNORDERED_EXPR))
13617 : 0 : return true;
13618 : : }
13619 : : }
13620 : 517099 : break;
13621 : : }
13622 : 0 : case UNLT_EXPR:
13623 : 0 : {
13624 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
13625 : 0 : _q20 = do_valueize (valueize, _q20);
13626 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
13627 : 0 : _q21 = do_valueize (valueize, _q21);
13628 : 0 : if (integer_truep (_p1))
13629 : : {
13630 : 0 : {
13631 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13632 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNLT_EXPR, GE_EXPR, GE_EXPR))
13633 : 0 : return true;
13634 : : }
13635 : : }
13636 : : break;
13637 : : }
13638 : 12 : case UNLE_EXPR:
13639 : 12 : {
13640 : 12 : tree _q20 = gimple_assign_rhs1 (_a1);
13641 : 12 : _q20 = do_valueize (valueize, _q20);
13642 : 12 : tree _q21 = gimple_assign_rhs2 (_a1);
13643 : 12 : _q21 = do_valueize (valueize, _q21);
13644 : 12 : if (integer_truep (_p1))
13645 : : {
13646 : 0 : {
13647 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13648 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNLE_EXPR, GT_EXPR, GT_EXPR))
13649 : 0 : return true;
13650 : : }
13651 : : }
13652 : : break;
13653 : : }
13654 : 0 : case UNGT_EXPR:
13655 : 0 : {
13656 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
13657 : 0 : _q20 = do_valueize (valueize, _q20);
13658 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
13659 : 0 : _q21 = do_valueize (valueize, _q21);
13660 : 0 : if (integer_truep (_p1))
13661 : : {
13662 : 0 : {
13663 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13664 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNGT_EXPR, LE_EXPR, LE_EXPR))
13665 : 0 : return true;
13666 : : }
13667 : : }
13668 : : break;
13669 : : }
13670 : 16 : case UNGE_EXPR:
13671 : 16 : {
13672 : 16 : tree _q20 = gimple_assign_rhs1 (_a1);
13673 : 16 : _q20 = do_valueize (valueize, _q20);
13674 : 16 : tree _q21 = gimple_assign_rhs2 (_a1);
13675 : 16 : _q21 = do_valueize (valueize, _q21);
13676 : 16 : if (integer_truep (_p1))
13677 : : {
13678 : 0 : {
13679 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13680 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNGE_EXPR, LT_EXPR, LT_EXPR))
13681 : 0 : return true;
13682 : : }
13683 : : }
13684 : : break;
13685 : : }
13686 : 0 : case UNEQ_EXPR:
13687 : 0 : {
13688 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
13689 : 0 : _q20 = do_valueize (valueize, _q20);
13690 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
13691 : 0 : _q21 = do_valueize (valueize, _q21);
13692 : 0 : if (tree_swap_operands_p (_q20, _q21))
13693 : 0 : std::swap (_q20, _q21);
13694 : 0 : if (integer_truep (_p1))
13695 : : {
13696 : 0 : {
13697 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13698 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, UNEQ_EXPR, LTGT_EXPR, LTGT_EXPR))
13699 : 0 : return true;
13700 : : }
13701 : : }
13702 : 517099 : break;
13703 : : }
13704 : 0 : case LTGT_EXPR:
13705 : 0 : {
13706 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
13707 : 0 : _q20 = do_valueize (valueize, _q20);
13708 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
13709 : 0 : _q21 = do_valueize (valueize, _q21);
13710 : 0 : if (tree_swap_operands_p (_q20, _q21))
13711 : 0 : std::swap (_q20, _q21);
13712 : 0 : if (integer_truep (_p1))
13713 : : {
13714 : 0 : {
13715 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q21 };
13716 : 0 : if (gimple_simplify_39 (res_op, seq, valueize, type, captures, LTGT_EXPR, UNEQ_EXPR, UNEQ_EXPR))
13717 : 0 : return true;
13718 : : }
13719 : : }
13720 : 517099 : break;
13721 : : }
13722 : 56 : case VEC_COND_EXPR:
13723 : 56 : {
13724 : 56 : tree _q20 = gimple_assign_rhs1 (_a1);
13725 : 56 : _q20 = do_valueize (valueize, _q20);
13726 : 56 : tree _q21 = gimple_assign_rhs2 (_a1);
13727 : 56 : _q21 = do_valueize (valueize, _q21);
13728 : 56 : tree _q22 = gimple_assign_rhs3 (_a1);
13729 : 56 : _q22 = do_valueize (valueize, _q22);
13730 : 56 : if (uniform_integer_cst_p (_q21))
13731 : : {
13732 : 32 : if (uniform_integer_cst_p (_q22))
13733 : : {
13734 : 32 : {
13735 : 32 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1 };
13736 : 32 : if (gimple_simplify_43 (res_op, seq, valueize, type, captures))
13737 : 0 : return true;
13738 : : }
13739 : : }
13740 : : }
13741 : : break;
13742 : : }
13743 : : default:;
13744 : : }
13745 : 59416 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
13746 : 11265 : switch (gimple_call_combined_fn (_c1))
13747 : : {
13748 : 2 : case CFN_PARITY:
13749 : 2 : if (gimple_call_num_args (_c1) == 1)
13750 : : {
13751 : 2 : tree _q20 = gimple_call_arg (_c1, 0);
13752 : 2 : _q20 = do_valueize (valueize, _q20);
13753 : 2 : switch (TREE_CODE (_p1))
13754 : : {
13755 : 2 : case SSA_NAME:
13756 : 2 : if (gimple *_d2 = get_def (valueize, _p1))
13757 : : {
13758 : 2 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13759 : 2 : switch (gimple_call_combined_fn (_c2))
13760 : : {
13761 : 2 : case CFN_PARITY:
13762 : 2 : if (gimple_call_num_args (_c2) == 1)
13763 : : {
13764 : 2 : tree _q40 = gimple_call_arg (_c2, 0);
13765 : 2 : _q40 = do_valueize (valueize, _q40);
13766 : 2 : {
13767 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13768 : 2 : if (gimple_simplify_42 (res_op, seq, valueize, type, captures, CFN_PARITY))
13769 : 1 : return true;
13770 : : }
13771 : : }
13772 : : break;
13773 : : default:;
13774 : : }
13775 : : }
13776 : : break;
13777 : : default:;
13778 : : }
13779 : : }
13780 : : break;
13781 : 0 : case CFN_BUILT_IN_PARITYL:
13782 : 0 : if (gimple_call_num_args (_c1) == 1)
13783 : : {
13784 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
13785 : 0 : _q20 = do_valueize (valueize, _q20);
13786 : 0 : switch (TREE_CODE (_p1))
13787 : : {
13788 : 0 : case SSA_NAME:
13789 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
13790 : : {
13791 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13792 : 0 : switch (gimple_call_combined_fn (_c2))
13793 : : {
13794 : 0 : case CFN_BUILT_IN_PARITYL:
13795 : 0 : if (gimple_call_num_args (_c2) == 1)
13796 : : {
13797 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
13798 : 0 : _q40 = do_valueize (valueize, _q40);
13799 : 0 : {
13800 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13801 : 0 : if (gimple_simplify_42 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYL))
13802 : 0 : return true;
13803 : : }
13804 : : }
13805 : : break;
13806 : : default:;
13807 : : }
13808 : : }
13809 : : break;
13810 : : default:;
13811 : : }
13812 : : }
13813 : : break;
13814 : 0 : case CFN_BUILT_IN_PARITYIMAX:
13815 : 0 : if (gimple_call_num_args (_c1) == 1)
13816 : : {
13817 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
13818 : 0 : _q20 = do_valueize (valueize, _q20);
13819 : 0 : switch (TREE_CODE (_p1))
13820 : : {
13821 : 0 : case SSA_NAME:
13822 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
13823 : : {
13824 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13825 : 0 : switch (gimple_call_combined_fn (_c2))
13826 : : {
13827 : 0 : case CFN_BUILT_IN_PARITYIMAX:
13828 : 0 : if (gimple_call_num_args (_c2) == 1)
13829 : : {
13830 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
13831 : 0 : _q40 = do_valueize (valueize, _q40);
13832 : 0 : {
13833 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13834 : 0 : if (gimple_simplify_42 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYIMAX))
13835 : 0 : return true;
13836 : : }
13837 : : }
13838 : : break;
13839 : : default:;
13840 : : }
13841 : : }
13842 : : break;
13843 : : default:;
13844 : : }
13845 : : }
13846 : : break;
13847 : 11 : case CFN_BUILT_IN_PARITY:
13848 : 11 : if (gimple_call_num_args (_c1) == 1)
13849 : : {
13850 : 11 : tree _q20 = gimple_call_arg (_c1, 0);
13851 : 11 : _q20 = do_valueize (valueize, _q20);
13852 : 11 : switch (TREE_CODE (_p1))
13853 : : {
13854 : 0 : case SSA_NAME:
13855 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
13856 : : {
13857 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13858 : 0 : switch (gimple_call_combined_fn (_c2))
13859 : : {
13860 : 0 : case CFN_BUILT_IN_PARITY:
13861 : 0 : if (gimple_call_num_args (_c2) == 1)
13862 : : {
13863 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
13864 : 0 : _q40 = do_valueize (valueize, _q40);
13865 : 0 : {
13866 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13867 : 0 : if (gimple_simplify_42 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITY))
13868 : 0 : return true;
13869 : : }
13870 : : }
13871 : : break;
13872 : : default:;
13873 : : }
13874 : : }
13875 : : break;
13876 : : default:;
13877 : : }
13878 : : }
13879 : : break;
13880 : 11 : case CFN_BUILT_IN_PARITYLL:
13881 : 11 : if (gimple_call_num_args (_c1) == 1)
13882 : : {
13883 : 11 : tree _q20 = gimple_call_arg (_c1, 0);
13884 : 11 : _q20 = do_valueize (valueize, _q20);
13885 : 11 : switch (TREE_CODE (_p1))
13886 : : {
13887 : 0 : case SSA_NAME:
13888 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
13889 : : {
13890 : 0 : if (gcall *_c2 = dyn_cast <gcall *> (_d2))
13891 : 0 : switch (gimple_call_combined_fn (_c2))
13892 : : {
13893 : 0 : case CFN_BUILT_IN_PARITYLL:
13894 : 0 : if (gimple_call_num_args (_c2) == 1)
13895 : : {
13896 : 0 : tree _q40 = gimple_call_arg (_c2, 0);
13897 : 0 : _q40 = do_valueize (valueize, _q40);
13898 : 0 : {
13899 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
13900 : 0 : if (gimple_simplify_42 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_PARITYLL))
13901 : 0 : return true;
13902 : : }
13903 : : }
13904 : : break;
13905 : : default:;
13906 : : }
13907 : : }
13908 : : break;
13909 : : default:;
13910 : : }
13911 : : }
13912 : : break;
13913 : : default:;
13914 : : }
13915 : : }
13916 : : break;
13917 : 517099 : default:;
13918 : : }
13919 : 517099 : switch (TREE_CODE (_p1))
13920 : : {
13921 : 412775 : case SSA_NAME:
13922 : 412775 : if (gimple *_d1 = get_def (valueize, _p1))
13923 : : {
13924 : 339670 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13925 : 414726 : switch (gimple_assign_rhs_code (_a1))
13926 : : {
13927 : 135 : case VEC_COND_EXPR:
13928 : 135 : {
13929 : 135 : tree _q30 = gimple_assign_rhs1 (_a1);
13930 : 135 : _q30 = do_valueize (valueize, _q30);
13931 : 135 : tree _q31 = gimple_assign_rhs2 (_a1);
13932 : 135 : _q31 = do_valueize (valueize, _q31);
13933 : 135 : tree _q32 = gimple_assign_rhs3 (_a1);
13934 : 135 : _q32 = do_valueize (valueize, _q32);
13935 : 135 : if (uniform_integer_cst_p (_q31))
13936 : : {
13937 : 34 : if (uniform_integer_cst_p (_q32))
13938 : : {
13939 : 34 : {
13940 : 34 : tree captures[4] ATTRIBUTE_UNUSED = { _q30, _q31, _q32, _p0 };
13941 : 34 : if (gimple_simplify_43 (res_op, seq, valueize, type, captures))
13942 : 0 : return true;
13943 : : }
13944 : : }
13945 : : }
13946 : : break;
13947 : : }
13948 : : default:;
13949 : : }
13950 : : }
13951 : : break;
13952 : 517099 : default:;
13953 : : }
13954 : 517099 : switch (TREE_CODE (_p0))
13955 : : {
13956 : 508450 : case SSA_NAME:
13957 : 508450 : if (gimple *_d1 = get_def (valueize, _p0))
13958 : : {
13959 : 405868 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
13960 : 497588 : switch (gimple_assign_rhs_code (_a1))
13961 : : {
13962 : 279 : case VEC_PERM_EXPR:
13963 : 279 : {
13964 : 279 : tree _q20 = gimple_assign_rhs1 (_a1);
13965 : 279 : _q20 = do_valueize (valueize, _q20);
13966 : 279 : tree _q21 = gimple_assign_rhs2 (_a1);
13967 : 279 : _q21 = do_valueize (valueize, _q21);
13968 : 279 : tree _q22 = gimple_assign_rhs3 (_a1);
13969 : 279 : _q22 = do_valueize (valueize, _q22);
13970 : 279 : if ((_q21 == _q20 && ! TREE_SIDE_EFFECTS (_q21)) || (operand_equal_p (_q21, _q20, 0) && types_match (_q21, _q20)))
13971 : : {
13972 : 46 : switch (TREE_CODE (_p1))
13973 : : {
13974 : 26 : case SSA_NAME:
13975 : 26 : if (gimple *_d2 = get_def (valueize, _p1))
13976 : : {
13977 : 26 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
13978 : 16 : switch (gimple_assign_rhs_code (_a2))
13979 : : {
13980 : 16 : case VEC_PERM_EXPR:
13981 : 16 : {
13982 : 16 : tree _q60 = gimple_assign_rhs1 (_a2);
13983 : 16 : _q60 = do_valueize (valueize, _q60);
13984 : 16 : tree _q61 = gimple_assign_rhs2 (_a2);
13985 : 16 : _q61 = do_valueize (valueize, _q61);
13986 : 16 : tree _q62 = gimple_assign_rhs3 (_a2);
13987 : 16 : _q62 = do_valueize (valueize, _q62);
13988 : 16 : if ((_q61 == _q60 && ! TREE_SIDE_EFFECTS (_q61)) || (operand_equal_p (_q61, _q60, 0) && types_match (_q61, _q60)))
13989 : : {
13990 : 16 : if ((_q62 == _q22 && ! TREE_SIDE_EFFECTS (_q62)) || (operand_equal_p (_q62, _q22, 0) && types_match (_q62, _q22)))
13991 : : {
13992 : 2 : {
13993 : 2 : tree captures[4] ATTRIBUTE_UNUSED = { _q20, _q22, _q60 };
13994 : 2 : if (VECTOR_INTEGER_TYPE_P (type)
13995 : : )
13996 : : {
13997 : 2 : gimple_seq *lseq = seq;
13998 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail1568;
13999 : 2 : {
14000 : 2 : res_op->set_op (VEC_PERM_EXPR, type, 3);
14001 : 2 : {
14002 : 2 : tree _o1[2], _r1;
14003 : 2 : _o1[0] = captures[0];
14004 : 2 : _o1[1] = captures[2];
14005 : 2 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_XOR_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14006 : 2 : tem_op.resimplify (lseq, valueize);
14007 : 2 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14008 : 2 : if (!_r1) goto next_after_fail1568;
14009 : 1 : captures[3] = _r1;
14010 : : }
14011 : 1 : res_op->ops[0] = captures[3];
14012 : 1 : res_op->ops[1] = captures[3];
14013 : 1 : res_op->ops[2] = captures[1];
14014 : 1 : res_op->resimplify (lseq, valueize);
14015 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 928, __FILE__, __LINE__, true);
14016 : 1 : return true;
14017 : : }
14018 : : next_after_fail1568:;
14019 : : }
14020 : : }
14021 : : }
14022 : : }
14023 : : break;
14024 : : }
14025 : : default:;
14026 : : }
14027 : : }
14028 : : break;
14029 : : default:;
14030 : : }
14031 : : }
14032 : : break;
14033 : : }
14034 : : default:;
14035 : : }
14036 : : }
14037 : : break;
14038 : : default:;
14039 : : }
14040 : : return false;
14041 : : }
14042 : :
14043 : : bool
14044 : 6618 : gimple_simplify_CFN_BUILT_IN_POW (gimple_match_op *res_op, gimple_seq *seq,
14045 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
14046 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
14047 : : {
14048 : 6618 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14049 : 6618 : switch (TREE_CODE (_p0))
14050 : : {
14051 : 3275 : case SSA_NAME:
14052 : 3275 : if (gimple *_d1 = get_def (valueize, _p0))
14053 : : {
14054 : 1858 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14055 : 1436 : switch (gimple_assign_rhs_code (_a1))
14056 : : {
14057 : 18 : case NEGATE_EXPR:
14058 : 18 : {
14059 : 18 : tree _q20 = gimple_assign_rhs1 (_a1);
14060 : 18 : _q20 = do_valueize (valueize, _q20);
14061 : 18 : switch (TREE_CODE (_p1))
14062 : : {
14063 : 13 : case REAL_CST:
14064 : 13 : {
14065 : 13 : {
14066 : 13 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14067 : 13 : const combined_fn pows = CFN_BUILT_IN_POW;
14068 : 13 : {
14069 : 13 : HOST_WIDE_INT n;
14070 : 13 : if (real_isinteger (&TREE_REAL_CST (captures[1]), &n) && (n & 1) == 0
14071 : : )
14072 : : {
14073 : 5 : gimple_seq *lseq = seq;
14074 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2001;
14075 : 5 : {
14076 : 5 : res_op->set_op (pows, type, 2);
14077 : 5 : res_op->ops[0] = captures[0];
14078 : 5 : res_op->ops[1] = captures[1];
14079 : 5 : res_op->resimplify (lseq, valueize);
14080 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1042, __FILE__, __LINE__, true);
14081 : 5 : return true;
14082 : : }
14083 : 0 : next_after_fail2001:;
14084 : : }
14085 : : }
14086 : : }
14087 : 8 : break;
14088 : : }
14089 : : default:;
14090 : : }
14091 : : break;
14092 : : }
14093 : 201 : case ABS_EXPR:
14094 : 201 : {
14095 : 201 : tree _q20 = gimple_assign_rhs1 (_a1);
14096 : 201 : _q20 = do_valueize (valueize, _q20);
14097 : 201 : switch (TREE_CODE (_p1))
14098 : : {
14099 : 38 : case REAL_CST:
14100 : 38 : {
14101 : 38 : {
14102 : 38 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14103 : 38 : const combined_fn pows = CFN_BUILT_IN_POW;
14104 : 38 : {
14105 : 38 : HOST_WIDE_INT n;
14106 : 38 : if (real_isinteger (&TREE_REAL_CST (captures[1]), &n) && (n & 1) == 0
14107 : : )
14108 : : {
14109 : 6 : gimple_seq *lseq = seq;
14110 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2002;
14111 : 6 : {
14112 : 6 : res_op->set_op (pows, type, 2);
14113 : 6 : res_op->ops[0] = captures[0];
14114 : 6 : res_op->ops[1] = captures[1];
14115 : 6 : res_op->resimplify (lseq, valueize);
14116 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1042, __FILE__, __LINE__, true);
14117 : 6 : return true;
14118 : : }
14119 : 0 : next_after_fail2002:;
14120 : : }
14121 : : }
14122 : : }
14123 : 32 : break;
14124 : : }
14125 : : default:;
14126 : : }
14127 : : break;
14128 : : }
14129 : : default:;
14130 : : }
14131 : 813 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
14132 : 140 : switch (gimple_call_combined_fn (_c1))
14133 : : {
14134 : 19 : case CFN_BUILT_IN_EXP:
14135 : 19 : if (gimple_call_num_args (_c1) == 1)
14136 : : {
14137 : 19 : tree _q20 = gimple_call_arg (_c1, 0);
14138 : 19 : _q20 = do_valueize (valueize, _q20);
14139 : 19 : {
14140 : 19 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14141 : 19 : if (flag_unsafe_math_optimizations
14142 : : )
14143 : : {
14144 : 19 : gimple_seq *lseq = seq;
14145 : 19 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2003;
14146 : 19 : {
14147 : 19 : res_op->set_op (CFN_BUILT_IN_EXP, type, 1);
14148 : 19 : {
14149 : 19 : tree _o1[2], _r1;
14150 : 19 : _o1[0] = captures[0];
14151 : 19 : _o1[1] = captures[1];
14152 : 19 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14153 : 19 : tem_op.resimplify (lseq, valueize);
14154 : 19 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14155 : 19 : if (!_r1) goto next_after_fail2003;
14156 : 10 : res_op->ops[0] = _r1;
14157 : : }
14158 : 10 : res_op->resimplify (lseq, valueize);
14159 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1044, __FILE__, __LINE__, true);
14160 : 10 : return true;
14161 : : }
14162 : 9 : next_after_fail2003:;
14163 : : }
14164 : : }
14165 : : }
14166 : : break;
14167 : 28 : case CFN_BUILT_IN_POW:
14168 : 28 : if (gimple_call_num_args (_c1) == 2)
14169 : : {
14170 : 28 : tree _q20 = gimple_call_arg (_c1, 0);
14171 : 28 : _q20 = do_valueize (valueize, _q20);
14172 : 28 : tree _q21 = gimple_call_arg (_c1, 1);
14173 : 28 : _q21 = do_valueize (valueize, _q21);
14174 : 28 : if (tree_expr_nonnegative_p (_q20))
14175 : : {
14176 : 14 : {
14177 : 14 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14178 : 14 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
14179 : : )
14180 : : {
14181 : 14 : gimple_seq *lseq = seq;
14182 : 14 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2004;
14183 : 14 : {
14184 : 14 : res_op->set_op (CFN_BUILT_IN_POW, type, 2);
14185 : 14 : res_op->ops[0] = captures[0];
14186 : 14 : {
14187 : 14 : tree _o1[2], _r1;
14188 : 14 : _o1[0] = captures[1];
14189 : 14 : _o1[1] = captures[2];
14190 : 14 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14191 : 14 : tem_op.resimplify (lseq, valueize);
14192 : 14 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14193 : 14 : if (!_r1) goto next_after_fail2004;
14194 : 7 : res_op->ops[1] = _r1;
14195 : : }
14196 : 7 : res_op->resimplify (lseq, valueize);
14197 : 7 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1045, __FILE__, __LINE__, true);
14198 : 7 : return true;
14199 : : }
14200 : 7 : next_after_fail2004:;
14201 : : }
14202 : : }
14203 : : }
14204 : : }
14205 : : break;
14206 : 12 : case CFN_BUILT_IN_CBRT:
14207 : 12 : if (gimple_call_num_args (_c1) == 1)
14208 : : {
14209 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
14210 : 12 : _q20 = do_valueize (valueize, _q20);
14211 : 12 : if (tree_expr_nonnegative_p (_q20))
14212 : : {
14213 : 12 : {
14214 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14215 : 12 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
14216 : : )
14217 : : {
14218 : 12 : gimple_seq *lseq = seq;
14219 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2005;
14220 : 12 : {
14221 : 12 : res_op->set_op (CFN_BUILT_IN_POW, type, 2);
14222 : 12 : res_op->ops[0] = captures[0];
14223 : 12 : {
14224 : 12 : tree _o1[2], _r1;
14225 : 12 : _o1[0] = captures[1];
14226 : 12 : _o1[1] = build_real_truncate (type, dconst_third ());
14227 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14228 : 12 : tem_op.resimplify (lseq, valueize);
14229 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14230 : 12 : if (!_r1) goto next_after_fail2005;
14231 : 6 : res_op->ops[1] = _r1;
14232 : : }
14233 : 6 : res_op->resimplify (lseq, valueize);
14234 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1046, __FILE__, __LINE__, true);
14235 : 6 : return true;
14236 : : }
14237 : 6 : next_after_fail2005:;
14238 : : }
14239 : : }
14240 : : }
14241 : : }
14242 : : break;
14243 : 12 : case CFN_BUILT_IN_EXP2:
14244 : 12 : if (gimple_call_num_args (_c1) == 1)
14245 : : {
14246 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
14247 : 12 : _q20 = do_valueize (valueize, _q20);
14248 : 12 : {
14249 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14250 : 12 : if (flag_unsafe_math_optimizations
14251 : : )
14252 : : {
14253 : 12 : gimple_seq *lseq = seq;
14254 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2006;
14255 : 12 : {
14256 : 12 : res_op->set_op (CFN_BUILT_IN_EXP2, type, 1);
14257 : 12 : {
14258 : 12 : tree _o1[2], _r1;
14259 : 12 : _o1[0] = captures[0];
14260 : 12 : _o1[1] = captures[1];
14261 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14262 : 12 : tem_op.resimplify (lseq, valueize);
14263 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14264 : 12 : if (!_r1) goto next_after_fail2006;
14265 : 6 : res_op->ops[0] = _r1;
14266 : : }
14267 : 6 : res_op->resimplify (lseq, valueize);
14268 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1044, __FILE__, __LINE__, true);
14269 : 6 : return true;
14270 : : }
14271 : 6 : next_after_fail2006:;
14272 : : }
14273 : : }
14274 : : }
14275 : : break;
14276 : 18 : case CFN_BUILT_IN_SQRT:
14277 : 18 : if (gimple_call_num_args (_c1) == 1)
14278 : : {
14279 : 18 : tree _q20 = gimple_call_arg (_c1, 0);
14280 : 18 : _q20 = do_valueize (valueize, _q20);
14281 : 18 : {
14282 : 18 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14283 : 18 : if (flag_unsafe_math_optimizations && canonicalize_math_p ()
14284 : : )
14285 : : {
14286 : 18 : gimple_seq *lseq = seq;
14287 : 18 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2007;
14288 : 18 : {
14289 : 18 : res_op->set_op (CFN_BUILT_IN_POW, type, 2);
14290 : 18 : res_op->ops[0] = captures[0];
14291 : 18 : {
14292 : 18 : tree _o1[2], _r1;
14293 : 18 : _o1[0] = captures[1];
14294 : 18 : _o1[1] = build_real (type, dconsthalf);
14295 : 18 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14296 : 18 : tem_op.resimplify (lseq, valueize);
14297 : 18 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14298 : 18 : if (!_r1) goto next_after_fail2007;
14299 : 10 : res_op->ops[1] = _r1;
14300 : : }
14301 : 10 : res_op->resimplify (lseq, valueize);
14302 : 10 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1043, __FILE__, __LINE__, true);
14303 : 10 : return true;
14304 : : }
14305 : 8 : next_after_fail2007:;
14306 : : }
14307 : : }
14308 : : }
14309 : : break;
14310 : 0 : case CFN_BUILT_IN_COPYSIGN:
14311 : 0 : if (gimple_call_num_args (_c1) == 2)
14312 : : {
14313 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14314 : 0 : _q20 = do_valueize (valueize, _q20);
14315 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14316 : 0 : _q21 = do_valueize (valueize, _q21);
14317 : 0 : switch (TREE_CODE (_p1))
14318 : : {
14319 : 0 : case REAL_CST:
14320 : 0 : {
14321 : 0 : {
14322 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14323 : 0 : if (gimple_simplify_401 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_POW))
14324 : 0 : return true;
14325 : : }
14326 : 0 : break;
14327 : : }
14328 : : default:;
14329 : : }
14330 : : }
14331 : : break;
14332 : 0 : case CFN_BUILT_IN_COPYSIGNF:
14333 : 0 : if (gimple_call_num_args (_c1) == 2)
14334 : : {
14335 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14336 : 0 : _q20 = do_valueize (valueize, _q20);
14337 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14338 : 0 : _q21 = do_valueize (valueize, _q21);
14339 : 0 : switch (TREE_CODE (_p1))
14340 : : {
14341 : 0 : case REAL_CST:
14342 : 0 : {
14343 : 0 : {
14344 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14345 : 0 : if (gimple_simplify_401 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_POW))
14346 : 0 : return true;
14347 : : }
14348 : 0 : break;
14349 : : }
14350 : : default:;
14351 : : }
14352 : : }
14353 : : break;
14354 : 0 : case CFN_BUILT_IN_COPYSIGNL:
14355 : 0 : if (gimple_call_num_args (_c1) == 2)
14356 : : {
14357 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14358 : 0 : _q20 = do_valueize (valueize, _q20);
14359 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14360 : 0 : _q21 = do_valueize (valueize, _q21);
14361 : 0 : switch (TREE_CODE (_p1))
14362 : : {
14363 : 0 : case REAL_CST:
14364 : 0 : {
14365 : 0 : {
14366 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14367 : 0 : if (gimple_simplify_401 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_POW))
14368 : 0 : return true;
14369 : : }
14370 : 0 : break;
14371 : : }
14372 : : default:;
14373 : : }
14374 : : }
14375 : : break;
14376 : 12 : case CFN_BUILT_IN_EXP10:
14377 : 12 : if (gimple_call_num_args (_c1) == 1)
14378 : : {
14379 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
14380 : 12 : _q20 = do_valueize (valueize, _q20);
14381 : 12 : {
14382 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14383 : 12 : if (flag_unsafe_math_optimizations
14384 : : )
14385 : : {
14386 : 12 : gimple_seq *lseq = seq;
14387 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2008;
14388 : 12 : {
14389 : 12 : res_op->set_op (CFN_BUILT_IN_EXP10, type, 1);
14390 : 12 : {
14391 : 12 : tree _o1[2], _r1;
14392 : 12 : _o1[0] = captures[0];
14393 : 12 : _o1[1] = captures[1];
14394 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14395 : 12 : tem_op.resimplify (lseq, valueize);
14396 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14397 : 12 : if (!_r1) goto next_after_fail2008;
14398 : 6 : res_op->ops[0] = _r1;
14399 : : }
14400 : 6 : res_op->resimplify (lseq, valueize);
14401 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1044, __FILE__, __LINE__, true);
14402 : 6 : return true;
14403 : : }
14404 : 6 : next_after_fail2008:;
14405 : : }
14406 : : }
14407 : : }
14408 : : break;
14409 : 1 : case CFN_COPYSIGN:
14410 : 1 : if (gimple_call_num_args (_c1) == 2)
14411 : : {
14412 : 1 : tree _q20 = gimple_call_arg (_c1, 0);
14413 : 1 : _q20 = do_valueize (valueize, _q20);
14414 : 1 : tree _q21 = gimple_call_arg (_c1, 1);
14415 : 1 : _q21 = do_valueize (valueize, _q21);
14416 : 1 : switch (TREE_CODE (_p1))
14417 : : {
14418 : 1 : case REAL_CST:
14419 : 1 : {
14420 : 1 : {
14421 : 1 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14422 : 1 : if (gimple_simplify_401 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_POW))
14423 : 1 : return true;
14424 : : }
14425 : 0 : break;
14426 : : }
14427 : : default:;
14428 : : }
14429 : : }
14430 : : break;
14431 : 12 : case CFN_BUILT_IN_POW10:
14432 : 12 : if (gimple_call_num_args (_c1) == 1)
14433 : : {
14434 : 12 : tree _q20 = gimple_call_arg (_c1, 0);
14435 : 12 : _q20 = do_valueize (valueize, _q20);
14436 : 12 : {
14437 : 12 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14438 : 12 : if (flag_unsafe_math_optimizations
14439 : : )
14440 : : {
14441 : 12 : gimple_seq *lseq = seq;
14442 : 12 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2009;
14443 : 12 : {
14444 : 12 : res_op->set_op (CFN_BUILT_IN_POW10, type, 1);
14445 : 12 : {
14446 : 12 : tree _o1[2], _r1;
14447 : 12 : _o1[0] = captures[0];
14448 : 12 : _o1[1] = captures[1];
14449 : 12 : gimple_match_op tem_op (res_op->cond.any_else (), MULT_EXPR, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
14450 : 12 : tem_op.resimplify (lseq, valueize);
14451 : 12 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
14452 : 12 : if (!_r1) goto next_after_fail2009;
14453 : 6 : res_op->ops[0] = _r1;
14454 : : }
14455 : 6 : res_op->resimplify (lseq, valueize);
14456 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1044, __FILE__, __LINE__, true);
14457 : 6 : return true;
14458 : : }
14459 : 6 : next_after_fail2009:;
14460 : : }
14461 : : }
14462 : : }
14463 : : break;
14464 : : default:;
14465 : : }
14466 : : }
14467 : : break;
14468 : 3144 : case REAL_CST:
14469 : 3144 : {
14470 : 3144 : {
14471 : 3144 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14472 : 3144 : if (gimple_simplify_402 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW, CFN_BUILT_IN_EXP, CFN_BUILT_IN_LOG, CFN_BUILT_IN_EXP2, CFN_BUILT_IN_LOG2))
14473 : 4 : return true;
14474 : : }
14475 : 3140 : break;
14476 : : }
14477 : 6551 : default:;
14478 : : }
14479 : 6551 : if (real_onep (_p0))
14480 : : {
14481 : 189 : {
14482 : 189 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14483 : 189 : if (gimple_simplify_403 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_POW))
14484 : 189 : return true;
14485 : : }
14486 : : }
14487 : 6362 : switch (TREE_CODE (_p1))
14488 : : {
14489 : 2856 : case REAL_CST:
14490 : 2856 : {
14491 : 2856 : {
14492 : 2856 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14493 : 2856 : {
14494 : 2856 : const REAL_VALUE_TYPE *value = TREE_REAL_CST_PTR (captures[1]);
14495 : 2856 : REAL_VALUE_TYPE tmp;
14496 : 2856 : if (real_equal (value, &dconst0)
14497 : : )
14498 : : {
14499 : 6 : gimple_seq *lseq = seq;
14500 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2010;
14501 : 6 : {
14502 : 6 : tree tem;
14503 : 6 : tem = build_real (type, dconst1);
14504 : 6 : res_op->set_value (tem);
14505 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1047, __FILE__, __LINE__, true);
14506 : 14 : return true;
14507 : : }
14508 : 0 : next_after_fail2010:;
14509 : : }
14510 : : else
14511 : : {
14512 : 2850 : if (real_equal (value, &dconst1)
14513 : : )
14514 : : {
14515 : 1 : gimple_seq *lseq = seq;
14516 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2011;
14517 : 1 : {
14518 : 1 : tree tem;
14519 : 1 : tem = captures[0];
14520 : 1 : res_op->set_value (tem);
14521 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1048, __FILE__, __LINE__, true);
14522 : 1 : return true;
14523 : : }
14524 : 0 : next_after_fail2011:;
14525 : : }
14526 : : else
14527 : : {
14528 : 2849 : if (real_equal (value, &dconstm1)
14529 : : )
14530 : : {
14531 : 1 : gimple_seq *lseq = seq;
14532 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2012;
14533 : 1 : {
14534 : 1 : res_op->set_op (RDIV_EXPR, type, 2);
14535 : 1 : res_op->ops[0] = build_real (type, dconst1);
14536 : 1 : res_op->ops[1] = captures[0];
14537 : 1 : res_op->resimplify (lseq, valueize);
14538 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1049, __FILE__, __LINE__, true);
14539 : 1 : return true;
14540 : : }
14541 : 0 : next_after_fail2012:;
14542 : : }
14543 : : else
14544 : : {
14545 : 2848 : if (flag_unsafe_math_optimizations
14546 : : && canonicalize_math_p ()
14547 : 3579 : && real_equal (value, &dconsthalf)
14548 : : )
14549 : : {
14550 : 4 : gimple_seq *lseq = seq;
14551 : 4 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2013;
14552 : 4 : {
14553 : 4 : res_op->set_op (CFN_BUILT_IN_SQRT, type, 1);
14554 : 4 : res_op->ops[0] = captures[0];
14555 : 4 : res_op->resimplify (lseq, valueize);
14556 : 4 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1050, __FILE__, __LINE__, true);
14557 : 4 : return true;
14558 : : }
14559 : 0 : next_after_fail2013:;
14560 : : }
14561 : : else
14562 : : {
14563 : 2844 : if (flag_unsafe_math_optimizations
14564 : : && canonicalize_math_p ()
14565 : 4298 : && (tmp = real_value_truncate (TYPE_MODE (type), dconst_third ()),
14566 : 727 : real_equal (value, &tmp))
14567 : : )
14568 : : {
14569 : 2 : gimple_seq *lseq = seq;
14570 : 2 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2014;
14571 : 2 : {
14572 : 2 : res_op->set_op (CFN_BUILT_IN_CBRT, type, 1);
14573 : 2 : res_op->ops[0] = captures[0];
14574 : 2 : res_op->resimplify (lseq, valueize);
14575 : 2 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1051, __FILE__, __LINE__, true);
14576 : 2 : return true;
14577 : : }
14578 : 0 : next_after_fail2014:;
14579 : : }
14580 : : }
14581 : : }
14582 : : }
14583 : : }
14584 : : }
14585 : : }
14586 : 2842 : break;
14587 : : }
14588 : : default:;
14589 : : }
14590 : : return false;
14591 : : }
14592 : :
14593 : : bool
14594 : 2703 : gimple_simplify_CFN_BUILT_IN_POWIF (gimple_match_op *res_op, gimple_seq *seq,
14595 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
14596 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
14597 : : {
14598 : 2703 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14599 : 2703 : switch (TREE_CODE (_p0))
14600 : : {
14601 : 1324 : case SSA_NAME:
14602 : 1324 : if (gimple *_d1 = get_def (valueize, _p0))
14603 : : {
14604 : 1093 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14605 : 1326 : switch (gimple_assign_rhs_code (_a1))
14606 : : {
14607 : 0 : case NEGATE_EXPR:
14608 : 0 : {
14609 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
14610 : 0 : _q20 = do_valueize (valueize, _q20);
14611 : 0 : switch (TREE_CODE (_p1))
14612 : : {
14613 : 0 : case INTEGER_CST:
14614 : 0 : {
14615 : 0 : {
14616 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14617 : 0 : if ((wi::to_wide (captures[1]) & 1) == 0
14618 : : )
14619 : : {
14620 : 0 : gimple_seq *lseq = seq;
14621 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2036;
14622 : 0 : {
14623 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14624 : 0 : res_op->ops[0] = captures[0];
14625 : 0 : res_op->ops[1] = captures[1];
14626 : 0 : res_op->resimplify (lseq, valueize);
14627 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1052, __FILE__, __LINE__, true);
14628 : 0 : return true;
14629 : : }
14630 : 0 : next_after_fail2036:;
14631 : : }
14632 : : }
14633 : 0 : break;
14634 : : }
14635 : : default:;
14636 : : }
14637 : : break;
14638 : : }
14639 : 0 : case ABS_EXPR:
14640 : 0 : {
14641 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
14642 : 0 : _q20 = do_valueize (valueize, _q20);
14643 : 0 : switch (TREE_CODE (_p1))
14644 : : {
14645 : 0 : case INTEGER_CST:
14646 : 0 : {
14647 : 0 : {
14648 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14649 : 0 : if ((wi::to_wide (captures[1]) & 1) == 0
14650 : : )
14651 : : {
14652 : 0 : gimple_seq *lseq = seq;
14653 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2037;
14654 : 0 : {
14655 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14656 : 0 : res_op->ops[0] = captures[0];
14657 : 0 : res_op->ops[1] = captures[1];
14658 : 0 : res_op->resimplify (lseq, valueize);
14659 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1052, __FILE__, __LINE__, true);
14660 : 0 : return true;
14661 : : }
14662 : 0 : next_after_fail2037:;
14663 : : }
14664 : : }
14665 : 0 : break;
14666 : : }
14667 : : default:;
14668 : : }
14669 : : break;
14670 : : }
14671 : : default:;
14672 : : }
14673 : 71 : else if (gcall *_c1 = dyn_cast <gcall *> (_d1))
14674 : 10 : switch (gimple_call_combined_fn (_c1))
14675 : : {
14676 : 0 : case CFN_BUILT_IN_COPYSIGN:
14677 : 0 : if (gimple_call_num_args (_c1) == 2)
14678 : : {
14679 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14680 : 0 : _q20 = do_valueize (valueize, _q20);
14681 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14682 : 0 : _q21 = do_valueize (valueize, _q21);
14683 : 0 : switch (TREE_CODE (_p1))
14684 : : {
14685 : 0 : case INTEGER_CST:
14686 : 0 : {
14687 : 0 : {
14688 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14689 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGN;
14690 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
14691 : : )
14692 : : {
14693 : 0 : gimple_seq *lseq = seq;
14694 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2038;
14695 : 0 : {
14696 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14697 : 0 : res_op->ops[0] = captures[0];
14698 : 0 : res_op->ops[1] = captures[2];
14699 : 0 : res_op->resimplify (lseq, valueize);
14700 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
14701 : 0 : return true;
14702 : : }
14703 : 0 : next_after_fail2038:;
14704 : : }
14705 : : }
14706 : 0 : break;
14707 : : }
14708 : : default:;
14709 : : }
14710 : : }
14711 : : break;
14712 : 0 : case CFN_BUILT_IN_COPYSIGNF:
14713 : 0 : if (gimple_call_num_args (_c1) == 2)
14714 : : {
14715 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14716 : 0 : _q20 = do_valueize (valueize, _q20);
14717 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14718 : 0 : _q21 = do_valueize (valueize, _q21);
14719 : 0 : switch (TREE_CODE (_p1))
14720 : : {
14721 : 0 : case INTEGER_CST:
14722 : 0 : {
14723 : 0 : {
14724 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14725 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGNF;
14726 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
14727 : : )
14728 : : {
14729 : 0 : gimple_seq *lseq = seq;
14730 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2039;
14731 : 0 : {
14732 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14733 : 0 : res_op->ops[0] = captures[0];
14734 : 0 : res_op->ops[1] = captures[2];
14735 : 0 : res_op->resimplify (lseq, valueize);
14736 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
14737 : 0 : return true;
14738 : : }
14739 : 0 : next_after_fail2039:;
14740 : : }
14741 : : }
14742 : 0 : break;
14743 : : }
14744 : : default:;
14745 : : }
14746 : : }
14747 : : break;
14748 : 0 : case CFN_BUILT_IN_COPYSIGNL:
14749 : 0 : if (gimple_call_num_args (_c1) == 2)
14750 : : {
14751 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14752 : 0 : _q20 = do_valueize (valueize, _q20);
14753 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14754 : 0 : _q21 = do_valueize (valueize, _q21);
14755 : 0 : switch (TREE_CODE (_p1))
14756 : : {
14757 : 0 : case INTEGER_CST:
14758 : 0 : {
14759 : 0 : {
14760 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14761 : 0 : const combined_fn copysigns = CFN_BUILT_IN_COPYSIGNL;
14762 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
14763 : : )
14764 : : {
14765 : 0 : gimple_seq *lseq = seq;
14766 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2040;
14767 : 0 : {
14768 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14769 : 0 : res_op->ops[0] = captures[0];
14770 : 0 : res_op->ops[1] = captures[2];
14771 : 0 : res_op->resimplify (lseq, valueize);
14772 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
14773 : 0 : return true;
14774 : : }
14775 : 0 : next_after_fail2040:;
14776 : : }
14777 : : }
14778 : 0 : break;
14779 : : }
14780 : : default:;
14781 : : }
14782 : : }
14783 : : break;
14784 : 0 : case CFN_COPYSIGN:
14785 : 0 : if (gimple_call_num_args (_c1) == 2)
14786 : : {
14787 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
14788 : 0 : _q20 = do_valueize (valueize, _q20);
14789 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
14790 : 0 : _q21 = do_valueize (valueize, _q21);
14791 : 0 : switch (TREE_CODE (_p1))
14792 : : {
14793 : 0 : case INTEGER_CST:
14794 : 0 : {
14795 : 0 : {
14796 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
14797 : 0 : const combined_fn copysigns = CFN_COPYSIGN;
14798 : 0 : if ((wi::to_wide (captures[2]) & 1) == 0
14799 : : )
14800 : : {
14801 : 0 : gimple_seq *lseq = seq;
14802 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2041;
14803 : 0 : {
14804 : 0 : res_op->set_op (CFN_BUILT_IN_POWIF, type, 2);
14805 : 0 : res_op->ops[0] = captures[0];
14806 : 0 : res_op->ops[1] = captures[2];
14807 : 0 : res_op->resimplify (lseq, valueize);
14808 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1053, __FILE__, __LINE__, true);
14809 : 0 : return true;
14810 : : }
14811 : 0 : next_after_fail2041:;
14812 : : }
14813 : : }
14814 : 0 : break;
14815 : : }
14816 : : default:;
14817 : : }
14818 : : }
14819 : : break;
14820 : : default:;
14821 : : }
14822 : : }
14823 : : break;
14824 : 2703 : default:;
14825 : : }
14826 : 2703 : if (real_onep (_p0))
14827 : : {
14828 : 0 : {
14829 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14830 : 0 : if (gimple_simplify_404 (res_op, seq, valueize, type, captures))
14831 : 0 : return true;
14832 : : }
14833 : : }
14834 : 2703 : switch (TREE_CODE (_p1))
14835 : : {
14836 : 1342 : case INTEGER_CST:
14837 : 1342 : {
14838 : 1342 : {
14839 : 1342 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
14840 : 1342 : if (wi::to_wide (captures[1]) == 0
14841 : : )
14842 : : {
14843 : 1 : gimple_seq *lseq = seq;
14844 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2042;
14845 : 1 : {
14846 : 1 : tree tem;
14847 : 1 : tem = build_real (type, dconst1);
14848 : 1 : res_op->set_value (tem);
14849 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1054, __FILE__, __LINE__, true);
14850 : 1 : return true;
14851 : : }
14852 : 0 : next_after_fail2042:;
14853 : : }
14854 : : else
14855 : : {
14856 : 1341 : if (wi::to_wide (captures[1]) == 1
14857 : : )
14858 : : {
14859 : 1 : gimple_seq *lseq = seq;
14860 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2043;
14861 : 1 : {
14862 : 1 : tree tem;
14863 : 1 : tem = captures[0];
14864 : 1 : res_op->set_value (tem);
14865 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1055, __FILE__, __LINE__, true);
14866 : 1 : return true;
14867 : : }
14868 : 0 : next_after_fail2043:;
14869 : : }
14870 : : else
14871 : : {
14872 : 1340 : if (wi::to_wide (captures[1]) == -1
14873 : : )
14874 : : {
14875 : 1 : gimple_seq *lseq = seq;
14876 : 1 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2044;
14877 : 1 : {
14878 : 1 : res_op->set_op (RDIV_EXPR, type, 2);
14879 : 1 : res_op->ops[0] = build_real (type, dconst1);
14880 : 1 : res_op->ops[1] = captures[0];
14881 : 1 : res_op->resimplify (lseq, valueize);
14882 : 1 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1056, __FILE__, __LINE__, true);
14883 : 1 : return true;
14884 : : }
14885 : 0 : next_after_fail2044:;
14886 : : }
14887 : : }
14888 : : }
14889 : : }
14890 : 1339 : break;
14891 : : }
14892 : : default:;
14893 : : }
14894 : : return false;
14895 : : }
14896 : :
14897 : : bool
14898 : 189 : gimple_simplify_CFN_BUILT_IN_HYPOTL (gimple_match_op *res_op, gimple_seq *seq,
14899 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
14900 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
14901 : : {
14902 : 189 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
14903 : 189 : switch (TREE_CODE (_p0))
14904 : : {
14905 : 166 : case SSA_NAME:
14906 : 166 : if (gimple *_d1 = get_def (valueize, _p0))
14907 : : {
14908 : 110 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14909 : 14 : switch (gimple_assign_rhs_code (_a1))
14910 : : {
14911 : 8 : case NEGATE_EXPR:
14912 : 8 : {
14913 : 8 : tree _q20 = gimple_assign_rhs1 (_a1);
14914 : 8 : _q20 = do_valueize (valueize, _q20);
14915 : 8 : {
14916 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14917 : 8 : const combined_fn hypots = CFN_BUILT_IN_HYPOTL;
14918 : 8 : gimple_seq *lseq = seq;
14919 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2071;
14920 : 8 : {
14921 : 8 : res_op->set_op (hypots, type, 2);
14922 : 8 : res_op->ops[0] = captures[0];
14923 : 8 : res_op->ops[1] = captures[1];
14924 : 8 : res_op->resimplify (lseq, valueize);
14925 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1057, __FILE__, __LINE__, true);
14926 : 8 : return true;
14927 : : }
14928 : 0 : next_after_fail2071:;
14929 : : }
14930 : 0 : break;
14931 : : }
14932 : 6 : case ABS_EXPR:
14933 : 6 : {
14934 : 6 : tree _q20 = gimple_assign_rhs1 (_a1);
14935 : 6 : _q20 = do_valueize (valueize, _q20);
14936 : 6 : {
14937 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
14938 : 6 : const combined_fn hypots = CFN_BUILT_IN_HYPOTL;
14939 : 6 : gimple_seq *lseq = seq;
14940 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2072;
14941 : 6 : {
14942 : 6 : res_op->set_op (hypots, type, 2);
14943 : 6 : res_op->ops[0] = captures[0];
14944 : 6 : res_op->ops[1] = captures[1];
14945 : 6 : res_op->resimplify (lseq, valueize);
14946 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1057, __FILE__, __LINE__, true);
14947 : 6 : return true;
14948 : : }
14949 : 0 : next_after_fail2072:;
14950 : : }
14951 : 0 : break;
14952 : : }
14953 : : default:;
14954 : : }
14955 : : }
14956 : : break;
14957 : 175 : default:;
14958 : : }
14959 : 175 : switch (TREE_CODE (_p1))
14960 : : {
14961 : 150 : case SSA_NAME:
14962 : 150 : if (gimple *_d1 = get_def (valueize, _p1))
14963 : : {
14964 : 96 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
14965 : 45 : switch (gimple_assign_rhs_code (_a1))
14966 : : {
14967 : 8 : case NEGATE_EXPR:
14968 : 8 : {
14969 : 8 : tree _q30 = gimple_assign_rhs1 (_a1);
14970 : 8 : _q30 = do_valueize (valueize, _q30);
14971 : 8 : {
14972 : 8 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14973 : 8 : const combined_fn hypots = CFN_BUILT_IN_HYPOTL;
14974 : 8 : gimple_seq *lseq = seq;
14975 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2073;
14976 : 8 : {
14977 : 8 : res_op->set_op (hypots, type, 2);
14978 : 8 : res_op->ops[0] = captures[0];
14979 : 8 : res_op->ops[1] = captures[1];
14980 : 8 : res_op->resimplify (lseq, valueize);
14981 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1058, __FILE__, __LINE__, true);
14982 : 8 : return true;
14983 : : }
14984 : 0 : next_after_fail2073:;
14985 : : }
14986 : 0 : break;
14987 : : }
14988 : 6 : case ABS_EXPR:
14989 : 6 : {
14990 : 6 : tree _q30 = gimple_assign_rhs1 (_a1);
14991 : 6 : _q30 = do_valueize (valueize, _q30);
14992 : 6 : {
14993 : 6 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _q30 };
14994 : 6 : const combined_fn hypots = CFN_BUILT_IN_HYPOTL;
14995 : 6 : gimple_seq *lseq = seq;
14996 : 6 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2074;
14997 : 6 : {
14998 : 6 : res_op->set_op (hypots, type, 2);
14999 : 6 : res_op->ops[0] = captures[0];
15000 : 6 : res_op->ops[1] = captures[1];
15001 : 6 : res_op->resimplify (lseq, valueize);
15002 : 6 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1058, __FILE__, __LINE__, true);
15003 : 6 : return true;
15004 : : }
15005 : 0 : next_after_fail2074:;
15006 : : }
15007 : 0 : break;
15008 : : }
15009 : : default:;
15010 : : }
15011 : : }
15012 : : break;
15013 : 161 : default:;
15014 : : }
15015 : 161 : switch (TREE_CODE (_p0))
15016 : : {
15017 : 138 : case SSA_NAME:
15018 : 138 : if (gimple *_d1 = get_def (valueize, _p0))
15019 : : {
15020 : 82 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
15021 : 18 : switch (gimple_call_combined_fn (_c1))
15022 : : {
15023 : 0 : case CFN_BUILT_IN_COPYSIGN:
15024 : 0 : if (gimple_call_num_args (_c1) == 2)
15025 : : {
15026 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15027 : 0 : _q20 = do_valueize (valueize, _q20);
15028 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
15029 : 0 : _q21 = do_valueize (valueize, _q21);
15030 : 0 : {
15031 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15032 : 0 : if (gimple_simplify_405 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_HYPOTL))
15033 : 0 : return true;
15034 : : }
15035 : : }
15036 : : break;
15037 : 0 : case CFN_BUILT_IN_COPYSIGNF:
15038 : 0 : if (gimple_call_num_args (_c1) == 2)
15039 : : {
15040 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15041 : 0 : _q20 = do_valueize (valueize, _q20);
15042 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
15043 : 0 : _q21 = do_valueize (valueize, _q21);
15044 : 0 : {
15045 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15046 : 0 : if (gimple_simplify_405 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_HYPOTL))
15047 : 0 : return true;
15048 : : }
15049 : : }
15050 : : break;
15051 : 4 : case CFN_BUILT_IN_COPYSIGNL:
15052 : 4 : if (gimple_call_num_args (_c1) == 2)
15053 : : {
15054 : 4 : tree _q20 = gimple_call_arg (_c1, 0);
15055 : 4 : _q20 = do_valueize (valueize, _q20);
15056 : 4 : tree _q21 = gimple_call_arg (_c1, 1);
15057 : 4 : _q21 = do_valueize (valueize, _q21);
15058 : 4 : {
15059 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15060 : 4 : if (gimple_simplify_405 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_HYPOTL))
15061 : 4 : return true;
15062 : : }
15063 : : }
15064 : : break;
15065 : 0 : case CFN_COPYSIGN:
15066 : 0 : if (gimple_call_num_args (_c1) == 2)
15067 : : {
15068 : 0 : tree _q20 = gimple_call_arg (_c1, 0);
15069 : 0 : _q20 = do_valueize (valueize, _q20);
15070 : 0 : tree _q21 = gimple_call_arg (_c1, 1);
15071 : 0 : _q21 = do_valueize (valueize, _q21);
15072 : 0 : {
15073 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _q21, _p1 };
15074 : 0 : if (gimple_simplify_405 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_HYPOTL))
15075 : 0 : return true;
15076 : : }
15077 : : }
15078 : : break;
15079 : : default:;
15080 : : }
15081 : : }
15082 : : break;
15083 : 157 : default:;
15084 : : }
15085 : 157 : switch (TREE_CODE (_p1))
15086 : : {
15087 : 132 : case SSA_NAME:
15088 : 132 : if (gimple *_d1 = get_def (valueize, _p1))
15089 : : {
15090 : 78 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
15091 : 14 : switch (gimple_call_combined_fn (_c1))
15092 : : {
15093 : 0 : case CFN_BUILT_IN_COPYSIGN:
15094 : 0 : if (gimple_call_num_args (_c1) == 2)
15095 : : {
15096 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
15097 : 0 : _q30 = do_valueize (valueize, _q30);
15098 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
15099 : 0 : _q31 = do_valueize (valueize, _q31);
15100 : 0 : {
15101 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
15102 : 0 : if (gimple_simplify_406 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGN, CFN_BUILT_IN_HYPOTL))
15103 : 0 : return true;
15104 : : }
15105 : : }
15106 : : break;
15107 : 0 : case CFN_BUILT_IN_COPYSIGNF:
15108 : 0 : if (gimple_call_num_args (_c1) == 2)
15109 : : {
15110 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
15111 : 0 : _q30 = do_valueize (valueize, _q30);
15112 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
15113 : 0 : _q31 = do_valueize (valueize, _q31);
15114 : 0 : {
15115 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
15116 : 0 : if (gimple_simplify_406 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNF, CFN_BUILT_IN_HYPOTL))
15117 : 0 : return true;
15118 : : }
15119 : : }
15120 : : break;
15121 : 0 : case CFN_BUILT_IN_COPYSIGNL:
15122 : 0 : if (gimple_call_num_args (_c1) == 2)
15123 : : {
15124 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
15125 : 0 : _q30 = do_valueize (valueize, _q30);
15126 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
15127 : 0 : _q31 = do_valueize (valueize, _q31);
15128 : 0 : {
15129 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
15130 : 0 : if (gimple_simplify_406 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_COPYSIGNL, CFN_BUILT_IN_HYPOTL))
15131 : 0 : return true;
15132 : : }
15133 : : }
15134 : : break;
15135 : 0 : case CFN_COPYSIGN:
15136 : 0 : if (gimple_call_num_args (_c1) == 2)
15137 : : {
15138 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
15139 : 0 : _q30 = do_valueize (valueize, _q30);
15140 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
15141 : 0 : _q31 = do_valueize (valueize, _q31);
15142 : 0 : {
15143 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q30, _q31 };
15144 : 0 : if (gimple_simplify_406 (res_op, seq, valueize, type, captures, CFN_COPYSIGN, CFN_BUILT_IN_HYPOTL))
15145 : 0 : return true;
15146 : : }
15147 : : }
15148 : : break;
15149 : : default:;
15150 : : }
15151 : : }
15152 : : break;
15153 : 157 : default:;
15154 : : }
15155 : 157 : if (real_zerop (_p1))
15156 : : {
15157 : 2 : {
15158 : 2 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15159 : 2 : if (gimple_simplify_407 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTL))
15160 : 2 : return true;
15161 : : }
15162 : : }
15163 : 155 : if (real_zerop (_p0))
15164 : : {
15165 : 1 : {
15166 : 1 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15167 : 1 : if (gimple_simplify_407 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTL))
15168 : 1 : return true;
15169 : : }
15170 : : }
15171 : 154 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15172 : : {
15173 : 7 : {
15174 : 7 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15175 : 7 : if (gimple_simplify_408 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_HYPOTL))
15176 : 3 : return true;
15177 : : }
15178 : : }
15179 : : return false;
15180 : : }
15181 : :
15182 : : bool
15183 : 1835 : gimple_simplify_CFN_BUILT_IN_FMIN (gimple_match_op *res_op, gimple_seq *seq,
15184 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15185 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15186 : : {
15187 : 1835 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15188 : 1835 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15189 : : {
15190 : 56 : {
15191 : 56 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15192 : 56 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
15193 : 28 : return true;
15194 : : }
15195 : : }
15196 : 1807 : switch (TREE_CODE (_p1))
15197 : : {
15198 : 912 : case REAL_CST:
15199 : 912 : {
15200 : 912 : {
15201 : 912 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15202 : 912 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
15203 : 38 : return true;
15204 : : }
15205 : 874 : break;
15206 : : }
15207 : 1769 : default:;
15208 : : }
15209 : 1769 : switch (TREE_CODE (_p0))
15210 : : {
15211 : 514 : case REAL_CST:
15212 : 514 : {
15213 : 514 : {
15214 : 514 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15215 : 514 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
15216 : 60 : return true;
15217 : : }
15218 : 454 : break;
15219 : : }
15220 : 1709 : default:;
15221 : : }
15222 : 1709 : {
15223 : 1709 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15224 : 1709 : if (gimple_simplify_494 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMIN))
15225 : 23 : return true;
15226 : : }
15227 : 1686 : switch (TREE_CODE (_p0))
15228 : : {
15229 : 1079 : case SSA_NAME:
15230 : 1079 : if (gimple *_d1 = get_def (valueize, _p0))
15231 : : {
15232 : 628 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15233 : 525 : switch (gimple_assign_rhs_code (_a1))
15234 : : {
15235 : 40 : case NEGATE_EXPR:
15236 : 40 : {
15237 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
15238 : 40 : _q20 = do_valueize (valueize, _q20);
15239 : 40 : switch (TREE_CODE (_p1))
15240 : : {
15241 : 0 : case SSA_NAME:
15242 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15243 : : {
15244 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15245 : 0 : switch (gimple_assign_rhs_code (_a2))
15246 : : {
15247 : 0 : case NEGATE_EXPR:
15248 : 0 : {
15249 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15250 : 0 : _q40 = do_valueize (valueize, _q40);
15251 : 0 : {
15252 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15253 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15254 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15255 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15256 : : )
15257 : : {
15258 : 0 : gimple_seq *lseq = seq;
15259 : 0 : if (lseq
15260 : 0 : && (!single_use (captures[0])
15261 : 0 : || !single_use (captures[2])))
15262 : 0 : lseq = NULL;
15263 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2115;
15264 : 0 : {
15265 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15266 : 0 : {
15267 : 0 : tree _o1[2], _r1;
15268 : 0 : _o1[0] = captures[1];
15269 : 0 : _o1[1] = captures[3];
15270 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAX, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15271 : 0 : tem_op.resimplify (lseq, valueize);
15272 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15273 : 0 : if (!_r1) goto next_after_fail2115;
15274 : 0 : res_op->ops[0] = _r1;
15275 : : }
15276 : 0 : res_op->resimplify (lseq, valueize);
15277 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15278 : 0 : return true;
15279 : : }
15280 : 0 : next_after_fail2115:;
15281 : : }
15282 : : }
15283 : 0 : break;
15284 : : }
15285 : : default:;
15286 : : }
15287 : : }
15288 : : break;
15289 : : default:;
15290 : : }
15291 : : break;
15292 : : }
15293 : : default:;
15294 : : }
15295 : : }
15296 : : break;
15297 : : default:;
15298 : : }
15299 : : return false;
15300 : : }
15301 : :
15302 : : bool
15303 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF32 (gimple_match_op *res_op, gimple_seq *seq,
15304 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15305 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15306 : : {
15307 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15308 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15309 : : {
15310 : 0 : {
15311 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15312 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
15313 : 0 : return true;
15314 : : }
15315 : : }
15316 : 0 : switch (TREE_CODE (_p1))
15317 : : {
15318 : 0 : case REAL_CST:
15319 : 0 : {
15320 : 0 : {
15321 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15322 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
15323 : 0 : return true;
15324 : : }
15325 : 0 : break;
15326 : : }
15327 : 0 : default:;
15328 : : }
15329 : 0 : switch (TREE_CODE (_p0))
15330 : : {
15331 : 0 : case REAL_CST:
15332 : 0 : {
15333 : 0 : {
15334 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15335 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
15336 : 0 : return true;
15337 : : }
15338 : 0 : break;
15339 : : }
15340 : 0 : default:;
15341 : : }
15342 : 0 : {
15343 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15344 : 0 : if (gimple_simplify_494 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32))
15345 : 0 : return true;
15346 : : }
15347 : 0 : switch (TREE_CODE (_p0))
15348 : : {
15349 : 0 : case SSA_NAME:
15350 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
15351 : : {
15352 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15353 : 0 : switch (gimple_assign_rhs_code (_a1))
15354 : : {
15355 : 0 : case NEGATE_EXPR:
15356 : 0 : {
15357 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15358 : 0 : _q20 = do_valueize (valueize, _q20);
15359 : 0 : switch (TREE_CODE (_p1))
15360 : : {
15361 : 0 : case SSA_NAME:
15362 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15363 : : {
15364 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15365 : 0 : switch (gimple_assign_rhs_code (_a2))
15366 : : {
15367 : 0 : case NEGATE_EXPR:
15368 : 0 : {
15369 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15370 : 0 : _q40 = do_valueize (valueize, _q40);
15371 : 0 : {
15372 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15373 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15374 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15375 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15376 : : )
15377 : : {
15378 : 0 : gimple_seq *lseq = seq;
15379 : 0 : if (lseq
15380 : 0 : && (!single_use (captures[0])
15381 : 0 : || !single_use (captures[2])))
15382 : 0 : lseq = NULL;
15383 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2118;
15384 : 0 : {
15385 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15386 : 0 : {
15387 : 0 : tree _o1[2], _r1;
15388 : 0 : _o1[0] = captures[1];
15389 : 0 : _o1[1] = captures[3];
15390 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF32, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15391 : 0 : tem_op.resimplify (lseq, valueize);
15392 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15393 : 0 : if (!_r1) goto next_after_fail2118;
15394 : 0 : res_op->ops[0] = _r1;
15395 : : }
15396 : 0 : res_op->resimplify (lseq, valueize);
15397 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15398 : 0 : return true;
15399 : : }
15400 : 0 : next_after_fail2118:;
15401 : : }
15402 : : }
15403 : 0 : break;
15404 : : }
15405 : : default:;
15406 : : }
15407 : : }
15408 : : break;
15409 : : default:;
15410 : : }
15411 : : break;
15412 : : }
15413 : : default:;
15414 : : }
15415 : : }
15416 : : break;
15417 : : default:;
15418 : : }
15419 : : return false;
15420 : : }
15421 : :
15422 : : bool
15423 : 0 : gimple_simplify_CFN_BUILT_IN_FMINF32X (gimple_match_op *res_op, gimple_seq *seq,
15424 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15425 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15426 : : {
15427 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15428 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15429 : : {
15430 : 0 : {
15431 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15432 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
15433 : 0 : return true;
15434 : : }
15435 : : }
15436 : 0 : switch (TREE_CODE (_p1))
15437 : : {
15438 : 0 : case REAL_CST:
15439 : 0 : {
15440 : 0 : {
15441 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15442 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
15443 : 0 : return true;
15444 : : }
15445 : 0 : break;
15446 : : }
15447 : 0 : default:;
15448 : : }
15449 : 0 : switch (TREE_CODE (_p0))
15450 : : {
15451 : 0 : case REAL_CST:
15452 : 0 : {
15453 : 0 : {
15454 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15455 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
15456 : 0 : return true;
15457 : : }
15458 : 0 : break;
15459 : : }
15460 : 0 : default:;
15461 : : }
15462 : 0 : {
15463 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15464 : 0 : if (gimple_simplify_494 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMINF32X))
15465 : 0 : return true;
15466 : : }
15467 : 0 : switch (TREE_CODE (_p0))
15468 : : {
15469 : 0 : case SSA_NAME:
15470 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
15471 : : {
15472 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15473 : 0 : switch (gimple_assign_rhs_code (_a1))
15474 : : {
15475 : 0 : case NEGATE_EXPR:
15476 : 0 : {
15477 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15478 : 0 : _q20 = do_valueize (valueize, _q20);
15479 : 0 : switch (TREE_CODE (_p1))
15480 : : {
15481 : 0 : case SSA_NAME:
15482 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15483 : : {
15484 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15485 : 0 : switch (gimple_assign_rhs_code (_a2))
15486 : : {
15487 : 0 : case NEGATE_EXPR:
15488 : 0 : {
15489 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15490 : 0 : _q40 = do_valueize (valueize, _q40);
15491 : 0 : {
15492 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15493 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15494 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15495 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15496 : : )
15497 : : {
15498 : 0 : gimple_seq *lseq = seq;
15499 : 0 : if (lseq
15500 : 0 : && (!single_use (captures[0])
15501 : 0 : || !single_use (captures[2])))
15502 : 0 : lseq = NULL;
15503 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2121;
15504 : 0 : {
15505 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15506 : 0 : {
15507 : 0 : tree _o1[2], _r1;
15508 : 0 : _o1[0] = captures[1];
15509 : 0 : _o1[1] = captures[3];
15510 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMAXF32X, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15511 : 0 : tem_op.resimplify (lseq, valueize);
15512 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15513 : 0 : if (!_r1) goto next_after_fail2121;
15514 : 0 : res_op->ops[0] = _r1;
15515 : : }
15516 : 0 : res_op->resimplify (lseq, valueize);
15517 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15518 : 0 : return true;
15519 : : }
15520 : 0 : next_after_fail2121:;
15521 : : }
15522 : : }
15523 : 0 : break;
15524 : : }
15525 : : default:;
15526 : : }
15527 : : }
15528 : : break;
15529 : : default:;
15530 : : }
15531 : : break;
15532 : : }
15533 : : default:;
15534 : : }
15535 : : }
15536 : : break;
15537 : : default:;
15538 : : }
15539 : : return false;
15540 : : }
15541 : :
15542 : : bool
15543 : 0 : gimple_simplify_CFN_FMIN (gimple_match_op *res_op, gimple_seq *seq,
15544 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15545 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15546 : : {
15547 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15548 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15549 : : {
15550 : 0 : {
15551 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15552 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_FMIN))
15553 : 0 : return true;
15554 : : }
15555 : : }
15556 : 0 : switch (TREE_CODE (_p1))
15557 : : {
15558 : 0 : case REAL_CST:
15559 : 0 : {
15560 : 0 : {
15561 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15562 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_FMIN))
15563 : 0 : return true;
15564 : : }
15565 : 0 : break;
15566 : : }
15567 : 0 : default:;
15568 : : }
15569 : 0 : switch (TREE_CODE (_p0))
15570 : : {
15571 : 0 : case REAL_CST:
15572 : 0 : {
15573 : 0 : {
15574 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15575 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_FMIN))
15576 : 0 : return true;
15577 : : }
15578 : 0 : break;
15579 : : }
15580 : 0 : default:;
15581 : : }
15582 : 0 : {
15583 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15584 : 0 : if (gimple_simplify_494 (res_op, seq, valueize, type, captures, CFN_FMIN))
15585 : 0 : return true;
15586 : : }
15587 : 0 : switch (TREE_CODE (_p0))
15588 : : {
15589 : 0 : case SSA_NAME:
15590 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
15591 : : {
15592 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15593 : 0 : switch (gimple_assign_rhs_code (_a1))
15594 : : {
15595 : 0 : case NEGATE_EXPR:
15596 : 0 : {
15597 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15598 : 0 : _q20 = do_valueize (valueize, _q20);
15599 : 0 : switch (TREE_CODE (_p1))
15600 : : {
15601 : 0 : case SSA_NAME:
15602 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15603 : : {
15604 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15605 : 0 : switch (gimple_assign_rhs_code (_a2))
15606 : : {
15607 : 0 : case NEGATE_EXPR:
15608 : 0 : {
15609 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15610 : 0 : _q40 = do_valueize (valueize, _q40);
15611 : 0 : {
15612 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15613 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15614 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15615 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15616 : : )
15617 : : {
15618 : 0 : gimple_seq *lseq = seq;
15619 : 0 : if (lseq
15620 : 0 : && (!single_use (captures[0])
15621 : 0 : || !single_use (captures[2])))
15622 : 0 : lseq = NULL;
15623 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2124;
15624 : 0 : {
15625 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15626 : 0 : {
15627 : 0 : tree _o1[2], _r1;
15628 : 0 : _o1[0] = captures[1];
15629 : 0 : _o1[1] = captures[3];
15630 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_FMAX, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15631 : 0 : tem_op.resimplify (lseq, valueize);
15632 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15633 : 0 : if (!_r1) goto next_after_fail2124;
15634 : 0 : res_op->ops[0] = _r1;
15635 : : }
15636 : 0 : res_op->resimplify (lseq, valueize);
15637 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15638 : 0 : return true;
15639 : : }
15640 : 0 : next_after_fail2124:;
15641 : : }
15642 : : }
15643 : 0 : break;
15644 : : }
15645 : : default:;
15646 : : }
15647 : : }
15648 : : break;
15649 : : default:;
15650 : : }
15651 : : break;
15652 : : }
15653 : : default:;
15654 : : }
15655 : : }
15656 : : break;
15657 : : default:;
15658 : : }
15659 : : return false;
15660 : : }
15661 : :
15662 : : bool
15663 : 1762 : gimple_simplify_CFN_BUILT_IN_FMAXL (gimple_match_op *res_op, gimple_seq *seq,
15664 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15665 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15666 : : {
15667 : 1762 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15668 : 1762 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15669 : : {
15670 : 43 : {
15671 : 43 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15672 : 43 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
15673 : 28 : return true;
15674 : : }
15675 : : }
15676 : 1734 : switch (TREE_CODE (_p1))
15677 : : {
15678 : 886 : case REAL_CST:
15679 : 886 : {
15680 : 886 : {
15681 : 886 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15682 : 886 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
15683 : 38 : return true;
15684 : : }
15685 : 848 : break;
15686 : : }
15687 : 1696 : default:;
15688 : : }
15689 : 1696 : switch (TREE_CODE (_p0))
15690 : : {
15691 : 490 : case REAL_CST:
15692 : 490 : {
15693 : 490 : {
15694 : 490 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15695 : 490 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
15696 : 60 : return true;
15697 : : }
15698 : 430 : break;
15699 : : }
15700 : 1636 : default:;
15701 : : }
15702 : 1636 : {
15703 : 1636 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15704 : 1636 : if (gimple_simplify_495 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXL))
15705 : 29 : return true;
15706 : : }
15707 : 1607 : switch (TREE_CODE (_p0))
15708 : : {
15709 : 1028 : case SSA_NAME:
15710 : 1028 : if (gimple *_d1 = get_def (valueize, _p0))
15711 : : {
15712 : 586 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15713 : 311 : switch (gimple_assign_rhs_code (_a1))
15714 : : {
15715 : 40 : case NEGATE_EXPR:
15716 : 40 : {
15717 : 40 : tree _q20 = gimple_assign_rhs1 (_a1);
15718 : 40 : _q20 = do_valueize (valueize, _q20);
15719 : 40 : switch (TREE_CODE (_p1))
15720 : : {
15721 : 0 : case SSA_NAME:
15722 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15723 : : {
15724 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15725 : 0 : switch (gimple_assign_rhs_code (_a2))
15726 : : {
15727 : 0 : case NEGATE_EXPR:
15728 : 0 : {
15729 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15730 : 0 : _q40 = do_valueize (valueize, _q40);
15731 : 0 : {
15732 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15733 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15734 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15735 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15736 : : )
15737 : : {
15738 : 0 : gimple_seq *lseq = seq;
15739 : 0 : if (lseq
15740 : 0 : && (!single_use (captures[0])
15741 : 0 : || !single_use (captures[2])))
15742 : 0 : lseq = NULL;
15743 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2127;
15744 : 0 : {
15745 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15746 : 0 : {
15747 : 0 : tree _o1[2], _r1;
15748 : 0 : _o1[0] = captures[1];
15749 : 0 : _o1[1] = captures[3];
15750 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINL, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15751 : 0 : tem_op.resimplify (lseq, valueize);
15752 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15753 : 0 : if (!_r1) goto next_after_fail2127;
15754 : 0 : res_op->ops[0] = _r1;
15755 : : }
15756 : 0 : res_op->resimplify (lseq, valueize);
15757 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15758 : 0 : return true;
15759 : : }
15760 : 0 : next_after_fail2127:;
15761 : : }
15762 : : }
15763 : 0 : break;
15764 : : }
15765 : : default:;
15766 : : }
15767 : : }
15768 : : break;
15769 : : default:;
15770 : : }
15771 : : break;
15772 : : }
15773 : : default:;
15774 : : }
15775 : : }
15776 : : break;
15777 : : default:;
15778 : : }
15779 : : return false;
15780 : : }
15781 : :
15782 : : bool
15783 : 0 : gimple_simplify_CFN_BUILT_IN_FMAXF64 (gimple_match_op *res_op, gimple_seq *seq,
15784 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15785 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15786 : : {
15787 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15788 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15789 : : {
15790 : 0 : {
15791 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15792 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
15793 : 0 : return true;
15794 : : }
15795 : : }
15796 : 0 : switch (TREE_CODE (_p1))
15797 : : {
15798 : 0 : case REAL_CST:
15799 : 0 : {
15800 : 0 : {
15801 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15802 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
15803 : 0 : return true;
15804 : : }
15805 : 0 : break;
15806 : : }
15807 : 0 : default:;
15808 : : }
15809 : 0 : switch (TREE_CODE (_p0))
15810 : : {
15811 : 0 : case REAL_CST:
15812 : 0 : {
15813 : 0 : {
15814 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15815 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
15816 : 0 : return true;
15817 : : }
15818 : 0 : break;
15819 : : }
15820 : 0 : default:;
15821 : : }
15822 : 0 : {
15823 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15824 : 0 : if (gimple_simplify_495 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF64))
15825 : 0 : return true;
15826 : : }
15827 : 0 : switch (TREE_CODE (_p0))
15828 : : {
15829 : 0 : case SSA_NAME:
15830 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
15831 : : {
15832 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15833 : 0 : switch (gimple_assign_rhs_code (_a1))
15834 : : {
15835 : 0 : case NEGATE_EXPR:
15836 : 0 : {
15837 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15838 : 0 : _q20 = do_valueize (valueize, _q20);
15839 : 0 : switch (TREE_CODE (_p1))
15840 : : {
15841 : 0 : case SSA_NAME:
15842 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15843 : : {
15844 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15845 : 0 : switch (gimple_assign_rhs_code (_a2))
15846 : : {
15847 : 0 : case NEGATE_EXPR:
15848 : 0 : {
15849 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15850 : 0 : _q40 = do_valueize (valueize, _q40);
15851 : 0 : {
15852 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15853 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15854 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15855 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15856 : : )
15857 : : {
15858 : 0 : gimple_seq *lseq = seq;
15859 : 0 : if (lseq
15860 : 0 : && (!single_use (captures[0])
15861 : 0 : || !single_use (captures[2])))
15862 : 0 : lseq = NULL;
15863 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2130;
15864 : 0 : {
15865 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15866 : 0 : {
15867 : 0 : tree _o1[2], _r1;
15868 : 0 : _o1[0] = captures[1];
15869 : 0 : _o1[1] = captures[3];
15870 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINF64, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15871 : 0 : tem_op.resimplify (lseq, valueize);
15872 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15873 : 0 : if (!_r1) goto next_after_fail2130;
15874 : 0 : res_op->ops[0] = _r1;
15875 : : }
15876 : 0 : res_op->resimplify (lseq, valueize);
15877 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15878 : 0 : return true;
15879 : : }
15880 : 0 : next_after_fail2130:;
15881 : : }
15882 : : }
15883 : 0 : break;
15884 : : }
15885 : : default:;
15886 : : }
15887 : : }
15888 : : break;
15889 : : default:;
15890 : : }
15891 : : break;
15892 : : }
15893 : : default:;
15894 : : }
15895 : : }
15896 : : break;
15897 : : default:;
15898 : : }
15899 : : return false;
15900 : : }
15901 : :
15902 : : bool
15903 : 0 : gimple_simplify_CFN_BUILT_IN_FMAXF128X (gimple_match_op *res_op, gimple_seq *seq,
15904 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
15905 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
15906 : : {
15907 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
15908 : 0 : if ((_p1 == _p0 && ! TREE_SIDE_EFFECTS (_p1)) || (operand_equal_p (_p1, _p0, 0) && types_match (_p1, _p0)))
15909 : : {
15910 : 0 : {
15911 : 0 : tree captures[1] ATTRIBUTE_UNUSED = { _p0 };
15912 : 0 : if (gimple_simplify_492 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128X))
15913 : 0 : return true;
15914 : : }
15915 : : }
15916 : 0 : switch (TREE_CODE (_p1))
15917 : : {
15918 : 0 : case REAL_CST:
15919 : 0 : {
15920 : 0 : {
15921 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15922 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128X))
15923 : 0 : return true;
15924 : : }
15925 : 0 : break;
15926 : : }
15927 : 0 : default:;
15928 : : }
15929 : 0 : switch (TREE_CODE (_p0))
15930 : : {
15931 : 0 : case REAL_CST:
15932 : 0 : {
15933 : 0 : {
15934 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p1, _p0 };
15935 : 0 : if (gimple_simplify_493 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128X))
15936 : 0 : return true;
15937 : : }
15938 : 0 : break;
15939 : : }
15940 : 0 : default:;
15941 : : }
15942 : 0 : {
15943 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
15944 : 0 : if (gimple_simplify_495 (res_op, seq, valueize, type, captures, CFN_BUILT_IN_FMAXF128X))
15945 : 0 : return true;
15946 : : }
15947 : 0 : switch (TREE_CODE (_p0))
15948 : : {
15949 : 0 : case SSA_NAME:
15950 : 0 : if (gimple *_d1 = get_def (valueize, _p0))
15951 : : {
15952 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
15953 : 0 : switch (gimple_assign_rhs_code (_a1))
15954 : : {
15955 : 0 : case NEGATE_EXPR:
15956 : 0 : {
15957 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
15958 : 0 : _q20 = do_valueize (valueize, _q20);
15959 : 0 : switch (TREE_CODE (_p1))
15960 : : {
15961 : 0 : case SSA_NAME:
15962 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
15963 : : {
15964 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
15965 : 0 : switch (gimple_assign_rhs_code (_a2))
15966 : : {
15967 : 0 : case NEGATE_EXPR:
15968 : 0 : {
15969 : 0 : tree _q40 = gimple_assign_rhs1 (_a2);
15970 : 0 : _q40 = do_valueize (valueize, _q40);
15971 : 0 : {
15972 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _q20, _p1, _q40 };
15973 : 0 : if (FLOAT_TYPE_P (TREE_TYPE (captures[1]))
15974 : 0 : || (ANY_INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
15975 : 0 : && TYPE_OVERFLOW_UNDEFINED (TREE_TYPE (captures[1])))
15976 : : )
15977 : : {
15978 : 0 : gimple_seq *lseq = seq;
15979 : 0 : if (lseq
15980 : 0 : && (!single_use (captures[0])
15981 : 0 : || !single_use (captures[2])))
15982 : 0 : lseq = NULL;
15983 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2134;
15984 : 0 : {
15985 : 0 : res_op->set_op (NEGATE_EXPR, type, 1);
15986 : 0 : {
15987 : 0 : tree _o1[2], _r1;
15988 : 0 : _o1[0] = captures[1];
15989 : 0 : _o1[1] = captures[3];
15990 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_BUILT_IN_FMINF128X, TREE_TYPE (_o1[0]), _o1[0], _o1[1]);
15991 : 0 : tem_op.resimplify (lseq, valueize);
15992 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
15993 : 0 : if (!_r1) goto next_after_fail2134;
15994 : 0 : res_op->ops[0] = _r1;
15995 : : }
15996 : 0 : res_op->resimplify (lseq, valueize);
15997 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1073, __FILE__, __LINE__, true);
15998 : 0 : return true;
15999 : : }
16000 : 0 : next_after_fail2134:;
16001 : : }
16002 : : }
16003 : 0 : break;
16004 : : }
16005 : : default:;
16006 : : }
16007 : : }
16008 : : break;
16009 : : default:;
16010 : : }
16011 : : break;
16012 : : }
16013 : : default:;
16014 : : }
16015 : : }
16016 : : break;
16017 : : default:;
16018 : : }
16019 : : return false;
16020 : : }
16021 : :
16022 : : bool
16023 : 149527 : gimple_simplify_UNORDERED_EXPR (gimple_match_op *res_op, gimple_seq *seq,
16024 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
16025 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
16026 : : {
16027 : 149527 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
16028 : 149527 : switch (TREE_CODE (_p0))
16029 : : {
16030 : 146760 : case SSA_NAME:
16031 : 146760 : if (gimple *_d1 = get_def (valueize, _p0))
16032 : : {
16033 : 62091 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16034 : 48278 : switch (gimple_assign_rhs_code (_a1))
16035 : : {
16036 : 0 : case VEC_COND_EXPR:
16037 : 0 : {
16038 : 0 : tree _q20 = gimple_assign_rhs1 (_a1);
16039 : 0 : _q20 = do_valueize (valueize, _q20);
16040 : 0 : tree _q21 = gimple_assign_rhs2 (_a1);
16041 : 0 : _q21 = do_valueize (valueize, _q21);
16042 : 0 : tree _q22 = gimple_assign_rhs3 (_a1);
16043 : 0 : _q22 = do_valueize (valueize, _q22);
16044 : 0 : switch (TREE_CODE (_p1))
16045 : : {
16046 : 0 : case SSA_NAME:
16047 : 0 : if (gimple *_d2 = get_def (valueize, _p1))
16048 : : {
16049 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16050 : 0 : switch (gimple_assign_rhs_code (_a2))
16051 : : {
16052 : 0 : case VEC_COND_EXPR:
16053 : 0 : {
16054 : 0 : tree _q60 = gimple_assign_rhs1 (_a2);
16055 : 0 : _q60 = do_valueize (valueize, _q60);
16056 : 0 : tree _q61 = gimple_assign_rhs2 (_a2);
16057 : 0 : _q61 = do_valueize (valueize, _q61);
16058 : 0 : tree _q62 = gimple_assign_rhs3 (_a2);
16059 : 0 : _q62 = do_valueize (valueize, _q62);
16060 : 0 : if ((_q60 == _q20 && ! TREE_SIDE_EFFECTS (_q60)) || (operand_equal_p (_q60, _q20, 0) && types_match (_q60, _q20)))
16061 : : {
16062 : 0 : {
16063 : 0 : tree captures[7] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1, _q61, _q62 };
16064 : 0 : if (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
16065 : 0 : || types_match (type, TREE_TYPE (captures[2]))
16066 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
16067 : : || (optimize_vectors_before_lowering_p ()
16068 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
16069 : 0 : TREE_TYPE (captures[1]), ERROR_MARK))
16070 : : )
16071 : : {
16072 : 0 : gimple_seq *lseq = seq;
16073 : 0 : if (lseq
16074 : 0 : && (!single_use (captures[0])
16075 : 0 : || !single_use (captures[4])))
16076 : 0 : lseq = NULL;
16077 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2138;
16078 : 0 : {
16079 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
16080 : 0 : res_op->ops[0] = captures[1];
16081 : 0 : {
16082 : 0 : tree _o1[2], _r1;
16083 : 0 : _o1[0] = captures[2];
16084 : 0 : _o1[1] = captures[5];
16085 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16086 : 0 : tem_op.resimplify (NULL, valueize);
16087 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16088 : 0 : if (!_r1) goto next_after_fail2138;
16089 : 0 : res_op->ops[1] = _r1;
16090 : : }
16091 : 0 : {
16092 : 0 : tree _o1[2], _r1;
16093 : 0 : _o1[0] = captures[3];
16094 : 0 : _o1[1] = captures[6];
16095 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16096 : 0 : tem_op.resimplify (NULL, valueize);
16097 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16098 : 0 : if (!_r1) goto next_after_fail2138;
16099 : 0 : res_op->ops[2] = _r1;
16100 : : }
16101 : 0 : res_op->resimplify (lseq, valueize);
16102 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 925, __FILE__, __LINE__, true);
16103 : 0 : return true;
16104 : : }
16105 : 0 : next_after_fail2138:;
16106 : : }
16107 : : }
16108 : : }
16109 : : break;
16110 : : }
16111 : : default:;
16112 : : }
16113 : : }
16114 : : break;
16115 : 0 : default:;
16116 : : }
16117 : 0 : {
16118 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _q20, _q21, _q22, _p1 };
16119 : 0 : if (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
16120 : 0 : || types_match (type, TREE_TYPE (captures[2]))
16121 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[1]), ERROR_MARK)
16122 : : || (optimize_vectors_before_lowering_p ()
16123 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[2]),
16124 : 0 : TREE_TYPE (captures[1]), ERROR_MARK))
16125 : : )
16126 : : {
16127 : 0 : gimple_seq *lseq = seq;
16128 : 0 : if (lseq
16129 : 0 : && (!single_use (captures[0])))
16130 : 0 : lseq = NULL;
16131 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2139;
16132 : 0 : {
16133 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
16134 : 0 : res_op->ops[0] = captures[1];
16135 : 0 : {
16136 : 0 : tree _o1[2], _r1;
16137 : 0 : _o1[0] = captures[2];
16138 : 0 : _o1[1] = captures[4];
16139 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16140 : 0 : tem_op.resimplify (NULL, valueize);
16141 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16142 : 0 : if (!_r1) goto next_after_fail2139;
16143 : 0 : res_op->ops[1] = _r1;
16144 : : }
16145 : 0 : {
16146 : 0 : tree _o1[2], _r1;
16147 : 0 : _o1[0] = captures[3];
16148 : 0 : _o1[1] = captures[4];
16149 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16150 : 0 : tem_op.resimplify (NULL, valueize);
16151 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16152 : 0 : if (!_r1) goto next_after_fail2139;
16153 : 0 : res_op->ops[2] = _r1;
16154 : : }
16155 : 0 : res_op->resimplify (lseq, valueize);
16156 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 926, __FILE__, __LINE__, true);
16157 : 0 : return true;
16158 : : }
16159 : 0 : next_after_fail2139:;
16160 : : }
16161 : : }
16162 : 0 : break;
16163 : : }
16164 : : default:;
16165 : : }
16166 : : }
16167 : : break;
16168 : 149527 : default:;
16169 : : }
16170 : 149527 : switch (TREE_CODE (_p1))
16171 : : {
16172 : 145866 : case SSA_NAME:
16173 : 145866 : if (gimple *_d1 = get_def (valueize, _p1))
16174 : : {
16175 : 61437 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16176 : 48243 : switch (gimple_assign_rhs_code (_a1))
16177 : : {
16178 : 0 : case VEC_COND_EXPR:
16179 : 0 : {
16180 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
16181 : 0 : _q30 = do_valueize (valueize, _q30);
16182 : 0 : tree _q31 = gimple_assign_rhs2 (_a1);
16183 : 0 : _q31 = do_valueize (valueize, _q31);
16184 : 0 : tree _q32 = gimple_assign_rhs3 (_a1);
16185 : 0 : _q32 = do_valueize (valueize, _q32);
16186 : 0 : {
16187 : 0 : tree captures[5] ATTRIBUTE_UNUSED = { _p0, _p1, _q30, _q31, _q32 };
16188 : 0 : if (TREE_CODE_CLASS (UNORDERED_EXPR) != tcc_comparison
16189 : 0 : || types_match (type, TREE_TYPE (captures[3]))
16190 : 0 : || expand_vec_cond_expr_p (type, TREE_TYPE (captures[2]), ERROR_MARK)
16191 : : || (optimize_vectors_before_lowering_p ()
16192 : 0 : && !expand_vec_cond_expr_p (TREE_TYPE (captures[3]),
16193 : 0 : TREE_TYPE (captures[2]), ERROR_MARK))
16194 : : )
16195 : : {
16196 : 0 : gimple_seq *lseq = seq;
16197 : 0 : if (lseq
16198 : 0 : && (!single_use (captures[1])))
16199 : 0 : lseq = NULL;
16200 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2140;
16201 : 0 : {
16202 : 0 : res_op->set_op (VEC_COND_EXPR, type, 3);
16203 : 0 : res_op->ops[0] = captures[2];
16204 : 0 : {
16205 : 0 : tree _o1[2], _r1;
16206 : 0 : _o1[0] = captures[0];
16207 : 0 : _o1[1] = captures[3];
16208 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16209 : 0 : tem_op.resimplify (NULL, valueize);
16210 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16211 : 0 : if (!_r1) goto next_after_fail2140;
16212 : 0 : res_op->ops[1] = _r1;
16213 : : }
16214 : 0 : {
16215 : 0 : tree _o1[2], _r1;
16216 : 0 : _o1[0] = captures[0];
16217 : 0 : _o1[1] = captures[4];
16218 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), UNORDERED_EXPR, type, _o1[0], _o1[1]);
16219 : 0 : tem_op.resimplify (NULL, valueize);
16220 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, NULL);
16221 : 0 : if (!_r1) goto next_after_fail2140;
16222 : 0 : res_op->ops[2] = _r1;
16223 : : }
16224 : 0 : res_op->resimplify (lseq, valueize);
16225 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 927, __FILE__, __LINE__, true);
16226 : 0 : return true;
16227 : : }
16228 : 0 : next_after_fail2140:;
16229 : : }
16230 : : }
16231 : 0 : break;
16232 : : }
16233 : : default:;
16234 : : }
16235 : : }
16236 : : break;
16237 : 149527 : default:;
16238 : : }
16239 : 149527 : switch (TREE_CODE (_p0))
16240 : : {
16241 : 146760 : case SSA_NAME:
16242 : 146760 : if (gimple *_d1 = get_def (valueize, _p0))
16243 : : {
16244 : 62091 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16245 : 48278 : switch (gimple_assign_rhs_code (_a1))
16246 : : {
16247 : 4 : case FLOAT_EXPR:
16248 : 4 : {
16249 : 4 : tree _q20 = gimple_assign_rhs1 (_a1);
16250 : 4 : _q20 = do_valueize (valueize, _q20);
16251 : 4 : switch (TREE_CODE (_p1))
16252 : : {
16253 : 4 : case SSA_NAME:
16254 : 4 : if (gimple *_d2 = get_def (valueize, _p1))
16255 : : {
16256 : 4 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16257 : 4 : switch (gimple_assign_rhs_code (_a2))
16258 : : {
16259 : 4 : case FLOAT_EXPR:
16260 : 4 : {
16261 : 4 : tree _q40 = gimple_assign_rhs1 (_a2);
16262 : 4 : _q40 = do_valueize (valueize, _q40);
16263 : 4 : {
16264 : 4 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _q40 };
16265 : 4 : if (gimple_simplify_257 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, UNORDERED_EXPR))
16266 : 4 : return true;
16267 : : }
16268 : 0 : break;
16269 : : }
16270 : : default:;
16271 : : }
16272 : : }
16273 : : break;
16274 : : default:;
16275 : : }
16276 : : break;
16277 : : }
16278 : 120 : case NEGATE_EXPR:
16279 : 120 : {
16280 : 120 : tree _q20 = gimple_assign_rhs1 (_a1);
16281 : 120 : _q20 = do_valueize (valueize, _q20);
16282 : 120 : switch (TREE_CODE (_p1))
16283 : : {
16284 : 120 : case SSA_NAME:
16285 : 120 : if (gimple *_d2 = get_def (valueize, _p1))
16286 : : {
16287 : 120 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
16288 : 120 : switch (gimple_assign_rhs_code (_a2))
16289 : : {
16290 : 120 : case NEGATE_EXPR:
16291 : 120 : {
16292 : 120 : tree _q40 = gimple_assign_rhs1 (_a2);
16293 : 120 : _q40 = do_valueize (valueize, _q40);
16294 : 120 : {
16295 : 120 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _q40 };
16296 : 120 : if (gimple_simplify_260 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, UNORDERED_EXPR))
16297 : 120 : return true;
16298 : : }
16299 : 0 : break;
16300 : : }
16301 : : default:;
16302 : : }
16303 : : }
16304 : : break;
16305 : 0 : default:;
16306 : : }
16307 : 0 : if (CONSTANT_CLASS_P (_p1))
16308 : : {
16309 : 0 : {
16310 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _q20, _p1 };
16311 : 0 : if (gimple_simplify_261 (res_op, seq, valueize, type, captures, UNORDERED_EXPR, UNORDERED_EXPR))
16312 : 0 : return true;
16313 : : }
16314 : : }
16315 : : break;
16316 : : }
16317 : : default:;
16318 : : }
16319 : : }
16320 : : break;
16321 : 149403 : default:;
16322 : : }
16323 : 149403 : switch (TREE_CODE (_p1))
16324 : : {
16325 : 1014 : case REAL_CST:
16326 : 1014 : {
16327 : 1014 : {
16328 : 1014 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16329 : 1014 : if (gimple_simplify_594 (res_op, seq, valueize, type, captures, UNORDERED_EXPR))
16330 : 0 : return true;
16331 : : }
16332 : 1014 : break;
16333 : : }
16334 : 149403 : default:;
16335 : : }
16336 : 149403 : {
16337 : 149403 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16338 : 149403 : if (tree_expr_nan_p (captures[0]) || tree_expr_nan_p (captures[1])
16339 : : )
16340 : : {
16341 : 0 : gimple_seq *lseq = seq;
16342 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2141;
16343 : 0 : {
16344 : 0 : tree tem;
16345 : 0 : tem = constant_boolean_node (true, type);
16346 : 0 : res_op->set_value (tem);
16347 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1080, __FILE__, __LINE__, true);
16348 : 0 : return true;
16349 : : }
16350 : 0 : next_after_fail2141:;
16351 : : }
16352 : : else
16353 : : {
16354 : 149403 : if (!tree_expr_maybe_nan_p (captures[0]) && !tree_expr_maybe_nan_p (captures[1])
16355 : : )
16356 : : {
16357 : 0 : gimple_seq *lseq = seq;
16358 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2142;
16359 : 0 : {
16360 : 0 : tree tem;
16361 : 0 : tem = constant_boolean_node (false, type);
16362 : 0 : res_op->set_value (tem);
16363 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1081, __FILE__, __LINE__, true);
16364 : 0 : return true;
16365 : : }
16366 : 0 : next_after_fail2142:;
16367 : : }
16368 : : }
16369 : : }
16370 : 149403 : return false;
16371 : : }
16372 : :
16373 : : bool
16374 : 290440 : gimple_simplify_CFN_SUB_OVERFLOW (gimple_match_op *res_op, gimple_seq *seq,
16375 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
16376 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
16377 : : {
16378 : 290440 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
16379 : 290440 : switch (TREE_CODE (_p0))
16380 : : {
16381 : 170227 : case SSA_NAME:
16382 : 170227 : if (gimple *_d1 = get_def (valueize, _p0))
16383 : : {
16384 : 122947 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16385 : 6666 : switch (gimple_assign_rhs_code (_a1))
16386 : : {
16387 : 3328 : CASE_CONVERT:
16388 : 3328 : {
16389 : 3328 : tree _q20 = gimple_assign_rhs1 (_a1);
16390 : 3328 : _q20 = do_valueize (valueize, _q20);
16391 : 3328 : {
16392 : 3328 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _q20, _p1 };
16393 : 3328 : if (gimple_simplify_597 (res_op, seq, valueize, type, captures, CFN_SUB_OVERFLOW))
16394 : 3325 : return true;
16395 : : }
16396 : 3 : break;
16397 : : }
16398 : : default:;
16399 : : }
16400 : : }
16401 : : break;
16402 : 287115 : default:;
16403 : : }
16404 : 287115 : switch (TREE_CODE (_p1))
16405 : : {
16406 : 164993 : case SSA_NAME:
16407 : 164993 : if (gimple *_d1 = get_def (valueize, _p1))
16408 : : {
16409 : 118911 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16410 : 5142 : switch (gimple_assign_rhs_code (_a1))
16411 : : {
16412 : 3450 : CASE_CONVERT:
16413 : 3450 : {
16414 : 3450 : tree _q30 = gimple_assign_rhs1 (_a1);
16415 : 3450 : _q30 = do_valueize (valueize, _q30);
16416 : 3450 : {
16417 : 3450 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q30 };
16418 : 3450 : if (gimple_simplify_598 (res_op, seq, valueize, type, captures, CFN_SUB_OVERFLOW))
16419 : 3357 : return true;
16420 : : }
16421 : 93 : break;
16422 : : }
16423 : : default:;
16424 : : }
16425 : : }
16426 : : break;
16427 : : default:;
16428 : : }
16429 : : return false;
16430 : : }
16431 : :
16432 : : bool
16433 : 0 : gimple_simplify_CFN_LDEXP (gimple_match_op *res_op, gimple_seq *seq,
16434 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
16435 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
16436 : : {
16437 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
16438 : 0 : if (real_zerop (_p0))
16439 : : {
16440 : 0 : {
16441 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16442 : 0 : if (gimple_simplify_608 (res_op, seq, valueize, type, captures))
16443 : 0 : return true;
16444 : : }
16445 : : }
16446 : 0 : if (integer_zerop (_p1))
16447 : : {
16448 : 0 : {
16449 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16450 : 0 : if (gimple_simplify_609 (res_op, seq, valueize, type, captures))
16451 : 0 : return true;
16452 : : }
16453 : : }
16454 : 0 : switch (TREE_CODE (_p0))
16455 : : {
16456 : 0 : case REAL_CST:
16457 : 0 : {
16458 : 0 : {
16459 : 0 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16460 : 0 : if (!real_isfinite (TREE_REAL_CST_PTR (captures[0]))
16461 : : )
16462 : : {
16463 : 0 : gimple_seq *lseq = seq;
16464 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2170;
16465 : 0 : {
16466 : 0 : tree tem;
16467 : 0 : tem = captures[0];
16468 : 0 : res_op->set_value (tem);
16469 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1085, __FILE__, __LINE__, true);
16470 : 0 : return true;
16471 : : }
16472 : 0 : next_after_fail2170:;
16473 : : }
16474 : : }
16475 : 0 : break;
16476 : : }
16477 : : default:;
16478 : : }
16479 : : return false;
16480 : : }
16481 : :
16482 : : bool
16483 : 975 : gimple_simplify_CFN_BUILT_IN_SCALBLNL (gimple_match_op *res_op, gimple_seq *seq,
16484 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
16485 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1)
16486 : : {
16487 : 975 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
16488 : 975 : if (real_zerop (_p0))
16489 : : {
16490 : 28 : {
16491 : 28 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16492 : 28 : if (gimple_simplify_608 (res_op, seq, valueize, type, captures))
16493 : 28 : return true;
16494 : : }
16495 : : }
16496 : 947 : if (integer_zerop (_p1))
16497 : : {
16498 : 7 : {
16499 : 7 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16500 : 7 : if (gimple_simplify_609 (res_op, seq, valueize, type, captures))
16501 : 7 : return true;
16502 : : }
16503 : : }
16504 : 940 : switch (TREE_CODE (_p0))
16505 : : {
16506 : 880 : case REAL_CST:
16507 : 880 : {
16508 : 880 : {
16509 : 880 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16510 : 880 : if (!real_isfinite (TREE_REAL_CST_PTR (captures[0]))
16511 : : )
16512 : : {
16513 : 56 : gimple_seq *lseq = seq;
16514 : 56 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2176;
16515 : 56 : {
16516 : 56 : tree tem;
16517 : 56 : tem = captures[0];
16518 : 56 : res_op->set_value (tem);
16519 : 56 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1085, __FILE__, __LINE__, true);
16520 : 56 : return true;
16521 : : }
16522 : 0 : next_after_fail2176:;
16523 : : }
16524 : : }
16525 : 824 : break;
16526 : : }
16527 : : default:;
16528 : : }
16529 : : return false;
16530 : : }
16531 : :
16532 : : bool
16533 : 1583713 : gimple_simplify_BIT_FIELD_REF (gimple_match_op *res_op, gimple_seq *seq,
16534 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
16535 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
16536 : : {
16537 : 1583713 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
16538 : 1583713 : switch (TREE_CODE (_p0))
16539 : : {
16540 : 1046256 : case SSA_NAME:
16541 : 1046256 : if (gimple *_d1 = get_def (valueize, _p0))
16542 : : {
16543 : 671267 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16544 : 862610 : switch (gimple_assign_rhs_code (_a1))
16545 : : {
16546 : 382 : case BIT_FIELD_REF:
16547 : 382 : {
16548 : 382 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
16549 : 382 : if ((TREE_CODE (_q20) == SSA_NAME
16550 : 382 : || is_gimple_min_invariant (_q20)))
16551 : : {
16552 : 378 : _q20 = do_valueize (valueize, _q20);
16553 : 378 : tree _q21 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 1);
16554 : 378 : if ((TREE_CODE (_q21) == SSA_NAME
16555 : 378 : || is_gimple_min_invariant (_q21)))
16556 : : {
16557 : 378 : _q21 = do_valueize (valueize, _q21);
16558 : 378 : tree _q22 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 2);
16559 : 378 : if ((TREE_CODE (_q22) == SSA_NAME
16560 : 378 : || is_gimple_min_invariant (_q22)))
16561 : : {
16562 : 378 : _q22 = do_valueize (valueize, _q22);
16563 : 378 : {
16564 : 378 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
16565 : 378 : gimple_seq *lseq = seq;
16566 : 378 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2357;
16567 : 378 : {
16568 : 378 : res_op->set_op (BIT_FIELD_REF, type, 3);
16569 : 378 : res_op->ops[0] = captures[0];
16570 : 378 : res_op->ops[1] = captures[3];
16571 : 378 : res_op->ops[2] = const_binop (PLUS_EXPR, bitsizetype, captures[2], captures[4]);
16572 : 378 : res_op->resimplify (lseq, valueize);
16573 : 378 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1126, __FILE__, __LINE__, true);
16574 : 378 : return true;
16575 : : }
16576 : 0 : next_after_fail2357:;
16577 : : }
16578 : : }
16579 : : }
16580 : : }
16581 : : break;
16582 : : }
16583 : 23210 : case VIEW_CONVERT_EXPR:
16584 : 23210 : {
16585 : 23210 : tree _q20 = TREE_OPERAND (gimple_assign_rhs1 (_a1), 0);
16586 : 23210 : if ((TREE_CODE (_q20) == SSA_NAME
16587 : 23210 : || is_gimple_min_invariant (_q20)))
16588 : : {
16589 : 23188 : _q20 = do_valueize (valueize, _q20);
16590 : 23188 : {
16591 : 23188 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
16592 : 46376 : if (! INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
16593 : 23246 : || type_has_mode_precision_p (TREE_TYPE (captures[0]))
16594 : : )
16595 : : {
16596 : 23164 : gimple_seq *lseq = seq;
16597 : 23164 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2358;
16598 : 23164 : {
16599 : 23164 : res_op->set_op (BIT_FIELD_REF, type, 3);
16600 : 23164 : res_op->ops[0] = captures[0];
16601 : 23164 : res_op->ops[1] = captures[1];
16602 : 23164 : res_op->ops[2] = captures[2];
16603 : 23164 : res_op->resimplify (lseq, valueize);
16604 : 23164 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1127, __FILE__, __LINE__, true);
16605 : 23164 : return true;
16606 : : }
16607 : 0 : next_after_fail2358:;
16608 : : }
16609 : : }
16610 : : }
16611 : : break;
16612 : : }
16613 : : default:;
16614 : : }
16615 : : }
16616 : : break;
16617 : 1560171 : default:;
16618 : : }
16619 : 1560171 : if (integer_zerop (_p2))
16620 : : {
16621 : 622330 : {
16622 : 622330 : tree captures[2] ATTRIBUTE_UNUSED = { _p0, _p1 };
16623 : 622330 : if (tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (captures[0])))
16624 : : )
16625 : : {
16626 : 2167 : gimple_seq *lseq = seq;
16627 : 2167 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2359;
16628 : 2167 : {
16629 : 2167 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16630 : 2167 : res_op->ops[0] = captures[0];
16631 : 2167 : res_op->resimplify (lseq, valueize);
16632 : 2167 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1128, __FILE__, __LINE__, true);
16633 : 2167 : return true;
16634 : : }
16635 : 0 : next_after_fail2359:;
16636 : : }
16637 : : }
16638 : : }
16639 : 1558004 : {
16640 : 1558004 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
16641 : 1558004 : if (TREE_CODE (TREE_TYPE (captures[0])) == COMPLEX_TYPE
16642 : 1558004 : && tree_int_cst_equal (captures[1], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
16643 : : )
16644 : : {
16645 : 318 : if (integer_zerop (captures[2])
16646 : : )
16647 : : {
16648 : 162 : gimple_seq *lseq = seq;
16649 : 162 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2360;
16650 : 162 : {
16651 : 162 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16652 : 162 : {
16653 : 162 : tree _o1[1], _r1;
16654 : 162 : _o1[0] = captures[0];
16655 : 162 : gimple_match_op tem_op (res_op->cond.any_else (), REALPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
16656 : 162 : tem_op.resimplify (lseq, valueize);
16657 : 162 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16658 : 162 : if (!_r1) goto next_after_fail2360;
16659 : 82 : res_op->ops[0] = _r1;
16660 : : }
16661 : 82 : res_op->resimplify (lseq, valueize);
16662 : 82 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1129, __FILE__, __LINE__, true);
16663 : 82 : return true;
16664 : : }
16665 : 1555927 : next_after_fail2360:;
16666 : : }
16667 : : else
16668 : : {
16669 : 156 : if (tree_int_cst_equal (captures[2], TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0]))))
16670 : : )
16671 : : {
16672 : 156 : gimple_seq *lseq = seq;
16673 : 156 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2361;
16674 : 156 : {
16675 : 156 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16676 : 156 : {
16677 : 156 : tree _o1[1], _r1;
16678 : 156 : _o1[0] = captures[0];
16679 : 156 : gimple_match_op tem_op (res_op->cond.any_else (), IMAGPART_EXPR, TREE_TYPE (TREE_TYPE (_o1[0])), _o1[0]);
16680 : 156 : tem_op.resimplify (lseq, valueize);
16681 : 156 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
16682 : 156 : if (!_r1) goto next_after_fail2361;
16683 : 72 : res_op->ops[0] = _r1;
16684 : : }
16685 : 72 : res_op->resimplify (lseq, valueize);
16686 : 72 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1130, __FILE__, __LINE__, true);
16687 : 72 : return true;
16688 : : }
16689 : 1555927 : next_after_fail2361:;
16690 : : }
16691 : : }
16692 : : }
16693 : : else
16694 : : {
16695 : 3115264 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[0]))
16696 : 34588 : && INTEGRAL_TYPE_P (type)
16697 : 32735 : && (!
16698 : : 1
16699 : 32735 : || is_gimple_reg (captures[0]))
16700 : 1590421 : && ((compare_tree_int (captures[1], TYPE_PRECISION (TREE_TYPE (captures[0]))) == 0
16701 : 0 : && integer_zerop (captures[2]))
16702 : : || (BYTES_BIG_ENDIAN == WORDS_BIG_ENDIAN
16703 : : && canonicalize_math_after_vectorization_p ()
16704 : 6087 : && TYPE_PRECISION (TREE_TYPE (captures[0])) % BITS_PER_UNIT == 0
16705 : 6087 : && TYPE_PRECISION (type) % BITS_PER_UNIT == 0
16706 : 5891 : && compare_tree_int (captures[2], (BYTES_BIG_ENDIAN
16707 : : ? (TYPE_PRECISION (TREE_TYPE (captures[0]))
16708 : : - TYPE_PRECISION (type))
16709 : : : 0)) == 0))
16710 : : )
16711 : : {
16712 : 1923 : gimple_seq *lseq = seq;
16713 : 1923 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2362;
16714 : 1923 : {
16715 : 1923 : res_op->set_op (NOP_EXPR, type, 1);
16716 : 1923 : res_op->ops[0] = captures[0];
16717 : 1923 : res_op->resimplify (lseq, valueize);
16718 : 1923 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1131, __FILE__, __LINE__, true);
16719 : 1923 : return true;
16720 : : }
16721 : 0 : next_after_fail2362:;
16722 : : }
16723 : : }
16724 : : }
16725 : 1555927 : switch (TREE_CODE (_p0))
16726 : : {
16727 : 1019297 : case SSA_NAME:
16728 : 1019297 : if (gimple *_d1 = get_def (valueize, _p0))
16729 : : {
16730 : 645522 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
16731 : 813082 : switch (gimple_assign_rhs_code (_a1))
16732 : : {
16733 : 23090 : case CONSTRUCTOR:
16734 : 23090 : {
16735 : 23090 : {
16736 : 23090 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _p2 };
16737 : 23090 : if (VECTOR_TYPE_P (TREE_TYPE (captures[0]))
16738 : 23090 : && tree_fits_uhwi_p (TYPE_SIZE (type))
16739 : 46180 : && ((tree_to_uhwi (TYPE_SIZE (type))
16740 : 23090 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))
16741 : 5824 : || (VECTOR_TYPE_P (type)
16742 : 3409 : && (tree_to_uhwi (TYPE_SIZE (TREE_TYPE (type)))
16743 : 3409 : == tree_to_uhwi (TYPE_SIZE (TREE_TYPE (TREE_TYPE (captures[0])))))))
16744 : : )
16745 : : {
16746 : 19946 : {
16747 : 19946 : tree ctor = (TREE_CODE (captures[0]) == SSA_NAME
16748 : 19946 : ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]);
16749 : 19946 : tree eltype = TREE_TYPE (TREE_TYPE (ctor));
16750 : 19946 : unsigned HOST_WIDE_INT width = tree_to_uhwi (TYPE_SIZE (eltype));
16751 : 19946 : unsigned HOST_WIDE_INT n = tree_to_uhwi (captures[1]);
16752 : 19946 : unsigned HOST_WIDE_INT idx = tree_to_uhwi (captures[2]);
16753 : 19946 : if (n != 0
16754 : 19946 : && (idx % width) == 0
16755 : 19928 : && (n % width) == 0
16756 : 39892 : && known_le ((idx + n) / width,
16757 : : TYPE_VECTOR_SUBPARTS (TREE_TYPE (ctor)))
16758 : : )
16759 : : {
16760 : 19928 : {
16761 : 19928 : idx = idx / width;
16762 : 19928 : n = n / width;
16763 : 19928 : poly_uint64 k = 1;
16764 : 19928 : if (CONSTRUCTOR_NELTS (ctor) != 0)
16765 : : {
16766 : 19928 : tree cons_elem = TREE_TYPE (CONSTRUCTOR_ELT (ctor, 0)->value);
16767 : 19928 : if (TREE_CODE (cons_elem) == VECTOR_TYPE)
16768 : 5618 : k = TYPE_VECTOR_SUBPARTS (cons_elem);
16769 : : }
16770 : 19928 : unsigned HOST_WIDE_INT elt, count, const_k;
16771 : 19928 : if (multiple_p (idx, k, &elt) && multiple_p (n, k, &count)
16772 : : )
16773 : : {
16774 : 15456 : if (CONSTRUCTOR_NELTS (ctor) == 0
16775 : : )
16776 : : {
16777 : 0 : gimple_seq *lseq = seq;
16778 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2363;
16779 : 0 : {
16780 : 0 : tree tem;
16781 : 0 : tem = build_zero_cst (type);
16782 : 0 : res_op->set_value (tem);
16783 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1132, __FILE__, __LINE__, true);
16784 : 18289 : return true;
16785 : : }
16786 : 0 : next_after_fail2363:;
16787 : : }
16788 : : else
16789 : : {
16790 : 15456 : if (count == 1
16791 : : )
16792 : : {
16793 : 13808 : if (elt < CONSTRUCTOR_NELTS (ctor)
16794 : : )
16795 : : {
16796 : 13605 : gimple_seq *lseq = seq;
16797 : 13605 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2364;
16798 : 13605 : {
16799 : 13605 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16800 : 13605 : res_op->ops[0] = CONSTRUCTOR_ELT (ctor, elt)->value;
16801 : 13605 : res_op->resimplify (lseq, valueize);
16802 : 13605 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1133, __FILE__, __LINE__, true);
16803 : 13605 : return true;
16804 : : }
16805 : 0 : next_after_fail2364:;
16806 : : }
16807 : : else
16808 : : {
16809 : 203 : gimple_seq *lseq = seq;
16810 : 203 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2365;
16811 : 203 : {
16812 : 203 : tree tem;
16813 : 203 : tem = build_zero_cst (type);
16814 : 203 : res_op->set_value (tem);
16815 : 203 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1134, __FILE__, __LINE__, true);
16816 : 203 : return true;
16817 : : }
16818 : 0 : next_after_fail2365:;
16819 : : }
16820 : : }
16821 : : else
16822 : : {
16823 : 1648 : if (single_use (captures[0])
16824 : : )
16825 : : {
16826 : 359 : {
16827 : 359 : vec<constructor_elt, va_gc> *vals;
16828 : 359 : vec_alloc (vals, count);
16829 : 359 : bool constant_p = true;
16830 : 359 : tree res;
16831 : 2017 : for (unsigned i = 0;
16832 : 2017 : i < count && elt + i < CONSTRUCTOR_NELTS (ctor); ++i)
16833 : : {
16834 : 1658 : tree e = CONSTRUCTOR_ELT (ctor, elt + i)->value;
16835 : 1658 : CONSTRUCTOR_APPEND_ELT (vals, NULL_TREE, e);
16836 : 1658 : if (!CONSTANT_CLASS_P (e))
16837 : 1225 : constant_p = false;
16838 : : }
16839 : 359 : tree evtype = (types_match (TREE_TYPE (type),
16840 : 359 : TREE_TYPE (TREE_TYPE (ctor)))
16841 : 359 : ? type
16842 : 1 : : build_vector_type (TREE_TYPE (TREE_TYPE (ctor)),
16843 : 1 : count * k));
16844 : 359 : res = (constant_p ? build_vector_from_ctor (evtype, vals)
16845 : : : (
16846 : : 1
16847 : : ? NULL_TREE : build_constructor (evtype, vals)));
16848 : 9 : if (res
16849 : : )
16850 : : {
16851 : 9 : gimple_seq *lseq = seq;
16852 : 9 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2366;
16853 : 9 : {
16854 : 9 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16855 : 9 : res_op->ops[0] = res;
16856 : 9 : res_op->resimplify (lseq, valueize);
16857 : 9 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1135, __FILE__, __LINE__, true);
16858 : 9 : return true;
16859 : : }
16860 : 0 : next_after_fail2366:;
16861 : : }
16862 : : }
16863 : : }
16864 : : }
16865 : : }
16866 : : }
16867 : : else
16868 : : {
16869 : 4472 : if (k.is_constant (&const_k)
16870 : 4472 : && idx + n <= (idx / const_k + 1) * const_k
16871 : : )
16872 : : {
16873 : 8944 : if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k
16874 : : )
16875 : : {
16876 : 0 : gimple_seq *lseq = seq;
16877 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2367;
16878 : 0 : {
16879 : 0 : tree tem;
16880 : 0 : tem = build_zero_cst (type);
16881 : 0 : res_op->set_value (tem);
16882 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1136, __FILE__, __LINE__, true);
16883 : 0 : return true;
16884 : : }
16885 : 0 : next_after_fail2367:;
16886 : : }
16887 : : else
16888 : : {
16889 : 4472 : if (n == const_k
16890 : : )
16891 : : {
16892 : 0 : gimple_seq *lseq = seq;
16893 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2368;
16894 : 0 : {
16895 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
16896 : 0 : res_op->ops[0] = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
16897 : 0 : res_op->resimplify (lseq, valueize);
16898 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1137, __FILE__, __LINE__, true);
16899 : 0 : return true;
16900 : : }
16901 : 0 : next_after_fail2368:;
16902 : : }
16903 : : else
16904 : : {
16905 : 4472 : gimple_seq *lseq = seq;
16906 : 4472 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2369;
16907 : 4472 : {
16908 : 4472 : res_op->set_op (BIT_FIELD_REF, type, 3);
16909 : 4472 : res_op->ops[0] = CONSTRUCTOR_ELT (ctor, idx / const_k)->value;
16910 : 4472 : res_op->ops[1] = captures[1];
16911 : 4472 : res_op->ops[2] = bitsize_int ((idx % const_k) * width);
16912 : 4472 : res_op->resimplify (lseq, valueize);
16913 : 4472 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1138, __FILE__, __LINE__, true);
16914 : 4472 : return true;
16915 : : }
16916 : 0 : next_after_fail2369:;
16917 : : }
16918 : : }
16919 : : }
16920 : : }
16921 : : }
16922 : : }
16923 : : }
16924 : : }
16925 : : }
16926 : 4801 : break;
16927 : : }
16928 : 1379 : case BIT_INSERT_EXPR:
16929 : 1379 : {
16930 : 1379 : tree _q20 = gimple_assign_rhs1 (_a1);
16931 : 1379 : _q20 = do_valueize (valueize, _q20);
16932 : 1379 : tree _q21 = gimple_assign_rhs2 (_a1);
16933 : 1379 : _q21 = do_valueize (valueize, _q21);
16934 : 1379 : tree _q22 = gimple_assign_rhs3 (_a1);
16935 : 1379 : _q22 = do_valueize (valueize, _q22);
16936 : 1379 : {
16937 : 1379 : tree captures[5] ATTRIBUTE_UNUSED = { _q20, _q21, _q22, _p1, _p2 };
16938 : 1379 : {
16939 : 1379 : unsigned HOST_WIDE_INT isize;
16940 : 1379 : if (INTEGRAL_TYPE_P (TREE_TYPE (captures[1])))
16941 : 1283 : isize = TYPE_PRECISION (TREE_TYPE (captures[1]));
16942 : : else
16943 : 96 : isize = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (captures[1])));
16944 : 2758 : if ((!INTEGRAL_TYPE_P (TREE_TYPE (captures[1]))
16945 : 1283 : || type_has_mode_precision_p (TREE_TYPE (captures[1])))
16946 : 1346 : && wi::leu_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
16947 : 3149 : && wi::leu_p (wi::to_wide (captures[4]) + wi::to_wide (captures[3]),
16948 : 2043 : wi::to_wide (captures[2]) + isize)
16949 : : )
16950 : : {
16951 : 273 : gimple_seq *lseq = seq;
16952 : 273 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2370;
16953 : 273 : {
16954 : 273 : res_op->set_op (BIT_FIELD_REF, type, 3);
16955 : 273 : res_op->ops[0] = captures[1];
16956 : 273 : res_op->ops[1] = captures[3];
16957 : 273 : res_op->ops[2] = wide_int_to_tree (bitsizetype,
16958 : 273 : wi::to_wide (captures[4])
16959 : 546 : - wi::to_wide (captures[2]));
16960 : 273 : res_op->resimplify (lseq, valueize);
16961 : 273 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1139, __FILE__, __LINE__, true);
16962 : 1341 : return true;
16963 : : }
16964 : 0 : next_after_fail2370:;
16965 : : }
16966 : : else
16967 : : {
16968 : 1106 : if (wi::eq_p (wi::to_wide (captures[2]), wi::to_wide (captures[4]))
16969 : 1106 : && compare_tree_int (captures[3], isize) == 0
16970 : : )
16971 : : {
16972 : 5 : gimple_seq *lseq = seq;
16973 : 5 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2371;
16974 : 5 : {
16975 : 5 : res_op->set_op (NOP_EXPR, type, 1);
16976 : 5 : res_op->ops[0] = captures[1];
16977 : 5 : res_op->resimplify (lseq, valueize);
16978 : 5 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1140, __FILE__, __LINE__, true);
16979 : 5 : return true;
16980 : : }
16981 : 0 : next_after_fail2371:;
16982 : : }
16983 : : else
16984 : : {
16985 : 1101 : if (wi::geu_p (wi::to_wide (captures[2]),
16986 : 2202 : wi::to_wide (captures[4]) + wi::to_wide (captures[3]))
16987 : 1218 : || wi::geu_p (wi::to_wide (captures[4]),
16988 : 1218 : wi::to_wide (captures[2]) + isize)
16989 : : )
16990 : : {
16991 : 1063 : gimple_seq *lseq = seq;
16992 : 1063 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2372;
16993 : 1063 : {
16994 : 1063 : res_op->set_op (BIT_FIELD_REF, type, 3);
16995 : 1063 : res_op->ops[0] = captures[0];
16996 : 1063 : res_op->ops[1] = captures[3];
16997 : 1063 : res_op->ops[2] = captures[4];
16998 : 1063 : res_op->resimplify (lseq, valueize);
16999 : 1063 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1141, __FILE__, __LINE__, true);
17000 : 1063 : return true;
17001 : : }
17002 : 0 : next_after_fail2372:;
17003 : : }
17004 : : }
17005 : : }
17006 : : }
17007 : : }
17008 : 38 : break;
17009 : : }
17010 : : default:;
17011 : : }
17012 : : }
17013 : : break;
17014 : : default:;
17015 : : }
17016 : : return false;
17017 : : }
17018 : :
17019 : : bool
17020 : 16627 : gimple_simplify_CFN_FMA (gimple_match_op *res_op, gimple_seq *seq,
17021 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17022 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
17023 : : {
17024 : 16627 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
17025 : 16627 : switch (TREE_CODE (_p0))
17026 : : {
17027 : 16599 : case SSA_NAME:
17028 : 16599 : if (gimple *_d1 = get_def (valueize, _p0))
17029 : : {
17030 : 15887 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17031 : 24670 : switch (gimple_assign_rhs_code (_a1))
17032 : : {
17033 : 1290 : case NEGATE_EXPR:
17034 : 1290 : {
17035 : 1290 : tree _q20 = gimple_assign_rhs1 (_a1);
17036 : 1290 : _q20 = do_valueize (valueize, _q20);
17037 : 1290 : {
17038 : 1290 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
17039 : 1290 : if (gimple_simplify_619 (res_op, seq, valueize, type, captures, CFN_FMA))
17040 : 1290 : return true;
17041 : : }
17042 : 0 : switch (TREE_CODE (_p2))
17043 : : {
17044 : 0 : case SSA_NAME:
17045 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
17046 : : {
17047 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17048 : 0 : switch (gimple_assign_rhs_code (_a2))
17049 : : {
17050 : 0 : case NEGATE_EXPR:
17051 : 0 : {
17052 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
17053 : 0 : _q50 = do_valueize (valueize, _q50);
17054 : 0 : {
17055 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
17056 : 0 : if (gimple_simplify_620 (res_op, seq, valueize, type, captures, CFN_FMA))
17057 : 0 : return true;
17058 : : }
17059 : 0 : break;
17060 : : }
17061 : : default:;
17062 : : }
17063 : : }
17064 : : break;
17065 : : default:;
17066 : : }
17067 : : break;
17068 : : }
17069 : : default:;
17070 : : }
17071 : : }
17072 : : break;
17073 : 15337 : default:;
17074 : : }
17075 : 15337 : switch (TREE_CODE (_p1))
17076 : : {
17077 : 15163 : case SSA_NAME:
17078 : 15163 : if (gimple *_d1 = get_def (valueize, _p1))
17079 : : {
17080 : 14545 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17081 : 18004 : switch (gimple_assign_rhs_code (_a1))
17082 : : {
17083 : 2053 : case NEGATE_EXPR:
17084 : 2053 : {
17085 : 2053 : tree _q30 = gimple_assign_rhs1 (_a1);
17086 : 2053 : _q30 = do_valueize (valueize, _q30);
17087 : 2053 : {
17088 : 2053 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
17089 : 2053 : if (gimple_simplify_619 (res_op, seq, valueize, type, captures, CFN_FMA))
17090 : 2053 : return true;
17091 : : }
17092 : 0 : break;
17093 : : }
17094 : : default:;
17095 : : }
17096 : : }
17097 : : break;
17098 : 13284 : default:;
17099 : : }
17100 : 13284 : switch (TREE_CODE (_p2))
17101 : : {
17102 : 13232 : case SSA_NAME:
17103 : 13232 : if (gimple *_d1 = get_def (valueize, _p2))
17104 : : {
17105 : 12577 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17106 : 9937 : switch (gimple_assign_rhs_code (_a1))
17107 : : {
17108 : 2217 : case NEGATE_EXPR:
17109 : 2217 : {
17110 : 2217 : tree _q40 = gimple_assign_rhs1 (_a1);
17111 : 2217 : _q40 = do_valueize (valueize, _q40);
17112 : 2217 : {
17113 : 2217 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
17114 : 2217 : if (gimple_simplify_621 (res_op, seq, valueize, type, captures, CFN_FMA))
17115 : 2217 : return true;
17116 : : }
17117 : 0 : break;
17118 : : }
17119 : : default:;
17120 : : }
17121 : : }
17122 : : break;
17123 : 11067 : default:;
17124 : : }
17125 : 11067 : switch (TREE_CODE (_p1))
17126 : : {
17127 : 10909 : case SSA_NAME:
17128 : 10909 : if (gimple *_d1 = get_def (valueize, _p1))
17129 : : {
17130 : 10304 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17131 : 14547 : switch (gimple_assign_rhs_code (_a1))
17132 : : {
17133 : 0 : case NEGATE_EXPR:
17134 : 0 : {
17135 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
17136 : 0 : _q30 = do_valueize (valueize, _q30);
17137 : 0 : switch (TREE_CODE (_p2))
17138 : : {
17139 : 0 : case SSA_NAME:
17140 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
17141 : : {
17142 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17143 : 0 : switch (gimple_assign_rhs_code (_a2))
17144 : : {
17145 : 0 : case NEGATE_EXPR:
17146 : 0 : {
17147 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
17148 : 0 : _q50 = do_valueize (valueize, _q50);
17149 : 0 : {
17150 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
17151 : 0 : if (gimple_simplify_620 (res_op, seq, valueize, type, captures, CFN_FMA))
17152 : 0 : return true;
17153 : : }
17154 : 0 : break;
17155 : : }
17156 : : default:;
17157 : : }
17158 : : }
17159 : : break;
17160 : : default:;
17161 : : }
17162 : : break;
17163 : : }
17164 : : default:;
17165 : : }
17166 : : }
17167 : : break;
17168 : : default:;
17169 : : }
17170 : : return false;
17171 : : }
17172 : :
17173 : : bool
17174 : 1288 : gimple_simplify_CFN_FNMS (gimple_match_op *res_op, gimple_seq *seq,
17175 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17176 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2)
17177 : : {
17178 : 1288 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
17179 : 1288 : switch (TREE_CODE (_p0))
17180 : : {
17181 : 1288 : case SSA_NAME:
17182 : 1288 : if (gimple *_d1 = get_def (valueize, _p0))
17183 : : {
17184 : 1262 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17185 : 2075 : switch (gimple_assign_rhs_code (_a1))
17186 : : {
17187 : 16 : case NEGATE_EXPR:
17188 : 16 : {
17189 : 16 : tree _q20 = gimple_assign_rhs1 (_a1);
17190 : 16 : _q20 = do_valueize (valueize, _q20);
17191 : 16 : {
17192 : 16 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _p2 };
17193 : 16 : if (gimple_simplify_626 (res_op, seq, valueize, type, captures))
17194 : 16 : return true;
17195 : : }
17196 : 0 : switch (TREE_CODE (_p2))
17197 : : {
17198 : 0 : case SSA_NAME:
17199 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
17200 : : {
17201 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17202 : 0 : switch (gimple_assign_rhs_code (_a2))
17203 : : {
17204 : 0 : case NEGATE_EXPR:
17205 : 0 : {
17206 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
17207 : 0 : _q50 = do_valueize (valueize, _q50);
17208 : 0 : {
17209 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q20, _p1, _q50 };
17210 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures))
17211 : 0 : return true;
17212 : : }
17213 : 0 : break;
17214 : : }
17215 : : default:;
17216 : : }
17217 : : }
17218 : : break;
17219 : : default:;
17220 : : }
17221 : : break;
17222 : : }
17223 : : default:;
17224 : : }
17225 : : }
17226 : : break;
17227 : 1272 : default:;
17228 : : }
17229 : 1272 : switch (TREE_CODE (_p1))
17230 : : {
17231 : 1272 : case SSA_NAME:
17232 : 1272 : if (gimple *_d1 = get_def (valueize, _p1))
17233 : : {
17234 : 1259 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17235 : 2086 : switch (gimple_assign_rhs_code (_a1))
17236 : : {
17237 : 0 : case NEGATE_EXPR:
17238 : 0 : {
17239 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
17240 : 0 : _q30 = do_valueize (valueize, _q30);
17241 : 0 : {
17242 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _p2 };
17243 : 0 : if (gimple_simplify_626 (res_op, seq, valueize, type, captures))
17244 : 0 : return true;
17245 : : }
17246 : 0 : break;
17247 : : }
17248 : : default:;
17249 : : }
17250 : : }
17251 : : break;
17252 : 1272 : default:;
17253 : : }
17254 : 1272 : switch (TREE_CODE (_p2))
17255 : : {
17256 : 1272 : case SSA_NAME:
17257 : 1272 : if (gimple *_d1 = get_def (valueize, _p2))
17258 : : {
17259 : 1259 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17260 : 2053 : switch (gimple_assign_rhs_code (_a1))
17261 : : {
17262 : 8 : case NEGATE_EXPR:
17263 : 8 : {
17264 : 8 : tree _q40 = gimple_assign_rhs1 (_a1);
17265 : 8 : _q40 = do_valueize (valueize, _q40);
17266 : 8 : {
17267 : 8 : tree captures[3] ATTRIBUTE_UNUSED = { _p0, _p1, _q40 };
17268 : 8 : if (canonicalize_math_after_vectorization_p ()
17269 : : )
17270 : : {
17271 : 8 : gimple_seq *lseq = seq;
17272 : 8 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2376;
17273 : 8 : {
17274 : 8 : res_op->set_op (CFN_FNMA, type, 3);
17275 : 8 : res_op->ops[0] = captures[0];
17276 : 8 : res_op->ops[1] = captures[1];
17277 : 8 : res_op->ops[2] = captures[2];
17278 : 8 : res_op->resimplify (lseq, valueize);
17279 : 8 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1145, __FILE__, __LINE__, true);
17280 : 8 : return true;
17281 : : }
17282 : 0 : next_after_fail2376:;
17283 : : }
17284 : : }
17285 : 0 : break;
17286 : : }
17287 : : default:;
17288 : : }
17289 : : }
17290 : : break;
17291 : 1264 : default:;
17292 : : }
17293 : 1264 : switch (TREE_CODE (_p1))
17294 : : {
17295 : 1264 : case SSA_NAME:
17296 : 1264 : if (gimple *_d1 = get_def (valueize, _p1))
17297 : : {
17298 : 1251 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17299 : 2086 : switch (gimple_assign_rhs_code (_a1))
17300 : : {
17301 : 0 : case NEGATE_EXPR:
17302 : 0 : {
17303 : 0 : tree _q30 = gimple_assign_rhs1 (_a1);
17304 : 0 : _q30 = do_valueize (valueize, _q30);
17305 : 0 : switch (TREE_CODE (_p2))
17306 : : {
17307 : 0 : case SSA_NAME:
17308 : 0 : if (gimple *_d2 = get_def (valueize, _p2))
17309 : : {
17310 : 0 : if (gassign *_a2 = dyn_cast <gassign *> (_d2))
17311 : 0 : switch (gimple_assign_rhs_code (_a2))
17312 : : {
17313 : 0 : case NEGATE_EXPR:
17314 : 0 : {
17315 : 0 : tree _q50 = gimple_assign_rhs1 (_a2);
17316 : 0 : _q50 = do_valueize (valueize, _q50);
17317 : 0 : {
17318 : 0 : tree captures[3] ATTRIBUTE_UNUSED = { _q30, _p0, _q50 };
17319 : 0 : if (gimple_simplify_627 (res_op, seq, valueize, type, captures))
17320 : 0 : return true;
17321 : : }
17322 : 0 : break;
17323 : : }
17324 : : default:;
17325 : : }
17326 : : }
17327 : : break;
17328 : : default:;
17329 : : }
17330 : : break;
17331 : : }
17332 : : default:;
17333 : : }
17334 : : }
17335 : : break;
17336 : : default:;
17337 : : }
17338 : : return false;
17339 : : }
17340 : :
17341 : : bool
17342 : 6385261 : gimple_simplify (gimple_match_op *res_op, gimple_seq *seq,
17343 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17344 : : code_helper code, const tree type, tree _p0, tree _p1, tree _p2)
17345 : : {
17346 : 6385261 : switch (code.get_rep())
17347 : : {
17348 : 1059199 : case COND_EXPR:
17349 : 1059199 : return gimple_simplify_COND_EXPR (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17350 : 151038 : case VEC_COND_EXPR:
17351 : 151038 : return gimple_simplify_VEC_COND_EXPR (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17352 : 1583713 : case BIT_FIELD_REF:
17353 : 1583713 : return gimple_simplify_BIT_FIELD_REF (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17354 : 11905 : case BIT_INSERT_EXPR:
17355 : 11905 : return gimple_simplify_BIT_INSERT_EXPR (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17356 : 2629 : case -CFN_BUILT_IN_FMAF:
17357 : 2629 : return gimple_simplify_CFN_BUILT_IN_FMAF (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17358 : 2896 : case -CFN_BUILT_IN_FMA:
17359 : 2896 : return gimple_simplify_CFN_BUILT_IN_FMA (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17360 : 1082 : case -CFN_BUILT_IN_FMAL:
17361 : 1082 : return gimple_simplify_CFN_BUILT_IN_FMAL (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17362 : 16627 : case -CFN_FMA:
17363 : 16627 : return gimple_simplify_CFN_FMA (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17364 : 2713 : case -CFN_FMS:
17365 : 2713 : return gimple_simplify_CFN_FMS (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17366 : 3895 : case -CFN_FNMA:
17367 : 3895 : return gimple_simplify_CFN_FNMA (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17368 : 1288 : case -CFN_FNMS:
17369 : 1288 : return gimple_simplify_CFN_FNMS (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17370 : 0 : case -CFN_VCOND_MASK_LEN:
17371 : 0 : return gimple_simplify_CFN_VCOND_MASK_LEN (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17372 : 607478 : case VEC_PERM_EXPR:
17373 : 607478 : return gimple_simplify_VEC_PERM_EXPR (res_op, seq, valueize, code, type, _p0, _p1, _p2);
17374 : : default:;
17375 : : }
17376 : : return false;
17377 : : }
17378 : :
17379 : : bool
17380 : 1059 : gimple_simplify_CFN_COND_MUL (gimple_match_op *res_op, gimple_seq *seq,
17381 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17382 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2, tree _p3)
17383 : : {
17384 : 1059 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
17385 : 1059 : switch (TREE_CODE (_p2))
17386 : : {
17387 : 1026 : case SSA_NAME:
17388 : 1026 : if (gimple *_d1 = get_def (valueize, _p2))
17389 : : {
17390 : 444 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17391 : 24 : switch (gimple_call_combined_fn (_c1))
17392 : : {
17393 : 0 : case CFN_COPYSIGN:
17394 : 0 : if (gimple_call_num_args (_c1) == 2)
17395 : : {
17396 : 0 : tree _q40 = gimple_call_arg (_c1, 0);
17397 : 0 : _q40 = do_valueize (valueize, _q40);
17398 : 0 : tree _q41 = gimple_call_arg (_c1, 1);
17399 : 0 : _q41 = do_valueize (valueize, _q41);
17400 : 0 : if (real_onep (_q40))
17401 : : {
17402 : 0 : {
17403 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p1, _q41, _p3 };
17404 : 0 : {
17405 : 0 : tree signs = sign_mask_for (type);
17406 : 0 : if (signs
17407 : : )
17408 : : {
17409 : 0 : {
17410 : 0 : tree inttype = TREE_TYPE (signs);
17411 : 0 : gimple_seq *lseq = seq;
17412 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2389;
17413 : 0 : {
17414 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
17415 : 0 : {
17416 : 0 : tree _o1[4], _r1;
17417 : 0 : _o1[0] = captures[0];
17418 : 0 : {
17419 : 0 : tree _o2[1], _r2;
17420 : 0 : _o2[0] = captures[1];
17421 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o2[0]);
17422 : 0 : tem_op.resimplify (lseq, valueize);
17423 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17424 : 0 : if (!_r2) goto next_after_fail2389;
17425 : 0 : _o1[1] = _r2;
17426 : : }
17427 : 0 : {
17428 : 0 : tree _o2[2], _r2;
17429 : 0 : {
17430 : 0 : tree _o3[1], _r3;
17431 : 0 : _o3[0] = captures[2];
17432 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o3[0]);
17433 : 0 : tem_op.resimplify (lseq, valueize);
17434 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
17435 : 0 : if (!_r3) goto next_after_fail2389;
17436 : 0 : _o2[0] = _r3;
17437 : : }
17438 : 0 : _o2[1] = signs;
17439 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
17440 : 0 : tem_op.resimplify (lseq, valueize);
17441 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17442 : 0 : if (!_r2) goto next_after_fail2389;
17443 : 0 : _o1[2] = _r2;
17444 : : }
17445 : 0 : {
17446 : 0 : tree _o2[1], _r2;
17447 : 0 : _o2[0] = captures[3];
17448 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o2[0]);
17449 : 0 : tem_op.resimplify (lseq, valueize);
17450 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17451 : 0 : if (!_r2) goto next_after_fail2389;
17452 : 0 : _o1[3] = _r2;
17453 : : }
17454 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_COND_XOR, inttype, _o1[0], _o1[1], _o1[2], _o1[3]);
17455 : 0 : tem_op.resimplify (lseq, valueize);
17456 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17457 : 0 : if (!_r1) goto next_after_fail2389;
17458 : 0 : res_op->ops[0] = _r1;
17459 : : }
17460 : 0 : res_op->resimplify (lseq, valueize);
17461 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1158, __FILE__, __LINE__, true);
17462 : 0 : return true;
17463 : : }
17464 : 0 : next_after_fail2389:;
17465 : : }
17466 : : }
17467 : : }
17468 : : }
17469 : : }
17470 : : }
17471 : : break;
17472 : : default:;
17473 : : }
17474 : : }
17475 : : break;
17476 : 1059 : default:;
17477 : : }
17478 : 1059 : switch (TREE_CODE (_p1))
17479 : : {
17480 : 1059 : case SSA_NAME:
17481 : 1059 : if (gimple *_d1 = get_def (valueize, _p1))
17482 : : {
17483 : 466 : if (gcall *_c1 = dyn_cast <gcall *> (_d1))
17484 : 28 : switch (gimple_call_combined_fn (_c1))
17485 : : {
17486 : 0 : case CFN_COPYSIGN:
17487 : 0 : if (gimple_call_num_args (_c1) == 2)
17488 : : {
17489 : 0 : tree _q30 = gimple_call_arg (_c1, 0);
17490 : 0 : _q30 = do_valueize (valueize, _q30);
17491 : 0 : tree _q31 = gimple_call_arg (_c1, 1);
17492 : 0 : _q31 = do_valueize (valueize, _q31);
17493 : 0 : if (real_onep (_q30))
17494 : : {
17495 : 0 : {
17496 : 0 : tree captures[4] ATTRIBUTE_UNUSED = { _p0, _p2, _q31, _p3 };
17497 : 0 : {
17498 : 0 : tree signs = sign_mask_for (type);
17499 : 0 : if (signs
17500 : : )
17501 : : {
17502 : 0 : {
17503 : 0 : tree inttype = TREE_TYPE (signs);
17504 : 0 : gimple_seq *lseq = seq;
17505 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2390;
17506 : 0 : {
17507 : 0 : res_op->set_op (VIEW_CONVERT_EXPR, type, 1);
17508 : 0 : {
17509 : 0 : tree _o1[4], _r1;
17510 : 0 : _o1[0] = captures[0];
17511 : 0 : {
17512 : 0 : tree _o2[1], _r2;
17513 : 0 : _o2[0] = captures[1];
17514 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o2[0]);
17515 : 0 : tem_op.resimplify (lseq, valueize);
17516 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17517 : 0 : if (!_r2) goto next_after_fail2390;
17518 : 0 : _o1[1] = _r2;
17519 : : }
17520 : 0 : {
17521 : 0 : tree _o2[2], _r2;
17522 : 0 : {
17523 : 0 : tree _o3[1], _r3;
17524 : 0 : _o3[0] = captures[2];
17525 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o3[0]);
17526 : 0 : tem_op.resimplify (lseq, valueize);
17527 : 0 : _r3 = maybe_push_res_to_seq (&tem_op, lseq);
17528 : 0 : if (!_r3) goto next_after_fail2390;
17529 : 0 : _o2[0] = _r3;
17530 : : }
17531 : 0 : _o2[1] = signs;
17532 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), BIT_AND_EXPR, TREE_TYPE (_o2[0]), _o2[0], _o2[1]);
17533 : 0 : tem_op.resimplify (lseq, valueize);
17534 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17535 : 0 : if (!_r2) goto next_after_fail2390;
17536 : 0 : _o1[2] = _r2;
17537 : : }
17538 : 0 : {
17539 : 0 : tree _o2[1], _r2;
17540 : 0 : _o2[0] = captures[3];
17541 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), VIEW_CONVERT_EXPR, inttype, _o2[0]);
17542 : 0 : tem_op.resimplify (lseq, valueize);
17543 : 0 : _r2 = maybe_push_res_to_seq (&tem_op, lseq);
17544 : 0 : if (!_r2) goto next_after_fail2390;
17545 : 0 : _o1[3] = _r2;
17546 : : }
17547 : 0 : gimple_match_op tem_op (res_op->cond.any_else (), CFN_COND_XOR, inttype, _o1[0], _o1[1], _o1[2], _o1[3]);
17548 : 0 : tem_op.resimplify (lseq, valueize);
17549 : 0 : _r1 = maybe_push_res_to_seq (&tem_op, lseq);
17550 : 0 : if (!_r1) goto next_after_fail2390;
17551 : 0 : res_op->ops[0] = _r1;
17552 : : }
17553 : 0 : res_op->resimplify (lseq, valueize);
17554 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1158, __FILE__, __LINE__, true);
17555 : 0 : return true;
17556 : : }
17557 : 0 : next_after_fail2390:;
17558 : : }
17559 : : }
17560 : : }
17561 : : }
17562 : : }
17563 : : }
17564 : : break;
17565 : : default:;
17566 : : }
17567 : : }
17568 : : break;
17569 : : default:;
17570 : : }
17571 : : return false;
17572 : : }
17573 : :
17574 : : bool
17575 : 24570 : gimple_simplify (gimple_match_op *res_op, gimple_seq *seq,
17576 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17577 : : code_helper code, const tree type, tree _p0, tree _p1, tree _p2, tree _p3, tree _p4)
17578 : : {
17579 : 24570 : switch (code.get_rep())
17580 : : {
17581 : 0 : case -CFN_VCOND_MASK_LEN:
17582 : 0 : return gimple_simplify_CFN_VCOND_MASK_LEN (res_op, seq, valueize, code, type, _p0, _p1, _p2, _p3, _p4);
17583 : : default:;
17584 : : }
17585 : : return false;
17586 : : }
17587 : :
17588 : : bool
17589 : 0 : gimple_simplify_CFN_COND_LEN_ADD (gimple_match_op *res_op, gimple_seq *seq,
17590 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17591 : : code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0, tree _p1, tree _p2, tree _p3, tree _p4, tree _p5)
17592 : : {
17593 : 0 : const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING);
17594 : 0 : if (integer_truep (_p0))
17595 : : {
17596 : 0 : switch (TREE_CODE (_p2))
17597 : : {
17598 : 0 : case SSA_NAME:
17599 : 0 : if (gimple *_d1 = get_def (valueize, _p2))
17600 : : {
17601 : 0 : if (gassign *_a1 = dyn_cast <gassign *> (_d1))
17602 : 0 : switch (gimple_assign_rhs_code (_a1))
17603 : : {
17604 : 0 : case VEC_COND_EXPR:
17605 : 0 : {
17606 : 0 : tree _q40 = gimple_assign_rhs1 (_a1);
17607 : 0 : _q40 = do_valueize (valueize, _q40);
17608 : 0 : tree _q41 = gimple_assign_rhs2 (_a1);
17609 : 0 : _q41 = do_valueize (valueize, _q41);
17610 : 0 : tree _q42 = gimple_assign_rhs3 (_a1);
17611 : 0 : _q42 = do_valueize (valueize, _q42);
17612 : 0 : if (zerop (_q42))
17613 : : {
17614 : 0 : if ((_p3 == _p1 && ! TREE_SIDE_EFFECTS (_p3)) || (operand_equal_p (_p3, _p1, 0) && types_match (_p3, _p1)))
17615 : : {
17616 : 0 : {
17617 : 0 : tree captures[6] ATTRIBUTE_UNUSED = { _p1, _q40, _q41, _q42, _p4, _p5 };
17618 : 0 : if (ANY_INTEGRAL_TYPE_P (type)
17619 : 0 : || (FLOAT_TYPE_P (type)
17620 : 0 : && fold_real_zero_addition_p (type, NULL_TREE, captures[3], 0))
17621 : : )
17622 : : {
17623 : 0 : gimple_seq *lseq = seq;
17624 : 0 : if (UNLIKELY (!dbg_cnt (match))) goto next_after_fail2464;
17625 : 0 : {
17626 : 0 : res_op->set_op (CFN_COND_LEN_ADD, type, 6);
17627 : 0 : res_op->ops[0] = captures[1];
17628 : 0 : res_op->ops[1] = captures[0];
17629 : 0 : res_op->ops[2] = captures[2];
17630 : 0 : res_op->ops[3] = captures[0];
17631 : 0 : res_op->ops[4] = captures[4];
17632 : 0 : res_op->ops[5] = captures[5];
17633 : 0 : res_op->resimplify (lseq, valueize);
17634 : 0 : if (UNLIKELY (debug_dump)) gimple_dump_logs ("match.pd", 1164, __FILE__, __LINE__, true);
17635 : 0 : return true;
17636 : : }
17637 : 0 : next_after_fail2464:;
17638 : : }
17639 : : }
17640 : : }
17641 : : }
17642 : : break;
17643 : : }
17644 : : default:;
17645 : : }
17646 : : }
17647 : : break;
17648 : : default:;
17649 : : }
17650 : : }
17651 : : return false;
17652 : : }
17653 : :
17654 : : bool
17655 : 580676 : gimple_simplify (gimple_match_op *res_op, gimple_seq *seq,
17656 : : tree (*valueize)(tree) ATTRIBUTE_UNUSED,
17657 : : code_helper code, const tree type, tree _p0, tree _p1, tree _p2, tree _p3, tree _p4, tree _p5)
17658 : : {
17659 : 580676 : switch (code.get_rep())
17660 : : {
17661 : 0 : case -CFN_COND_LEN_ADD:
17662 : 0 : return gimple_simplify_CFN_COND_LEN_ADD (res_op, seq, valueize, code, type, _p0, _p1, _p2, _p3, _p4, _p5);
17663 : : default:;
17664 : : }
17665 : : return false;
17666 : : }
17667 : :
17668 : : bool
17669 : 78326 : gimple_simplify (gimple_match_op*, gimple_seq*,
17670 : : tree (*)(tree), code_helper,
17671 : : const tree, tree, tree, tree, tree, tree, tree, tree)
17672 : : {
17673 : 78326 : return false;
17674 : : }
17675 : : void
17676 : 1830 : gimple_dump_logs (const char *file1, int line1_id, const char *file2, int line2, bool simplify)
17677 : : {
17678 : 1830 : static int dbg_line_numbers[1165] = {
17679 : : 160, 163, 173, 175, 179, 181, 187, 899, 897, 2019, 2030, 2011, 2017, 2022, 2027, 2243, 2247, 2249, 2251, 2253,
17680 : : 2255, 2257, 2259, 2286, 2302, 2310, 2292, 2833, 2835, 2840, 2838, 2847, 2845, 3027, 3037, 4969, 5209, 5220, 5198, 5227,
17681 : : 5259, 5234, 5246, 5266, 7971, 7992, 8016, 9964, 9967, 9972, 10185, 10188, 10209, 10214, 7804, 210, 1261, 1265, 1391, 1406,
17682 : : 1411, 1506, 1511, 1604, 1870, 1876, 1728, 1818, 1738, 1882, 1748, 1753, 1761, 1928, 1889, 1895, 2472, 1902, 1916, 1962,
17683 : : 2157, 2224, 2235, 2238, 2270, 2896, 2898, 3956, 3967, 3973, 3989, 4001, 4229, 6099, 6101, 6150, 6158, 9047, 9053, 9449,
17684 : : 9451, 236, 263, 264, 458, 1255, 3925, 1687, 1692, 1711, 1766, 1829, 3494, 3432, 3537, 3538, 3542, 3543, 3553, 3557,
17685 : : 3561, 3576, 3579, 3583, 3509, 3512, 3517, 3650, 3664, 3670, 3676, 3858, 3859, 3885, 3904, 4217, 4891, 6030, 7510, 8902,
17686 : : 8950, 8964, 9991, 10302, 881, 887, 1371, 1380, 1847, 1838, 1785, 2498, 3445, 3485, 3490, 3491, 3499, 3500, 3503, 3520,
17687 : : 3595, 3598, 3602, 3684, 3706, 3744, 3755, 3794, 3809, 4223, 6040, 8960, 9995, 1357, 1366, 1396, 1401, 1443, 1428, 1435,
17688 : : 1469, 1924, 1474, 1481, 1501, 1718, 1628, 1723, 1733, 1743, 1857, 1944, 1954, 1956, 2176, 2184, 2189, 2194, 2210, 2200,
17689 : : 2201, 2338, 2365, 2367, 2372, 2374, 2491, 2353, 2383, 3083, 3098, 3116, 3299, 3300, 3301, 3306, 3311, 3317, 3323, 3355,
17690 : : 3356, 3361, 3362, 3367, 3372, 3376, 3088, 3107, 3109, 3093, 6681, 8368, 412, 420, 426, 432, 464, 1200, 1220, 1225,
17691 : : 2003, 2004, 2041, 2507, 4884, 4913, 4915, 4964, 7503, 7839, 7833, 7878, 7883, 294, 849, 2275, 2486, 2525, 2535, 2574,
17692 : : 2580, 2583, 2588, 2753, 2604, 2606, 2607, 2610, 2612, 2613, 2615, 2617, 2619, 2621, 2623, 2625, 2639, 2640, 2674, 2759,
17693 : : 2784, 2700, 2727, 2767, 2772, 2797, 2804, 2855, 3397, 4169, 4177, 4180, 4186, 4189, 4431, 4432, 4472, 4476, 4605, 4439,
17694 : : 4440, 4490, 4493, 4494, 4499, 4502, 4505, 4506, 4446, 4458, 4461, 4650, 4654, 4659, 4897, 5029, 5033, 6110, 6126, 6128,
17695 : : 6140, 6170, 6176, 6177, 6192, 6193, 6197, 6215, 6220, 6246, 6254, 6264, 6273, 6277, 6283, 6290, 6306, 6310, 6314, 6321,
17696 : : 6322, 6327, 6328, 6335, 6336, 6338, 6339, 6355, 6366, 6378, 6382, 6384, 6389, 6392, 6395, 6403, 6465, 6466, 6470, 6471,
17697 : : 6478, 6482, 6486, 6489, 6495, 6496, 6500, 6503, 6510, 6530, 6533, 6536, 6539, 6588, 6591, 6595, 6602, 6608, 6616, 6625,
17698 : : 6626, 6724, 6734, 6773, 6779, 6795, 6808, 6810, 6812, 6838, 6880, 6859, 6860, 6867, 6869, 6885, 6891, 6896, 6905, 6911,
17699 : : 6917, 6922, 6927, 6959, 6941, 6951, 6972, 7036, 7074, 7076, 7078, 7080, 7082, 7084, 7088, 7090, 7112, 7135, 7247, 7254,
17700 : : 7255, 7263, 7264, 7427, 8412, 8414, 8712, 8715, 8729, 8738, 8783, 8784, 8838, 8840, 8910, 9319, 9321, 9323, 6106, 6117,
17701 : : 6119, 6227, 438, 1173, 1177, 1194, 7789, 7794, 7799, 497, 498, 509, 514, 521, 530, 538, 547, 593, 596, 784,
17702 : : 948, 955, 965, 970, 979, 987, 1012, 1033, 558, 814, 818, 823, 829, 833, 841, 924, 709, 719, 721, 723,
17703 : : 7844, 7866, 7849, 7854, 7859, 7873, 7894, 7899, 771, 774, 1579, 2548, 2551, 2648, 2660, 2742, 2686, 2713, 2825, 2828,
17704 : : 4207, 4199, 6064, 7357, 6638, 6641, 6667, 6668, 7160, 7162, 7164, 7166, 7170, 7172, 7174, 7176, 7180, 7185, 7192, 7197,
17705 : : 7217, 7219, 7221, 7223, 7370, 7378, 7388, 7396, 7406, 7524, 7526, 8425, 8444, 8768, 8770, 8771, 8819, 8822, 8824, 2564,
17706 : : 6054, 6711, 9340, 9342, 9344, 9346, 9350, 875, 906, 1245, 4311, 4355, 4358, 4366, 4380, 4406, 4408, 4409, 4410, 4617,
17707 : : 4336, 4345, 5083, 5086, 5087, 5095, 9275, 9293, 2168, 3408, 3413, 4115, 8042, 8056, 8072, 8083, 8251, 8253, 8284, 8319,
17708 : : 10246, 1137, 7737, 7758, 1146, 7664, 7665, 7784, 8198, 1160, 1164, 7779, 7949, 2048, 2086, 2109, 2110, 2436, 3470, 8659,
17709 : : 1339, 1423, 1455, 1416, 1448, 1463, 1496, 1537, 1548, 1559, 1571, 2395, 1643, 1800, 1808, 1813, 1936, 2265, 2513, 3023,
17710 : : 4576, 4594, 4595, 5054, 5060, 5108, 3053, 3055, 3065, 3067, 3172, 3173, 3174, 3179, 3184, 3190, 3196, 3228, 3229, 3234,
17711 : : 3235, 3240, 3245, 3249, 3073, 3078, 3123, 5424, 5433, 5434, 6684, 8354, 8356, 8945, 1486, 1491, 2451, 1659, 2456, 4628,
17712 : : 2431, 2462, 2466, 4642, 4158, 6091, 6093, 4008, 4012, 4022, 4040, 4098, 4100, 4102, 4104, 4153, 8376, 4026, 4033, 4018,
17713 : : 4125, 4134, 4137, 4235, 4247, 4266, 4273, 4279, 4285, 4291, 4259, 5414, 5567, 5569, 5571, 5671, 5674, 5698, 5699, 5702,
17714 : : 5703, 5707, 5708, 5712, 5713, 5717, 5718, 5722, 5723, 5790, 5792, 5806, 5810, 5513, 5514, 5751, 5755, 5763, 5770, 5775,
17715 : : 5843, 5849, 5858, 5859, 5866, 5919, 5924, 5971, 5974, 5932, 5937, 5981, 5984, 7019, 7021, 5947, 5948, 5992, 6989, 6990,
17716 : : 7004, 7005, 5962, 5963, 6004, 6005, 7050, 7055, 8385, 8386, 9107, 9115, 9143, 9155, 9182, 9194, 4298, 7456, 7459, 7478,
17717 : : 5005, 5017, 5020, 5024, 5318, 5735, 5744, 9514, 9521, 9549, 9555, 9563, 9569, 9578, 9584, 9592, 9598, 9644, 9652, 7279,
17718 : : 6235, 6231, 7437, 7444, 7628, 7700, 7717, 7749, 7769, 7774, 8012, 7989, 7968, 7810, 7814, 8092, 8102, 8109, 8118, 8136,
17719 : : 8143, 8124, 8391, 8397, 8649, 8655, 8652, 8663, 8669, 8677, 8683, 8691, 8697, 8884, 8886, 8888, 8925, 8940, 9003, 9005,
17720 : : 9007, 9206, 9209, 9014, 9028, 9041, 9096, 9098, 9100, 9307, 9394, 9396, 9398, 9532, 9539, 9725, 9739, 9821, 9822, 201,
17721 : : 1968, 1978, 5140, 1987, 1087, 2404, 3004, 4670, 4672, 4682, 4774, 4785, 4798, 4821, 4831, 4840, 4852, 4878, 5148, 5521,
17722 : : 1094, 1188, 2057, 2061, 2092, 2098, 3457, 6017, 3465, 8673, 8687, 8701, 1206, 1213, 7763, 7944, 1656, 1670, 1677, 1699,
17723 : : 1706, 2280, 2479, 1973, 1982, 1991, 4687, 4696, 4708, 4718, 4724, 5157, 4865, 4733, 4730, 4977, 4985, 4993, 4996, 4980,
17724 : : 4988, 4999, 5011, 7621, 7596, 7557, 7561, 7907, 7685, 7923, 7911, 7915, 7689, 7927, 7919, 7958, 8149, 8156, 8162, 9746,
17725 : : 219, 1612, 1617, 2444, 3388, 5175, 5186, 5195, 10261, 691, 3635, 3944, 4926, 4932, 4934, 2903, 224, 2924, 2928, 2940,
17726 : : 242, 279, 1375, 1665, 1773, 1780, 1790, 1795, 2067, 2948, 2960, 2954, 2966, 2078, 2669, 2694, 2721, 2705, 2732, 3718,
17727 : : 3690, 3765, 3774, 3817, 3828, 4939, 4950, 10227, 10228, 1584, 1589, 1650, 6674, 9703, 9707, 229, 282, 2678, 2973, 2980,
17728 : : 2987, 2993, 3727, 2998, 3783, 3831, 3840, 4942, 338, 286, 306, 315, 323, 397, 610, 650, 940, 1125, 1130, 1228,
17729 : : 1231, 1331, 2323, 4955, 7532, 7538, 7676, 7888, 2424, 6741, 7311, 7337, 7338, 2414, 7305, 1120, 931, 1064, 1069, 573,
17730 : : 576, 700, 729, 735, 741, 749, 754, 759, 802, 806, 7544, 7550, 7229, 860, 1286, 4327, 1275, 1278, 1310, 1321,
17731 : : 4304, 4350, 1101, 7931, 7693, 7939, 7935, 8176, 8179, 8182, 8187, 8193, 1107, 1153, 8205, 8208, 8211, 1112, 1115, 1345,
17732 : : 1518, 1594, 1622, 1636, 2215, 4417, 4418, 6678, 10234, 4047, 4051, 4079, 4080, 4146, 4058, 4062, 4070, 4071, 4387, 4974,
17733 : : 7287, 7289, 7296, 7298, 6239, 7819, 5126, 5128, 5362, 5367, 5373, 5374, 5380, 5385, 5390, 5396, 5398, 5405, 5822, 5825,
17734 : : 5828, 5831, 5872, 5875, 5884, 5888, 5893, 5898, 7102, 7103, 5285, 5289, 5293, 5297, 5132, 5134, 5325, 5329, 5333, 5337,
17735 : : 5347, 5349, 9419, 9425, 9479, 9486, 8450, 8456, 8461, 8470, 8472, 8492, 8537, 8540, 8541, 8573, 8579, 8581, 8582, 8604,
17736 : : 8609, 8614, 8642, 8666, 8680, 8694, 9845, 9847, 9882, 9956, 9959, 10042, 9979, 9985, 10111, 10113, 10175, 10177, 448, 9613,
17737 : : 9434, 9440, 9496, 9503, 9628
17738 : : };
17739 : :
17740 : 3223 : fprintf (dump_file, "%s %s:%d, %s:%d\n",
17741 : : simplify ? "Applying pattern" : "Matching expression", file1, dbg_line_numbers[line1_id], file2, line2);
17742 : 1830 : }
17743 : :
17744 : : #pragma GCC diagnostic pop
|