PR target/93254 - -msse generates sse2 instructions
[gcc.git] / gcc / ChangeLog
1 2020-01-14 Uroš Bizjak <ubizjak@gmail.com>
2
3 PR target/93254
4 * config/i386/i386.md (*movsf_internal): Require SSE2 ISA for
5 alternatives 9 and 10.
6
7 2020-01-14 David Malcolm <dmalcolm@redhat.com>
8
9 * attribs.c (excl_hash_traits::empty_zero_p): New static constant.
10 * gcov.c (function_start_pair_hash::empty_zero_p): Likewise.
11 * graphite.c (struct sese_scev_hash::empty_zero_p): Likewise.
12 * hash-map-tests.c (selftest::test_nonzero_empty_key): New selftest.
13 (selftest::hash_map_tests_c_tests): Call it.
14 * hash-map-traits.h (simple_hashmap_traits::empty_zero_p):
15 New static constant, using the value of = H::empty_zero_p.
16 (unbounded_hashmap_traits::empty_zero_p): Likewise, using the value
17 from default_hash_traits <Value>.
18 * hash-map.h (hash_map::empty_zero_p): Likewise, using the value
19 from Traits.
20 * hash-set-tests.c (value_hash_traits::empty_zero_p): Likewise.
21 * hash-table.h (hash_table::alloc_entries): Guard the loop of
22 calls to mark_empty with !Descriptor::empty_zero_p.
23 (hash_table::empty_slow): Conditionalize the memset call with a
24 check that Descriptor::empty_zero_p; otherwise, loop through the
25 entries calling mark_empty on them.
26 * hash-traits.h (int_hash::empty_zero_p): New static constant.
27 (pointer_hash::empty_zero_p): Likewise.
28 (pair_hash::empty_zero_p): Likewise.
29 * ipa-devirt.c (default_hash_traits <type_pair>::empty_zero_p):
30 Likewise.
31 * ipa-prop.c (ipa_bit_ggc_hash_traits::empty_zero_p): Likewise.
32 (ipa_vr_ggc_hash_traits::empty_zero_p): Likewise.
33 * profile.c (location_triplet_hash::empty_zero_p): Likewise.
34 * sanopt.c (sanopt_tree_triplet_hash::empty_zero_p): Likewise.
35 (sanopt_tree_couple_hash::empty_zero_p): Likewise.
36 * tree-hasher.h (int_tree_hasher::empty_zero_p): Likewise.
37 * tree-ssa-sccvn.c (vn_ssa_aux_hasher::empty_zero_p): Likewise.
38 * tree-vect-slp.c (bst_traits::empty_zero_p): Likewise.
39 * tree-vectorizer.h
40 (default_hash_traits<scalar_cond_masked_key>::empty_zero_p):
41 Likewise.
42
43 2020-01-14 Kewen Lin <linkw@gcc.gnu.org>
44
45 * cfgloopanal.c (average_num_loop_insns): Free bbs when early return,
46 fix typo on return value.
47
48 2020-01-14 Xiong Hu Luo <luoxhu@linux.ibm.com>
49
50 PR ipa/69678
51 * cgraph.c (symbol_table::create_edge): Init speculative_id and
52 target_prob.
53 (cgraph_edge::make_speculative): Add param for setting speculative_id
54 and target_prob.
55 (cgraph_edge::speculative_call_info): Update comments and find reference
56 by speculative_id for multiple indirect targets.
57 (cgraph_edge::resolve_speculation): Decrease the speculations
58 for indirect edge, drop it's speculative if not direct target
59 left. Update comments.
60 (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
61 (cgraph_node::dump): Print num_speculative_call_targets.
62 (cgraph_node::verify_node): Don't report error if speculative
63 edge not include statement.
64 (cgraph_edge::num_speculative_call_targets_p): New function.
65 * cgraph.h (int common_target_id): Remove.
66 (int common_target_probability): Remove.
67 (num_speculative_call_targets): New variable.
68 (make_speculative): Add param for setting speculative_id.
69 (cgraph_edge::num_speculative_call_targets_p): New declare.
70 (target_prob): New variable.
71 (speculative_id): New variable.
72 * ipa-fnsummary.c (analyze_function_body): Create and duplicate
73 call summaries for multiple speculative call targets.
74 * cgraphclones.c (cgraph_node::create_clone): Clone speculative_id.
75 * ipa-profile.c (struct speculative_call_target): New struct.
76 (class speculative_call_summary): New class.
77 (class speculative_call_summaries): New class.
78 (call_sums): New variable.
79 (ipa_profile_generate_summary): Generate indirect multiple targets summaries.
80 (ipa_profile_write_edge_summary): New function.
81 (ipa_profile_write_summary): Stream out indirect multiple targets summaries.
82 (ipa_profile_dump_all_summaries): New function.
83 (ipa_profile_read_edge_summary): New function.
84 (ipa_profile_read_summary_section): New function.
85 (ipa_profile_read_summary): Stream in indirect multiple targets summaries.
86 (ipa_profile): Generate num_speculative_call_targets from
87 profile summaries.
88 * ipa-ref.h (speculative_id): New variable.
89 * ipa-utils.c (ipa_merge_profiles): Update with target_prob.
90 * lto-cgraph.c (lto_output_edge): Remove indirect common_target_id and
91 common_target_probability. Stream out speculative_id and
92 num_speculative_call_targets.
93 (input_edge): Likewise.
94 * predict.c (dump_prediction): Remove edges count assert to be
95 precise.
96 * symtab.c (symtab_node::create_reference): Init speculative_id.
97 (symtab_node::clone_references): Clone speculative_id.
98 (symtab_node::clone_referring): Clone speculative_id.
99 (symtab_node::clone_reference): Clone speculative_id.
100 (symtab_node::clear_stmts_in_references): Clear speculative_id.
101 * tree-inline.c (copy_bb): Duplicate all the speculative edges
102 if indirect call contains multiple speculative targets.
103 * value-prof.h (check_ic_target): Remove.
104 * value-prof.c (gimple_value_profile_transformations):
105 Use void function gimple_ic_transform.
106 * value-prof.c (gimple_ic_transform): Handle topn case.
107 Fix comment typos. Change it to a void function.
108
109 2020-01-13 Andrew Pinski <apinski@marvell.com>
110
111 * config/aarch64/aarch64-cores.def (octeontx2): New define.
112 (octeontx2t98): New define.
113 (octeontx2t96): New define.
114 (octeontx2t93): New define.
115 (octeontx2f95): New define.
116 (octeontx2f95n): New define.
117 (octeontx2f95mm): New define.
118 * config/aarch64/aarch64-tune.md: Regenerate.
119 * doc/invoke.texi (-mcpu=): Document the new cpu types.
120
121 2020-01-13 Jason Merrill <jason@redhat.com>
122
123 PR c++/33799 - destroy return value if local cleanup throws.
124 * gimplify.c (gimplify_return_expr): Handle COMPOUND_EXPR.
125
126 2020-01-13 Martin Liska <mliska@suse.cz>
127
128 * ipa-cp.c (get_max_overall_size): Use newly
129 renamed param param_ipa_cp_unit_growth.
130 * params.opt: Remove legacy param name.
131
132 2020-01-13 Martin Sebor <msebor@redhat.com>
133
134 PR tree-optimization/93213
135 * tree-ssa-strlen.c (handle_store): Only allow single-byte nul-over-nul
136 stores to be eliminated.
137
138 2020-01-13 Martin Liska <mliska@suse.cz>
139
140 * opts.c (print_help): Do not print CL_PARAM
141 and CL_WARNING for CL_OPTIMIZATION.
142
143 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
144
145 PR driver/92757
146 * doc/invoke.texi (Warning Options): Add caveat about some warnings
147 depending on optimization settings.
148
149 2020-01-13 Jakub Jelinek <jakub@redhat.com>
150
151 PR tree-optimization/90838
152 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
153 SCALAR_INT_TYPE_MODE directly in CTZ_DEFINED_VALUE_AT_ZERO macro
154 argument rather than to initialize temporary for targets that
155 don't use the mode argument at all. Initialize ctzval to avoid
156 warning at -O0.
157
158 2020-01-10 Thomas Schwinge <thomas@codesourcery.com>
159
160 * tree.h (OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT): New definition.
161 * tree-core.h: Document it.
162 * gimplify.c (gimplify_omp_workshare): Set it.
163 * omp-low.c (lower_omp_target): Use it.
164 * tree-pretty-print.c (dump_omp_clause): Print it.
165
166 * omp-low.c (lower_omp_target) <OMP_CLAUSE_USE_DEVICE_PTR etc.>:
167 Assert that for OpenACC we always have 'GOMP_MAP_USE_DEVICE_PTR'.
168
169 2020-01-10 David Malcolm <dmalcolm@redhat.com>
170
171 * Makefile.in (OBJS): Add tree-diagnostic-path.o.
172 * common.opt (fdiagnostics-path-format=): New option.
173 (diagnostic_path_format): New enum.
174 (fdiagnostics-show-path-depths): New option.
175 * coretypes.h (diagnostic_event_id_t): New forward decl.
176 * diagnostic-color.c (color_dict): Add "path".
177 * diagnostic-event-id.h: New file.
178 * diagnostic-format-json.cc (json_from_expanded_location): Make
179 non-static.
180 (json_end_diagnostic): Call context->make_json_for_path if it
181 exists and the diagnostic has a path.
182 (diagnostic_output_format_init): Clear context->print_path.
183 * diagnostic-path.h: New file.
184 * diagnostic-show-locus.c (colorizer::set_range): Special-case
185 when printing a run of events in a diagnostic_path so that they
186 all get the same color.
187 (layout::m_diagnostic_path_p): New field.
188 (layout::layout): Initialize it.
189 (layout::print_any_labels): Don't colorize the label text for an
190 event in a diagnostic_path.
191 (gcc_rich_location::add_location_if_nearby): Add
192 "restrict_to_current_line_spans" and "label" params. Pass the
193 former to layout.maybe_add_location_range; pass the latter
194 when calling add_range.
195 * diagnostic.c: Include "diagnostic-path.h".
196 (diagnostic_initialize): Initialize context->path_format and
197 context->show_path_depths.
198 (diagnostic_show_any_path): New function.
199 (diagnostic_path::interprocedural_p): New function.
200 (diagnostic_report_diagnostic): Call diagnostic_show_any_path.
201 (simple_diagnostic_path::num_events): New function.
202 (simple_diagnostic_path::get_event): New function.
203 (simple_diagnostic_path::add_event): New function.
204 (simple_diagnostic_event::simple_diagnostic_event): New ctor.
205 (simple_diagnostic_event::~simple_diagnostic_event): New dtor.
206 (debug): New overload taking a diagnostic_path *.
207 * diagnostic.def (DK_DIAGNOSTIC_PATH): New.
208 * diagnostic.h (enum diagnostic_path_format): New enum.
209 (json::value): New forward decl.
210 (diagnostic_context::path_format): New field.
211 (diagnostic_context::show_path_depths): New field.
212 (diagnostic_context::print_path): New callback field.
213 (diagnostic_context::make_json_for_path): New callback field.
214 (diagnostic_show_any_path): New decl.
215 (json_from_expanded_location): New decl.
216 * doc/invoke.texi (-fdiagnostics-path-format=): New option.
217 (-fdiagnostics-show-path-depths): New option.
218 (-fdiagnostics-color): Add "path" to description of default
219 GCC_COLORS; describe it.
220 (-fdiagnostics-format=json): Document how diagnostic paths are
221 represented in the JSON output format.
222 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
223 Add optional params "restrict_to_current_line_spans" and "label".
224 * opts.c (common_handle_option): Handle
225 OPT_fdiagnostics_path_format_ and
226 OPT_fdiagnostics_show_path_depths.
227 * pretty-print.c: Include "diagnostic-event-id.h".
228 (pp_format): Implement "%@" format code for printing
229 diagnostic_event_id_t *.
230 (selftest::test_pp_format): Add tests for "%@".
231 * selftest-run-tests.c (selftest::run_tests): Call
232 selftest::tree_diagnostic_path_cc_tests.
233 * selftest.h (selftest::tree_diagnostic_path_cc_tests): New decl.
234 * toplev.c (general_init): Initialize global_dc->path_format and
235 global_dc->show_path_depths.
236 * tree-diagnostic-path.cc: New file.
237 * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Make
238 non-static. Drop "diagnostic" param in favor of storing the
239 original value of "where" and re-using it.
240 (virt_loc_aware_diagnostic_finalizer): Update for dropped param of
241 maybe_unwind_expanded_macro_loc.
242 (tree_diagnostics_defaults): Initialize context->print_path and
243 context->make_json_for_path.
244 * tree-diagnostic.h (default_tree_diagnostic_path_printer): New
245 decl.
246 (default_tree_make_json_for_path): New decl.
247 (maybe_unwind_expanded_macro_loc): New decl.
248
249 2020-01-10 Jakub Jelinek <jakub@redhat.com>
250
251 PR tree-optimization/93210
252 * fold-const.h (native_encode_initializer,
253 can_native_interpret_type_p): Declare.
254 * fold-const.c (native_encode_string): Fix up handling with off != -1,
255 simplify.
256 (native_encode_initializer): New function, moved from dwarf2out.c.
257 Adjust to native_encode_expr compatible arguments, including dry-run
258 and partial extraction modes. Don't handle STRING_CST.
259 (can_native_interpret_type_p): No longer static.
260 * gimple-fold.c (fold_ctor_reference): For native_encode_expr, verify
261 offset / BITS_PER_UNIT fits into int and don't call it if
262 can_native_interpret_type_p fails. If suboff is NULL and for
263 CONSTRUCTOR fold_{,non}array_ctor_reference returns NULL, retry with
264 native_encode_initializer.
265 (fold_const_aggregate_ref_1): Formatting fix.
266 * dwarf2out.c (native_encode_initializer): Moved to fold-const.c.
267 (tree_add_const_value_attribute): Adjust caller.
268
269 PR tree-optimization/90838
270 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
271 SCALAR_INT_TYPE_MODE instead of TYPE_MODE as operand of
272 CTZ_DEFINED_VALUE_AT_ZERO.
273
274 2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
275
276 PR inline-asm/93027
277 * lra-constraints.c (match_reload): Permit input operands have the
278 same mode as output while other input operands have a different
279 mode.
280
281 2020-01-10 Wilco Dijkstra <wdijkstr@arm.com>
282
283 PR tree-optimization/90838
284 * tree-ssa-forwprop.c (check_ctz_array): Add new function.
285 (check_ctz_string): Likewise.
286 (optimize_count_trailing_zeroes): Likewise.
287 (simplify_count_trailing_zeroes): Likewise.
288 (pass_forwprop::execute): Try ctz simplification.
289 * match.pd: Add matching for ctz idioms.
290
291 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
292
293 * config/aarch64/aarch64.c (aarch64_invalid_conversion): New function
294 for target hook.
295 (aarch64_invalid_unary_op): New function for target hook.
296 (aarch64_invalid_binary_op): New function for target hook.
297
298 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
299
300 * config.gcc: Add arm_bf16.h.
301 * config/aarch64/aarch64-builtins.c
302 (aarch64_simd_builtin_std_type): Add BFmode.
303 (aarch64_init_simd_builtin_types): Define element types for vector
304 types.
305 (aarch64_init_bf16_types): New function.
306 (aarch64_general_init_builtins): Add arm_init_bf16_types function call.
307 * config/aarch64/aarch64-modes.def: Add BFmode and V4BF, V8BF vector
308 modes.
309 * config/aarch64/aarch64-simd-builtin-types.def: Add BF SIMD types.
310 * config/aarch64/aarch64-simd.md: Add BF vector types to NEON move
311 patterns.
312 * config/aarch64/aarch64.h (AARCH64_VALID_SIMD_DREG_MODE): Add V4BF.
313 (AARCH64_VALID_SIMD_QREG_MODE): Add V8BF.
314 * config/aarch64/aarch64.c
315 (aarch64_classify_vector_mode): Add support for BF types.
316 (aarch64_gimplify_va_arg_expr): Add support for BF types.
317 (aarch64_vq_mode): Add support for BF types.
318 (aarch64_simd_container_mode): Add support for BF types.
319 (aarch64_mangle_type): Add support for BF scalar type.
320 * config/aarch64/aarch64.md: Add BFmode to movhf pattern.
321 * config/aarch64/arm_bf16.h: New file.
322 * config/aarch64/arm_neon.h: Add arm_bf16.h and Bfloat vector types.
323 * config/aarch64/iterators.md: Add BF types to mode attributes.
324 (HFBF, GPF_TF_F16_MOV, VDMOV, VQMOV, VQMOV_NO2Em VALL_F16MOV): New.
325
326 2020-01-10 Jason Merrill <jason@redhat.com>
327
328 PR c++/93173 - incorrect tree sharing.
329 * gimplify.c (copy_if_shared): No longer static.
330 * gimplify.h: Declare it.
331
332 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
333
334 * doc/invoke.texi (-msve-vector-bits=): Document that
335 -msve-vector-bits=128 now generates VL-specific code for
336 little-endian targets.
337 * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Use
338 build_vector_type_for_mode to construct the data vector types.
339 * config/aarch64/aarch64.c (aarch64_convert_sve_vector_bits): Generate
340 VL-specific code for -msve-vector-bits=128 on little-endian targets.
341 (aarch64_simd_container_mode): Always prefer Advanced SIMD modes
342 for 128-bit vectors.
343
344 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
345
346 * config/aarch64/aarch64.c (aarch64_evpc_sel): Fix gen_vcond_mask
347 invocation.
348
349 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
350
351 * config/aarch64/aarch64-builtins.c
352 (aarch64_builtin_vectorized_function): Check for specific vector modes,
353 rather than checking the number of elements and the element mode.
354
355 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
356
357 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
358 get_related_vectype_for_scalar_type rather than build_vector_type
359 to create the index type for a conditional reduction.
360
361 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
362
363 * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF
364 for any type of gather or scatter, including strided accesses.
365
366 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
367
368 * tree-vectorizer.h (get_dr_vinfo_offset): Add missing function
369 comment.
370
371 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
372
373 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Use
374 get_dr_vinfo_offset
375 * tree-vect-loop.c (update_epilogue_loop_vinfo): Remove orig_drs_init
376 parameter and its use to reset DR_OFFSET's.
377 (vect_transform_loop): Remove orig_drs_init argument.
378 * tree-vect-loop-manip.c (vect_update_init_of_dr): Update the offset
379 member of dr_vec_info rather than the offset of the associated
380 data_reference's innermost_loop_behavior.
381 (vect_update_init_of_dr): Pass dr_vec_info instead of data_reference.
382 (vect_do_peeling): Remove orig_drs_init parameter and its construction.
383 * tree-vect-stmts.c (check_scan_store): Replace use of DR_OFFSET with
384 get_dr_vinfo_offset.
385 (vectorizable_store): Likewise.
386 (vectorizable_load): Likewise.
387
388 2020-01-10 Richard Biener <rguenther@suse.de>
389
390 * gimple-ssa-store-merging
391 (pass_store_merging::terminate_all_aliasing_chains): Cache alias info.
392
393 2020-01-10 Martin Liska <mliska@suse.cz>
394
395 PR ipa/93217
396 * ipa-inline-analysis.c (offline_size): Make proper parenthesis
397 encapsulation that was there before r280040.
398
399 2020-01-10 Richard Biener <rguenther@suse.de>
400
401 PR middle-end/93199
402 * tree-eh.c (sink_clobbers): Move clobbers to out-of-IL
403 sequences to avoid walking them again for secondary opportunities.
404 (pass_lower_eh_dispatch::execute): Instead actually insert
405 them here.
406
407 2020-01-10 Richard Biener <rguenther@suse.de>
408
409 PR middle-end/93199
410 * tree-eh.c (redirect_eh_edge_1): Avoid some work if possible.
411 (cleanup_all_empty_eh): Walk landing pads in reverse order to
412 avoid quadraticness.
413
414 2020-01-10 Martin Jambor <mjambor@suse.cz>
415
416 * params.opt (param_ipa_sra_max_replacements): Mark as Optimization.
417 * ipa-sra.c (pull_accesses_from_callee): New parameter caller, use it
418 to get param_ipa_sra_max_replacements.
419 (param_splitting_across_edge): Pass the caller to
420 pull_accesses_from_callee.
421
422 2020-01-10 Martin Jambor <mjambor@suse.cz>
423
424 * params.opt (param_ipcp_unit_growth): Mark as Optimization.
425 * ipa-cp.c (max_new_size): Removed.
426 (orig_overall_size): New variable.
427 (get_max_overall_size): New function.
428 (estimate_local_effects): Use it. Adjust dump.
429 (decide_about_value): Likewise.
430 (ipcp_propagate_stage): Do not calculate max_new_size, just store
431 orig_overall_size. Adjust dump.
432 (ipa_cp_c_finalize): Clear orig_overall_size instead of max_new_size.
433
434 2020-01-10 Martin Jambor <mjambor@suse.cz>
435
436 * params.opt (param_ipa_max_agg_items): Mark as Optimization
437 * ipa-cp.c (merge_agg_lats_step): New parameter max_agg_items, use
438 instead of param_ipa_max_agg_items.
439 (merge_aggregate_lattices): Extract param_ipa_max_agg_items from
440 optimization info for the callee.
441
442 2020-01-09 Kwok Cheung Yeung <kcy@codesourcery.com>
443
444 * lto-streamer-in.c (input_function): Remove streamed-in inline debug
445 markers if debug_inline_points is false.
446
447 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
448
449 * config.gcc (aarch64*-*-*): Add aarch64-sve-builtins-sve2.o to
450 extra_objs.
451 * config/aarch64/t-aarch64 (aarch64-sve-builtins.o): Depend on
452 aarch64-sve-builtins-base.def, aarch64-sve-builtins-sve2.def and
453 aarch64-sve-builtins-sve2.h.
454 (aarch64-sve-builtins-sve2.o): New rule.
455 * config/aarch64/aarch64.h (AARCH64_ISA_SVE2_AES): New macro.
456 (AARCH64_ISA_SVE2_BITPERM, AARCH64_ISA_SVE2_SHA3): Likewise.
457 (AARCH64_ISA_SVE2_SM4, TARGET_SVE2_AES, TARGET_SVE2_BITPERM): Likewise.
458 (TARGET_SVE2_SHA, TARGET_SVE2_SM4): Likewise.
459 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
460 TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3 and
461 TARGET_SVE2_SM4.
462 * config/aarch64/aarch64-sve.md: Update comments with SVE2
463 instructions that are handled here.
464 (@cond_asrd<mode>): Generalize to...
465 (@cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>): ...this.
466 (*cond_asrd<mode>_2): Generalize to...
467 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_2): ...this.
468 (*cond_asrd<mode>_z): Generalize to...
469 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_z): ...this.
470 * config/aarch64/aarch64.md (UNSPEC_LDNT1_GATHER): New unspec.
471 (UNSPEC_STNT1_SCATTER, UNSPEC_WHILEGE, UNSPEC_WHILEGT): Likewise.
472 (UNSPEC_WHILEHI, UNSPEC_WHILEHS): Likewise.
473 * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt<mode>): New
474 pattern.
475 (@aarch64_gather_ldnt_<ANY_EXTEND:optab><SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
476 (@aarch64_scatter_stnt<mode>): Likewise.
477 (@aarch64_scatter_stnt_<SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
478 (@aarch64_mul_lane_<mode>): Likewise.
479 (@aarch64_sve_suqadd<mode>_const): Likewise.
480 (*<sur>h<addsub><mode>): Generalize to...
481 (@aarch64_pred_<SVE2_COND_INT_BINARY_REV:sve_int_op><mode>): ...this
482 new pattern.
483 (@cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>): New expander.
484 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_2): New pattern.
485 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_3): Likewise.
486 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_any): Likewise.
487 (*cond_<SVE2_COND_INT_BINARY_NOREV:sve_int_op><mode>_z): Likewise.
488 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op><mode>):: Likewise.
489 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op>_lane_<mode>): Likewise.
490 (@aarch64_pred_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): Likewise.
491 (@cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): New expander.
492 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_2): New pattern.
493 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_3): Likewise.
494 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_any): Likewise.
495 (@aarch64_sve_<SVE2_INT_TERNARY:sve_int_op><mode>): Likewise.
496 (@aarch64_sve_<SVE2_INT_TERNARY_LANE:sve_int_op>_lane_<mode>)
497 (@aarch64_sve_add_mul_lane_<mode>): Likewise.
498 (@aarch64_sve_sub_mul_lane_<mode>): Likewise.
499 (@aarch64_sve2_xar<mode>): Likewise.
500 (@aarch64_sve2_bcax<mode>): Likewise.
501 (*aarch64_sve2_eor3<mode>): Rename to...
502 (@aarch64_sve2_eor3<mode>): ...this.
503 (@aarch64_sve2_bsl<mode>): New expander.
504 (@aarch64_sve2_nbsl<mode>): Likewise.
505 (@aarch64_sve2_bsl1n<mode>): Likewise.
506 (@aarch64_sve2_bsl2n<mode>): Likewise.
507 (@aarch64_sve_add_<SHIFTRT:sve_int_op><mode>): Likewise.
508 (*aarch64_sve2_sra<mode>): Add MOVPRFX support.
509 (@aarch64_sve_add_<VRSHR_N:sve_int_op><mode>): New pattern.
510 (@aarch64_sve_<SVE2_INT_SHIFT_INSERT:sve_int_op><mode>): Likewise.
511 (@aarch64_sve2_<USMAX:su>aba<mode>): New expander.
512 (*aarch64_sve2_<USMAX:su>aba<mode>): New pattern.
513 (@aarch64_sve_<SVE2_INT_BINARY_WIDE:sve_int_op><mode>): Likewise.
514 (<su>mull<bt><Vwide>): Generalize to...
515 (@aarch64_sve_<SVE2_INT_BINARY_LONG:sve_int_op><mode>): ...this new
516 pattern.
517 (@aarch64_sve_<SVE2_INT_BINARY_LONG_lANE:sve_int_op>_lane_<mode>)
518 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_LONG:sve_int_op><mode>)
519 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG:sve_int_op><mode>)
520 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
521 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG:sve_int_op><mode>)
522 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
523 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG:sve_int_op><mode>)
524 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
525 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG:sve_int_op><mode>)
526 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
527 (@aarch64_sve_<SVE2_FP_TERNARY_LONG:sve_fp_op><mode>): New patterns.
528 (@aarch64_<SVE2_FP_TERNARY_LONG_LANE:sve_fp_op>_lane_<mode>)
529 (@aarch64_sve_<SVE2_INT_UNARY_NARROWB:sve_int_op><mode>): Likewise.
530 (@aarch64_sve_<SVE2_INT_UNARY_NARROWT:sve_int_op><mode>): Likewise.
531 (@aarch64_sve_<SVE2_INT_BINARY_NARROWB:sve_int_op><mode>): Likewise.
532 (@aarch64_sve_<SVE2_INT_BINARY_NARROWT:sve_int_op><mode>): Likewise.
533 (<SHRNB:r>shrnb<mode>): Generalize to...
534 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWB:sve_int_op><mode>): ...this
535 new pattern.
536 (<SHRNT:r>shrnt<mode>): Generalize to...
537 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWT:sve_int_op><mode>): ...this
538 new pattern.
539 (@aarch64_pred_<SVE2_INT_BINARY_PAIR:sve_int_op><mode>): New pattern.
540 (@aarch64_pred_<SVE2_FP_BINARY_PAIR:sve_fp_op><mode>): Likewise.
541 (@cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>): New expander.
542 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_2): New pattern.
543 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_z): Likewise.
544 (@aarch64_sve_<SVE2_INT_CADD:optab><mode>): Likewise.
545 (@aarch64_sve_<SVE2_INT_CMLA:optab><mode>): Likewise.
546 (@aarch64_<SVE2_INT_CMLA:optab>_lane_<mode>): Likewise.
547 (@aarch64_sve_<SVE2_INT_CDOT:optab><mode>): Likewise.
548 (@aarch64_<SVE2_INT_CDOT:optab>_lane_<mode>): Likewise.
549 (@aarch64_pred_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): Likewise.
550 (@cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New expander.
551 (*cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New pattern.
552 (@aarch64_sve2_cvtnt<mode>): Likewise.
553 (@aarch64_pred_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): Likewise.
554 (@cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): New expander.
555 (*cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>_any): New pattern.
556 (@aarch64_sve2_cvtxnt<mode>): Likewise.
557 (@aarch64_pred_<SVE2_U32_UNARY:sve_int_op><mode>): Likewise.
558 (@cond_<SVE2_U32_UNARY:sve_int_op><mode>): New expander.
559 (*cond_<SVE2_U32_UNARY:sve_int_op><mode>): New pattern.
560 (@aarch64_pred_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): Likewise.
561 (@cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New expander.
562 (*cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New pattern.
563 (@aarch64_sve2_pmul<mode>): Likewise.
564 (@aarch64_sve_<SVE2_PMULL:optab><mode>): Likewise.
565 (@aarch64_sve_<SVE2_PMULL_PAIR:optab><mode>): Likewise.
566 (@aarch64_sve2_tbl2<mode>): Likewise.
567 (@aarch64_sve2_tbx<mode>): Likewise.
568 (@aarch64_sve_<SVE2_INT_BITPERM:sve_int_op><mode>): Likewise.
569 (@aarch64_sve2_histcnt<mode>): Likewise.
570 (@aarch64_sve2_histseg<mode>): Likewise.
571 (@aarch64_pred_<SVE2_MATCH:sve_int_op><mode>): Likewise.
572 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_cc): Likewise.
573 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_ptest): Likewise.
574 (aarch64_sve2_aes<CRYPTO_AES:aes_op>): Likewise.
575 (aarch64_sve2_aes<CRYPTO_AESMC:aesmc_op>): Likewise.
576 (*aarch64_sve2_aese_fused, *aarch64_sve2_aesd_fused): Likewise.
577 (aarch64_sve2_rax1, aarch64_sve2_sm4e, aarch64_sve2_sm4ekey): Likewise.
578 (<su>mulh<r>s<mode>3): Update after above pattern name changes.
579 * config/aarch64/iterators.md (VNx16QI_ONLY, VNx4SF_ONLY)
580 (SVE_STRUCT2, SVE_FULL_BHI, SVE_FULL_HSI, SVE_FULL_HDI)
581 (SVE2_PMULL_PAIR_I): New mode iterators.
582 (UNSPEC_ADCLB, UNSPEC_ADCLT, UNSPEC_ADDHNB, UNSPEC_ADDHNT, UNSPEC_BDEP)
583 (UNSPEC_BEXT, UNSPEC_BGRP, UNSPEC_CADD90, UNSPEC_CADD270, UNSPEC_CDOT)
584 (UNSPEC_CDOT90, UNSPEC_CDOT180, UNSPEC_CDOT270, UNSPEC_CMLA)
585 (UNSPEC_CMLA90, UNSPEC_CMLA180, UNSPEC_CMLA270, UNSPEC_COND_FCVTLT)
586 (UNSPEC_COND_FCVTNT, UNSPEC_COND_FCVTX, UNSPEC_COND_FCVTXNT)
587 (UNSPEC_COND_FLOGB, UNSPEC_EORBT, UNSPEC_EORTB, UNSPEC_FADDP)
588 (UNSPEC_FMAXP, UNSPEC_FMAXNMP, UNSPEC_FMLALB, UNSPEC_FMLALT)
589 (UNSPEC_FMLSLB, UNSPEC_FMLSLT, UNSPEC_FMINP, UNSPEC_FMINNMP)
590 (UNSPEC_HISTCNT, UNSPEC_HISTSEG, UNSPEC_MATCH, UNSPEC_NMATCH)
591 (UNSPEC_PMULLB, UNSPEC_PMULLB_PAIR, UNSPEC_PMULLT, UNSPEC_PMULLT_PAIR)
592 (UNSPEC_RADDHNB, UNSPEC_RADDHNT, UNSPEC_RSUBHNB, UNSPEC_RSUBHNT)
593 (UNSPEC_SLI, UNSPEC_SRI, UNSPEC_SABDLB, UNSPEC_SABDLT, UNSPEC_SADDLB)
594 (UNSPEC_SADDLBT, UNSPEC_SADDLT, UNSPEC_SADDWB, UNSPEC_SADDWT)
595 (UNSPEC_SBCLB, UNSPEC_SBCLT, UNSPEC_SMAXP, UNSPEC_SMINP)
596 (UNSPEC_SQCADD90, UNSPEC_SQCADD270, UNSPEC_SQDMULLB, UNSPEC_SQDMULLBT)
597 (UNSPEC_SQDMULLT, UNSPEC_SQRDCMLAH, UNSPEC_SQRDCMLAH90)
598 (UNSPEC_SQRDCMLAH180, UNSPEC_SQRDCMLAH270, UNSPEC_SQRSHRNB)
599 (UNSPEC_SQRSHRNT, UNSPEC_SQRSHRUNB, UNSPEC_SQRSHRUNT, UNSPEC_SQSHRNB)
600 (UNSPEC_SQSHRNT, UNSPEC_SQSHRUNB, UNSPEC_SQSHRUNT, UNSPEC_SQXTNB)
601 (UNSPEC_SQXTNT, UNSPEC_SQXTUNB, UNSPEC_SQXTUNT, UNSPEC_SSHLLB)
602 (UNSPEC_SSHLLT, UNSPEC_SSUBLB, UNSPEC_SSUBLBT, UNSPEC_SSUBLT)
603 (UNSPEC_SSUBLTB, UNSPEC_SSUBWB, UNSPEC_SSUBWT, UNSPEC_SUBHNB)
604 (UNSPEC_SUBHNT, UNSPEC_TBL2, UNSPEC_UABDLB, UNSPEC_UABDLT)
605 (UNSPEC_UADDLB, UNSPEC_UADDLT, UNSPEC_UADDWB, UNSPEC_UADDWT)
606 (UNSPEC_UMAXP, UNSPEC_UMINP, UNSPEC_UQRSHRNB, UNSPEC_UQRSHRNT)
607 (UNSPEC_UQSHRNB, UNSPEC_UQSHRNT, UNSPEC_UQXTNB, UNSPEC_UQXTNT)
608 (UNSPEC_USHLLB, UNSPEC_USHLLT, UNSPEC_USUBLB, UNSPEC_USUBLT)
609 (UNSPEC_USUBWB, UNSPEC_USUBWT): New unspecs.
610 (UNSPEC_SMULLB, UNSPEC_SMULLT, UNSPEC_UMULLB, UNSPEC_UMULLT)
611 (UNSPEC_SMULHS, UNSPEC_SMULHRS, UNSPEC_UMULHS, UNSPEC_UMULHRS)
612 (UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SHRNB, UNSPEC_SHRNT): Move
613 further down file.
614 (VNARROW, Ventype): New mode attributes.
615 (Vewtype): Handle VNx2DI. Fix typo in comment.
616 (VDOUBLE): New mode attribute.
617 (sve_lane_con): Handle VNx8HI.
618 (SVE_INT_UNARY): Include ss_abs and ss_neg for TARGET_SVE2.
619 (SVE_INT_BINARY): Likewise ss_plus, us_plus, ss_minus and us_minus.
620 (sve_int_op, sve_int_op_rev): Handle the above codes.
621 (sve_pred_int_rhs2_operand): Likewise.
622 (MULLBT, SHRNB, SHRNT): Delete.
623 (SVE_INT_SHIFT_IMM): New int iterator.
624 (SVE_WHILE): Add UNSPEC_WHILEGE, UNSPEC_WHILEGT, UNSPEC_WHILEHI
625 and UNSPEC_WHILEHS for TARGET_SVE2.
626 (SVE2_U32_UNARY, SVE2_INT_UNARY_NARROWB, SVE2_INT_UNARY_NARROWT)
627 (SVE2_INT_BINARY, SVE2_INT_BINARY_LANE, SVE2_INT_BINARY_LONG)
628 (SVE2_INT_BINARY_LONG_LANE, SVE2_INT_BINARY_NARROWB)
629 (SVE2_INT_BINARY_NARROWT, SVE2_INT_BINARY_PAIR, SVE2_FP_BINARY_PAIR)
630 (SVE2_INT_BINARY_PAIR_LONG, SVE2_INT_BINARY_WIDE): New int iterators.
631 (SVE2_INT_SHIFT_IMM_LONG, SVE2_INT_SHIFT_IMM_NARROWB): Likewise.
632 (SVE2_INT_SHIFT_IMM_NARROWT, SVE2_INT_SHIFT_INSERT, SVE2_INT_CADD)
633 (SVE2_INT_BITPERM, SVE2_INT_TERNARY, SVE2_INT_TERNARY_LANE): Likewise.
634 (SVE2_FP_TERNARY_LONG, SVE2_FP_TERNARY_LONG_LANE, SVE2_INT_CMLA)
635 (SVE2_INT_CDOT, SVE2_INT_ADD_BINARY_LONG, SVE2_INT_QADD_BINARY_LONG)
636 (SVE2_INT_SUB_BINARY_LONG, SVE2_INT_QSUB_BINARY_LONG): Likewise.
637 (SVE2_INT_ADD_BINARY_LONG_LANE, SVE2_INT_QADD_BINARY_LONG_LANE)
638 (SVE2_INT_SUB_BINARY_LONG_LANE, SVE2_INT_QSUB_BINARY_LONG_LANE)
639 (SVE2_COND_INT_UNARY_FP, SVE2_COND_FP_UNARY_LONG): Likewise.
640 (SVE2_COND_FP_UNARY_NARROWB, SVE2_COND_INT_BINARY): Likewise.
641 (SVE2_COND_INT_BINARY_NOREV, SVE2_COND_INT_BINARY_REV): Likewise.
642 (SVE2_COND_INT_SHIFT, SVE2_MATCH, SVE2_PMULL): Likewise.
643 (optab): Handle the new unspecs.
644 (su, r): Remove entries for UNSPEC_SHRNB, UNSPEC_SHRNT, UNSPEC_RSHRNB
645 and UNSPEC_RSHRNT.
646 (lr): Handle the new unspecs.
647 (bt): Delete.
648 (cmp_op, while_optab_cmp, sve_int_op): Handle the new unspecs.
649 (sve_int_op_rev, sve_int_add_op, sve_int_qadd_op, sve_int_sub_op)
650 (sve_int_qsub_op): New int attributes.
651 (sve_fp_op, rot): Handle the new unspecs.
652 * config/aarch64/aarch64-sve-builtins.h
653 (function_resolver::require_matching_pointer_type): Declare.
654 (function_resolver::resolve_unary): Add an optional boolean argument.
655 (function_resolver::finish_opt_n_resolution): Add an optional
656 type_suffix_index argument.
657 (gimple_folder::redirect_call): Declare.
658 (gimple_expander::prepare_gather_address_operands): Add an optional
659 bool parameter.
660 * config/aarch64/aarch64-sve-builtins.cc: Include
661 aarch64-sve-builtins-sve2.h.
662 (TYPES_b_unsigned, TYPES_b_integer, TYPES_bh_integer): New macros.
663 (TYPES_bs_unsigned, TYPES_hs_signed, TYPES_hs_integer): Likewise.
664 (TYPES_hd_unsigned, TYPES_hsd_signed): Likewise.
665 (TYPES_hsd_integer): Use TYPES_hsd_signed.
666 (TYPES_s_float_hsd_integer, TYPES_s_float_sd_integer): New macros.
667 (TYPES_s_unsigned): Likewise.
668 (TYPES_s_integer): Use TYPES_s_unsigned.
669 (TYPES_sd_signed, TYPES_sd_unsigned): New macros.
670 (TYPES_sd_integer): Use them.
671 (TYPES_d_unsigned): New macro.
672 (TYPES_d_integer): Use it.
673 (TYPES_d_data, TYPES_cvt_long, TYPES_cvt_narrow_s): New macros.
674 (TYPES_cvt_narrow): Likewise.
675 (DEF_SVE_TYPES_ARRAY): Include the new types macros above.
676 (preds_mx): New variable.
677 (function_builder::add_overloaded_function): Allow the new feature
678 set to be more restrictive than the original one.
679 (function_resolver::infer_pointer_type): Remove qualifiers from
680 the pointer type before printing it.
681 (function_resolver::require_matching_pointer_type): New function.
682 (function_resolver::resolve_sv_displacement): Handle functions
683 that don't support 32-bit vector indices or svint32_t vector offsets.
684 (function_resolver::finish_opt_n_resolution): Take the inferred type
685 as a separate argument.
686 (function_resolver::resolve_unary): Optionally treat all forms in
687 the same way as normal merging functions.
688 (gimple_folder::redirect_call): New function.
689 (function_expander::prepare_gather_address_operands): Add an argument
690 that says whether scaled forms are available. If they aren't,
691 handle scaling of vector indices and don't add the extension and
692 scaling operands.
693 (function_expander::map_to_unspecs): If aarch64_sve isn't available,
694 fall back to using cond_* instead.
695 * config/aarch64/aarch64-sve-builtins-functions.h (rtx_code_function):
696 Split out the member variables into...
697 (rtx_code_function_base): ...this new base class.
698 (rtx_code_function_rotated): Inherit rtx_code_function_base.
699 (unspec_based_function): Split out the member variables into...
700 (unspec_based_function_base): ...this new base class.
701 (unspec_based_function_rotated): Inherit unspec_based_function_base.
702 (unspec_based_function_exact_insn): New class.
703 (unspec_based_add_function, unspec_based_add_lane_function)
704 (unspec_based_lane_function, unspec_based_pred_function)
705 (unspec_based_qadd_function, unspec_based_qadd_lane_function)
706 (unspec_based_qsub_function, unspec_based_qsub_lane_function)
707 (unspec_based_sub_function, unspec_based_sub_lane_function): New
708 typedefs.
709 (unspec_based_fused_function): New class.
710 (unspec_based_mla_function, unspec_based_mls_function): New typedefs.
711 (unspec_based_fused_lane_function): New class.
712 (unspec_based_mla_lane_function, unspec_based_mls_lane_function): New
713 typedefs.
714 (CODE_FOR_MODE1): New macro.
715 (fixed_insn_function): New class.
716 (while_comparison): Likewise.
717 * config/aarch64/aarch64-sve-builtins-shapes.h (binary_long_lane)
718 (binary_long_opt_n, binary_narrowb_opt_n, binary_narrowt_opt_n)
719 (binary_to_uint, binary_wide, binary_wide_opt_n, compare, compare_ptr)
720 (load_ext_gather_index_restricted, load_ext_gather_offset_restricted)
721 (load_gather_sv_restricted, shift_left_imm_long): Declare.
722 (shift_left_imm_to_uint, shift_right_imm_narrowb): Likewise.
723 (shift_right_imm_narrowt, shift_right_imm_narrowb_to_uint): Likewise.
724 (shift_right_imm_narrowt_to_uint, store_scatter_index_restricted)
725 (store_scatter_offset_restricted, tbl_tuple, ternary_long_lane)
726 (ternary_long_opt_n, ternary_qq_lane_rotate, ternary_qq_rotate)
727 (ternary_shift_left_imm, ternary_shift_right_imm, ternary_uint)
728 (unary_convert_narrowt, unary_long, unary_narrowb, unary_narrowt)
729 (unary_narrowb_to_uint, unary_narrowt_to_uint, unary_to_int): Likewise.
730 * config/aarch64/aarch64-sve-builtins-shapes.cc (apply_predication):
731 Also add an initial argument for unary_convert_narrowt, regardless
732 of the predication type.
733 (build_32_64): Allow loads and stores to specify MODE_none.
734 (build_sv_index64, build_sv_uint_offset): New functions.
735 (long_type_suffix): New function.
736 (binary_imm_narrowb_base, binary_imm_narrowt_base): New classes.
737 (binary_imm_long_base, load_gather_sv_base): Likewise.
738 (shift_right_imm_narrow_wrapper, ternary_shift_imm_base): Likewise.
739 (ternary_resize2_opt_n_base, ternary_resize2_lane_base): Likewise.
740 (unary_narrowb_base, unary_narrowt_base): Likewise.
741 (binary_long_lane_def, binary_long_lane): New shape.
742 (binary_long_opt_n_def, binary_long_opt_n): Likewise.
743 (binary_narrowb_opt_n_def, binary_narrowb_opt_n): Likewise.
744 (binary_narrowt_opt_n_def, binary_narrowt_opt_n): Likewise.
745 (binary_to_uint_def, binary_to_uint): Likewise.
746 (binary_wide_def, binary_wide): Likewise.
747 (binary_wide_opt_n_def, binary_wide_opt_n): Likewise.
748 (compare_def, compare): Likewise.
749 (compare_ptr_def, compare_ptr): Likewise.
750 (load_ext_gather_index_restricted_def,
751 load_ext_gather_index_restricted): Likewise.
752 (load_ext_gather_offset_restricted_def,
753 load_ext_gather_offset_restricted): Likewise.
754 (load_gather_sv_def): Inherit from load_gather_sv_base.
755 (load_gather_sv_restricted_def, load_gather_sv_restricted): New shape.
756 (shift_left_imm_def, shift_left_imm): Likewise.
757 (shift_left_imm_long_def, shift_left_imm_long): Likewise.
758 (shift_left_imm_to_uint_def, shift_left_imm_to_uint): Likewise.
759 (store_scatter_index_restricted_def,
760 store_scatter_index_restricted): Likewise.
761 (store_scatter_offset_restricted_def,
762 store_scatter_offset_restricted): Likewise.
763 (tbl_tuple_def, tbl_tuple): Likewise.
764 (ternary_long_lane_def, ternary_long_lane): Likewise.
765 (ternary_long_opt_n_def, ternary_long_opt_n): Likewise.
766 (ternary_qq_lane_def): Inherit from ternary_resize2_lane_base.
767 (ternary_qq_lane_rotate_def, ternary_qq_lane_rotate): New shape
768 (ternary_qq_opt_n_def): Inherit from ternary_resize2_opt_n_base.
769 (ternary_qq_rotate_def, ternary_qq_rotate): New shape.
770 (ternary_shift_left_imm_def, ternary_shift_left_imm): Likewise.
771 (ternary_shift_right_imm_def, ternary_shift_right_imm): Likewise.
772 (ternary_uint_def, ternary_uint): Likewise.
773 (unary_convert): Fix typo in comment.
774 (unary_convert_narrowt_def, unary_convert_narrowt): New shape.
775 (unary_long_def, unary_long): Likewise.
776 (unary_narrowb_def, unary_narrowb): Likewise.
777 (unary_narrowt_def, unary_narrowt): Likewise.
778 (unary_narrowb_to_uint_def, unary_narrowb_to_uint): Likewise.
779 (unary_narrowt_to_uint_def, unary_narrowt_to_uint): Likewise.
780 (unary_to_int_def, unary_to_int): Likewise.
781 * config/aarch64/aarch64-sve-builtins-base.cc (unspec_cmla)
782 (unspec_fcmla, unspec_cond_fcmla, expand_mla_mls_lane): New functions.
783 (svasrd_impl): Delete.
784 (svcadd_impl::expand): Handle integer operations too.
785 (svcmla_impl::expand, svcmla_lane::expand): Likewise, using the
786 new functions to derive the unspec numbers.
787 (svmla_svmls_lane_impl): Replace with...
788 (svmla_lane_impl, svmls_lane_impl): ...these new classes. Handle
789 integer operations too.
790 (svwhile_impl): Rename to...
791 (svwhilelx_impl): ...this and inherit from while_comparison.
792 (svasrd): Use unspec_based_function.
793 (svmla_lane): Use svmla_lane_impl.
794 (svmls_lane): Use svmls_lane_impl.
795 (svrecpe, svrsqrte): Handle unsigned integer operations too.
796 (svwhilele, svwhilelt): Use svwhilelx_impl.
797 * config/aarch64/aarch64-sve-builtins-sve2.h: New file.
798 * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
799 * config/aarch64/aarch64-sve-builtins-sve2.def: Likewise.
800 * config/aarch64/aarch64-sve-builtins.def: Include
801 aarch64-sve-builtins-sve2.def.
802
803 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
804
805 * config/aarch64/aarch64-protos.h (aarch64_sve_arith_immediate_p)
806 (aarch64_sve_sqadd_sqsub_immediate_p): Add a machine_mode argument.
807 * config/aarch64/aarch64.c (aarch64_sve_arith_immediate_p)
808 (aarch64_sve_sqadd_sqsub_immediate_p): Likewise. Handle scalar
809 immediates as well as vector ones.
810 * config/aarch64/predicates.md (aarch64_sve_arith_immediate)
811 (aarch64_sve_sub_arith_immediate, aarch64_sve_qadd_immediate)
812 (aarch64_sve_qsub_immediate): Update calls accordingly.
813
814 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
815
816 * config/aarch64/aarch64-sve2.md: Add banner comments.
817 (<su>mulh<r>s<mode>3): Move further up file.
818 (<su>mull<bt><Vwide>, <r>shrnb<mode>, <r>shrnt<mode>)
819 (*aarch64_sve2_sra<mode>): Move further down file.
820 * config/aarch64/t-aarch64 (s-check-sve-md): Check aarch64-sve2.md too.
821
822 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
823
824 * config/aarch64/iterators.md (SVE_WHILE): Add UNSPEC_WHILERW
825 and UNSPEC_WHILEWR.
826 (while_optab_cmp): Handle them.
827 * config/aarch64/aarch64-sve.md
828 (*while_<while_optab_cmp><GPI:mode><PRED_ALL:mode>_ptest): Make public
829 and add a "@" marker.
830 * config/aarch64/aarch64-sve2.md (check_<raw_war>_ptrs<mode>): Use it
831 instead of gen_aarch64_sve2_while_ptest.
832 (@aarch64_sve2_while<cmp_op><GPI:mode><PRED_ALL:mode>_ptest): Delete.
833
834 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
835
836 * config/aarch64/aarch64.md (UNSPEC_WHILE_LE): Rename to...
837 (UNSPEC_WHILELE): ...this.
838 (UNSPEC_WHILE_LO): Rename to...
839 (UNSPEC_WHILELO): ...this.
840 (UNSPEC_WHILE_LS): Rename to...
841 (UNSPEC_WHILELS): ...this.
842 (UNSPEC_WHILE_LT): Rename to...
843 (UNSPEC_WHILELT): ...this.
844 * config/aarch64/iterators.md (SVE_WHILE): Update accordingly.
845 (cmp_op, while_optab_cmp): Likewise.
846 * config/aarch64/aarch64.c (aarch64_sve_move_pred_via_while): Likewise.
847 * config/aarch64/aarch64-sve-builtins-base.cc (svwhilele): Likewise.
848 (svwhilelt): Likewise.
849
850 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
851
852 * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete.
853 (unary_to_uint): Define.
854 * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def)
855 (unary_count): Rename to...
856 (unary_to_uint_def, unary_to_uint): ...this.
857 * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly.
858
859 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
860
861 * config/aarch64/aarch64-sve-builtins-functions.h
862 (code_for_mode_function): New class.
863 (CODE_FOR_MODE0, QUIET_CODE_FOR_MODE0): New macros.
864 * config/aarch64/aarch64-sve-builtins-base.cc (svcompact_impl)
865 (svext_impl, svmul_lane_impl, svsplice_impl, svtmad_impl): Delete.
866 (svcompact, svext, svsplice): Use QUIET_CODE_FOR_MODE0.
867 (svmul_lane, svtmad): Use CODE_FOR_MODE0.
868
869 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
870
871 * config/aarch64/iterators.md (addsub): New code attribute.
872 * config/aarch64/aarch64-simd.md (aarch64_<su_optab><optab><mode>):
873 Re-express as...
874 (aarch64_<su_optab>q<addsub><mode>): ...this, making the same change
875 in the asm string and attributes. Fix indentation.
876 * config/aarch64/aarch64-sve.md (@aarch64_<su_optab><optab><mode>):
877 Re-express as...
878 (@aarch64_sve_<optab><mode>): ...this.
879 * config/aarch64/aarch64-sve-builtins.h
880 (function_expander::expand_signed_unpred_op): Delete.
881 * config/aarch64/aarch64-sve-builtins.cc
882 (function_expander::expand_signed_unpred_op): Likewise.
883 (function_expander::map_to_rtx_codes): If the optab isn't defined,
884 try using code_for_aarch64_sve instead.
885 * config/aarch64/aarch64-sve-builtins-base.cc (svqadd_impl): Delete.
886 (svqsub_impl): Likewise.
887 (svqadd, svqsub): Use rtx_code_function instead.
888
889 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
890
891 * config/aarch64/iterators.md (SRHSUB, URHSUB): Delete.
892 (HADDSUB, sur, addsub): Remove them.
893
894 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
895
896 * tree-nrv.c (pass_return_slot::execute): Handle all internal
897 functions the same way, rather than singling out those that
898 aren't mapped directly to optabs.
899
900 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
901
902 * target.def (compatible_vector_types_p): New target hook.
903 * hooks.h (hook_bool_const_tree_const_tree_true): Declare.
904 * hooks.c (hook_bool_const_tree_const_tree_true): New function.
905 * doc/tm.texi.in (TARGET_COMPATIBLE_VECTOR_TYPES_P): New hook.
906 * doc/tm.texi: Regenerate.
907 * gimple-expr.c: Include target.h.
908 (useless_type_conversion_p): Use targetm.compatible_vector_types_p.
909 * config/aarch64/aarch64.c (aarch64_compatible_vector_types_p): New
910 function.
911 (TARGET_COMPATIBLE_VECTOR_TYPES_P): Define.
912 * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::convert_pred):
913 Use the original predicate if it already has a suitable type.
914
915 2020-01-09 Martin Jambor <mjambor@suse.cz>
916
917 * cgraph.h (cgraph_edge): Make remove, set_call_stmt, make_direct,
918 resolve_speculation and redirect_call_stmt_to_callee static. Change
919 return type of set_call_stmt to cgraph_edge *.
920 * auto-profile.c (afdo_indirect_call): Adjust call to
921 redirect_call_stmt_to_callee.
922 * cgraph.c (cgraph_edge::set_call_stmt): Make return cgraph-edge *,
923 make the this pointer explicit, adjust self-recursive calls and the
924 call top make_direct. Return the resulting edge.
925 (cgraph_edge::remove): Make this pointer explicit.
926 (cgraph_edge::resolve_speculation): Likewise, adjust call to remove.
927 (cgraph_edge::make_direct): Likewise, adjust call to
928 resolve_speculation.
929 (cgraph_edge::redirect_call_stmt_to_callee): Likewise, also adjust
930 call to set_call_stmt.
931 (cgraph_update_edges_for_call_stmt_node): Update call to
932 set_call_stmt and remove.
933 * cgraphclones.c (cgraph_node::set_call_stmt_including_clones):
934 Renamed edge to master_edge. Adjusted calls to set_call_stmt.
935 (cgraph_node::create_edge_including_clones): Moved "first" definition
936 of edge to the block where it was used. Adjusted calls to
937 set_call_stmt.
938 (cgraph_node::remove_symbol_and_inline_clones): Adjust call to
939 cgraph_edge::remove.
940 * cgraphunit.c (walk_polymorphic_call_targets): Adjusted calls to
941 make_direct and redirect_call_stmt_to_callee.
942 * ipa-fnsummary.c (redirect_to_unreachable): Adjust calls to
943 resolve_speculation and make_direct.
944 * ipa-inline-transform.c (inline_transform): Adjust call to
945 redirect_call_stmt_to_callee.
946 (check_speculations_1):: Adjust call to resolve_speculation.
947 * ipa-inline.c (resolve_noninline_speculation): Adjust call to
948 resolve-speculation.
949 (inline_small_functions): Adjust call to resolve_speculation.
950 (ipa_inline): Likewise.
951 * ipa-prop.c (ipa_make_edge_direct_to_target): Adjust call to
952 make_direct.
953 * ipa-visibility.c (function_and_variable_visibility): Make iteration
954 safe with regards to edge removal, adjust calls to
955 redirect_call_stmt_to_callee.
956 * ipa.c (walk_polymorphic_call_targets): Adjust calls to make_direct
957 and redirect_call_stmt_to_callee.
958 * multiple_target.c (create_dispatcher_calls): Adjust call to
959 redirect_call_stmt_to_callee
960 (redirect_to_specific_clone): Likewise.
961 * tree-cfgcleanup.c (delete_unreachable_blocks_update_callgraph):
962 Adjust calls to cgraph_edge::remove.
963 * tree-inline.c (copy_bb): Adjust call to set_call_stmt.
964 (redirect_all_calls): Adjust call to redirect_call_stmt_to_callee.
965 (expand_call_inline): Adjust call to cgraph_edge::remove.
966
967 2020-01-09 Martin Liska <mliska@suse.cz>
968
969 * params.opt: Set Optimization for
970 param_max_speculative_devirt_maydefs.
971
972 2020-01-09 Martin Sebor <msebor@redhat.com>
973
974 PR middle-end/93200
975 PR fortran/92956
976 * builtins.c (compute_objsize): Avoid handling MEM_REFs of vector type.
977
978 2020-01-09 Martin Liska <mliska@suse.cz>
979
980 * auto-profile.c (auto_profile): Use opt_for_fn
981 for a parameter.
982 * ipa-cp.c (ipcp_lattice::add_value): Likewise.
983 (propagate_vals_across_arith_jfunc): Likewise.
984 (hint_time_bonus): Likewise.
985 (incorporate_penalties): Likewise.
986 (good_cloning_opportunity_p): Likewise.
987 (perform_estimation_of_a_value): Likewise.
988 (estimate_local_effects): Likewise.
989 (ipcp_propagate_stage): Likewise.
990 * ipa-fnsummary.c (decompose_param_expr): Likewise.
991 (set_switch_stmt_execution_predicate): Likewise.
992 (analyze_function_body): Likewise.
993 * ipa-inline-analysis.c (offline_size): Likewise.
994 * ipa-inline.c (early_inliner): Likewise.
995 * ipa-prop.c (ipa_analyze_node): Likewise.
996 (ipcp_transform_function): Likewise.
997 * ipa-sra.c (process_scan_results): Likewise.
998 (ipa_sra_summarize_function): Likewise.
999 * params.opt: Rename ipcp-unit-growth to
1000 ipa-cp-unit-growth. Add Optimization for various
1001 IPA-related parameters.
1002
1003 2020-01-09 Richard Biener <rguenther@suse.de>
1004
1005 PR middle-end/93054
1006 * gimplify.c (gimplify_expr): Deal with NOP definitions.
1007
1008 2020-01-09 Richard Biener <rguenther@suse.de>
1009
1010 PR tree-optimization/93040
1011 * gimple-ssa-store-merging.c (find_bswap_or_nop): Raise search limit.
1012
1013 2020-01-09 Georg-Johann Lay <avr@gjlay.de>
1014
1015 * common/config/avr/avr-common.c (avr_option_optimization_table)
1016 [OPT_LEVELS_1_PLUS]: Set -fsplit-wide-types-early.
1017
1018 2020-01-09 Martin Liska <mliska@suse.cz>
1019
1020 * cgraphclones.c (symbol_table::materialize_all_clones):
1021 Use cgraph_node::dump_name.
1022
1023 2020-01-09 Jakub Jelinek <jakub@redhat.com>
1024
1025 PR inline-asm/93202
1026 * config/riscv/riscv.c (riscv_print_operand_reloc): Use
1027 output_operand_lossage instead of gcc_unreachable.
1028 * doc/md.texi (riscv f constraint): Fix typo.
1029
1030 PR target/93141
1031 * config/i386/i386.md (subv<mode>4): Use SWIDWI iterator instead of
1032 SWI. Use <general_hilo_operand> instead of <general_operand>. Use
1033 CONST_SCALAR_INT_P instead of CONST_INT_P.
1034 (*subv<mode>4_1): Rename to ...
1035 (subv<mode>4_1): ... this.
1036 (*subv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
1037 define_insn_and_split patterns.
1038 (*subv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
1039 patterns.
1040
1041 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1042
1043 * vec.c (class selftest::count_dtor): New class.
1044 (selftest::test_auto_delete_vec): New test.
1045 (selftest::vec_c_tests): Call it.
1046 * vec.h (class auto_delete_vec): New class template.
1047 (auto_delete_vec<T>::~auto_delete_vec): New dtor.
1048
1049 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1050
1051 * sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
1052
1053 2020-01-08 Jim Wilson <jimw@sifive.com>
1054
1055 * config/riscv/riscv.c (riscv_legitimize_tls_address): Ifdef out
1056 use of TLS_MODEL_LOCAL_EXEC when not pic.
1057
1058 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1059
1060 * hash-map-tests.c (selftest::test_map_of_strings_to_int): Fix
1061 memory leak.
1062
1063 2020-01-08 Jakub Jelinek <jakub@redhat.com>
1064
1065 PR target/93187
1066 * config/i386/i386.md (*stack_protect_set_2_<mode> peephole2,
1067 *stack_protect_set_3 peephole2): Also check that the second
1068 insns source is general_operand.
1069
1070 PR target/93174
1071 * config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
1072 predicate for output operand instead of register_operand.
1073 (addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with
1074 memory destination and non-memory operands[2].
1075
1076 2020-01-08 Martin Liska <mliska@suse.cz>
1077
1078 * cgraph.c (cgraph_node::dump): Use ::dump_name or
1079 ::dump_asm_name instead of (::name or ::asm_name).
1080 * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
1081 * cgraphunit.c (walk_polymorphic_call_targets): Likewise.
1082 (analyze_functions): Likewise.
1083 (expand_all_functions): Likewise.
1084 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1085 (propagate_bits_across_jump_function): Likewise.
1086 (dump_profile_updates): Likewise.
1087 (ipcp_store_bits_results): Likewise.
1088 (ipcp_store_vr_results): Likewise.
1089 * ipa-devirt.c (dump_targets): Likewise.
1090 * ipa-fnsummary.c (analyze_function_body): Likewise.
1091 * ipa-hsa.c (check_warn_node_versionable): Likewise.
1092 (process_hsa_functions): Likewise.
1093 * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise.
1094 (set_alias_uids): Likewise.
1095 * ipa-inline-transform.c (save_inline_function_body): Likewise.
1096 * ipa-inline.c (recursive_inlining): Likewise.
1097 (inline_to_all_callers_1): Likewise.
1098 (ipa_inline): Likewise.
1099 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1100 (ipa_propagate_frequency): Likewise.
1101 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1102 (remove_described_reference): Likewise.
1103 * ipa-pure-const.c (worse_state): Likewise.
1104 (check_retval_uses): Likewise.
1105 (analyze_function): Likewise.
1106 (propagate_pure_const): Likewise.
1107 (propagate_nothrow): Likewise.
1108 (dump_malloc_lattice): Likewise.
1109 (propagate_malloc): Likewise.
1110 (pass_local_pure_const::execute): Likewise.
1111 * ipa-visibility.c (optimize_weakref): Likewise.
1112 (function_and_variable_visibility): Likewise.
1113 * ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
1114 (ipa_discover_variable_flags): Likewise.
1115 * lto-streamer-out.c (output_function): Likewise.
1116 (output_constructor): Likewise.
1117 * tree-inline.c (copy_bb): Likewise.
1118 * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
1119 * varpool.c (symbol_table::remove_unreferenced_decls): Likewise.
1120
1121 2020-01-08 Richard Biener <rguenther@suse.de>
1122
1123 PR middle-end/93199
1124 * tree-eh.c (sink_clobbers): Update virtual operands for
1125 the first and last stmt only. Add a dry-run capability.
1126 (pass_lower_eh_dispatch::execute): Perform clobber sinking
1127 after CFG manipulations and in RPO order to catch all
1128 secondary opportunities reliably.
1129
1130 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1131
1132 PR target/93182
1133 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
1134
1135 2019-01-08 Richard Biener <rguenther@suse.de>
1136
1137 PR middle-end/93199
1138 * gimple-fold.c (rewrite_to_defined_overflow): Mark stmt modified.
1139 * tree-ssa-loop-im.c (move_computations_worker): Properly adjust
1140 virtual operand, also updating SSA use.
1141 * gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
1142 Update stmt after resetting virtual operand.
1143 (tree_loop_interchange::move_code_to_inner_loop): Likewise.
1144 * gimple-iterator.c (gsi_remove): When not removing the stmt
1145 permanently do not delink immediate uses or mark the stmt modified.
1146
1147 2020-01-08 Martin Liska <mliska@suse.cz>
1148
1149 * ipa-fnsummary.c (dump_ipa_call_summary): Use symtab_node::dump_name.
1150 (ipa_call_context::estimate_size_and_time): Likewise.
1151 (inline_analyze_function): Likewise.
1152
1153 2020-01-08 Martin Liska <mliska@suse.cz>
1154
1155 * cgraph.c (cgraph_node::dump): Use systematically
1156 dump_asm_name.
1157
1158 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1159
1160 Add -nodevicespecs option for avr.
1161
1162 PR target/93182
1163 * config/avr/avr.opt (-nodevicespecs): New driver option.
1164 * config/avr/driver-avr.c (avr_devicespecs_file): Only issue
1165 "-specs=device-specs/..." if that option is not set.
1166 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
1167
1168 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
1169
1170 Implement 64-bit double functions for avr.
1171
1172 PR target/92055
1173 * config.gcc (tm_defines) [target=avr]: Support --with-libf7,
1174 --with-double-comparison.
1175 * doc/install.texi: Document them.
1176 * config/avr/avr-c.c (avr_cpu_cpp_builtins)
1177 <WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS>
1178 <WITH_DOUBLE_COMPARISON>: New built-in defines.
1179 * doc/invoke.texi (AVR Built-in Macros): Document them.
1180 * config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New.
1181 * config/avr/avr.c (avr_float_lib_compare_returns_bool): New function.
1182 * config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro.
1183
1184 2020-01-08 Richard Earnshaw <rearnsha@arm.com>
1185
1186 PR target/93188
1187 * config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
1188 armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
1189 when only building rm-profile multilibs.
1190
1191 2020-01-08 Feng Xue <fxue@os.amperecomputing.com>
1192
1193 PR ipa/93084
1194 * ipa-cp.c (self_recursively_generated_p): Find matched aggregate
1195 lattice for a value to check.
1196 (propagate_vals_across_arith_jfunc): Add an assertion to ensure
1197 finite propagation in self-recursive scc.
1198
1199 2020-01-08 Luo Xiong Hu <luoxhu@linux.ibm.com>
1200
1201 * ipa-inline.c (caller_growth_limits): Restore the AND.
1202
1203 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
1204
1205 * config/gcn/gcn-valu.md (VEC_1REG_INT_ALT): Delete iterator.
1206 (VEC_ALLREG_ALT): New iterator.
1207 (VEC_ALLREG_INT_MODE): New iterator.
1208 (VCMP_MODE): New iterator.
1209 (VCMP_MODE_INT): New iterator.
1210 (vec_cmpu<mode>di): Use VCMP_MODE_INT.
1211 (vec_cmp<u>v64qidi): New define_expand.
1212 (vec_cmp<mode>di_exec): Use VCMP_MODE.
1213 (vec_cmpu<mode>di_exec): New define_expand.
1214 (vec_cmp<u>v64qidi_exec): New define_expand.
1215 (vec_cmp<mode>di_dup): Use VCMP_MODE.
1216 (vec_cmp<mode>di_dup_exec): Use VCMP_MODE.
1217 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>): Rename ...
1218 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>): ... to this.
1219 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>_exec): Rename ...
1220 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>_exec): ... to this.
1221 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>): Rename ...
1222 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>): ... to this.
1223 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>_exec): Rename ...
1224 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>_exec): ... to
1225 this.
1226 * config/gcn/gcn.c (print_operand): Fix 8 and 16 bit suffixes.
1227 * config/gcn/gcn.md (expander): Add sign_extend and zero_extend.
1228
1229 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
1230
1231 * config/gcn/constraints.md (DA): Update description and match.
1232 (DB): Likewise.
1233 (Db): New constraint.
1234 * config/gcn/gcn-protos.h (gcn_inline_constant64_p): Add second
1235 parameter.
1236 * config/gcn/gcn.c (gcn_inline_constant64_p): Add 'mixed' parameter.
1237 Implement 'Db' mixed immediate type.
1238 * config/gcn/gcn-valu.md (addcv64si3<exec_vcc>): Rework constraints.
1239 (addcv64si3_dup<exec_vcc>): Delete.
1240 (subcv64si3<exec_vcc>): Rework constraints.
1241 (addv64di3): Rework constraints.
1242 (addv64di3_exec): Rework constraints.
1243 (subv64di3): Rework constraints.
1244 (addv64di3_dup): Delete.
1245 (addv64di3_dup_exec): Delete.
1246 (addv64di3_zext): Rework constraints.
1247 (addv64di3_zext_exec): Rework constraints.
1248 (addv64di3_zext_dup): Rework constraints.
1249 (addv64di3_zext_dup_exec): Rework constraints.
1250 (addv64di3_zext_dup2): Rework constraints.
1251 (addv64di3_zext_dup2_exec): Rework constraints.
1252 (addv64di3_sext_dup2): Rework constraints.
1253 (addv64di3_sext_dup2_exec): Rework constraints.
1254
1255 2020-01-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
1256
1257 * doc/sourcebuild.texi (arm_little_endian, arm_nothumb): Documented
1258 existing target checks.
1259
1260 2020-01-07 Richard Biener <rguenther@suse.de>
1261
1262 * doc/install.texi: Bump minimal supported MPC version.
1263
1264 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
1265
1266 * langhooks-def.h (lhd_simulate_enum_decl): Declare.
1267 (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
1268 * langhooks.c: Include stor-layout.h.
1269 (lhd_simulate_enum_decl): New function.
1270 * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call
1271 handle_arm_sve_h for the LTO frontend.
1272 (register_vector_type): Cope with null returns from pushdecl.
1273
1274 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
1275
1276 * config/aarch64/aarch64-protos.h (aarch64_sve::svbool_type_p)
1277 (aarch64_sve::nvectors_if_data_type): Replace with...
1278 (aarch64_sve::builtin_type_p): ...this.
1279 * config/aarch64/aarch64-sve-builtins.cc: Include attribs.h.
1280 (find_vector_type): Delete.
1281 (add_sve_type_attribute): New function.
1282 (lookup_sve_type_attribute): Likewise.
1283 (register_builtin_types): Add an "SVE type" attribute to each type.
1284 (register_tuple_type): Likewise.
1285 (svbool_type_p, nvectors_if_data_type): Delete.
1286 (mangle_builtin_type): Use lookup_sve_type_attribute.
1287 (builtin_type_p): Likewise. Add an overload that returns the
1288 number of constituent vector and predicate registers.
1289 * config/aarch64/aarch64.c (aarch64_sve_argument_p): Delete.
1290 (aarch64_returns_value_in_sve_regs_p): Use aarch64_sve::builtin_type_p
1291 instead of aarch64_sve_argument_p.
1292 (aarch64_takes_arguments_in_sve_regs_p): Likewise.
1293 (aarch64_pass_by_reference): Likewise.
1294 (aarch64_function_value_1): Likewise.
1295 (aarch64_return_in_memory): Likewise.
1296 (aarch64_layout_arg): Likewise.
1297
1298 2020-01-07 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR tree-optimization/93156
1301 * tree-ssa-ccp.c (bit_value_binop): For x * x note that the second
1302 least significant bit is always clear.
1303
1304 PR tree-optimization/93118
1305 * match.pd ((x >> c) << c -> x & (-1<<c)): Add nop_convert?. Add new
1306 simplifier with two intermediate conversions.
1307
1308 2020-01-07 Martin Liska <mliska@suse.cz>
1309
1310 * params.opt: Add Optimization for various parameters.
1311
1312 2020-01-07 Martin Liska <mliska@suse.cz>
1313
1314 PR ipa/83411
1315 * doc/extend.texi: Explain cloning for target_clone
1316 attribute.
1317
1318 2020-01-07 Martin Liska <mliska@suse.cz>
1319
1320 PR tree-optimization/92860
1321 * common.opt: Make in Optimization option
1322 as it is affected by -O0, which is an Optimization
1323 option.
1324 * tree-inline.c (tree_inlinable_function_p):
1325 Use opt_for_fn for warn_inline.
1326 (expand_call_inline): Likewise.
1327
1328 2020-01-07 Martin Liska <mliska@suse.cz>
1329
1330 PR tree-optimization/92860
1331 * common.opt: Make flag_ree as optimization
1332 attribute.
1333
1334 2020-01-07 Martin Liska <mliska@suse.cz>
1335
1336 PR optimization/92860
1337 * params.opt: Mark param_min_crossjump_insns with Optimization
1338 keyword.
1339
1340 2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
1341
1342 * ipa-inline-analysis.c (estimate_growth): Fix typo.
1343 * ipa-inline.c (caller_growth_limits): Use OR instead of AND.
1344
1345 2020-01-06 Michael Meissner <meissner@linux.ibm.com>
1346
1347 * config/rs6000/rs6000.c (hard_reg_and_mode_to_addr_mask): New
1348 helper function to return the valid addressing formats for a given
1349 hard register and mode.
1350 (rs6000_adjust_vec_address): Call hard_reg_and_mode_to_addr_mask.
1351
1352 * config/rs6000/constraints.md (Q constraint): Update
1353 documentation.
1354 * doc/md.texi (RS/6000 constraints): Update 'Q' cosntraint
1355 documentation.
1356
1357 * config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
1358 Use 'Q' for doing vector extract from memory.
1359 (vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
1360 memory.
1361 (vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
1362 doing vector extract from memory.
1363 (vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
1364 extract from memory.
1365
1366 * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Add support
1367 for the offset being 34-bits when -mcpu=future is used.
1368
1369 2020-01-06 John David Anglin <danglin@gcc.gnu.org>
1370
1371 * config/pa/pa.md: Revert change to use ordered_comparison_operator
1372 instead of cmpib_comparison_operator in cmpib patterns.
1373 * config/pa/predicates.md (cmpib_comparison_operator): Revert removal
1374 of cmpib_comparison_operator. Revise comment.
1375
1376 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1377
1378 * tree-vect-slp.c (vect_build_slp_tree_1): Require all shifts
1379 in an IFN_DIV_POW2 node to be equal.
1380
1381 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1382
1383 * tree-vect-stmts.c (vect_check_load_store_mask): Rename to...
1384 (vect_check_scalar_mask): ...this.
1385 (vectorizable_store, vectorizable_load): Update call accordingly.
1386 (vectorizable_call): Use vect_check_scalar_mask to check the mask
1387 argument in calls to conditional internal functions.
1388
1389 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1390
1391 * config/gcn/gcn-valu.md (subv64di3): Use separate alternatives for
1392 '0' matching inputs.
1393 (subv64di3_exec): Likewise.
1394
1395 2020-01-06 Bryan Stenson <bryan@siliconvortex.com>
1396
1397 * config/mips/mips.c (vr4130_align_insns): Fix typo.
1398 * doc/md.texi (movstr): Likewise.
1399
1400 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1401
1402 * config/gcn/gcn-valu.md (vec_extract<mode><scalar_mode>): Add early
1403 clobber.
1404
1405 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1406
1407 * config/aarch64/t-aarch64 ($(srcdir)/config/aarch64/aarch64-tune.md):
1408 Depend on...
1409 (s-aarch64-tune-md): ...this new stamp file. Pipe the new contents
1410 to a temporary file and use move-if-change to update the real
1411 file where necessary.
1412
1413 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
1414
1415 * config/aarch64/aarch64-sve.md (@aarch64_sel_dup<mode>): Use Upl
1416 rather than Upa for CPY /M.
1417
1418 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
1419
1420 * config/gcn/gcn.c (gcn_inline_constant_p): Allow 64 as an inline
1421 immediate.
1422
1423 2020-01-06 Martin Liska <mliska@suse.cz>
1424
1425 PR tree-optimization/92860
1426 * params.opt: Mark param_max_combine_insns with Optimization
1427 keyword.
1428
1429 2020-01-05 Jakub Jelinek <jakub@redhat.com>
1430
1431 PR target/93141
1432 * config/i386/i386.md (SWIDWI): New mode iterator.
1433 (DWI, dwi): Add TImode variants.
1434 (addv<mode>4): Use SWIDWI iterator instead of SWI. Use
1435 <general_hilo_operand> instead of <general_operand>. Use
1436 CONST_SCALAR_INT_P instead of CONST_INT_P.
1437 (*addv<mode>4_1): Rename to ...
1438 (addv<mode>4_1): ... this.
1439 (QWI): New mode attribute.
1440 (*addv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
1441 define_insn_and_split patterns.
1442 (*addv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
1443 patterns.
1444 (uaddv<mode>4): Use SWIDWI iterator instead of SWI. Use
1445 <general_hilo_operand> instead of <general_operand>.
1446 (*addcarry<mode>_1): New define_insn.
1447 (*add<dwi>3_doubleword_cc_overflow_1): New define_insn_and_split.
1448
1449 2020-01-03 Konstantin Kharlamov <Hi-Angel@yandex.ru>
1450
1451 * gdbinit.in (pr, prl, pt, pct, pgg, pgq, pgs, pge, pmz, pdd, pbs, pbm):
1452 Use "call" instead of "set".
1453
1454 2020-01-03 Martin Jambor <mjambor@suse.cz>
1455
1456 PR ipa/92917
1457 * ipa-cp.c (print_all_lattices): Skip functions without info.
1458
1459 2020-01-03 Jakub Jelinek <jakub@redhat.com>
1460
1461 PR target/93089
1462 * config/i386/i386-options.c (ix86_simd_clone_adjust): If
1463 TARGET_PREFER_AVX128, use prefer-vector-width=256 for 'c' and 'd'
1464 simd clones. If TARGET_PREFER_AVX256, use prefer-vector-width=512
1465 for 'e' simd clones.
1466
1467 PR target/93089
1468 * config/i386/i386.opt (x_prefer_vector_width_type): Remove TargetSave
1469 entry.
1470 (mprefer-vector-width=): Add Save.
1471 * config/i386/i386-options.c (ix86_target_string): Add PVW argument, print
1472 -mprefer-vector-width= if non-zero. Fix up -mfpmath= comment.
1473 (ix86_debug_options, ix86_function_specific_print): Adjust
1474 ix86_target_string callers.
1475 (ix86_valid_target_attribute_inner_p): Handle prefer-vector-width=.
1476 (ix86_valid_target_attribute_tree): Likewise.
1477 * config/i386/i386-options.h (ix86_target_string): Add PVW argument.
1478 * config/i386/i386-expand.c (ix86_expand_builtin): Adjust
1479 ix86_target_string caller.
1480
1481 PR target/93110
1482 * config/i386/i386.md (abs<mode>2): Use expand_simple_binop instead of
1483 emitting ASHIFTRT, XOR and MINUS by hand. Use gen_int_mode with QImode
1484 instead of gen_int_shift_amount + convert_modes.
1485
1486 PR rtl-optimization/93088
1487 * loop-iv.c (find_single_def_src): Punt after looking through
1488 128 reg copies for regs with single definitions. Move definitions
1489 to first uses.
1490
1491 2020-01-02 Dennis Zhang <dennis.zhang@arm.com>
1492
1493 * config/arm/arm-c.c (arm_cpu_builtins): Define
1494 __ARM_FEATURE_MATMUL_INT8, __ARM_FEATURE_BF16_VECTOR_ARITHMETIC,
1495 __ARM_FEATURE_BF16_SCALAR_ARITHMETIC, and
1496 __ARM_BF16_FORMAT_ALTERNATIVE when enabled.
1497 * config/arm/arm-cpus.in (armv8_6, i8mm, bf16): New features.
1498 * config/arm/arm-tables.opt: Regenerated.
1499 * config/arm/arm.c (arm_option_reconfigure_globals): Initialize
1500 arm_arch_i8mm and arm_arch_bf16 when enabled.
1501 * config/arm/arm.h (TARGET_I8MM): New macro.
1502 (TARGET_BF16_FP, TARGET_BF16_SIMD): Likewise.
1503 * config/arm/t-aprofile: Add matching rules for -march=armv8.6-a.
1504 * config/arm/t-arm-elf (all_v8_archs): Add armv8.6-a.
1505 * config/arm/t-multilib: Add matching rules for -march=armv8.6-a.
1506 (v8_6_a_simd_variants): New.
1507 (v8_*_a_simd_variants): Add i8mm and bf16.
1508 * doc/invoke.texi (armv8.6-a, i8mm, bf16): Document new options.
1509
1510 2020-01-02 Jakub Jelinek <jakub@redhat.com>
1511
1512 PR ipa/93087
1513 * predict.c (compute_function_frequency): Don't call
1514 warn_function_cold on functions that already have cold attribute.
1515
1516 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
1517
1518 PR target/67834
1519 * config/pa/pa.c (pa_elf_select_rtx_section): New. Put references to
1520 COMDAT group function labels in .data.rel.ro.local section.
1521 * config/pa/pa32-linux.h (TARGET_ASM_SELECT_RTX_SECTION): Define.
1522
1523 PR target/93111
1524 * config/pa/pa.md (scc): Use ordered_comparison_operator instead of
1525 comparison_operator in B and S integer comparisons. Likewise, use
1526 ordered_comparison_operator instead of cmpib_comparison_operator in
1527 cmpib patterns.
1528 * config/pa/predicates.md (cmpib_comparison_operator): Remove.
1529
1530 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1531
1532 Update copyright years.
1533
1534 * gcc.c (process_command): Update copyright notice dates.
1535 * gcov-dump.c (print_version): Ditto.
1536 * gcov.c (print_version): Ditto.
1537 * gcov-tool.c (print_version): Ditto.
1538 * gengtype.c (create_file): Ditto.
1539 * doc/cpp.texi: Bump @copying's copyright year.
1540 * doc/cppinternals.texi: Ditto.
1541 * doc/gcc.texi: Ditto.
1542 * doc/gccint.texi: Ditto.
1543 * doc/gcov.texi: Ditto.
1544 * doc/install.texi: Ditto.
1545 * doc/invoke.texi: Ditto.
1546
1547 2020-01-01 Jan Hubicka <hubicka@ucw.cz>
1548
1549 * ipa.c (walk_polymorphic_call_targets): Fix updating of overall
1550 summary.
1551
1552 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1553
1554 PR tree-optimization/93098
1555 * match.pd (popcount): For shift amounts, use integer_onep
1556 or wi::to_widest () == cst instead of tree_to_uhwi () == cst
1557 tests. Make sure that precision is power of two larger than or equal
1558 to 16. Ensure shift is never negative. Use HOST_WIDE_INT_UC macro
1559 instead of ULL suffixed constants. Formatting fixes.
1560 \f
1561 Copyright (C) 2020 Free Software Foundation, Inc.
1562
1563 Copying and distribution of this file, with or without modification,
1564 are permitted in any medium without royalty provided the copyright
1565 notice and this notice are preserved.