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