1 2020-01-22 David Malcolm <dmalcolm@redhat.com>
4 * gdbinit.in (break-on-saved-diagnostic): Update for move of
5 diagnostic_manager into "ana" namespace.
6 * selftest-run-tests.c (selftest::run_tests): Update for move of
7 selftest::run_analyzer_selftests to
8 ana::selftest::run_analyzer_selftests.
10 2020-01-22 Richard Sandiford <richard.sandiford@arm.com>
12 * cfgexpand.c (union_stack_vars): Update the size.
14 2020-01-22 Richard Biener <rguenther@suse.de>
16 PR tree-optimization/93381
17 * tree-ssa-structalias.c (find_func_aliases): Assume offsetting
18 throughout, handle all conversions the same.
20 2020-01-22 Jakub Jelinek <jakub@redhat.com>
23 * config/aarch64/aarch64.c (aarch64_expand_subvti): Only use
24 gen_subdi3_compare1_imm if low_in2 satisfies aarch64_plus_immediate
25 predicate, not whenever it is CONST_INT. Otherwise, force_reg it.
26 Call force_reg on high_in2 unconditionally.
28 2020-01-22 Martin Liska <mliska@suse.cz>
30 PR tree-optimization/92924
31 * profile.c (compute_value_histograms): Divide
34 2020-01-22 Jakub Jelinek <jakub@redhat.com>
37 * output.h (assemble_name_resolve): Declare.
38 * varasm.c (assemble_name_resolve): New function.
39 (assemble_name): Use it.
40 * config/i386/i386.h (ASM_OUTPUT_SYMBOL_REF): Define.
42 2020-01-22 Joseph Myers <joseph@codesourcery.com>
44 * doc/sourcebuild.texi (Texinfo Manuals, Front End): Refer to
45 update_web_docs_git instead of update_web_docs_svn.
47 2020-01-21 Andrew Pinski <apinski@marvell.com>
50 * config/aarch64/aarch64.md (tlsgd_small_<mode>): Have operand 0
51 as PTR mode. Have operand 1 as being modeless, it can be P mode.
52 (*tlsgd_small_<mode>): Likewise.
53 * config/aarch64/aarch64.c (aarch64_load_symref_appropriately)
54 <case SYMBOL_SMALL_TLSGD>: Call gen_tlsgd_small_* with a ptr_mode
55 register. Convert that register back to dest using convert_mode.
57 2020-01-21 Jim Wilson <jimw@sifive.com>
59 * config/riscv/riscv-sr.c (riscv_sr_match_prologue): Use INTVAL
62 2020-01-21 H.J. Lu <hongjiu.lu@intel.com>
63 Uros Bizjak <ubizjak@gmail.com>
66 * config/i386/i386.c (ix86_tls_module_base): Replace Pmode
68 (legitimize_tls_address): Do GNU2 TLS address computation in
69 ptr_mode and zero-extend result to Pmode.
70 * config/i386/i386.md (@tls_dynamic_gnu2_64_<mode>): Replace
71 :P with :PTR and Pmode with ptr_mode.
72 (*tls_dynamic_gnu2_lea_64_<mode>): Likewise.
73 (*tls_dynamic_gnu2_call_64_<mode>): Likewise.
74 (*tls_dynamic_gnu2_combine_64_<mode>): Likewise.
76 2020-01-21 Jakub Jelinek <jakub@redhat.com>
79 * config/riscv/riscv.c (riscv_rtx_costs) <case ZERO_EXTRACT>: Verify
80 the last two operands are CONST_INT_P before using them as such.
82 2020-01-21 Richard Sandiford <richard.sandiford@arm.com>
84 * config/aarch64/aarch64-sve-builtins.def: Use get_typenode_from_name
85 to get the integer element types.
87 2020-01-21 Richard Sandiford <richard.sandiford@arm.com>
89 * config/aarch64/aarch64-sve-builtins.h
90 (function_expander::convert_to_pmode): Declare.
91 * config/aarch64/aarch64-sve-builtins.cc
92 (function_expander::convert_to_pmode): New function.
93 (function_expander::get_contiguous_base): Use it.
94 (function_expander::prepare_gather_address_operands): Likewise.
95 * config/aarch64/aarch64-sve-builtins-sve2.cc
96 (svwhilerw_svwhilewr_impl::expand): Likewise.
98 2020-01-21 Szabolcs Nagy <szabolcs.nagy@arm.com>
101 * config/aarch64/aarch64.c (aarch64_declare_function_name): Set
102 cfun->machine->label_is_assembled.
103 (aarch64_print_patchable_function_entry): New.
104 (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Define.
105 * config/aarch64/aarch64.h (struct machine_function): New field,
108 2020-01-21 David Malcolm <dmalcolm@redhat.com>
111 * ipa-profile.c (ipa_profile): Delete call_sums and set it to
114 2020-01-18 Jan Hubicka <hubicka@ucw.cz>
117 * cgraph.c (cgraph_edge::resolve_speculation,
118 cgraph_edge::redirect_call_stmt_to_callee): Fix update of
121 2020-01-21 Martin Liska <mliska@suse.cz>
123 * config/rs6000/rs6000.c (common_mode_defined): Remove
126 2020-01-21 Richard Biener <rguenther@suse.de>
128 PR tree-optimization/92328
129 * tree-ssa-sccvn.c (vn_reference_lookup_3): Preserve
130 type when value-numbering same-sized store by inserting a
132 (eliminate_dom_walker::eliminate_stmt): When eliminating
133 a redundant store handle bit-reinterpretation of the same value.
135 2020-01-21 Andrew Pinski <apinski@marvel.com>
138 * tree-into-ssa.c (prepare_block_for_update_1): Split out
140 (prepare_block_for_update): This. Use a worklist instead of
143 2020-01-21 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
145 * gcc/config/arm/arm.c (clear_operation_p):
146 Initialise last_regno, skip first iteration
147 based on the first_set value and use ints instead
148 of the unnecessary HOST_WIDE_INTs.
150 2020-01-21 Jakub Jelinek <jakub@redhat.com>
153 * config/rs6000/rs6000.c (rs6000_emit_cmove): If using fsel, punt for
154 compare_mode other than SFmode or DFmode.
156 2020-01-21 Kito Cheng <kito.cheng@sifive.com>
159 * config/riscv/riscv-protos.h (riscv_hard_regno_rename_ok): New.
160 * config/riscv/riscv.c (riscv_hard_regno_rename_ok): New.
161 * config/riscv/riscv.h (HARD_REGNO_RENAME_OK): Defined.
163 2020-01-20 Wilco Dijkstra <wdijkstr@arm.com>
165 * config/aarch64/aarch64.c (neoversen1_tunings): Set jump_align to 4.
167 2020-01-20 Andrew Pinski <apinski@marvell.com>
170 * targhooks.c (default_print_patchable_function_entry): Use
171 output_asm_insn to emit the nop instruction.
173 2020-01-20 Fangrui Song <maskray@google.com>
176 * targhooks.c (default_print_patchable_function_entry): Align to
179 2020-01-20 H.J. Lu <hongjiu.lu@intel.com>
182 * config/i386/i386.c (legitimize_tls_address): Pass Pmode to
183 gen_tls_dynamic_gnu2_64. Compute GNU2 TLS address in ptr_mode.
184 * config/i386/i386.md (tls_dynamic_gnu2_64): Renamed to ...
185 (@tls_dynamic_gnu2_64_<mode>): This. Replace DI with P.
186 (*tls_dynamic_gnu2_lea_64): Renamed to ...
187 (*tls_dynamic_gnu2_lea_64_<mode>): This. Replace DI with P.
188 Remove the {q} suffix from lea.
189 (*tls_dynamic_gnu2_call_64): Renamed to ...
190 (*tls_dynamic_gnu2_call_64_<mode>): This. Replace DI with P.
191 (*tls_dynamic_gnu2_combine_64): Renamed to ...
192 (*tls_dynamic_gnu2_combine_64_<mode>): This. Replace DI with P.
193 Pass Pmode to gen_tls_dynamic_gnu2_64.
195 2020-01-20 Wilco Dijkstra <wdijkstr@arm.com>
197 * config/aarch64/aarch64.h (SLOW_BYTE_ACCESS): Set to 1.
199 2020-01-20 Richard Sandiford <richard.sandiford@arm.com>
201 * config/aarch64/aarch64-sve-builtins-base.cc
202 (svld1ro_impl::memory_vector_mode): Remove parameter name.
204 2020-01-20 Richard Biener <rguenther@suse.de>
207 * dwarf2out.c (prune_unused_types): Unconditionally mark
208 called function DIEs.
210 2020-01-20 Martin Liska <mliska@suse.cz>
212 PR tree-optimization/93199
213 * tree-eh.c (struct leh_state): Add
214 new field outer_non_cleanup.
215 (cleanup_is_dead_in): Pass leh_state instead
216 of eh_region. Add a checking that state->outer_non_cleanup
217 points to outer non-clean up region.
218 (lower_try_finally): Record outer_non_cleanup
220 (lower_catch): Likewise.
221 (lower_eh_filter): Likewise.
222 (lower_eh_must_not_throw): Likewise.
223 (lower_cleanup): Likewise.
225 2020-01-20 Richard Biener <rguenther@suse.de>
227 PR tree-optimization/93094
228 * tree-vectorizer.h (vect_loop_versioning): Adjust.
229 (vect_transform_loop): Likewise.
230 * tree-vectorizer.c (try_vectorize_loop_1): Pass down
231 loop_vectorized_call to vect_transform_loop.
232 * tree-vect-loop.c (vect_transform_loop): Pass down
233 loop_vectorized_call to vect_loop_versioning.
234 * tree-vect-loop-manip.c (vect_loop_versioning): Use
235 the earlier discovered loop_vectorized_call.
237 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
239 * doc/contribute.texi: Update for SVN -> Git transition.
240 * doc/install.texi: Likewise.
242 2020-01-18 Jan Hubicka <hubicka@ucw.cz>
245 * cgraph.c (cgraph_edge::make_speculative): Increase number of
247 (verify_speculative_call): New function
248 (cgraph_node::verify_node): Use it.
249 * ipa-profile.c (ipa_profile): Fix formating; do not set number of
252 2020-01-18 Jan Hubicka <hubicka@ucw.cz>
255 * cgraph.c (cgraph_edge::resolve_speculation): Fix foramting.
256 (cgraph_edge::make_direct): Remove all indirect targets.
257 (cgraph_edge::redirect_call_stmt_to_callee): Use make_direct..
258 (cgraph_node::verify_node): Verify that only one call_stmt or
260 * cgraphclones.c (cgraph_edge::clone): Set only one call_stmt or
262 * lto-cgraph.c (lto_output_edge): Simplify streaming of stmt.
263 (lto_output_ref): Simplify streaming of stmt.
264 * lto-streamer-in.c (fixup_call_stmt_edges_1): Clear lto_stmt_uid.
266 2020-01-18 Tamar Christina <tamar.christina@arm.com>
268 * config/aarch64/aarch64-sve-builtins-base.cc (memory_vector_mode):
269 Mark parameter unused.
271 2020-01-18 Hans-Peter Nilsson <hp@axis.com>
273 * config.gcc <obsolete targets>: Add crisv32-*-* and cris-*-linux*
275 2019-01-18 Gerald Pfeifer <gerald@pfeifer.com>
277 * varpool.c (ctor_useable_for_folding_p): Fix grammar.
279 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
281 * Makefile.in: Add coroutine-passes.o.
282 * builtin-types.def (BT_CONST_SIZE): New.
283 (BT_FN_BOOL_PTR): New.
284 (BT_FN_PTR_PTR_CONST_SIZE_BOOL): New.
285 * builtins.def (DEF_COROUTINE_BUILTIN): New.
286 * coroutine-builtins.def: New file.
287 * coroutine-passes.cc: New file.
288 * function.h (struct GTY function): Add a bit to indicate that the
289 function is a coroutine component.
290 * internal-fn.c (expand_CO_FRAME): New.
291 (expand_CO_YIELD): New.
292 (expand_CO_SUSPN): New.
293 (expand_CO_ACTOR): New.
294 * internal-fn.def (CO_ACTOR): New.
298 * passes.def: Add pass_coroutine_lower_builtins,
299 pass_coroutine_early_expand_ifns.
300 * tree-pass.h (make_pass_coroutine_lower_builtins): New.
301 (make_pass_coroutine_early_expand_ifns): New.
302 * doc/invoke.texi: Document the fcoroutines command line
305 2020-01-18 Jakub Jelinek <jakub@redhat.com>
307 * config/arm/vfp.md (*clear_vfp_multiple): Remove unused variable.
310 * config/arm/arm.c (clear_operation_p): Don't use REGNO until
311 after checking the argument is a REG. Don't use REGNO (reg)
312 again to set last_regno, reuse regno variable instead.
314 2020-01-17 David Malcolm <dmalcolm@redhat.com>
316 * doc/analyzer.texi (Limitations): Add note about NaN.
318 2020-01-17 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
319 Sudakshina Das <sudi.das@arm.com>
321 * config/arm/arm.md (ashldi3): Generate thumb2_lsll for both reg
323 (ashrdi3): Generate thumb2_asrl for both reg and valid immediate.
324 (lshrdi3): Generate thumb2_lsrl for valid immediates.
325 * config/arm/constraints.md (Pg): New.
326 * config/arm/predicates.md (long_shift_imm): New.
327 (arm_reg_or_long_shift_imm): Likewise.
328 * config/arm/thumb2.md (thumb2_asrl): New immediate alternative.
329 (thumb2_lsll): Likewise.
332 2020-01-17 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
333 Sudakshina Das <sudi.das@arm.com>
335 * config/arm/arm.md (ashldi3): Generate thumb2_lsll for TARGET_HAVE_MVE.
336 (ashrdi3): Generate thumb2_asrl for TARGET_HAVE_MVE.
337 * config/arm/arm.c (arm_hard_regno_mode_ok): Allocate even odd
338 register pairs for doubleword quantities for ARMv8.1M-Mainline.
339 * config/arm/thumb2.md (thumb2_asrl): New.
340 (thumb2_lsll): Likewise.
342 2020-01-17 Jakub Jelinek <jakub@redhat.com>
344 * config/arm/arm.c (cmse_nonsecure_call_inline_register_clear): Remove
347 2020-01-17 Alexander Monakov <amonakov@ispras.ru>
349 * gdbinit.in (help-gcc-hooks): New command.
350 (pp, pr, prl, pt, pct, pgg, pgq, pgs, pge, pmz, ptc, pdn, ptn, pdd, prc,
351 pi, pbm, pel, trt): Take $arg0 instead of $ if supplied. Update
354 2020-01-17 Matthew Malcomson <matthew.malcomson@arm.com>
356 * config/aarch64/aarch64-sve.md (@aarch64_sve_ld1ro<mode>): Use the
357 correct target macro.
359 2020-01-17 Matthew Malcomson <matthew.malcomson@arm.com>
361 * config/aarch64/aarch64-protos.h
362 (aarch64_sve_ld1ro_operand_p): New.
363 * config/aarch64/aarch64-sve-builtins-base.cc
364 (class load_replicate): New.
365 (class svld1ro_impl): New.
366 (class svld1rq_impl): Change to inherit from load_replicate.
367 (svld1ro): New sve intrinsic function base.
368 * config/aarch64/aarch64-sve-builtins-base.def (svld1ro):
369 New DEF_SVE_FUNCTION.
370 * config/aarch64/aarch64-sve-builtins-base.h
372 * config/aarch64/aarch64-sve-builtins.cc
373 (function_expander::add_mem_operand): Modify assert to allow
375 * config/aarch64/aarch64-sve.md (@aarch64_sve_ld1ro<mode>): New
377 * config/aarch64/aarch64.c
378 (aarch64_sve_ld1rq_operand_p): Implement in terms of ...
379 (aarch64_sve_ld1rq_ld1ro_operand_p): This.
380 (aarch64_sve_ld1ro_operand_p): New.
381 * config/aarch64/aarch64.md (UNSPEC_LD1RO): New unspec.
382 * config/aarch64/constraints.md (UOb,UOh,UOw,UOd): New.
383 * config/aarch64/predicates.md
384 (aarch64_sve_ld1ro_operand_{b,h,w,d}): New.
386 2020-01-17 Matthew Malcomson <matthew.malcomson@arm.com>
388 * config/aarch64/aarch64-c.c (_ARM_FEATURE_MATMUL_FLOAT64):
389 Introduce this ACLE specified predefined macro.
390 * config/aarch64/aarch64-option-extensions.def (f64mm): New.
391 (fp): Disabling this disables f64mm.
392 (simd): Disabling this disables f64mm.
393 (fp16): Disabling this disables f64mm.
394 (sve): Disabling this disables f64mm.
395 * config/aarch64/aarch64.h (AARCH64_FL_F64MM): New.
396 (AARCH64_ISA_F64MM): New.
398 * doc/invoke.texi (f64mm): Document new option.
400 2020-01-17 Wilco Dijkstra <wdijkstr@arm.com>
402 * config/aarch64/aarch64.c (generic_tunings): Add branch fusion.
403 (neoversen1_tunings): Likewise.
405 2020-01-17 Wilco Dijkstra <wdijkstr@arm.com>
408 * config/aarch64/aarch64.c (aarch64_split_compare_and_swap)
409 Add assert to ensure prolog has been emitted.
410 (aarch64_split_atomic_op): Likewise.
411 * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>)
412 Use epilogue_completed rather than reload_completed.
413 (aarch64_atomic_exchange<mode>): Likewise.
414 (aarch64_atomic_<atomic_optab><mode>): Likewise.
415 (atomic_nand<mode>): Likewise.
416 (aarch64_atomic_fetch_<atomic_optab><mode>): Likewise.
417 (atomic_fetch_nand<mode>): Likewise.
418 (aarch64_atomic_<atomic_optab>_fetch<mode>): Likewise.
419 (atomic_nand_fetch<mode>): Likewise.
421 2020-01-17 Richard Sandiford <richard.sandiford@arm.com>
424 * config/aarch64/aarch64.h (REVERSIBLE_CC_MODE): Return false
426 (REVERSE_CONDITION): Delete.
427 * config/aarch64/iterators.md (CC_ONLY): New mode iterator.
428 (CCFP_CCFPE): Likewise.
429 (e): New mode attribute.
430 * config/aarch64/aarch64.md (ccmp<GPI:mode>): Rename to...
431 (@ccmp<CC_ONLY:mode><GPI:mode>): ...this, using CC_ONLY instead of CC.
432 (fccmp<GPF:mode>, fccmpe<GPF:mode>): Merge into...
433 (@ccmp<CCFP_CCFPE:mode><GPF:mode>): ...this combined pattern.
434 (@ccmp<CC_ONLY:mode><GPI:mode>_rev): New pattern.
435 (@ccmp<CCFP_CCFPE:mode><GPF:mode>_rev): Likewise.
436 * config/aarch64/aarch64.c (aarch64_gen_compare_reg): Update
437 name of generator from gen_ccmpdi to gen_ccmpccdi.
438 (aarch64_gen_ccmp_next): Use code_for_ccmp. If we want to reverse
439 the previous comparison but aren't able to, use the new ccmp_rev
442 2020-01-17 Richard Sandiford <richard.sandiford@arm.com>
444 * gimplify.c (gimplify_return_expr): Use poly_int_tree_p rather
445 than testing directly for INTEGER_CST.
446 (gimplify_target_expr, gimplify_omp_depend): Likewise.
448 2020-01-17 Jakub Jelinek <jakub@redhat.com>
450 PR tree-optimization/93292
451 * tree-vect-stmts.c (vectorizable_comparison): Punt also if
452 get_vectype_for_scalar_type returns NULL.
454 2020-01-16 Jan Hubicka <hubicka@ucw.cz>
456 * params.opt (-param=max-predicted-iterations): Increase range from 0.
457 * predict.c (estimate_loops): Add 1 to param_max_predicted_iterations.
459 2020-01-16 Jan Hubicka <hubicka@ucw.cz>
461 * ipa-fnsummary.c (estimate_calls_size_and_time): Fix formating of
463 * params.opt: (max-predicted-iterations): Set bounds.
464 * predict.c (real_almost_one, real_br_prob_base,
465 real_inv_br_prob_base, real_one_half, real_bb_freq_max): Remove.
466 (propagate_freq): Add max_cyclic_prob parameter; cap cyclic
467 probabilities; do not truncate to reg_br_prob_bases.
468 (estimate_loops_at_level): Pass max_cyclic_prob.
469 (estimate_loops): Compute max_cyclic_prob.
470 (estimate_bb_frequencies): Do not initialize real_*; update calculation
472 * profile-count.c (profile_probability::to_sreal): New.
473 * profile-count.h (class sreal): Move up in file.
474 (profile_probability::to_sreal): Declare.
476 2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
479 (arm_invalid_conversion): New function for target hook.
480 (arm_invalid_unary_op): New function for target hook.
481 (arm_invalid_binary_op): New function for target hook.
483 2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
485 * config.gcc: Add arm_bf16.h.
486 * config/arm/arm-builtins.c (arm_mangle_builtin_type): Fix comment.
487 (arm_simd_builtin_std_type): Add BFmode.
488 (arm_init_simd_builtin_types): Define element types for vector types.
489 (arm_init_bf16_types): New function.
490 (arm_init_builtins): Add arm_init_bf16_types function call.
491 * config/arm/arm-modes.def: Add BFmode and V4BF, V8BF vector modes.
492 * config/arm/arm-simd-builtin-types.def: Add V4BF, V8BF.
493 * config/arm/arm.c (aapcs_vfp_sub_candidate): Add BFmode.
494 (arm_hard_regno_mode_ok): Add BFmode and tidy up statements.
495 (arm_vector_mode_supported_p): Add V4BF, V8BF.
496 (arm_mangle_type): Add __bf16.
497 * config/arm/arm.h: Add V4BF, V8BF to VALID_NEON_DREG_MODE,
498 VALID_NEON_QREG_MODE respectively. Add export arm_bf16_type_node,
499 arm_bf16_ptr_type_node.
500 * config/arm/arm.md: Add BFmode to movhf expand, mov pattern and
501 define_split between ARM registers.
502 * config/arm/arm_bf16.h: New file.
503 * config/arm/arm_neon.h: Add arm_bf16.h and Bfloat vector types.
504 * config/arm/iterators.md: (ANY64_BF, VDXMOV, VHFBF, HFBF, fporbf): New.
506 * config/arm/neon.md: Add BF vector types to movhf NEON move patterns.
507 * config/arm/vfp.md: Add BFmode to movhf patterns.
509 2020-01-16 Mihail Ionescu <mihail.ionescu@arm.com>
510 Andre Vieira <andre.simoesdiasvieira@arm.com>
512 * config/arm/arm-cpus.in (mve, mve_float): New features.
513 (dsp, mve, mve.fp): New options.
514 * config/arm/arm.h (TARGET_HAVE_MVE, TARGET_HAVE_MVE_FLOAT): Define.
515 * config/arm/t-rmprofile: Map v8.1-M multilibs to v8-M.
516 * doc/invoke.texi: Document the armv8.1-m mve and dps options.
518 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
519 Thomas Preud'homme <thomas.preudhomme@arm.com>
521 * config/arm/arm-cpus.in (ARMv8_1m_main): Redefine as an extension to
523 * config/arm/arm.c (arm_options_perform_arch_sanity_checks): Remove
524 error for using -mcmse when targeting Armv8.1-M Mainline.
526 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
527 Thomas Preud'homme <thomas.preudhomme@arm.com>
529 * config/arm/arm.md (nonsecure_call_internal): Do not force memory
530 address in r4 when targeting Armv8.1-M Mainline.
531 (nonsecure_call_value_internal): Likewise.
532 * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Make memory address
533 a register match_operand again. Emit BLXNS when targeting
535 (nonsecure_call_value_reg_thumb2): Likewise.
537 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
538 Thomas Preud'homme <thomas.preudhomme@arm.com>
540 * config/arm/arm.c (arm_add_cfa_adjust_cfa_note): Declare early.
541 (cmse_nonsecure_call_inline_register_clear): Define new lazy_fpclear
542 variable as true when floating-point ABI is not hard. Replace
543 check against TARGET_HARD_FLOAT_ABI by checks against lazy_fpclear.
544 Generate VLSTM and VLLDM instruction respectively before and
545 after a function call to cmse_nonsecure_call function.
546 * config/arm/unspecs.md (VUNSPEC_VLSTM): Define unspec.
547 (VUNSPEC_VLLDM): Likewise.
548 * config/arm/vfp.md (lazy_store_multiple_insn): New define_insn.
549 (lazy_load_multiple_insn): Likewise.
551 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
552 Thomas Preud'homme <thomas.preudhomme@arm.com>
554 * config/arm/arm.c (vfp_emit_fstmd): Declare early.
555 (arm_emit_vfp_multi_reg_pop): Likewise.
556 (cmse_nonsecure_call_inline_register_clear): Abstract number of VFP
557 registers to clear in max_fp_regno. Emit VPUSH and VPOP to save and
558 restore callee-saved VFP registers.
560 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
561 Thomas Preud'homme <thomas.preudhomme@arm.com>
563 * config/arm/arm.c (arm_emit_multi_reg_pop): Declare early.
564 (cmse_nonsecure_call_clear_caller_saved): Rename into ...
565 (cmse_nonsecure_call_inline_register_clear): This. Save and clear
566 callee-saved GPRs as well as clear ip register before doing a nonsecure
567 call then restore callee-saved GPRs after it when targeting
569 (arm_reorg): Adapt to function rename.
571 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
572 Thomas Preud'homme <thomas.preudhomme@arm.com>
574 * config/arm/arm-protos.h (clear_operation_p): Adapt prototype.
575 * config/arm/arm.c (clear_operation_p): Extend to be able to check a
576 clear_vfp_multiple pattern based on a new vfp parameter.
577 (cmse_clear_registers): Generate VSCCLRM to clear VFP registers when
578 targeting Armv8.1-M Mainline.
579 (cmse_nonsecure_entry_clear_before_return): Clear VFP registers
580 unconditionally when targeting Armv8.1-M Mainline architecture. Check
581 whether VFP registers are available before looking call_used_regs for a
583 * config/arm/predicates.md (clear_multiple_operation): Adapt to change
584 of prototype of clear_operation_p.
585 (clear_vfp_multiple_operation): New predicate.
586 * config/arm/unspecs.md (VUNSPEC_VSCCLRM_VPR): New volatile unspec.
587 * config/arm/vfp.md (clear_vfp_multiple): New define_insn.
589 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
590 Thomas Preud'homme <thomas.preudhomme@arm.com>
592 * config/arm/arm-protos.h (clear_operation_p): Declare.
593 * config/arm/arm.c (clear_operation_p): New function.
594 (cmse_clear_registers): Generate clear_multiple instruction pattern if
595 targeting Armv8.1-M Mainline or successor.
596 (output_return_instruction): Only output APSR register clearing if
597 Armv8.1-M Mainline instructions not available.
598 (thumb_exit): Likewise.
599 * config/arm/predicates.md (clear_multiple_operation): New predicate.
600 * config/arm/thumb2.md (clear_apsr): New define_insn.
601 (clear_multiple): Likewise.
602 * config/arm/unspecs.md (VUNSPEC_CLRM_APSR): New volatile unspec.
604 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
605 Thomas Preud'homme <thomas.preudhomme@arm.com>
607 * config/arm/arm.c (fp_sysreg_names): Declare and define.
608 (use_return_insn): Also return false for Armv8.1-M Mainline.
609 (output_return_instruction): Skip FPSCR clearing if Armv8.1-M
610 Mainline instructions are available.
611 (arm_compute_frame_layout): Allocate space in frame for FPCXTNS
612 when targeting Armv8.1-M Mainline Security Extensions.
613 (arm_expand_prologue): Save FPCXTNS if this is an Armv8.1-M
614 Mainline entry function.
615 (cmse_nonsecure_entry_clear_before_return): Clear IP and r4 if
616 targeting Armv8.1-M Mainline or successor.
617 (arm_expand_epilogue): Fix indentation of caller-saved register
618 clearing. Restore FPCXTNS if this is an Armv8.1-M Mainline
620 * config/arm/arm.h (TARGET_HAVE_FP_CMSE): New macro.
621 (FP_SYSREGS): Likewise.
622 (enum vfp_sysregs_encoding): Define enum.
623 (fp_sysreg_names): Declare.
624 * config/arm/unspecs.md (VUNSPEC_VSTR_VLDR): New volatile unspec.
625 * config/arm/vfp.md (push_fpsysreg_insn): New define_insn.
626 (pop_fpsysreg_insn): Likewise.
628 2020-01-16 Mihail-Calin Ionescu <mihail.ionescu@arm.com>
629 Thomas Preud'homme <thomas.preudhomme@arm.com>
631 * config/arm/arm-cpus.in (armv8_1m_main): New feature.
632 (ARMv4, ARMv4t, ARMv5t, ARMv5te, ARMv5tej, ARMv6, ARMv6j, ARMv6k,
633 ARMv6z, ARMv6kz, ARMv6zk, ARMv6t2, ARMv6m, ARMv7, ARMv7a, ARMv7ve,
634 ARMv7r, ARMv7m, ARMv7em, ARMv8a, ARMv8_1a, ARMv8_2a, ARMv8_3a,
635 ARMv8_4a, ARMv8_5a, ARMv8m_base, ARMv8m_main, ARMv8r): Reindent.
636 (ARMv8_1m_main): New feature group.
637 (armv8.1-m.main): New architecture.
638 * config/arm/arm-tables.opt: Regenerate.
639 * config/arm/arm.c (arm_arch8_1m_main): Define and default initialize.
640 (arm_option_reconfigure_globals): Initialize arm_arch8_1m_main.
641 (arm_options_perform_arch_sanity_checks): Error out when targeting
642 Armv8.1-M Mainline Security Extensions.
643 * config/arm/arm.h (arm_arch8_1m_main): Declare.
645 2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
647 * config/aarch64/aarch64-simd-builtins.def (aarch64_bfdot,
648 aarch64_bfdot_lane, aarch64_bfdot_laneq): New.
649 * config/aarch64/aarch64-simd.md (aarch64_bfdot, aarch64_bfdot_lane,
650 aarch64_bfdot_laneq): New.
651 * config/aarch64/arm_bf16.h (vbfdot_f32, vbfdotq_f32,
652 vbfdot_lane_f32, vbfdotq_lane_f32, vbfdot_laneq_f32,
653 vbfdotq_laneq_f32): New.
654 * config/aarch64/iterators.md (UNSPEC_BFDOT, Vbfdottype,
656 (isquadop): Add V4BF, V8BF.
658 2020-01-16 Stam Markianos-Wright <stam.markianos-wright@arm.com>
660 * config/aarch64/aarch64-builtins.c: (enum aarch64_type_qualifiers):
661 New qualifier_lane_quadtup_index, TYPES_TERNOP_SSUS,
662 TYPES_QUADOPSSUS_LANE_QUADTUP, TYPES_QUADOPSSSU_LANE_QUADTUP.
663 (aarch64_simd_expand_args): Add case SIMD_ARG_LANE_QUADTUP_INDEX.
664 (aarch64_simd_expand_builtin): Add qualifier_lane_quadtup_index.
665 * config/aarch64/aarch64-simd-builtins.def (usdot, usdot_lane,
666 usdot_laneq, sudot_lane,sudot_laneq): New.
667 * config/aarch64/aarch64-simd.md (aarch64_usdot): New.
668 (aarch64_<sur>dot_lane): New.
669 * config/aarch64/arm_neon.h (vusdot_s32): New.
671 (vusdot_lane_s32): New.
672 (vsudot_lane_s32): New.
673 * config/aarch64/iterators.md (DOTPROD_I8MM): New iterator.
674 (UNSPEC_USDOT, UNSPEC_SUDOT): New unspecs.
676 2020-01-16 Martin Liska <mliska@suse.cz>
678 * value-prof.c (dump_histogram_value): Fix
679 obvious spacing issue.
681 2020-01-16 Andrew Pinski <apinski@marvell.com>
683 * tree-ssa-sccvn.c(vn_reference_lookup_3): Check lhs for
684 !storage_order_barrier_p.
686 2020-01-16 Andrew Pinski <apinski@marvell.com>
688 * sched-int.h (_dep): Add unused bit-field field for the padding.
689 * sched-deps.c (init_dep_1): Init unused field.
691 2020-01-16 Andrew Pinski <apinski@marvell.com>
693 * optabs.h (create_expand_operand): Initialize target field also.
695 2020-01-16 Andre Vieira <andre.simoesdiasvieira@arm.com>
697 PR tree-optimization/92429
698 * tree-ssa-loop-niter.h (simplify_replace_tree): Add parameter.
699 * tree-ssa-loop-niter.c (simplify_replace_tree): Add parameter to
701 * tree-vect-loop.c (update_epilogue_vinfo): Do not fold when replacing
704 2020-01-16 Richard Sandiford <richard.sandiford@arm.com>
706 * config/aarch64/aarch64.c (aarch64_split_sve_subreg_move): Apply
707 aarch64_sve_int_mode to each mode.
709 2020-01-15 David Malcolm <dmalcolm@redhat.com>
711 * doc/analyzer.texi (Overview): Add note about
714 2020-01-15 Wilco Dijkstra <wdijkstr@arm.com>
716 PR tree-optimization/93231
717 * tree-ssa-forwprop.c (optimize_count_trailing_zeroes): Check
718 input_type is unsigned. Use tree_to_shwi for shift constant.
719 Check CST_STRING element size is CHAR_TYPE_SIZE bits.
720 (simplify_count_trailing_zeroes): Add test to handle known non-zero
721 inputs more efficiently.
723 2020-01-15 Uroš Bizjak <ubizjak@gmail.com>
725 * config/i386/i386.md (*movsf_internal): Do not require
726 SSE2 ISA for alternatives 14 and 15.
728 2020-01-15 Richard Biener <rguenther@suse.de>
731 * tree-eh.c (sink_clobbers): If we already visited the destination
732 block do not defer insertion.
733 (pass_lower_eh_dispatch::execute): Maintain BB_VISITED for
734 the purpose of defered insertion.
736 2020-01-15 Jakub Jelinek <jakub@redhat.com>
738 * BASE-VER: Bump to 10.0.1.
740 2020-01-15 Richard Sandiford <richard.sandiford@arm.com>
742 PR tree-optimization/93247
743 * tree-vect-loop.c (update_epilogue_loop_vinfo): Check the access
744 type of the stmt that we're going to vectorize.
746 2020-01-15 Richard Sandiford <richard.sandiford@arm.com>
748 * tree-vect-slp.c (vectorize_slp_instance_root_stmt): Use a
749 VIEW_CONVERT_EXPR if the vectorized constructor has a diffeent
752 2020-01-15 Martin Liska <mliska@suse.cz>
754 * ipa-profile.c (ipa_profile_read_edge_summary): Do not allow
755 2 calls of streamer_read_hwi in a function call.
757 2020-01-15 Richard Biener <rguenther@suse.de>
759 * alias.c (record_alias_subset): Avoid redundant work when
760 subset is already recorded.
762 2020-01-14 David Malcolm <dmalcolm@redhat.com>
764 * doc/invoke.texi (-fdiagnostics-show-cwe): Add note that some of
765 the analyzer options provide CWE identifiers.
767 2020-01-14 David Malcolm <dmalcolm@redhat.com>
769 * tree-diagnostic-path.cc (path_summary::event_range::print):
770 When testing for UNKNOWN_LOCATION, look through ad-hoc wrappers
771 using get_pure_location.
773 2020-01-15 Jakub Jelinek <jakub@redhat.com>
775 PR tree-optimization/93262
776 * tree-ssa-dse.c (maybe_trim_memstar_call): For *_chk builtins,
777 perform head trimming only if the last argument is constant,
778 either all ones, or larger or equal to head trim, in the latter
779 case decrease the last argument by head_trim.
781 PR tree-optimization/93249
782 * tree-ssa-dse.c: Include builtins.h and gimple-fold.h.
783 (maybe_trim_memstar_call): Move head_trim and tail_trim vars to
784 function body scope, reindent. For BUILTIN_IN_STRNCPY*, don't
785 perform head trim unless we can prove there are no '\0' chars
786 from the source among the first head_trim chars.
788 2020-01-14 David Malcolm <dmalcolm@redhat.com>
790 * Makefile.in (ANALYZER_OBJS): Add analyzer/function-set.o.
792 2020-01-15 Jakub Jelinek <jakub@redhat.com>
796 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1,
797 *<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1,
798 *<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1,
799 *<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1): Use
800 just a single alternative instead of two, make operands 1 and 2
803 2020-01-14 Jan Hubicka <hubicka@ucw.cz>
806 * ipa-devirt.c (odr_types_equivalent_p): Compare TREE_ADDRESSABLE and
809 2020-01-14 David Malcolm <dmalcolm@redhat.com>
811 * Makefile.in (lang_opt_files): Add analyzer.opt.
812 (ANALYZER_OBJS): New.
813 (OBJS): Add digraph.o, graphviz.o, ordered-hash-map-tests.o,
814 tristate.o and ANALYZER_OBJS.
815 (TEXI_GCCINT_FILES): Add analyzer.texi.
816 * common.opt (-fanalyzer): New driver option.
817 * config.in: Regenerate.
818 * configure: Regenerate.
819 * configure.ac (--disable-analyzer, ENABLE_ANALYZER): New option.
820 (gccdepdir): Also create depdir for "analyzer" subdir.
821 * digraph.cc: New file.
822 * digraph.h: New file.
823 * doc/analyzer.texi: New file.
824 * doc/gccint.texi ("Static Analyzer") New menu item.
825 (analyzer.texi): Include it.
826 * doc/invoke.texi ("Static Analyzer Options"): New list and new section.
827 ("Warning Options"): Add static analysis warnings to the list.
828 (-Wno-analyzer-double-fclose): New option.
829 (-Wno-analyzer-double-free): New option.
830 (-Wno-analyzer-exposure-through-output-file): New option.
831 (-Wno-analyzer-file-leak): New option.
832 (-Wno-analyzer-free-of-non-heap): New option.
833 (-Wno-analyzer-malloc-leak): New option.
834 (-Wno-analyzer-possible-null-argument): New option.
835 (-Wno-analyzer-possible-null-dereference): New option.
836 (-Wno-analyzer-null-argument): New option.
837 (-Wno-analyzer-null-dereference): New option.
838 (-Wno-analyzer-stale-setjmp-buffer): New option.
839 (-Wno-analyzer-tainted-array-index): New option.
840 (-Wno-analyzer-use-after-free): New option.
841 (-Wno-analyzer-use-of-pointer-in-stale-stack-frame): New option.
842 (-Wno-analyzer-use-of-uninitialized-value): New option.
843 (-Wanalyzer-too-complex): New option.
844 (-fanalyzer-call-summaries): New warning.
845 (-fanalyzer-checker=): New warning.
846 (-fanalyzer-fine-grained): New warning.
847 (-fno-analyzer-state-merge): New warning.
848 (-fno-analyzer-state-purge): New warning.
849 (-fanalyzer-transitivity): New warning.
850 (-fanalyzer-verbose-edges): New warning.
851 (-fanalyzer-verbose-state-changes): New warning.
852 (-fanalyzer-verbosity=): New warning.
853 (-fdump-analyzer): New warning.
854 (-fdump-analyzer-callgraph): New warning.
855 (-fdump-analyzer-exploded-graph): New warning.
856 (-fdump-analyzer-exploded-nodes): New warning.
857 (-fdump-analyzer-exploded-nodes-2): New warning.
858 (-fdump-analyzer-exploded-nodes-3): New warning.
859 (-fdump-analyzer-supergraph): New warning.
860 * doc/sourcebuild.texi (dg-require-dot): New.
862 * gdbinit.in (break-on-saved-diagnostic): New command.
863 * graphviz.cc: New file.
864 * graphviz.h: New file.
865 * ordered-hash-map-tests.cc: New file.
866 * ordered-hash-map.h: New file.
867 * passes.def (pass_analyzer): Add before
868 pass_ipa_whole_program_visibility.
869 * selftest-run-tests.c (selftest::run_tests): Call
870 selftest::ordered_hash_map_tests_cc_tests.
871 * selftest.h (selftest::ordered_hash_map_tests_cc_tests): New
873 * shortest-paths.h: New file.
874 * timevar.def (TV_ANALYZER): New timevar.
875 (TV_ANALYZER_SUPERGRAPH): Likewise.
876 (TV_ANALYZER_STATE_PURGE): Likewise.
877 (TV_ANALYZER_PLAN): Likewise.
878 (TV_ANALYZER_SCC): Likewise.
879 (TV_ANALYZER_WORKLIST): Likewise.
880 (TV_ANALYZER_DUMP): Likewise.
881 (TV_ANALYZER_DIAGNOSTICS): Likewise.
882 (TV_ANALYZER_SHORTEST_PATHS): Likewise.
883 * tree-pass.h (make_pass_analyzer): New decl.
884 * tristate.cc: New file.
885 * tristate.h: New file.
887 2020-01-14 Uroš Bizjak <ubizjak@gmail.com>
890 * config/i386/i386.md (*movsf_internal): Require SSE2 ISA for
891 alternatives 9 and 10.
893 2020-01-14 David Malcolm <dmalcolm@redhat.com>
895 * attribs.c (excl_hash_traits::empty_zero_p): New static constant.
896 * gcov.c (function_start_pair_hash::empty_zero_p): Likewise.
897 * graphite.c (struct sese_scev_hash::empty_zero_p): Likewise.
898 * hash-map-tests.c (selftest::test_nonzero_empty_key): New selftest.
899 (selftest::hash_map_tests_c_tests): Call it.
900 * hash-map-traits.h (simple_hashmap_traits::empty_zero_p):
901 New static constant, using the value of = H::empty_zero_p.
902 (unbounded_hashmap_traits::empty_zero_p): Likewise, using the value
903 from default_hash_traits <Value>.
904 * hash-map.h (hash_map::empty_zero_p): Likewise, using the value
906 * hash-set-tests.c (value_hash_traits::empty_zero_p): Likewise.
907 * hash-table.h (hash_table::alloc_entries): Guard the loop of
908 calls to mark_empty with !Descriptor::empty_zero_p.
909 (hash_table::empty_slow): Conditionalize the memset call with a
910 check that Descriptor::empty_zero_p; otherwise, loop through the
911 entries calling mark_empty on them.
912 * hash-traits.h (int_hash::empty_zero_p): New static constant.
913 (pointer_hash::empty_zero_p): Likewise.
914 (pair_hash::empty_zero_p): Likewise.
915 * ipa-devirt.c (default_hash_traits <type_pair>::empty_zero_p):
917 * ipa-prop.c (ipa_bit_ggc_hash_traits::empty_zero_p): Likewise.
918 (ipa_vr_ggc_hash_traits::empty_zero_p): Likewise.
919 * profile.c (location_triplet_hash::empty_zero_p): Likewise.
920 * sanopt.c (sanopt_tree_triplet_hash::empty_zero_p): Likewise.
921 (sanopt_tree_couple_hash::empty_zero_p): Likewise.
922 * tree-hasher.h (int_tree_hasher::empty_zero_p): Likewise.
923 * tree-ssa-sccvn.c (vn_ssa_aux_hasher::empty_zero_p): Likewise.
924 * tree-vect-slp.c (bst_traits::empty_zero_p): Likewise.
926 (default_hash_traits<scalar_cond_masked_key>::empty_zero_p):
929 2020-01-14 Kewen Lin <linkw@gcc.gnu.org>
931 * cfgloopanal.c (average_num_loop_insns): Free bbs when early return,
932 fix typo on return value.
934 2020-01-14 Xiong Hu Luo <luoxhu@linux.ibm.com>
937 * cgraph.c (symbol_table::create_edge): Init speculative_id and
939 (cgraph_edge::make_speculative): Add param for setting speculative_id
941 (cgraph_edge::speculative_call_info): Update comments and find reference
942 by speculative_id for multiple indirect targets.
943 (cgraph_edge::resolve_speculation): Decrease the speculations
944 for indirect edge, drop it's speculative if not direct target
945 left. Update comments.
946 (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
947 (cgraph_node::dump): Print num_speculative_call_targets.
948 (cgraph_node::verify_node): Don't report error if speculative
949 edge not include statement.
950 (cgraph_edge::num_speculative_call_targets_p): New function.
951 * cgraph.h (int common_target_id): Remove.
952 (int common_target_probability): Remove.
953 (num_speculative_call_targets): New variable.
954 (make_speculative): Add param for setting speculative_id.
955 (cgraph_edge::num_speculative_call_targets_p): New declare.
956 (target_prob): New variable.
957 (speculative_id): New variable.
958 * ipa-fnsummary.c (analyze_function_body): Create and duplicate
959 call summaries for multiple speculative call targets.
960 * cgraphclones.c (cgraph_node::create_clone): Clone speculative_id.
961 * ipa-profile.c (struct speculative_call_target): New struct.
962 (class speculative_call_summary): New class.
963 (class speculative_call_summaries): New class.
964 (call_sums): New variable.
965 (ipa_profile_generate_summary): Generate indirect multiple targets summaries.
966 (ipa_profile_write_edge_summary): New function.
967 (ipa_profile_write_summary): Stream out indirect multiple targets summaries.
968 (ipa_profile_dump_all_summaries): New function.
969 (ipa_profile_read_edge_summary): New function.
970 (ipa_profile_read_summary_section): New function.
971 (ipa_profile_read_summary): Stream in indirect multiple targets summaries.
972 (ipa_profile): Generate num_speculative_call_targets from
974 * ipa-ref.h (speculative_id): New variable.
975 * ipa-utils.c (ipa_merge_profiles): Update with target_prob.
976 * lto-cgraph.c (lto_output_edge): Remove indirect common_target_id and
977 common_target_probability. Stream out speculative_id and
978 num_speculative_call_targets.
979 (input_edge): Likewise.
980 * predict.c (dump_prediction): Remove edges count assert to be
982 * symtab.c (symtab_node::create_reference): Init speculative_id.
983 (symtab_node::clone_references): Clone speculative_id.
984 (symtab_node::clone_referring): Clone speculative_id.
985 (symtab_node::clone_reference): Clone speculative_id.
986 (symtab_node::clear_stmts_in_references): Clear speculative_id.
987 * tree-inline.c (copy_bb): Duplicate all the speculative edges
988 if indirect call contains multiple speculative targets.
989 * value-prof.h (check_ic_target): Remove.
990 * value-prof.c (gimple_value_profile_transformations):
991 Use void function gimple_ic_transform.
992 * value-prof.c (gimple_ic_transform): Handle topn case.
993 Fix comment typos. Change it to a void function.
995 2020-01-13 Andrew Pinski <apinski@marvell.com>
997 * config/aarch64/aarch64-cores.def (octeontx2): New define.
998 (octeontx2t98): New define.
999 (octeontx2t96): New define.
1000 (octeontx2t93): New define.
1001 (octeontx2f95): New define.
1002 (octeontx2f95n): New define.
1003 (octeontx2f95mm): New define.
1004 * config/aarch64/aarch64-tune.md: Regenerate.
1005 * doc/invoke.texi (-mcpu=): Document the new cpu types.
1007 2020-01-13 Jason Merrill <jason@redhat.com>
1009 PR c++/33799 - destroy return value if local cleanup throws.
1010 * gimplify.c (gimplify_return_expr): Handle COMPOUND_EXPR.
1012 2020-01-13 Martin Liska <mliska@suse.cz>
1014 * ipa-cp.c (get_max_overall_size): Use newly
1015 renamed param param_ipa_cp_unit_growth.
1016 * params.opt: Remove legacy param name.
1018 2020-01-13 Martin Sebor <msebor@redhat.com>
1020 PR tree-optimization/93213
1021 * tree-ssa-strlen.c (handle_store): Only allow single-byte nul-over-nul
1022 stores to be eliminated.
1024 2020-01-13 Martin Liska <mliska@suse.cz>
1026 * opts.c (print_help): Do not print CL_PARAM
1027 and CL_WARNING for CL_OPTIMIZATION.
1029 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
1032 * doc/invoke.texi (Warning Options): Add caveat about some warnings
1033 depending on optimization settings.
1035 2020-01-13 Jakub Jelinek <jakub@redhat.com>
1037 PR tree-optimization/90838
1038 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
1039 SCALAR_INT_TYPE_MODE directly in CTZ_DEFINED_VALUE_AT_ZERO macro
1040 argument rather than to initialize temporary for targets that
1041 don't use the mode argument at all. Initialize ctzval to avoid
1044 2020-01-10 Thomas Schwinge <thomas@codesourcery.com>
1046 * tree.h (OMP_CLAUSE_USE_DEVICE_PTR_IF_PRESENT): New definition.
1047 * tree-core.h: Document it.
1048 * gimplify.c (gimplify_omp_workshare): Set it.
1049 * omp-low.c (lower_omp_target): Use it.
1050 * tree-pretty-print.c (dump_omp_clause): Print it.
1052 * omp-low.c (lower_omp_target) <OMP_CLAUSE_USE_DEVICE_PTR etc.>:
1053 Assert that for OpenACC we always have 'GOMP_MAP_USE_DEVICE_PTR'.
1055 2020-01-10 David Malcolm <dmalcolm@redhat.com>
1057 * Makefile.in (OBJS): Add tree-diagnostic-path.o.
1058 * common.opt (fdiagnostics-path-format=): New option.
1059 (diagnostic_path_format): New enum.
1060 (fdiagnostics-show-path-depths): New option.
1061 * coretypes.h (diagnostic_event_id_t): New forward decl.
1062 * diagnostic-color.c (color_dict): Add "path".
1063 * diagnostic-event-id.h: New file.
1064 * diagnostic-format-json.cc (json_from_expanded_location): Make
1066 (json_end_diagnostic): Call context->make_json_for_path if it
1067 exists and the diagnostic has a path.
1068 (diagnostic_output_format_init): Clear context->print_path.
1069 * diagnostic-path.h: New file.
1070 * diagnostic-show-locus.c (colorizer::set_range): Special-case
1071 when printing a run of events in a diagnostic_path so that they
1072 all get the same color.
1073 (layout::m_diagnostic_path_p): New field.
1074 (layout::layout): Initialize it.
1075 (layout::print_any_labels): Don't colorize the label text for an
1076 event in a diagnostic_path.
1077 (gcc_rich_location::add_location_if_nearby): Add
1078 "restrict_to_current_line_spans" and "label" params. Pass the
1079 former to layout.maybe_add_location_range; pass the latter
1080 when calling add_range.
1081 * diagnostic.c: Include "diagnostic-path.h".
1082 (diagnostic_initialize): Initialize context->path_format and
1083 context->show_path_depths.
1084 (diagnostic_show_any_path): New function.
1085 (diagnostic_path::interprocedural_p): New function.
1086 (diagnostic_report_diagnostic): Call diagnostic_show_any_path.
1087 (simple_diagnostic_path::num_events): New function.
1088 (simple_diagnostic_path::get_event): New function.
1089 (simple_diagnostic_path::add_event): New function.
1090 (simple_diagnostic_event::simple_diagnostic_event): New ctor.
1091 (simple_diagnostic_event::~simple_diagnostic_event): New dtor.
1092 (debug): New overload taking a diagnostic_path *.
1093 * diagnostic.def (DK_DIAGNOSTIC_PATH): New.
1094 * diagnostic.h (enum diagnostic_path_format): New enum.
1095 (json::value): New forward decl.
1096 (diagnostic_context::path_format): New field.
1097 (diagnostic_context::show_path_depths): New field.
1098 (diagnostic_context::print_path): New callback field.
1099 (diagnostic_context::make_json_for_path): New callback field.
1100 (diagnostic_show_any_path): New decl.
1101 (json_from_expanded_location): New decl.
1102 * doc/invoke.texi (-fdiagnostics-path-format=): New option.
1103 (-fdiagnostics-show-path-depths): New option.
1104 (-fdiagnostics-color): Add "path" to description of default
1105 GCC_COLORS; describe it.
1106 (-fdiagnostics-format=json): Document how diagnostic paths are
1107 represented in the JSON output format.
1108 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
1109 Add optional params "restrict_to_current_line_spans" and "label".
1110 * opts.c (common_handle_option): Handle
1111 OPT_fdiagnostics_path_format_ and
1112 OPT_fdiagnostics_show_path_depths.
1113 * pretty-print.c: Include "diagnostic-event-id.h".
1114 (pp_format): Implement "%@" format code for printing
1115 diagnostic_event_id_t *.
1116 (selftest::test_pp_format): Add tests for "%@".
1117 * selftest-run-tests.c (selftest::run_tests): Call
1118 selftest::tree_diagnostic_path_cc_tests.
1119 * selftest.h (selftest::tree_diagnostic_path_cc_tests): New decl.
1120 * toplev.c (general_init): Initialize global_dc->path_format and
1121 global_dc->show_path_depths.
1122 * tree-diagnostic-path.cc: New file.
1123 * tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Make
1124 non-static. Drop "diagnostic" param in favor of storing the
1125 original value of "where" and re-using it.
1126 (virt_loc_aware_diagnostic_finalizer): Update for dropped param of
1127 maybe_unwind_expanded_macro_loc.
1128 (tree_diagnostics_defaults): Initialize context->print_path and
1129 context->make_json_for_path.
1130 * tree-diagnostic.h (default_tree_diagnostic_path_printer): New
1132 (default_tree_make_json_for_path): New decl.
1133 (maybe_unwind_expanded_macro_loc): New decl.
1135 2020-01-10 Jakub Jelinek <jakub@redhat.com>
1137 PR tree-optimization/93210
1138 * fold-const.h (native_encode_initializer,
1139 can_native_interpret_type_p): Declare.
1140 * fold-const.c (native_encode_string): Fix up handling with off != -1,
1142 (native_encode_initializer): New function, moved from dwarf2out.c.
1143 Adjust to native_encode_expr compatible arguments, including dry-run
1144 and partial extraction modes. Don't handle STRING_CST.
1145 (can_native_interpret_type_p): No longer static.
1146 * gimple-fold.c (fold_ctor_reference): For native_encode_expr, verify
1147 offset / BITS_PER_UNIT fits into int and don't call it if
1148 can_native_interpret_type_p fails. If suboff is NULL and for
1149 CONSTRUCTOR fold_{,non}array_ctor_reference returns NULL, retry with
1150 native_encode_initializer.
1151 (fold_const_aggregate_ref_1): Formatting fix.
1152 * dwarf2out.c (native_encode_initializer): Moved to fold-const.c.
1153 (tree_add_const_value_attribute): Adjust caller.
1155 PR tree-optimization/90838
1156 * tree-ssa-forwprop.c (simplify_count_trailing_zeroes): Use
1157 SCALAR_INT_TYPE_MODE instead of TYPE_MODE as operand of
1158 CTZ_DEFINED_VALUE_AT_ZERO.
1160 2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
1163 * lra-constraints.c (match_reload): Permit input operands have the
1164 same mode as output while other input operands have a different
1167 2020-01-10 Wilco Dijkstra <wdijkstr@arm.com>
1169 PR tree-optimization/90838
1170 * tree-ssa-forwprop.c (check_ctz_array): Add new function.
1171 (check_ctz_string): Likewise.
1172 (optimize_count_trailing_zeroes): Likewise.
1173 (simplify_count_trailing_zeroes): Likewise.
1174 (pass_forwprop::execute): Try ctz simplification.
1175 * match.pd: Add matching for ctz idioms.
1177 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
1179 * config/aarch64/aarch64.c (aarch64_invalid_conversion): New function
1181 (aarch64_invalid_unary_op): New function for target hook.
1182 (aarch64_invalid_binary_op): New function for target hook.
1184 2020-01-10 Stam Markianos-Wright <stam.markianos-wright@arm.com>
1186 * config.gcc: Add arm_bf16.h.
1187 * config/aarch64/aarch64-builtins.c
1188 (aarch64_simd_builtin_std_type): Add BFmode.
1189 (aarch64_init_simd_builtin_types): Define element types for vector
1191 (aarch64_init_bf16_types): New function.
1192 (aarch64_general_init_builtins): Add arm_init_bf16_types function call.
1193 * config/aarch64/aarch64-modes.def: Add BFmode and V4BF, V8BF vector
1195 * config/aarch64/aarch64-simd-builtin-types.def: Add BF SIMD types.
1196 * config/aarch64/aarch64-simd.md: Add BF vector types to NEON move
1198 * config/aarch64/aarch64.h (AARCH64_VALID_SIMD_DREG_MODE): Add V4BF.
1199 (AARCH64_VALID_SIMD_QREG_MODE): Add V8BF.
1200 * config/aarch64/aarch64.c
1201 (aarch64_classify_vector_mode): Add support for BF types.
1202 (aarch64_gimplify_va_arg_expr): Add support for BF types.
1203 (aarch64_vq_mode): Add support for BF types.
1204 (aarch64_simd_container_mode): Add support for BF types.
1205 (aarch64_mangle_type): Add support for BF scalar type.
1206 * config/aarch64/aarch64.md: Add BFmode to movhf pattern.
1207 * config/aarch64/arm_bf16.h: New file.
1208 * config/aarch64/arm_neon.h: Add arm_bf16.h and Bfloat vector types.
1209 * config/aarch64/iterators.md: Add BF types to mode attributes.
1210 (HFBF, GPF_TF_F16_MOV, VDMOV, VQMOV, VQMOV_NO2Em VALL_F16MOV): New.
1212 2020-01-10 Jason Merrill <jason@redhat.com>
1214 PR c++/93173 - incorrect tree sharing.
1215 * gimplify.c (copy_if_shared): No longer static.
1216 * gimplify.h: Declare it.
1218 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
1220 * doc/invoke.texi (-msve-vector-bits=): Document that
1221 -msve-vector-bits=128 now generates VL-specific code for
1222 little-endian targets.
1223 * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Use
1224 build_vector_type_for_mode to construct the data vector types.
1225 * config/aarch64/aarch64.c (aarch64_convert_sve_vector_bits): Generate
1226 VL-specific code for -msve-vector-bits=128 on little-endian targets.
1227 (aarch64_simd_container_mode): Always prefer Advanced SIMD modes
1228 for 128-bit vectors.
1230 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
1232 * config/aarch64/aarch64.c (aarch64_evpc_sel): Fix gen_vcond_mask
1235 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
1237 * config/aarch64/aarch64-builtins.c
1238 (aarch64_builtin_vectorized_function): Check for specific vector modes,
1239 rather than checking the number of elements and the element mode.
1241 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
1243 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
1244 get_related_vectype_for_scalar_type rather than build_vector_type
1245 to create the index type for a conditional reduction.
1247 2020-01-10 Richard Sandiford <richard.sandiford@arm.com>
1249 * tree-vect-loop.c (update_epilogue_loop_vinfo): Update DR_REF
1250 for any type of gather or scatter, including strided accesses.
1252 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
1254 * tree-vectorizer.h (get_dr_vinfo_offset): Add missing function
1257 2020-01-10 Andre Vieira <andre.simoesdiasvieira@arm.com>
1259 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Use
1261 * tree-vect-loop.c (update_epilogue_loop_vinfo): Remove orig_drs_init
1262 parameter and its use to reset DR_OFFSET's.
1263 (vect_transform_loop): Remove orig_drs_init argument.
1264 * tree-vect-loop-manip.c (vect_update_init_of_dr): Update the offset
1265 member of dr_vec_info rather than the offset of the associated
1266 data_reference's innermost_loop_behavior.
1267 (vect_update_init_of_dr): Pass dr_vec_info instead of data_reference.
1268 (vect_do_peeling): Remove orig_drs_init parameter and its construction.
1269 * tree-vect-stmts.c (check_scan_store): Replace use of DR_OFFSET with
1270 get_dr_vinfo_offset.
1271 (vectorizable_store): Likewise.
1272 (vectorizable_load): Likewise.
1274 2020-01-10 Richard Biener <rguenther@suse.de>
1276 * gimple-ssa-store-merging
1277 (pass_store_merging::terminate_all_aliasing_chains): Cache alias info.
1279 2020-01-10 Martin Liska <mliska@suse.cz>
1282 * ipa-inline-analysis.c (offline_size): Make proper parenthesis
1283 encapsulation that was there before r280040.
1285 2020-01-10 Richard Biener <rguenther@suse.de>
1288 * tree-eh.c (sink_clobbers): Move clobbers to out-of-IL
1289 sequences to avoid walking them again for secondary opportunities.
1290 (pass_lower_eh_dispatch::execute): Instead actually insert
1293 2020-01-10 Richard Biener <rguenther@suse.de>
1296 * tree-eh.c (redirect_eh_edge_1): Avoid some work if possible.
1297 (cleanup_all_empty_eh): Walk landing pads in reverse order to
1298 avoid quadraticness.
1300 2020-01-10 Martin Jambor <mjambor@suse.cz>
1302 * params.opt (param_ipa_sra_max_replacements): Mark as Optimization.
1303 * ipa-sra.c (pull_accesses_from_callee): New parameter caller, use it
1304 to get param_ipa_sra_max_replacements.
1305 (param_splitting_across_edge): Pass the caller to
1306 pull_accesses_from_callee.
1308 2020-01-10 Martin Jambor <mjambor@suse.cz>
1310 * params.opt (param_ipcp_unit_growth): Mark as Optimization.
1311 * ipa-cp.c (max_new_size): Removed.
1312 (orig_overall_size): New variable.
1313 (get_max_overall_size): New function.
1314 (estimate_local_effects): Use it. Adjust dump.
1315 (decide_about_value): Likewise.
1316 (ipcp_propagate_stage): Do not calculate max_new_size, just store
1317 orig_overall_size. Adjust dump.
1318 (ipa_cp_c_finalize): Clear orig_overall_size instead of max_new_size.
1320 2020-01-10 Martin Jambor <mjambor@suse.cz>
1322 * params.opt (param_ipa_max_agg_items): Mark as Optimization
1323 * ipa-cp.c (merge_agg_lats_step): New parameter max_agg_items, use
1324 instead of param_ipa_max_agg_items.
1325 (merge_aggregate_lattices): Extract param_ipa_max_agg_items from
1326 optimization info for the callee.
1328 2020-01-09 Kwok Cheung Yeung <kcy@codesourcery.com>
1330 * lto-streamer-in.c (input_function): Remove streamed-in inline debug
1331 markers if debug_inline_points is false.
1333 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1335 * config.gcc (aarch64*-*-*): Add aarch64-sve-builtins-sve2.o to
1337 * config/aarch64/t-aarch64 (aarch64-sve-builtins.o): Depend on
1338 aarch64-sve-builtins-base.def, aarch64-sve-builtins-sve2.def and
1339 aarch64-sve-builtins-sve2.h.
1340 (aarch64-sve-builtins-sve2.o): New rule.
1341 * config/aarch64/aarch64.h (AARCH64_ISA_SVE2_AES): New macro.
1342 (AARCH64_ISA_SVE2_BITPERM, AARCH64_ISA_SVE2_SHA3): Likewise.
1343 (AARCH64_ISA_SVE2_SM4, TARGET_SVE2_AES, TARGET_SVE2_BITPERM): Likewise.
1344 (TARGET_SVE2_SHA, TARGET_SVE2_SM4): Likewise.
1345 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
1346 TARGET_SVE2_AES, TARGET_SVE2_BITPERM, TARGET_SVE2_SHA3 and
1348 * config/aarch64/aarch64-sve.md: Update comments with SVE2
1349 instructions that are handled here.
1350 (@cond_asrd<mode>): Generalize to...
1351 (@cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>): ...this.
1352 (*cond_asrd<mode>_2): Generalize to...
1353 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_2): ...this.
1354 (*cond_asrd<mode>_z): Generalize to...
1355 (*cond_<SVE_INT_SHIFT_IMM:sve_int_op><mode>_z): ...this.
1356 * config/aarch64/aarch64.md (UNSPEC_LDNT1_GATHER): New unspec.
1357 (UNSPEC_STNT1_SCATTER, UNSPEC_WHILEGE, UNSPEC_WHILEGT): Likewise.
1358 (UNSPEC_WHILEHI, UNSPEC_WHILEHS): Likewise.
1359 * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt<mode>): New
1361 (@aarch64_gather_ldnt_<ANY_EXTEND:optab><SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
1362 (@aarch64_scatter_stnt<mode>): Likewise.
1363 (@aarch64_scatter_stnt_<SVE_FULL_SDI:mode><SVE_PARTIAL_I:mode>)
1364 (@aarch64_mul_lane_<mode>): Likewise.
1365 (@aarch64_sve_suqadd<mode>_const): Likewise.
1366 (*<sur>h<addsub><mode>): Generalize to...
1367 (@aarch64_pred_<SVE2_COND_INT_BINARY_REV:sve_int_op><mode>): ...this
1369 (@cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>): New expander.
1370 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_2): New pattern.
1371 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_3): Likewise.
1372 (*cond_<SVE2_COND_INT_BINARY:sve_int_op><mode>_any): Likewise.
1373 (*cond_<SVE2_COND_INT_BINARY_NOREV:sve_int_op><mode>_z): Likewise.
1374 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op><mode>):: Likewise.
1375 (@aarch64_sve_<SVE2_INT_BINARY:sve_int_op>_lane_<mode>): Likewise.
1376 (@aarch64_pred_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): Likewise.
1377 (@cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>): New expander.
1378 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_2): New pattern.
1379 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_3): Likewise.
1380 (*cond_<SVE2_COND_INT_SHIFT:sve_int_op><mode>_any): Likewise.
1381 (@aarch64_sve_<SVE2_INT_TERNARY:sve_int_op><mode>): Likewise.
1382 (@aarch64_sve_<SVE2_INT_TERNARY_LANE:sve_int_op>_lane_<mode>)
1383 (@aarch64_sve_add_mul_lane_<mode>): Likewise.
1384 (@aarch64_sve_sub_mul_lane_<mode>): Likewise.
1385 (@aarch64_sve2_xar<mode>): Likewise.
1386 (@aarch64_sve2_bcax<mode>): Likewise.
1387 (*aarch64_sve2_eor3<mode>): Rename to...
1388 (@aarch64_sve2_eor3<mode>): ...this.
1389 (@aarch64_sve2_bsl<mode>): New expander.
1390 (@aarch64_sve2_nbsl<mode>): Likewise.
1391 (@aarch64_sve2_bsl1n<mode>): Likewise.
1392 (@aarch64_sve2_bsl2n<mode>): Likewise.
1393 (@aarch64_sve_add_<SHIFTRT:sve_int_op><mode>): Likewise.
1394 (*aarch64_sve2_sra<mode>): Add MOVPRFX support.
1395 (@aarch64_sve_add_<VRSHR_N:sve_int_op><mode>): New pattern.
1396 (@aarch64_sve_<SVE2_INT_SHIFT_INSERT:sve_int_op><mode>): Likewise.
1397 (@aarch64_sve2_<USMAX:su>aba<mode>): New expander.
1398 (*aarch64_sve2_<USMAX:su>aba<mode>): New pattern.
1399 (@aarch64_sve_<SVE2_INT_BINARY_WIDE:sve_int_op><mode>): Likewise.
1400 (<su>mull<bt><Vwide>): Generalize to...
1401 (@aarch64_sve_<SVE2_INT_BINARY_LONG:sve_int_op><mode>): ...this new
1403 (@aarch64_sve_<SVE2_INT_BINARY_LONG_lANE:sve_int_op>_lane_<mode>)
1404 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_LONG:sve_int_op><mode>)
1405 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG:sve_int_op><mode>)
1406 (@aarch64_sve_add_<SVE2_INT_ADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
1407 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG:sve_int_op><mode>)
1408 (@aarch64_sve_qadd_<SVE2_INT_QADD_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
1409 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG:sve_int_op><mode>)
1410 (@aarch64_sve_sub_<SVE2_INT_SUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
1411 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG:sve_int_op><mode>)
1412 (@aarch64_sve_qsub_<SVE2_INT_QSUB_BINARY_LONG_LANE:sve_int_op>_lane_<mode>)
1413 (@aarch64_sve_<SVE2_FP_TERNARY_LONG:sve_fp_op><mode>): New patterns.
1414 (@aarch64_<SVE2_FP_TERNARY_LONG_LANE:sve_fp_op>_lane_<mode>)
1415 (@aarch64_sve_<SVE2_INT_UNARY_NARROWB:sve_int_op><mode>): Likewise.
1416 (@aarch64_sve_<SVE2_INT_UNARY_NARROWT:sve_int_op><mode>): Likewise.
1417 (@aarch64_sve_<SVE2_INT_BINARY_NARROWB:sve_int_op><mode>): Likewise.
1418 (@aarch64_sve_<SVE2_INT_BINARY_NARROWT:sve_int_op><mode>): Likewise.
1419 (<SHRNB:r>shrnb<mode>): Generalize to...
1420 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWB:sve_int_op><mode>): ...this
1422 (<SHRNT:r>shrnt<mode>): Generalize to...
1423 (@aarch64_sve_<SVE2_INT_SHIFT_IMM_NARROWT:sve_int_op><mode>): ...this
1425 (@aarch64_pred_<SVE2_INT_BINARY_PAIR:sve_int_op><mode>): New pattern.
1426 (@aarch64_pred_<SVE2_FP_BINARY_PAIR:sve_fp_op><mode>): Likewise.
1427 (@cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>): New expander.
1428 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_2): New pattern.
1429 (*cond_<SVE2_INT_BINARY_PAIR_LONG:sve_int_op><mode>_z): Likewise.
1430 (@aarch64_sve_<SVE2_INT_CADD:optab><mode>): Likewise.
1431 (@aarch64_sve_<SVE2_INT_CMLA:optab><mode>): Likewise.
1432 (@aarch64_<SVE2_INT_CMLA:optab>_lane_<mode>): Likewise.
1433 (@aarch64_sve_<SVE2_INT_CDOT:optab><mode>): Likewise.
1434 (@aarch64_<SVE2_INT_CDOT:optab>_lane_<mode>): Likewise.
1435 (@aarch64_pred_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): Likewise.
1436 (@cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New expander.
1437 (*cond_<SVE2_COND_FP_UNARY_LONG:sve_fp_op><mode>): New pattern.
1438 (@aarch64_sve2_cvtnt<mode>): Likewise.
1439 (@aarch64_pred_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): Likewise.
1440 (@cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>): New expander.
1441 (*cond_<SVE2_COND_FP_UNARY_NARROWB:sve_fp_op><mode>_any): New pattern.
1442 (@aarch64_sve2_cvtxnt<mode>): Likewise.
1443 (@aarch64_pred_<SVE2_U32_UNARY:sve_int_op><mode>): Likewise.
1444 (@cond_<SVE2_U32_UNARY:sve_int_op><mode>): New expander.
1445 (*cond_<SVE2_U32_UNARY:sve_int_op><mode>): New pattern.
1446 (@aarch64_pred_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): Likewise.
1447 (@cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New expander.
1448 (*cond_<SVE2_COND_INT_UNARY_FP:sve_fp_op><mode>): New pattern.
1449 (@aarch64_sve2_pmul<mode>): Likewise.
1450 (@aarch64_sve_<SVE2_PMULL:optab><mode>): Likewise.
1451 (@aarch64_sve_<SVE2_PMULL_PAIR:optab><mode>): Likewise.
1452 (@aarch64_sve2_tbl2<mode>): Likewise.
1453 (@aarch64_sve2_tbx<mode>): Likewise.
1454 (@aarch64_sve_<SVE2_INT_BITPERM:sve_int_op><mode>): Likewise.
1455 (@aarch64_sve2_histcnt<mode>): Likewise.
1456 (@aarch64_sve2_histseg<mode>): Likewise.
1457 (@aarch64_pred_<SVE2_MATCH:sve_int_op><mode>): Likewise.
1458 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_cc): Likewise.
1459 (*aarch64_pred_<SVE2_MATCH:sve_int_op><mode>_ptest): Likewise.
1460 (aarch64_sve2_aes<CRYPTO_AES:aes_op>): Likewise.
1461 (aarch64_sve2_aes<CRYPTO_AESMC:aesmc_op>): Likewise.
1462 (*aarch64_sve2_aese_fused, *aarch64_sve2_aesd_fused): Likewise.
1463 (aarch64_sve2_rax1, aarch64_sve2_sm4e, aarch64_sve2_sm4ekey): Likewise.
1464 (<su>mulh<r>s<mode>3): Update after above pattern name changes.
1465 * config/aarch64/iterators.md (VNx16QI_ONLY, VNx4SF_ONLY)
1466 (SVE_STRUCT2, SVE_FULL_BHI, SVE_FULL_HSI, SVE_FULL_HDI)
1467 (SVE2_PMULL_PAIR_I): New mode iterators.
1468 (UNSPEC_ADCLB, UNSPEC_ADCLT, UNSPEC_ADDHNB, UNSPEC_ADDHNT, UNSPEC_BDEP)
1469 (UNSPEC_BEXT, UNSPEC_BGRP, UNSPEC_CADD90, UNSPEC_CADD270, UNSPEC_CDOT)
1470 (UNSPEC_CDOT90, UNSPEC_CDOT180, UNSPEC_CDOT270, UNSPEC_CMLA)
1471 (UNSPEC_CMLA90, UNSPEC_CMLA180, UNSPEC_CMLA270, UNSPEC_COND_FCVTLT)
1472 (UNSPEC_COND_FCVTNT, UNSPEC_COND_FCVTX, UNSPEC_COND_FCVTXNT)
1473 (UNSPEC_COND_FLOGB, UNSPEC_EORBT, UNSPEC_EORTB, UNSPEC_FADDP)
1474 (UNSPEC_FMAXP, UNSPEC_FMAXNMP, UNSPEC_FMLALB, UNSPEC_FMLALT)
1475 (UNSPEC_FMLSLB, UNSPEC_FMLSLT, UNSPEC_FMINP, UNSPEC_FMINNMP)
1476 (UNSPEC_HISTCNT, UNSPEC_HISTSEG, UNSPEC_MATCH, UNSPEC_NMATCH)
1477 (UNSPEC_PMULLB, UNSPEC_PMULLB_PAIR, UNSPEC_PMULLT, UNSPEC_PMULLT_PAIR)
1478 (UNSPEC_RADDHNB, UNSPEC_RADDHNT, UNSPEC_RSUBHNB, UNSPEC_RSUBHNT)
1479 (UNSPEC_SLI, UNSPEC_SRI, UNSPEC_SABDLB, UNSPEC_SABDLT, UNSPEC_SADDLB)
1480 (UNSPEC_SADDLBT, UNSPEC_SADDLT, UNSPEC_SADDWB, UNSPEC_SADDWT)
1481 (UNSPEC_SBCLB, UNSPEC_SBCLT, UNSPEC_SMAXP, UNSPEC_SMINP)
1482 (UNSPEC_SQCADD90, UNSPEC_SQCADD270, UNSPEC_SQDMULLB, UNSPEC_SQDMULLBT)
1483 (UNSPEC_SQDMULLT, UNSPEC_SQRDCMLAH, UNSPEC_SQRDCMLAH90)
1484 (UNSPEC_SQRDCMLAH180, UNSPEC_SQRDCMLAH270, UNSPEC_SQRSHRNB)
1485 (UNSPEC_SQRSHRNT, UNSPEC_SQRSHRUNB, UNSPEC_SQRSHRUNT, UNSPEC_SQSHRNB)
1486 (UNSPEC_SQSHRNT, UNSPEC_SQSHRUNB, UNSPEC_SQSHRUNT, UNSPEC_SQXTNB)
1487 (UNSPEC_SQXTNT, UNSPEC_SQXTUNB, UNSPEC_SQXTUNT, UNSPEC_SSHLLB)
1488 (UNSPEC_SSHLLT, UNSPEC_SSUBLB, UNSPEC_SSUBLBT, UNSPEC_SSUBLT)
1489 (UNSPEC_SSUBLTB, UNSPEC_SSUBWB, UNSPEC_SSUBWT, UNSPEC_SUBHNB)
1490 (UNSPEC_SUBHNT, UNSPEC_TBL2, UNSPEC_UABDLB, UNSPEC_UABDLT)
1491 (UNSPEC_UADDLB, UNSPEC_UADDLT, UNSPEC_UADDWB, UNSPEC_UADDWT)
1492 (UNSPEC_UMAXP, UNSPEC_UMINP, UNSPEC_UQRSHRNB, UNSPEC_UQRSHRNT)
1493 (UNSPEC_UQSHRNB, UNSPEC_UQSHRNT, UNSPEC_UQXTNB, UNSPEC_UQXTNT)
1494 (UNSPEC_USHLLB, UNSPEC_USHLLT, UNSPEC_USUBLB, UNSPEC_USUBLT)
1495 (UNSPEC_USUBWB, UNSPEC_USUBWT): New unspecs.
1496 (UNSPEC_SMULLB, UNSPEC_SMULLT, UNSPEC_UMULLB, UNSPEC_UMULLT)
1497 (UNSPEC_SMULHS, UNSPEC_SMULHRS, UNSPEC_UMULHS, UNSPEC_UMULHRS)
1498 (UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SHRNB, UNSPEC_SHRNT): Move
1500 (VNARROW, Ventype): New mode attributes.
1501 (Vewtype): Handle VNx2DI. Fix typo in comment.
1502 (VDOUBLE): New mode attribute.
1503 (sve_lane_con): Handle VNx8HI.
1504 (SVE_INT_UNARY): Include ss_abs and ss_neg for TARGET_SVE2.
1505 (SVE_INT_BINARY): Likewise ss_plus, us_plus, ss_minus and us_minus.
1506 (sve_int_op, sve_int_op_rev): Handle the above codes.
1507 (sve_pred_int_rhs2_operand): Likewise.
1508 (MULLBT, SHRNB, SHRNT): Delete.
1509 (SVE_INT_SHIFT_IMM): New int iterator.
1510 (SVE_WHILE): Add UNSPEC_WHILEGE, UNSPEC_WHILEGT, UNSPEC_WHILEHI
1511 and UNSPEC_WHILEHS for TARGET_SVE2.
1512 (SVE2_U32_UNARY, SVE2_INT_UNARY_NARROWB, SVE2_INT_UNARY_NARROWT)
1513 (SVE2_INT_BINARY, SVE2_INT_BINARY_LANE, SVE2_INT_BINARY_LONG)
1514 (SVE2_INT_BINARY_LONG_LANE, SVE2_INT_BINARY_NARROWB)
1515 (SVE2_INT_BINARY_NARROWT, SVE2_INT_BINARY_PAIR, SVE2_FP_BINARY_PAIR)
1516 (SVE2_INT_BINARY_PAIR_LONG, SVE2_INT_BINARY_WIDE): New int iterators.
1517 (SVE2_INT_SHIFT_IMM_LONG, SVE2_INT_SHIFT_IMM_NARROWB): Likewise.
1518 (SVE2_INT_SHIFT_IMM_NARROWT, SVE2_INT_SHIFT_INSERT, SVE2_INT_CADD)
1519 (SVE2_INT_BITPERM, SVE2_INT_TERNARY, SVE2_INT_TERNARY_LANE): Likewise.
1520 (SVE2_FP_TERNARY_LONG, SVE2_FP_TERNARY_LONG_LANE, SVE2_INT_CMLA)
1521 (SVE2_INT_CDOT, SVE2_INT_ADD_BINARY_LONG, SVE2_INT_QADD_BINARY_LONG)
1522 (SVE2_INT_SUB_BINARY_LONG, SVE2_INT_QSUB_BINARY_LONG): Likewise.
1523 (SVE2_INT_ADD_BINARY_LONG_LANE, SVE2_INT_QADD_BINARY_LONG_LANE)
1524 (SVE2_INT_SUB_BINARY_LONG_LANE, SVE2_INT_QSUB_BINARY_LONG_LANE)
1525 (SVE2_COND_INT_UNARY_FP, SVE2_COND_FP_UNARY_LONG): Likewise.
1526 (SVE2_COND_FP_UNARY_NARROWB, SVE2_COND_INT_BINARY): Likewise.
1527 (SVE2_COND_INT_BINARY_NOREV, SVE2_COND_INT_BINARY_REV): Likewise.
1528 (SVE2_COND_INT_SHIFT, SVE2_MATCH, SVE2_PMULL): Likewise.
1529 (optab): Handle the new unspecs.
1530 (su, r): Remove entries for UNSPEC_SHRNB, UNSPEC_SHRNT, UNSPEC_RSHRNB
1532 (lr): Handle the new unspecs.
1534 (cmp_op, while_optab_cmp, sve_int_op): Handle the new unspecs.
1535 (sve_int_op_rev, sve_int_add_op, sve_int_qadd_op, sve_int_sub_op)
1536 (sve_int_qsub_op): New int attributes.
1537 (sve_fp_op, rot): Handle the new unspecs.
1538 * config/aarch64/aarch64-sve-builtins.h
1539 (function_resolver::require_matching_pointer_type): Declare.
1540 (function_resolver::resolve_unary): Add an optional boolean argument.
1541 (function_resolver::finish_opt_n_resolution): Add an optional
1542 type_suffix_index argument.
1543 (gimple_folder::redirect_call): Declare.
1544 (gimple_expander::prepare_gather_address_operands): Add an optional
1546 * config/aarch64/aarch64-sve-builtins.cc: Include
1547 aarch64-sve-builtins-sve2.h.
1548 (TYPES_b_unsigned, TYPES_b_integer, TYPES_bh_integer): New macros.
1549 (TYPES_bs_unsigned, TYPES_hs_signed, TYPES_hs_integer): Likewise.
1550 (TYPES_hd_unsigned, TYPES_hsd_signed): Likewise.
1551 (TYPES_hsd_integer): Use TYPES_hsd_signed.
1552 (TYPES_s_float_hsd_integer, TYPES_s_float_sd_integer): New macros.
1553 (TYPES_s_unsigned): Likewise.
1554 (TYPES_s_integer): Use TYPES_s_unsigned.
1555 (TYPES_sd_signed, TYPES_sd_unsigned): New macros.
1556 (TYPES_sd_integer): Use them.
1557 (TYPES_d_unsigned): New macro.
1558 (TYPES_d_integer): Use it.
1559 (TYPES_d_data, TYPES_cvt_long, TYPES_cvt_narrow_s): New macros.
1560 (TYPES_cvt_narrow): Likewise.
1561 (DEF_SVE_TYPES_ARRAY): Include the new types macros above.
1562 (preds_mx): New variable.
1563 (function_builder::add_overloaded_function): Allow the new feature
1564 set to be more restrictive than the original one.
1565 (function_resolver::infer_pointer_type): Remove qualifiers from
1566 the pointer type before printing it.
1567 (function_resolver::require_matching_pointer_type): New function.
1568 (function_resolver::resolve_sv_displacement): Handle functions
1569 that don't support 32-bit vector indices or svint32_t vector offsets.
1570 (function_resolver::finish_opt_n_resolution): Take the inferred type
1571 as a separate argument.
1572 (function_resolver::resolve_unary): Optionally treat all forms in
1573 the same way as normal merging functions.
1574 (gimple_folder::redirect_call): New function.
1575 (function_expander::prepare_gather_address_operands): Add an argument
1576 that says whether scaled forms are available. If they aren't,
1577 handle scaling of vector indices and don't add the extension and
1579 (function_expander::map_to_unspecs): If aarch64_sve isn't available,
1580 fall back to using cond_* instead.
1581 * config/aarch64/aarch64-sve-builtins-functions.h (rtx_code_function):
1582 Split out the member variables into...
1583 (rtx_code_function_base): ...this new base class.
1584 (rtx_code_function_rotated): Inherit rtx_code_function_base.
1585 (unspec_based_function): Split out the member variables into...
1586 (unspec_based_function_base): ...this new base class.
1587 (unspec_based_function_rotated): Inherit unspec_based_function_base.
1588 (unspec_based_function_exact_insn): New class.
1589 (unspec_based_add_function, unspec_based_add_lane_function)
1590 (unspec_based_lane_function, unspec_based_pred_function)
1591 (unspec_based_qadd_function, unspec_based_qadd_lane_function)
1592 (unspec_based_qsub_function, unspec_based_qsub_lane_function)
1593 (unspec_based_sub_function, unspec_based_sub_lane_function): New
1595 (unspec_based_fused_function): New class.
1596 (unspec_based_mla_function, unspec_based_mls_function): New typedefs.
1597 (unspec_based_fused_lane_function): New class.
1598 (unspec_based_mla_lane_function, unspec_based_mls_lane_function): New
1600 (CODE_FOR_MODE1): New macro.
1601 (fixed_insn_function): New class.
1602 (while_comparison): Likewise.
1603 * config/aarch64/aarch64-sve-builtins-shapes.h (binary_long_lane)
1604 (binary_long_opt_n, binary_narrowb_opt_n, binary_narrowt_opt_n)
1605 (binary_to_uint, binary_wide, binary_wide_opt_n, compare, compare_ptr)
1606 (load_ext_gather_index_restricted, load_ext_gather_offset_restricted)
1607 (load_gather_sv_restricted, shift_left_imm_long): Declare.
1608 (shift_left_imm_to_uint, shift_right_imm_narrowb): Likewise.
1609 (shift_right_imm_narrowt, shift_right_imm_narrowb_to_uint): Likewise.
1610 (shift_right_imm_narrowt_to_uint, store_scatter_index_restricted)
1611 (store_scatter_offset_restricted, tbl_tuple, ternary_long_lane)
1612 (ternary_long_opt_n, ternary_qq_lane_rotate, ternary_qq_rotate)
1613 (ternary_shift_left_imm, ternary_shift_right_imm, ternary_uint)
1614 (unary_convert_narrowt, unary_long, unary_narrowb, unary_narrowt)
1615 (unary_narrowb_to_uint, unary_narrowt_to_uint, unary_to_int): Likewise.
1616 * config/aarch64/aarch64-sve-builtins-shapes.cc (apply_predication):
1617 Also add an initial argument for unary_convert_narrowt, regardless
1618 of the predication type.
1619 (build_32_64): Allow loads and stores to specify MODE_none.
1620 (build_sv_index64, build_sv_uint_offset): New functions.
1621 (long_type_suffix): New function.
1622 (binary_imm_narrowb_base, binary_imm_narrowt_base): New classes.
1623 (binary_imm_long_base, load_gather_sv_base): Likewise.
1624 (shift_right_imm_narrow_wrapper, ternary_shift_imm_base): Likewise.
1625 (ternary_resize2_opt_n_base, ternary_resize2_lane_base): Likewise.
1626 (unary_narrowb_base, unary_narrowt_base): Likewise.
1627 (binary_long_lane_def, binary_long_lane): New shape.
1628 (binary_long_opt_n_def, binary_long_opt_n): Likewise.
1629 (binary_narrowb_opt_n_def, binary_narrowb_opt_n): Likewise.
1630 (binary_narrowt_opt_n_def, binary_narrowt_opt_n): Likewise.
1631 (binary_to_uint_def, binary_to_uint): Likewise.
1632 (binary_wide_def, binary_wide): Likewise.
1633 (binary_wide_opt_n_def, binary_wide_opt_n): Likewise.
1634 (compare_def, compare): Likewise.
1635 (compare_ptr_def, compare_ptr): Likewise.
1636 (load_ext_gather_index_restricted_def,
1637 load_ext_gather_index_restricted): Likewise.
1638 (load_ext_gather_offset_restricted_def,
1639 load_ext_gather_offset_restricted): Likewise.
1640 (load_gather_sv_def): Inherit from load_gather_sv_base.
1641 (load_gather_sv_restricted_def, load_gather_sv_restricted): New shape.
1642 (shift_left_imm_def, shift_left_imm): Likewise.
1643 (shift_left_imm_long_def, shift_left_imm_long): Likewise.
1644 (shift_left_imm_to_uint_def, shift_left_imm_to_uint): Likewise.
1645 (store_scatter_index_restricted_def,
1646 store_scatter_index_restricted): Likewise.
1647 (store_scatter_offset_restricted_def,
1648 store_scatter_offset_restricted): Likewise.
1649 (tbl_tuple_def, tbl_tuple): Likewise.
1650 (ternary_long_lane_def, ternary_long_lane): Likewise.
1651 (ternary_long_opt_n_def, ternary_long_opt_n): Likewise.
1652 (ternary_qq_lane_def): Inherit from ternary_resize2_lane_base.
1653 (ternary_qq_lane_rotate_def, ternary_qq_lane_rotate): New shape
1654 (ternary_qq_opt_n_def): Inherit from ternary_resize2_opt_n_base.
1655 (ternary_qq_rotate_def, ternary_qq_rotate): New shape.
1656 (ternary_shift_left_imm_def, ternary_shift_left_imm): Likewise.
1657 (ternary_shift_right_imm_def, ternary_shift_right_imm): Likewise.
1658 (ternary_uint_def, ternary_uint): Likewise.
1659 (unary_convert): Fix typo in comment.
1660 (unary_convert_narrowt_def, unary_convert_narrowt): New shape.
1661 (unary_long_def, unary_long): Likewise.
1662 (unary_narrowb_def, unary_narrowb): Likewise.
1663 (unary_narrowt_def, unary_narrowt): Likewise.
1664 (unary_narrowb_to_uint_def, unary_narrowb_to_uint): Likewise.
1665 (unary_narrowt_to_uint_def, unary_narrowt_to_uint): Likewise.
1666 (unary_to_int_def, unary_to_int): Likewise.
1667 * config/aarch64/aarch64-sve-builtins-base.cc (unspec_cmla)
1668 (unspec_fcmla, unspec_cond_fcmla, expand_mla_mls_lane): New functions.
1669 (svasrd_impl): Delete.
1670 (svcadd_impl::expand): Handle integer operations too.
1671 (svcmla_impl::expand, svcmla_lane::expand): Likewise, using the
1672 new functions to derive the unspec numbers.
1673 (svmla_svmls_lane_impl): Replace with...
1674 (svmla_lane_impl, svmls_lane_impl): ...these new classes. Handle
1675 integer operations too.
1676 (svwhile_impl): Rename to...
1677 (svwhilelx_impl): ...this and inherit from while_comparison.
1678 (svasrd): Use unspec_based_function.
1679 (svmla_lane): Use svmla_lane_impl.
1680 (svmls_lane): Use svmls_lane_impl.
1681 (svrecpe, svrsqrte): Handle unsigned integer operations too.
1682 (svwhilele, svwhilelt): Use svwhilelx_impl.
1683 * config/aarch64/aarch64-sve-builtins-sve2.h: New file.
1684 * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
1685 * config/aarch64/aarch64-sve-builtins-sve2.def: Likewise.
1686 * config/aarch64/aarch64-sve-builtins.def: Include
1687 aarch64-sve-builtins-sve2.def.
1689 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1691 * config/aarch64/aarch64-protos.h (aarch64_sve_arith_immediate_p)
1692 (aarch64_sve_sqadd_sqsub_immediate_p): Add a machine_mode argument.
1693 * config/aarch64/aarch64.c (aarch64_sve_arith_immediate_p)
1694 (aarch64_sve_sqadd_sqsub_immediate_p): Likewise. Handle scalar
1695 immediates as well as vector ones.
1696 * config/aarch64/predicates.md (aarch64_sve_arith_immediate)
1697 (aarch64_sve_sub_arith_immediate, aarch64_sve_qadd_immediate)
1698 (aarch64_sve_qsub_immediate): Update calls accordingly.
1700 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1702 * config/aarch64/aarch64-sve2.md: Add banner comments.
1703 (<su>mulh<r>s<mode>3): Move further up file.
1704 (<su>mull<bt><Vwide>, <r>shrnb<mode>, <r>shrnt<mode>)
1705 (*aarch64_sve2_sra<mode>): Move further down file.
1706 * config/aarch64/t-aarch64 (s-check-sve-md): Check aarch64-sve2.md too.
1708 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1710 * config/aarch64/iterators.md (SVE_WHILE): Add UNSPEC_WHILERW
1712 (while_optab_cmp): Handle them.
1713 * config/aarch64/aarch64-sve.md
1714 (*while_<while_optab_cmp><GPI:mode><PRED_ALL:mode>_ptest): Make public
1715 and add a "@" marker.
1716 * config/aarch64/aarch64-sve2.md (check_<raw_war>_ptrs<mode>): Use it
1717 instead of gen_aarch64_sve2_while_ptest.
1718 (@aarch64_sve2_while<cmp_op><GPI:mode><PRED_ALL:mode>_ptest): Delete.
1720 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1722 * config/aarch64/aarch64.md (UNSPEC_WHILE_LE): Rename to...
1723 (UNSPEC_WHILELE): ...this.
1724 (UNSPEC_WHILE_LO): Rename to...
1725 (UNSPEC_WHILELO): ...this.
1726 (UNSPEC_WHILE_LS): Rename to...
1727 (UNSPEC_WHILELS): ...this.
1728 (UNSPEC_WHILE_LT): Rename to...
1729 (UNSPEC_WHILELT): ...this.
1730 * config/aarch64/iterators.md (SVE_WHILE): Update accordingly.
1731 (cmp_op, while_optab_cmp): Likewise.
1732 * config/aarch64/aarch64.c (aarch64_sve_move_pred_via_while): Likewise.
1733 * config/aarch64/aarch64-sve-builtins-base.cc (svwhilele): Likewise.
1734 (svwhilelt): Likewise.
1736 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1738 * config/aarch64/aarch64-sve-builtins-shapes.h (unary_count): Delete.
1739 (unary_to_uint): Define.
1740 * config/aarch64/aarch64-sve-builtins-shapes.cc (unary_count_def)
1741 (unary_count): Rename to...
1742 (unary_to_uint_def, unary_to_uint): ...this.
1743 * config/aarch64/aarch64-sve-builtins-base.def: Update accordingly.
1745 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1747 * config/aarch64/aarch64-sve-builtins-functions.h
1748 (code_for_mode_function): New class.
1749 (CODE_FOR_MODE0, QUIET_CODE_FOR_MODE0): New macros.
1750 * config/aarch64/aarch64-sve-builtins-base.cc (svcompact_impl)
1751 (svext_impl, svmul_lane_impl, svsplice_impl, svtmad_impl): Delete.
1752 (svcompact, svext, svsplice): Use QUIET_CODE_FOR_MODE0.
1753 (svmul_lane, svtmad): Use CODE_FOR_MODE0.
1755 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1757 * config/aarch64/iterators.md (addsub): New code attribute.
1758 * config/aarch64/aarch64-simd.md (aarch64_<su_optab><optab><mode>):
1760 (aarch64_<su_optab>q<addsub><mode>): ...this, making the same change
1761 in the asm string and attributes. Fix indentation.
1762 * config/aarch64/aarch64-sve.md (@aarch64_<su_optab><optab><mode>):
1764 (@aarch64_sve_<optab><mode>): ...this.
1765 * config/aarch64/aarch64-sve-builtins.h
1766 (function_expander::expand_signed_unpred_op): Delete.
1767 * config/aarch64/aarch64-sve-builtins.cc
1768 (function_expander::expand_signed_unpred_op): Likewise.
1769 (function_expander::map_to_rtx_codes): If the optab isn't defined,
1770 try using code_for_aarch64_sve instead.
1771 * config/aarch64/aarch64-sve-builtins-base.cc (svqadd_impl): Delete.
1772 (svqsub_impl): Likewise.
1773 (svqadd, svqsub): Use rtx_code_function instead.
1775 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1777 * config/aarch64/iterators.md (SRHSUB, URHSUB): Delete.
1778 (HADDSUB, sur, addsub): Remove them.
1780 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1782 * tree-nrv.c (pass_return_slot::execute): Handle all internal
1783 functions the same way, rather than singling out those that
1784 aren't mapped directly to optabs.
1786 2020-01-09 Richard Sandiford <richard.sandiford@arm.com>
1788 * target.def (compatible_vector_types_p): New target hook.
1789 * hooks.h (hook_bool_const_tree_const_tree_true): Declare.
1790 * hooks.c (hook_bool_const_tree_const_tree_true): New function.
1791 * doc/tm.texi.in (TARGET_COMPATIBLE_VECTOR_TYPES_P): New hook.
1792 * doc/tm.texi: Regenerate.
1793 * gimple-expr.c: Include target.h.
1794 (useless_type_conversion_p): Use targetm.compatible_vector_types_p.
1795 * config/aarch64/aarch64.c (aarch64_compatible_vector_types_p): New
1797 (TARGET_COMPATIBLE_VECTOR_TYPES_P): Define.
1798 * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::convert_pred):
1799 Use the original predicate if it already has a suitable type.
1801 2020-01-09 Martin Jambor <mjambor@suse.cz>
1803 * cgraph.h (cgraph_edge): Make remove, set_call_stmt, make_direct,
1804 resolve_speculation and redirect_call_stmt_to_callee static. Change
1805 return type of set_call_stmt to cgraph_edge *.
1806 * auto-profile.c (afdo_indirect_call): Adjust call to
1807 redirect_call_stmt_to_callee.
1808 * cgraph.c (cgraph_edge::set_call_stmt): Make return cgraph-edge *,
1809 make the this pointer explicit, adjust self-recursive calls and the
1810 call top make_direct. Return the resulting edge.
1811 (cgraph_edge::remove): Make this pointer explicit.
1812 (cgraph_edge::resolve_speculation): Likewise, adjust call to remove.
1813 (cgraph_edge::make_direct): Likewise, adjust call to
1814 resolve_speculation.
1815 (cgraph_edge::redirect_call_stmt_to_callee): Likewise, also adjust
1816 call to set_call_stmt.
1817 (cgraph_update_edges_for_call_stmt_node): Update call to
1818 set_call_stmt and remove.
1819 * cgraphclones.c (cgraph_node::set_call_stmt_including_clones):
1820 Renamed edge to master_edge. Adjusted calls to set_call_stmt.
1821 (cgraph_node::create_edge_including_clones): Moved "first" definition
1822 of edge to the block where it was used. Adjusted calls to
1824 (cgraph_node::remove_symbol_and_inline_clones): Adjust call to
1825 cgraph_edge::remove.
1826 * cgraphunit.c (walk_polymorphic_call_targets): Adjusted calls to
1827 make_direct and redirect_call_stmt_to_callee.
1828 * ipa-fnsummary.c (redirect_to_unreachable): Adjust calls to
1829 resolve_speculation and make_direct.
1830 * ipa-inline-transform.c (inline_transform): Adjust call to
1831 redirect_call_stmt_to_callee.
1832 (check_speculations_1):: Adjust call to resolve_speculation.
1833 * ipa-inline.c (resolve_noninline_speculation): Adjust call to
1834 resolve-speculation.
1835 (inline_small_functions): Adjust call to resolve_speculation.
1836 (ipa_inline): Likewise.
1837 * ipa-prop.c (ipa_make_edge_direct_to_target): Adjust call to
1839 * ipa-visibility.c (function_and_variable_visibility): Make iteration
1840 safe with regards to edge removal, adjust calls to
1841 redirect_call_stmt_to_callee.
1842 * ipa.c (walk_polymorphic_call_targets): Adjust calls to make_direct
1843 and redirect_call_stmt_to_callee.
1844 * multiple_target.c (create_dispatcher_calls): Adjust call to
1845 redirect_call_stmt_to_callee
1846 (redirect_to_specific_clone): Likewise.
1847 * tree-cfgcleanup.c (delete_unreachable_blocks_update_callgraph):
1848 Adjust calls to cgraph_edge::remove.
1849 * tree-inline.c (copy_bb): Adjust call to set_call_stmt.
1850 (redirect_all_calls): Adjust call to redirect_call_stmt_to_callee.
1851 (expand_call_inline): Adjust call to cgraph_edge::remove.
1853 2020-01-09 Martin Liska <mliska@suse.cz>
1855 * params.opt: Set Optimization for
1856 param_max_speculative_devirt_maydefs.
1858 2020-01-09 Martin Sebor <msebor@redhat.com>
1862 * builtins.c (compute_objsize): Avoid handling MEM_REFs of vector type.
1864 2020-01-09 Martin Liska <mliska@suse.cz>
1866 * auto-profile.c (auto_profile): Use opt_for_fn
1868 * ipa-cp.c (ipcp_lattice::add_value): Likewise.
1869 (propagate_vals_across_arith_jfunc): Likewise.
1870 (hint_time_bonus): Likewise.
1871 (incorporate_penalties): Likewise.
1872 (good_cloning_opportunity_p): Likewise.
1873 (perform_estimation_of_a_value): Likewise.
1874 (estimate_local_effects): Likewise.
1875 (ipcp_propagate_stage): Likewise.
1876 * ipa-fnsummary.c (decompose_param_expr): Likewise.
1877 (set_switch_stmt_execution_predicate): Likewise.
1878 (analyze_function_body): Likewise.
1879 * ipa-inline-analysis.c (offline_size): Likewise.
1880 * ipa-inline.c (early_inliner): Likewise.
1881 * ipa-prop.c (ipa_analyze_node): Likewise.
1882 (ipcp_transform_function): Likewise.
1883 * ipa-sra.c (process_scan_results): Likewise.
1884 (ipa_sra_summarize_function): Likewise.
1885 * params.opt: Rename ipcp-unit-growth to
1886 ipa-cp-unit-growth. Add Optimization for various
1887 IPA-related parameters.
1889 2020-01-09 Richard Biener <rguenther@suse.de>
1892 * gimplify.c (gimplify_expr): Deal with NOP definitions.
1894 2020-01-09 Richard Biener <rguenther@suse.de>
1896 PR tree-optimization/93040
1897 * gimple-ssa-store-merging.c (find_bswap_or_nop): Raise search limit.
1899 2020-01-09 Georg-Johann Lay <avr@gjlay.de>
1901 * common/config/avr/avr-common.c (avr_option_optimization_table)
1902 [OPT_LEVELS_1_PLUS]: Set -fsplit-wide-types-early.
1904 2020-01-09 Martin Liska <mliska@suse.cz>
1906 * cgraphclones.c (symbol_table::materialize_all_clones):
1907 Use cgraph_node::dump_name.
1909 2020-01-09 Jakub Jelinek <jakub@redhat.com>
1912 * config/riscv/riscv.c (riscv_print_operand_reloc): Use
1913 output_operand_lossage instead of gcc_unreachable.
1914 * doc/md.texi (riscv f constraint): Fix typo.
1917 * config/i386/i386.md (subv<mode>4): Use SWIDWI iterator instead of
1918 SWI. Use <general_hilo_operand> instead of <general_operand>. Use
1919 CONST_SCALAR_INT_P instead of CONST_INT_P.
1920 (*subv<mode>4_1): Rename to ...
1921 (subv<mode>4_1): ... this.
1922 (*subv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
1923 define_insn_and_split patterns.
1924 (*subv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
1927 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1929 * vec.c (class selftest::count_dtor): New class.
1930 (selftest::test_auto_delete_vec): New test.
1931 (selftest::vec_c_tests): Call it.
1932 * vec.h (class auto_delete_vec): New class template.
1933 (auto_delete_vec<T>::~auto_delete_vec): New dtor.
1935 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1937 * sbitmap.h (auto_sbitmap): Add operator const_sbitmap.
1939 2020-01-08 Jim Wilson <jimw@sifive.com>
1941 * config/riscv/riscv.c (riscv_legitimize_tls_address): Ifdef out
1942 use of TLS_MODEL_LOCAL_EXEC when not pic.
1944 2020-01-08 David Malcolm <dmalcolm@redhat.com>
1946 * hash-map-tests.c (selftest::test_map_of_strings_to_int): Fix
1949 2020-01-08 Jakub Jelinek <jakub@redhat.com>
1952 * config/i386/i386.md (*stack_protect_set_2_<mode> peephole2,
1953 *stack_protect_set_3 peephole2): Also check that the second
1954 insns source is general_operand.
1957 * config/i386/i386.md (addcarry<mode>_0): Use nonimmediate_operand
1958 predicate for output operand instead of register_operand.
1959 (addcarry<mode>, addcarry<mode>_1): Likewise. Add alternative with
1960 memory destination and non-memory operands[2].
1962 2020-01-08 Martin Liska <mliska@suse.cz>
1964 * cgraph.c (cgraph_node::dump): Use ::dump_name or
1965 ::dump_asm_name instead of (::name or ::asm_name).
1966 * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
1967 * cgraphunit.c (walk_polymorphic_call_targets): Likewise.
1968 (analyze_functions): Likewise.
1969 (expand_all_functions): Likewise.
1970 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
1971 (propagate_bits_across_jump_function): Likewise.
1972 (dump_profile_updates): Likewise.
1973 (ipcp_store_bits_results): Likewise.
1974 (ipcp_store_vr_results): Likewise.
1975 * ipa-devirt.c (dump_targets): Likewise.
1976 * ipa-fnsummary.c (analyze_function_body): Likewise.
1977 * ipa-hsa.c (check_warn_node_versionable): Likewise.
1978 (process_hsa_functions): Likewise.
1979 * ipa-icf.c (sem_item_optimizer::merge_classes): Likewise.
1980 (set_alias_uids): Likewise.
1981 * ipa-inline-transform.c (save_inline_function_body): Likewise.
1982 * ipa-inline.c (recursive_inlining): Likewise.
1983 (inline_to_all_callers_1): Likewise.
1984 (ipa_inline): Likewise.
1985 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1986 (ipa_propagate_frequency): Likewise.
1987 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1988 (remove_described_reference): Likewise.
1989 * ipa-pure-const.c (worse_state): Likewise.
1990 (check_retval_uses): Likewise.
1991 (analyze_function): Likewise.
1992 (propagate_pure_const): Likewise.
1993 (propagate_nothrow): Likewise.
1994 (dump_malloc_lattice): Likewise.
1995 (propagate_malloc): Likewise.
1996 (pass_local_pure_const::execute): Likewise.
1997 * ipa-visibility.c (optimize_weakref): Likewise.
1998 (function_and_variable_visibility): Likewise.
1999 * ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
2000 (ipa_discover_variable_flags): Likewise.
2001 * lto-streamer-out.c (output_function): Likewise.
2002 (output_constructor): Likewise.
2003 * tree-inline.c (copy_bb): Likewise.
2004 * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
2005 * varpool.c (symbol_table::remove_unreferenced_decls): Likewise.
2007 2020-01-08 Richard Biener <rguenther@suse.de>
2010 * tree-eh.c (sink_clobbers): Update virtual operands for
2011 the first and last stmt only. Add a dry-run capability.
2012 (pass_lower_eh_dispatch::execute): Perform clobber sinking
2013 after CFG manipulations and in RPO order to catch all
2014 secondary opportunities reliably.
2016 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
2019 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
2021 2019-01-08 Richard Biener <rguenther@suse.de>
2024 * gimple-fold.c (rewrite_to_defined_overflow): Mark stmt modified.
2025 * tree-ssa-loop-im.c (move_computations_worker): Properly adjust
2026 virtual operand, also updating SSA use.
2027 * gimple-loop-interchange.cc (loop_cand::undo_simple_reduction):
2028 Update stmt after resetting virtual operand.
2029 (tree_loop_interchange::move_code_to_inner_loop): Likewise.
2030 * gimple-iterator.c (gsi_remove): When not removing the stmt
2031 permanently do not delink immediate uses or mark the stmt modified.
2033 2020-01-08 Martin Liska <mliska@suse.cz>
2035 * ipa-fnsummary.c (dump_ipa_call_summary): Use symtab_node::dump_name.
2036 (ipa_call_context::estimate_size_and_time): Likewise.
2037 (inline_analyze_function): Likewise.
2039 2020-01-08 Martin Liska <mliska@suse.cz>
2041 * cgraph.c (cgraph_node::dump): Use systematically
2044 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
2046 Add -nodevicespecs option for avr.
2049 * config/avr/avr.opt (-nodevicespecs): New driver option.
2050 * config/avr/driver-avr.c (avr_devicespecs_file): Only issue
2051 "-specs=device-specs/..." if that option is not set.
2052 * doc/invoke.texi (AVR Options) <-nodevicespecs>: Document.
2054 2020-01-08 Georg-Johann Lay <avr@gjlay.de>
2056 Implement 64-bit double functions for avr.
2059 * config.gcc (tm_defines) [target=avr]: Support --with-libf7,
2060 --with-double-comparison.
2061 * doc/install.texi: Document them.
2062 * config/avr/avr-c.c (avr_cpu_cpp_builtins)
2063 <WITH_LIBF7_LIBGCC, WITH_LIBF7_MATH, WITH_LIBF7_MATH_SYMBOLS>
2064 <WITH_DOUBLE_COMPARISON>: New built-in defines.
2065 * doc/invoke.texi (AVR Built-in Macros): Document them.
2066 * config/avr/avr-protos.h (avr_float_lib_compare_returns_bool): New.
2067 * config/avr/avr.c (avr_float_lib_compare_returns_bool): New function.
2068 * config/avr/avr.h (FLOAT_LIB_COMPARE_RETURNS_BOOL): New macro.
2070 2020-01-08 Richard Earnshaw <rearnsha@arm.com>
2073 * config/arm/t-multilib (MULTILIB_MATCHES): Add rules to match
2074 armv7-a{+mp,+sec,+mp+sec} to appropriate armv7 multilib variants
2075 when only building rm-profile multilibs.
2077 2020-01-08 Feng Xue <fxue@os.amperecomputing.com>
2080 * ipa-cp.c (self_recursively_generated_p): Find matched aggregate
2081 lattice for a value to check.
2082 (propagate_vals_across_arith_jfunc): Add an assertion to ensure
2083 finite propagation in self-recursive scc.
2085 2020-01-08 Luo Xiong Hu <luoxhu@linux.ibm.com>
2087 * ipa-inline.c (caller_growth_limits): Restore the AND.
2089 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
2091 * config/gcn/gcn-valu.md (VEC_1REG_INT_ALT): Delete iterator.
2092 (VEC_ALLREG_ALT): New iterator.
2093 (VEC_ALLREG_INT_MODE): New iterator.
2094 (VCMP_MODE): New iterator.
2095 (VCMP_MODE_INT): New iterator.
2096 (vec_cmpu<mode>di): Use VCMP_MODE_INT.
2097 (vec_cmp<u>v64qidi): New define_expand.
2098 (vec_cmp<mode>di_exec): Use VCMP_MODE.
2099 (vec_cmpu<mode>di_exec): New define_expand.
2100 (vec_cmp<u>v64qidi_exec): New define_expand.
2101 (vec_cmp<mode>di_dup): Use VCMP_MODE.
2102 (vec_cmp<mode>di_dup_exec): Use VCMP_MODE.
2103 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>): Rename ...
2104 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>): ... to this.
2105 (vcond<VEC_ALL1REG_MODE:mode><VEC_1REG_ALT:mode>_exec): Rename ...
2106 (vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>_exec): ... to this.
2107 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>): Rename ...
2108 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>): ... to this.
2109 (vcondu<VEC_ALL1REG_MODE:mode><VEC_1REG_INT_ALT:mode>_exec): Rename ...
2110 (vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>_exec): ... to
2112 * config/gcn/gcn.c (print_operand): Fix 8 and 16 bit suffixes.
2113 * config/gcn/gcn.md (expander): Add sign_extend and zero_extend.
2115 2020-01-07 Andrew Stubbs <ams@codesourcery.com>
2117 * config/gcn/constraints.md (DA): Update description and match.
2119 (Db): New constraint.
2120 * config/gcn/gcn-protos.h (gcn_inline_constant64_p): Add second
2122 * config/gcn/gcn.c (gcn_inline_constant64_p): Add 'mixed' parameter.
2123 Implement 'Db' mixed immediate type.
2124 * config/gcn/gcn-valu.md (addcv64si3<exec_vcc>): Rework constraints.
2125 (addcv64si3_dup<exec_vcc>): Delete.
2126 (subcv64si3<exec_vcc>): Rework constraints.
2127 (addv64di3): Rework constraints.
2128 (addv64di3_exec): Rework constraints.
2129 (subv64di3): Rework constraints.
2130 (addv64di3_dup): Delete.
2131 (addv64di3_dup_exec): Delete.
2132 (addv64di3_zext): Rework constraints.
2133 (addv64di3_zext_exec): Rework constraints.
2134 (addv64di3_zext_dup): Rework constraints.
2135 (addv64di3_zext_dup_exec): Rework constraints.
2136 (addv64di3_zext_dup2): Rework constraints.
2137 (addv64di3_zext_dup2_exec): Rework constraints.
2138 (addv64di3_sext_dup2): Rework constraints.
2139 (addv64di3_sext_dup2_exec): Rework constraints.
2141 2020-01-07 Andre Vieira <andre.simoesdiasvieira@arm.com>
2143 * doc/sourcebuild.texi (arm_little_endian, arm_nothumb): Documented
2144 existing target checks.
2146 2020-01-07 Richard Biener <rguenther@suse.de>
2148 * doc/install.texi: Bump minimal supported MPC version.
2150 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
2152 * langhooks-def.h (lhd_simulate_enum_decl): Declare.
2153 (LANG_HOOKS_SIMULATE_ENUM_DECL): Use it.
2154 * langhooks.c: Include stor-layout.h.
2155 (lhd_simulate_enum_decl): New function.
2156 * config/aarch64/aarch64-sve-builtins.cc (init_builtins): Call
2157 handle_arm_sve_h for the LTO frontend.
2158 (register_vector_type): Cope with null returns from pushdecl.
2160 2020-01-07 Richard Sandiford <richard.sandiford@arm.com>
2162 * config/aarch64/aarch64-protos.h (aarch64_sve::svbool_type_p)
2163 (aarch64_sve::nvectors_if_data_type): Replace with...
2164 (aarch64_sve::builtin_type_p): ...this.
2165 * config/aarch64/aarch64-sve-builtins.cc: Include attribs.h.
2166 (find_vector_type): Delete.
2167 (add_sve_type_attribute): New function.
2168 (lookup_sve_type_attribute): Likewise.
2169 (register_builtin_types): Add an "SVE type" attribute to each type.
2170 (register_tuple_type): Likewise.
2171 (svbool_type_p, nvectors_if_data_type): Delete.
2172 (mangle_builtin_type): Use lookup_sve_type_attribute.
2173 (builtin_type_p): Likewise. Add an overload that returns the
2174 number of constituent vector and predicate registers.
2175 * config/aarch64/aarch64.c (aarch64_sve_argument_p): Delete.
2176 (aarch64_returns_value_in_sve_regs_p): Use aarch64_sve::builtin_type_p
2177 instead of aarch64_sve_argument_p.
2178 (aarch64_takes_arguments_in_sve_regs_p): Likewise.
2179 (aarch64_pass_by_reference): Likewise.
2180 (aarch64_function_value_1): Likewise.
2181 (aarch64_return_in_memory): Likewise.
2182 (aarch64_layout_arg): Likewise.
2184 2020-01-07 Jakub Jelinek <jakub@redhat.com>
2186 PR tree-optimization/93156
2187 * tree-ssa-ccp.c (bit_value_binop): For x * x note that the second
2188 least significant bit is always clear.
2190 PR tree-optimization/93118
2191 * match.pd ((x >> c) << c -> x & (-1<<c)): Add nop_convert?. Add new
2192 simplifier with two intermediate conversions.
2194 2020-01-07 Martin Liska <mliska@suse.cz>
2196 * params.opt: Add Optimization for various parameters.
2198 2020-01-07 Martin Liska <mliska@suse.cz>
2201 * doc/extend.texi: Explain cloning for target_clone
2204 2020-01-07 Martin Liska <mliska@suse.cz>
2206 PR tree-optimization/92860
2207 * common.opt: Make in Optimization option
2208 as it is affected by -O0, which is an Optimization
2210 * tree-inline.c (tree_inlinable_function_p):
2211 Use opt_for_fn for warn_inline.
2212 (expand_call_inline): Likewise.
2214 2020-01-07 Martin Liska <mliska@suse.cz>
2216 PR tree-optimization/92860
2217 * common.opt: Make flag_ree as optimization
2220 2020-01-07 Martin Liska <mliska@suse.cz>
2222 PR optimization/92860
2223 * params.opt: Mark param_min_crossjump_insns with Optimization
2226 2020-01-07 Luo Xiong Hu <luoxhu@linux.ibm.com>
2228 * ipa-inline-analysis.c (estimate_growth): Fix typo.
2229 * ipa-inline.c (caller_growth_limits): Use OR instead of AND.
2231 2020-01-06 Michael Meissner <meissner@linux.ibm.com>
2233 * config/rs6000/rs6000.c (hard_reg_and_mode_to_addr_mask): New
2234 helper function to return the valid addressing formats for a given
2235 hard register and mode.
2236 (rs6000_adjust_vec_address): Call hard_reg_and_mode_to_addr_mask.
2238 * config/rs6000/constraints.md (Q constraint): Update
2240 * doc/md.texi (RS/6000 constraints): Update 'Q' cosntraint
2243 * config/rs6000/vsx.md (vsx_extract_<mode>_var, VSX_D iterator):
2244 Use 'Q' for doing vector extract from memory.
2245 (vsx_extract_v4sf_var): Use 'Q' for doing vector extract from
2247 (vsx_extract_<mode>_var, VSX_EXTRACT_I iterator): Use 'Q' for
2248 doing vector extract from memory.
2249 (vsx_extract_<mode>_<VS_scalar>mode_var): Use 'Q' for doing vector
2250 extract from memory.
2252 * config/rs6000/rs6000.c (rs6000_adjust_vec_address): Add support
2253 for the offset being 34-bits when -mcpu=future is used.
2255 2020-01-06 John David Anglin <danglin@gcc.gnu.org>
2257 * config/pa/pa.md: Revert change to use ordered_comparison_operator
2258 instead of cmpib_comparison_operator in cmpib patterns.
2259 * config/pa/predicates.md (cmpib_comparison_operator): Revert removal
2260 of cmpib_comparison_operator. Revise comment.
2262 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
2264 * tree-vect-slp.c (vect_build_slp_tree_1): Require all shifts
2265 in an IFN_DIV_POW2 node to be equal.
2267 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
2269 * tree-vect-stmts.c (vect_check_load_store_mask): Rename to...
2270 (vect_check_scalar_mask): ...this.
2271 (vectorizable_store, vectorizable_load): Update call accordingly.
2272 (vectorizable_call): Use vect_check_scalar_mask to check the mask
2273 argument in calls to conditional internal functions.
2275 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
2277 * config/gcn/gcn-valu.md (subv64di3): Use separate alternatives for
2278 '0' matching inputs.
2279 (subv64di3_exec): Likewise.
2281 2020-01-06 Bryan Stenson <bryan@siliconvortex.com>
2283 * config/mips/mips.c (vr4130_align_insns): Fix typo.
2284 * doc/md.texi (movstr): Likewise.
2286 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
2288 * config/gcn/gcn-valu.md (vec_extract<mode><scalar_mode>): Add early
2291 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
2293 * config/aarch64/t-aarch64 ($(srcdir)/config/aarch64/aarch64-tune.md):
2295 (s-aarch64-tune-md): ...this new stamp file. Pipe the new contents
2296 to a temporary file and use move-if-change to update the real
2297 file where necessary.
2299 2020-01-06 Richard Sandiford <richard.sandiford@arm.com>
2301 * config/aarch64/aarch64-sve.md (@aarch64_sel_dup<mode>): Use Upl
2302 rather than Upa for CPY /M.
2304 2020-01-06 Andrew Stubbs <ams@codesourcery.com>
2306 * config/gcn/gcn.c (gcn_inline_constant_p): Allow 64 as an inline
2309 2020-01-06 Martin Liska <mliska@suse.cz>
2311 PR tree-optimization/92860
2312 * params.opt: Mark param_max_combine_insns with Optimization
2315 2020-01-05 Jakub Jelinek <jakub@redhat.com>
2318 * config/i386/i386.md (SWIDWI): New mode iterator.
2319 (DWI, dwi): Add TImode variants.
2320 (addv<mode>4): Use SWIDWI iterator instead of SWI. Use
2321 <general_hilo_operand> instead of <general_operand>. Use
2322 CONST_SCALAR_INT_P instead of CONST_INT_P.
2323 (*addv<mode>4_1): Rename to ...
2324 (addv<mode>4_1): ... this.
2325 (QWI): New mode attribute.
2326 (*addv<dwi>4_doubleword, *addv<dwi>4_doubleword_1): New
2327 define_insn_and_split patterns.
2328 (*addv<mode>4_overflow_1, *addv<mode>4_overflow_2): New define_insn
2330 (uaddv<mode>4): Use SWIDWI iterator instead of SWI. Use
2331 <general_hilo_operand> instead of <general_operand>.
2332 (*addcarry<mode>_1): New define_insn.
2333 (*add<dwi>3_doubleword_cc_overflow_1): New define_insn_and_split.
2335 2020-01-03 Konstantin Kharlamov <Hi-Angel@yandex.ru>
2337 * gdbinit.in (pr, prl, pt, pct, pgg, pgq, pgs, pge, pmz, pdd, pbs, pbm):
2338 Use "call" instead of "set".
2340 2020-01-03 Martin Jambor <mjambor@suse.cz>
2343 * ipa-cp.c (print_all_lattices): Skip functions without info.
2345 2020-01-03 Jakub Jelinek <jakub@redhat.com>
2348 * config/i386/i386-options.c (ix86_simd_clone_adjust): If
2349 TARGET_PREFER_AVX128, use prefer-vector-width=256 for 'c' and 'd'
2350 simd clones. If TARGET_PREFER_AVX256, use prefer-vector-width=512
2351 for 'e' simd clones.
2354 * config/i386/i386.opt (x_prefer_vector_width_type): Remove TargetSave
2356 (mprefer-vector-width=): Add Save.
2357 * config/i386/i386-options.c (ix86_target_string): Add PVW argument, print
2358 -mprefer-vector-width= if non-zero. Fix up -mfpmath= comment.
2359 (ix86_debug_options, ix86_function_specific_print): Adjust
2360 ix86_target_string callers.
2361 (ix86_valid_target_attribute_inner_p): Handle prefer-vector-width=.
2362 (ix86_valid_target_attribute_tree): Likewise.
2363 * config/i386/i386-options.h (ix86_target_string): Add PVW argument.
2364 * config/i386/i386-expand.c (ix86_expand_builtin): Adjust
2365 ix86_target_string caller.
2368 * config/i386/i386.md (abs<mode>2): Use expand_simple_binop instead of
2369 emitting ASHIFTRT, XOR and MINUS by hand. Use gen_int_mode with QImode
2370 instead of gen_int_shift_amount + convert_modes.
2372 PR rtl-optimization/93088
2373 * loop-iv.c (find_single_def_src): Punt after looking through
2374 128 reg copies for regs with single definitions. Move definitions
2377 2020-01-02 Dennis Zhang <dennis.zhang@arm.com>
2379 * config/arm/arm-c.c (arm_cpu_builtins): Define
2380 __ARM_FEATURE_MATMUL_INT8, __ARM_FEATURE_BF16_VECTOR_ARITHMETIC,
2381 __ARM_FEATURE_BF16_SCALAR_ARITHMETIC, and
2382 __ARM_BF16_FORMAT_ALTERNATIVE when enabled.
2383 * config/arm/arm-cpus.in (armv8_6, i8mm, bf16): New features.
2384 * config/arm/arm-tables.opt: Regenerated.
2385 * config/arm/arm.c (arm_option_reconfigure_globals): Initialize
2386 arm_arch_i8mm and arm_arch_bf16 when enabled.
2387 * config/arm/arm.h (TARGET_I8MM): New macro.
2388 (TARGET_BF16_FP, TARGET_BF16_SIMD): Likewise.
2389 * config/arm/t-aprofile: Add matching rules for -march=armv8.6-a.
2390 * config/arm/t-arm-elf (all_v8_archs): Add armv8.6-a.
2391 * config/arm/t-multilib: Add matching rules for -march=armv8.6-a.
2392 (v8_6_a_simd_variants): New.
2393 (v8_*_a_simd_variants): Add i8mm and bf16.
2394 * doc/invoke.texi (armv8.6-a, i8mm, bf16): Document new options.
2396 2020-01-02 Jakub Jelinek <jakub@redhat.com>
2399 * predict.c (compute_function_frequency): Don't call
2400 warn_function_cold on functions that already have cold attribute.
2402 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
2405 * config/pa/pa.c (pa_elf_select_rtx_section): New. Put references to
2406 COMDAT group function labels in .data.rel.ro.local section.
2407 * config/pa/pa32-linux.h (TARGET_ASM_SELECT_RTX_SECTION): Define.
2410 * config/pa/pa.md (scc): Use ordered_comparison_operator instead of
2411 comparison_operator in B and S integer comparisons. Likewise, use
2412 ordered_comparison_operator instead of cmpib_comparison_operator in
2414 * config/pa/predicates.md (cmpib_comparison_operator): Remove.
2416 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2418 Update copyright years.
2420 * gcc.c (process_command): Update copyright notice dates.
2421 * gcov-dump.c (print_version): Ditto.
2422 * gcov.c (print_version): Ditto.
2423 * gcov-tool.c (print_version): Ditto.
2424 * gengtype.c (create_file): Ditto.
2425 * doc/cpp.texi: Bump @copying's copyright year.
2426 * doc/cppinternals.texi: Ditto.
2427 * doc/gcc.texi: Ditto.
2428 * doc/gccint.texi: Ditto.
2429 * doc/gcov.texi: Ditto.
2430 * doc/install.texi: Ditto.
2431 * doc/invoke.texi: Ditto.
2433 2020-01-01 Jan Hubicka <hubicka@ucw.cz>
2435 * ipa.c (walk_polymorphic_call_targets): Fix updating of overall
2438 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2440 PR tree-optimization/93098
2441 * match.pd (popcount): For shift amounts, use integer_onep
2442 or wi::to_widest () == cst instead of tree_to_uhwi () == cst
2443 tests. Make sure that precision is power of two larger than or equal
2444 to 16. Ensure shift is never negative. Use HOST_WIDE_INT_UC macro
2445 instead of ULL suffixed constants. Formatting fixes.
2447 Copyright (C) 2020 Free Software Foundation, Inc.
2449 Copying and distribution of this file, with or without modification,
2450 are permitted in any medium without royalty provided the copyright
2451 notice and this notice are preserved.