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