2021-12-30 Jakub Jelinek PR rtl-optimization/103756 * regrename.c (find_rename_reg): Test noop_move_p on the first non-debug insn in the chain rather than on the first insn. 2021-12-30 Jakub Jelinek PR debug/103808 * emit-rtl.c (gen_rtx_REG_offset): Use gen_raw_REG instead of gen_rtx_REG. 2021-12-30 Martin Liska * doc/cpp.texi: Add missing dash for argument. 2021-12-30 Jakub Jelinek PR c++/103012 * config/i386/i386-c.c (ix86_pragma_target_parse): Perform cpp_define/cpp_undef calls with forced token locations BUILTINS_LOCATION. * config/arm/arm-c.c (arm_pragma_target_parse): Likewise. * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse): Likewise. * config/s390/s390-c.c (s390_pragma_target_parse): Likewise. 2021-12-30 Jakub Jelinek PR rtl-optimization/103860 * shrink-wrap.c (try_shrink_wrapping): Make sure can_get_prologue is called on pro even if nothing further is pushed into vec. 2021-12-30 Xionghu Luo * loop-invariant.c (find_invariants_bb): Check profile count before motion. (find_invariants_body): Add argument. 2021-12-29 Ian Lance Taylor PR go/103847 * godump.c (go_force_record_alignment): Name the alignment field "_". 2021-12-29 Jakub Jelinek PR debug/103742 * tree-ssa-dce.c (make_forwarders_with_degenerate_phis): If any phi argument is not CONSTANT_CLASS_P or SSA_NAME and any arguments are equal, change second from hash value to lowest dest_idx from the edges which have equal argument and resort to ensure -fcompare-debug stability. 2021-12-29 Martin Liska * collect2.c (main): Add ld.mold. * common.opt: Add -fuse-ld=mold. * doc/invoke.texi: Document it. * gcc.c (driver_handle_option): Handle -fuse-ld=mold. * opts.c (common_handle_option): Likewise. 2021-12-29 Uroš Bizjak * config/i386/sse.md (vec_pack_float_): Perform gen_avx512dq_floatv2div2sf2 into a pseudo and emit move insn into operands[0]. (fix_truncv2sfv2di2): Use lowpart_subreg instead of simplify_gen_subreg. (trunc2): Perform gen_avx512vl_truncatevqi2 into a pseudo and emit move insn into operands[0]. (trunc2): Perform gen_avx512vl_truncatevhi2 into a pseudo and emit move insn into operands[0]. (truncv2div2si2): Perform gen_avx512vl_truncatev2div2si2 into a pseudo and emit move insn into operands[0]. (truncv8div8qi2): Perform gen_avx512f_truncatev8div16qi2 into a pseudo and emit move insn into operands[0]. (v8qiv8hi2): Use lowpart_subreg instead of simplify_gen_subreg. (v8qiv8si2): Ditto. (v4qiv4si2): Ditto. (v4hiv4si2): Ditto. (v8qiv8di2): Ditto. (v4qiv4di2): Ditto. (v2qiv2di2): Ditto. (v4hiv4di2): Ditto. (v2hiv2di2): Ditto. (v2siv2di2): Ditto. 2021-12-29 Xionghu Luo PR tree-optimization/103793 * tree-ssa-loop-split.c (fix_loop_bb_probability): New function. (split_loop): Use multiply to scale loop1's exit probability. (do_split_loop_on_cond): Call fix_loop_bb_probability. 2021-12-28 Jason Merrill PR c++/99968 * tree.c (verify_type): Allow enumerator with BOOLEAN_TYPE. 2021-12-28 Jakub Jelinek PR middle-end/103813 * fold-const.c (fold_truth_andor_1): Punt of const_binop LSHIFT_EXPR or RSHIFT_EXPR returns NULL. Formatting fix. 2021-12-28 Jakub Jelinek PR rtl-optimization/103837 * loop-invariant.c (can_move_invariant_reg): Ignore DEBUG_INSNs in the decisions whether to return false or continue and right before returning true reset those debug insns that previously caused returning false. 2021-12-28 Jakub Jelinek PR debug/103838 * optabs.c (expand_doubleword_mod, expand_doubleword_divmod): Only check newly added insns for CALL_P, not the last insn of previous code. 2021-12-28 Martin Liska PR driver/103465 * opts.c (finish_options): More part of diagnostics to ... (diagnose_options): ... here. Call the function from both finish_options and process_options. * opts.h (diagnose_options): Declare. * toplev.c (process_options): Call diagnose_options. 2021-12-28 Martin Liska * doc/contrib.texi: Replace http:// with https. * doc/contribute.texi: Likewise. * doc/extend.texi: Likewise. * doc/gccint.texi: Likewise. * doc/gnu.texi: Likewise. * doc/implement-c.texi: Likewise. * doc/implement-cxx.texi: Likewise. * doc/include/fdl.texi: Likewise. * doc/include/gpl_v3.texi: Likewise. * doc/install.texi: Likewise. * doc/invoke.texi: Likewise. * doc/passes.texi: Likewise. * doc/service.texi: Likewise. * doc/sourcebuild.texi: Likewise. * doc/standards.texi: Likewise. 2021-12-28 Jakub Jelinek PR target/103842 * config/i386/mmx.md (divv2sf3): Use force_reg on op1. Always perform divv4sf3 into a pseudo and emit_move_insn into operands[0]. 2021-12-27 John David Anglin * config/pa/pa-protos.h: Delete pa_maybe_emit_compare_and_swap_exchange_loop() declaration. * config/pa/pa.c (pa_expand_compare_and_swap_loop): Delete. (pa_maybe_emit_compare_and_swap_exchange_loop): Delete. * config/pa/pa.md (atomic_storeq): Use __sync_lock_test_and_set instead of pa_maybe_emit_compare_and_swap_exchange_loop. (atomic_storehi, atomic_storesi, atomic_storedi): Likewise. 2021-12-27 H.J. Lu PR target/103762 * config/i386/constraints.md (BM): New constraint. * config/i386/i386.md (m): New mode attribute. Replace the 'm' constraint on with the '' constraint. Replace the 'm' constraint on x86_64_general_operand with the 'BM' constraint. 2021-12-26 H.J. Lu PR target/103785 * config/i386/i386.md: Swap operand order in comments and check AX input in any_mul_highpart peepholes. 2021-12-24 Uroš Bizjak PR target/95046 PR target/103797 * config/i386/mmx.md (divv2sf3): New instruction pattern. 2021-12-24 Iain Sandoe * config/darwin.c (darwin_override_options): Make a comment more inclusive. 2021-12-24 Iain Sandoe * config.gcc: Emit L2_MAX_OFILE_ALIGNMENT with suitable values for the host. * config/darwin.c (darwin_emit_common): Error for alignment values > 32768. * config/darwin.h (MAX_OFILE_ALIGNMENT): Rework to use the configured L2_MAX_OFILE_ALIGNMENT. 2021-12-24 Iain Sandoe * config/darwin.c (darwin_override_options): When checking for the flag-reorder-and-partition case, also check that it is set on. 2021-12-24 Iain Sandoe * config/darwin.h (OBJECT_FORMAT_MACHO): New. 2021-12-23 Roger Sayle Uroš Bizjak PR target/103773 * config/i386/i386.md (*mov_and): New define_insn for writing a zero to memory using AND. (*mov_or): Extend to allow memory destination and HImode. (*movdi_internal): Remove -Oz push/pop optimization from here. (*movsi_internal): Likewise. (peephole2): Perform -Oz push/pop optimization here, only for register destinations, values other than zero, and in functions that don't used the red zone. (peephole2): With -Oz, convert writes of 0 or -1 to memory into their clobber forms, i.e. *mov_and and *mov_or resp. 2021-12-23 konglin1 * config/i386/avx512bf16intrin.h (_mm_cvtsbh_ss): Add new intrinsic. (_mm512_cvtpbh_ps): Likewise. (_mm512_maskz_cvtpbh_ps): Likewise. (_mm512_mask_cvtpbh_ps): Likewise. * config/i386/avx512bf16vlintrin.h (_mm_cvtness_sbh): Likewise. (_mm_cvtpbh_ps): Likewise. (_mm256_cvtpbh_ps): Likewise. (_mm_maskz_cvtpbh_ps): Likewise. (_mm256_maskz_cvtpbh_ps): Likewise. (_mm_mask_cvtpbh_ps): Likewise. (_mm256_mask_cvtpbh_ps): Likewise. 2021-12-23 Feng Xue PR ipa/103786 * tree.c (verify_type): Fix typo. 2021-12-23 liuhongt PR target/103750 * config/i386/sse.md (*_cmp3_zero_extend): New pre_reload define_insn_and_split. (*_cmp3_zero_extend): Ditto. (*_ucmp3_zero_extend): Ditto. (*_ucmp3_zero_extend): Ditto. (*_cmp3_zero_extend_2): Ditto. (*_cmp3_zero_extend_2): Ditto. (*_ucmp3_zero_extend_2): Ditto. (*_ucmp3_zero_extend_2): Ditto. 2021-12-22 Murray Steele * config.gcc (arm*-*-*): Add arm-mve-builtins.o to extra_objs. * config/arm/arm-c.c (arm_pragma_arm): Handle "#pragma GCC arm". (arm_register_target_pragmas): Register it. * config/arm/arm-protos.h: (arm_mve::arm_handle_mve_types_h): New prototype. * config/arm/arm_mve_types.h: Replace MVE type definitions with new pragma. * config/arm/t-arm: (arm-mve-builtins.o): New target rule. * config/arm/arm-mve-builtins.cc: New file. * config/arm/arm-mve-builtins.def: New file. * config/arm/arm-mve-builtins.h: New file. 2021-12-22 Murray Steele * config/arm/arm-builtins.c (enum arm_type_qualifiers): Move to arm_builtins.h. (enum arm_simd_type): Move to arm-builtins.h. (struct arm_simd_type_info): Move to arm-builtins.h. * config/arm/arm-builtins.h (enum arm_simd_type): Move from arm-builtins.c. (enum arm_type_qualifiers): Move from arm-builtins.c. (struct arm_simd_type_info): Move from arm-builtins.c. 2021-12-22 Martin Liska * doc/extend.texi: Unify all function declarations in examples where some miss trailing ';'. 2021-12-22 Martin Liska * doc/extend.texi: Unify all function declarations in examples where some miss trailing ';'. 2021-12-22 Martin Liska * doc/extend.texi: Unify all function declarations in examples where some miss trailing ';'. 2021-12-22 Martin Liska * doc/extend.texi: Use uppercase letters for SSEx. 2021-12-21 Jiang Haochen * config/i386/bmiintrin.h (_tzcnt_u16): New intrinsic. (_andn_u32): Ditto. (_andn_u64): Ditto. 2021-12-21 Xionghu Luo * tree-ssa-loop-im.c (bb_colder_than_loop_preheader): New function. (get_coldest_out_loop): New function. (determine_max_movement): Use get_coldest_out_loop. (move_computations_worker): Adjust and fix iteration udpate. (class ref_in_loop_hot_body): New functor. (ref_in_loop_hot_body::operator): New. (can_sm_ref_p): Use for_all_locs_in_loop. (fill_coldest_and_hotter_out_loop): New. (tree_ssa_lim_finalize): Free coldest_outermost_loop and hotter_than_inner_loop. (loop_invariant_motion_in_fun): Call fill_coldest_and_hotter_out_loop. 2021-12-21 Xionghu Luo * tree-ssa-loop-split.c (split_loop): Fix incorrect profile_count and probability. (do_split_loop_on_cond): Likewise. 2021-12-21 Xionghu Luo PR middle-end/103270 * predict.c (predict_extra_loop_exits): Add loop parameter. (predict_loops): Call with loop argument. 2021-12-21 Xionghu Luo * config/rs6000/altivec.md (altivec_vaddus): Replace UNSPEC_VADDU with us_plus. (altivec_vaddss): Replace UNSPEC_VADDS with ss_plus. (altivec_vsubus): Replace UNSPEC_VSUBU with us_minus. (altivec_vsubss): Replace UNSPEC_VSUBS with ss_minus. (altivec_abss_): Likewise. 2021-12-20 Uroš Bizjak PR target/103772 * config/i386/sse.md (_pinsr): Add earlyclobber to (x,x,x,i) alternative. (_pinsr peephole2): Remove. (_pinsr splitter): Use output operand as a temporary register. Split after reload_completed. 2021-12-20 Roger Sayle Uroš Bizjak * config/i386/i386.md (any_mul_highpart): New code iterator. (sgnprefix, s): Add attribute support for [su]mul_highpart. (mul3_highpart): Delete expander. (mul3_highpart, mulsi32_highpart_zext): New define_insn patterns. (define_peephole2): Tweak the register allocation for the above instructions after reload. 2021-12-20 Joel Sherrill * config.gcc: Obsolete m32c-*-rtems* target. 2021-12-20 Martin Liska * opts.c (default_options_optimization): Support -Oz in -Ox option hints. 2021-12-20 Jan Hubicka PR ipa/103669 * ipa-modref.c (modref_eaf_analysis::analyze_ssa_name): Add deferred parameter. (modref_eaf_analysis::propagate): Use it. 2021-12-20 liuhongt PR target/98468 * config/i386/sse.md (*bit_and_float_vector_all_ones): New pre-reload splitter. 2021-12-19 Jan Hubicka PR ipa/103766 * ipa-modref.c (modref_merge_call_site_flags): Fix early exit condition 2021-12-19 Patrick Palka * print-tree.c (print_node) : Dump DECL_LANG_FLAG_8. 2021-12-19 Andrew Pinski * tree-ssa-phiopt.c (gimple_simplify_phiopt): Annotate the new sequence with the location of the conditional statement. 2021-12-18 Roger Sayle Uroš Bizjak PR target/103611 * config/i386/i386.md (any_or_plus): New code iterator. (define_split): Split (HI<<32)|zext(LO) into piece-wise move instructions on !TARGET_64BIT. * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Restrict to TARGET_64BIT. 2021-12-18 Roger Sayle PR target/32803 * common.opt (Oz): New command line option. * doc/invoke.texi: Document the new -Oz option. * lto-wrapper.c (merge_and_complain, append_compiler_options): Treat OPT_Oz as synonymous with OPT_Os. * optc-save-gen.awk: Increase maximum value of optimize_size to 2. * opts.c (default_options_optimization) [OPT_Oz]: Handle OPT_Oz just like OPT_Os, except set opt->x_optimize_size to 2. (common_handle_option): Skip OPT_Oz just like OPT_Os. * config/i386/i386.md (*movdi_internal): Use a push/pop sequence for suitable SImode TYPE_IMOV moves when optimize_size > 1. (*movsi_internal): Likewise. 2021-12-18 Siddhesh Poyarekar PR tree-optimization/103759 * tree-object-size.c (unknown, initval): Remove functions. (size_unknown, size_initval, size_unknown_p): Operate directly on trees. 2021-12-18 François-Xavier Coudert * config/darwin-driver.c: Make version code more future-proof. * config.gcc: Homogeneize darwin versions. * configure.ac: Homogeneize darwin versions. * configure: Regenerate. 2021-12-17 Marek Polacek PR c/103649 * attribs.c (handle_ignored_attributes_option): Create the fake attribute with max_length == -2. (attribute_ignored_p): New overloads. * attribs.h (attribute_ignored_p): Declare them. * tree-core.h (struct attribute_spec): Document that max_length can be -2. 2021-12-17 Segher Boessenkool PR target/103624 * config/rs6000/rs6000-builtins.def (__builtin_darn): Expand to darn_64_di. Add {32bit} attribute. Return long. (__builtin_darn_32): Expand to darn_32_di. Add {32bit} attribute. Return long. (__builtin_darn_raw): Expand to darn_raw_di. Add {32bit} attribute. Return long. * config/rs6000/rs6000-call.c (rs6000_expand_builtin): Expand the darn builtins to the _si variants for -m32. * config/rs6000/rs6000.md (UNSPECV_DARN_32, UNSPECV_DARN_RAW): Delete. (UNSPECV_DARN): Update comment. (darn_32, darn_raw, darn): Delete. (darn_32_, darn_64_, darn_raw_ for GPR): New. (@darn for GPR): New. 2021-12-17 Bill Schmidt * config/rs6000/rs6000-overload.def (__builtin_vec_promote): Add second argument. 2021-12-17 Richard Sandiford PR tree-optimization/103744 * tree-vect-stmts.c (vectorizable_load): Handle multi-vector SLP gather loads. 2021-12-17 Martin Liska * doc/invoke.texi: Rename to -fstack-protector. 2021-12-17 Martin Liska * doc/invoke.texi: Fix spelling issues. 2021-12-17 Tamar Christina PR tree-optimization/103741 * tree-vect-stmts.c (vectorizable_operation): Check for boolean. 2021-12-17 Iain Sandoe * config/darwin-driver.c (darwin_driver_init): Exit from the option handling early if the command line is definitely enpty. * config/darwin.h (SUBTARGET_DRIVER_SELF_SPECS): Remove setting for the default content of weak_reference_mismatches. 2021-12-17 Iain Sandoe * config/rs6000/darwin.h: Drop trailing _x from the builtin_decls array name. 2021-12-17 Haochen Jiang PR target/100738 * config/i386/sse.md (*avx_cmp3_lt, *avx_cmp3_ltint): Remove MEM_P restriction and add force_reg for operands[2]. (*avx_cmp3_ltint_not): Add new define_insn_and_split. 2021-12-17 Siddhesh Poyarekar * builtins.def (BUILT_IN_DYNAMIC_OBJECT_SIZE): New builtin. * tree-object-size.h: Move object size type bits enum from tree-object-size.c and add new value OST_DYNAMIC. * builtins.c (expand_builtin, fold_builtin_2): Handle it. (fold_builtin_object_size): Handle new builtin and adjust for change to compute_builtin_object_size. * tree-object-size.c: Include builtins.h. (compute_builtin_object_size): Adjust. (early_object_sizes_execute_one, dynamic_object_sizes_execute_one): New functions. (object_sizes_execute): Rename insert_min_max_p argument to early. Handle BUILT_IN_DYNAMIC_OBJECT_SIZE and call the new functions. * doc/extend.texi (__builtin_dynamic_object_size): Document new builtin. 2021-12-17 Siddhesh Poyarekar * tree-object-size.h (compute_builtin_object_size): Return tree instead of HOST_WIDE_INT. * builtins.c (fold_builtin_object_size): Adjust. * gimple-fold.c (gimple_fold_builtin_strncat): Likewise. * ubsan.c (instrument_object_size): Likewise. * tree-object-size.c (object_size): New structure. (object_sizes): Change type to vec. (initval): New function. (unknown): Use it. (size_unknown_p, size_initval, size_unknown): New functions. (object_sizes_unknown_p): Use it. (object_sizes_get): Return tree. (object_sizes_initialize): Rename from object_sizes_set_force and set VAL parameter type as tree. Add new parameter WHOLEVAL. (object_sizes_set): Set VAL parameter type as tree and adjust implementation. Add new parameter WHOLEVAL. (size_for_offset): New function. (decl_init_size): Adjust comment. (addr_object_size): Change PSIZE parameter to tree and adjust implementation. Add new parameter PWHOLESIZE. (alloc_object_size): Return tree. (compute_builtin_object_size): Return tree in PSIZE. (expr_object_size, call_object_size, unknown_object_size): Adjust for object_sizes_set change. (merge_object_sizes): Drop OFFSET parameter and adjust implementation for tree change. (plus_stmt_object_size): Call collect_object_sizes_for directly instead of merge_object_size and call size_for_offset to get net size. (cond_expr_object_size, collect_object_sizes_for, object_sizes_execute): Adjust for change of type from HOST_WIDE_INT to tree. (check_for_plus_in_loops_1): Likewise and skip non-positive offsets. 2021-12-17 Jason Merrill PR c++/103681 * common.opt (fabi-version): Add v17. 2021-12-16 Uroš Bizjak PR target/103571 * config/i386/i386.h (VALID_AVX256_REG_MODE): Add V16HFmode. (VALID_AVX256_REG_OR_OI_VHF_MODE): Replace with ... (VALID_AVX256_REG_OR_OI_MODE): ... this. Remove V16HFmode. (VALID_AVX512F_SCALAR_MODE): Remove HImode and HFmode. (VALID_AVX512FP16_SCALAR_MODE): New. (VALID_AVX512F_REG_MODE): Add V32HFmode. (VALID_SSE2_REG_MODE): Add V8HFmode, V4HFmode and V2HFmode. (VALID_SSE2_REG_VHF_MODE): Remove. (VALID_INT_MODE_P): Add V2HFmode. * config/i386/i386.c (function_arg_advance_64): Remove explicit mention of V16HFmode and V32HFmode. (ix86_hard_regno_mode_ok): Remove explicit mention of XImode and V32HFmode, use VALID_AVX512F_REG_OR_XI_MODE instead. Use VALID_AVX512FP_SCALAR_MODE for TARGET_aVX512FP16. Use VALID_AVX256_REG_OR_OI_MODE instead of VALID_AVX256_REG_OR_OI_VHF_MODE and VALID_SSE2_REG_MODE instead of VALID_SSE2_REG_VHF_MODE. (ix86_set_reg_reg_cost): Remove usge of VALID_AVX512FP16_REG_MODE. (ix86_vector_mode_supported): Ditto. 2021-12-16 Martin Liska PR c++/103696 * attribs.c (decl_attributes): Check if target_option_current_node is changed. 2021-12-16 Martin Liska * doc/invoke.texi: Add missing dash. 2021-12-16 Bill Schmidt * config/rs6000/rs6000-c.c (resolution): New enum. (resolve_vec_mul): New function. (resolve_vec_cmpne): Likewise. (resolve_vec_adde_sube): Likewise. (resolve_vec_addec_subec): Likewise. (resolve_vec_splats): Likewise. (resolve_vec_extract): Likewise. (resolve_vec_insert): Likewise. (resolve_vec_step): Likewise. (find_instance): Likewise. (altivec_resolve_overloaded_builtin): Many cleanups. Call factored-out functions. Move variable declarations closer to uses. Add commentary. Remove unnecessary levels of braces. Avoid use of gotos. Change misleading variable names. Use switches over if-else-if chains. 2021-12-16 Przemyslaw Wirkus PR target/103729 * config/aarch64/aarch64-simd.md (aarch64_movv8di): Allow big endian targets to move V8DI. 2021-12-16 Tobias Burnus PR driver/103644 * gcc.c (check_offload_target_name): Add 'default' and 'disable' to the candidate list. 2021-12-15 Iain Sandoe * configure: Regenerate. 2021-12-15 Roger Sayle * config/nvptx/nvptx-opts.h (ptx_isa): PTX_ISA_SM75 and PTX_ISA_SM80 ISA levels. * config/nvptx/nvptx.opt: Add sm_75 and sm_80 to -misa. * config/nvptx/nvptx.h (TARGET_SM75, TARGET_SM80): New helper macros to conditionalize functionality on target ISA. * config/nvptx/nvptx-c.c (nvptx_cpu_cpp_builtins): Add __PTX_SM__ support for the new ISA levels. * config/nvptx/nvptx.c (nvptx_file_start): Add support for TARGET_SM75 and TARGET_SM80. * config/nvptx/nvptx.md (define_c_enum "unspec"): New UNSPEC_TANH. (define_mode_iterator HSFM): New iterator for HFmode and SFmode. (exp2hf2): New define_insn controlled by TARGET_SM75. (tanh2): New define_insn controlled by TARGET_SM75. (sminhf3, smaxhf3): New define_isnns controlled by TARGET_SM80. 2021-12-15 Tom de Vries * config/nvptx/nvptx-opts.h (enum ptx_version): Add PTX_VERSION_7_0. * config/nvptx/nvptx.c (nvptx_file_start): Handle TARGET_PTX_7_0. * config/nvptx/nvptx.h (TARGET_PTX_7_0): New macro. * config/nvptx/nvptx.opt (ptx_version): Add 7.0. 2021-12-15 Richard Sandiford Tamar Christina PR target/103094 * config/aarch64/aarch64.c (aarch64_short_vector_p): Return false for structure modes, rather than ignoring the type in that case. 2021-12-15 Tamar Christina PR rtl-optimization/103350 * ree.c (add_removable_extension): Don't stop at first definition but inspect all. 2021-12-15 Jakub Jelinek PR debug/103619 * dwarf2cfi.c (dwf_cfa_reg): Remove gcc_assert. (operator==, operator!=): New overloaded operators. (dwarf2out_frame_debug_adjust_cfa, dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_expr): Compare vars with cfa_reg type directly with REG rtxes rather than with dwf_cfa_reg results on those REGs. (create_cie_data): Use stack_pointer_rtx instead of gen_rtx_REG (Pmode, STACK_POINTER_REGNUM). (execute_dwarf2_frame): Use hard_frame_pointer_rtx instead of gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM). 2021-12-15 Martin Liska PR target/103661 * config/i386/i386-builtins.c (fold_builtin_cpu): Compare to 0 as API expects that non-zero values are returned (do that it mask == 31). For "avx512vbmi2" argument, we return now 1 << 31, which is a negative integer value. 2021-12-15 Haochen Jiang PR target/101796 * config/i386/predicates.md (const_vector_operand): Add new predicate. * config/i386/sse.md(3): Add new define_split below. 2021-12-15 Michael Meissner * config/rs6000/rs6000.md (UNSPEC_XXSPLTIDP_CONST): New unspec. (UNSPEC_XXSPLTIW_CONST): New unspec. (movsf_hardfloat): Add support for generating XXSPLTIDP. (mov_hardfloat32): Likewise. (mov_hardfloat64): Likewise. (xxspltidp__internal): New insns. (xxspltiw__internal): New insns. (splitters for SF/DFmode): Add new splitters for XXSPLTIDP. 2021-12-15 Michael Meissner * config/rs6000/predicates.md (easy_fp_constant): Add support for generating XXSPLTIDP. (vsx_prefixed_constant): Likewise. (easy_vector_constant): Likewise. * config/rs6000/rs6000-protos.h (constant_generates_xxspltidp): New declaration. * config/rs6000/rs6000.c (output_vec_const_move): Add support for generating XXSPLTIDP. (prefixed_xxsplti_p): Likewise. (constant_generates_xxspltidp): New function. * config/rs6000/rs6000.opt (-msplat-float-constant): New debug option. 2021-12-15 Michael Meissner * config/rs6000/constraints.md (eP): Update comment. * config/rs6000/predicates.md (easy_fp_constant): Add support for generating XXSPLTIW. (vsx_prefixed_constant): New predicate. (easy_vector_constant): Add support for generating XXSPLTIW. * config/rs6000/rs6000-protos.h (prefixed_xxsplti_p): New declaration. (constant_generates_xxspltiw): Likewise. * config/rs6000/rs6000.c (xxspltib_constant_p): Generate XXSPLTIW if possible instead of XXSPLTIB and sign extending the constant. (output_vec_const_move): Add support for XXSPLTIW. (prefixed_xxsplti_p): New function. (constant_generates_xxspltiw): New function. * config/rs6000/rs6000.md (prefixed attribute): Add support to mark XXSPLTI* instructions as being prefixed. * config/rs6000/rs6000.opt (-msplat-word-constant): New debug switch. * config/rs6000/vsx.md (vsx_mov_64bit): Add support for generating XXSPLTIW or XXSPLTIDP. (vsx_mov_32bit): Likewise. * doc/md.texi (PowerPC and IBM RS6000 constraints): Document the eP constraint. 2021-12-15 Michael Meissner * config/rs6000/constraints.md (eQ): New constraint. * config/rs6000/predicates.md (easy_fp_constant): Add support for generating the LXVKQ instruction. (easy_vector_constant_ieee128): New predicate. (easy_vector_constant): Add support for generating the LXVKQ instruction. * config/rs6000/rs6000-protos.h (constant_generates_lxvkq): New declaration. * config/rs6000/rs6000.c (output_vec_const_move): Add support for generating LXVKQ. (constant_generates_lxvkq): New function. * config/rs6000/rs6000.opt (-mieee128-constant): New debug option. * config/rs6000/vsx.md (vsx_mov_64bit): Add support for generating LXVKQ. (vsx_mov_32bit): Likewise. * doc/md.texi (PowerPC and IBM RS6000 constraints): Document the eQ constraint. 2021-12-15 Michael Meissner * config/rs6000/rs6000-protos.h (VECTOR_128BIT_BITS): New macro. (VECTOR_128BIT_BYTES): Likewise. (VECTOR_128BIT_HALF_WORDS): Likewise. (VECTOR_128BIT_WORDS): Likewise. (VECTOR_128BIT_DOUBLE_WORDS): Likewise. (vec_const_128bit_type): New structure type. (vec_const_128bit_to_bytes): New declaration. * config/rs6000/rs6000.c (constant_int_to_128bit_vector): New helper function. (constant_fp_to_128bit_vector): New helper function. (vec_const_128bit_to_bytes): New function. 2021-12-15 Alexandre Oliva PR target/100518 * builtins.c (try_store_by_multiple_pieces): Drop address conversion to ptr_mode. 2021-12-15 Alexandre Oliva PR middle-end/100843 * builtins.c (try_store_by_multiple_pieces): Fail if min_len is greater than max_len. 2021-12-14 liuhongt PR target/103682 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check is_gimple_assign before gimple_assign_rhs_code. 2021-12-14 Sören Tempel * ginclude/stddef.h (__DEFINED_ptrdiff_t): Add support for musl libc typedef macro guard. (__DEFINED_size_t): Ditto. (__DEFINED_wchar_t): Ditto. 2021-12-14 JoJo R * regrename.c (find_rename_reg): Return satisfied regno if instruction is noop move. 2021-12-14 Bill Schmidt * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Rename rs6000_builtin_decls_x to rs6000_builtin_decls. (altivec_resolve_overloaded_builtin): Likewise. Also rename rs6000_builtin_info_x to rs6000_builtin_info. * config/rs6000/rs6000-call.c (rs6000_invalid_builtin): Rename rs6000_builtin_info_x to rs6000_builtin_info. (rs6000_builtin_is_supported): Likewise. (rs6000_gimple_fold_mma_builtin): Likewise. Also rename rs6000_builtin_decls_x to rs6000_builtin_decls. (rs6000_gimple_fold_builtin): Rename rs6000_builtin_info_x to rs6000_builtin_info. (cpu_expand_builtin): Likewise. (rs6000_expand_builtin): Likewise. (rs6000_init_builtins): Likewise. Also rename rs6000_builtin_decls_x to rs6000_builtin_decls. (rs6000_builtin_decl): Rename rs6000_builtin_decls_x to rs6000_builtin_decls. * config/rs6000/rs6000-gen-builtins.c (write_decls): In generated code, rename rs6000_builtin_decls_x to rs6000_builtin_decls, and rename rs6000_builtin_info_x to rs6000_builtin_info. (write_bif_static_init): In generated code, rename rs6000_builtin_info_x to rs6000_builtin_info. (write_init_bif_table): In generated code, rename rs6000_builtin_decls_x to rs6000_builtin_decls, and rename rs6000_builtin_info_x to rs6000_builtin_info. (write_init_ovld_table): In generated code, rename rs6000_builtin_decls_x to rs6000_builtin_decls. (write_init_file): Likewise. * config/rs6000/rs6000.c (rs6000_builtin_vectorized_function): Likewise. (rs6000_builtin_md_vectorized_function): Likewise. (rs6000_builtin_reciprocal): Likewise. (add_condition_to_bb): Likewise. (rs6000_atomic_assign_expand_fenv): Likewise. 2021-12-14 Bill Schmidt * config/rs6000/rs6000-c.c (altivec_resolve_new_overloaded_builtin): Remove forward declaration. (rs6000_new_builtin_type_compatible): Rename to rs6000_builtin_type_compatible. (rs6000_builtin_type_compatible): Remove. (altivec_resolve_overloaded_builtin): Remove. (altivec_build_new_resolved_builtin): Rename to altivec_build_resolved_builtin. (altivec_resolve_new_overloaded_builtin): Rename to altivec_resolve_overloaded_builtin. Remove static keyword. Adjust called function names. * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): Remove forward declaration. (rs6000_gimple_fold_new_builtin): Likewise. (rs6000_invalid_new_builtin): Rename to rs6000_invalid_builtin. (rs6000_gimple_fold_builtin): Remove. (rs6000_new_builtin_valid_without_lhs): Rename to rs6000_builtin_valid_without_lhs. (rs6000_new_builtin_is_supported): Rename to rs6000_builtin_is_supported. (rs6000_gimple_fold_new_mma_builtin): Rename to rs6000_gimple_fold_mma_builtin. (rs6000_gimple_fold_new_builtin): Rename to rs6000_gimple_fold_builtin. Remove static keyword. Adjust called function names. (rs6000_expand_builtin): Remove. (new_cpu_expand_builtin): Rename to cpu_expand_builtin. (new_mma_expand_builtin): Rename to mma_expand_builtin. (new_htm_spr_num): Rename to htm_spr_num. (new_htm_expand_builtin): Rename to htm_expand_builtin. Change name of called function. (rs6000_expand_new_builtin): Rename to rs6000_expand_builtin. Remove static keyword. Adjust called function names. (rs6000_new_builtin_decl): Rename to rs6000_builtin_decl. Remove static keyword. (rs6000_builtin_decl): Remove. * config/rs6000/rs6000-gen-builtins.c (write_decls): In gnerated code, rename rs6000_new_builtin_is_supported to rs6000_builtin_is_supported. * config/rs6000/rs6000-internal.h (rs6000_invalid_new_builtin): Rename to rs6000_invalid_builtin. * config/rs6000/rs6000.c (rs6000_new_builtin_vectorized_function): Rename to rs6000_builtin_vectorized_function. (rs6000_new_builtin_md_vectorized_function): Rename to rs6000_builtin_md_vectorized_function. (rs6000_builtin_vectorized_function): Remove. (rs6000_builtin_md_vectorized_function): Remove. 2021-12-14 Bill Schmidt * config/rs6000/rs6000-builtin.def: Delete. * config/rs6000/rs6000-call.c (builtin_compatibility): Delete. (builtin_description): Delete. (builtin_hash_struct): Delete. (builtin_hasher): Delete. (builtin_hash_table): Delete. (builtin_hasher::hash): Delete. (builtin_hasher::equal): Delete. (rs6000_builtin_info_type): Delete. (rs6000_builtin_info): Delete. (bdesc_compat): Delete. (bdesc_3arg): Delete. (bdesc_4arg): Delete. (bdesc_dst): Delete. (bdesc_2arg): Delete. (bdesc_altivec_preds): Delete. (bdesc_abs): Delete. (bdesc_1arg): Delete. (bdesc_0arg): Delete. (bdesc_htm): Delete. (bdesc_mma): Delete. (rs6000_overloaded_builtin_p): Delete. (rs6000_overloaded_builtin_name): Delete. (htm_spr_num): Delete. (rs6000_builtin_is_supported_p): Delete. (rs6000_gimple_fold_mma_builtin): Delete. (gt-rs6000-call.h): Remove include directive. * config/rs6000/rs6000-protos.h (rs6000_overloaded_builtin_p): Delete. (rs6000_builtin_is_supported_p): Delete. (rs6000_overloaded_builtin_name): Delete. * config/rs6000/rs6000.c (rs6000_builtin_decls): Delete. (rs6000_debug_reg_global): Remove reference to RS6000_BUILTIN_COUNT. * config/rs6000/rs6000.h (rs6000_builtins): Delete. (altivec_builtin_types): Delete. (rs6000_builtin_decls): Delete. * config/rs6000/t-rs6000 (TM_H): Don't add rs6000-builtin.def. 2021-12-14 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Rename to... * config/rs6000/rs6000-builtins.def: ...this. * config/rs6000/rs6000-gen-builtins.c: Adjust header commentary. * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Rename rs6000-builtin-new.def to rs6000-builtins.def. (rs6000-builtins.c): Likewise. 2021-12-14 Bill Schmidt * config/rs6000/rs6000-call.c (altivec_overloaded_builtins): Remove. * config/rs6000/rs6000.h (altivec_overloaded_builtins): Remove. 2021-12-14 Peter Bergner PR target/103548 * config/rs6000/mma.md (UNSPEC_MMA_ASSEMBLE): Rename unspec from this... (UNSPEC_VSX_ASSEMBLE): ...to this. (UNSPECV_MMA_ASSEMBLE): New unspecv. (vsx_assemble_pair): Use UNSPEC_VSX_ASSEMBLE. (*vsx_assemble_pair): Likewise. (mma_assemble_acc): Use UNSPECV_MMA_ASSEMBLE. (*mma_assemble_acc): Likewise. * config/rs6000/rs6000.c (rs6000_split_multireg_move): Handle UNSPEC_VOLATILE. Use UNSPEC_VSX_ASSEMBLE and UNSPECV_MMA_ASSEMBLE. 2021-12-14 Uroš Bizjak PR target/103571 * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate) : Implement for TARGET_SSE2. : Implement for TARGET_AVX. : Implement for TARGET_AVX512F. (ix86_expand_vector_set_var): Handle V32HFmode without TARGET_AVX512BW. (ix86_expand_vector_extract) : Implement for TARGET_SSE2. : Implement for TARGET_AVX. : Implement for TARGET_AVX512BW. (expand_vec_perm_broadcast_1) : New. * config/i386/sse.md (VI12HF_AVX512VL): Remove TARGET_AVX512FP16 condition. (V): Ditto. (V_256_512): Ditto. (avx_vbroadcastf128_): Use V_256H mode iterator. 2021-12-14 Bill Schmidt * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Remove test for new_builtins_are_live and simplify. * config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Remove dead function. (altivec_resolve_overloaded_builtin): Remove test for new_builtins_are_live and simplify. * config/rs6000/rs6000-call.c (altivec_init_builtins): Remove forward declaration. (builtin_function_type): Likewise. (rs6000_common_init_builtins): Likewise. (htm_init_builtins): Likewise. (mma_init_builtins): Likewise. (def_builtin): Remove dead function. (rs6000_expand_zeroop_builtin): Likewise. (rs6000_expand_mtfsf_builtin): Likewise. (rs6000_expand_mtfsb_builtin): Likewise. (rs6000_expand_set_fpscr_rn_builtin): Likewise. (rs6000_expand_set_fpscr_drn_builtin): Likewise. (rs6000_expand_unop_builtin): Likewise. (altivec_expand_abs_builtin): Likewise. (rs6000_expand_binop_builtin): Likewise. (altivec_expand_lxvr_builtin): Likewise. (altivec_expand_lv_builtin): Likewise. (altivec_expand_stxvl_builtin): Likewise. (altivec_expand_stv_builtin): Likewise. (mma_expand_builtin): Likewise. (htm_expand_builtin): Likewise. (cpu_expand_builtin): Likewise. (rs6000_expand_quaternop_builtin): Likewise. (rs6000_expand_ternop_builtin): Likewise. (altivec_expand_dst_builtin): Likewise. (altivec_expand_vec_sel_builtin): Likewise. (altivec_expand_builtin): Likewise. (rs6000_invalid_builtin): Likewise. (rs6000_builtin_valid_without_lhs): Likewise. (rs6000_gimple_fold_builtin): Remove test for new_builtins_are_live and simplify. (rs6000_expand_builtin): Likewise. (rs6000_init_builtins): Remove tests for new_builtins_are_live and simplify. (rs6000_builtin_decl): Likewise. (altivec_init_builtins): Remove dead function. (mma_init_builtins): Likewise. (htm_init_builtins): Likewise. (builtin_quaternary_function_type): Likewise. (builtin_function_type): Likewise. (rs6000_common_init_builtins): Likewise. * config/rs6000/rs6000-gen-builtins.c (write_header_file): Don't declare new_builtins_are_live. (write_init_bif_table): In generated code, remove test for new_builtins_are_live and simplify. (write_init_ovld_table): Likewise. (write_init_file): Don't initialize new_builtins_are_live. * config/rs6000/rs6000.c (rs6000_builtin_vectorized_function): Remove test for new_builtins_are_live and simplify. (rs6000_builtin_md_vectorized_function): Likewise. (rs6000_builtin_reciprocal): Likewise. (add_condition_to_bb): Likewise. (rs6000_atomic_assign_expand_fenv): Likewise. 2021-12-14 Bill Schmidt PR target/103625 * config/rs6000/rs6000-builtin-new.def (__builtin_altivec_vcmpequd): Move to power8-vector stanza. (__builtin_altivec_vcmpequd_p): Likewise. (__builtin_altivec_vcmpgtsd): Likewise. (__builtin_altivec_vcmpgtsd_p): Likewise. (__builtin_altivec_vcmpgtud): Likewise. (__builtin_altivec_vcmpgtud_p): Likewise. 2021-12-14 Bill Schmidt PR target/103623 * config/rs6000/rs6000-builtin-new.def (__builtin_pack_longdouble): Add ibmld attribute. (__builtin_unpack_longdouble): Likewise. * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): Add special handling for ibmld attribute. * config/rs6000/rs6000-gen-builtins.c (attrinfo): Add isibmld. (parse_bif_attrs): Handle ibmld. (write_decls): Likewise. (write_bif_static_init): Likewise. 2021-12-14 Jan Hubicka PR ipa/103585 * ipa-modref-tree.c (modref_access_node::range_info_useful_p): Handle MODREF_GLOBAL_MEMORY_PARM. (modref_access_node::dump): Likewise. (modref_access_node::get_call_arg): Likewise. * ipa-modref-tree.h (enum modref_special_parms): Add MODREF_GLOBAL_MEMORY_PARM. (modref_access_node::useful_for_kill): Handle MODREF_GLOBAL_MEMORY_PARM. (modref:tree::merge): Add promote_unknown_to_global. * ipa-modref.c (verify_arg):New function. (may_access_nonescaping_parm_p): New function. (modref_access_analysis::record_global_memory_load): New member function. (modref_access_analysis::record_global_memory_store): Likewise. (modref_access_analysis::process_fnspec): Distingush global and local memory. (modref_access_analysis::analyze_call): Likewise. * tree-ssa-alias.c (ref_may_access_global_memory_p): New function. (modref_may_conflict): Use it. 2021-12-14 Przemyslaw Wirkus * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): Define AARCH64_LS64_BUILTIN_LD64B, AARCH64_LS64_BUILTIN_ST64B, AARCH64_LS64_BUILTIN_ST64BV, AARCH64_LS64_BUILTIN_ST64BV0. (aarch64_init_ls64_builtin_decl): Helper function. (aarch64_init_ls64_builtins): Helper function. (aarch64_init_ls64_builtins_types): Helper function. (aarch64_general_init_builtins): Init LS64 intrisics for TARGET_LS64. (aarch64_expand_builtin_ls64): LS64 intrinsics expander. (aarch64_general_expand_builtin): Handle aarch64_expand_builtin_ls64. (ls64_builtins_data): New helper struct. (v8di_UP): New define. * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Define __ARM_FEATURE_LS64. * config/aarch64/aarch64.c (aarch64_classify_address): Enforce the V8DI range (7-bit signed scaled) for both ends of the range. * config/aarch64/aarch64-simd.md (movv8di): New pattern. (aarch64_movv8di): New pattern. * config/aarch64/aarch64.h (AARCH64_ISA_LS64): New define. (TARGET_LS64): New define. * config/aarch64/aarch64.md: Add UNSPEC_LD64B, UNSPEC_ST64B, UNSPEC_ST64BV and UNSPEC_ST64BV0. (ld64b): New define_insn. (st64b): New define_insn. (st64bv): New define_insn. (st64bv0): New define_insn. * config/aarch64/arm_acle.h (data512_t): New type derived from __arm_data512_t. (__arm_data512_t): New internal type. (__arm_ld64b): New intrinsic. (__arm_st64b): New intrinsic. (__arm_st64bv): New intrinsic. (__arm_st64bv0): New intrinsic. * config/arm/types.md: Add new type ls64. 2021-12-14 Olivier Hainque * config/i386/t-vxworks: Drop the fPIC multilibs. 2021-12-14 Fred Konrad * config/rs6000/t-vxworks: Drop the fPIC multilib. 2021-12-13 Vladimir N. Makarov PR target/99531 * ira-costs.c (record_operand_costs): Do not take pseudo class calculated on the 1st iteration into account when processing move involving the pseudo and a hard register. 2021-12-13 Roger Sayle * config/i386/i386.md (define_split any_or:SWI248 -> orb %?h): Optimize the case where the integer constant operand is zero. 2021-12-13 Doug Rupp Olivier Hainque * config/vxworks.h (VXWORKS_LINK_OS_SPEC): New spec. (VXWORKS_BASE_LINK_SPEC): New spec, using the former. (VXWORKS_EXTRA_LINK_SPEC): New spec for old and new VxWorks. (VXWORKS_LINK_SPEC): Combo of BASE and EXTRA specs. * config/rs6000/vxworks.h (VXWORKS_LINK_OS_SPEC): Empty. (LINK_OS_EXTRA_SPEC32): Use VXWORKS_LINK_SPEC. (LINK_OS_EXTRA_SPEC64): Likewise. 2021-12-13 Fred Konrad Olivier Hainque * config/vxworks.h (VXWORKS_BASE_LIBS_RTP): Guard -lc_internal on !shared+!non-static and document. (VXWORKS_LIB_SPEC): Remove the bits intended to drag the init/fini functions from libc_internal in the shared lib case. (VX_CRTBEGIN_SPEC/VX_CRTEND_SPEC): Use vxcrtstuff objects also in configurations with shared lib and INITFINI_ARRAY support. 2021-12-13 Fred Konrad Olivier Hainque * config/vx-common.h: Define REAL_LIBGCC_SPEC since the '-non-static' option is not standard. * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Implement the LIBGCC_SPEC since REAL_LIBGCC_SPEC is used now. (STARTFILE_PREFIX_SPEC): Use the PIC VSB when building shared libraries or non-static binaries. 2021-12-13 Jan Hubicka * common.opt: Add -fipa-strict-aliasing. * doc/invoke.texi: Document -fipa-strict-aliasing. * ipa-modref.c (modref_access_analysis::record_access): Honor -fipa-strict-aliasing. (modref_access_analysis::record_access_lto): Likewise. 2021-12-13 Kyrylo Tkachov * config/aarch64/aarch64-arches.def (armv8.8-a): Define. * config/aarch64/aarch64.h (AARCH64_FL_V8_8): Define. (AARCH64_FL_FOR_ARCH8_8): Define. * doc/invoke.texi: Document -march=armv8.8-a. 2021-12-13 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_expand_setmem_mops): Define. (aarch64_expand_setmem): Adjust for TARGET_MOPS. * config/aarch64/aarch64.h (CLEAR_RATIO): Adjust for TARGET_MOPS. (SET_RATIO): Likewise. * config/aarch64/aarch64.md ("unspec"): Add UNSPEC_SETMEM. (aarch64_setmemdi): Define. (setmemdi): Adjust for TARGET_MOPS. * config/aarch64/aarch64.opt (aarch64-mops-memset-size-threshold): New param. 2021-12-13 Kyrylo Tkachov * config/aarch64/aarch64.md (aarch64_movmemdi): Define. (movmemdi): Define. (unspec): Add UNSPEC_MOVMEM. * config/aarch64/aarch64.opt (aarch64-mops-memmove-size-threshold): New param. 2021-12-13 Kyrylo Tkachov * config/aarch64/aarch64-option-extensions.def (mops): Define. * config/aarch64/aarch64.c (aarch64_expand_cpymem_mops): Define. (aarch64_expand_cpymem): Define. * config/aarch64/aarch64.h (AARCH64_FL_MOPS): Define. (AARCH64_ISA_MOPS): Define. (TARGET_MOPS): Define. (MOVE_RATIO): Adjust for TARGET_MOPS. * config/aarch64/aarch64.md ("unspec"): Add UNSPEC_CPYMEM. (aarch64_cpymemdi): New pattern. (cpymemdi): Adjust for TARGET_MOPS. * config/aarch64/aarch64.opt (aarch64-mops-memcpy-size-threshol): New param. * doc/invoke.texi (AArch64 Options): Document +mops. 2021-12-13 Martin Liska PR ipa/103636 * ipa-inline.c (can_inline_edge_p): Move logic checking no_profile_instrument_function logic to ... (can_early_inline_edge_p): ... here. 2021-12-13 Olivier Hainque * config/vxworks/_yvals.h: #include yvals.h also if defined(__RTP__). 2021-12-13 Olivier Hainque * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): Define _C99 for C++. 2021-12-13 Olivier Hainque * config/t-vxworks: Clear NATIVE_SYSTEM_HEADER_DIR. * config/vxworks.h (SYSROOT_HEADERS_SUFFIX_SPEC): Define, for VxWorks 7 and earlier. (VXWORKS_ADDITIONAL_CPP_SPEC): Simplify accordingly. (STARTFILE_PREFIX_SPEC): Adjust accordingly. * config/rs6000/vxworks.h (STARTFILE_PREFIX_SPEC): Adjust. 2021-12-13 Martin Liska * doc/extend.texi: Use @item for the first @itemx entry. 2021-12-13 Jakub Jelinek * machmode.h (gt_pch_nx): Use gt_pointer_operator as type of second argument instead of equivalent void (*) (void *, void *, void *). * poly-int.h (gt_pch_nx): Likewise. * wide-int.h (gt_pch_nx): Likewise. * config/aarch64/aarch64-sve-builtins.cc (gt_pch_nx): Likewise. 2021-12-13 Jan Hubicka PR ipa/103513 * ipa-fnsummary.c (evaluate_conditions_for_known_args): Do not ICE on ternary expression. 2021-12-13 Kewen Lin PR target/103515 * attribs.c (decl_attributes): Check if target options change and create one node if so. 2021-12-12 Jonathan Wakely * Makefile.in: Remove unique-ptr-tests.o. * selftest-run-tests.c (selftest::run_tests): Remove unique_ptr_tests_cc_tests. * selftest.h (unique_ptr_tests_cc_tests): Remove. * system.h: Check INCLUDE_MEMORY instead of INCLUDE_UNIQUE_PTR and include instead of "unique-ptr.h". * unique-ptr-tests.cc: Removed. 2021-12-12 Roger Sayle * config/nvptx/nvptx-opts.h (ptx_isa): Add PTX_ISA_SM53 ISA level to enumeration. * config/nvptx/nvptx.opt: Add sm_53 to -misa. * config/nvptx/nvptx-modes.def: Add support for HFmode. * config/nvptx/nvptx.h (TARGET_SM53): New helper macro to conditionalize functionality on target ISA. * config/nvptx/nvptx-c.c (nvptx_cpu_cpp_builtins): Add __PTX_SM__ support for the new ISA levels. * config/nvptx/nvptx.c (nvtx_ptx_type_from_mode): Support new HFmode with the ".f16" suffix/qualifier. (nvptx_file_start): Add support for TARGET_SM53. (nvptx_omp_device_kind_arch_isa): Add support for TARGET_SM53 and tweak TARGET_SM35. (nvptx_scalar_mode_supported_p): Target hook with conditional HFmode support on TARGET_SM53 and higher. (nvptx_libgcc_floating_mode_supported_p): Likewise. (TARGET_SCALAR_MODE_SUPPORTED_P): Use nvptx_scalar_mode_supported_p. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Likewise, use new hook. * config/nvptx/nvptx.md (*movhf_insn): New define_insn. (movhf): New define_expand for HFmode moves. (addhf3, subhf3, mulhf, extendhf2, trunchf2): New instructions conditional on TARGET_SM53 (i.e. -misa=sm_53). 2021-12-12 Jan Hubicka PR ipa/103665 * ipa-modref.c (modref_access_analysis::analyze): Terminate BB analysis on NULL memory access. * ipa-pure-const.c (analyze_function): Likewise. 2021-12-11 Jan Hubicka * ipa-profile.c (ipa_profile): Do not update hot bb threshold. 2021-12-11 Jan Hubicka * ipa-modref.c (get_modref_function_summary): Use ultimate_alias_target. (ignore_edge): Likewise. (compute_parm_map): Likewise. (modref_propagate_in_scc): Likewise. (modref_propagate_flags_in_scc): Likewise. 2021-12-10 Jason Merrill * symtab.c (symtab_node::equal_address_to): Fix comment typo. 2021-12-10 Doug Rupp * config/vxworks.h (LINK_SPEC): Remove %(link_target). Change %{v:-v} to %{v:-V}. 2021-12-10 Olivier Hainque * config/t-vxworks: Remove assignment to STMP_FIXINC. 2021-12-10 Martin Liska * params.opt: Add missing dot. 2021-12-10 Roger Sayle PR ipa/103601 * ipa-modref-tree.h (useful_for_kill_p): Zero width accesses aren't useful for kill tracking. 2021-12-10 Andrew Stubbs * config/gcn/mkoffload.c (process_asm): Process the variable table completely differently. (process_obj): Encode the varaible data differently. 2021-12-10 Joel Hutton PR tree-optimization/103523 * tree-vect-loop.c (vectorizable_induction): Check for PLUS_EXPR/MINUS_EXPR support. 2021-12-10 Cui,Lili * config/i386/i386.c (ix86_vector_costs::add_stmt_cost): Remove Tremont. 2021-12-09 Jan Hubicka * doc/invoke.texi (max-inline-functions-called-once-loop-depth, max-inline-functions-called-once-insns): New parameters. * ipa-inline.c (check_callers): Handle param_inline_functions_called_once_loop_depth and param_inline_functions_called_once_insns. (edge_badness): Fix linebreaks. * params.opt (param=max-inline-functions-called-once-loop-depth, param=max-inline-functions-called-once-insn): New params. 2021-12-09 Martin Sebor PR tree-optimization/103215 * pointer-query.cc (access_ref::merge_ref): Extend the offset and size of the merged object instead of using the larger. 2021-12-09 Martin Sebor PR middle-end/101751 * doc/extend.texi (attribute access): Adjust. * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes): Treat access mode none on a void* argument as expecting as few as zero bytes. 2021-12-09 Jakub Jelinek PR pch/71934 * config/aarch64/aarch64-sve-builtins.cc (gt_pch_nx): Change type of second argument from function with 2 pointer arguments to function with 3 pointer arguments. 2021-12-09 Olivier Hainque * config/aarch64/aarch64-vxworks.h (TARGET_OS_CPP_BUILTINS): Use VX_CPU_PREFIX in CPU definitions. 2021-12-09 Martin Sebor * pointer-query.cc (access_ref::dump): Define new function (pointer_query::dump): Call it. * pointer-query.h (access_ref::dump): Declare new function. 2021-12-09 Martin Sebor * pointer-query.cc (compute_objsize_r): Add an argument. (gimple_call_return_array): Pass a new argument to compute_objsize_r. (access_ref::merge_ref): Same. (access_ref::inform_access): Add an argument and use it. (access_data::access_data): Initialize new member. (handle_min_max_size): Pass a new argument to compute_objsize_r. (handle_decl): New function. (handle_array_ref): Pass a new argument to compute_objsize_r. Avoid incrementing deref. (set_component_ref_size): New function. (handle_component_ref): New function. (handle_mem_ref): Pass a new argument to compute_objsize_r. Only increment deref after successfully computing object size. (handle_ssa_name): New function. (compute_objsize_r): Move code into helpers and call them. (compute_objsize): Pass a new argument to compute_objsize_r. * pointer-query.h (access_ref::inform_access): Add an argument. (access_data::ostype): New member. 2021-12-09 Martin Sebor * pointer-query.cc (access_ref::merge_ref): Define new function. (access_ref::get_ref): Move code into merge_ref and call it. * pointer-query.h (access_ref::merge_ref): Declare new function. 2021-12-09 Martin Sebor * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Pass GIMPLE statement to compute_objsize. * pointer-query.cc (compute_objsize): Add a statement argument. * pointer-query.h (compute_objsize): Define a new overload. 2021-12-09 Martin Sebor * gimple-ssa-warn-access.cc (check_access): Adjust to member name change. (pass_waccess::check_strncmp): Same. * pointer-query.cc (access_ref::access_ref): Remove arguments. Simpilfy. (access_data::access_data): Define new ctors. (access_data::set_bound): Define new member function. (compute_objsize_r): Remove unnecessary code. * pointer-query.h (struct access_ref): Remove ctor arguments. (struct access_data): Declare ctor overloads. (access_data::dst_bndrng): New member. (access_data::src_bndrng): New member. 2021-12-09 Martin Sebor PR middle-end/103143 * pointer-query.cc (gimple_call_return_array): Call compute_objsize_r. 2021-12-09 Olivier Hainque Rasmus Villemoes * Makefile.in (T_STDINT_GCC_H): New variable, path to stdint-gcc.h that a target configuration may override when use_gcc_stdint is "provide". (stmp-int-hdrs): Depend on it and copy that for USE_GCC_INT=provide. * config.gcc (vxworks): Revert to use_gcc_stdint=provide. * config/t-vxworks (T_STDINT_GCC_H): Define, as vxw-stdint-gcc.h. (vxw-stdint-gcc.h): New target, produced from the original stdint-gcc.h. (vxw-glimits.h): Use an automatic variable to designate the first and only prerequisite. * config/vxworks/stdint.h: Remove. 2021-12-09 Iain Sandoe PR pch/71934 * config/host-darwin.c (SAFE_ALLOC_SIZE): Remove. (darwin_gt_pch_get_address): Rework for relocatable PCH. (darwin_gt_pch_use_address): Likewise. 2021-12-09 Jakub Jelinek PR pch/71934 * config/host-darwin.c (darwin_gt_pch_use_address): When reading manually the file into mapped area, update mapped_addr as an automatic variable rather than addr which is a reference parameter. * config/host-hpux.c (hpux_gt_pch_use_address): When reading manually the file into mapped area, update addr as an automatic variable rather than base which is a reference parameter. 2021-12-09 Jakub Jelinek PR pch/71934 * coretypes.h (gt_pointer_operator): Use 3 pointer arguments instead of two. * gengtype.c (struct walk_type_data): Add in_nested_ptr argument. (walk_type): Temporarily set d->in_nested_ptr around nested_ptr handling. (write_types_local_user_process_field): Pass a new middle pointer to gt_pointer_operator op calls, if d->in_nested_ptr pass there address of d->prev_val[2], otherwise NULL. (write_types_local_process_field): Likewise. * ggc-common.c (relocate_ptrs): Add real_ptr_p argument. If equal to ptr_p, do nothing, otherwise if NULL remember ptr_p's or if non-NULL real_ptr_p's corresponding new address in reloc_addrs_vec. (reloc_addrs_vec): New variable. (compare_ptr, read_uleb128, write_uleb128): New functions. (gt_pch_save): When iterating over objects through relocate_ptrs, save current i into state.ptrs_i. Sort reloc_addrs_vec and emit it as uleb128 of differences between pointer addresses into the PCH file. (gt_pch_restore): Allow restoring of PCH to a different address than the preferred one, in that case adjust global pointers by bias and also adjust by bias addresses read from the relocation table as uleb128 differences. Otherwise fseek over it. Perform gt_pch_restore_stringpool only after adjusting callbacks and for callback adjustments also take into account the bias. (default_gt_pch_use_address): Change type of first argument from void * to void *&. (mmap_gt_pch_use_address): Likewise. * ggc-tests.c (gt_pch_nx): Pass NULL as new middle argument to op. * hash-map.h (hash_map::pch_nx_helper): Likewise. (gt_pch_nx): Likewise. * hash-set.h (gt_pch_nx): Likewise. * hash-table.h (gt_pch_nx): Likewise. * hash-traits.h (ggc_remove::pch_nx): Likewise. * hosthooks-def.h (default_gt_pch_use_address): Change type of first argument from void * to void *&. (mmap_gt_pch_use_address): Likewise. * hosthooks.h (struct host_hooks): Change type of first argument of gt_pch_use_address hook from void * to void *&. * machmode.h (gt_pch_nx): Expect a callback with 3 pointers instead of two in the middle argument. * poly-int.h (gt_pch_nx): Likewise. * stringpool.c (gt_pch_nx): Pass NULL as new middle argument to op. * tree-cfg.c (gt_pch_nx): Likewise, except for LOCATION_BLOCK pass the same &(block) twice. * value-range.h (gt_pch_nx): Pass NULL as new middle argument to op. * vec.h (gt_pch_nx): Likewise. * wide-int.h (gt_pch_nx): Likewise. * config/host-darwin.c (darwin_gt_pch_use_address): Change type of first argument from void * to void *&. * config/host-darwin.h (darwin_gt_pch_use_address): Likewise. * config/host-hpux.c (hpux_gt_pch_use_address): Likewise. * config/host-linux.c (linux_gt_pch_use_address): Likewise. If it couldn't succeed to mmap at the preferred location, set base to the actual one. Update addr in the manual reading loop instead of base. * config/host-netbsd.c (netbsd_gt_pch_use_address): Change type of first argument from void * to void *&. * config/host-openbsd.c (openbsd_gt_pch_use_address): Likewise. * config/host-solaris.c (sol_gt_pch_use_address): Likewise. * config/i386/host-mingw32.c (mingw32_gt_pch_use_address): Likewise. * config/rs6000/rs6000-gen-builtins.c (write_init_file): Pass NULL as new middle argument to op in the generated code. * doc/gty.texi: Adjust samples for the addition of middle pointer to gt_pointer_operator callback. 2021-12-09 Alexandre Oliva PR target/103097 * reg-stack.c (convert_regs_1): Move any_malformed_asm resetting... (reg_to_stack): ... here. 2021-12-09 Alexandre Oliva PR target/103302 * expr.c (emit_move_multi_word): Skip clobber during lra. 2021-12-09 Alexandre Oliva PR tree-optimization/103024 PR middle-end/103530 * gimple-harden-conditionals.cc (non_eh_succ_edge): New. (pass_harden_compares::execute): Accept 1-bit integral types, and cope with throwing compares. 2021-12-08 Iain Sandoe * config/darwin.h (DARWIN_PIE_SPEC): Add -no_pie when linking mdynamic-no-pic code on macOS > 10.7. 2021-12-08 Dimitar Dimitrov * config/pru/pru.c (pru_section_type_flags): New function. (TARGET_SECTION_TYPE_FLAGS): Wire it. 2021-12-08 David Faust * config/bpf/bpf.c (handle_attr_preserve): Avoid calling is_gimple_assign with a NULL pointer. 2021-12-08 Martin Liska * profile-count.c (profile_count::dump): Add function that can dump to a provided buffer. (profile_probability::dump): Likewise. * profile-count.h: Likewise. * tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use dump_printf_loc infrastructure. (tree_unswitch_outer_loop): Likewise. (find_loop_guard): Likewise. (hoist_guard): Likewise. 2021-12-08 Chung-Lin Tang * gimplify.c (extract_base_bit_offset): Add 'tree *offsetp' parameter, accomodate case where 'offset' return of get_inner_reference is non-NULL. (is_or_contains_p): Further robustify conditions. (omp_target_reorder_clauses): In alloc/to/from sorting phase, also move following GOMP_MAP_ALWAYS_POINTER maps along. Add new sorting phase where we make sure pointers with an attach/detach map are ordered correctly. (gimplify_scan_omp_clauses): Add modifications to avoid creating GOMP_MAP_STRUCT and associated alloc map for attach/detach maps. 2021-12-08 Roger Sayle * config/nvptx/nvptx.md (*extend_trunc_2_qi, *extend_trunc_2_hi, *extend_trunc_di2_si): New insns. Use cvt to perform sign-extension of truncation in one step. 2021-12-08 Chung-Lin Tang PR middle-end/92120 * gimplify.c ("tree-hash-traits.h"): Add include. (gimplify_scan_omp_clauses): Change struct_map_to_clause to type hash_map *. Adjust struct map handling to handle cases of *A and A->B expressions. Under !DECL_P case of GOMP_CLAUSE_MAP handling, add STRIP_NOPS for indir_p case, add to struct_deref_set for map(*ptr_to_struct) cases. Add MEM_REF case when handling component_ref_p case. Add unshare_expr and gimplification when created GOMP_MAP_STRUCT is not a DECL. Add code to add firstprivate pointer for *pointer-to-struct case. (gimplify_adjust_omp_clauses): Move GOMP_MAP_STRUCT removal code for exit data directives code to earlier position. * omp-low.c (lower_omp_target): Handle GOMP_MAP_ATTACH_ZERO_LENGTH_ARRAY_SECTION, and GOMP_MAP_POINTER_TO_ZERO_LENGTH_ARRAY_SECTION map kinds. * tree-pretty-print.c (dump_omp_clause): Likewise. 2021-12-08 Andrew Stubbs Hafiz Abid Qadeer * dwarf2cfi.c (dw_stack_pointer_regnum): Change type to struct cfa_reg. (dw_frame_pointer_regnum): Likewise. (new_cfi_row): Use set_by_dwreg. (get_cfa_from_loc_descr): Use set_by_dwreg. Support register spans. handle DW_OP_bregx with DW_OP_breg{0-31}. Support DW_OP_lit*, DW_OP_const*, DW_OP_minus, DW_OP_shl and DW_OP_plus. (lookup_cfa_1): Use set_by_dwreg. (def_cfa_0): Update for cfa_reg and support register spans. (reg_save): Change sreg parameter to struct cfa_reg. Support register spans. (dwf_cfa_reg): New function. (dwarf2out_flush_queued_reg_saves): Use dwf_cfa_reg instead of dwf_regno. (dwarf2out_frame_debug_def_cfa): Likewise. (dwarf2out_frame_debug_adjust_cfa): Likewise. (dwarf2out_frame_debug_cfa_offset): Likewise. Update reg_save usage. (dwarf2out_frame_debug_cfa_register): Likewise. (dwarf2out_frame_debug_expr): Likewise. (create_pseudo_cfg): Use set_by_dwreg. (initial_return_save): Use set_by_dwreg and dwf_cfa_reg, (create_cie_data): Use dwf_cfa_reg. (execute_dwarf2_frame): Use dwf_cfa_reg. (dump_cfi_row): Use set_by_dwreg. * dwarf2out.c (build_span_loc, build_breg_loc): New function. (build_cfa_loc): Support register spans. (build_cfa_aligned_loc): Update cfa_reg usage. (convert_cfa_to_fb_loc_list): Use set_by_dwreg. * dwarf2out.h (struct cfa_reg): New type. (struct dw_cfa_location): Use struct cfa_reg. (build_span_loc): New prototype. 2021-12-08 Haochen Jiang PR target/100738 * config/i386/sse.md (*_blendv_not_ltint): Add new define_insn_and_split. 2021-12-08 Alexandre Oliva PR middle-end/103149 * gimple-harden-conditionals.cc (detach_value): Use memory if general regs won't do. 2021-12-07 Martin Liska PR middle-end/103438 * config/s390/s390.c (s390_valid_target_attribute_inner_p): Use new enum CLVC_INTEGER. * opt-functions.awk: Use new CLVC_INTEGER. * opts-common.c (set_option): Likewise. (option_enabled): Return -1,0,1 for CLVC_INTEGER. (get_option_state): Use new CLVC_INTEGER. (control_warning_option): Likewise. * opts.h (enum cl_var_type): Likewise. 2021-12-07 H.J. Lu PR target/103594 * config/i386/i386.c (ix86_call_use_plt_p): Check FUNCTION_DECL before calling cgraph_node::get. 2021-12-07 Richard Biener PR tree-optimization/103596 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Note we are not propagating into a PHI argument to may_propagate_copy. * tree-ssa-propagate.h (may_propagate_copy): Add argument specifying whether we propagate into a PHI arg. * tree-ssa-propagate.c (may_propagate_copy): Likewise. When not doing so we can replace an abnormal with something else. (may_propagate_into_stmt): Update may_propagate_copy calls. (replace_exp_1): Move propagation checking code to propagate_value and rename to ... (replace_exp): ... this and elide previous wrapper. (propagate_value): Perform checking with adjusted may_propagate_copy call and dispatch to replace_exp. 2021-12-07 Matthias Kretz * hash-map.h (hash_map::traverse): Let both overloads behave the same. * predict.c (assert_is_empty): Return true, thus not changing behavior. 2021-12-07 YunQiang Su * config/mips/mips.h (ISA_HAS_UNALIGNED_ACCESS, STRICT_ALIGNMENT): R6 can unaligned access. * config/mips/mips.md (movmisalign): Likewise. * config/mips/mips.opt: add -m(no-)unaligned-access * doc/invoke.texi: Likewise. 2021-12-07 Eugene Rozenfeld * auto-profile.c (afdo_propagate_edge): Improve count propagation algorithm. 2021-12-06 Paul A. Clarke PR target/103545 * config/rs6000/xmmintrin.h (_mm_movemask_ps): Replace "vector" with "__vector". 2021-12-06 Jose E. Marchesi * config/bpf/bpf.c (bpf_handle_preserve_access_index_attribute): Mark arguments `args' and flags' as unused. (bpf_core_newdecl): Remove unused local `newdecl'. (bpf_core_newdecl): Remove unused argument `loc'. (ctfc_debuginfo_early_finish_p): Remove unused function. (TARGET_CTFC_DEBUGINFO_EARLY_FINISH_P): Remove definition. (bpf_core_walk): Do not pass a location to bpf_core_newdecl. 2021-12-06 Richard Sandiford * gimple-range-edge.cc (gimple_outgoing_range::edge_range_p): Add a shortcut for blocks with single successors. * gimple-range-gori.cc (gori_map::calculate_gori): Likewise. 2021-12-06 Richard Sandiford * value-range.cc (irange::irange_union): Use quick_push rather than safe_push. Use widest_int rather than wide_int. Avoid assigning wi::to_* results to wide*_int temporaries. 2021-12-06 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::fill_block_cache): Check for a range from dominators before filling the cache. (ranger_cache::range_from_dom): New. * gimple-range-cache.h (ranger_cache::range_from_dom): Add prototype. 2021-12-06 Andrew MacLeod * gimple-range-gori.h (class gori_compute):: Add prototypes. * gimple-range-gori.cc (gori_compute::has_edge_range_p): Add alternate API for basic block. Call for edge alterantive. (gori_compute::may_recompute_p): Ditto. 2021-12-06 Richard Biener PR tree-optimization/103581 * tree-vect-stmts.c (vect_build_gather_load_calls): Properly guard all the AVX512 mask cases. 2021-12-06 Richard Biener PR tree-optimization/103544 * tree-vect-slp.c (vect_analyze_slp): Only add a SLP reduction opportunity if the stmt in question is the reduction root. (dot_slp_tree): Add missing check for NULL child. 2021-12-06 Jakub Jelinek PR pch/71934 * config/avr/avr.c (avr_output_data_section_asm_op, avr_output_bss_section_asm_op): Change argument type from const void * to const char *. 2021-12-06 Tamar Christina PR rtl-optimization/103404 * cse.c (find_sets_in_insn): Don't select elements out of a V1 mode subreg. 2021-12-06 Hongtao Liu Uroš Bizjak PR target/95740 * config/i386/i386.c (ix86_preferred_reload_class): Allow integer regs when moves between register units are cheap. * config/i386/i386.h (INT_SSE_CLASS_P): New. 2021-12-05 David Edelsohn * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move AIX math builtin initialization before new_builtins_are_live. 2021-12-04 Jakub Jelinek * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY): Fix comment typo, Preffer -> prefer. * ipa-modref-tree.c (modref_access_node::closer_pair_p): Likewise. 2021-12-04 Alexandre Oliva PR rtl-optimization/103028 * ifcvt.c (find_cond_trap): Validate new insns more strictly after reload. 2021-12-03 Martin Liska Peter Bergner PR target/101324 * config/rs6000/rs6000.c (rs6000_option_override_internal): Move the disabling of shrink-wrapping when using -mrop-protect from here... (rs6000_override_options_after_change): ...to here. 2021-12-03 H.J. Lu PR target/103269 * config/i386/i386-expand.c (ix86_expand_builtin): Pass PVW_NONE and PVW_NONE to ix86_target_string. * config/i386/i386-options.c (ix86_target_string): Add arguments for move_max and store_max. (ix86_target_string::add_vector_width): New lambda. (ix86_debug_options): Pass ix86_move_max and ix86_store_max to ix86_target_string. (ix86_function_specific_print): Pass ptr->x_ix86_move_max and ptr->x_ix86_store_max to ix86_target_string. (ix86_valid_target_attribute_tree): Handle x_ix86_move_max and x_ix86_store_max. (ix86_option_override_internal): Set the default x_ix86_move_max and x_ix86_store_max. * config/i386/i386-options.h (ix86_target_string): Add prefer_vector_width and prefer_vector_width. * config/i386/i386.h (TARGET_AVX256_MOVE_BY_PIECES): Removed. (TARGET_AVX256_STORE_BY_PIECES): Likewise. (MOVE_MAX): Use 64 if ix86_move_max or ix86_store_max == PVW_AVX512. Use 32 if ix86_move_max or ix86_store_max >= PVW_AVX256. (STORE_MAX_PIECES): Use 64 if ix86_store_max == PVW_AVX512. Use 32 if ix86_store_max >= PVW_AVX256. * config/i386/i386.opt: Add -mmove-max=bits and -mstore-max=bits. * config/i386/x86-tune.def (X86_TUNE_AVX512_MOVE_BY_PIECES): New. (X86_TUNE_AVX512_STORE_BY_PIECES): Likewise. * doc/invoke.texi: Document -mmove-max=bits and -mstore-max=bits. 2021-12-03 Bill Schmidt * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Fix builtin identifiers. 2021-12-03 SiYu Wu * common/config/riscv/riscv-common.c (riscv_implied_info): Add K-ext related entry. (riscv_supported_std_ext): Add 'k'. * config/riscv/arch-canonicalize (CANONICAL_ORDER): Add 'k'. (IMPLIED_EXT): Add K-ext related entry. 2021-12-03 SiYu Wu * common/config/riscv/riscv-common.c (riscv_ext_version_table): Add zbk* and zk*. * config/riscv/riscv-opts.h (MASK_ZBKB): New. (MASK_ZBKC): Ditto. (MASK_ZBKX): Ditto. (MASK_ZKNE): Ditto. (MASK_ZKND): Ditto. (MASK_ZKNH): Ditto. (MASK_ZKR): Ditto. (MASK_ZKSED): Ditto. (MASK_ZKSH): Ditto. (MASK_ZKT): Ditto. (TARGET_ZBKB): Ditto. (TARGET_ZBKC): Ditto. (TARGET_ZBKX): Ditto. (TARGET_ZKNE): Ditto. (TARGET_ZKND): Ditto. (TARGET_ZKNH): Ditto. (TARGET_ZKR): Ditto. (TARGET_ZKSED): Ditto. (TARGET_ZKSH): Ditto. (TARGET_ZKT): Ditto. * config/riscv/riscv.opt (riscv_zk_subext): New. 2021-12-03 Tamar Christina * tree-vect-stmts.c (prepare_load_store_mask): Rename to... (prepare_vec_mask): ...This and record operations that have already been masked. (vectorizable_call): Use it. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. * tree-vectorizer.h (class _loop_vec_info): Add vec_cond_masked_set. (vec_cond_masked_set_type, tree_cond_mask_hash): New. 2021-12-03 H.J. Lu PR target/51469 PR target/83782 * target.def (ifunc_ref_local_ok): Add a target hook. * varasm.c (default_binds_local_p_3): Force indirect function resolver non-local only if targetm.ifunc_ref_local_ok returns false. * config/i386/i386-expand.c (ix86_expand_call): Call ix86_call_use_plt_p to check if PLT should be used. * config/i386/i386-protos.h (ix86_call_use_plt_p): New. * config/i386/i386.c (output_pic_addr_const): Call ix86_call_use_plt_p to check if "@PLT" is needed. (ix86_call_use_plt_p): New. (TARGET_IFUNC_REF_LOCAL_OK): New. * doc/tm.texi.in: Add TARGET_IFUNC_REF_LOCAL_OK. * doc/tm.texi: Regenerated. 2021-12-03 Jakub Jelinek * attribs.h (simple_cst_list_equal): Declare. * attribs.c (simple_cst_list_equal): No longer static. * config/i386/i386-options.c (target_attribute_cache): New variable. (ix86_valid_target_attribute_p): Cache DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_SPECIFIC_OPTIMIZATION based on args. 2021-12-03 Jakub Jelinek PR pch/71934 * ggc.h (gt_pch_note_callback): Declare. * gengtype.h (enum typekind): Add TYPE_CALLBACK. (callback_type): Declare. * gengtype.c (dbgprint_count_type_at): Handle TYPE_CALLBACK. (callback_type): New variable. (process_gc_options): Add CALLBACK argument, handle callback option. (set_gc_used_type): Adjust process_gc_options caller, if callback, set type to &callback_type. (output_mangled_typename): Handle TYPE_CALLBACK. (walk_type): Likewise. Handle callback option. (write_types_process_field): Handle TYPE_CALLBACK. (write_types_local_user_process_field): Likewise. (write_types_local_process_field): Likewise. (write_root): Likewise. (dump_typekind): Likewise. (dump_type): Likewise. * gengtype-state.c (type_lineloc): Handle TYPE_CALLBACK. (state_writer::write_state_callback_type): New method. (state_writer::write_state_type): Handle TYPE_CALLBACK. (read_state_callback_type): New function. (read_state_type): Handle TYPE_CALLBACK. * ggc-common.c (callback_vec): New variable. (gt_pch_note_callback): New function. (gt_pch_save): Stream out gt_pch_save function address and relocation table. (gt_pch_restore): Stream in saved gt_pch_save function address and relocation table and apply relocations if needed. * doc/gty.texi (callback): Document new GTY option. * varasm.c (get_unnamed_section): Change callback argument's type and last argument's type from const void * to const char *. (output_section_asm_op): Change argument's type from const void * to const char *, remove unnecessary cast. * tree-core.h (struct tree_translation_unit_decl): Drop GTY((skip)) from language member. * output.h (unnamed_section_callback): Change argument type from const void * to const char *. (struct unnamed_section): Use GTY((callback)) instead of GTY((skip)) for callback member. Change data member type from const void * to const char *. (struct noswitch_section): Use GTY((callback)) instead of GTY((skip)) for callback member. (get_unnamed_section): Change callback argument's type and last argument's type from const void * to const char *. (output_section_asm_op): Change argument's type from const void * to const char *. * config/avr/avr.c (avr_output_progmem_section_asm_op): Likewise. Remove unneeded cast. * config/darwin.c (output_objc_section_asm_op): Change argument's type from const void * to const char *. * config/pa/pa.c (som_output_text_section_asm_op): Likewise. (som_output_comdat_data_section_asm_op): Likewise. * config/rs6000/rs6000.c (rs6000_elf_output_toc_section_asm_op): Likewise. (rs6000_xcoff_output_readonly_section_asm_op): Likewise. Instead of dereferencing directive hardcode variable names and decide based on whether directive is NULL or not. (rs6000_xcoff_output_readwrite_section_asm_op): Change argument's type from const void * to const char *. (rs6000_xcoff_output_tls_section_asm_op): Likewise. Instead of dereferencing directive hardcode variable names and decide based on whether directive is NULL or not. (rs6000_xcoff_output_toc_section_asm_op): Change argument's type from const void * to const char *. (rs6000_xcoff_asm_init_sections): Adjust get_unnamed_section callers. 2021-12-03 Richard Purdie * Makefile.in: Fix "argument list too long" from install-plugins. 2021-12-03 Matt Jacobson * config.gcc: For the AVR target, populate TM_MULTILIB_CONFIG. * config/avr/genmultilib.awk: Add ability to filter generated multilib list. * config/avr/t-avr: Pass TM_MULTILIB_CONFIG to genmultilib.awk. * configure.ac: Update help string for --with-multilib-list. * configure: Regenerate. 2021-12-02 Ilya Lipnitskiy * configure: Regenerate. * configure.ac: Define TARGET_LIBC_GNUSTACK on musl. 2021-12-02 Iain Sandoe PR target/55610 * config/host-darwin.c (TRY_EMPTY_VM_SPACE, SAFE_ALLOC_SIZE): New. (darwin_gt_pch_get_address): Rewrite to use nominated memory segments rather than part of the compiler __DATA segment. (darwin_gt_pch_use_address): Likewise. 2021-12-02 Gerald Pfeifer * doc/install.texi (*-*-freebsd*): Remove references to FreeBSD 1 and FreeBSD 2. 2021-12-02 Vladimir N. Makarov PR rtl-optimization/103437 * ira-color.c (setup_allocno_priorities): Switch off backup code for overflow if compiler has __builtin_smul_overflow. Use < for comparison with -INT_MAX. 2021-12-02 Bill Schmidt * config/rs6000/altivec.h: Delete a number of #defines that are now superfluous. Alphabetize. Include rs6000-vecdefines.h. Include some synonyms. * config/rs6000/rs6000-builtin-new.def (CMPB): Flag as no32bit. (BPERMD): Flag as 32bit (needing special handling for 32-bit). (UNPACK_TD): Return unsigned long long instead of unsigned long. (GET_TEXASR): Return unsigned long instead of unsigned long long. (GET_TEXASRU): Likewise. (GET_TFHAR): Likewise. (GET_TFIAR): Likewise. (SET_TEXASR): Pass unsigned long instead of unsigned long long. (SET_TEXASRU): Likewise. (SET_TFHAR): Likewise. (SET_TFIAR): Likewise. (TABORTDC): Likewise. (TABORTDCI): Likewise. * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): Fix error handling for no32bit. Add 32bit handling for RS6000_BIF_BPERMD. * config/rs6000/rs6000-gen-builtins.c (write_init_file): Initialize new_builtins_are_live to 1. 2021-12-02 Vladimir N. Makarov PR rtl-optimization/103437 * ira-color.c (setup_allocno_priorities): Use long long multiplication as backup for overflow processing. 2021-12-02 Tamar Christina * config/aarch64/aarch64-protos.h (aarch64_gen_shareable_zero): New. * config/aarch64/aarch64-simd.md (aarch64_rshrn, aarch64_rshrn2): Generate rounding half-ing add when appropriate. * config/aarch64/aarch64.c (aarch64_gen_shareable_zero): New. 2021-12-02 Vladimir N. Makarov PR rtl-optimization/103437 * ira-color.c (setup_allocno_priorities): Process multiplication overflow. 2021-12-02 Martin Liska PR gcov-profile/96092 * common.opt: New option. * coverage.c (coverage_begin_function): Emit filename with remap_profile_filename. * doc/invoke.texi: Document the new option. * file-prefix-map.c (add_profile_prefix_map): New. (remap_profile_filename): Likewise. * file-prefix-map.h (add_profile_prefix_map): Likewise. (remap_profile_filename): Likewise. * lto-opts.c (lto_write_options): Handle OPT_fprofile_prefix_map_. * opts-global.c (handle_common_deferred_options): Likewise. * opts.c (common_handle_option): Likewise. (gen_command_line_string): Likewise. * profile.c (output_location): Emit filename with remap_profile_filename. 2021-12-02 Richard Biener PR middle-end/103271 * internal-fn.c (expand_DEFERRED_INIT): When the base of the LHS is a decl with matching constant size use that as the initialization target instead of an eventual VLA typed one. 2021-12-02 Richard Biener PR tree-optimization/103527 * tree-vect-stmts.c (vect_build_gather_load_calls): Always use a truth type for building the vector mask. 2021-12-02 Rasmus Villemoes * config/vxworks.h (LTO_PLUGIN_SPEC): Adapt to corrected spelling of -linker-output-auto-nolto-rel. 2021-12-01 Uroš Bizjak PR target/102811 * config/i386/sse.md (VI2F): Remove mode iterator. (VI2F_256_512): New mode iterator. (vec_set_0): New insn pattern. (vec_set_0>): Rename from vec_setmode. Use VI2F_256_512 mode iterator instead of VI2F. (*axv512fp16_movsh): Remove. (_pinsr): Add (x,x,x) AVX2 alternative. Do not disable V8HF mode insn on AVX2 targets. (pinsrw -> pbroadcast + pblendw peephole2): New peephole. (pinsrw -> pbroadcast + pblendw splitter): New post-reload splitter. * config/i386/i386.md (extendhfsf): Call gen_vec_setv8hf_0. * config/i386/i386-expand.c (ix86_expand_vector_set) : Use vec_merge path for TARGET_AVX2. 2021-12-01 Roger Sayle Richard Biener * tree-ssa-loop-niter.c (number_of_iterations_until_wrap): Check if simplify_using_initial_conditions allows us to simplify the expression for may_be_zero. * match.pd (X != C ? -X : -C -> -X): New transform. (X != C ? ~X : ~C -> ~X): Likewise. ((X+1) > Y ? -X : 1 -> X >= Y ? -X : 1): Likewise. 2021-12-01 Peter Bergner PR middle-end/103127 * gimplify.c (is_var_need_auto_init): Handle opaque types. 2021-12-01 Iain Buclaw * common.opt (static-libphobos): Add option. * config/darwin.h (LINK_SPEC): Substitute -lgphobos with libgphobos.a when linking statically. * gcc.c (driver_handle_option): Set -static-libphobos as always valid. 2021-12-01 Jason Merrill PR c++/103310 * fold-const.c (maybe_nonzero_address): Use get_create or get depending on folding_initializer. (fold_binary_initializer_loc): New. * fold-const.h (fold_binary_initializer_loc): Declare. * varasm.c (mark_weak): Don't use the decl location. * doc/invoke.texi: Document -fconstexpr-fp-except. 2021-12-01 Bill Schmidt PR target/102347 * config/rs6000/rs6000-c.c (rs6000-builtins.h): Stop including. (rs6000-internal.h): Include. (altivec_resolve_new_overloaded_builtin): Move call to rs6000_invalid_new_builtin here from rs6000_new_builtin_decl. * config/rs6000/rs6000-call.c (rs6000-builtins.h): Stop including. (rs6000_invalid_new_builtin): Remove static qualifier. (rs6000_new_builtin_decl): Remove test for supported builtin. * config/rs6000/rs6000-internal.h (rs6000-builtins.h): Include. (rs6000_invalid_new_builtin): Declare. * config/rs6000/rs6000.c (rs6000-builtins.h): Don't include. 2021-12-01 Aldy Hernandez PR tree-optimization/103409 * gimple-range-path.cc (path_range_query::compute_ranges_in_phis): Do all the work with just one ssa_global_cache. * gimple-range-path.h: Remove m_tmp_phi_cache. 2021-12-01 Richard Sandiford PR tree-optimization/103517 * tree-vect-slp.c (vect_build_slp_tree_1): When allowing two different component references, check the codes of both them, rather than just the first. 2021-12-01 Andrew MacLeod PR tree-optimization/103464 * gimple-range.cc (gimple_ranger::prefill_name): Process phis also. (gimple_ranger::prefill_stmt_dependencies): Ditto. 2021-12-01 Iain Buclaw * doc/install.texi (Prerequisites): Add note that D front end now requires GDC installed in order to bootstrap. (Building): Add D compiler section, referencing prerequisites. 2021-12-01 Jakub Jelinek * config/i386/x86-tune.def (X86_TUNE_SCHEDULE, X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY, X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Formatting fixes. (X86_TUNE_USE_GATHER): Put m_GENERIC last for consistency. 2021-12-01 Jakub Jelinek PR rtl-optimization/102356 * rtl.h (simplify_context): Add assoc_count member and max_assoc_count static member. * simplify-rtx.c (simplify_associative_operation): Don't reassociate more than max_assoc_count times within one outermost simplify_* call. * dwarf2out.c (mem_loc_descriptor): Optimize binary operation with both operands the same using DW_OP_dup. 2021-12-01 Tamar Christina * match.pd: Move below pattern that rewrites to EQ, NE. * tree.c (bitmask_inv_cst_vector_p): Correct do .. while indentation. 2021-12-01 Siddhesh Poyarekar Martin Liška PR tree-optimization/103456 * tree-object-size.c (merge_object_sizes): Update osi->changed only if object_sizes_set succeeded. 2021-11-30 liuhongt PR target/103463 PR target/103484 * config/i386/i386.md (*x86_64_shld_1): Set_attr length_immediate to 1. (*x86_shld_1): Ditto. (*x86_64_shrd_1): Ditto. (*x86_shrd_1): Ditto. 2021-11-30 Bill Schmidt * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Clarify diagnostic. (altivec_resolve_new_overloaded_builtin): Likewise. 2021-11-30 Martin Jambor PR ipa/103267 * ipa-sra.c (scan_function): Also check ECF_LOOPING_CONST_OR_PURE flag. 2021-11-30 Richard Sandiford PR tree-optimization/103494 * tree-vect-stmts.c (vect_get_gather_scatter_ops): Remove ncopies argument and calculate ncopies from gs_info->offset_vectype where necessary. (vectorizable_store, vectorizable_load): Update accordingly. 2021-11-30 Iain Buclaw * Makefile.in (GDC): New variable. (GDCFLAGS): New variable. * configure: Regenerate. * configure.ac: Add call to ACX_PROG_GDC. Substitute GDCFLAGS. 2021-11-30 Martin Liska Martin Jambor PR ipa/103449 * ipa-param-manipulation.c (ipa_param_body_adjustments::prepare_debug_expressions): Be careful about hash_map reallocating itself. Simpify a return which always returns true. 2021-11-30 Andrew MacLeod PR tree-optimization/103440 * gimple-range-fold.cc (fold_using_range::range_of_phi): Continue normal param processing for equiv params. 2021-11-30 Richard Biener * config/i386/i386.c (ix86_shift_rotate_cost): Remove unreachable return. * tree-chrec.c (evolution_function_is_invariant_rec_p): Likewise. * tree-if-conv.c (if_convertible_stmt_p): Likewise. * tree-ssa-pre.c (fully_constant_expression): Likewise. * tree-vrp.c (operand_less_p): Likewise. * reload.c (reg_overlap_mentioned_for_reload_p): Remove unreachable gcc_unreachable (). * sel-sched-ir.h (bb_next_bb): Likewise. * varasm.c (compare_constant): Likewise. 2021-11-30 Richard Biener PR tree-optimization/103489 * tree-vect-loop.c (vectorizable_phi): Verify argument vector type compatibility to mitigate bool pattern recog bug. 2021-11-30 Thomas Schwinge * omp-offload.c (oacc_loop_auto_partitions): Remove erroneous "Orphan reductions cannot have gang partitioning" handling. 2021-11-30 Thomas Schwinge * omp-offload.c (oacc_loop_process): Implement "gang reduction on an orphan loop" checking. 2021-11-30 Cesar Philippidis Thomas Schwinge * omp-general.h (enum oacc_loop_flags): Add OLF_REDUCTION enum. * omp-low.c (lower_oacc_head_mark): Use it to mark OpenACC reductions. * omp-offload.c (oacc_loop_auto_partitions): Don't assign gang level parallelism to orphan reductions. 2021-11-30 Aldy Hernandez PR tree-optimization/103451 * range-op.cc (operator_div::wi_fold): Remove can_throw_non_call_exceptions special case. * tree-ssa-sink.c (sink_code_in_bb): Same. 2021-11-30 Richard Sandiford * tree-vect-slp.c (arg1_arg4_map): New variable. (vect_get_operand_map): Handle IFN_MASK_GATHER_LOAD. (vect_build_slp_tree_1): Likewise. (vect_build_slp_tree_2): Likewise. * tree-vect-stmts.c (vectorizable_load): Expect the mask to be the last SLP child node rather than the first. 2021-11-30 Richard Sandiford * tree-if-conv.c: Include tree-eh.h. (predicate_statements): Remove pe argument. Don't hoist statements here. (combine_blocks): Remove pe argument. (ifcvt_available_on_edge_p, ifcvt_can_hoist): New functions. (ifcvt_hoist_invariants): Likewise. (tree_if_conversion): Update call to combine_blocks. Call ifcvt_hoist_invariants after VN. 2021-11-30 Richard Sandiford PR tree-optimization/102467 * doc/sourcebuild.texi (vect_gather_load_ifn): Document. * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Commonize safelen handling. Punt for anything involving gathers and scatters unless safelen says otherwise. * tree-vect-slp.c (arg1_map): New variable. (vect_get_operand_map): Handle IFN_GATHER_LOAD. (vect_build_slp_tree_1): Likewise. (vect_build_slp_tree_2): Likewise. (compatible_calls_p): If vect_get_operand_map returns nonnull, check that any skipped arguments are equal. (vect_slp_analyze_node_operations_1): Tighten reduction check. * tree-vect-stmts.c (check_load_store_for_partial_vectors): Take an ncopies argument. (vect_get_gather_scatter_ops): Take slp_node and ncopies arguments. Handle SLP nodes. (vectorizable_store, vectorizable_load): Adjust accordingly. 2021-11-30 Richard Sandiford * gimple.h (gimple_num_args, gimple_arg, gimple_arg_ptr): New functions. * tree-vect-slp.c (cond_expr_maps, arg2_map): New variables. (vect_get_operand_map): New function. (vect_get_and_check_slp_defs): Fix outdated comment. Use vect_get_operand_map and new gimple argument accessors. (vect_build_slp_tree_2): Likewise. 2021-11-30 Richard Sandiford * tree-vect-slp.c (vect_build_slp_tree_1): Use code_helper to record the operations performed by statements, only using CALL_EXPR for things that don't map to built-in or internal functions. For shifts, require all shift amounts to be equal if optab_vector is not supported but optab_scalar is. 2021-11-30 Richard Sandiford * tree-vect-data-refs.c (vect_check_gather_scatter): Continue processing conversions if the current offset is a pointer. 2021-11-30 Richard Sandiford * tree-vectorizer.h (vect_is_reduction): Use STMT_VINFO_REDUC_IDX. 2021-11-30 Richard Sandiford * genopinit.c (main): Turn supports_vec_gather_load and supports_vec_scatter_store into signed char arrays and remove supports_vec_gather_load_cached and supports_vec_scatter_store_cached. * optabs-query.c (supports_vec_convert_optab_p): Add a mode parameter. If the mode is not VOIDmode, test only for that mode. (supports_vec_gather_load_p): Likewise. (supports_vec_scatter_store_p): Likewise. * optabs-query.h (supports_vec_gather_load_p): Likewise. (supports_vec_scatter_store_p): Likewise. * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the vector mode to supports_vec_gather_load_p and supports_vec_scatter_store_p. 2021-11-30 Richard Sandiford * internal-fn.c (commutative_binary_fn_p): Handle IFN_ADD_OVERFLOW and IFN_MUL_OVERFLOW. 2021-11-30 Richard Sandiford * internal-fn.c (commutative_binary_fn_p): Handle IFN_UBSAN_CHECK_ADD and IFN_UBSAN_CHECK_MUL. 2021-11-30 Richard Sandiford * internal-fn.c (commutative_binary_fn_p): Handle IFN_COMPLEX_MUL. 2021-11-30 Richard Sandiford * gimple-fold.c: Include internal-fn.h. (fold_stmt_1): If a function maps to an internal one, use first_commutative_argument to canonicalize the order of commutative arguments. * gimple-match-head.c (gimple_resimplify2, gimple_resimplify3) (gimple_resimplify4, gimple_resimplify5): Extend commutativity checks to functions. 2021-11-30 Richard Sandiford * doc/md.texi (reduc_fmin_scal_@var{m}): Document. (reduc_fmax_scal_@var{m}): Likewise. * optabs.def (reduc_fmax_scal_optab): New optab. (reduc_fmin_scal_optab): Likewise * internal-fn.def (REDUC_FMAX, REDUC_FMIN): New functions. * tree-vect-loop.c (reduction_fn_for_scalar_code): Handle CASE_CFN_FMAX and CASE_CFN_FMIN. (neutral_op_for_reduction): Likewise. (needs_fold_left_reduction_p): Likewise. * config/aarch64/iterators.md (FMAXMINV): New iterator. (fmaxmin): Handle UNSPEC_FMAXNMV and UNSPEC_FMINNMV. * config/aarch64/aarch64-simd.md (reduc__scal_): Fix unspec mode. (reduc__scal_): New pattern. * config/aarch64/aarch64-sve.md (reduc__scal_): Likewise. 2021-11-30 Richard Sandiford * builtins.h (associated_internal_fn): Declare overload that takes a (combined_cfn, return type) pair. * builtins.c (associated_internal_fn): Split new overload out of original fndecl version. Also provide an overload that takes a (combined_cfn, return type) pair. * internal-fn.h (commutative_binary_fn_p): Declare. (commutative_ternary_fn_p): Likewise. (associative_binary_fn_p): Likewise. * internal-fn.c (commutative_binary_fn_p, commutative_ternary_fn_p): New functions, split out from... (first_commutative_argument): ...here. (associative_binary_fn_p): New function. * gimple-match.h (code_helper): Add a constructor that takes internal functions. (commutative_binary_op_p): Declare. (commutative_ternary_op_p): Likewise. (first_commutative_argument): Likewise. (associative_binary_op_p): Likewise. (canonicalize_code): Likewise. (directly_supported_p): Likewise. (get_conditional_internal_fn): Likewise. (gimple_build): New overloads that takes a code_helper. * gimple-fold.c (gimple_build): Likewise. * gimple-match-head.c (commutative_binary_op_p): New function. (commutative_ternary_op_p): Likewise. (first_commutative_argument): Likewise. (associative_binary_op_p): Likewise. (canonicalize_code): Likewise. (directly_supported_p): Likewise. (get_conditional_internal_fn): Likewise. * tree-vectorizer.h: Include gimple-match.h. (neutral_op_for_reduction): Take a code_helper instead of a tree_code. (needs_fold_left_reduction_p): Likewise. (reduction_fn_for_scalar_code): Likewise. (vect_can_vectorize_without_simd_p): Declare a nNew overload that takes a code_helper. * tree-vect-loop.c: Include case-cfn-macros.h. (fold_left_reduction_fn): Take a code_helper instead of a tree_code. (reduction_fn_for_scalar_code): Likewise. (neutral_op_for_reduction): Likewise. (needs_fold_left_reduction_p): Likewise. (use_mask_by_cond_expr_p): Likewise. (build_vect_cond_expr): Likewise. (vect_create_partial_epilog): Likewise. Use gimple_build rather than gimple_build_assign. (check_reduction_path): Handle calls and operate on code_helpers rather than tree_codes. (vect_is_simple_reduction): Likewise. (vect_model_reduction_cost): Likewise. (vect_find_reusable_accumulator): Likewise. (vect_create_epilog_for_reduction): Likewise. (vect_transform_cycle_phi): Likewise. (vectorizable_reduction): Likewise. Make more use of lane_reduc_code_p. (vect_transform_reduction): Use gimple_extract_op but expect a tree_code for now. (vect_can_vectorize_without_simd_p): New overload that takes a code_helper. * tree-vect-stmts.c (vectorizable_call): Handle reductions in fully-masked loops. * tree-vect-patterns.c (vect_mark_pattern_stmts): Use gimple_extract_op when updating STMT_VINFO_REDUC_IDX. 2021-11-30 Richard Sandiford * gimple-match.h (code_helper): Provide == and != overloads. (code_helper::operator tree_code): Make explicit. (code_helper::operator combined_fn): Likewise. * gimple-match-head.c (convert_conditional_op): Use explicit conversions where necessary. (gimple_resimplify1, gimple_resimplify2, gimple_resimplify3): Likewise. (maybe_push_res_to_seq, gimple_simplify): Likewise. * gimple-fold.c (replace_stmt_with_simplification): Likewise. 2021-11-30 Richard Sandiford * gimple-match.h (code_helper): Add functions for querying whether the code represents an internal_fn or a built_in_function. Provide explicit conversion operators for both cases. (gimple_extract_op): Declare. * gimple-match-head.c (gimple_extract): New function, extracted from... (gimple_simplify): ...here. (gimple_extract_op): New function. 2021-11-30 Eric Botcazou PR target/103274 * config/i386/i386.c (ix86_output_call_insn): Beef up comment about nops emitted with SEH. * config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to the cold section, emit a nop before the directive if the previous active instruction is a call. 2021-11-30 Roger Sayle Uroš Bizjak PR target/100711 * config/i386/sse.md (define_split): New splitters to simplify not;vec_duplicate;and as vec_duplicate;andn. 2021-11-30 Richard Biener PR middle-end/103485 * match.pd (-((int)x >> (prec - 1)) to (unsigned)x >> (prec - 1)): Use VIEW_CONVERT_EXPR for vectors. 2021-11-30 Richard Biener * cfgrtl.c (skip_insns_after_block): Refactor code to be more easily readable. * expr.c (op_by_pieces_d::run): Remove unreachable assert. * sched-deps.c (sched_analyze): Remove unreachable gcc_unreachable. * sel-sched-ir.c (in_same_ebb_p): Likewise. * tree-ssa-alias.c (nonoverlapping_refs_since_match_p): Remove unreachable code. * tree-vect-slp.c (vectorize_slp_instance_root_stmt): Refactor to avoid unreachable loop iteration. * tree.c (walk_tree_1): Remove unreachable break. * vec-perm-indices.c (vec_perm_indices::series_p): Remove unreachable return. 2021-11-30 Kewen Lin PR target/102347 * config/rs6000/rs6000-call.c (rs6000_builtin_decl): Remove builtin mask check. 2021-11-30 Kewen Lin * config/rs6000/rs6000.c (rs6000_cost_data::update_target_cost_per_stmt): Adjust the way to compute extra penalized cost. Remove useless parameter. (rs6000_cost_data::rs6000_add_stmt_cost): Adjust the call to function update_target_cost_per_stmt. 2021-11-30 Kewen Lin Revert: 2021-11-17 Kewen Lin * config/visium/visium.md (*add3_insn, *addsi3_insn, *addi3_insn, *sub3_insn, *subsi3_insn, *subdi3_insn, *neg2_insn, *negdi2_insn, *and3_insn, *ior3_insn, *xor3_insn, *one_cmpl2_insn, *ashl3_insn, *ashr3_insn, *lshr3_insn, *trunchiqi2_insn, *truncsihi2_insn, *truncdisi2_insn, *extendqihi2_insn, *extendqisi2_insn, *extendhisi2_insn, *extendsidi2_insn, *zero_extendqihi2_insn, *zero_extendqisi2_insn, *zero_extendsidi2_insn): Fix split condition. 2021-11-30 Andrew MacLeod PR tree-optimization/103467 * gimple-range-gori.cc (range_def_chain::register_dependency): Don't use an object reference after a potential resize. 2021-11-29 Uroš Bizjak PR target/102811 * config/i386/i386.md (*movhi_internal): Introduce (*v,C) alternative. Do not allocate non-GPR registers. Optimize xmm->xmm moves when optimizing for size. Fix vpinsrw insn template. (*movhf_internal): Fix pinsrw and pextrw insn templates for AVX targets. Use sselog1 type instead of sselog. Optimize GPR moves. Optimize xmm->xmm moves for TARGET_SSE_PARTIAL_REG_DEPENDENCY and TARGET_SSE_SPLIT_REGS targets. 2021-11-29 Eric Gallager * configure: Re-regenerate. 2021-11-29 Eric Gallager PR other/103021 * Makefile.in: Substitute CTAGS, ETAGS, and CSCOPE variables. Use ETAGS variable in TAGS target. * configure: Regenerate. * configure.ac: Allow CTAGS, ETAGS, and CSCOPE variables to be overridden. 2021-11-29 Paul A. Clarke * config/rs6000/xmmintrin.h (_mm_movemask_ps): Use vec_extractm when _ARCH_PWR10. * config/rs6000/emmintrin.h (_mm_movemask_pd): Likewise. (_mm_movemask_epi8): Likewise. 2021-11-29 Richard Biener * read-rtl-function.c (function_reader::read_rtx_operand): Return only after resetting m_in_call_function_usage. 2021-11-29 Roger Sayle * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti): Perform the conversion via V2DImode using vec_extractv2didi on TARGET_SSE2. * config/i386/sse.md (rotlv1ti3, rotrv1ti3): Change constraint on QImode shift amounts from const_int_operand to general_operand. 2021-11-29 Richard Biener * tree.h (reverse_storage_order_for_component_p): Remove spurious gcc_unreachable. * cfganal.c (dfs_find_deadend): Likewise. * fold-const-call.c (fold_const_logb): Likewise. (fold_const_significand): Likewise. * gimple-ssa-store-merging.c (lhs_valid_for_store_merging_p): Likewise. 2021-11-29 Richard Biener * vec.c (qsort_chk): Do not return the void return value from the noreturn qsort_chk_error. * ccmp.c (expand_ccmp_expr_1): Remove unreachable return. * df-scan.c (df_ref_equal_p): Likewise. * dwarf2out.c (is_base_type): Likewise. (add_const_value_attribute): Likewise. * fixed-value.c (fixed_arithmetic): Likewise. * gimple-fold.c (gimple_fold_builtin_fputs): Likewise. * gimple-ssa-strength-reduction.c (stmt_cost): Likewise. * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_expr_op): Likewise. (gcc_expression_from_isl_expression): Likewise. * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Likewise. * lto-streamer-in.c (lto_input_mode_table): Likewise. 2021-11-29 liuhongt PR target/102811 * config/i386/i386.c (inline_secondary_memory_needed): HImode move between GPR and SSE registers is supported under TARGET_SSE2 and above. * config/i386/i386.md (extendhfsf2): Optimize expander. (truncsfhf2): Ditto. * config/i386/sse.md (sse2p4_1): Adjust attr for V8HFmode to align with V8HImode. 2021-11-29 liuhongt PR target/102811 PR target/103463 * config/i386/i386.c (ix86_secondary_reload): Without TARGET_SSE4_1, General register is needed to move HImode from sse register to memory. * config/i386/sse.md (*vec_extrachf): Use %vpextrw instead of pextrw in output templates. * config/i386/i386.md (movhi_internal): Ditto, also fix typo of MEM_P (operands[1]) and adjust mode/prefix/type attribute for alternatives related to sse register. 2021-11-29 Richard Biener PR tree-optimization/103458 * tree-ssa-dce.c (make_forwarders_with_degenerate_phis): Do not create forwarders for blocks with abnormal predecessors. 2021-11-29 Richard Biener * gimple-predicate-analysis.cc (can_be_invalidated_p): Restore semantics to the one before the split from tree-ssa-uninit.c. 2021-11-28 Jan Hubicka * profile.c: Include sreal.h (struct bb_stats): New. (cmp_stats): New function. (compute_branch_probabilities): Output bb stats. 2021-11-28 Jan Hubicka * cfghooks.c: Include sreal.h, profile.h. (profile_record_check_consistency): Fix checking of count counsistency; record also dynamic mismatches. * cfgrtl.c (rtl_account_profile_record): Similarly. * tree-cfg.c (gimple_account_profile_record): Likewise. * cfghooks.h (struct profile_record): Remove num_mismatched_freq_in, num_mismatched_freq_out, turn time to double, add dyn_mismatched_prob_out, dyn_mismatched_count_in, num_mismatched_prob_out; remove num_mismatched_count_out. * passes.c (account_profile_1): New function. (account_profile_in_list): New function. (pass_manager::dump_profile_report): Rewrite. (execute_one_ipa_transform_pass): Check profile consistency after running all passes. (execute_all_ipa_transforms): Remove cfun test; record all transform methods. (execute_one_pass): Fix collecting of profile stats. 2021-11-27 Jakub Jelinek PR middle-end/103431 * config/i386/i386.md (x86_64_shld, x86_shld, x86_64_shrd, x86_shrd): Change insn pattern to accurately describe the instructions. (*x86_64_shld_1, *x86_shld_1, *x86_64_shrd_1, *x86_shrd_1): New define_insn patterns. (*x86_64_shld_2, *x86_shld_2, *x86_64_shrd_2, *x86_shrd_2): New define_insn_and_split patterns. (*ashl3_doubleword_mask, *ashl3_doubleword_mask_1, *3_doubleword_mask, *3_doubleword_mask_1, ix86_rotl3_doubleword, ix86_rotr3_doubleword): Adjust splitters for x86_{,64_}sh{l,r}d pattern changes. 2021-11-27 Jakub Jelinek PR tree-optimization/103435 * gimple-ssa-store-merging.c (find_bswap_or_nop_finalize): Avoid UB if n->range - rsize == 8, just clear both *cmpnop and *cmpxchg in that case. 2021-11-27 Martin Jambor PR ipa/103441 * ipa-prop.c (ipcp_transform_function): Call delete_unreachable_blocks_update_callgraph instead of returning TODO_cleanup_cfg. 2021-11-26 Siddhesh Poyarekar * tree-object-size.c (object_sizes_grow, object_sizes_release, object_sizes_unknown_p, object_sizes_get, object_size_set_force, object_sizes_set): New functions. (addr_object_size, compute_builtin_object_size, expr_object_size, call_object_size, unknown_object_size, merge_object_sizes, plus_stmt_object_size, cond_expr_object_size, collect_object_sizes_for, check_for_plus_in_loops_1, init_object_sizes, fini_object_sizes): Adjust. 2021-11-26 Siddhesh Poyarekar * tree-object-size.c: New enum. (object_sizes, computed, addr_object_size, compute_builtin_object_size, expr_object_size, call_object_size, merge_object_sizes, plus_stmt_object_size, collect_object_sizes_for, init_object_sizes, fini_object_sizes, object_sizes_execute): Replace magic numbers with enums. 2021-11-26 Roger Sayle * tree-ssa-loop-ivopts.c (cand_value_at): Take a class tree_niter_desc* argument instead of just a tree for NITER. If we require the iv candidate value at the end of the final loop iteration, try using the original loop bound as the NITER for sufficiently simple loops. (may_eliminate_iv): Update (only) call to cand_value_at. 2021-11-26 Jan Hubicka * ipa-modref.c (analyze_function): Drop parameter F and dump cgraph node name rather than cfun name. (modref_generate): Update. (modref_summaries::insert):Update. (modref_summaries_lto::insert):Update. (pass_modref::execute):Update. (ipa_merge_modref_summary_after_inlining): Improve combining of ECF_FLAGS. 2021-11-26 Jan Hubicka PR ipa/102943 * ipa-modref.c (update_escape_summary_1): Fix handling of min_flags. 2021-11-26 konglin1 PR target/102811 * config/i386/i386.c (ix86_can_change_mode_class): Allow 16 bit data in XMM register for TARGET_SSE2. * config/i386/i386.md (extendhfsf2): Add extenndhfsf2 for TARGET_F16C. (extendhfdf2): Restrict extendhfdf for TARGET_AVX512FP16 only. (*extendhf2): Rename from extendhf2. (truncsfhf2): Likewise. (truncdfhf2): Likewise. (*trunc2): Likewise. 2021-11-26 liuhongt PR middle-end/103419 * match.pd: Fix typo, use the type of second parameter, not first one. 2021-11-25 Jan Hubicka * ipa-cp.c (ipa_value_range_from_jfunc): Remove forgotten early return. 2021-11-25 Roger Sayle PR middle-end/103406 * match.pd (minus @0 @0): Check tree_expr_maybe_infinite_p. 2021-11-25 Martin Jambor PR ipa/103227 * ipa-prop.h (ipa_get_param): New overload. Move bits of the existing one to the new one. * ipa-param-manipulation.h (ipa_param_adjustments): New member function get_updated_index_or_split. * ipa-param-manipulation.c (ipa_param_adjustments::get_updated_index_or_split): New function. * ipa-prop.c (adjust_agg_replacement_values): Reimplement, add capability to identify scalarized parameters and perform substitution on them. (ipcp_transform_function): Create descriptors earlier, handle new return values of adjust_agg_replacement_values. 2021-11-25 Aldy Hernandez * gimple-range-path.cc (path_range_query::compute_ranges_defined): Remove. (path_range_query::compute_ranges_in_block): Revert to bitmap order. * gimple-range-path.h: Remove compute_ranges_defined. 2021-11-25 Andrew Stubbs PR target/103396 * config/gcn/gcn.c (move_callee_saved_registers): Ensure that the number of spilled registers is counted correctly. 2021-11-25 Jan Hubicka * ipa-prop.h (ipa_node_params::ipa_node_params): Initialize node_is_self_scc. 2021-11-25 Andrew MacLeod PR tree-optimization/103359 * gimple-range-fold.cc (fold_using_range::range_of_phi): If arg is equivalent to def, don't initially include it's range. 2021-11-25 Jan Hubicka * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Do not check gimple_static_chain. 2021-11-25 Richard Biener * cgraphunit.c (symbol_table::output_weakrefs): Remove unreachable init. (get_alias_symbol): Remove now unused function. 2021-11-25 Richard Biener * cfgrtl.c (rtl_verify_fallthru): Do not stop verifying with fatal_insn. (skip_insns_after_block): Remove unreachable break and continue. 2021-11-25 Richard Biener * cfgexpand.c (label_rtx_for_bb): Remove dead loop construct. 2021-11-25 Richard Biener * regset.h (REG_SET_EMPTY_P): New macro. * cfgcleanup.c (thread_jump): Use REG_SET_EMPTY_P. 2021-11-25 Martin Liska * doc/invoke.texi: Use @option for -Wuninitialized. 2021-11-25 Aldy Hernandez PR tree-optimization/103254 * gimple-range-path.cc (path_range_query::compute_ranges): Move exported boolean code... (path_range_query::compute_imports): ...here. 2021-11-25 Aldy Hernandez PR tree-optimization/103254 * gimple-range-path.cc (path_range_query::compute_ranges_defined): New (path_range_query::compute_ranges_in_block): Move to compute_ranges_defined. * gimple-range-path.h (compute_ranges_defined): New. 2021-11-25 Jakub Jelinek PR tree-optimization/103417 * match.pd ((X & Y) CMP 0): Only handle eq and ne. Commonalize common tests. 2021-11-25 Jakub Jelinek PR tree-optimization/103376 * gimple-ssa-store-merging.c (perform_symbolic_merge): For BIT_IOR_EXPR, if masked1 && masked2 && masked1 != masked2, don't punt, but set the corresponding result byte to MARKER_BYTE_UNKNOWN. For BIT_XOR_EXPR similarly and if masked1 == masked2 and the byte isn't MARKER_BYTE_UNKNOWN, set the corresponding result byte to 0. 2021-11-25 Jakub Jelinek PR c++/102611 * doc/invoke.texi (-Wcomma-subscript): Document that for -std=c++20 the option isn't enabled by default with -Wno-deprecated but for -std=c++23 it is. 2021-11-24 Jan Hubicka * ipa-modref.c (implicit_eaf_flags_for_edge_and_arg): Break out from... (modref_merge_call_site_flags): ... here. (ipa_merge_modref_summary_after_inlining): Use it. 2021-11-24 Thomas Schwinge * cfgloop.c (verify_loop_structure): Reduce scope of 'class loop *loop' variable. * ipa-fnsummary.c (analyze_function_body): Likewise. * loop-init.c (fix_loop_structure): Likewise. * loop-invariant.c (calculate_loop_reg_pressure): Likewise. * predict.c (predict_loops): Likewise. * tree-loop-distribution.c (loop_distribution::execute): Likewise. * tree-vectorizer.c (pass_vectorize::execute): Likewise. 2021-11-24 Andrew MacLeod PR tree-optimization/103231 * gimple-range.cc (gimple_ranger::gimple_ranger): Create stmt stack. (gimple_ranger::gimple_ranger): Delete stmt stack. (gimple_ranger::range_of_stmt): Process depenedencies if they have no global cache entry. (gimple_ranger::prefill_name): New. (gimple_ranger::prefill_stmt_dependencies): New. * gimple-range.h (class gimple_ranger): Add prototypes. 2021-11-24 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::get_global_range): Always return a range, return if it came from the cache or not. (get_non_stale_global_range): Rename to get_global_range, and return the temporal state in a flag. * gimple-range-cache.h (get_non_stale_global_range): Rename and adjust. * gimple-range.cc (gimple_ranger::range_of_expr): No need to query get_global_range. (gimple_ranger::range_of_stmt): Adjust for global cache temporal state returned in a flag. 2021-11-24 Andrew MacLeod * gimple-range.cc (gimple_ranger::range_on_edge): Call trailer when a constant is encountered to terminate the trace. 2021-11-24 Maciej W. Rozycki PR middle-end/103059 * reload.c (find_reloads_address_1): Also accept the ASHIFT form of indexed addressing. (find_reloads): Adjust accordingly. 2021-11-24 Richard Biener Jan Hubicka PR tree-optimization/103168 * ipa-modref.h (struct modref_summary): Add load_accesses. * ipa-modref.c (modref_summary::finalize): Initialize load_accesses. * tree-ssa-sccvn.c (visit_reference_op_call): Use modref info to walk the virtual use->def chain to CSE const/pure function calls possibly reading from memory. 2021-11-24 Thomas Schwinge PR middle-end/103244 * gimplify.c (gimplify_adjust_omp_clauses): Restore previous OpenACC behavior. 2021-11-24 Richard Biener PR middle-end/103193 * match.pd: Avoid canonicalizing (le/ge @0 @0) to (eq @0 @0) with NaNs and -ftrapping-math. 2021-11-24 Jakub Jelinek PR middle-end/103384 * omp-general.c (omp_context_selector_matches): For ACCEL_COMPILER, return 0 for kind(host) and continue for kind(nohost). 2021-11-24 Jakub Jelinek PR middle-end/103365 * attribs.h (lookup_attribute): Allow attr_name to start with underscore, as long as canonicalize_attr_name returns false. (lookup_attribute_by_prefix): Don't call get_attribute_name twice. * attribs.c (extract_attribute_substring): Reimplement using canonicalize_attr_name. (register_scoped_attribute): Change gcc_assert into gcc_checking_assert, verify !canonicalize_attr_name rather than that str.str doesn't start with '_'. 2021-11-24 Jakub Jelinek PR tree-optimization/103376 * gimple-ssa-store-merging.c (perform_symbolic_merge): Add CODE argument. If CODE is not BIT_IOR_EXPR, ensure that one of masked1 or masked2 is 0. (find_bswap_or_nop_1, find_bswap_or_nop, imm_store_chain_info::try_coalesce_bswap): Adjust perform_symbolic_merge callers. 2021-11-24 Richard Biener * tree-ssa-loop-ivopts.c (find_givs): Take loop body as argument instead of re-computing it. (find_interesting_uses): Likewise. (find_induction_variables): Pass through loop body. (tree_ssa_iv_optimize_loop): Pass down loop body. 2021-11-24 Tamar Christina * tree-ssa-phiopt.c (spaceship_replacement): Handle new canonical codegen. 2021-11-24 Tamar Christina * tree.c (bitmask_inv_cst_vector_p): New. * tree.h (bitmask_inv_cst_vector_p): New. * match.pd: Use it in new bitmask compare pattern. 2021-11-24 Jason Merrill * timevar.h (class auto_cond_timevar): New. 2021-11-24 Hongtao Liu H.J. Lu PR tree-optimization/103194 * match.pd (gimple_nop_atomic_bit_test_and_p): Extended to match truncation. * tree-ssa-ccp.c (gimple_nop_convert): Declare. (optimize_atomic_bit_test_and): Enhance optimize_atomic_bit_test_and to handle truncation. 2021-11-23 Martin Sebor PR middle-end/88232 * Makefile.in (OBJS): Add gimple-warn-recursion.o. * common.opt: Add -Winfinite-recursion. * doc/invoke.texi (-Winfinite-recursion): Document. * passes.def (pass_warn_recursion): Schedule a new pass. * tree-pass.h (make_pass_warn_recursion): Declare. * gimple-warn-recursion.c: New file. 2021-11-23 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Change error messages for ENB_P8V and ENB_P9V. 2021-11-23 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power6-64 stanza. Move CMPB to power6-64 stanza. * config/rs6000/rs6000-call.c (rs6000_invalid_new_builtin): Handle ENB_P6_64 case. (rs6000_new_builtin_is_supported): Likewise. (rs6000_expand_new_builtin): Likewise. Clean up formatting. (rs6000_init_builtins): Handle ENB_P6_64 case. * config/rs6000/rs6000-gen-builtins.c (bif_stanza): Add BSTZ_P6_64. (stanza_map): Add entry mapping power6-64 to BSTZ_P6_64. (enable_string): Add "ENB_P6_64". (write_decls): Add ENB_P6_64 to bif_enable enum. 2021-11-23 Jan Hubicka * ipa-modref-tree.h (struct modref_tree): Remove max_bases, max_refs and max_accesses. (modref_tree::modref_tree): Remove parametr. (modref_tree::insert_base): Add max_bases parameter. (modref_tree::insert): Add max_bases, max_refs, max_accesses parameters. (modref_tree::insert): New member function. (modref_tree::merge): Add max_bases, max_refs, max_accesses parameters. (modref_tree::insert): New member function. * ipa-modref-tree.c (test_insert_search_collapse): Update. (test_merge): Update. * ipa-modref.c (dump_records): Don't dump max_refs and max_bases. (dump_lto_records): Likewise. (modref_summary::finalize): Fix whitespace. (get_modref_function_summary): Likewise. (modref_access_analysis::record_access): Update. (modref_access_analysis::record_access_lto): Update. (modref_access_analysis::process_fnspec): Update. (analyze_function): Update. (modref_summaries::duplicate): Update. (modref_summaries_lto::duplicate): Update. (write_modref_records): Update. (read_modref_records): Update. (read_section): Update. (propagate_unknown_call): Update. (modref_propagate_in_scc): Update. (ipa_merge_modref_summary_after_inlining): Update. 2021-11-23 Martin Liska * doc/invoke.texi: Remove 2 more duplicite param descriptions. 2021-11-23 Richard Biener PR tree-optimization/103361 * gimple-loop-jam.c (adjust_unroll_factor): Use lambda_int for the dependence distance. * tree-data-ref.c (print_lambda_vector): Properly print a lambda_int. 2021-11-23 Jakub Jelinek * tree-inline.h (struct copy_body_data): Remove transform_lang_insert_block member. * tree-inline.c (remap_block): Don't call id->transform_lang_insert_block. (optimize_inline_calls, copy_gimple_seq_and_replace_locals, tree_function_versioning, maybe_inline_call_in_expr, copy_fn): Don't initialize id.transform_lang_insert_block. * gimplify.c (gimplify_omp_loop): Likewise. 2021-11-23 Jan Hubicka PR tree-optimization/103335 * tree-ssa-dse.c (valid_ao_ref_for_dse): Rename to ... (valid_ao_ref_kill_for_dse): ... this; do not check that boundaries are divisible by BITS_PER_UNIT. (get_byte_aligned_range_containing_ref): New function. (get_byte_aligned_range_contained_in_ref): New function. (normalize_ref): Rename to ... (get_byte_range): ... this one; handle accesses not aligned to byte boundary; return range in bytes rater than updating ao_ref. (clear_live_bytes_for_ref): Take write ref by reference; simplify using get_byte_access. (setup_live_bytes_from_ref): Likewise. (clear_bytes_written_by): Update. (live_bytes_read): Update. (dse_classify_store): Simplify tech before live_bytes_read checks. 2021-11-23 Andrew Pinski PR tree-optimization/102216 * gimple-fold.c (fold_stmt_1): Add canonicalization of "&MEM[ssa_n, CST]" to "ssa_n p+ CST", note this can only be done if !in_place. 2021-11-23 Jakub Jelinek PR middle-end/102431 * gimplify.c (replace_reduction_placeholders): Remove. (note_no_context_vars): New function. (gimplify_omp_loop): For OMP_PARALLEL's BIND_EXPR create a new BLOCK. Use copy_tree_body_r with walk_tree instead of unshare_expr and replace_reduction_placeholders for duplication of OMP_CLAUSE_REDUCTION_{INIT,MERGE} expressions. Ensure all mentioned automatic vars have DECL_CONTEXT set to non-NULL before doing so and reset it afterwards for those vars and their corresponding vars. 2021-11-23 Haochen Gui PR target/100868 * config/rs6000/altivec.md (altivec_vreve2 for VEC_K): Use xxbrq for v16qi, xxbrq + xxbrh for v8hi and xxbrq + xxbrw for v4si or v4sf when p9_vector is set. (altivec_vreve2 for VEC_64): Defined. Implemented by xxswapd. 2021-11-23 Navid Rahimi PR tree-optimization/102232 * match.pd (x * (1 + y / x) - y) -> (x - y % x): New optimization. 2021-11-23 Navid Rahimi PR tree-optimization/96779 * match.pd (-x == x) -> (x == 0): New optimization. 2021-11-22 Roger Sayle PR tree-optimization/98953 PR tree-optimization/103345 * gimple-ssa-store-merging.c (find_bswap_or_nop_1): Handle BIT_XOR_EXPR and PLUS_EXPR the same as BIT_IOR_EXPR. (pass_optimize_bswap::execute): Likewise. 2021-11-22 Martin Liska * doc/invoke.texi: Remove duplicate documentation for 3 params. 2021-11-22 Richard Biener PR tree-optimization/103351 * tree-ssa-dce.c (sort_phi_args): Sort after e->dest_idx as second key. 2021-11-22 liuhongt PR target/103275 * config/i386/constraints.md (Bk): New define_memory_constraint. * config/i386/i386-protos.h (ix86_gpr_tls_address_pattern_p): Declare. * config/i386/i386.c (ix86_gpr_tls_address_pattern_p): New function. * config/i386/i386.md (*movsi_internal): Don't allow mask/sse/mmx move in TLS code sequences. (*movdi_internal): Ditto. 2021-11-22 Kewen Lin * config/xtensa/xtensa.md (movdi_internal, movdf_internal): Fix split condition. 2021-11-21 Jakub Jelinek PR c++/101180 * config/i386/i386-options.c (ix86_valid_target_attribute_p): If fndecl already has DECL_FUNCTION_SPECIFIC_TARGET, use that as base instead of target_option_default_node. 2021-11-21 Jan Hubicka PR ipa/103227 * ipa-modref.c (parm_map_for_arg): Rename to ... (parm_map_for_ptr): .. this one; handle static chain and calls to malloc functions. (modref_access_analysis::get_access): Use parm_map_for_ptr. (modref_access_analysis::process_fnspec): Update. (modref_access_analysis::analyze_load): Update. (modref_access_analysis::analyze_store): Update. 2021-11-21 Jan Hubicka * ipa-modref.c (ignore_nondeterminism_p): Move earlier in source code. (ignore_retval_p): Likewise. (ignore_stores_p): Likewise. (parm_map_for_arg): Likewise. (class modref_access_analysis): New class. (modref_access_analysis::set_side_effects): New member function. (modref_access_analysis::set_nondeterministic): New member function. (get_access): Turn to ... (modref_access_analysis::get_access): ... this one. (record_access): Turn to ... (modref_access_analysis::record_access): ... this one. (record_access_lto): Turn to ... (modref_access_analysis::record_access_lto): ... This one. (record_access_p): Turn to ... (modref_access_analysis::record_access_p): ... This one (modref_access_analysis::record_unknown_load): New member function. (modref_access_analysis::record_unknown_store): New member function. (get_access_for_fnspec): Turn to ... (modref_access_analysis::get_access_for_fnspec): ... this one. (merge_call_side_effects): Turn to ... (moderf_access_analysis::merge_call_side_effects): Turn to ... (collapse_loads): Move later in source code. (collapse_stores): Move later in source code. (process_fnspec): Turn to ... (modref_access_analysis::process_fnspec): ... this one. (analyze_call): Turn to ... (modref_access_analysis::analyze_call): ... this one. (struct summary_ptrs): Remove. (analyze_load): Turn to ... (modref_access_analysis::analyze_load): ... this one. (analyze_store): Turn to ... (modref_access_analysis::analyze_store): ... this one. (analyze_stmt): Turn to ... (modref_access_analysis::analyze_stmt): ... This one. (remove_summary): Remove. (modref_access_analysis::propagate): Break out from ... (modref_access_analysis::analyze): Break out from ... (analyze_function): ... here. 2021-11-21 Roger Sayle Robin Dapp PR target/102117 * tree-ssa-math-opts.c (convert_mult_to_widen): Recognize signed WIDEN_MULT_EXPR if the target supports umul_widen_optab. 2021-11-20 Jan Hubicka PR ipa/103052 * ipa-modref.c (ignore_nondeterminism_p): Allow looping pure/cont. (merge_call_side_effects): Improve debug output. 2021-11-20 Jan Hubicka PR ipa/103052 * ipa-pure-const.c (propagate_pure_const): Fix merging of loping flag. 2021-11-20 Jeff Law PR tree-optimization/103226 * config/bfin/bfin.md (doloop pattern, splitter and expander): Clobber CC. 2021-11-20 Andrew Pinski PR tree-optimization/103220 * match.pd ((type) X bitop CST): Don't check if CST fits into the type if only the sign changes. 2021-11-20 Alexandre Oliva PR tree-optimization/102988 * gimple-harden-conditionals.cc (detach_value): Copy SSA_NAME without decl sharing. 2021-11-19 Iain Sandoe * doc/invoke.texi: Remove whitespace after an @option. 2021-11-19 Paul A. Clarke * config/rs6000/emmintrin.h (_mm_sad_epu8): Use vec_absd when _ARCH_PWR9, optimize vec_sum2s when LE. 2021-11-19 Iain Sandoe PR target/80556 * config/darwin-driver.c (darwin_driver_init): Handle exported symbols and symbol lists (suppress automatic export of the TLS symbols). * config/darwin.c (darwin_rename_builtins): Remove workaround. * config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise. (REAL_LIBGCC_SPEC): Handle revised library uses. * config/darwin.opt (nodefaultexport): New. * config/i386/darwin.h (PR80556_WORKAROUND): Remove. * config/i386/darwin32-biarch.h (PR80556_WORKAROUND): Likewise. * config/i386/darwin64-biarch.h (PR80556_WORKAROUND): Likewise. 2021-11-19 Martin Jambor * opts.c (default_options_table): Switch off flag_semantic_interposition at Ofast. * doc/invoke.texi (Optimize Options): Document that Ofast switches off -fsemantic-interposition. 2021-11-19 Jan Hubicka * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Do not guard modref by !gimple_call_chain. 2021-11-19 Martin Sebor PR c++/33925 PR c/102867 * doc/invoke.texi (-Waddress): Update. 2021-11-19 Andrew MacLeod PR tree-optimization/103254 * gimple-range-gori.cc (range_def_chain::get_def_chain): Limit the depth for all statements with multple ssa names. 2021-11-19 Stefan Schulze Frielinghaus * config/s390/s390.md (define_peephole2): Variable insn points to the first matched insn. Use peep2_next_insn(1) to refer to the second matched insn. 2021-11-19 Tamar Christina PR tree-optimization/103311 PR target/103330 * tree-vect-slp-patterns.c (vect_validate_multiplication): Fix CONJ test to new codegen. (complex_mul_pattern::matches): Move check downwards. 2021-11-19 Martin Liska Revert: 2021-11-19 Martin Liska * cfgexpand.c (pass_expand::execute): Use option directly. * function.c (allocate_struct_function): Likewise. * gimple-low.c (lower_function_body): Likewise. (lower_stmt): Likewise. * gimple-ssa-backprop.c (backprop::prepare_change): Likewise. * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): Likewise. * ipa-split.c (split_function): Likewise. * lto-streamer-in.c (input_function): Likewise. * sese.c (sese_insert_phis_for_liveouts): Likewise. * ssa-iterators.h (num_imm_uses): Likewise. * tree-cfg.c (make_blocks): Likewise. (gimple_merge_blocks): Likewise. * tree-inline.c (tree_function_versioning): Likewise. * tree-loop-distribution.c (generate_loops_for_partition): Likewise. * tree-sra.c (analyze_access_subtree): Likewise. * tree-ssa-dce.c (remove_dead_stmt): Likewise. * tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise. * tree-ssa-phiopt.c (spaceship_replacement): Likewise. * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise. * tree-ssa-tail-merge.c (tail_merge_optimize): Likewise. * tree-ssa-threadedge.c (propagate_threaded_block_debug_into): Likewise. * tree-ssa.c (gimple_replace_ssa_lhs): Likewise. (target_for_debug_bind): Likewise. (insert_debug_temp_for_var_def): Likewise. (insert_debug_temps_for_defs): Likewise. (reset_debug_uses): Likewise. * tree-ssanames.c (release_ssa_name_fn): Likewise. * tree-vect-loop-manip.c (adjust_vec_debug_stmts): Likewise. (adjust_debug_stmts): Likewise. (adjust_phi_and_debug_stmts): Likewise. (vect_do_peeling): Likewise. * tree-vect-loop.c (vect_transform_loop_stmt): Likewise. (vect_transform_loop): Likewise. * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Remove (MAY_HAVE_DEBUG_BIND_STMTS): Remove. (MAY_HAVE_DEBUG_STMTS): Use options directly. 2021-11-19 Giuliano Belinassi * gcc.c (process_command): Skip dumpdir override if file is a not_actual_file_p. * doc/invoke.texi: Update -dumpdir documentation. 2021-11-19 Andrew Pinski PR tree-optimization/103314 * match.pd ((type) X op CST): Restrict the equal TYPE_PRECISION case to GIMPLE only. 2021-11-19 Martin Liska PR ipa/103230 * ipa-modref-tree.h (struct modref_parm_map): Add default constructor. * ipa-modref.c (ipa_merge_modref_summary_after_inlining): Use it. 2021-11-19 Richard Biener PR middle-end/103248 * tree-eh.c (operation_could_trap_helper_p): Properly handle fixed-point RDIV_EXPR. 2021-11-19 Richard Biener PR tree-optimization/102436 * tree-ssa-loop-im.c (execute_sm_if_changed): Add mode to just create the if structure and return the then block. (execute_sm): Add flag to indicate the var will re-use another flag var. (hoist_memory_references): Support a single conditional block with all stores as special case. 2021-11-19 Andrew Pinski PR tree-optimization/103317 * tree-ssa-phiopt.c (minmax_replacement): For the non empty middle bb case, check to make sure it has a single predecessor. 2021-11-19 Andrew Pinski PR tree-optimization/103257 * match.pd ((m1 >/=/<= m2) * d -> (m1 >/=/<= m2) ? d : 0): Disable until !canonicalize_math_p (). 2021-11-19 Marek Polacek PR c++/19808 PR c++/96121 * doc/invoke.texi: Update documentation for -Wuninitialized. * tree.c (stabilize_reference): Set location. 2021-11-19 liuhongt PR target/102543 * config/i386/x86-tune-costs.h (skylake_cost): Reduce cost of storing 256/512-bit SSE register to be equal to cost of unaligned store to avoid odd alignment peeling. (icelake_cost): Ditto. 2021-11-18 David Edelsohn * config/rs6000/predicates.md (current_file_function_operand): Add flag_semantic_interposition to call of decl_replaceable_p. 2021-11-18 Martin Liska * ipa-modref.c (analyze_function): Do not execute the code only if dump_file != NULL. 2021-11-18 Martin Liska * ipa-modref.c (analyze_function): Use fnode instead of repeated cgraph_node::get (current_function_decl). 2021-11-18 Jan Hubicka * cgraph.c (cgraph_node::get_availability): Update call of decl_replaceable_p. (cgraph_node::verify_node): Verify that semantic_interposition flag is set correclty. * cgraph.h: (symtab_node): Add semantic_interposition flag. * cgraphclones.c (set_new_clone_decl_and_node_flags): Clear semantic_interposition flag. * cgraphunit.c (cgraph_node::finalize_function): Set semantic_interposition flag. (cgraph_node::add_new_function): Likewise. (varpool_node::finalize_decl): Likewise. (cgraph_node::create_wrapper): Likewise. * common.opt (fsemantic-interposition): Turn to optimization node. * lto-cgraph.c (lto_output_node): Stream semantic_interposition. (lto_output_varpool_node): Likewise. (input_overwrite_node): Likewise. (input_varpool_node): Likewise. * symtab.c (symtab_node::dump_base): Dump new flag. * varasm.c (decl_replaceable_p): Add semantic_interposition_p parameter. * varasm.h (decl_replaceable_p): Update declaration. * varpool.c (varpool_node::ctor_useable_for_folding_p): Use semantic_interposition flag. (varpool_node::get_availability): Likewise. (varpool_node::create_alias): Copy semantic_interposition flag. 2021-11-18 Jan Hubicka PR ipa/103266 * ipa-modref.c (modref_eaf_analysis::merge_call_lhs_flags): Unused parameter may still be returned. (modref_eaf_analysis::analyze_ssa_name): Call merge_call_lhs_flags even for unused function args. 2021-11-18 Tamar Christina PR tree-optimization/103311 * tree-vect-slp-patterns.c (complex_mul_pattern::matches, complex_fms_pattern::matches): Check for multiplications. 2021-11-18 H.J. Lu PR target/102952 * config/i386/i386.c (ix86_output_jmp_thunk_or_indirect): Emit CS prefix for -mindirect-branch-cs-prefix. (ix86_output_indirect_branch_via_reg): Likewise. * config/i386/i386.opt: Add -mindirect-branch-cs-prefix. * doc/invoke.texi: Document -mindirect-branch-cs-prefix. 2021-11-18 David Edelsohn * config/rs6000/driver-rs6000.c (detect_processor_aix): Add power10. 2021-11-18 Tamar Christina PR tree-optimization/103253 * tree-ssa-math-opts.c (convert_mult_to_fma): Check for LHS. 2021-11-18 Matthias Kretz * doc/extend.texi: Document __builtin_assoc_barrier. 2021-11-18 Martin Liska * cfgexpand.c (pass_expand::execute): Use option directly. * function.c (allocate_struct_function): Likewise. * gimple-low.c (lower_function_body): Likewise. (lower_stmt): Likewise. * gimple-ssa-backprop.c (backprop::prepare_change): Likewise. * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): Likewise. * ipa-split.c (split_function): Likewise. * lto-streamer-in.c (input_function): Likewise. * sese.c (sese_insert_phis_for_liveouts): Likewise. * ssa-iterators.h (num_imm_uses): Likewise. * tree-cfg.c (make_blocks): Likewise. (gimple_merge_blocks): Likewise. * tree-inline.c (tree_function_versioning): Likewise. * tree-loop-distribution.c (generate_loops_for_partition): Likewise. * tree-sra.c (analyze_access_subtree): Likewise. * tree-ssa-dce.c (remove_dead_stmt): Likewise. * tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise. * tree-ssa-phiopt.c (spaceship_replacement): Likewise. * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise. * tree-ssa-tail-merge.c (tail_merge_optimize): Likewise. * tree-ssa-threadedge.c (propagate_threaded_block_debug_into): Likewise. * tree-ssa.c (gimple_replace_ssa_lhs): Likewise. (target_for_debug_bind): Likewise. (insert_debug_temp_for_var_def): Likewise. (insert_debug_temps_for_defs): Likewise. (reset_debug_uses): Likewise. * tree-ssanames.c (release_ssa_name_fn): Likewise. * tree-vect-loop-manip.c (adjust_vec_debug_stmts): Likewise. (adjust_debug_stmts): Likewise. (adjust_phi_and_debug_stmts): Likewise. (vect_do_peeling): Likewise. * tree-vect-loop.c (vect_transform_loop_stmt): Likewise. (vect_transform_loop): Likewise. * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Remove (MAY_HAVE_DEBUG_BIND_STMTS): Remove. (MAY_HAVE_DEBUG_STMTS): Use options directly. 2021-11-18 Richard Biener PR tree-optimization/103277 * tree-ssa-dse.c (need_ab_cleanup): New. (dse_optimize_redundant_stores): Adjust. (delete_dead_or_redundant_assignment): Get extra need_ab_cleanup argument and set when abnormal cleanup is needed. (dse_optimize_call): Adjust. (dse_optimize_stmt): Likewise. (pass_dse::execute): Allocate and deallocate need_ab_cleanup. Perform abnormal cleanup. * tree-ssa-dse.h (delete_dead_or_redundant_assignment): Adjust. 2021-11-18 Hongyu Wang * config/i386/i386-expand.c (ix86_expand_atomic_fetch_op_loop): Adjust generated cfg to avoid infinite loop. 2021-11-18 konglin1 * config/i386/avx512fp16intrin.h (_mm512_mul_pch): Add alias for _mm512_fmul_pch. (_mm512_mask_mul_pch): Likewise. (_mm512_maskz_mul_pch): Likewise. (_mm512_mul_round_pch): Likewise. (_mm512_mask_mul_round_pch): Likewise. (_mm512_maskz_mul_round_pch): Likewise. (_mm512_cmul_pch): Likewise. (_mm512_mask_cmul_pch): Likewise. (_mm512_maskz_cmul_pch): Likewise. (_mm512_cmul_round_pch): Likewise. (_mm512_mask_cmul_round_pch): Likewise. (_mm512_maskz_cmul_round_pch): Likewise. (_mm_mul_sch): Likewise. (_mm_mask_mul_sch): Likewise. (_mm_maskz_mul_sch): Likewise. (_mm_mul_round_sch): Likewise. (_mm_mask_mul_round_sch): Likewise. (_mm_maskz_mul_round_sch): Likewise. (_mm_cmul_sch): Likewise. (_mm_mask_cmul_sch): Likewise. (_mm_maskz_cmul_sch): Likewise. (_mm_cmul_round_sch): Likewise. (_mm_mask_cmul_round_sch): Likewise. (_mm_maskz_cmul_round_sch): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_mul_pch): Likewise. (_mm_mask_mul_pch): Likewise. (_mm_maskz_mul_pch): Likewise. (_mm256_mul_pch): Likewise. (_mm256_mask_mul_pch): Likewise. (_mm256_maskz_mul_pch): Likewise. (_mm_cmul_pch): Likewise. (_mm_mask_cmul_pch): Likewise. (_mm_maskz_cmul_pch): Likewise. (_mm256_cmul_pch): Likewise. (_mm256_mask_cmul_pch): Likewise. (_mm256_maskz_cmul_pch): Likewise. 2021-11-17 Andrew Pinski PR tree-optimization/103228 PR tree-optimization/55177 * match.pd ((type) X bitop CST): Also do this transformation for nop conversions. 2021-11-17 Martin Sebor PR tree-optimization/102759 * gimple-array-bounds.cc (build_printable_array_type): Move... * gimple-ssa-warn-access.cc (build_printable_array_type): Avoid pathological function redeclarations that remove a previously declared prototype. Improve formatting of function arguments in informational notes. * pointer-query.cc (build_printable_array_type): ...to here. * pointer-query.h (build_printable_array_type): Declared. 2021-11-17 H.J. Lu PR target/102952 * config/i386/i386-opts.h (harden_sls): New enum. * config/i386/i386.c (output_indirect_thunk): Mitigate against SLS for function return. (ix86_output_function_return): Likewise. (ix86_output_jmp_thunk_or_indirect): Mitigate against indirect branch. (ix86_output_indirect_jmp): Likewise. (ix86_output_call_insn): Likewise. * config/i386/i386.opt: Add -mharden-sls=. * doc/invoke.texi: Document -mharden-sls=. 2021-11-17 H.J. Lu PR target/103307 * config/i386/i386.c (ix86_code_end): Remove "%!" before ret. (ix86_output_function_return): Likewise. * config/i386/i386.md (simple_return_pop_internal): Likewise. 2021-11-17 Jan Hubicka PR ipa/103246 * ipa-modref.c (read_modref_records): Fix streaminig in of every_access flag. 2021-11-17 Uroš Bizjak * config/i386/i386.c (indirect_thunks_used): Redefine as HARD_REG_SET. (ix86_code_end): Use TEST_HARD_REG_BIT on indirect_thunks_used. (ix86_output_indirect_branch_via_reg): Use SET_HARD_REG_BIT on indirect_thunks_used. (ix86_output_indirect_function_return): Ditto. 2021-11-17 Jan Hubicka * ipa-modref-tree.c: Include cgraph.h and tree-streamer.h. (modref_access_node::stream_out): New member function. (modref_access_node::stream_in): New member function. * ipa-modref-tree.h (modref_access_node::stream_out, modref_access_node::stream_in): Declare. * ipa-modref.c (modref_summary_lto::useful_p): Free useless kills. (modref_summary_lto::dump): Dump kills. (analyze_store): Record kills for LTO (analyze_stmt): Likewise. (modref_summaries_lto::duplicate): Duplicate kills. (write_modref_records): Use new stream_out member function. (read_modref_records): Likewise. (modref_write): Stream out kills. (read_section): Stream in kills (remap_kills): New function. (update_signature): Use it. 2021-11-17 Uroš Bizjak * config/i386/i386.h (LEGACY_SSE_REGNO_P): New predicate. (SSE_REGNO_P): Use LEGACY_SSE_REGNO_P predicate. * config/i386/i386.c (zero_all_vector_registers): Use LEGACY_SSE_REGNO_P predicate. (ix86_register_priority): Use REX_INT_REGNO_P, REX_SSE_REGNO_P and EXT_REG_SSE_REGNO_P predicates. (ix86_hard_regno_call_part_clobbered): Use REX_SSE_REGNO_P and LEGACY_SSE_REGNO_P predicates. 2021-11-17 Jason Merrill * doc/invoke.texi (C++ Dialect Options): Document -fimplicit-constexpr. 2021-11-17 Przemyslaw Wirkus * config/aarch64/aarch64-modes.def (VECTOR_MODE): New V8DI mode. * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Handle V8DImode. * config/aarch64/iterators.md (define_mode_attr nunits): Add entry for V8DI. 2021-11-17 Martin Uecker PR c/91038 PR c/29970 * gimplify.c (gimplify_var_or_parm_decl): Update comment. (gimplify_compound_lval): Gimplify base expression first. (gimplify_target_expr): Add comment. 2021-11-17 Jakub Jelinek PR tree-optimization/103192 * tree-ssa-loop-im.c (move_computations_worker): Use reset_flow_sensitive_info instead of manually clearing SSA_NAME_RANGE_INFO and do it for all SSA_NAMEs, not just ones with integral types. 2021-11-17 Jakub Jelinek PR tree-optimization/103255 * gimple-range-fold.cc (fold_using_range::range_of_address): Return range_nonzero rather than unadjusted base's range. Formatting fixes. 2021-11-17 Richard Sandiford * doc/md.texi (cond_fmin@var{mode}, cond_fmax@var{mode}): Document. * optabs.def (cond_fmin_optab, cond_fmax_optab): New optabs. * internal-fn.def (COND_FMIN, COND_FMAX): New functions. * internal-fn.c (first_commutative_argument): Handle them. (FOR_EACH_COND_FN_PAIR): Likewise. * match.pd (UNCOND_BINARY, COND_BINARY): Likewise. * config/aarch64/aarch64-sve.md (cond_): New pattern. 2021-11-17 Kewen Lin * config/i386/i386.md (*add3_doubleword, *addv4_doubleword, *addv4_doubleword_1, *sub3_doubleword, *subv4_doubleword, *subv4_doubleword_1, *add3_doubleword_cc_overflow_1, *divmodsi4_const, *neg2_doubleword, *tls_dynamic_gnu2_combine_64_): Fix split condition. 2021-11-17 Andrew Pinski PR tree-optimization/103288 * tree-ssa-phiopt.c (value_replacement): Return early if middle block has more than one pred. 2021-11-17 Kewen Lin * config/visium/visium.md (*add3_insn, *addsi3_insn, *addi3_insn, *sub3_insn, *subsi3_insn, *subdi3_insn, *neg2_insn, *negdi2_insn, *and3_insn, *ior3_insn, *xor3_insn, *one_cmpl2_insn, *ashl3_insn, *ashr3_insn, *lshr3_insn, *trunchiqi2_insn, *truncsihi2_insn, *truncdisi2_insn, *extendqihi2_insn, *extendqisi2_insn, *extendhisi2_insn, *extendsidi2_insn, *zero_extendqihi2_insn, *zero_extendqisi2_insn, *zero_extendsidi2_insn): Fix split condition. 2021-11-17 Marek Polacek PR preprocessor/103026 * doc/invoke.texi: Document -Wbidi-chars. 2021-11-17 Jan Hubicka PR ipa/103246 * ipa-modref.c (ipa_merge_modref_summary_after_inlining): Fix clearing of to_info_lto 2021-11-16 Jan Hubicka * ipa-modref.c (get_modref_function_summary): Declare. * ipa-modref.h (get_modref_function_summary): New function. * tree-ssa-dse.c (clear_live_bytes_for_ref): Break out from ... (clear_bytes_written_by): ... here; also clear memory killed by calls. 2021-11-16 Iain Sandoe * ggc-common.c (gt_pch_save): If we cannot find a suitable memory segment for save, then error-out, do not try to continue. (gt_pch_restore): Save the existing line table, and when the replacement is being read, use that when constructing diagnostics. 2021-11-16 Peter Bergner PR target/102976 * config/rs6000/mma.md (*vsx_assemble_pair): Add early-clobber for output operand. (*mma_assemble_acc): Likewise. 2021-11-16 Martin Sebor PR tree-optimization/102960 * gimple-fold.c (get_range_strlen): Take bitmap as an argument rather than a pointer to it. (get_range_strlen_tree): Same. Remove bitmap allocation. Use an auto_bitmap. (get_maxval_strlen): Use an auto_bitmap. * tree-ssa-strlen.c (get_range_strlen_dynamic): Factor out PHI handling... (get_range_strlen_phi): ...into this function. Avoid assuming maximum string length is constant (printf_strlen_execute): Dump pointer query cache contents when details are requisted. 2021-11-16 Jason Merrill * langhooks.h (struct lang_hooks): Adjust comment. * print-tree.c (print_node): Also call print_xnode hook for tcc_constant class. 2021-11-16 Andrew Pinski PR tree-optimization/103218 * match.pd: New pattern for "((type)(a<0)) << SIGNBITOFA". 2021-11-16 Claudiu Zissulescu * config/arc/arc.md (maddhisi4): Use a single move to accumulator. (umaddhisi4): Likewise. (machi): Update pattern. (umachi): Likewise. 2021-11-16 Richard Biener PR tree-optimization/102880 * tree-ssa-dce.c (sort_phi_args): New function. (make_forwarders_with_degenerate_phis): Likewise. (perform_tree_ssa_dce): Call make_forwarders_with_degenerate_phis. 2021-11-16 Richard Biener PR tree-optimization/102880 * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Push single_pred (bb1) condition to places that really need it. (match_simplify_replacement): Likewise. (value_replacement): Likewise. (replace_phi_edge_with_variable): Deal with extra edges into the middle BB. 2021-11-16 Martin Jambor * cfgexpand.c (expand_gimple_basic_block): Use build_debug_expr_decl, add a fixme note about the mode assignment perhaps being unnecessary. * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): Likewise. (ipa_param_body_adjustments::mark_dead_statements): Likewise. (ipa_param_body_adjustments::reset_debug_stmts): Likewise. * tree-inline.c (remap_ssa_name): Likewise. (tree_function_versioning): Likewise. * tree-into-ssa.c (rewrite_debug_stmt_uses): Likewise. * tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise. * tree-ssa.c (insert_debug_temp_for_var_def): Likewise. 2021-11-16 Jakub Jelinek PR tree-optimization/103208 * omp-expand.c (expand_omp_build_cond): New function. (expand_omp_for_init_counts, expand_omp_for_init_vars, expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Use it. 2021-11-16 Jakub Jelinek PR tree-optimization/102009 * gimple-ssa-warn-access.cc (pass_waccess::check_alloc_size_call): Punt if any of alloc_size arguments is out of bounds vs. number of call arguments. 2021-11-16 Roger Sayle * config/i386/i386.md (*bmi2_rorx_1): Make conditional on !optimize_function_for_size_p. (*3_1): Add preferred_for_size attribute. (define_splits): Conditionalize on !optimize_function_for_size_p. (*bmi2_rorxsi3_1_zext): Likewise. (*si2_1_zext): Add preferred_for_size attribute. (define_splits): Conditionalize on !optimize_function_for_size_p. 2021-11-16 Jan Hubicka PR ipa/103262 * ipa-modref.c (merge_call_side_effects): Fix uninitialized access. 2021-11-16 Andrew Pinski PR tree-optimization/103245 * match.pd: Combine the abs pattern matching using multiplication. Adding optional nop_convert too. 2021-11-16 H.J. Lu PR middle-end/103268 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Add a missing return. 2021-11-15 Siddhesh Poyarekar * gimple-fold.c (gimple_fold_builtin_strncat): Use ranges to determine if it is safe to transform to strcat. (gimple_fold_builtin_snprintf): Likewise. 2021-11-15 Siddhesh Poyarekar * gimple-fold.c (known_lower): New function. (gimple_fold_builtin_strncat_chk, gimple_fold_builtin_memory_chk, gimple_fold_builtin_stxcpy_chk, gimple_fold_builtin_stxncpy_chk, gimple_fold_builtin_snprintf_chk, gimple_fold_builtin_sprintf_chk): Use it. 2021-11-15 Siddhesh Poyarekar * gimple-fold.c (dump_transformation): New function. (gimple_fold_builtin_stxcpy_chk, gimple_fold_builtin_stxncpy_chk): Use it. Simplify to BUILT_IN_STRNCPY if return value is not used. 2021-11-15 H.J. Lu PR middle-end/103184 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Check optab before transforming equivalent, but slighly different cases to their canonical forms. 2021-11-15 Iain Sandoe PR fortran/102992 * config/darwin.h (TARGET_DTORS_FROM_CXA_ATEXIT): New. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Add TARGET_DTORS_FROM_CXA_ATEXIT hook. * ipa.c (cgraph_build_static_cdtor_1): Return the built function decl. (build_cxa_atexit_decl): New. (build_dso_handle_decl): New. (build_cxa_dtor_registrations): New. (compare_cdtor_tu_order): New. (build_cxa_atexit_fns): New. (ipa_cdtor_merge): If dtors_from_cxa_atexit is set, process the DTORs/CTORs accordingly. (pass_ipa_cdtor_merge::gate): Also run if dtors_from_cxa_atexit is set. * target.def (dtors_from_cxa_atexit): New hook. 2021-11-15 Iain Sandoe * config.in: Regenerate. * configure: Regenerate. * configure.ac: Test ld64 for -platform-version support. 2021-11-15 Thomas Schwinge * diagnostic-spec.h (typedef xint_hash_t) (typedef xint_hash_map_t): Replace with... (typedef nowarn_map_t): ... this. (nowarn_map): Adjust. * diagnostic-spec.c (nowarn_map, suppress_warning_at): Likewise. 2021-11-15 Thomas Schwinge * profile.c (branch_prob): Use 'location_hash' for 'seen_locations'. 2021-11-15 Aldy Hernandez PR tree-optimization/103207 * value-range.cc (irange::set): Drop overflow. 2021-11-15 Jakub Jelinek * gimplify.c (optimize_target_teams): Only add OMP_CLAUSE_THREAD_LIMIT to OMP_TARGET_CLAUSES if it isn't there already. 2021-11-15 Aldy Hernandez * gimple-range-path.cc (path_range_query::internal_range_of_expr): Remove useless code. (path_range_query::ssa_defined_in_bb): New. (path_range_query::ssa_range_in_phi): Avoid fold_range call that could trigger additional lookups. Do not use the cache for ARGs defined in this block. (path_range_query::compute_ranges_in_block): Use ssa_defined_in_bb. (path_range_query::maybe_register_phi_relation): Same. (path_range_query::range_of_stmt): Adjust comment. * gimple-range-path.h (ssa_defined_in_bb): New. 2021-11-15 Aldy Hernandez * gimple-range-path.cc (path_range_query::internal_range_of_expr): Default to global range if nothing found. 2021-11-15 Richard Biener PR tree-optimization/103237 * tree-vect-loop.c (vect_is_simple_reduction): Fail for double reductions with multiple inner loop LC PHI nodes. 2021-11-15 Hongyu Wang PR target/103069 * config/i386/i386-expand.c (ix86_expand_atomic_fetch_op_loop): New expand function. * config/i386/i386-options.c (ix86_target_string): Add -mrelax-cmpxchg-loop flag. (ix86_valid_target_attribute_inner_p): Likewise. * config/i386/i386-protos.h (ix86_expand_atomic_fetch_op_loop): New expand function prototype. * config/i386/i386.opt: Add -mrelax-cmpxchg-loop. * config/i386/sync.md (atomic_fetch_): New expander for SI,HI,QI modes. (atomic__fetch): Likewise. (atomic_fetch_nand): Likewise. (atomic_nand_fetch): Likewise. (atomic_fetch_): New expander for DI,TI modes. (atomic__fetch): Likewise. (atomic_fetch_nand): Likewise. (atomic_nand_fetch): Likewise. * doc/invoke.texi: Document -mrelax-cmpxchg-loop. 2021-11-15 Richard Biener PR tree-optimization/103219 * gimple-loop-jam.c (tree_loop_unroll_and_jam): Use single_exit to determine the exit for the VN region. 2021-11-15 Prathamesh Kulkarni * tree-ssa-loop.c (pass_vectorize): Move to tree-vectorizer.c. (pass_data_vectorize): Likewise. (make_pass_vectorize): Likewise. * tree-vectorizer.c (vectorize_loops): Merge with pass_vectorize::execute and replace cfun occurences with fun param. (adjust_simduid_builtins): Add fun param, replace cfun occurences with fun, and adjust callers approrpiately. (note_simd_array_uses): Likewise. (vect_loop_dist_alias_call): Likewise. (set_uid_loop_bbs): Likewise. (vect_transform_loops): Likewise. (try_vectorize_loop_1): Likewise. (try_vectorize_loop): Likewise. 2021-11-15 Jakub Jelinek PR target/103205 * config/i386/sync.md (atomic_bit_test_and_set, atomic_bit_test_and_complement, atomic_bit_test_and_reset): Use OPTAB_WIDEN instead of OPTAB_DIRECT. 2021-11-15 Maciej W. Rozycki * config/vax/vax.c (vax_lra_p): New prototype and function. (TARGET_LRA_P): Wire it. * config/vax/vax.opt (mlra): New option. * doc/invoke.texi (Option Summary, VAX Options): Document the new option. 2021-11-14 Jan Hubicka * ipa-modref.h (struct modref_summary): Add nondeterministic and calls_interposable flags. * ipa-modref.c (modref_summary::modref_summary): Initialize new flags. (modref_summary::useful_p): Check new flags. (struct modref_summary_lto): Add nondeterministic and calls_interposable flags. (modref_summary_lto::modref_summary_lto): Initialize new flags. (modref_summary_lto::useful_p): Check new flags. (modref_summary::dump): Dump new flags. (modref_summary_lto::dump): Dump new flags. (ignore_nondeterminism_p): New function. (merge_call_side_effects): Merge new flags. (process_fnspec): Likewise. (analyze_load): Volatile access is nondeterministic. (analyze_store): Liekwise. (analyze_stmt): Volatile ASM is nondeterministic. (analyze_function): Clear new flags. (modref_summaries::duplicate): Duplicate new flags. (modref_summaries_lto::duplicate): Duplicate new flags. (modref_write): Stream new flags. (read_section): Stream new flags. (propagate_unknown_call): Update new flags. (modref_propagate_in_scc): Propagate new flags. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Check calls_interposable. * tree-ssa-structalias.c (determine_global_memory_access): Likewise. 2021-11-14 Maciej W. Rozycki * config/vax/vax.h (SET_RATIO): New macro. * config/vax/vax.md (UNSPEC_SETMEM_FILL): New constant. (setmemhi): New expander. (setmemhi1): New insn and splitter. (*setmemhi1): New insn. 2021-11-14 Jan Hubicka * ipa-modref-tree.c (modref_access_node::update_for_kills): New member function. (modref_access_node::merge_for_kills): Likewise. (modref_access_node::insert_kill): Likewise. * ipa-modref-tree.h (modref_access_node::update_for_kills, modref_access_node::merge_for_kills, modref_access_node::insert_kill): Declare. (modref_access_node::useful_for_kill): New member function. * ipa-modref.c (modref_summary::useful_p): Release useless kills. (lto_modref_summary): Add kills. (modref_summary::dump): Dump kills. (record_access): Add mdoref_access_node parameter. (record_access_lto): Likewise. (merge_call_side_effects): Merge kills. (analyze_call): Add ALWAYS_EXECUTED param and pass it around. (struct summary_ptrs): Add always_executed filed. (analyze_load): Update. (analyze_store): Update; record kills. (analyze_stmt): Add always_executed; record kills in clobbers. (analyze_function): Track always_executed. (modref_summaries::duplicate): Duplicate kills. (update_signature): Release kills. * ipa-modref.h (struct modref_summary): Add kills. * tree-ssa-alias.c (alias_stats): Add kill stats. (dump_alias_stats): Dump kill stats. (store_kills_ref_p): Break out from ... (stmt_kills_ref_p): Use it; handle modref info based kills. 2021-11-14 Aldy Hernandez PR tree-optimization/103229 * gimple-range-cache.cc (ssa_global_cache::clear): Do not pass null value to memset. 2021-11-14 Jan Hubicka * ipa-modref-tree.c (modref_access_node::get_call_arg): New member function. (modref_access_node::get_ao_ref): Likewise. * ipa-modref-tree.h (modref_access_node::get_call_arg): Declare. (modref_access_node::get_ao_ref): Declare. * tree-ssa-alias.c (modref_may_conflict): Use new accessors. * tree-ssa-dse.c (dse_optimize_call): Use new accessors. 2021-11-13 Jan Hubicka PR lto/103211 * dbgcnt.def (ipa_attr): New counters. * ipa-pure-const.c: Include dbgcnt.c (ipa_make_function_const): Use debug counter. (ipa_make_function_pure): Likewise. (propagate_pure_const): Fix bug in my previous change. 2021-11-13 Jan Hubicka * ipa-modref-tree.c (modref_access_node::range_info_useful_p): Offline from ipa-modref-tree.h. (modref_access_node::dump): Move from ipa-modref.c; make member function. * ipa-modref-tree.h (modref_access_node::range_info_useful_p. modref_access_node::dump): Declare. * ipa-modref.c (dump_access): Remove. (dump_records): Update. (dump_lto_records): Update. (record_access): Update. (record_access_lto): Update. 2021-11-13 Jan Hubicka * ipa-modref.c (modref_summary::modref_summary): Clear new flags. (modref_summary::dump): Dump try_dse. (modref_summary::finalize): Add FUN attribute; compute try-dse. (analyze_function): Update. (read_section): Update. (update_signature): Update. (pass_ipa_modref::execute): Update. * ipa-modref.h (struct modref_summary): * tree-ssa-alias.c (ao_ref_init_from_ptr_and_range): Export. * tree-ssa-alias.h (ao_ref_init_from_ptr_and_range): Declare. * tree-ssa-dse.c (dse_optimize_call): New function. (dse_optimize_stmt): Use it. 2021-11-13 Jan Hubicka * ipa-modref-tree.c: Move #if CHECKING_P to proper place. 2021-11-13 Jan Hubicka * ipa-modref-tree.h (struct modref_access_node): Move longer member functions to ipa-modref-tree.c (modref_ref_node::try_merge_with): Turn into modreef_acces_node member function. * ipa-modref-tree.c (modref_access_node::contains): Move here from ipa-modref-tree.h. (modref_access_node::update): Likewise. (modref_access_node::merge): Likewise. (modref_access_node::closer_pair_p): Likewise. (modref_access_node::forced_merge): Likewise. (modref_access_node::update2): Likewise. (modref_access_node::combined_offsets): Likewise. (modref_access_node::try_merge_with): Likewise. (modref_access_node::insert): Likewise. 2021-11-13 Jan Hubicka * ipa-modref.c (modref_summary::global_memory_read_p): Remove. (modref_summary::global_memory_written_p): Remove. (modref_summary::dump): Dump new flags. (modref_summary::finalize): New member function. (analyze_function): Call it. (read_section): Call it. (update_signature): Call it. (pass_ipa_modref::execute): Call it. * ipa-modref.h (struct modref_summary): Remove global_memory_read_p and global_memory_written_p. Add global_memory_read, global_memory_written. * tree-ssa-structalias.c (determine_global_memory_access): Update. 2021-11-13 Jan Hubicka * ipa-fnsummary.c (compute_fn_summary): Use type_attribut_allowed_p * ipa-param-manipulation.c (ipa_param_adjustments::type_attribute_allowed_p): New member function. (drop_type_attribute_if_params_changed_p): New function. (build_adjusted_function_type): Use it. * ipa-param-manipulation.h: Add type_attribute_allowed_p. 2021-11-13 David Malcolm * doc/invoke.texi (Static Analyzer Options): Add -Wno-analyzer-tainted-allocation-size, -Wno-analyzer-tainted-divisor, -Wno-analyzer-tainted-offset, and -Wno-analyzer-tainted-size to list. Add -Wanalyzer-tainted-allocation-size, -Wanalyzer-tainted-divisor, -Wanalyzer-tainted-offset, and -Wanalyzer-tainted-size to list of options effectively enabled by -fanalyzer. (-Wanalyzer-tainted-allocation-size): New. (-Wanalyzer-tainted-array-index): Tweak wording; add link to CWE. (-Wanalyzer-tainted-divisor): New. (-Wanalyzer-tainted-offset): New. (-Wanalyzer-tainted-size): New. 2021-11-13 Jan Hubicka * attr-fnspec.h (attr_fnspec::arg_eaf_flags): Break out from ... * gimple.c (gimple_call_arg_flags): ... here. * ipa-modref.c (analyze_parms): Record flags known from fnspec. (modref_merge_call_site_flags): Use arg_eaf_flags. 2021-11-13 Aldy Hernandez PR tree-optimization/103222 * gimple-range-path.cc (path_range_query::compute_ranges_in_phis): New. (path_range_query::compute_ranges_in_block): Call compute_ranges_in_phis. * gimple-range-path.h (path_range_query::compute_ranges_in_phis): New. 2021-11-13 Jan Hubicka * ipa-fnsummary.c (compute_fn_summary): Do not give up on signature changes on "fn spec" attribute; give up on varadic types. * ipa-param-manipulation.c: Include attribs.h. (build_adjusted_function_type): New parameter ARG_MODIFIED; if it is true remove "fn spec" attribute. (ipa_param_adjustments::build_new_function_type): Update. (ipa_param_body_adjustments::modify_formal_parameters): update. * ipa-sra.c: Include attribs.h. (ipa_sra_preliminary_function_checks): Do not check for TYPE_ATTRIBUTES. 2021-11-13 Aldy Hernandez * gimple-range-path.cc (path_range_query::path_range_query): Merge ctors. (path_range_query::import_p): Move from header file. (path_range_query::~path_range_query): Adjust for combined ctors. * gimple-range-path.h: Merge ctors. (path_range_query::import_p): Move to .cc file. 2021-11-13 Jan Hubicka PR tree-optimization/103182 * ipa-modref.c (callee_to_caller_flags): Fix merging of flags. (modref_eaf_analysis::analyze_ssa_name): Fix merging of flags. 2021-11-12 Stafford Horne * config/or1k/or1k-protos.h (or1k_profile_hook): New function. * config/or1k/or1k.h (PROFILE_HOOK): Change macro to reference new function or1k_profile_hook. * config/or1k/or1k.c (struct machine_function): Add new field set_mcount_arg_insn. (or1k_profile_hook): New function. (or1k_init_pic_reg): Update to inject pic rtx after _mcount arg when profiling. (or1k_frame_pointer_required): Frame pointer no longer needed when profiling. 2021-11-12 Jan Hubicka PR tree-optimization/103209 * tree-ssa-structalias.c (find_func_aliases_for_call): Fix use of handle_rhs_call 2021-11-12 Aldy Hernandez PR tree-optimization/103202 * gimple-range-path.cc (path_range_query::compute_ranges_in_block): Solve PHI imports first. 2021-11-12 Jan Hubicka * ipa-pure-const.c (propagate_pure_const): Remove redundant check; fix call of ipa_make_function_const and ipa_make_function_pure. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vector_op::n_advsimd_ops): Delete. (aarch64_vector_op::m_seen_loads): Likewise. (aarch64_vector_costs::aarch64_vector_costs): Don't push to m_advsimd_ops. (aarch64_vector_op::count_ops): Remove vectype and factor parameters. Remove code that tries to predict different vec_flags from the current loop's. (aarch64_vector_costs::add_stmt_cost): Update accordingly. Remove m_advsimd_ops handling. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vector_costs::m_saw_sve_only_op) (aarch64_sve_only_stmt_p): Delete. (aarch64_vector_costs::prefer_unrolled_loop): New function, extracted from adjust_body_cost. (aarch64_vector_costs::better_main_loop_than_p): New function, using heuristics extracted from adjust_body_cost and adjust_body_cost_sve. (aarch64_vector_costs::adjust_body_cost_sve): Remove advsimd_cycles_per_iter and could_use_advsimd parameters. Update after changes above. (aarch64_vector_costs::adjust_body_cost): Update after changes above. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vec_op_count::m_vf_factor): New member variable. (aarch64_vec_op_count::aarch64_vec_op_count): Add a parameter for it. (aarch64_vec_op_count::vf_factor): New function. (aarch64_vector_costs::aarch64_vector_costs): When costing for neoverse-512tvb, pass a vf_factor of 2 for the Neoverse V1 version of an SVE loop. (aarch64_vector_costs::adjust_body_cost): Read the vf factor instead of hard-coding 2. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vec_op_count::rename_cycles_per_iter): New function. (aarch64_vec_op_count::min_nonpred_cycles_per_iter): Likewise. (aarch64_vec_op_count::min_pred_cycles_per_iter): Likewise. (aarch64_vec_op_count::min_cycles_per_iter): Likewise. (aarch64_vec_op_count::dump): Move earlier in file. Dump the above properties too. (aarch64_estimate_min_cycles_per_iter): Delete. (adjust_body_cost): Use aarch64_vec_op_count::min_cycles_per_iter instead of aarch64_estimate_min_cycles_per_iter. Rely on the dump routine to print CPI estimates. (adjust_body_cost_sve): Likewise. Use the other functions above instead of doing the work inline. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vec_op_count): Allow default initialization. (aarch64_vec_op_count::base_issue_info): Remove handling of null issue_infos. (aarch64_vec_op_count::simd_issue_info): Likewise. (aarch64_vec_op_count::sve_issue_info): Likewise. (aarch64_vector_costs::m_ops): Turn into a vector. (aarch64_vector_costs::m_advsimd_ops): Likewise. (aarch64_vector_costs::aarch64_vector_costs): Add entries to the vectors based on aarch64_tune_params. (aarch64_vector_costs::analyze_loop_vinfo): Update the pred_ops of all entries in m_ops. (aarch64_vector_costs::add_stmt_cost): Call count_ops for all entries in m_ops. (aarch64_estimate_min_cycles_per_iter): Remove issue_info parameter and get the information from the ops instead. (aarch64_vector_costs::adjust_body_cost_sve): Take a aarch64_vec_issue_info instead of a aarch64_vec_op_count. (aarch64_vector_costs::adjust_body_cost): Update call accordingly. Exit earlier if m_ops is empty for either cost structure. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vector_costs::m_scalar_ops) (aarch64_vector_costs::m_sve_ops): Replace with... (aarch64_vector_costs::m_ops): ...this. (aarch64_vector_costs::analyze_loop_vinfo): Update accordingly. (aarch64_vector_costs::adjust_body_cost_sve): Likewise. (aarch64_vector_costs::aarch64_vector_costs): Likewise. Initialize m_vec_flags here rather than in add_stmt_cost. (aarch64_vector_costs::count_ops): Test for scalar reductions too. Allow vectype to be null. (aarch64_vector_costs::add_stmt_cost): Call count_ops for scalar code too. Don't require vectype to be nonnull. (aarch64_vector_costs::adjust_body_cost): Take the loop_vec_info and scalar costs as parameters. Use the scalar costs to determine the cycles per iteration of the scalar loop, then multiply it by the estimated VF. (aarch64_vector_costs::finish_cost): Update call accordingly. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_dr_type): New function. (aarch64_vector_costs::count_ops): Use it rather than the vectype to determine floatness. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_sve_in_loop_reduction_latency): Remove vectype parameter and get floatness from the type of the stmt lhs instead. (arch64_in_loop_reduction_latency): Likewise. (aarch64_detect_vector_stmt_subtype): Update caller. (aarch64_vector_costs::count_ops): Likewise. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c (aarch64_sve_op_count): Fold into... (aarch64_vec_op_count): ...this. Add a constructor. (aarch64_vec_op_count::vec_flags): New function. (aarch64_vec_op_count::base_issue_info): Likewise. (aarch64_vec_op_count::simd_issue_info): Likewise. (aarch64_vec_op_count::sve_issue_info): Likewise. (aarch64_vec_op_count::m_issue_info): New member variable. (aarch64_vec_op_count::m_vec_flags): Likewise. (aarch64_vector_costs): Add a constructor. (aarch64_vector_costs::m_sve_ops): Change type to aarch64_vec_op_count. (aarch64_vector_costs::aarch64_vector_costs): New function. Initialize m_scalar_ops, m_advsimd_ops and m_sve_ops. (aarch64_vector_costs::count_ops): Remove vec_flags and issue_info parameters, using the new aarch64_vec_op_count functions instead. (aarch64_vector_costs::add_stmt_cost): Update call accordingly. (aarch64_sve_op_count::dump): Fold into... (aarch64_vec_op_count::dump): ..here. 2021-11-12 Richard Sandiford * config/aarch64/aarch64.c: Include tree-dfa.h. (aarch64_check_consecutive_mems): New function that takes MEM_EXPR and MEM_OFFSET into account. (aarch64_swap_ldrstr_operands): Use it. (aarch64_operands_ok_for_ldpstp): Likewise. Check that the address of the second memory doesn't depend on the result of the first load. 2021-11-12 Jan Hubicka * ipa-pure-const.c (ipa_make_function_pure): Fix exit condition. 2021-11-12 Jan Hubicka PR tree-optimization/103175 * ipa-modref.c (modref_lattice::merge): Add sanity check. (callee_to_caller_flags): Make flags adjustment sane. (modref_eaf_analysis::analyze_ssa_name): Likewise. 2021-11-12 Jan Hubicka PR ipa/103200 * ipa-modref.c (analyze_function, modref_propagate_in_scc): Do not mark pure/const function if there are side-effects. 2021-11-12 Chung-Lin Tang * tree.h (OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P): New access macro for 'implicit' bit, using 'base.deprecated_flag' field of tree_node. * tree-pretty-print.c (dump_omp_clause): Add support for printing implicit attribute in tree dumping. * gimplify.c (gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P to 1 if map clause is implicitly created. (gimplify_adjust_omp_clauses): Adjust place of adding implicitly created clauses, from simple append, to starting of list, after non-map clauses. * omp-low.c (lower_omp_target): Add GOMP_MAP_IMPLICIT bits into kind values passed to libgomp for implicit maps. 2021-11-12 Jakub Jelinek * omp-builtins.def (BUILT_IN_GOMP_TEAMS): Remove. (BUILT_IN_GOMP_TEAMS4): New. * builtin-types.def (BT_FN_VOID_UINT_UINT): Remove. (BT_FN_BOOL_UINT_UINT_UINT_BOOL): New. * omp-low.c (lower_omp_teams): Use GOMP_teams4 instead of GOMP_teams, pass to it also num_teams lower-bound expression or a dup of upper-bound if it is missing and a flag whether it is the first call or not. 2021-11-12 Martin Liska PR tree-optimization/102497 * gimple-predicate-analysis.cc (add_pred): Remove unused function: 2021-11-12 Richard Biener PR tree-optimization/103204 * tree-ssa-sccvn.c (valueize_refs_1): Re-valueize the top operand after folding in an address. 2021-11-11 Aldy Hernandez * gimple-range-path.cc (path_range_query::path_range_query): New ctor without a ranger. (path_range_query::~path_range_query): Free ranger if necessary. (path_range_query::range_on_path_entry): Adjust m_ranger for pointer. (path_range_query::ssa_range_in_phi): Same. (path_range_query::compute_ranges_in_block): Same. (path_range_query::compute_imports): Same. (path_range_query::compute_ranges): Same. (path_range_query::range_of_stmt): Same. (path_range_query::compute_outgoing_relations): Same. * gimple-range-path.h (class path_range_query): New ctor. * tree-ssa-loop-ch.c (ch_base::copy_headers): Remove gimple_ranger as path_range_query allocates one. * tree-ssa-threadbackward.c (class back_threader): Remove m_ranger. (back_threader::~back_threader): Same. 2021-11-11 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Remove loop crossing restriction. 2021-11-11 Jan Hubicka * ipa-modref.c (analyze_function): Do pure/const discovery, return true on success. (pass_modref::execute): If pure/const is discovered fixup cfg. (ignore_edge): Do not ignore pure/const edges. (modref_propagate_in_scc): Do pure/const discovery, return true if cdtor was promoted pure/const. (pass_ipa_modref::execute): If needed remove unreachable functions. * ipa-pure-const.c (warn_function_noreturn): Fix whitespace. (warn_function_cold): Likewise. (skip_function_for_local_pure_const): Move earlier. (ipa_make_function_const): Break out from ... (ipa_make_function_pure): Break out from ... (propagate_pure_const): ... here. (pass_local_pure_const::execute): Use it. * ipa-utils.h (ipa_make_function_const): Declare. (ipa_make_function_pure): Declare. * passes.def: Move early modref after pure-const. 2021-11-11 David Malcolm PR other/103129 * diagnostic-show-locus.c (def_policy): Use def_tabstop. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-builtins.c (TYPES_COMBINE): Delete. (TYPES_COMBINEP): Delete. * config/aarch64/aarch64-simd-builtins.def: Declare type- qualified builtins for vcombine_* intrinsics. * config/aarch64/arm_neon.h (vcombine_s8): Remove unnecessary cast. (vcombine_s16): Likewise. (vcombine_s32): Likewise. (vcombine_f32): Likewise. (vcombine_u8): Use type-qualified builtin and remove casts. (vcombine_u16): Likewise. (vcombine_u32): Likewise. (vcombine_u64): Likewise. (vcombine_p8): Likewise. (vcombine_p16): Likewise. (vcombine_p64): Likewise. (vcombine_bf16): Remove unnecessary cast. * config/aarch64/iterators.md (VD_I): New mode iterator. (VDC_P): New mode iterator. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-builtins.c (TYPES_LOAD1_U): Define. (TYPES_LOAD1_P): Define. (TYPES_STORE1_U): Define. (TYPES_STORE1P): Rename to... (TYPES_STORE1_P): This. (get_mem_type_for_load_store): Add unsigned and poly types. (aarch64_general_gimple_fold_builtin): Add unsigned and poly type-qualified builtin declarations. * config/aarch64/aarch64-simd-builtins.def: Declare type- qualified builtins for LD1/ST1. * config/aarch64/arm_neon.h (vld1_p8): Use type-qualified builtin and remove cast. (vld1_p16): Likewise. (vld1_u8): Likewise. (vld1_u16): Likewise. (vld1_u32): Likewise. (vld1q_p8): Likewise. (vld1q_p16): Likewise. (vld1q_p64): Likewise. (vld1q_u8): Likewise. (vld1q_u16): Likewise. (vld1q_u32): Likewise. (vld1q_u64): Likewise. (vst1_p8): Likewise. (vst1_p16): Likewise. (vst1_u8): Likewise. (vst1_u16): Likewise. (vst1_u32): Likewise. (vst1q_p8): Likewise. (vst1q_p16): Likewise. (vst1q_p64): Likewise. (vst1q_u8): Likewise. (vst1q_u16): Likewise. (vst1q_u32): Likewise. (vst1q_u64): Likewise. * config/aarch64/iterators.md (VALLP_NO_DI): New iterator. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare unsigned builtins for vector reduction. * config/aarch64/arm_neon.h (vaddv_u8): Use type-qualified builtin and remove casts. (vaddv_u16): Likewise. (vaddv_u32): Likewise. (vaddvq_u8): Likewise. (vaddvq_u16): Likewise. (vaddvq_u32): Likewise. (vaddvq_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: * config/aarch64/arm_neon.h (vpaddq_u8): Use type-qualified builtin and remove casts. (vpaddq_u16): Likewise. (vpaddq_u32): Likewise. (vpaddq_u64): Likewise. (vpadd_u8): Likewise. (vpadd_u16): Likewise. (vpadd_u32): Likewise. (vpaddd_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare unsigned builtins for [r]subhn[2]. * config/aarch64/arm_neon.h (vsubhn_s16): Remove unnecessary cast. (vsubhn_s32): Likewise. (vsubhn_s64): Likewise. (vsubhn_u16): Use type-qualified builtin and remove casts. (vsubhn_u32): Likewise. (vsubhn_u64): Likewise. (vrsubhn_s16): Remove unnecessary cast. (vrsubhn_s32): Likewise. (vrsubhn_s64): Likewise. (vrsubhn_u16): Use type-qualified builtin and remove casts. (vrsubhn_u32): Likewise. (vrsubhn_u64): Likewise. (vrsubhn_high_s16): Remove unnecessary cast. (vrsubhn_high_s32): Likewise. (vrsubhn_high_s64): Likewise. (vrsubhn_high_u16): Use type-qualified builtin and remove casts. (vrsubhn_high_u32): Likewise. (vrsubhn_high_u64): Likewise. (vsubhn_high_s16): Remove unnecessary cast. (vsubhn_high_s32): Likewise. (vsubhn_high_s64): Likewise. (vsubhn_high_u16): Use type-qualified builtin and remove casts. (vsubhn_high_u32): Likewise. (vsubhn_high_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare unsigned builtins for [r]addhn[2]. * config/aarch64/arm_neon.h (vaddhn_s16): Remove unnecessary cast. (vaddhn_s32): Likewise. (vaddhn_s64): Likewise. (vaddhn_u16): Use type-qualified builtin and remove casts. (vaddhn_u32): Likewise. (vaddhn_u64): Likewise. (vraddhn_s16): Remove unnecessary cast. (vraddhn_s32): Likewise. (vraddhn_s64): Likewise. (vraddhn_u16): Use type-qualified builtin and remove casts. (vraddhn_u32): Likewise. (vraddhn_u64): Likewise. (vaddhn_high_s16): Remove unnecessary cast. (vaddhn_high_s32): Likewise. (vaddhn_high_s64): Likewise. (vaddhn_high_u16): Use type-qualified builtin and remove casts. (vaddhn_high_u32): Likewise. (vaddhn_high_u64): Likewise. (vraddhn_high_s16): Remove unnecessary cast. (vraddhn_high_s32): Likewise. (vraddhn_high_s64): Likewise. (vraddhn_high_u16): Use type-qualified builtin and remove casts. (vraddhn_high_u32): Likewise. (vraddhn_high_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use BINOPU type qualifiers in generator macros for uhsub builtins. * config/aarch64/arm_neon.h (vhsub_s8): Remove unnecessary cast. (vhsub_s16): Likewise. (vhsub_s32): Likewise. (vhsub_u8): Use type-qualified builtin and remove casts. (vhsub_u16): Likewise. (vhsub_u32): Likewise. (vhsubq_s8): Remove unnecessary cast. (vhsubq_s16): Likewise. (vhsubq_s32): Likewise. (vhsubq_u8): Use type-qualified builtin and remove casts. (vhsubq_u16): Likewise. (vhsubq_u32): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use BINOPU type qualifiers in generator macros for u[r]hadd builtins. * config/aarch64/arm_neon.h (vhadd_s8): Remove unnecessary cast. (vhadd_s16): Likewise. (vhadd_s32): Likewise. (vhadd_u8): Use type-qualified builtin and remove casts. (vhadd_u16): Likewise. (vhadd_u32): Likewise. (vhaddq_s8): Remove unnecessary cast. (vhaddq_s16): Likewise. (vhaddq_s32): Likewise. (vhaddq_u8): Use type-qualified builtin and remove casts. (vhaddq_u16): Likewise. (vhaddq_u32): Likewise. (vrhadd_s8): Remove unnecessary cast. (vrhadd_s16): Likewise. (vrhadd_s32): Likewise. (vrhadd_u8): Use type-qualified builtin and remove casts. (vrhadd_u16): Likewise. (vrhadd_u32): Likewise. (vrhaddq_s8): Remove unnecessary cast. (vrhaddq_s16): Likewise. (vrhaddq_s32): Likewise. (vrhaddq_u8): Use type-wualified builtin and remove casts. (vrhaddq_u16): Likewise. (vrhaddq_u32): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use BINOPU type qualifiers in generator macros for usub[lw][2] builtins. * config/aarch64/arm_neon.h (vsubl_s8): Remove unnecessary cast. (vsubl_s16): Likewise. (vsubl_s32): Likewise. (vsubl_u8): Use type-qualified builtin and remove casts. (vsubl_u16): Likewise. (vsubl_u32): Likewise. (vsubl_high_s8): Remove unnecessary cast. (vsubl_high_s16): Likewise. (vsubl_high_s32): Likewise. (vsubl_high_u8): Use type-qualified builtin and remove casts. (vsubl_high_u16): Likewise. (vsubl_high_u32): Likewise. (vsubw_s8): Remove unnecessary casts. (vsubw_s16): Likewise. (vsubw_s32): Likewise. (vsubw_u8): Use type-qualified builtin and remove casts. (vsubw_u16): Likewise. (vsubw_u32): Likewise. (vsubw_high_s8): Remove unnecessary cast. (vsubw_high_s16): Likewise. (vsubw_high_s32): Likewise. (vsubw_high_u8): Use type-qualified builtin and remove casts. (vsubw_high_u16): Likewise. (vsubw_high_u32): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use BINOPU type qualifiers in generator macros for uadd[lw][2] builtins. * config/aarch64/arm_neon.h (vaddl_s8): Remove unnecessary cast. (vaddl_s16): Likewise. (vaddl_s32): Likewise. (vaddl_u8): Use type-qualified builtin and remove casts. (vaddl_u16): Likewise. (vaddl_u32): Likewise. (vaddl_high_s8): Remove unnecessary cast. (vaddl_high_s16): Likewise. (vaddl_high_s32): Likewise. (vaddl_high_u8): Use type-qualified builtin and remove casts. (vaddl_high_u16): Likewise. (vaddl_high_u32): Likewise. (vaddw_s8): Remove unnecessary cast. (vaddw_s16): Likewise. (vaddw_s32): Likewise. (vaddw_u8): Use type-qualified builtin and remove casts. (vaddw_u16): Likewise. (vaddw_u32): Likewise. (vaddw_high_s8): Remove unnecessary cast. (vaddw_high_s16): Likewise. (vaddw_high_s32): Likewise. (vaddw_high_u8): Use type-qualified builtin and remove casts. (vaddw_high_u16): Likewise. (vaddw_high_u32): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare type- qualified builtins for [R]SHRN[2]. * config/aarch64/arm_neon.h (vshrn_n_u16): Use type-qualified builtin and remove casts. (vshrn_n_u32): Likewise. (vshrn_n_u64): Likewise. (vrshrn_high_n_u16): Likewise. (vrshrn_high_n_u32): Likewise. (vrshrn_high_n_u64): Likewise. (vrshrn_n_u16): Likewise. (vrshrn_n_u32): Likewise. (vrshrn_n_u64): Likewise. (vshrn_high_n_u16): Likewise. (vshrn_high_n_u32): Likewise. (vshrn_high_n_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare unsigned type-qualified builtins for XTN[2]. * config/aarch64/arm_neon.h (vmovn_high_u16): Use type- qualified builtin and remove casts. (vmovn_high_u32): Likewise. (vmovn_high_u64): Likewise. (vmovn_u16): Likewise. (vmovn_u32): Likewise. (vmovn_u64): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use poly type qualifier in builtin generator macros. * config/aarch64/arm_neon.h (vmul_p8): Use type-qualified builtin and remove casts. (vmulq_p8): Likewise. (vmull_high_p8): Likewise. (vmull_p8): Likewise. 2021-11-11 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Declare type- qualified builtin generators for unsigned MLA/MLS intrinsics. * config/aarch64/arm_neon.h (vmla_n_u16): Use type-qualified builtin. (vmla_n_u32): Likewise. (vmla_u8): Likewise. (vmla_u16): Likewise. (vmla_u32): Likewise. (vmlaq_n_u16): Likewise. (vmlaq_n_u32): Likewise. (vmlaq_u8): Likewise. (vmlaq_u16): Likewise. (vmlaq_u32): Likewise. (vmls_n_u16): Likewise. (vmls_n_u32): Likewise. (vmls_u8): Likewise. (vmls_u16): Likewise. (vmls_u32): Likewise. (vmlsq_n_u16): Likewise. (vmlsq_n_u32): Likewise. (vmlsq_u8): Likewise. (vmlsq_u16): Likewise. (vmlsq_u32): Likewise. 2021-11-11 Jan Hubicka * ipa-modref.c (modref_summary::useful_p): Check also for side-effects with looping const/pure. (modref_summary_lto::useful_p): Likewise. (merge_call_side_effects): Merge side effects before early exit for pure/const. (process_fnspec): Also handle pure functions. (analyze_call): Do not early exit on looping pure const. (propagate_unknown_call): Also handle nontrivial SCC as side-effect. (modref_propagate_in_scc): Update. 2021-11-11 Richard Biener PR tree-optimization/103190 * tree-ssa-reassoc.c (insert_stmt_after): Only assert on asm goto. 2021-11-11 Aldy Hernandez * gimple-range-path.cc (path_range_query::add_copies_to_imports): Rename to... (path_range_query::compute_imports): ...this. Adapt it so it can be passed the imports bitmap instead of working on m_imports. (path_range_query::compute_ranges): Call compute_imports in all cases unless an imports bitmap is passed. * gimple-range-path.h (path_range_query::compute_imports): New. (path_range_query::add_copies_to_imports): Remove. * tree-ssa-threadbackward.c (back_threader::resolve_def): Remove. (back_threader::find_paths_to_names): Inline resolve_def. (back_threader::find_paths): Call compute_imports. (back_threader::resolve_phi): Adjust comment. 2021-11-11 Richard Biener PR tree-optimization/103188 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Remove query parameter, split out check for size optimization. (ch_base::m_ranger, cb_base::m_query): Remove. (ch_base::copy_headers): Split processing loop into analysis around which we allocate and use ranger and transform where we do not. (pass_ch::execute): Do not allocate/free ranger here. (pass_ch_vect::execute): Likewise. 2021-11-11 Jan Hubicka * ipa-pure-const.c (propagate_pure_const): Self recursion is a side effects. 2021-11-11 Jan Hubicka * cgraph.c (set_noreturn_flag_1): New function. (cgraph_node::set_noreturn_flag): New member function * cgraph.h (cgraph_node::set_noreturn_flags): Declare. * ipa-pure-const.c (pass_local_pure_const::execute): Use it. 2021-11-11 Aldy Hernandez Richard Biener * tree-ssa-loop-ch.c (entry_loop_condition_is_static): Resolve statically to the edge remaining in the loop. 2021-11-11 Richard Biener PR middle-end/103181 * tree-eh.c (operation_could_trap_helper_p): Properly check vector constants for a zero element for integer division. Separate floating point and integer division code. 2021-11-11 Jakub Jelinek PR debug/101378 * dwarf2out.c (field_byte_offset): Do the PCC_BITFIELD_TYPE_MATTERS handling only for DECL_BIT_FIELD_TYPE decls. 2021-11-11 Prathamesh Kulkarni PR target/102376 * config/aarch64/aarch64.c (aarch64_process_target_attr): Check if token is arch extension without leading '+' and emit appropriate diagnostic for the same. 2021-11-11 Jakub Jelinek * tree.h (OMP_CLAUSE_NUM_TEAMS_EXPR): Rename to ... (OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR): ... this. (OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR): Define. * tree.c (omp_clause_num_ops): Increase num ops for OMP_CLAUSE_NUM_TEAMS to 2. * tree-pretty-print.c (dump_omp_clause): Print optional lower bound for OMP_CLAUSE_NUM_TEAMS. * gimplify.c (gimplify_scan_omp_clauses): Gimplify OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR if non-NULL. (optimize_target_teams): Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR. Handle OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR. * omp-low.c (lower_omp_teams): Use OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR instead of OMP_CLAUSE_NUM_TEAMS_EXPR. * omp-expand.c (expand_teams_call, get_target_arguments): Likewise. 2021-11-11 Richard Biener * cfganal.c (find_pdom): Remove. (control_dependences::find_control_dependence): Remove special-casing of entry block, call get_immediate_dominator directly. * gimple-predicate-analysis.cc (find_pdom): Remove. (find_dom): Likewise. (find_control_equiv_block): Call get_immediate_dominator directly. (compute_control_dep_chain): Likewise. (predicate::init_from_phi_def): Likewise. 2021-11-11 Richard Biener * cfganal.h (control_dependences::control_dependence_map): Embed bitmap_head. (control_dependences::m_bitmaps): New. * cfganal.c (control_dependences::set_control_dependence_map_bit): Adjust. (control_dependences::clear_control_dependence_bitmap): Likewise. (control_dependences::find_control_dependence): Do not find_edge for the abnormal edge test. (control_dependences::control_dependences): Instead do not add abnormal edges to the edge list. Adjust. (control_dependences::~control_dependences): Likewise. (control_dependences::get_edges_dependent_on): Likewise. * function-tests.c: Include bitmap.h. 2021-11-11 Kewen Lin * doc/invoke.texi: Change references to "future cpu" to "power10", "-mcpu=future" to "-mcpu=power10". Adjust words for float128. 2021-11-11 Cui,Lili * config/i386/i386-options.c (m_CORE_AVX2): Remove Alderlake from m_CORE_AVX2. (processor_cost_table): Use alderlake_cost for Alderlake. * config/i386/i386.c (ix86_sched_init_global): Handle Alderlake. * config/i386/x86-tune-costs.h (struct processor_costs): Add alderlake cost. * config/i386/x86-tune-sched.c (ix86_issue_rate): Change Alderlake issue rate to 4. (ix86_adjust_cost): Handle Alderlake. * config/i386/x86-tune.def (X86_TUNE_SCHEDULE): Enable for Alderlake. (X86_TUNE_PARTIAL_REG_DEPENDENCY): Likewise. (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Likewise. (X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): Likewise. (X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Likewise. (X86_TUNE_MEMORY_MISMATCH_STALL): Likewise. (X86_TUNE_USE_LEAVE): Likewise. (X86_TUNE_PUSH_MEMORY): Likewise. (X86_TUNE_USE_INCDEC): Likewise. (X86_TUNE_INTEGER_DFMODE_MOVES): Likewise. (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Likewise. (X86_TUNE_USE_SAHF): Likewise. (X86_TUNE_USE_BT): Likewise. (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Likewise. (X86_TUNE_ONE_IF_CONV_INSN): Likewise. (X86_TUNE_AVOID_MFENCE): Likewise. (X86_TUNE_USE_SIMODE_FIOP): Likewise. (X86_TUNE_EXT_80387_CONSTANTS): Likewise. (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL): Likewise. (X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Likewise. (X86_TUNE_SSE_TYPELESS_STORES): Likewise. (X86_TUNE_SSE_LOAD0_BY_PXOR): Likewise. (X86_TUNE_AVOID_4BYTE_PREFIXES): Likewise. (X86_TUNE_USE_GATHER): Disable for Alderlake. (X86_TUNE_AVX256_MOVE_BY_PIECES): Likewise. (X86_TUNE_AVX256_STORE_BY_PIECES): Likewise. 2021-11-11 liuhongt PR target/103151 * config/i386/sse.md (V_128_256): Extend to V8HF/V16HF. (avxsizesuffix): Ditto. 2021-11-11 Kito Cheng * common/config/riscv/riscv-common.c (riscv_subset_list::to_string): Fix wrong marco checking. 2021-11-10 Aldy Hernandez PR tree-optimization/102906 * tree-ssa-loop-ch.c (entry_loop_condition_is_static): New. (should_duplicate_loop_header_p): Call entry_loop_condition_is_static. (class ch_base): Add m_ranger and m_query. (ch_base::copy_headers): Pass m_query to entry_loop_condition_is_static. (pass_ch::execute): Allocate and deallocate m_ranger and m_query. (pass_ch_vect::execute): Same. 2021-11-10 Andrew Pinski PR target/103170 * config/aarch64/aarch64-simd.md (aarch64_simd_dup): Use vwcore iterator for the r constraint output string. 2021-11-10 qing zhao * internal-fn.c (expand_DEFERRED_INIT): Apply pattern initialization only when have_insn_for return true for the mode. Fix a memory leak. 2021-11-10 Christophe Lyon * config/arm/arm.c (cortexa9_extra_costs, cortexa8_extra_costs, cortexa5_extra_costs, cortexa7_extra_costs, cortexa12_extra_costs, cortexa15_extra_costs, v7m_extra_costs): Initialize movi, dup and extract costing fields. 2021-11-10 Aldy Hernandez * gimple-range-path.cc (path_range_query::path_range_query): Do not init m_path. (path_range_query::dump): Change m_path uses to non-pointer. (path_range_query::defined_outside_path): Same. (path_range_query::set_path): Same. (path_range_query::add_copies_to_imports): Same. (path_range_query::range_of_stmt): Same. (path_range_query::compute_outgoing_relations): Same. (path_range_query::compute_ranges): Imports are now optional. Implement overload that takes an edge. * gimple-range-path.h (class path_range_query): Make imports optional for compute_ranges. Add compute_ranges(edge) overload. Make m_path an auto_vec instead of a pointer and adjust accordingly. 2021-11-10 Tamar Christina * tree-vectorizer.h (struct scalar_cond_masked_key): Add inverted_p. (default_hash_traits): Likewise. * tree-vect-stmts.c (vectorizable_condition): Check if inverse of mask is live. * tree-vectorizer.c (scalar_cond_masked_key::get_cond_ops_from_tree): Register mask inverses. 2021-11-10 Tamar Christina * tree-vectorizer.c (vectorize_loops): Do local CSE through RPVN upon successful vectorization. 2021-11-10 Andrew MacLeod * gimple-range-cache.cc (sbr_vector::grow): New. (sbr_vector::set_bb_range): Call grow. (sbr_vector::get_bb_range): Same. (sbr_vector::bb_range_p): Remove assert. 2021-11-10 Tamar Christina * config/aarch64/aarch64-simd.md (*aarch64_topbits_shuffle_le ,*aarch64_topbits_shuffle_be): Remove. 2021-11-10 Jan Hubicka * ipa-modref.c: Include tree-eh.h (modref_summary::modref_summary): Initialize side_effects. (struct modref_summary_lto): New bool field side_effects. (modref_summary_lto::modref_summary_lto): Initialize side_effects. (modref_summary::dump): Dump side_effects. (modref_summary_lto::dump): Dump side_effects. (merge_call_side_effects): Merge side effects. (process_fnspec): Calls to non-const/pure or looping function is a side effect. (analyze_call): Self-recursion is a side-effect; handle special builtins. (analyze_load): Watch for volatile and throwing memory. (analyze_store): Likewise. (analyze_stmt): Watch for volatitle asm. (analyze_function): Handle side_effects. (modref_summaries::duplicate): Duplicate side_effects. (modref_summaries_lto::duplicate): Likewise. (modref_write): Stream side_effects. (read_section): Likewise. (update_signature): Update. (propagate_unknown_call): Handle side_effects. (modref_propagate_in_scc): Likewise. * ipa-modref.h (struct modref_summary): Add side_effects. * ipa-pure-const.c (special_builtin_state): Rename to ... (builtin_safe_for_const_function_p): ... this one. (check_call): Update. (finite_function_p): Break out from ... (propagate_pure_const): ... here * ipa-utils.h (finite_function): Declare. 2021-11-10 Lucas A. M. Magalhães * config.gcc (powerpc*-*-*): Remove -rpath from --with-advance-toolchain. 2021-11-10 Marek Polacek PR c++/101940 * attribs.c (struct scoped_attributes): Add a bool member. (lookup_scoped_attribute_spec): Forward declare. (register_scoped_attributes): New bool parameter, defaulted to false. Use it. (handle_ignored_attributes_option): New function. (free_attr_data): New function. (init_attributes): Call handle_ignored_attributes_option. (attr_namespace_ignored_p): New function. (decl_attributes): Check attr_namespace_ignored_p before warning. * attribs.h (free_attr_data): Declare. (register_scoped_attributes): Adjust declaration. (handle_ignored_attributes_option): Declare. (canonicalize_attr_name): New function template. (canonicalize_attr_name): Use it. * common.opt (Wattributes=): New option with a variable. * doc/extend.texi: Document #pragma GCC diagnostic ignored_attributes. * doc/invoke.texi: Document -Wno-attributes=. * opts.c (common_handle_option) : Handle. * plugin.h (register_scoped_attributes): Adjust declaration. * toplev.c (compile_file): Call free_attr_data. 2021-11-10 Przemyslaw Wirkus * config/arm/arm-cpus.in (cortex-a710): New CPU. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Regenerate. * doc/invoke.texi: Update docs. 2021-11-10 Andre Vieira * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): Mark argument as unused. 2021-11-10 Martin Liska * lto-wrapper.c (merge_and_complain): Make the first argument a reference type. 2021-11-10 Richard Sandiford * config/aarch64/iterators.md (optab): Use fmax_nan instead of smax_nan and fmin_nan instead of smin_nan. (maxmin_uns): Rename to... (fmaxmin): ...this and make the same changes. Remove entries unrelated to fmax* and fmin*. * config/aarch64/aarch64.md (3): Rename to... (3): ...this. * config/aarch64/aarch64-simd.md (aarch64_p): Rename to... (aarch64_p): ...this. (3): Rename to... (3): ...this. (reduc__scal_): Rename to... (reduc__scal_): ...this and update gen* call. (aarch64_reduc__internal): Rename to... (aarch64_reduc__internal): ...this. (aarch64_reduc__internalv2si): Rename to... (aarch64_reduc__internalv2si): ...this. * config/aarch64/aarch64-sve.md (3): Rename to... (3): ...this. * config/aarch64/aarch64-simd-builtins.def (smax_nan, smin_nan) Rename to... (fmax_nan, fmin_nan): ...this. * config/aarch64/arm_neon.h (vmax_f32, vmax_f64, vmaxq_f32, vmaxq_f64) (vmin_f32, vmin_f64, vminq_f32, vminq_f64, vmax_f16, vmaxq_f16) (vmin_f16, vminq_f16): Update accordingly. 2021-11-10 Richard Sandiford * tree-vectorizer.h (vector_costs::finish_cost): Take the corresponding scalar costs as a parameter. (finish_cost): Likewise. * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost) (vect_estimate_min_profitable_iters): Update accordingly. * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Likewise. * tree-vectorizer.c (vector_costs::finish_cost): Likewise. * config/aarch64/aarch64.c (aarch64_vector_costs::finish_cost): Likewise. * config/rs6000/rs6000.c (rs6000_cost_data::finish_cost): Likewise. 2021-11-10 Richard Sandiford * tree-vectorizer.h (_loop_vec_info::scalar_costs): New member variable. (_loop_vec_info::single_scalar_iteration_cost): Delete. (LOOP_VINFO_SINGLE_SCALAR_ITERATION_COST): Delete. (vector_costs::total_cost): New function. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Update after above changes. (_loop_vec_info::~_loop_vec_info): Delete scalar_costs. (vect_compute_single_scalar_iteration_cost): Store the costs in loop_vinfo->scalar_costs. (vect_estimate_min_profitable_iters): Get the scalar cost from loop_vinfo->scalar_costs. 2021-11-10 Richard Sandiford * tree-vectorizer.h (vector_costs::better_main_loop_than_p) (vector_costs::better_epilogue_loop_than_p) (vector_costs::compare_inside_loop_cost) (vector_costs::compare_outside_loop_cost): Likewise. * tree-vectorizer.c (vector_costs::better_main_loop_than_p) (vector_costs::better_epilogue_loop_than_p) (vector_costs::compare_inside_loop_cost) (vector_costs::compare_outside_loop_cost): New functions, containing code moved from... * tree-vect-loop.c (vect_better_loop_vinfo_p): ...here. 2021-11-10 Richard Sandiford * tree-vectorizer.h (_loop_vec_info): Remove vec_outside_cost and vec_inside_cost. (vector_costs::outside_cost): New function. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Update after above. (vect_estimate_min_profitable_iters): Likewise. (vect_better_loop_vinfo_p): Get the inside and outside costs from the loop_vec_infos' vector_costs. 2021-11-10 Richard Sandiford * tree-vectorizer.h (vec_info::target_cost_data): Replace with... (_loop_vec_info::vector_costs): ...this. (LOOP_VINFO_TARGET_COST_DATA): Delete. * tree-vectorizer.c (vec_info::vec_info): Remove target_cost_data initialization. (vec_info::~vec_info): Remove corresponding delete. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize vector_costs to null. (_loop_vec_info::~_loop_vec_info): Delete vector_costs. (vect_analyze_loop_operations): Update after above changes. (vect_analyze_loop_2): Likewise. (vect_estimate_min_profitable_iters): Likewise. * tree-vect-slp.c (vect_slp_analyze_operations): Likewise. 2021-11-10 Jan Hubicka * tree-core.h (EAF_DIRECT): Remove. (EAF_NOCLOBBER): Remove. (EAF_UNUSED): Remove. (EAF_NOESCAPE): Remove. (EAF_NO_DIRECT_CLOBBER): New. (EAF_NO_INDIRECT_CLOBBER): New. (EAF_NODIRECTESCAPE): Remove. (EAF_NO_DIRECT_ESCAPE): New. (EAF_NO_INDIRECT_ESCAPE): New. (EAF_NOT_RETURNED): Remove. (EAF_NOT_RETURNED_INDIRECTLY): New. (EAF_NOREAD): Remove. (EAF_NO_DIRECT_READ): New. (EAF_NO_INDIRECT_READ): New. * gimple.c (gimple_call_arg_flags): Update for new flags. (gimple_call_retslot_flags): Update for new flags. * ipa-modref.c (dump_eaf_flags): Likewise. (remove_useless_eaf_flags): Likewise. (deref_flags): Likewise. (modref_lattice::init): Likewise. (modref_lattice::merge): Likewise. (modref_lattice::merge_direct_load): Likewise. (modref_lattice::merge_direct_store): Likewise. (modref_eaf_analysis::merge_call_lhs_flags): Likewise. (callee_to_caller_flags): Likewise. (modref_eaf_analysis::analyze_ssa_name): Likewise. (modref_eaf_analysis::propagate): Likewise. (modref_merge_call_site_flags): Likewise. * ipa-modref.h (interposable_eaf_flags): Likewise. * tree-ssa-alias.c: (ref_maybe_used_by_call_p_1) Likewise. * tree-ssa-structalias.c (handle_call_arg): Likewise. (handle_rhs_call): Likewise. * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Likewise. 2021-11-10 Tamar Christina * tree-vect-slp-patterns.c (complex_mul_pattern::matches): Remove l1node. 2021-11-10 Andre Vieira * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): Change pointer alignment and alias. 2021-11-10 Jan Hubicka * ipa-modref-tree.h (modref_tree::remap_params): Fix off-by-one error. 2021-11-10 H.J. Lu Hongtao Liu PR middle-end/102566 * match.pd (nop_atomic_bit_test_and_p): New match. * tree-ssa-ccp.c (convert_atomic_bit_not): New function. (gimple_nop_atomic_bit_test_and_p): New prototype. (optimize_atomic_bit_test_and): Transform equivalent, but slighly different cases to their canonical forms. 2021-11-10 liuhongt PR tree-optimization/103126 * tree-vect-loop.c (neutral_op_for_reduction): Remove static. * tree-vectorizer.h (neutral_op_for_reduction): Declare. * tree-if-conv.c : Include tree-vectorizer.h. (is_cond_scalar_reduction): Handle BIT_XOR_EXPR/BIT_IOR_EXPR/BIT_AND_EXPR. (convert_scalar_cond_reduction): Ditto. 2021-11-10 konglin1 * config/i386/sse.md (cmul3): add new define_expand. (cmla4): Likewise 2021-11-10 Aldy Hernandez * tree-ssa-threadedge.c: Do not include gimple-ssa-evrp-analyze.h. * value-pointer-equiv.cc: Same. 2021-11-10 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path_dump): Abstract path dumping... (dump_path): ...here. (back_threader::resolve_phi): Call dump_path. (debug): Same. 2021-11-10 konglin1 * config/i386/sse.md (fma___pair): Add new define_insn. (fma__fmaddc_bcst): Add new define_insn_and_split. (fma__fcmaddc_bcst): Likewise 2021-11-10 liuhongt PR target/102464 * match.pd: Simplify (trunc)fmax/fmin((extend)a, (extend)b) to MAX/MIN(a,b) 2021-11-10 Andrew Pinski PR target/101529 * config/aarch64/aarch64.c (aarch64_evpc_ins): Don't use target as an input, use original one. 2021-11-10 Sandra Loosemore * config/nios2/nios2.c (nios2_can_inline_p): New. (TARGET_CAN_INLINE_P): Define. 2021-11-09 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_gimple_fold_new_builtin): Disable gimple fold for RS6000_BIF_{XVMINDP,XVMINSP,VMINFP} and RS6000_BIF_{XVMAXDP,XVMAXSP,VMAXFP} when fast-math is not set. (lxvrse_expand_builtin): Modify the expansion for sign extension. All extensions are done within VSX registers. 2021-11-09 Andrew Pinski PR tree-optimization/10352 * match.pd: Remove check of TYPE_PRECISION for the a?0:pow2 case. 2021-11-09 Andrew MacLeod * function.c (allocate_struct_function): Don't set x_range_query. * function.h (get_range_query): Move to value-query.h. * gimple-range.cc (enable_ranger): Check that query is currently NULL. (disable_ranger): Clear function current query field. * value-query.cc (get_global_range_query): Relocate to: * value-query.h (get_global_range_query): Here and inline. (get_range_query): Relocate here from function.h. 2021-11-09 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path_dump): New. (back_threader::maybe_register_path): Call maybe_register_path_dump. 2021-11-09 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Return NULL when unprofitable. 2021-11-09 Martin Jambor * tree.h (build_debug_expr_decl): Declare. * tree.c (build_debug_expr_decl): New function. * cfgexpand.c (avoid_deep_ter_for_debug): Use build_debug_expr_decl instead of building a DEBUG_EXPR_DECL. * ipa-param-manipulation.c (ipa_param_body_adjustments::prepare_debug_expressions): Likewise. * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Likewise. * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise. * tree-ssa-phiopt.c (spaceship_replacement): Likewise. * tree-ssa-reassoc.c (make_new_ssa_for_def): Likewise. 2021-11-09 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_type_string): New function. (def_builtin): Change debug formatting for easier parsing and include more information. (rs6000_init_builtins): Add dump of autogenerated builtins. (altivec_init_builtins): Dump __builtin_altivec_mask_for_load for completeness. 2021-11-09 Marek Polacek * ipa-modref.c (analyze_parms): Fix a typo. 2021-11-09 Kito Cheng PR target/102957 * common/config/riscv/riscv-common.c (multi_letter_subset_rank): Remove assertion for Z*-ext. 2021-11-09 Jan Hubicka * ipa-modref.c (analyze_parms): Add past_flags, past_retslot_flags and past_static_chain; merge past summary with current one. (analyze_function): Update. 2021-11-09 Aldy Hernandez * doc/invoke.texi (Invoking GCC): Document --param=threader-debug. 2021-11-09 Martin Liska * print-rtl.c (rtx_writer::rtx_writer): Make the compilation conditional based on * print-rtl.h (class rtx_writer): Likewise. 2021-11-09 Thomas Schwinge * input.h (location_hash): Use 'BUILTINS_LOCATION' as spare value for 'Deleted'. Turn into a '#define'. 2021-11-09 Aldy Hernandez * gimple-range-path.cc (path_range_query::dump): Clean up. (path_range_query::compute_ranges): Same. * value-relation.cc (path_oracle::dump): Same. 2021-11-09 Aldy Hernandez * dumpfile.c (dump_options): Remove TDF_THREADING entry. * dumpfile.h (enum dump_flag): Remove TDF_THREADING and adjust remaining entries. * flag-types.h (enum threader_debug): New. * gimple-range-path.cc (DEBUG_SOLVER): Use param_threader_debug. * params.opt: Add entry for --param=threader-debug=. 2021-11-09 Thomas Schwinge PR middle-end/101204 PR other/103157 * diagnostic-spec.h (typedef xint_hash_t): Turn into... (struct xint_hash_t): ... this. * doc/gty.texi: Update. 2021-11-09 Przemyslaw Wirkus * config/arm/arm-cpus.in (armv9): New define. (ARMv9a): New group. (armv9-a): New arch definition. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm.h (BASE_ARCH_9A): New arch enum value. * config/arm/t-aprofile: Added armv9-a and armv9+simd. * config/arm/t-arm-elf: Added arm9-a, v9_fps and all_v9_archs to MULTILIB_MATCHES. * config/arm/t-multilib: Added v9_a_nosimd_variants and v9_a_simd_variants to MULTILIB_MATCHES. * doc/invoke.texi: Update docs. 2021-11-09 Martin Jambor PR ipa/103132 * ipa-param-manipulation.c (replace_with_mapped_expr): Early return with error_mark_mode when part of expression is mapped to NULL. (ipa_param_body_adjustments::remap_with_debug_expressions): Set mapped value to NULL if walk_tree returns error_mark_mode. 2021-11-09 Aldy Hernandez * tree-ssa-strlen.c (compare_nonzero_chars): Pass statement context to ranger. (get_addr_stridx): Same. (get_stridx): Same. (get_range_strlen_dynamic): Same. (handle_builtin_strlen): Same. (handle_builtin_strchr): Same. (handle_builtin_strcpy): Same. (maybe_diag_stxncpy_trunc): Same. (handle_builtin_stxncpy_strncat): Same. (handle_builtin_memcpy): Same. (handle_builtin_strcat): Same. (handle_alloc_call): Same. (handle_builtin_memset): Same. (handle_builtin_string_cmp): Same. (handle_pointer_plus): Same. (count_nonzero_bytes_addr): Same. (count_nonzero_bytes): Same. (handle_store): Same. (fold_strstr_to_strncmp): Same. (handle_integral_assign): Same. (check_and_optimize_stmt): Same. (class strlen_dom_walker): Replace evrp with ranger. (strlen_dom_walker::before_dom_children): Remove evrp. (strlen_dom_walker::after_dom_children): Remove evrp. * gimple-ssa-warn-access.cc (maybe_check_access_sizes): Restrict sprintf output. 2021-11-09 Martin Liska * genconditions.c (write_one_condition): Add const qualifier to pointer casting. 2021-11-09 Jeff Law * match.pd: New pattern to simplify (1 << n) & M ==/!= 0 for M being a power of 2. 2021-11-08 Bill Schmidt * config/rs6000/rs6000-builtin-new.def (VEC_INIT_V16QI): Use escape-newline support. (VEC_INIT_V4SI): Likewise. (VEC_INIT_V8HI): Likewise. (PACK_V1TI): Likewise. (DIVDEU): Likewise. (VFIRSTMISMATCHOREOSINDEX_V16QI): Likewise. (VFIRSTMISMATCHOREOSINDEX_V8HI): Likewise. (VFIRSTMISMATCHOREOSINDEX_V4SI): Likewise. (CMPRB2): Likewise. (VSTDCP): Likewise. (VSIEDP): Likewise. (FMAF128_ODD): Likewise. (VSCEQPUO): Likewise. (VSIEQP): Likewise. (VSIEQPF): Likewise. (VSTDCQP): Likewise. (PACK_TD): Likewise. (TABORTDC): Likewise. (TABORTDCI): Likewise. (SE_LXVRBX): Likewise. (SE_LXVRHX): Likewise. (SE_LXVRWX): Likewise. (SE_LXVRDX): Likewise. (VREPLACE_UN_UV2DI): Likewise. (VREPLACE_UN_UV4SI): Likewise. (VREPLACE_UN_V2DI): Likewise. (VREPLACE_ELT_UV2DI): Likewise. (VREPLACE_ELT_V2DI): Likewise. (ZE_LXVRBX): Likewise. (ZE_LXVRHX): Likewise. (ZE_LXVRWX): Likewise. (ZE_LXVRDX): Likewise. (CFUGED): Likewise. (CNTLZDM): Likewise. (CNTTZDM): Likewise. (PDEPD): Likewise. (PEXTD): Likewise. (PMXVBF16GER2): Likewise. (PMXVBF16GER2_INTERNAL): Likewise. (PMXVBF16GER2NN): Likewise. (PMXVBF16GER2NN_INTERNAL): Likewise. (PMXVBF16GER2NP): Likewise. (PMXVBF16GER2NP_INTERNAL): Likewise. (PMXVBF16GER2PN): Likewise. (PMXVBF16GER2PN_INTERNAL): Likewise. (PMXVBF16GER2PP): Likewise. (PMXVBF16GER2PP_INTERNAL): Likewise. (PMXVF16GER2): Likewise. (PMXVF16GER2_INTERNAL): Likewise. (PMXVF16GER2NN): Likewise. (PMXVF16GER2NN_INTERNAL): Likewise. (PMXVF16GER2NP): Likewise. (PMXVF16GER2NP_INTERNAL): Likewise. (PMXVF16GER2PN): Likewise. (PMXVF16GER2PN_INTERNAL): Likewise. (PMXVF16GER2PP): Likewise. (PMXVF16GER2PP_INTERNAL): Likewise. (PMXVF32GER_INTERNAL): Likewise. (PMXVF32GERNN): Likewise. (PMXVF32GERNN_INTERNAL): Likewise. (PMXVF32GERNP): Likewise. (PMXVF32GERNP_INTERNAL): Likewise. (PMXVF32GERPN): Likewise. (PMXVF32GERPN_INTERNAL): Likewise. (PMXVF32GERPP): Likewise. (PMXVF32GERPP_INTERNAL): Likewise. (PMXVF64GER): Likewise. (PMXVF64GER_INTERNAL): Likewise. (PMXVF64GERNN): Likewise. (PMXVF64GERNN_INTERNAL): Likewise. (PMXVF64GERNP): Likewise. (PMXVF64GERNP_INTERNAL): Likewise. (PMXVF64GERPN): Likewise. (PMXVF64GERPN_INTERNAL): Likewise. (PMXVF64GERPP): Likewise. (PMXVF64GERPP_INTERNAL): Likewise. (PMXVI16GER2): Likewise. (PMXVI16GER2_INTERNAL): Likewise. (PMXVI16GER2PP): Likewise. (PMXVI16GER2PP_INTERNAL): Likewise. (PMXVI16GER2S): Likewise. (PMXVI16GER2S_INTERNAL): Likewise. (PMXVI16GER2SPP): Likewise. (PMXVI16GER2SPP_INTERNAL): Likewise. (PMXVI4GER8): Likewise. (PMXVI4GER8_INTERNAL): Likewise. (PMXVI4GER8PP): Likewise. (PMXVI4GER8PP_INTERNAL): Likewise. (PMXVI8GER4): Likewise. (PMXVI8GER4_INTERNAL): Likewise. (PMXVI8GER4PP): Likewise. (PMXVI8GER4PP_INTERNAL): Likewise. (PMXVI8GER4SPP): Likewise. (PMXVI8GER4SPP_INTERNAL): Likewise. * config/rs6000/rs6000-gen-builtins.c (MAXLINES): New macro. (linebuf): Increase size. (lines): New variable. (lastline): Likewise. (real_line_pos): New function. (diag): Change signature. (bif_diag): Change signature; support escape-newline handling. (ovld_diag): Likewise. (fatal): Move earlier. (consume_whitespace): Adjust diag call. (advance_line): Add escape-newline handling; call fatal. (safe_inc_pos): Adjust diag call. (match_identifier): Likewise. (match_integer): Likewise. (match_to_right_bracket): Call fatal instead of diag; adjust diag call. (match_basetype): Adjust diag calls. (match_bracketed_pair): Likewise. (match_const_restriction): Likewise. (match_type): Likewise. (parse_args): Likewise. (parse_bif_attrs): Likewise. (complete_vector_type): Likewise. (complete_base_type): Likewise. (parse_prototype): Likewise. (parse_bif_entry): Likewise. (parse_bif_stanza): Likewise. (parse_ovld_entry): Likewise. (parse_ovld_stanza): Likewise. (main): Allocate buffers for lines[]. 2021-11-08 Eric Botcazou * config/i386/i386.c (legitimize_pic_address): Adjust comment and use the REG argument on the CM_LARGE_PIC code path as well. * config/i386/predicates.md (gotoff_operand): Do not treat VxWorks specially with the large code models. 2021-11-08 Jan Hubicka * gimple.c (gimple_call_static_chain_flags): Revert the workaround allowing interposition since issues with binds_to_local_def were hopefully solved. 2021-11-08 Andrew MacLeod PR tree-optimization/103122 * gimple-range.cc (gimple_ranger::range_of_expr): Request the cache entry with "calulate new values" set to false. 2021-11-08 Jan Hubicka * builtins.c (is_simple_builtin): Add builitin_dwarf_cfa and builtin_return_address. (builtin_fnspec): Annotate builtin_return, bulitin_eh_pointer, builtin_eh_filter, builtin_unwind_resume, builtin_cxa_end_cleanup, builtin_eh_copy_values, builtin_frame_address, builtin_apply_args, builtin_asan_before_dynamic_init, builtin_asan_after_dynamic_init, builtin_prefetch, builtin_dwarf_cfa, builtin_return_addrss as ".c" * ipa-pure-const.c (special_builtin_state): Add builtin_dwarf_cfa and builtin_return_address. 2021-11-08 Jan Hubicka PR tree-optimization/103177 * passes.def: Move uncprop after pure/const and modref. 2021-11-08 Martin Jambor PR ipa/103099 PR ipa/103107 * tree-inline.c (remap_gimple_stmt): Unshare the expression without location before invoking remap_with_debug_expressions on it. * ipa-param-manipulation.c (ipa_param_body_adjustments::prepare_debug_expressions): Likewise. 2021-11-08 David Edelsohn * config/rs6000/vsx.md (vsx_splat_v4si_di): Revert "wa" constraint to "we". 2021-11-08 Richard Biener * cfgloop.c (verify_loop_structure): Use a temporary BB flag instead of an sbitmap to cache irreducible state. 2021-11-08 Aldy Hernandez PR tree-optimization/103120 * gimple-range-path.cc (path_range_query::range_defined_in_block): Bail if there's a cache entry. 2021-11-08 Bill Schmidt * config/rs6000/rs6000.c (rs6000_builtin_reciprocal): Use rs6000_builtin_decls_x when appropriate. (add_condition_to_bb): Likewise. (rs6000_atomic_assign_expand_fenv): Likewise. 2021-11-08 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_new_builtin_decl): New function. (rs6000_builtin_decl): Call it. 2021-11-08 Martin Liska * cgraph.c (cgraph_node::dump): Dump it from decl. 2021-11-08 Martin Liska PR gcov-profile/100520 * coverage.c (coverage_compute_profile_id): Strip .gk when compare debug is used. * system.h (endswith): New function. 2021-11-08 Martin Liska * cgraph.c (cgraph_node::dump): Dump static_chain_decl. 2021-11-08 Thomas Schwinge * config/rs6000/rbtree.c: Fix 'Copyright (C) 2020-21' into '2020-2021' * config/rs6000/rbtree.h: Likewise. * config/rs6000/rs6000-builtin-new.def: Likewise. * config/rs6000/rs6000-gen-builtins.c: Likewise. * config/rs6000/rs6000-overload.def: Likewise. 2021-11-08 Richard Sandiford * config/aarch64/aarch64.c (aarch64_ldn_stn_vectors): New function. (aarch64_address_cost): Use it instead of testing for CImode and XImode directly. 2021-11-08 Richard Sandiford * genmodes.c (emit_insn_modes_h): Define NUM_MODE_* macros. * expmed.h (NUM_MODE_INT): Delete in favor of genmodes definitions. (NUM_MODE_PARTIAL_INT, NUM_MODE_VECTOR_INT): Likewise. * real.h (real_format_for_mode): Use NUM_MODE_FLOAT and NUM_MODE_DECIMAL_FLOAT. (REAL_MODE_FORMAT): Likewise. 2021-11-08 Andre Vieira * tree-vect-loop.c (vect_better_loop_vinfo_p): Change how epilogue loop costs are compared. 2021-11-08 Richard Biener * tree-vectorizer.h (vect_create_loop_vinfo): Add main_loop_info parameter. * tree-vect-loop.c (vect_create_loop_vinfo): Likewise. Set LOOP_VINFO_ORIG_LOOP_INFO and conditionalize set of LOOP_VINFO_NITERS_ASSUMPTIONS. (vect_analyze_loop_1): Adjust. (vect_analyze_loop): Move loop constraint setting and SCEV/niter reset here from vect_create_loop_vinfo to perform it only once. (vect_analyze_loop_form): Move dumping of symbolic niters here from vect_create_loop_vinfo. 2021-11-08 Jan Hubicka * ipa-modref-tree.h (enum modref_special_parms): New enum. (struct modref_access_node): update for special parms. (struct modref_ref_node): Likewise. (struct modref_parm_map): Likewise. (struct modref_tree): Likewise. * ipa-modref.c (dump_access): Likewise. (get_access): Detect static chain. (parm_map_for_arg): Take tree as arg instead of stmt and index. (merge_call_side_effects): Compute map for static chain. (process_fnspec): Update. (struct escape_point): Remove retslot_arg and static_chain_arg. (analyze_parms): Update. (compute_parm_map): Update. (propagate_unknown_call): Update. (modref_propagate_in_scc): Update. (modref_merge_call_site_flags): Update. (ipa_merge_modref_summary_after_inlining): Update. * tree-ssa-alias.c (modref_may_conflict): Handle static chain. * ipa-modref-tree.c (test_merge): Update. 2021-11-08 Haochen Gui * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): Disable gimple fold for VSX_BUILTIN_XVMINDP, ALTIVEC_BUILTIN_VMINFP, VSX_BUILTIN_XVMAXDP, ALTIVEC_BUILTIN_VMAXFP when fast-math is not set. 2021-11-08 liuhongt PR tree-optimization/103077 * doc/invoke.texi (Options That Control Optimization): Update documentation for -ftree-loop-vectorize and -ftree-slp-vectorize which are enabled by default at -02. 2021-11-08 liuhongt PR target/102464 * match.pd (Simplifcation (trunc)copysign((extend)a, (extend)b) to .COPYSIGN (a, b)): Add !HONOR_SNANS. 2021-11-08 liuhongt PR target/102464 * match.pd: Simplify (trunc)fma ((extend)a, (extend)b, (extend)c) to IFN_FMA (a, b, c) under flag_unsafe_math_optimizations. 2021-11-07 Jan Hubicka PR ipa/103055 * params.opt (modref-max-depth): Add range. (modref-max-adjustments): Fix range. 2021-11-07 Aldy Hernandez * tree-pass.h (make_pass_vrp_threader): Remove. * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Remove ASSERT_EXPR references. * tree-ssa-threadedge.c (jt_state::register_equivs_stmt): Same. * tree-vrp.c (vrp_folder::simplify_casted_conds): Same. (execute_vrp): Same. (class hybrid_threader): Remove. (hybrid_threader::hybrid_threader): Remove. (hybrid_threader::~hybrid_threader): Remove. (hybrid_threader::before_dom_children): Remove. (hybrid_threader::after_dom_children): Remove. (execute_vrp_threader): Remove. (class pass_vrp_threader): Remove. (make_pass_vrp_threader): Remove. 2021-11-07 Jan Hubicka * gimple.c (gimple_call_arg_flags): Use interposable_eaf_flags. (gimple_call_retslot_flags): Likewise. (gimple_call_static_chain_flags): Likewise. * ipa-modref.c (remove_useless_eaf_flags): Do not remove everything for NOVOPS. (modref_summary::useful_p): Likewise. (modref_summary_lto::useful_p): Likewise. (analyze_parms): Do not give up on NOVOPS. (analyze_function): When dumping report chnages in EAF flags between IPA and local pass. (modref_merge_call_site_flags): Compute implicit eaf flags based on callee ecf_flags and fnspec; if the function does not bind to current defs use interposable_eaf_flags. (modref_propagate_flags_in_scc): Update. * ipa-modref.h (interposable_eaf_flags): New function. 2021-11-07 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_expand_new_builtin): New forward decl. (rs6000_invalid_new_builtin): New function. (rs6000_expand_builtin): Call rs6000_expand_new_builtin. (rs6000_expand_ldst_mask): New function. (new_cpu_expand_builtin): Likewise. (elemrev_icode): Likewise. (ldv_expand_builtin): Likewise. (lxvrse_expand_builtin): Likewise. (lxvrze_expand_builtin): Likewise. (stv_expand_builtin): Likewise. (new_mma_expand_builtin): Likewise. (new_htm_spr_num): Likewise. (new_htm_expand_builtin): Likewise. (rs6000_expand_new_builtin): Likewise. (rs6000_init_builtins): Initialize altivec_builtin_mask_for_load. 2021-11-07 Jan Hubicka * ipa-modref.c (modref_lattice): Add do_dataflow, changed and propagate_to fields. (modref_lattice::release): Free propagate_to (modref_lattice::merge): Do not give up early on unknown lattice values. (modref_lattice::merge_deref): Likewise. (modref_eaf_analysis): Update toplevel comment. (modref_eaf_analysis::analyze_ssa_name): Record postponned ssa names; do optimistic dataflow initialization. (modref_eaf_analysis::merge_with_ssa_name): Build dataflow graph. (modref_eaf_analysis::propagate): New member function. (analyze_parms): Update to new API of modref_eaf_analysis. 2021-11-06 Jan Hubicka * cgraph.h (cgraph_node::can_be_discarded_p): Do not return true on functions from other partition. 2021-11-06 David Edelsohn * config/rs6000/vsx.md (vsx_splat_v4si): Change constraints to "wa". (vsx_splat_v4si_di): Change constraint to "wa". 2021-11-06 Aldy Hernandez PR tree-optimization/103061 * value-relation.cc (path_oracle::path_oracle): Initialize m_killed_defs. (path_oracle::killing_def): Set m_killed_defs. (path_oracle::query_relation): Do not look at the root oracle for killed defs. * value-relation.h (class path_oracle): Add m_killed_defs. 2021-11-06 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::find_paths_to_names): Remove gotos and other cleanups. 2021-11-05 Jan Hubicka PR ipa/103073 * ipa-modref-tree.h (modref_tree::insert): Do nothing for paradoxical and zero sized accesses. 2021-11-05 Jan Hubicka PR ipa/103082 * ipa-modref-tree.h (struct modref_access_node): Avoid left shift of negative value 2021-11-05 Iain Sandoe * config/darwin.h (ASM_GENERATE_INTERNAL_LABEL): Add LTRAMP to the list of symbol prefixes that must be made linker- visible. 2021-11-05 Iain Sandoe * config.host: Add support for aarch64-*-darwin. * config/aarch64/host-aarch64-darwin.c: New file. * config/aarch64/x-darwin: New file. 2021-11-05 Andrew MacLeod PR tree-optimization/103093 * gimple-range-gori.cc (range_def_chain::get_imports): Remove assert. 2021-11-05 Andrew MacLeod PR tree-optimization/102943 * gimple-range-cache.cc (class update_list): New. (update_list::add): Replace add_to_update. (update_list::pop): New. (ranger_cache::ranger_cache): Adjust. (ranger_cache::~ranger_cache): Adjust. (ranger_cache::add_to_update): Delete. (ranger_cache::propagate_cache): Adjust to new class. (ranger_cache::propagate_updated_value): Ditto. (ranger_cache::fill_block_cache): Ditto. * gimple-range-cache.h (class ranger_cache): Adjust to update class. 2021-11-05 Richard Biener * tree-vect-loop.c (vect_analyze_loop): Remove obsolete comment and expand on another one. Combine nested if. 2021-11-05 John David Anglin PR libgomp/96661 * config/pa/pa-modes.def: Add OImode integer type. * config/pa/pa.c (pa_scalar_mode_supported_p): Allow TImode for TARGET_64BIT. * config/pa/pa.h (MIN_UNITS_PER_WORD) Define to MIN_UNITS_PER_WORD to UNITS_PER_WORD if IN_LIBGCC2. * config/pa/pa.md (addti3, addvti3, subti3, subvti3, negti2, negvti2, ashlti3, shrpd_internal): New patterns. Change some multi instruction types to multi. 2021-11-05 Jakub Jelinek PR bootstrap/100246 * config/i386/i386.h (stringop_algs::stringop_strategy::stringop_strategy): Make the ctor constexpr. 2021-11-05 Wilco Dijkstra PR target/103085 * config/aarch64/aarch64.c (aarch64_mov_operand_p): Strip the salt first. * config/aarch64/constraints.md: Support const in Usw. 2021-11-05 John David Anglin * config/pa/pa.h (PREFERRED_DEBUGGING_TYPE): Define to DWARF2_DEBUG. * config/pa/pa64-hpux.h (PREFERRED_DEBUGGING_TYPE): Remove define. 2021-11-05 Richard Biener * tree-vectorizer.h (vec_info_shared::n_stmts): Add. (LOOP_VINFO_N_STMTS): Likewise. (vec_info_for_bb): Remove unused function. * tree-vectorizer.c (vec_info_shared::vec_info_shared): Initialize n_stmts member. * tree-vect-loop.c: Remove INCLUDE_FUNCTIONAL. (vect_create_loop_vinfo): Do not set loop->aux. (vect_analyze_loop_2): Do not get n_stmts as argument, instead use LOOP_VINFO_N_STMTS. Set LOOP_VINFO_VECTORIZABLE_P here. (vect_analyze_loop_1): Remove callback, get the mode iterator and autodetected_vector_mode as argument, advancing the iterator and initializing autodetected_vector_mode here. (vect_analyze_loop): Split analysis loop into two, first processing main loops only and then epilogues. 2021-11-05 Martin Jambor * ipa-prop.c (compute_complex_assign_jump_func): Remove unnecessary check for RECORD_TYPE. 2021-11-05 Gerald Pfeifer * doc/install.texi2html: Do not generate old.html any longer. 2021-11-05 Martin Liska PR debug/102955 * opts.c (finish_options): Reset flag_gtoggle when it is used. 2021-11-05 Jakub Jelinek PR debug/103046 * dwarf2out.c (add_const_value_attribute): Add MODE argument, use it in CONST_WIDE_INT handling. Adjust recursive calls. (add_location_or_const_value_attribute): Pass DECL_MODE (decl) to new add_const_value_attribute argument. (tree_add_const_value_attribute): Pass TYPE_MODE (type) to new add_const_value_attribute argument. 2021-11-05 Rasmus Villemoes * config/vx-common.h: Test value of TARGET_VXWORKS7 rather than definedness. 2021-11-05 Richard Biener * tree-vectorizer.h (struct vect_loop_form_info): New. (vect_analyze_loop_form): Adjust. (vect_create_loop_vinfo): New. * tree-parloops.c (gather_scalar_reductions): Adjust for vect_analyze_loop_form API change. * tree-vect-loop.c: Include . (vect_analyze_loop_form_1): Rename to vect_analyze_loop_form, take struct vect_loop_form_info as output parameter and adjust. (vect_analyze_loop_form): Rename to vect_create_loop_vinfo and split out call to the original vect_analyze_loop_form_1. (vect_reanalyze_as_main_loop): Rename to... (vect_analyze_loop_1): ... this, factor out the call to vect_analyze_loop_form and generalize to be able to use it twice ... (vect_analyze_loop): ... here. Perform vect_analyze_loop_form once only and here. 2021-11-05 Xionghu Luo PR target/102991 * config/rs6000/fusion.md: Regenerate. * config/rs6000/genfusion.pl: Fix incorrect clobber constraint. 2021-11-04 Andreas Krebbel * config/s390/s390.h (STACK_CHECK_MOVING_SP): New macro definition. 2021-11-04 Tamar Christina * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): Add ashl, sshl, ushl, ashr, ashr_simd, lshr, lshr_simd. * config/aarch64/aarch64-simd-builtins.def (lshr): Use USHIFTIMM. * config/aarch64/arm_neon.h (vshr_n_u8, vshr_n_u16, vshr_n_u32, vshrq_n_u8, vshrq_n_u16, vshrq_n_u32, vshrq_n_u64): Fix type hack. 2021-11-04 Tamar Christina * match.pd: New negate+shift pattern. 2021-11-04 Andrew MacLeod PR tree-optimization/103079 * gimple-range-gori.cc (gimple_range_calc_op1): Treat undefined as varying. (gimple_range_calc_op2): Ditto. 2021-11-04 Martin Jambor PR ipa/93385 * ipa-param-manipulation.h (class ipa_param_body_adjustments): New members remap_with_debug_expressions, m_dead_ssa_debug_equiv, m_dead_stmt_debug_equiv and prepare_debug_expressions. Added parameter to mark_dead_statements. * ipa-param-manipulation.c: Include tree-phinodes.h and cfgexpand.h. (ipa_param_body_adjustments::mark_dead_statements): New parameter debugstack, push into it all SSA names used in debug statements, produce m_dead_ssa_debug_equiv mapping for the removed param. (replace_with_mapped_expr): New function. (ipa_param_body_adjustments::remap_with_debug_expressions): Likewise. (ipa_param_body_adjustments::prepare_debug_expressions): Likewise. (ipa_param_body_adjustments::common_initialization): Gather and procecc SSA which will be removed but are in debug statements. Simplify. (ipa_param_body_adjustments::ipa_param_body_adjustments): Initialize new members. * tree-inline.c (remap_gimple_stmt): Create a debug bind when possible when avoiding a copy of an unnecessary statement. Remap removed SSA names in existing debug statements. (tree_function_versioning): Do not create DEBUG_EXPR_DECL for removed parameters if we have already done so. 2021-11-04 Jan Hubicka PR ipa/103058 * gimple.c (gimple_call_static_chain_flags): Handle case when nested function does not bind locally. 2021-11-04 Jonathan Wright * config/aarch64/aarch64.c (aarch64_function_value): Generate a register rtx for Neon vector-tuple modes. (aarch64_layout_arg): Likewise. 2021-11-04 Jonathan Wright * lower-subreg.c (simple_move): Prevent decomposition if modes are not tieable. 2021-11-04 Jonathan Wright Richard Sandiford * config/aarch64/aarch64-builtins.c (v2x8qi_UP): Define. (v2x4hi_UP): Likewise. (v2x4hf_UP): Likewise. (v2x4bf_UP): Likewise. (v2x2si_UP): Likewise. (v2x2sf_UP): Likewise. (v2x1di_UP): Likewise. (v2x1df_UP): Likewise. (v2x16qi_UP): Likewise. (v2x8hi_UP): Likewise. (v2x8hf_UP): Likewise. (v2x8bf_UP): Likewise. (v2x4si_UP): Likewise. (v2x4sf_UP): Likewise. (v2x2di_UP): Likewise. (v2x2df_UP): Likewise. (v3x8qi_UP): Likewise. (v3x4hi_UP): Likewise. (v3x4hf_UP): Likewise. (v3x4bf_UP): Likewise. (v3x2si_UP): Likewise. (v3x2sf_UP): Likewise. (v3x1di_UP): Likewise. (v3x1df_UP): Likewise. (v3x16qi_UP): Likewise. (v3x8hi_UP): Likewise. (v3x8hf_UP): Likewise. (v3x8bf_UP): Likewise. (v3x4si_UP): Likewise. (v3x4sf_UP): Likewise. (v3x2di_UP): Likewise. (v3x2df_UP): Likewise. (v4x8qi_UP): Likewise. (v4x4hi_UP): Likewise. (v4x4hf_UP): Likewise. (v4x4bf_UP): Likewise. (v4x2si_UP): Likewise. (v4x2sf_UP): Likewise. (v4x1di_UP): Likewise. (v4x1df_UP): Likewise. (v4x16qi_UP): Likewise. (v4x8hi_UP): Likewise. (v4x8hf_UP): Likewise. (v4x8bf_UP): Likewise. (v4x4si_UP): Likewise. (v4x4sf_UP): Likewise. (v4x2di_UP): Likewise. (v4x2df_UP): Likewise. (TYPES_GETREGP): Delete. (TYPES_SETREGP): Likewise. (TYPES_LOADSTRUCT_U): Define. (TYPES_LOADSTRUCT_P): Likewise. (TYPES_LOADSTRUCT_LANE_U): Likewise. (TYPES_LOADSTRUCT_LANE_P): Likewise. (TYPES_STORE1P): Move for consistency. (TYPES_STORESTRUCT_U): Define. (TYPES_STORESTRUCT_P): Likewise. (TYPES_STORESTRUCT_LANE_U): Likewise. (TYPES_STORESTRUCT_LANE_P): Likewise. (aarch64_simd_tuple_types): Define. (aarch64_lookup_simd_builtin_type): Handle tuple type lookup. (aarch64_init_simd_builtin_functions): Update frontend lookup for builtin functions after handling arm_neon.h pragma. (register_tuple_type): Manually set modes of single-integer tuple types. Record tuple types. * config/aarch64/aarch64-modes.def (ADV_SIMD_D_REG_STRUCT_MODES): Define D-register tuple modes. (ADV_SIMD_Q_REG_STRUCT_MODES): Define Q-register tuple modes. (SVE_MODES): Give single-vector modes priority over vector- tuple modes. (VECTOR_MODES_WITH_PREFIX): Set partial-vector mode order to be after all single-vector modes. * config/aarch64/aarch64-simd-builtins.def: Update builtin generator macros to reflect modifications to the backend patterns. * config/aarch64/aarch64-simd.md (aarch64_simd_ld2): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld2): This. (aarch64_simd_ld2r): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld2r): This. (aarch64_vec_load_lanesoi_lane): Use vector-tuple mode iterator and rename to... (aarch64_vec_load_lanes_lane): This. (vec_load_lanesoi): Use vector-tuple mode iterator and rename to... (vec_load_lanes): This. (aarch64_simd_st2): Use vector-tuple mode iterator and rename to... (aarch64_simd_st2): This. (aarch64_vec_store_lanesoi_lane): Use vector-tuple mode iterator and rename to... (aarch64_vec_store_lanes_lane): This. (vec_store_lanesoi): Use vector-tuple mode iterator and rename to... (vec_store_lanes): This. (aarch64_simd_ld3): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld3): This. (aarch64_simd_ld3r): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld3r): This. (aarch64_vec_load_lanesci_lane): Use vector-tuple mode iterator and rename to... (vec_load_lanesci): This. (aarch64_simd_st3): Use vector-tuple mode iterator and rename to... (aarch64_simd_st3): This. (aarch64_vec_store_lanesci_lane): Use vector-tuple mode iterator and rename to... (vec_store_lanesci): This. (aarch64_simd_ld4): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld4): This. (aarch64_simd_ld4r): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld4r): This. (aarch64_vec_load_lanesxi_lane): Use vector-tuple mode iterator and rename to... (vec_load_lanesxi): This. (aarch64_simd_st4): Use vector-tuple mode iterator and rename to... (aarch64_simd_st4): This. (aarch64_vec_store_lanesxi_lane): Use vector-tuple mode iterator and rename to... (vec_store_lanesxi): This. (mov): Define for Neon vector-tuple modes. (aarch64_ld1x3): Use vector-tuple mode iterator and rename to... (aarch64_ld1x3): This. (aarch64_ld1_x3_): Use vector-tuple mode iterator and rename to... (aarch64_ld1_x3_): This. (aarch64_ld1x4): Use vector-tuple mode iterator and rename to... (aarch64_ld1x4): This. (aarch64_ld1_x4_): Use vector-tuple mode iterator and rename to... (aarch64_ld1_x4_): This. (aarch64_st1x2): Use vector-tuple mode iterator and rename to... (aarch64_st1x2): This. (aarch64_st1_x2_): Use vector-tuple mode iterator and rename to... (aarch64_st1_x2_): This. (aarch64_st1x3): Use vector-tuple mode iterator and rename to... (aarch64_st1x3): This. (aarch64_st1_x3_): Use vector-tuple mode iterator and rename to... (aarch64_st1_x3_): This. (aarch64_st1x4): Use vector-tuple mode iterator and rename to... (aarch64_st1x4): This. (aarch64_st1_x4_): Use vector-tuple mode iterator and rename to... (aarch64_st1_x4_): This. (*aarch64_mov): Define for vector-tuple modes. (*aarch64_be_mov): Likewise. (aarch64_ldr): Use vector-tuple mode iterator and rename to... (aarch64_ldr): This. (aarch64_ld2_dreg): Use vector-tuple mode iterator and rename to... (aarch64_ld2_dreg): This. (aarch64_ld3_dreg): Use vector-tuple mode iterator and rename to... (aarch64_ld3_dreg): This. (aarch64_ld4_dreg): Use vector-tuple mode iterator and rename to... (aarch64_ld4_dreg): This. (aarch64_ld): Use vector-tuple mode iterator and rename to... (aarch64_ld): Use vector-tuple mode iterator and rename to... (aarch64_ld): Use vector-tuple mode (aarch64_ld1x2): Delete. (aarch64_ld1x2): Use vector-tuple mode iterator and rename to... (aarch64_ld1x2): This. (aarch64_ld_lane): Use vector- tuple mode iterator and rename to... (aarch64_ld_lane): This. (aarch64_get_dreg): Delete. (aarch64_get_qreg): Likewise. (aarch64_st2_dreg): Use vector-tuple mode iterator and rename to... (aarch64_st2_dreg): This. (aarch64_st3_dreg): Use vector-tuple mode iterator and rename to... (aarch64_st3_dreg): This. (aarch64_st4_dreg): Use vector-tuple mode iterator and rename to... (aarch64_st4_dreg): This. (aarch64_st): Use vector-tuple mode iterator and rename to... (aarch64_st): This. (aarch64_st): Use vector-tuple mode iterator and rename to aarch64_st. (aarch64_st_lane): Use vector- tuple mode iterator and rename to... (aarch64_st_lane): This. (aarch64_set_qreg): Delete. (aarch64_simd_ld1_x2): Use vector-tuple mode iterator and rename to... (aarch64_simd_ld1_x2): This. * config/aarch64/aarch64.c (aarch64_advsimd_struct_mode_p): Refactor to include new vector-tuple modes. (aarch64_classify_vector_mode): Add cases for new vector- tuple modes. (aarch64_advsimd_partial_struct_mode_p): Define. (aarch64_advsimd_full_struct_mode_p): Likewise. (aarch64_advsimd_vector_array_mode): Likewise. (aarch64_sve_data_mode): Change location in file. (aarch64_array_mode): Handle case of Neon vector-tuple modes. (aarch64_hard_regno_nregs): Handle case of partial Neon vector structures. (aarch64_classify_address): Refactor to include handling of Neon vector-tuple modes. (aarch64_print_operand): Print "d" for "%R" for a partial Neon vector structure. (aarch64_expand_vec_perm_1): Use new vector-tuple mode. (aarch64_modes_tieable_p): Prevent tieing Neon partial struct modes with scalar machines modes larger than 8 bytes. (aarch64_can_change_mode_class): Don't allow changes between partial and full Neon vector-structure modes. * config/aarch64/arm_neon.h (vst2_lane_f16): Use updated builtin and remove boiler-plate code for opaque mode. (vst2_lane_f32): Likewise. (vst2_lane_f64): Likewise. (vst2_lane_p8): Likewise. (vst2_lane_p16): Likewise. (vst2_lane_p64): Likewise. (vst2_lane_s8): Likewise. (vst2_lane_s16): Likewise. (vst2_lane_s32): Likewise. (vst2_lane_s64): Likewise. (vst2_lane_u8): Likewise. (vst2_lane_u16): Likewise. (vst2_lane_u32): Likewise. (vst2_lane_u64): Likewise. (vst2q_lane_f16): Likewise. (vst2q_lane_f32): Likewise. (vst2q_lane_f64): Likewise. (vst2q_lane_p8): Likewise. (vst2q_lane_p16): Likewise. (vst2q_lane_p64): Likewise. (vst2q_lane_s8): Likewise. (vst2q_lane_s16): Likewise. (vst2q_lane_s32): Likewise. (vst2q_lane_s64): Likewise. (vst2q_lane_u8): Likewise. (vst2q_lane_u16): Likewise. (vst2q_lane_u32): Likewise. (vst2q_lane_u64): Likewise. (vst3_lane_f16): Likewise. (vst3_lane_f32): Likewise. (vst3_lane_f64): Likewise. (vst3_lane_p8): Likewise. (vst3_lane_p16): Likewise. (vst3_lane_p64): Likewise. (vst3_lane_s8): Likewise. (vst3_lane_s16): Likewise. (vst3_lane_s32): Likewise. (vst3_lane_s64): Likewise. (vst3_lane_u8): Likewise. (vst3_lane_u16): Likewise. (vst3_lane_u32): Likewise. (vst3_lane_u64): Likewise. (vst3q_lane_f16): Likewise. (vst3q_lane_f32): Likewise. (vst3q_lane_f64): Likewise. (vst3q_lane_p8): Likewise. (vst3q_lane_p16): Likewise. (vst3q_lane_p64): Likewise. (vst3q_lane_s8): Likewise. (vst3q_lane_s16): Likewise. (vst3q_lane_s32): Likewise. (vst3q_lane_s64): Likewise. (vst3q_lane_u8): Likewise. (vst3q_lane_u16): Likewise. (vst3q_lane_u32): Likewise. (vst3q_lane_u64): Likewise. (vst4_lane_f16): Likewise. (vst4_lane_f32): Likewise. (vst4_lane_f64): Likewise. (vst4_lane_p8): Likewise. (vst4_lane_p16): Likewise. (vst4_lane_p64): Likewise. (vst4_lane_s8): Likewise. (vst4_lane_s16): Likewise. (vst4_lane_s32): Likewise. (vst4_lane_s64): Likewise. (vst4_lane_u8): Likewise. (vst4_lane_u16): Likewise. (vst4_lane_u32): Likewise. (vst4_lane_u64): Likewise. (vst4q_lane_f16): Likewise. (vst4q_lane_f32): Likewise. (vst4q_lane_f64): Likewise. (vst4q_lane_p8): Likewise. (vst4q_lane_p16): Likewise. (vst4q_lane_p64): Likewise. (vst4q_lane_s8): Likewise. (vst4q_lane_s16): Likewise. (vst4q_lane_s32): Likewise. (vst4q_lane_s64): Likewise. (vst4q_lane_u8): Likewise. (vst4q_lane_u16): Likewise. (vst4q_lane_u32): Likewise. (vst4q_lane_u64): Likewise. (vtbl3_s8): Likewise. (vtbl3_u8): Likewise. (vtbl3_p8): Likewise. (vtbl4_s8): Likewise. (vtbl4_u8): Likewise. (vtbl4_p8): Likewise. (vld1_u8_x3): Likewise. (vld1_s8_x3): Likewise. (vld1_u16_x3): Likewise. (vld1_s16_x3): Likewise. (vld1_u32_x3): Likewise. (vld1_s32_x3): Likewise. (vld1_u64_x3): Likewise. (vld1_s64_x3): Likewise. (vld1_f16_x3): Likewise. (vld1_f32_x3): Likewise. (vld1_f64_x3): Likewise. (vld1_p8_x3): Likewise. (vld1_p16_x3): Likewise. (vld1_p64_x3): Likewise. (vld1q_u8_x3): Likewise. (vld1q_s8_x3): Likewise. (vld1q_u16_x3): Likewise. (vld1q_s16_x3): Likewise. (vld1q_u32_x3): Likewise. (vld1q_s32_x3): Likewise. (vld1q_u64_x3): Likewise. (vld1q_s64_x3): Likewise. (vld1q_f16_x3): Likewise. (vld1q_f32_x3): Likewise. (vld1q_f64_x3): Likewise. (vld1q_p8_x3): Likewise. (vld1q_p16_x3): Likewise. (vld1q_p64_x3): Likewise. (vld1_u8_x2): Likewise. (vld1_s8_x2): Likewise. (vld1_u16_x2): Likewise. (vld1_s16_x2): Likewise. (vld1_u32_x2): Likewise. (vld1_s32_x2): Likewise. (vld1_u64_x2): Likewise. (vld1_s64_x2): Likewise. (vld1_f16_x2): Likewise. (vld1_f32_x2): Likewise. (vld1_f64_x2): Likewise. (vld1_p8_x2): Likewise. (vld1_p16_x2): Likewise. (vld1_p64_x2): Likewise. (vld1q_u8_x2): Likewise. (vld1q_s8_x2): Likewise. (vld1q_u16_x2): Likewise. (vld1q_s16_x2): Likewise. (vld1q_u32_x2): Likewise. (vld1q_s32_x2): Likewise. (vld1q_u64_x2): Likewise. (vld1q_s64_x2): Likewise. (vld1q_f16_x2): Likewise. (vld1q_f32_x2): Likewise. (vld1q_f64_x2): Likewise. (vld1q_p8_x2): Likewise. (vld1q_p16_x2): Likewise. (vld1q_p64_x2): Likewise. (vld1_s8_x4): Likewise. (vld1q_s8_x4): Likewise. (vld1_s16_x4): Likewise. (vld1q_s16_x4): Likewise. (vld1_s32_x4): Likewise. (vld1q_s32_x4): Likewise. (vld1_u8_x4): Likewise. (vld1q_u8_x4): Likewise. (vld1_u16_x4): Likewise. (vld1q_u16_x4): Likewise. (vld1_u32_x4): Likewise. (vld1q_u32_x4): Likewise. (vld1_f16_x4): Likewise. (vld1q_f16_x4): Likewise. (vld1_f32_x4): Likewise. (vld1q_f32_x4): Likewise. (vld1_p8_x4): Likewise. (vld1q_p8_x4): Likewise. (vld1_p16_x4): Likewise. (vld1q_p16_x4): Likewise. (vld1_s64_x4): Likewise. (vld1_u64_x4): Likewise. (vld1_p64_x4): Likewise. (vld1q_s64_x4): Likewise. (vld1q_u64_x4): Likewise. (vld1q_p64_x4): Likewise. (vld1_f64_x4): Likewise. (vld1q_f64_x4): Likewise. (vld2_s64): Likewise. (vld2_u64): Likewise. (vld2_f64): Likewise. (vld2_s8): Likewise. (vld2_p8): Likewise. (vld2_p64): Likewise. (vld2_s16): Likewise. (vld2_p16): Likewise. (vld2_s32): Likewise. (vld2_u8): Likewise. (vld2_u16): Likewise. (vld2_u32): Likewise. (vld2_f16): Likewise. (vld2_f32): Likewise. (vld2q_s8): Likewise. (vld2q_p8): Likewise. (vld2q_s16): Likewise. (vld2q_p16): Likewise. (vld2q_p64): Likewise. (vld2q_s32): Likewise. (vld2q_s64): Likewise. (vld2q_u8): Likewise. (vld2q_u16): Likewise. (vld2q_u32): Likewise. (vld2q_u64): Likewise. (vld2q_f16): Likewise. (vld2q_f32): Likewise. (vld2q_f64): Likewise. (vld3_s64): Likewise. (vld3_u64): Likewise. (vld3_f64): Likewise. (vld3_s8): Likewise. (vld3_p8): Likewise. (vld3_s16): Likewise. (vld3_p16): Likewise. (vld3_s32): Likewise. (vld3_u8): Likewise. (vld3_u16): Likewise. (vld3_u32): Likewise. (vld3_f16): Likewise. (vld3_f32): Likewise. (vld3_p64): Likewise. (vld3q_s8): Likewise. (vld3q_p8): Likewise. (vld3q_s16): Likewise. (vld3q_p16): Likewise. (vld3q_s32): Likewise. (vld3q_s64): Likewise. (vld3q_u8): Likewise. (vld3q_u16): Likewise. (vld3q_u32): Likewise. (vld3q_u64): Likewise. (vld3q_f16): Likewise. (vld3q_f32): Likewise. (vld3q_f64): Likewise. (vld3q_p64): Likewise. (vld4_s64): Likewise. (vld4_u64): Likewise. (vld4_f64): Likewise. (vld4_s8): Likewise. (vld4_p8): Likewise. (vld4_s16): Likewise. (vld4_p16): Likewise. (vld4_s32): Likewise. (vld4_u8): Likewise. (vld4_u16): Likewise. (vld4_u32): Likewise. (vld4_f16): Likewise. (vld4_f32): Likewise. (vld4_p64): Likewise. (vld4q_s8): Likewise. (vld4q_p8): Likewise. (vld4q_s16): Likewise. (vld4q_p16): Likewise. (vld4q_s32): Likewise. (vld4q_s64): Likewise. (vld4q_u8): Likewise. (vld4q_u16): Likewise. (vld4q_u32): Likewise. (vld4q_u64): Likewise. (vld4q_f16): Likewise. (vld4q_f32): Likewise. (vld4q_f64): Likewise. (vld4q_p64): Likewise. (vld2_dup_s8): Likewise. (vld2_dup_s16): Likewise. (vld2_dup_s32): Likewise. (vld2_dup_f16): Likewise. (vld2_dup_f32): Likewise. (vld2_dup_f64): Likewise. (vld2_dup_u8): Likewise. (vld2_dup_u16): Likewise. (vld2_dup_u32): Likewise. (vld2_dup_p8): Likewise. (vld2_dup_p16): Likewise. (vld2_dup_p64): Likewise. (vld2_dup_s64): Likewise. (vld2_dup_u64): Likewise. (vld2q_dup_s8): Likewise. (vld2q_dup_p8): Likewise. (vld2q_dup_s16): Likewise. (vld2q_dup_p16): Likewise. (vld2q_dup_s32): Likewise. (vld2q_dup_s64): Likewise. (vld2q_dup_u8): Likewise. (vld2q_dup_u16): Likewise. (vld2q_dup_u32): Likewise. (vld2q_dup_u64): Likewise. (vld2q_dup_f16): Likewise. (vld2q_dup_f32): Likewise. (vld2q_dup_f64): Likewise. (vld2q_dup_p64): Likewise. (vld3_dup_s64): Likewise. (vld3_dup_u64): Likewise. (vld3_dup_f64): Likewise. (vld3_dup_s8): Likewise. (vld3_dup_p8): Likewise. (vld3_dup_s16): Likewise. (vld3_dup_p16): Likewise. (vld3_dup_s32): Likewise. (vld3_dup_u8): Likewise. (vld3_dup_u16): Likewise. (vld3_dup_u32): Likewise. (vld3_dup_f16): Likewise. (vld3_dup_f32): Likewise. (vld3_dup_p64): Likewise. (vld3q_dup_s8): Likewise. (vld3q_dup_p8): Likewise. (vld3q_dup_s16): Likewise. (vld3q_dup_p16): Likewise. (vld3q_dup_s32): Likewise. (vld3q_dup_s64): Likewise. (vld3q_dup_u8): Likewise. (vld3q_dup_u16): Likewise. (vld3q_dup_u32): Likewise. (vld3q_dup_u64): Likewise. (vld3q_dup_f16): Likewise. (vld3q_dup_f32): Likewise. (vld3q_dup_f64): Likewise. (vld3q_dup_p64): Likewise. (vld4_dup_s64): Likewise. (vld4_dup_u64): Likewise. (vld4_dup_f64): Likewise. (vld4_dup_s8): Likewise. (vld4_dup_p8): Likewise. (vld4_dup_s16): Likewise. (vld4_dup_p16): Likewise. (vld4_dup_s32): Likewise. (vld4_dup_u8): Likewise. (vld4_dup_u16): Likewise. (vld4_dup_u32): Likewise. (vld4_dup_f16): Likewise. (vld4_dup_f32): Likewise. (vld4_dup_p64): Likewise. (vld4q_dup_s8): Likewise. (vld4q_dup_p8): Likewise. (vld4q_dup_s16): Likewise. (vld4q_dup_p16): Likewise. (vld4q_dup_s32): Likewise. (vld4q_dup_s64): Likewise. (vld4q_dup_u8): Likewise. (vld4q_dup_u16): Likewise. (vld4q_dup_u32): Likewise. (vld4q_dup_u64): Likewise. (vld4q_dup_f16): Likewise. (vld4q_dup_f32): Likewise. (vld4q_dup_f64): Likewise. (vld4q_dup_p64): Likewise. (vld2_lane_u8): Likewise. (vld2_lane_u16): Likewise. (vld2_lane_u32): Likewise. (vld2_lane_u64): Likewise. (vld2_lane_s8): Likewise. (vld2_lane_s16): Likewise. (vld2_lane_s32): Likewise. (vld2_lane_s64): Likewise. (vld2_lane_f16): Likewise. (vld2_lane_f32): Likewise. (vld2_lane_f64): Likewise. (vld2_lane_p8): Likewise. (vld2_lane_p16): Likewise. (vld2_lane_p64): Likewise. (vld2q_lane_u8): Likewise. (vld2q_lane_u16): Likewise. (vld2q_lane_u32): Likewise. (vld2q_lane_u64): Likewise. (vld2q_lane_s8): Likewise. (vld2q_lane_s16): Likewise. (vld2q_lane_s32): Likewise. (vld2q_lane_s64): Likewise. (vld2q_lane_f16): Likewise. (vld2q_lane_f32): Likewise. (vld2q_lane_f64): Likewise. (vld2q_lane_p8): Likewise. (vld2q_lane_p16): Likewise. (vld2q_lane_p64): Likewise. (vld3_lane_u8): Likewise. (vld3_lane_u16): Likewise. (vld3_lane_u32): Likewise. (vld3_lane_u64): Likewise. (vld3_lane_s8): Likewise. (vld3_lane_s16): Likewise. (vld3_lane_s32): Likewise. (vld3_lane_s64): Likewise. (vld3_lane_f16): Likewise. (vld3_lane_f32): Likewise. (vld3_lane_f64): Likewise. (vld3_lane_p8): Likewise. (vld3_lane_p16): Likewise. (vld3_lane_p64): Likewise. (vld3q_lane_u8): Likewise. (vld3q_lane_u16): Likewise. (vld3q_lane_u32): Likewise. (vld3q_lane_u64): Likewise. (vld3q_lane_s8): Likewise. (vld3q_lane_s16): Likewise. (vld3q_lane_s32): Likewise. (vld3q_lane_s64): Likewise. (vld3q_lane_f16): Likewise. (vld3q_lane_f32): Likewise. (vld3q_lane_f64): Likewise. (vld3q_lane_p8): Likewise. (vld3q_lane_p16): Likewise. (vld3q_lane_p64): Likewise. (vld4_lane_u8): Likewise. (vld4_lane_u16): Likewise. (vld4_lane_u32): Likewise. (vld4_lane_u64): Likewise. (vld4_lane_s8): Likewise. (vld4_lane_s16): Likewise. (vld4_lane_s32): Likewise. (vld4_lane_s64): Likewise. (vld4_lane_f16): Likewise. (vld4_lane_f32): Likewise. (vld4_lane_f64): Likewise. (vld4_lane_p8): Likewise. (vld4_lane_p16): Likewise. (vld4_lane_p64): Likewise. (vld4q_lane_u8): Likewise. (vld4q_lane_u16): Likewise. (vld4q_lane_u32): Likewise. (vld4q_lane_u64): Likewise. (vld4q_lane_s8): Likewise. (vld4q_lane_s16): Likewise. (vld4q_lane_s32): Likewise. (vld4q_lane_s64): Likewise. (vld4q_lane_f16): Likewise. (vld4q_lane_f32): Likewise. (vld4q_lane_f64): Likewise. (vld4q_lane_p8): Likewise. (vld4q_lane_p16): Likewise. (vld4q_lane_p64): Likewise. (vqtbl2_s8): Likewise. (vqtbl2_u8): Likewise. (vqtbl2_p8): Likewise. (vqtbl2q_s8): Likewise. (vqtbl2q_u8): Likewise. (vqtbl2q_p8): Likewise. (vqtbl3_s8): Likewise. (vqtbl3_u8): Likewise. (vqtbl3_p8): Likewise. (vqtbl3q_s8): Likewise. (vqtbl3q_u8): Likewise. (vqtbl3q_p8): Likewise. (vqtbl4_s8): Likewise. (vqtbl4_u8): Likewise. (vqtbl4_p8): Likewise. (vqtbl4q_s8): Likewise. (vqtbl4q_u8): Likewise. (vqtbl4q_p8): Likewise. (vqtbx2_s8): Likewise. (vqtbx2_u8): Likewise. (vqtbx2_p8): Likewise. (vqtbx2q_s8): Likewise. (vqtbx2q_u8): Likewise. (vqtbx2q_p8): Likewise. (vqtbx3_s8): Likewise. (vqtbx3_u8): Likewise. (vqtbx3_p8): Likewise. (vqtbx3q_s8): Likewise. (vqtbx3q_u8): Likewise. (vqtbx3q_p8): Likewise. (vqtbx4_s8): Likewise. (vqtbx4_u8): Likewise. (vqtbx4_p8): Likewise. (vqtbx4q_s8): Likewise. (vqtbx4q_u8): Likewise. (vqtbx4q_p8): Likewise. (vst1_s64_x2): Likewise. (vst1_u64_x2): Likewise. (vst1_f64_x2): Likewise. (vst1_s8_x2): Likewise. (vst1_p8_x2): Likewise. (vst1_s16_x2): Likewise. (vst1_p16_x2): Likewise. (vst1_s32_x2): Likewise. (vst1_u8_x2): Likewise. (vst1_u16_x2): Likewise. (vst1_u32_x2): Likewise. (vst1_f16_x2): Likewise. (vst1_f32_x2): Likewise. (vst1_p64_x2): Likewise. (vst1q_s8_x2): Likewise. (vst1q_p8_x2): Likewise. (vst1q_s16_x2): Likewise. (vst1q_p16_x2): Likewise. (vst1q_s32_x2): Likewise. (vst1q_s64_x2): Likewise. (vst1q_u8_x2): Likewise. (vst1q_u16_x2): Likewise. (vst1q_u32_x2): Likewise. (vst1q_u64_x2): Likewise. (vst1q_f16_x2): Likewise. (vst1q_f32_x2): Likewise. (vst1q_f64_x2): Likewise. (vst1q_p64_x2): Likewise. (vst1_s64_x3): Likewise. (vst1_u64_x3): Likewise. (vst1_f64_x3): Likewise. (vst1_s8_x3): Likewise. (vst1_p8_x3): Likewise. (vst1_s16_x3): Likewise. (vst1_p16_x3): Likewise. (vst1_s32_x3): Likewise. (vst1_u8_x3): Likewise. (vst1_u16_x3): Likewise. (vst1_u32_x3): Likewise. (vst1_f16_x3): Likewise. (vst1_f32_x3): Likewise. (vst1_p64_x3): Likewise. (vst1q_s8_x3): Likewise. (vst1q_p8_x3): Likewise. (vst1q_s16_x3): Likewise. (vst1q_p16_x3): Likewise. (vst1q_s32_x3): Likewise. (vst1q_s64_x3): Likewise. (vst1q_u8_x3): Likewise. (vst1q_u16_x3): Likewise. (vst1q_u32_x3): Likewise. (vst1q_u64_x3): Likewise. (vst1q_f16_x3): Likewise. (vst1q_f32_x3): Likewise. (vst1q_f64_x3): Likewise. (vst1q_p64_x3): Likewise. (vst1_s8_x4): Likewise. (vst1q_s8_x4): Likewise. (vst1_s16_x4): Likewise. (vst1q_s16_x4): Likewise. (vst1_s32_x4): Likewise. (vst1q_s32_x4): Likewise. (vst1_u8_x4): Likewise. (vst1q_u8_x4): Likewise. (vst1_u16_x4): Likewise. (vst1q_u16_x4): Likewise. (vst1_u32_x4): Likewise. (vst1q_u32_x4): Likewise. (vst1_f16_x4): Likewise. (vst1q_f16_x4): Likewise. (vst1_f32_x4): Likewise. (vst1q_f32_x4): Likewise. (vst1_p8_x4): Likewise. (vst1q_p8_x4): Likewise. (vst1_p16_x4): Likewise. (vst1q_p16_x4): Likewise. (vst1_s64_x4): Likewise. (vst1_u64_x4): Likewise. (vst1_p64_x4): Likewise. (vst1q_s64_x4): Likewise. (vst1q_u64_x4): Likewise. (vst1q_p64_x4): Likewise. (vst1_f64_x4): Likewise. (vst1q_f64_x4): Likewise. (vst2_s64): Likewise. (vst2_u64): Likewise. (vst2_f64): Likewise. (vst2_s8): Likewise. (vst2_p8): Likewise. (vst2_s16): Likewise. (vst2_p16): Likewise. (vst2_s32): Likewise. (vst2_u8): Likewise. (vst2_u16): Likewise. (vst2_u32): Likewise. (vst2_f16): Likewise. (vst2_f32): Likewise. (vst2_p64): Likewise. (vst2q_s8): Likewise. (vst2q_p8): Likewise. (vst2q_s16): Likewise. (vst2q_p16): Likewise. (vst2q_s32): Likewise. (vst2q_s64): Likewise. (vst2q_u8): Likewise. (vst2q_u16): Likewise. (vst2q_u32): Likewise. (vst2q_u64): Likewise. (vst2q_f16): Likewise. (vst2q_f32): Likewise. (vst2q_f64): Likewise. (vst2q_p64): Likewise. (vst3_s64): Likewise. (vst3_u64): Likewise. (vst3_f64): Likewise. (vst3_s8): Likewise. (vst3_p8): Likewise. (vst3_s16): Likewise. (vst3_p16): Likewise. (vst3_s32): Likewise. (vst3_u8): Likewise. (vst3_u16): Likewise. (vst3_u32): Likewise. (vst3_f16): Likewise. (vst3_f32): Likewise. (vst3_p64): Likewise. (vst3q_s8): Likewise. (vst3q_p8): Likewise. (vst3q_s16): Likewise. (vst3q_p16): Likewise. (vst3q_s32): Likewise. (vst3q_s64): Likewise. (vst3q_u8): Likewise. (vst3q_u16): Likewise. (vst3q_u32): Likewise. (vst3q_u64): Likewise. (vst3q_f16): Likewise. (vst3q_f32): Likewise. (vst3q_f64): Likewise. (vst3q_p64): Likewise. (vst4_s64): Likewise. (vst4_u64): Likewise. (vst4_f64): Likewise. (vst4_s8): Likewise. (vst4_p8): Likewise. (vst4_s16): Likewise. (vst4_p16): Likewise. (vst4_s32): Likewise. (vst4_u8): Likewise. (vst4_u16): Likewise. (vst4_u32): Likewise. (vst4_f16): Likewise. (vst4_f32): Likewise. (vst4_p64): Likewise. (vst4q_s8): Likewise. (vst4q_p8): Likewise. (vst4q_s16): Likewise. (vst4q_p16): Likewise. (vst4q_s32): Likewise. (vst4q_s64): Likewise. (vst4q_u8): Likewise. (vst4q_u16): Likewise. (vst4q_u32): Likewise. (vst4q_u64): Likewise. (vst4q_f16): Likewise. (vst4q_f32): Likewise. (vst4q_f64): Likewise. (vst4q_p64): Likewise. (vtbx4_s8): Likewise. (vtbx4_u8): Likewise. (vtbx4_p8): Likewise. (vld1_bf16_x2): Likewise. (vld1q_bf16_x2): Likewise. (vld1_bf16_x3): Likewise. (vld1q_bf16_x3): Likewise. (vld1_bf16_x4): Likewise. (vld1q_bf16_x4): Likewise. (vld2_bf16): Likewise. (vld2q_bf16): Likewise. (vld2_dup_bf16): Likewise. (vld2q_dup_bf16): Likewise. (vld3_bf16): Likewise. (vld3q_bf16): Likewise. (vld3_dup_bf16): Likewise. (vld3q_dup_bf16): Likewise. (vld4_bf16): Likewise. (vld4q_bf16): Likewise. (vld4_dup_bf16): Likewise. (vld4q_dup_bf16): Likewise. (vst1_bf16_x2): Likewise. (vst1q_bf16_x2): Likewise. (vst1_bf16_x3): Likewise. (vst1q_bf16_x3): Likewise. (vst1_bf16_x4): Likewise. (vst1q_bf16_x4): Likewise. (vst2_bf16): Likewise. (vst2q_bf16): Likewise. (vst3_bf16): Likewise. (vst3q_bf16): Likewise. (vst4_bf16): Likewise. (vst4q_bf16): Likewise. (vld2_lane_bf16): Likewise. (vld2q_lane_bf16): Likewise. (vld3_lane_bf16): Likewise. (vld3q_lane_bf16): Likewise. (vld4_lane_bf16): Likewise. (vld4q_lane_bf16): Likewise. (vst2_lane_bf16): Likewise. (vst2q_lane_bf16): Likewise. (vst3_lane_bf16): Likewise. (vst3q_lane_bf16): Likewise. (vst4_lane_bf16): Likewise. (vst4q_lane_bf16): Likewise. * config/aarch64/geniterators.sh: Modify iterator regex to match new vector-tuple modes. * config/aarch64/iterators.md (insn_count): Extend mode attribute with vector-tuple type information. (nregs): Likewise. (Vendreg): Likewise. (Vetype): Likewise. (Vtype): Likewise. (VSTRUCT_2D): New mode iterator. (VSTRUCT_2DNX): Likewise. (VSTRUCT_2DX): Likewise. (VSTRUCT_2Q): Likewise. (VSTRUCT_2QD): Likewise. (VSTRUCT_3D): Likewise. (VSTRUCT_3DNX): Likewise. (VSTRUCT_3DX): Likewise. (VSTRUCT_3Q): Likewise. (VSTRUCT_3QD): Likewise. (VSTRUCT_4D): Likewise. (VSTRUCT_4DNX): Likewise. (VSTRUCT_4DX): Likewise. (VSTRUCT_4Q): Likewise. (VSTRUCT_4QD): Likewise. (VSTRUCT_D): Likewise. (VSTRUCT_Q): Likewise. (VSTRUCT_QD): Likewise. (VSTRUCT_ELT): New mode attribute. (vstruct_elt): Likewise. * genmodes.c (VECTOR_MODE): Add default prefix and order parameters. (VECTOR_MODE_WITH_PREFIX): Define. (make_vector_mode): Add mode prefix and order parameters. 2021-11-04 Jonathan Wright * expmed.c (extract_bit_field_1): Ensure modes are tieable. 2021-11-04 Jonathan Wright * expr.c (emit_group_load_1): Remove historic workaround. 2021-11-04 Jonathan Wright * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins): Factor out main loop to... (aarch64_init_simd_builtin_functions): This new function. (register_tuple_type): Define. (aarch64_scalar_builtin_type_p): Define. (handle_arm_neon_h): Define. * config/aarch64/aarch64-c.c (aarch64_pragma_aarch64): Handle pragma for arm_neon.h. * config/aarch64/aarch64-protos.h (aarch64_advsimd_struct_mode_p): Declare. (handle_arm_neon_h): Likewise. * config/aarch64/aarch64.c (aarch64_advsimd_struct_mode_p): Remove static modifier. * config/aarch64/arm_neon.h (target): Remove Neon vector structure type definitions. 2021-11-04 Aldy Hernandez PR tree-optimization/102943 * gimple-range-path.cc (path_range_query::range_on_path_entry): Prefer range_of_expr unless there are no statements in the BB. 2021-11-04 Aldy Hernandez PR tree-optimization/102943 * tree-ssa-threadbackward.c (back_threader::find_paths_to_names): Avoid duplicate calculation of paths. 2021-11-04 Aldy Hernandez PR tree-optimization/102943 * gimple-range-path.cc (path_range_query::compute_phi_relations): Only compute relations for SSA names in the import list. (path_range_query::compute_outgoing_relations): Same. * gimple-range-path.h (path_range_query::import_p): New. 2021-11-04 Richard Biener PR rtl-optimization/103075 * simplify-rtx.c (exact_int_to_float_conversion_p): Return false for a VOIDmode operand. 2021-11-04 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vector_costs): Make member variables private and add "m_" to their names. Remove is_loop. (aarch64_record_potential_advsimd_unrolling): Replace with... (aarch64_vector_costs::record_potential_advsimd_unrolling): ...this. (aarch64_analyze_loop_vinfo): Replace with... (aarch64_vector_costs::analyze_loop_vinfo): ...this. Move initialization of (m_)vec_flags to add_stmt_cost. (aarch64_analyze_bb_vinfo): Delete. (aarch64_count_ops): Replace with... (aarch64_vector_costs::count_ops): ...this. (aarch64_vector_costs::add_stmt_cost): Set m_vec_flags, using m_costing_for_scalar to test whether we're costing scalar or vector code. (aarch64_adjust_body_cost_sve): Replace with... (aarch64_vector_costs::adjust_body_cost_sve): ...this. (aarch64_adjust_body_cost): Replace with... (aarch64_vector_costs::adjust_body_cost): ...this. (aarch64_vector_costs::finish_cost): Use m_vinfo instead of is_loop. 2021-11-04 Richard Sandiford * target.def (targetm.vectorize.init_cost): Replace with... (targetm.vectorize.create_costs): ...this. (targetm.vectorize.add_stmt_cost): Delete. (targetm.vectorize.finish_cost): Likewise. (targetm.vectorize.destroy_cost_data): Likewise. * doc/tm.texi.in (TARGET_VECTORIZE_INIT_COST): Replace with... (TARGET_VECTORIZE_CREATE_COSTS): ...this. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * doc/tm.texi: Regenerate. * tree-vectorizer.h (vec_info::vec_info): Remove target_cost_data parameter. (vec_info::target_cost_data): Change from a void * to a vector_costs *. (vector_costs): New class. (init_cost): Take a vec_info and return a vector_costs. (dump_stmt_cost): Remove data parameter. (add_stmt_cost): Replace vinfo and data parameters with a vector_costs. (add_stmt_costs): Likewise. (finish_cost): Replace data parameter with a vector_costs. (destroy_cost_data): Delete. * tree-vectorizer.c (dump_stmt_cost): Remove data argument and don't print it. (vec_info::vec_info): Remove the target_cost_data parameter and initialize the member variable to null instead. (vec_info::~vec_info): Delete target_cost_data instead of calling destroy_cost_data. (vector_costs::add_stmt_cost): New function. (vector_costs::finish_cost): Likewise. (vector_costs::record_stmt_cost): Likewise. (vector_costs::adjust_cost_for_freq): Likewise. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Update call to vec_info::vec_info. (vect_compute_single_scalar_iteration_cost): Update after above changes to costing interface. (vect_analyze_loop_operations): Likewise. (vect_estimate_min_profitable_iters): Likewise. (vect_analyze_loop_2): Initialize LOOP_VINFO_TARGET_COST_DATA at the start_over point, where it needs to be recreated after trying without slp. Update retry code accordingly. * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Update call to vec_info::vec_info. (vect_slp_analyze_operation): Update after above changes to costing interface. (vect_bb_vectorization_profitable_p): Likewise. * targhooks.h (default_init_cost): Replace with... (default_vectorize_create_costs): ...this. (default_add_stmt_cost): Delete. (default_finish_cost, default_destroy_cost_data): Likewise. * targhooks.c (default_init_cost): Replace with... (default_vectorize_create_costs): ...this. (default_add_stmt_cost): Delete, moving logic to vector_costs instead. (default_finish_cost, default_destroy_cost_data): Delete. * config/aarch64/aarch64.c (aarch64_vector_costs): Inherit from vector_costs. Add a constructor. (aarch64_init_cost): Replace with... (aarch64_vectorize_create_costs): ...this. (aarch64_add_stmt_cost): Replace with... (aarch64_vector_costs::add_stmt_cost): ...this. Use record_stmt_cost to adjust the cost for inner loops. (aarch64_finish_cost): Replace with... (aarch64_vector_costs::finish_cost): ...this. (aarch64_destroy_cost_data): Delete. (TARGET_VECTORIZE_INIT_COST): Replace with... (TARGET_VECTORIZE_CREATE_COSTS): ...this. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/i386/i386.c (ix86_vector_costs): New structure. (ix86_init_cost): Replace with... (ix86_vectorize_create_costs): ...this. (ix86_add_stmt_cost): Replace with... (ix86_vector_costs::add_stmt_cost): ...this. Use adjust_cost_for_freq to adjust the cost for inner loops. (ix86_finish_cost, ix86_destroy_cost_data): Delete. (TARGET_VECTORIZE_INIT_COST): Replace with... (TARGET_VECTORIZE_CREATE_COSTS): ...this. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. * config/rs6000/rs6000.c (TARGET_VECTORIZE_INIT_COST): Replace with... (TARGET_VECTORIZE_CREATE_COSTS): ...this. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. (rs6000_cost_data): Inherit from vector_costs. Add a constructor. Drop loop_info, cost and costing_for_scalar in favor of the corresponding vector_costs member variables. Add "m_" to the names of the remaining member variables and initialize them. (rs6000_density_test): Replace with... (rs6000_cost_data::density_test): ...this. (rs6000_init_cost): Replace with... (rs6000_vectorize_create_costs): ...this. (rs6000_update_target_cost_per_stmt): Replace with... (rs6000_cost_data::update_target_cost_per_stmt): ...this. (rs6000_add_stmt_cost): Replace with... (rs6000_cost_data::add_stmt_cost): ...this. Use adjust_cost_for_freq to adjust the cost for inner loops. (rs6000_adjust_vect_cost_per_loop): Replace with... (rs6000_cost_data::adjust_vect_cost_per_loop): ...this. (rs6000_finish_cost): Replace with... (rs6000_cost_data::finish_cost): ...this. Group loop code into a single if statement and pass the loop_vinfo down to subroutines. (rs6000_destroy_cost_data): Delete. 2021-11-04 Aldy Hernandez PR tree-optimization/103062 PR tree-optimization/103062 * value-pointer-equiv.cc (ssa_equiv_stack::ssa_equiv_stack): Increase size of allocation by 1. (ssa_equiv_stack::push_replacement): Grow as needed. (ssa_equiv_stack::get_replacement): Same. (pointer_equiv_analyzer::pointer_equiv_analyzer): Same. (pointer_equiv_analyzer::~pointer_equiv_analyzer): Remove delete. (pointer_equiv_analyzer::set_global_equiv): Grow as needed. (pointer_equiv_analyzer::get_equiv): Same. (pointer_equiv_analyzer::get_equiv_expr): Remove const. * value-pointer-equiv.h (class pointer_equiv_analyzer): Remove const markers. Use auto_vec instead of tree *. 2021-11-04 Richard Biener * tree-ssa-sccvn.c (vn_nary_op_insert_into): Remove always true parameter and inline valueization. (vn_nary_op_lookup_1): Inline valueization from ... (vn_nary_op_compute_hash): ... here and remove it here. * tree-ssa-pre.c (phi_translate_1): Do not valueize before vn_nary_lookup_pieces. (get_representative_for): Mark created SSA representatives as visited. 2021-11-04 Richard Sandiford * simplify-rtx.c (simplify_context::simplify_gen_vec_select): Assert that the operand has a vector mode. Use subreg_lowpart_offset to test whether an index corresponds to the low part. 2021-11-04 Richard Sandiford * read-rtl.c: Remove dead !GENERATOR_FILE block. * read-rtl-function.c (function_reader::consolidate_singletons): Generate canonical CONST_VECTORs. 2021-11-04 liuhongt PR target/101989 * config/i386/predicates.md (reg_or_notreg_operand): Rename to .. (regmem_or_bitnot_regmem_operand): .. and extend to handle memory_operand. * config/i386/sse.md (*_vpternlog_1): Force_reg the operands which are required to be register_operand. (*_vpternlog_2): Ditto. (*_vpternlog_3): Ditto. (*_vternlog_all): Disallow embeded broadcast for vector HFmodes since it's not a real AVX512FP16 instruction. 2021-11-04 liuhongt PR target/102464 * match.pd: simplify (trunc)copysign((extend)a, (extend)b) to .COPYSIGN (a,b) when a and b are same type as the truncation type and has less precision than extend type. 2021-11-04 Richard Biener * doc/generic.texi: Update TARGET_MEM_REF and MEM_REF documentation. 2021-11-04 Hongyu Wang * config/i386/sse.md (VI2_AVX512VNNIBW): New mode iterator. (VI1_AVX512VNNI): Likewise. (SDOT_VPDP_SUF): New mode_attr. (VI1SI): Likewise. (vi1si): Likewise. (sdot_prod): Use VI2_AVX512F iterator, expand to vpdpwssd when VNNI targets available. (usdot_prod): New expander for vector QImode. 2021-11-04 Hongyu Wang * config/i386/amxtileintrin.h (_tile_loadd_internal): Add parentheses to base and stride. (_tile_stream_loadd_internal): Likewise. (_tile_stored_internal): Likewise. 2021-11-03 Maciej W. Rozycki * config/riscv/riscv.c (riscv_class_max_nregs): Swap the arguments to `reg_class_subset_p'. 2021-11-03 Joseph Myers PR c/103031 * fold-const.c (fold_init): New function. * fold-const.h (fold_init): New prototype. 2021-11-03 Andrew MacLeod * params.opt (param_vrp2_mode): Make ranger the default for VRP2. 2021-11-03 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_phi): Don't import a range from edge if arg == phidef. 2021-11-03 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_builtin_call): Test for constant before any other processing. 2021-11-03 Andrew MacLeod * flag-types.h (RANGER_DEBUG_ALL): Fix values. 2021-11-03 Andrew MacLeod * gimple-range.cc (gimple_ranger::gimple_ranger): Initialize current_bb. (gimple_ranger::range_of_expr): Pick up range_on_entry when there is no explcit context and current_bb is set. (gimple_ranger::fold_stmt): New. * gimple-range.h (current_bb, fold_stmt): New. * tree-vrp.c (rvrp_folder::fold_stmt): Call ranger's fold_stmt. 2021-11-03 Richard Biener PR tree-optimization/102970 * tree-ssa-pre.c (phi_translate_1): Drop clique and base when translating a MEM_REF over a backedge. 2021-11-03 Philipp Tomsich * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Ampere-1 core. * config/aarch64/aarch64-tune.md: Regenerate. * config/aarch64/aarch64-cost-tables.h: Add extra costs for Ampere-1. * config/aarch64/aarch64.c: Add tuning structures for Ampere-1. * doc/invoke.texi: Add documentation for Ampere-1 core. 2021-11-03 Wilco Dijkstra * config/aarch64/aarch64.md (movsi): Add alternative for GOT accesses. (movdi): Likewise. (ldr_got_small_): Remove pattern. (ldr_got_small_sidi): Likewise. * config/aarch64/aarch64.c (aarch64_load_symref_appropriately): Keep GOT accesses as moves. (aarch64_print_operand): Correctly print got_lo12 in L specifier. (aarch64_mov_operand_p): Make GOT accesses valid move operands. * config/aarch64/constraints.md: Add new constraint Usw for GOT access. 2021-11-03 Martin Liska * gcov.c (read_line): Remove dead variable. 2021-11-03 Martin Liska PR bootstrap/102828 * ipa-fnsummary.c (edge_predicate_pool): Rename predicate class to ipa_predicate. (ipa_fn_summary::account_size_time): Likewise. (edge_set_predicate): Likewise. (set_hint_predicate): Likewise. (add_freqcounting_predicate): Likewise. (evaluate_conditions_for_known_args): Likewise. (evaluate_properties_for_edge): Likewise. (remap_freqcounting_preds_after_dup): Likewise. (ipa_fn_summary_t::duplicate): Likewise. (set_cond_stmt_execution_predicate): Likewise. (set_switch_stmt_execution_predicate): Likewise. (compute_bb_predicates): Likewise. (will_be_nonconstant_expr_predicate): Likewise. (will_be_nonconstant_predicate): Likewise. (phi_result_unknown_predicate): Likewise. (predicate_for_phi_result): Likewise. (analyze_function_body): Likewise. (compute_fn_summary): Likewise. (summarize_calls_size_and_time): Likewise. (estimate_calls_size_and_time): Likewise. (ipa_call_context::estimate_size_and_time): Likewise. (remap_edge_summaries): Likewise. (remap_freqcounting_predicate): Likewise. (ipa_merge_fn_summary_after_inlining): Likewise. (ipa_update_overall_fn_summary): Likewise. (read_ipa_call_summary): Likewise. (inline_read_section): Likewise. * ipa-fnsummary.h (struct ipa_freqcounting_predicate): Likewise. * ipa-predicate.c (predicate::add_clause): Likewise. (ipa_predicate::add_clause): Likewise. (predicate::or_with): Likewise. (ipa_predicate::or_with): Likewise. (predicate::evaluate): Likewise. (ipa_predicate::evaluate): Likewise. (predicate::probability): Likewise. (ipa_predicate::probability): Likewise. (dump_condition): Likewise. (dump_clause): Likewise. (predicate::dump): Likewise. (ipa_predicate::dump): Likewise. (predicate::debug): Likewise. (ipa_predicate::debug): Likewise. (predicate::remap_after_duplication): Likewise. (ipa_predicate::remap_after_duplication): Likewise. (predicate::remap_after_inlining): Likewise. (ipa_predicate::remap_after_inlining): Likewise. (predicate::stream_in): Likewise. (ipa_predicate::stream_in): Likewise. (predicate::stream_out): Likewise. (ipa_predicate::stream_out): Likewise. (add_condition): Likewise. * ipa-predicate.h (class predicate): Likewise. (class ipa_predicate): Likewise. (add_condition): Likewise. 2021-11-03 Richard Biener * bitmap.h (bitmap_bit_p): Change the return type to bool. * bitmap.c (bitmap_bit_p): Likewise. * sbitmap.h (bitmap_bit_p): Likewise. (bitmap_set_bit): Return whether the bit changed. (bitmap_clear_bit): Likewise. * tree-ssa.c (verify_vssa): Make use of the changed state from bitmap_set_bit. 2021-11-03 Richard Biener PR middle-end/103033 * internal-fn.c (expand_DEFERRED_INIT): Elide the native_interpret_expr path in favor of folding the VIEW_CONVERT_EXPR generated when punning the RHS. 2021-11-03 Stefan Schulze Frielinghaus * config/s390/s390.c (s390_loop_unroll_adjust): In case of early exit free bbs. 2021-11-03 Jan Hubicka PR ipa/103040 * ipa-modref.c (callee_to_caller_flags): New function. (modref_eaf_analysis::analyze_ssa_name): Use it. (ipa_merge_modref_summary_after_inlining): Fix whitespace. 2021-11-02 Jan Hubicka * ipa-modref.c (modref_eaf_analysis::analyze_ssa_name): Revert accidental commit. 2021-11-02 Roger Sayle Uroš Bizjak * config/i386/i386.md (ti3): Provide expansion for rotations by non-constant amounts. 2021-11-02 Jan Hubicka * ipa-modref.c: Fix anonymous namespace placement. (class modref_eaf_analysis): New class. (analyze_ssa_name_flags): Turn to ... (modref_eaf_analysis::analyze_ssa_name): ... this one. (merge_call_lhs_flags): Turn to ... (modref_eaf_analysis::merge_call_lhs_flags): .. this one (modref_eaf_analysis::merge_with_ssa_name): New member function. (record_escape_points): Turn to ... (modref_eaf_analysis::record_escape_points): ... this one. (analyze_parms): Updat (ipa_merge_modref_summary_after_inlining): Move to the end of file. 2021-11-02 Jan Hubicka * gimple.c (gimple_call_static_chain_flags): New function. * gimple.h (gimple_call_static_chain_flags): Declare * ipa-modref.c (modref_summary::modref_summary): Initialize static_chain_flags. (modref_summary_lto::modref_summary_lto): Likewise. (modref_summary::useful_p): Test static_chain_flags. (modref_summary_lto::useful_p): Likewise. (struct modref_summary_lto): Add static_chain_flags. (modref_summary::dump): Dump static_chain_flags. (modref_summary_lto::dump): Likewise. (struct escape_point): Add static_cahin_arg. (analyze_ssa_name_flags): Use gimple_call_static_chain_flags. (analyze_parms): Handle static chains. (modref_summaries::duplicate): Duplicate static_chain_flags. (modref_summaries_lto::duplicate): Likewise. (modref_write): Stream static_chain_flags. (read_section): Likewise. (modref_merge_call_site_flags): Handle static_chain_flags. * ipa-modref.h (struct modref_summary): Add static_chain_flags. * tree-ssa-structalias.c (handle_rhs_call): Use gimple_static_chain_flags. 2021-11-02 Richard Biener PR tree-optimization/103029 * tree-vect-loop-manip.c (vect_loop_versioning): Ensure the PHI nodes in the loop maintain their original operand order. 2021-11-02 Jan Hubicka * tree-core.h (EAF_NOT_RETURNED_DIRECTLY): New flag. (EAF_NOREAD): Renumber. * ipa-modref.c (dump_eaf_flags): Dump EAF_NOT_RETURNED_DIRECTLY. (remove_useless_eaf_flags): Handle EAF_NOT_RETURNED_DIRECTLY (deref_flags): Likewise. (modref_lattice::init): Likewise. (modref_lattice::merge): Likewise. (merge_call_lhs_flags): Likewise. (analyze_ssa_name_flags): Likewise. (modref_merge_call_site_flags): Likewise. * tree-ssa-structalias.c (handle_call_arg): Likewise. 2021-11-02 Maciej W. Rozycki * config/riscv/riscv.c (riscv_rtx_costs): Correct a CONST_INT_P check and remove an unused local variable with shNadd/shNadd.uw pattern handling. 2021-11-02 Tamar Christina PR tree-optimization/103007 * tree-vect-slp-patterns.c (complex_fms_pattern::matches): Add elem check. 2021-11-02 Richard Biener PR middle-end/103038 * fold-const.c (native_interpret_expr): Handle OFFSET_TYPE. (can_native_interpret_type_p): Likewise. * internal-fn.c (expand_DEFERRED_INIT): View-convert the RHS if the LHS is an SSA name. 2021-11-02 Richard Sandiford * langhooks.h (lang_hooks_for_types::simulate_record_decl): New hook. * langhooks-def.h (lhd_simulate_record_decl): Declare. (LANG_HOOKS_SIMULATE_RECORD_DECL): Define. (LANG_HOOKS_FOR_TYPES_INITIALIZER): Include it. * langhooks.c (lhd_simulate_record_decl): New function. 2021-11-02 Jakub Jelinek PR target/103020 * config/i386/i386.c (ix86_vector_mode_supported_p): Reject vector modes with TImode inner mode if 32-bit. 2021-11-02 liuhongt * doc/sourcebuild.texi (vect_slp_v4qi_store_unalign, vect_slp_v2hi_store_unalign, vect_slp_v4hi_store_unalign, vect_slp_v4si_store_unalign): Document efficient target. (vect_slp_v4qi_store_unalign_1, vect_slp_v8qi_store_unalign_1, vect_slp_v16qi_store_unalign_1): Ditto. (vect_slp_v2hi_store_align,vect_slp_v2qi_store_align, vect_slp_v2si_store_align, vect_slp_v4qi_store_align): Ditto. (struct_4char_block_move, struct_8char_block_move, struct_16char_block_move): Ditto. 2021-11-02 Roger Sayle Jakub Jelinek PR target/102986 * config/i386/i386-expand.c (ix86_expand_v1ti_to_ti, ix86_expand_ti_to_v1ti): New helper functions. (ix86_expand_v1ti_shift): Check if the amount operand is an integer constant, and expand as a TImode shift if it isn't. (ix86_expand_v1ti_rotate): Check if the amount operand is an integer constant, and expand as a TImode rotate if it isn't. (ix86_expand_v1ti_ashiftrt): New function to expand arithmetic right shifts of V1TImode quantities. * config/i386/i386-protos.h (ix86_expand_v1ti_ashift): Prototype. * config/i386/sse.md (ashlv1ti3, lshrv1ti3): Change constraints to QImode general_operand, and let the helper functions lower shifts by non-constant operands, as TImode shifts. Make conditional on TARGET_64BIT. (ashrv1ti3): New expander calling ix86_expand_v1ti_ashiftrt. (rotlv1ti3, rotrv1ti3): Change shift operand to QImode. Make conditional on TARGET_64BIT. 2021-11-02 Stefan Schulze Frielinghaus * config/s390/s390.md ("*cc_to_int", "tabort", "*tabort_1", "*tabort_1_plus"): Remove operands non-null check. 2021-11-01 Martin Liska * opt-functions.awk: Add new sanity checking. * optc-gen.awk: Add new argument to integer_range_info. * params.opt: Update 2 params which have negative IntegerRange. 2021-11-01 qing zhao * gimplify.c (gimplify_decl_expr): Do not add call to __builtin_clear_padding when a variable is a gimple register or it might not have padding. (gimplify_init_constructor): Likewise. 2021-11-01 Tamar Christina * config/arm/aarch-common-protos.h (struct vector_cost_table): Add movi, dup and extract costing fields. * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs, thunderx_extra_costs, thunderx2t99_extra_costs, thunderx3t110_extra_costs, tsv110_extra_costs, a64fx_extra_costs): Use them. * config/arm/aarch-cost-tables.h (generic_extra_costs, cortexa53_extra_costs, cortexa57_extra_costs, cortexa76_extra_costs, exynosm1_extra_costs, xgene1_extra_costs): Likewise * config/aarch64/aarch64-simd.md (aarch64_simd_dup): Add r->w dup. * config/aarch64/aarch64.c (aarch64_rtx_costs): Add extra costs. 2021-11-01 Tamar Christina * cse.c (add_to_set): New. (find_sets_in_insn): Register constants in sets. (canonicalize_insn): Use auto_vec instead. (cse_insn): Try materializing using vec_dup. * rtl.h (simplify_context::simplify_gen_vec_select, simplify_gen_vec_select): New. * simplify-rtx.c (simplify_context::simplify_gen_vec_select): New. 2021-11-01 David Malcolm * common.opt (fdiagnostics-escape-format=): New. (diagnostics_escape_format): New enum. (DIAGNOSTICS_ESCAPE_FORMAT_UNICODE): New enum value. (DIAGNOSTICS_ESCAPE_FORMAT_BYTES): Likewise. * diagnostic-format-json.cc (json_end_diagnostic): Add "escape-source" attribute. * diagnostic-show-locus.c (exploc_with_display_col::exploc_with_display_col): Replace "tabstop" param with a cpp_char_column_policy and add an "aspect" param. Use these to compute m_display_col accordingly. (struct char_display_policy): New struct. (layout::m_policy): New field. (layout::m_escape_on_output): New field. (def_policy): New function. (make_range): Update for changes to exploc_with_display_col ctor. (default_print_decoded_ch): New. (width_per_escaped_byte): New. (escape_as_bytes_width): New. (escape_as_bytes_print): New. (escape_as_unicode_width): New. (escape_as_unicode_print): New. (make_policy): New. (layout::layout): Initialize new fields. Update m_exploc ctor call for above change to ctor. (layout::maybe_add_location_range): Update for changes to exploc_with_display_col ctor. (layout::calculate_x_offset_display): Update for change to cpp_display_width. (layout::print_source_line): Pass policy to cpp_display_width_computation. Capture cpp_decoded_char when calling process_next_codepoint. Move printing of source code to m_policy.m_print_cb. (line_label::line_label): Pass in policy rather than context. (layout::print_any_labels): Update for change to line_label ctor. (get_affected_range): Pass in policy rather than context, updating calls to location_compute_display_column accordingly. (get_printed_columns): Likewise, also for cpp_display_width. (correction::correction): Pass in policy rather than tabstop. (correction::compute_display_cols): Pass m_policy rather than m_tabstop to cpp_display_width. (correction::m_tabstop): Replace with... (correction::m_policy): ...this. (line_corrections::line_corrections): Pass in policy rather than context. (line_corrections::m_context): Replace with... (line_corrections::m_policy): ...this. (line_corrections::add_hint): Update to use m_policy rather than m_context. (line_corrections::add_hint): Likewise. (layout::print_trailing_fixits): Likewise. (selftest::test_display_widths): New. (selftest::test_layout_x_offset_display_utf8): Update to use policy rather than tabstop. (selftest::test_one_liner_labels_utf8): Add test of escaping source lines. (selftest::test_diagnostic_show_locus_one_liner_utf8): Update to use policy rather than tabstop. (selftest::test_overlapped_fixit_printing): Likewise. (selftest::test_overlapped_fixit_printing_utf8): Likewise. (selftest::test_overlapped_fixit_printing_2): Likewise. (selftest::test_tab_expansion): Likewise. (selftest::test_escaping_bytes_1): New. (selftest::test_escaping_bytes_2): New. (selftest::diagnostic_show_locus_c_tests): Call the new tests. * diagnostic.c (diagnostic_initialize): Initialize context->escape_format. (convert_column_unit): Update to use default character width policy. (selftest::test_diagnostic_get_location_text): Likewise. * diagnostic.h (enum diagnostics_escape_format): New enum. (diagnostic_context::escape_format): New field. * doc/invoke.texi (-fdiagnostics-escape-format=): New option. (-fdiagnostics-format=): Add "escape-source" attribute to examples of JSON output, and document it. * input.c (location_compute_display_column): Pass in "policy" rather than "tabstop", passing to cpp_byte_column_to_display_column. (selftest::test_cpp_utf8): Update to use cpp_char_column_policy. * input.h (class cpp_char_column_policy): New forward decl. (location_compute_display_column): Pass in "policy" rather than "tabstop". * opts.c (common_handle_option): Handle OPT_fdiagnostics_escape_format_. * selftest.c (temp_source_file::temp_source_file): New ctor overload taking a size_t. * selftest.h (temp_source_file::temp_source_file): Likewise. 2021-11-01 Aldy Hernandez * dbgcnt.def: Add debug counter for back_thread[12] and back_threadfull[12]. * passes.def: Pass "first" argument to each back threading pass. * tree-ssa-threadbackward.c (back_threader::back_threader): Add first argument. (back_threader::debug_counter): New. (back_threader::maybe_register_path): Call debug_counter. 2021-11-01 Aldy Hernandez * tree-ssa-threadbackward.c (BT_NONE): New. (BT_SPEED): New. (BT_RESOLVE): New. (back_threader::back_threader): Add flags. Move loop initialization here. (back_threader::~back_threader): New. (back_threader::find_taken_edge_switch): Change solver and ranger to pointers. (back_threader::find_taken_edge_cond): Same. (back_threader::find_paths_to_names): Same. (back_threader::find_paths): Same. (back_threader::dump): Same. (try_thread_blocks): Merge into thread_blocks. (back_threader::thread_blocks): New. (do_early_thread_jumps): Merge into thread_blocks. (do_thread_jumps): Merge into thread_blocks. (back_threader::thread_through_all_blocks): Remove. 2021-11-01 Andrew MacLeod PR tree-optimization/103003 * value-relation.cc (dom_oracle::register_relation): If the 2 ssa names are the same, don't register any relation. 2021-11-01 Dan Li * config/aarch64/aarch64.c (aarch64_expand_epilogue): Remove redundant check for calls_eh_return. * config/aarch64/aarch64.md (*do_return): Likewise. 2021-11-01 Xionghu Luo * cfghooks.c (cfg_hook_duplicate_loop_to_header_edge): Rename duplicate_loop_to_header_edge to duplicate_loop_body_to_header_edge. (cfg_hook_duplicate_loop_body_to_header_edge): Likewise. * cfghooks.h (struct cfg_hooks): Likewise. (cfg_hook_duplicate_loop_body_to_header_edge): Likewise. * cfgloopmanip.c (duplicate_loop_body_to_header_edge): Likewise. (clone_loop_to_header_edge): Likewise. * cfgloopmanip.h (duplicate_loop_body_to_header_edge): Likewise. * cfgrtl.c (struct cfg_hooks): Likewise. * doc/loop.texi: Likewise. * loop-unroll.c (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. (unroll_loop_stupid): Likewise. (apply_opt_in_copies): Likewise. * tree-cfg.c (struct cfg_hooks): Likewise. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise. (try_peel_loop): Likewise. * tree-ssa-loop-manip.c (copy_phi_node_args): Likewise. (gimple_duplicate_loop_body_to_header_edge): Likewise. (tree_transform_and_unroll_loop): Likewise. * tree-ssa-loop-manip.h (gimple_duplicate_loop_body_to_header_edge): Likewise. 2021-11-01 Xionghu Luo * cfgloopmanip.c (loop_version): Refactor loopify to loop_version. Move condition generation after loopify. (loopify): Delete. * cfgloopmanip.h (loopify): Delete. 2021-10-31 Jan Hubicka * ipa-fnsummary.c: Include tree-dfa.h. (points_to_local_or_readonly_memory_p): Return true on return slot writes. * ipa-modref.c (analyze_ssa_name_flags): Fix handling of copy statement. 2021-10-30 Tobias Burnus PR middle-end/102972 * omp-low.c (omp_runtime_api_call): Use DECL_ASSEMBLER_NAME to get internal Fortran name; new permit_num_teams arg to permit omp_get_num_teams and omp_get_team_num. (scan_omp_1_stmt): Update call to it, add missing call for reverse offload, and check for strictly nested API calls in teams. 2021-10-30 Jakub Jelinek * gimplify.c (gimplify_omp_for): Diagnose threadprivate iterators. 2021-10-29 David Malcolm * selftest.c (assert_streq): Add newlines when emitting non-equal non-NULL strings. 2021-10-29 David Malcolm * Makefile.in: Fix syntax for reference to LIBDEPS in gengtype link rule. 2021-10-29 Bernhard Reutner-Fischer * doc/install.texi: Bump required minimum DejaGnu version. 2021-10-29 Aldy Hernandez Andrew MacLeod * value-relation.cc (path_oracle::killing_def): Add a self-equivalence so we don't look to the root oracle. 2021-10-29 Aldy Hernandez * passes.def: Replace the pass_thread_jumps before VRP* with pass_thread_jumps_full. Remove all pass_vrp_threader instances. * tree-ssa-threadbackward.c (pass_data_thread_jumps_full): Remove hyphen from "thread-full" name. 2021-10-29 Andrew MacLeod PR tree-optimization/102983 * gimple-range-cache.h (propagate_updated_value): Make public. * gimple-range.cc (gimple_ranger::range_of_stmt): Propagate exports when processing gcond stmts. 2021-10-29 Jan Hubicka * gimple.c (gimple_call_retslot_flags): New function. * gimple.h (gimple_call_retslot_flags): Declare. * ipa-modref.c: Include tree-cfg.h. (struct escape_entry): Turn parm_index to signed. (modref_summary_lto::modref_summary_lto): Add retslot_flags. (modref_summary::modref_summary): Initialize retslot_flags. (struct modref_summary_lto): Likewise. (modref_summary::useful_p): Check retslot_flags. (modref_summary_lto::useful_p): Likewise. (modref_summary::dump): Dump retslot_flags. (modref_summary_lto::dump): Likewise. (struct escape_point): Add hidden_args enum. (analyze_ssa_name_flags): Ignore return slot return; use gimple_call_retslot_flags. (record_escape_points): Break out from ... (analyze_parms): ... here; handle retslot_flags. (modref_summaries::duplicate): Duplicate retslot_flags. (modref_summaries_lto::duplicate): Likewise. (modref_write_escape_summary): Stream parm_index as signed. (modref_read_escape_summary): Likewise. (modref_write): Stream retslot_flags. (read_section): Likewise. (struct escape_map): Fix typo in comment. (update_escape_summary_1): Fix whitespace. (ipa_merge_modref_summary_after_inlining): Drop retslot_flags. (modref_merge_call_site_flags): Merge retslot_flags. * ipa-modref.h (struct modref_summary): Add retslot_flags. * tree-ssa-structalias.c (handle_rhs_call): Handle retslot_flags. 2021-10-29 Tamar Christina PR tree-optimization/102977 * tree-vect-slp-patterns.c (vect_match_call_p): Remove. (vect_detect_pair_op): Add crosslane check. (vect_match_call_complex_mla): Remove. (class complex_mul_pattern): Update comment. (complex_mul_pattern::matches): Update detection. (class complex_fma_pattern): Remove. (complex_fma_pattern::matches): Remove. (complex_fma_pattern::recognize): Remove. (complex_fma_pattern::build): Remove. (class complex_fms_pattern): Update comment. (complex_fms_pattern::matches): Remove. (complex_operations_pattern::recognize): Remove complex_fma_pattern 2021-10-29 Jakub Jelinek * gimple-fold.c (gimple_fold_builtin_memset): Copy over location from call to store. 2021-10-29 Xionghu Luo PR target/102868 * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Add patterns match and emit for VSX xxpermdi. 2021-10-29 liuhongt PR target/102464 * config/i386/i386-builtin-types.def (V8HF_FTYPE_V8HF): New function type. (V16HF_FTYPE_V16HF): Ditto. (V32HF_FTYPE_V32HF): Ditto. (V8HF_FTYPE_V8HF_ROUND): Ditto. (V16HF_FTYPE_V16HF_ROUND): Ditto. (V32HF_FTYPE_V32HF_ROUND): Ditto. * config/i386/i386-builtin.def ( IX86_BUILTIN_FLOORPH, IX86_BUILTIN_CEILPH, IX86_BUILTIN_TRUNCPH, IX86_BUILTIN_FLOORPH256, IX86_BUILTIN_CEILPH256, IX86_BUILTIN_TRUNCPH256, IX86_BUILTIN_FLOORPH512, IX86_BUILTIN_CEILPH512, IX86_BUILTIN_TRUNCPH512): New builtin. * config/i386/i386-builtins.c (ix86_builtin_vectorized_function): Enable vectorization for HFmode FLOOR/CEIL/TRUNC operation. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtins. * config/i386/sse.md (rint2, nearbyint2): Extend to vector HFmodes. 2021-10-28 Aldy Hernandez Andrew MacLeod * value-relation.cc (path_oracle::killing_def): Walk the equivalency list and remove SSA from any equivalencies. 2021-10-28 Stafford Horne * config/or1k/or1k.h (PROFILE_HOOK): Add return address argument to _mcount. 2021-10-28 Jakub Jelinek PR tree-optimization/102951 * fold-const.h (address_compare): Declare. * fold-const.c (address_compare): New function. * match.pd (cmp (convert1?@2 addr@0) (convert2? addr@1)): Use address_compare helper. (minmax cmp (convert1?@2 addr@0) (convert2?@3 addr@1)): New simplification. 2021-10-28 Andrew MacLeod * vr-values.c (simplify_using_ranges::fold_cond): Change fold message. 2021-10-28 Andrew MacLeod PR tree-optimization/102940 * tree-vrp.c (execute_ranger_vrp): Reset scev. 2021-10-28 Richard Purdie * config/nios2/linux.h (MUSL_DYNAMIC_LINKER): Add musl linker 2021-10-28 Richard Purdie * configure: Regenerate. * configure.ac: Use CPPFLAGS_FOR_BUILD for GMPINC 2021-10-28 Eric Botcazou * doc/invoke.texi (%X): Remove obsolete reference to -Wl. 2021-10-28 Richard Biener PR middle-end/84407 * fold-const.c (fold_convert_const): Avoid int to float constant folding with -frounding-math and inexact result. * simplify-rtx.c (simplify_const_unary_operation): Likewise for both float and unsigned_float. 2021-10-28 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::find_taken_edge_switch): Use find_case_label_range instead of find_taken_edge. 2021-10-28 Aldy Hernandez * tree-ssa-threadbackward.c (class back_threader_registry): Inherit from back_jt_path_registry. (back_threader_registry::thread_through_all_blocks): Remove. (back_threader_registry::register_path): Remove m_lowlevel_registry prefix. 2021-10-28 Richard Biener PR middle-end/57245 * fold-const.c (fold_convert_const_real_from_real): Honor -frounding-math if the conversion is not exact. * simplify-rtx.c (simplify_const_unary_operation): Do not simplify FLOAT_TRUNCATE with sign dependent rounding. 2021-10-28 Richard Biener PR tree-optimization/102949 * tree-vect-stmts.c (ensure_base_align): Look at the dr_info of a group leader and assert we are looking at one with analyzed alignment. 2021-10-28 Kewen Lin PR target/102767 * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Consider V1T1 mode for unaligned load and store. 2021-10-28 Kito Cheng * config/riscv/riscv.md (zero_extendsidi2_internal): Allow ZBB use this pattern. 2021-10-28 Kito Cheng * config/riscv/arch-canonicalize (CANONICAL_ORDER): Add `i` to CANONICAL_ORDER. 2021-10-28 Alexandre Oliva * common.opt (fharden-compares): New. (fharden-conditional-branches): New. * doc/invoke.texi: Document new options. * gimple-harden-conditionals.cc: New. * Makefile.in (OBJS): Build it. * passes.def: Add new passes. * tree-pass.h (make_pass_harden_compares): Declare. (make_pass_harden_conditional_branches): Declare. 2021-10-28 Xionghu Luo PR target/94613 * config/rs6000/altivec.md: Add vsx register constraints. * config/rs6000/vsx.md (vsx_xxsel): Delete. (vsx_xxsel2): Likewise. (vsx_xxsel3): Likewise. (vsx_xxsel4): Likewise. 2021-10-28 Xionghu Luo PR target/94613 * config/rs6000/altivec.md (*altivec_vsel): Change to ... (altivec_vsel): ... this and update define. (*altivec_vsel_uns): Delete. (altivec_vsel2): New define_insn. (altivec_vsel3): Likewise. (altivec_vsel4): Likewise. * config/rs6000/rs6000-call.c (altivec_expand_vec_sel_builtin): New. (altivec_expand_builtin): Call altivec_expand_vec_sel_builtin to expand vel_sel. * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Use bit-wise selection instead of per element. * config/rs6000/vector.md: * config/rs6000/vsx.md (*vsx_xxsel): Change to ... (vsx_xxsel): ... this and update define. (*vsx_xxsel_uns): Delete. (vsx_xxsel2): New define_insn. (vsx_xxsel3): Likewise. (vsx_xxsel4): Likewise. 2021-10-28 Hongyu Wang * config/i386/i386.c (use_rsqrt_p): Add mode parameter, enable HFmode rsqrt without TARGET_SSE_MATH. (ix86_optab_supported_p): Refactor rint, adjust floor, ceil, btrunc condition to be restricted by -ftrapping-math, adjust use_rsqrt_p function call. * config/i386/i386.md (rcphf2): New define_insn. (rsqrthf2): Likewise. * config/i386/sse.md (div3): Change VF2H to VF2. (div3): New expander for HF mode. (rsqrt2): Likewise. (*avx512fp16_vmrcpv8hf2): New define_insn for rpad pass. (*avx512fp16_vmrsqrtv8hf2): Likewise. 2021-10-27 Saagar Jha * config.gcc: Adjust for Darwin21. * config/darwin-c.c (macosx_version_as_macro): Likewise. * config/darwin-driver.c (validate_macosx_version_min): Likewise. (darwin_find_version_from_kernel): Likewise. 2021-10-27 Aldy Hernandez * gimple-range-path.cc (path_range_query::range_defined_in_block): Call killing_def. 2021-10-27 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::range_of_range_op): Dump operands as well as relation. * gimple-range-path.cc (path_range_query::compute_ranges_in_block): Compute PHI relations first. Compute outgoing relations at the end. (path_range_query::compute_ranges): Remove call to compute_relations. (path_range_query::compute_relations): Remove. (path_range_query::maybe_register_phi_relation): New. (path_range_query::compute_phi_relations): Abstract out registering one PHI relation to... (path_range_query::compute_outgoing_relations): ...here. * gimple-range-path.h (class path_range_query): Remove compute_relations. Add maybe_register_phi_relation. 2021-10-27 Aldy Hernandez Andrew MacLeod * value-relation.cc (path_oracle::killing_def): Kill second order relations. 2021-10-27 Martin Jambor * ipa-cp.c (good_cloning_opportunity_p): Decide whether to use profile feedback depending on their local availability. 2021-10-27 Martin Jambor * params.opt (param_ipa_cp_profile_count_base): New parameter. * doc/invoke.texi (Optimize Options): Add entry for ipa-cp-profile-count-base. * ipa-cp.c (max_count): Replace with base_count, replace all occurrences too, unless otherwise stated. (ipcp_cloning_candidate_p): identify mostly-directly called functions based on their counts, not max_count. (compare_edge_profile_counts): New function. (ipcp_propagate_stage): Instead of setting max_count, find the appropriate edge count in a sorted vector of counts of eligible edges and make it the base_count. 2021-10-27 Martin Jambor * ipa-cp.c (struct caller_statistics): New fields rec_count_sum, n_nonrec_calls and itself, document all fields. (init_caller_stats): Initialize the above new fields. (gather_caller_stats): Gather self-recursive counts and calls number. (get_info_about_necessary_edges): Gather counts of self-recursive and other edges bringing in the requested value separately. (dump_profile_updates): Rework to dump info about a single node only. (lenient_count_portion_handling): New function. (struct gather_other_count_struct): New type. (gather_count_of_non_rec_edges): New function. (struct desc_incoming_count_struct): New type. (analyze_clone_icoming_counts): New function. (adjust_clone_incoming_counts): Likewise. (update_counts_for_self_gen_clones): Likewise. (update_profiling_info): Rewritten. (update_specialized_profile): Adjust call to dump_profile_updates. (create_specialized_node): Do not update profiling info. (decide_about_value): New parameter self_gen_clones, either push new clones into it or updat their profile counts. For self-recursively generated values, use a portion of the node count instead of count from self-recursive edges to estimate goodness. (decide_whether_version_node): Gather clones for self-generated values in a new vector, update their profiles at once at the end. 2021-10-27 Richard Biener * tree-vectorizer.c (vect_transform_loops): New function, split out from ... (try_vectorize_loop_1): ... here. Simplify as epilogues are now fully handled in the split part. 2021-10-27 Jakub Jelinek * omp-expand.c (expand_omp_for_init_counts): Handle non-rectangular iterators with pointer types. (expand_omp_for_init_vars, extract_omp_for_update_vars): Likewise. 2021-10-26 Martin Sebor PR tree-optimization/102238 PR tree-optimization/102919 * gimple-ssa-sprintf.c (get_string_length): Add an argument. (array_elt_at_offset): Move to pointer-query. (set_aggregate_size_and_offset): New function. (field_at_offset): Move to pointer-query. (get_origin_and_offset): Rename... (get_origin_and_offset_r): this. Add an argument. Make aggregate handling more robust. (get_origin_and_offset): New. (alias_offset): Add an argument. (format_string): Use subobject size determined by get_origin_and_offset. * pointer-query.cc (field_at_offset): Move from gimple-ssa-sprintf.c. Improve/correct handling of aggregates. (array_elt_at_offset): Same. * pointer-query.h (field_at_offset): Declare. (array_elt_at_offset): Declare. 2021-10-26 Martin Sebor * builtins.c (check_strncat_sizes): Pass access_data ctor additional arguments. (expand_builtin_memcmp): Move code to gimple-ssa-warn-access.cc. (expand_builtin_fork_or_exec): Same. * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Pass compute_objsize additional arguments. (inbounds_memaccess_p): Same. (array_bounds_checker::check_array_bounds): Add an assert. Stash statement in a member. (check_array_bounds_dom_walker::before_dom_children): Same. * gimple-array-bounds.h (array_bounds_checker::m_stmt): New member. * gimple-ssa-sprintf.c (get_destination_size): Add an argument. (handle_printf_call): Pass a new argument. * gimple-ssa-warn-access.cc (get_size_range): Add an argument. (check_access): Add an argument and pass it along to callees. (check_read_access): Make a member function. (pass_waccess::check_strcat): Pass access_data ctor additional arguments. (pass_waccess::check_strncat): Same. (pass_waccess::check_stxcpy): Same. (pass_waccess::check_stxncpy): Same. (pass_waccess::check_strncmp): Same. (pass_waccess::check_read_access): Same. (pass_waccess::check_builtin): Same. (pass_waccess::maybe_check_access_sizes): Same. (pass_waccess::maybe_check_dealloc_call): Same. * gimple-ssa-warn-access.h (check_read_access): Declare a new member function. * pointer-query.cc (compute_objsize_r): Add an argument. (gimple_call_return_array): Same. (gimple_call_alloc_size): Same. (access_ref::access_ref): Same. (access_ref::get_ref): Same. (pointer_query::get_ref): Same. (handle_min_max_size): Pass an arguments to callees. (handle_array_ref): Add an argument. (handle_mem_ref): Same. (compute_objsize): Same. * pointer-query.h (struct access_ref): Adjust signatures. (struct access_data): Same. (gimple_call_alloc_size): Add an argument. (gimple_parm_array_size): Same. (compute_objsize): Same. * tree-ssa-strlen.c (strlen_pass::adjust_last_stmt): Pass an additional argument to compute_objsize. (strlen_pass::maybe_warn_overflow): Same. (maybe_diag_stxncpy_trunc): Same. 2021-10-26 Martin Sebor PR middle-end/102453 * gimple-ssa-warn-access.cc (pass_waccess::check_atomic_builtin): New. (pass_waccess::check_atomic_builtin): Call it. 2021-10-26 Vladimir N. Makarov PR rtl-optimization/102842 * lra-constraints.c (match_reload): Ignore out in checking values of outs. (curr_insn_transform): Collect outputs before doing reloads of operands. 2021-10-26 Paul A. Clarke PR target/102719 * config/rs6000/x86intrin.h: Move some included headers to new headers. Include new immintrin.h instead of those headers. * config/rs6000/immintrin.h: New. * config/rs6000/x86gprintrin.h: New. * config.gcc (powerpc*-*-*): Add new headers to extra_headers. 2021-10-26 Richard Biener * tree-vectorizer.h (vect_create_addr_base_for_vector_ref): Remove byte_offset parameter. (vect_create_data_ref_ptr): Likewise. * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Likewise. (vect_create_data_ref_ptr): Likewise. * tree-vect-stmts.c (vectorizable_store): Adjust. (vectorizable_load): Likewise. 2021-10-26 Richard Biener PR tree-optimization/96109 * tree-vectorizer.h (dr_misalignment): Add optional offset parameter. * tree-vect-data-refs.c (dr_misalignment): Likewise. Remove offset applied for negative stride accesses. (vect_enhance_data_refs_alignment): Compute negative stride access offset and pass it to dr_misalignment. * tree-vect-stmts.c (get_negative_load_store_type): Pass negative offset to dr_misalignment. (get_group_load_store_type): Likewise. (get_load_store_type): Likewise. (vectorizable_store): Remove asserts about alignment. (vectorizable_load): Likewise. 2021-10-26 Kewen Lin PR tree-optimization/102897 * tree-ssa-forwprop.c (simplify_permutation): Remove a wrong assertion. 2021-10-26 Richard Biener * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Take offset in bytes. (vect_create_data_ref_ptr): Likewise. * tree-vect-loop-manip.c (get_misalign_in_elems): Multiply offset by element size. (vect_create_cond_for_align_checks): Likewise. * tree-vect-stmts.c (get_negative_load_store_type): Likewise. (vectorizable_load): Remove duplicate leftover from merge conflict. 2021-10-26 Roger Sayle * config/i386/i386-expand.c (ix86_expand_v1ti_shift): New helper function to expand V1TI mode logical shifts by integer constants. (ix86_expand_v1ti_rotate): New helper function to expand V1TI mode rotations by integer constants. * config/i386/i386-protos.h (ix86_expand_v1ti_shift, ix86_expand_v1ti_rotate): Prototype new functions here. * config/i386/sse.md (ashlv1ti3, lshrv1ti3, rotlv1ti3, rotrv1ti3): New TARGET_SSE2 expanders to implement V1TI shifts and rotations. 2021-10-26 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Avoid threading circular paths. 2021-10-26 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::resolve_phi): Attempt to resolve all incoming paths to a PHI. (back_threader::resolve_def): Always return true for PHIs. 2021-10-26 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::find_paths_to_names): Always try to resolve path without looking back. * tree-ssa-threadupdate.c (dump_jump_thread): Indidicate whether edge is a back edge. 2021-10-26 Kewen Lin PR tree-optimization/102789 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not update inits of simd_lane_access. 2021-10-25 Andrew MacLeod * tree-vrp.c (vrp_simplify_cond_using_ranges): Add return type and move to vr-values.c. (simplify_casted_conds): Move to vrp_folder class. (execute_vrp): Call via vrp_folder now. * vr-values.c (simplify_cond_using_ranges_1): Call simplify_casted_cond. (simplify_using_ranges::simplify_casted_cond): Relocate from tree-vrp.c. * vr-values.h (simplify_casted_cond): Add prototype. 2021-10-25 Andrew MacLeod * tree-vrp.c (rvrp_folder::fold_stmt): If simplification fails, try to fold anyway. 2021-10-25 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_testz_si128): Add "extern" to function signature. (_mm_testc_si128): Likewise. (_mm_testnzc_si128): Likewise. (_mm_blend_ps): Likewise. (_mm_blendv_ps): Likewise. (_mm_blend_pd): Likewise. (_mm_blendv_pd): Likewise. (_mm_ceil_pd): Likewise. (_mm_ceil_sd): Likewise. (_mm_ceil_ps): Likewise. (_mm_ceil_ss): Likewise. (_mm_floor_pd): Likewise. (_mm_floor_sd): Likewise. (_mm_floor_ps): Likewise. (_mm_floor_ss): Likewise. (_mm_minpos_epu16): Likewise. (_mm_mul_epi32): Likewise. (_mm_cvtepi8_epi16): Likewise. (_mm_packus_epi32): Likewise. (_mm_cmpgt_epi64): Likewise. 2021-10-25 Roger Sayle * simplify-rtx.c (simplify_binary_operation_1) [SS_ASHIFT]: Simplify shifts of the mode's smin_value and smax_value when the bit count operand doesn't have side-effects. [US_ASHIFT]: Likewise, simplify shifts of the mode's umax_value when the bit count operand doesn't have side-effects. (simplify_const_binary_operation) [SS_ASHIFT, US_ASHIFT]: Perform compile-time evaluation of saturating left shifts with constant arguments. 2021-10-25 Andrew MacLeod * gimple-range.cc (gimple_ranger::export_global_ranges): Remove check for TDF_DETAILS. 2021-10-25 Andrew MacLeod * flag-types.h (enum ranger_debug): Adjust values. * params.opt (ranger_debug): Ditto. 2021-10-25 Martin Jambor PR tree-optimization/102886 * tree-sra.c (totally_scalarize_subtree): Fix the out of access-condition. 2021-10-25 Andrew Pinski * tree-ssa-dce.c (simple_dce_from_worklist): Check stmt_unremovable_because_of_non_call_eh_p also before removing the statement. 2021-10-25 Richard Biener PR tree-optimization/102905 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use vect_supportable_dr_alignment again to determine whether an access is supported when not aligned. 2021-10-25 Kito Cheng * config/riscv/riscv.c (riscv_rtx_costs): Handle cost model for zbs extension. 2021-10-25 Jim Wilson Kito Cheng Jia-Wei Chen Shi-Hua Liao * config/riscv/bitmanip.md (shiftm1): New. (*bset): Ditto. (*bset_mask): Ditto. (*bset_1): Ditto. (*bset_1_mask): Ditto. (*bseti): Ditto. (*bclr): Ditto. (*bclri): Ditto. (*binv): Ditto. (*binvi): Ditto. (*bext): Ditto. (*bexti): Ditto. * config/riscv/predicates.md (splittable_const_int_operand): Handle bseti. (single_bit_mask_operand): New. (not_single_bit_mask_operand): Ditto. (const31_operand): Ditto. (const63_operand): Ditto. * config/riscv/riscv.c (riscv_build_integer_1): Handle bseti. (riscv_output_move): Ditto. (riscv_print_operand): Handle new operand type: T and S. * config/riscv/riscv.h (SINGLE_BIT_MASK_OPERAND): New. 2021-10-25 Jim Wilson * config/riscv/riscv.c (riscv_build_integer_1): Build integer with rotate. 2021-10-25 Kito Cheng * config/riscv/riscv.c (riscv_extend_cost): Handle cost model for zbb extension. (riscv_rtx_costs): Ditto. 2021-10-25 Jim Wilson Kito Cheng Jia-Wei Chen * config/riscv/bitmanip.md (bitmanip_bitwise): New. (bitmanip_minmax): New. (clz_ctz_pcnt): New. (bitmanip_optab): New. (bitmanip_insn): New. (*_not): New. (*xor_not): New. (si2): New. (*disi2): New. (di2): New. (*zero_extendhi2_bitmanip): New. (*extend2_zbb): New. (*zero_extendhi2_zbb): New. (rotrsi3): New. (rotrdi3): New. (rotrsi3_sext): New. (rotlsi3): New. (rotldi3): New. (rotlsi3_sext): New. (bswap2): New. (3): New. * config/riscv/riscv.md (type): Add rotate. (zero_extendhi2): Change to define_expand pattern. (*zero_extendhi2): New. (extend2): Change to define_expand pattern. (*extend2): New. 2021-10-25 Kito Cheng * config/riscv/riscv.c (riscv_extend_cost): Handle cost model for zba extension. (riscv_rtx_costs): Ditto. 2021-10-25 Jim Wilson Kito Cheng Jia-Wei Chen * config/riscv/bitmanip.md (*zero_extendsidi2_bitmanip): New. (*shNadd): Ditto. (*shNadduw): Ditto. (*add.uw): Ditto. (*slliuw): Ditto. (riscv_rtx_costs): Ditto. * config/riscv/riscv.md: Include bitmanip.md (type): Add bitmanip bype. (zero_extendsidi2): Change to define_expand pattern. (*zero_extendsidi2_internal): New. (zero_extendsidi2_shifted): Disable for ZBA. 2021-10-25 Kito Cheng * common/config/riscv/riscv-common.c (riscv_ext_version_table): Add zba, zbb, zbc and zbs. (riscv_ext_flag_table): Ditto. * config/riscv/riscv-opts.h (MASK_ZBA): New. (MASK_ZBB): Ditto. (MASK_ZBC): Ditto. (MASK_ZBS): Ditto. (TARGET_ZBA): Ditto. (TARGET_ZBB): Ditto. (TARGET_ZBC): Ditto. (TARGET_ZBS): Ditto. * config/riscv/riscv.opt (riscv_zb_subext): New. 2021-10-25 liuhongt PR target/102464 * match.pd: Simplify (_Float16) sqrtf((float) a) to .SQRT(a) when direct_internal_fn_supported_p, similar for sqrt/sqrtl. 2021-10-25 Richard Biener PR tree-optimization/102920 * tree-ssa-sccvn.h (expressions_equal_p): Add argument controlling VN_TOP matching behavior. * tree-ssa-sccvn.c (expressions_equal_p): Likewise. (vn_phi_eq): Do not optimistically match VN_TOP. 2021-10-25 konglin1 * config/i386/sse.md (fma__fadd_fmul): Add new define_insn_and_split. (fma__fadd_fcmul):Likewise (fma___fma_zero):Likewise 2021-10-24 John David Anglin * config/pa/pa-d.c (pa_d_handle_target_float_abi): Don't check TARGET_DISABLE_FPREGS. * config/pa/pa.c (fix_range): Use MASK_SOFT_FLOAT instead of MASK_DISABLE_FPREGS. (hppa_rtx_costs): Don't check TARGET_DISABLE_FPREGS. Adjust cost of hardware integer multiplication. (pa_conditional_register_usage): Don't check TARGET_DISABLE_FPREGS. * config/pa/pa.h (INT14_OK_STRICT): Likewise. * config/pa/pa.md: Don't check TARGET_DISABLE_FPREGS. Check TARGET_SOFT_FLOAT in patterns that use xmpyu instruction. * config/pa/pa.opt (mdisable-fpregs): Change target mask to SOFT_FLOAT. Revise comment. (msoft-float): New option. 2021-10-24 John David Anglin * config/pa/pa.md: Don't use 'G' constraint in integer move patterns. 2021-10-24 Gerald Pfeifer * doc/install.texi (Specific): Remove obsolete details around GNU/Linux on Itanium. (Specific): Remove reference to Windows for Itanium. 2021-10-23 Bernhard Reutner-Fischer * config/i386/x86-tune-sched-bd.c (dispatch_group): Commentary typo fix. 2021-10-23 Jan Hubicka * tree-ssa-structalias.c (compute_points_to_sets): Cleanup. 2021-10-23 Roger Sayle * config/i386/sse.md (v1ti3): New define_insn to implement V1TImode AND, IOR and XOR on TARGET_SSE2 (and above). (one_cmplv1ti2): New define expand. 2021-10-22 Eric Gallager PR other/102663 * Makefile.in: Handle dvidir and install-dvi target. * configure: Regenerate. * configure.ac: Add install-dvi to target_list. 2021-10-22 Gerald Pfeifer * doc/install.texi (Binaries): Convert mingw-w64.org to https. (Specific): Ditto. 2021-10-22 Richard Biener PR tree-optimization/102893 * tree-ssa-dce.c (find_obviously_necessary_stmts): Fix the test for an exit edge. 2021-10-22 Aldy Hernandez Andrew MacLeod * gimple-range-path.cc (path_range_query::compute_phi_relations): Kill any global relations we may know before registering a new one. * value-relation.cc (path_oracle::killing_def): New. * value-relation.h (path_oracle::killing_def): New. 2021-10-22 Richard Biener PR bootstrap/102681 * tree-ssa-sccvn.c (vn_phi_insert): For undefined SSA args record VN_TOP. (vn_phi_lookup): Likewise. 2021-10-21 H.J. Lu PR target/98667 * doc/invoke.texi: Document -fcf-protection requires i686 or new. 2021-10-21 Eric Botcazou PR middle-end/102764 * cfgexpand.c (expand_gimple_basic_block): Robustify latest change. 2021-10-21 Jonathan Wright * config/aarch64/arm_neon.h (__STRUCTN): Delete function macro and all invocations. 2021-10-21 Andrew MacLeod * doc/invoke.texi (ranger-debug): Document. * flag-types.h (enum ranger_debug): New. (enum evrp_mode): Remove debug values. * gimple-range-cache.cc (DEBUG_RANGE_CACHE): Use new debug flag. * gimple-range-gori.cc (gori_compute::gori_compute): Ditto. * gimple-range.cc (gimple_ranger::gimple_ranger): Ditto. * gimple-ssa-evrp.c (hybrid_folder::choose_value): Ditto. (execute_early_vrp): Use evrp-mode directly. * params.opt (enum evrp_mode): Remove debug values. (ranger-debug): New. (ranger-logical-depth): Relocate to be in alphabetical order. 2021-10-21 Andrew MacLeod * doc/invoke.texi: (vrp1-mode, vrp2-mode): Document. * flag-types.h: (enum vrp_mode): New. * params.opt: (vrp1-mode, vrp2-mode): New. * tree-vrp.c (vrp_pass_num): New. (pass_vrp::pass_vrp): Set pass number. (pass_vrp::execute): Choose which VRP mode to execute. 2021-10-21 Andrew MacLeod * gimple-ssa-evrp.c (class rvrp_folder): Move to tree-vrp.c. (execute_early_vrp): For ranger only mode, invoke ranger_vrp. * tree-vrp.c (class rvrp_folder): Relocate here. (execute_ranger_vrp): New. * tree-vrp.h (execute_ranger_vrp): Export. 2021-10-21 Martin Liska PR debug/102585 PR bootstrap/102766 * opts.c (finish_options): Process flag_var_tracking* options here as they can be adjusted by optimize attribute. Process also flag_syntax_only and flag_gtoggle. * toplev.c (process_options): Remove it here. * common.opt: Make debug_nonbind_markers_p as PerFunction attribute as it depends on optimization level. 2021-10-21 Martin Jambor PR tree-optimization/102505 * tree-sra.c (totally_scalarize_subtree): Check that the encountered field fits within the acces we would like to put it in. 2021-10-21 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Remove circular paths check. 2021-10-21 Richard Biener * toplev.c (process_options): Move the initial debug_hooks setting ... (toplev::main): ... before the call of the post_options langhook. 2021-10-21 Richard Biener PR tree-optimization/102847 * tree-vect-stmts.c (vect_model_load_cost): Add the scalar load cost in the prologue for VMAT_INVARIANT. 2021-10-21 Richard Biener PR tree-optimization/102847 * tree-vect-stmts.c (vect_model_load_cost): Explicitely handle VMAT_INVARIANT as a splat in the prologue. 2021-10-21 Hongyu Wang PR target/102812 * config/i386/i386.c (ix86_get_ssemov): Adjust HFmode vector move to use the same logic as HImode. 2021-10-21 Richard Biener * tree-vect-slp.c (vect_build_slp_tree_1): Remove superfluous gimple_call_nothrow_p check. 2021-10-21 Andrew Pinski * tree-cfg.c (maybe_remove_writeonly_store): Add dce_ssa_names argument. Mark the ssa-name of the rhs as one to be removed. (execute_fixup_cfg): Update call to maybe_remove_writeonly_store. Call simple_dce_from_worklist at the end to a simple dce. 2021-10-21 Andrew Pinski * tree-cfg.c (maybe_remove_writeonly_store): New function factored out from ... (execute_fixup_cfg): Here. Call maybe_remove_writeonly_store. 2021-10-21 Andrew Pinski * tree-cfg.c (execute_fixup_cfg): Remove comment about standalone pass. 2021-10-21 Andrew Pinski * tree-cfg.c (execute_fixup_cfg): Output when the statement is removed when it is a write only var. 2021-10-21 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Avoid threading circular paths. 2021-10-20 Alex Coplan * calls.c (initialize_argument_information): Remove some dead code, remove handling for function_arg returning const_int. * doc/tm.texi: Delete documentation for unused target hooks. * doc/tm.texi.in: Likewise. * target.def (load_bounds_for_arg): Delete. (store_bounds_for_arg): Delete. (load_returned_bounds): Delete. (store_returned_bounds): Delete. * targhooks.c (default_load_bounds_for_arg): Delete. (default_store_bounds_for_arg): Delete. (default_load_returned_bounds): Delete. (default_store_returned_bounds): Delete. * targhooks.h (default_load_bounds_for_arg): Delete. (default_store_bounds_for_arg): Delete. (default_load_returned_bounds): Delete. (default_store_returned_bounds): Delete. 2021-10-20 Jonathan Wakely * doc/extend.texi (Basic Asm): Clarify that asm is not an extension in C++. * doc/invoke.texi (-fno-asm): Fix description for C++. 2021-10-20 Jonathan Wakely * doc/install.texi: Remove link to old.html 2021-10-20 Tamar Christina * config/aarch64/aarch64-simd.md (*aarch64_cmtst_same_): New. 2021-10-20 Tamar Christina * config/aarch64/aarch64-simd.md (*aarch64_narrow_trunc): New. 2021-10-20 Tamar Christina * config/aarch64/aarch64-simd.md (aarch64_simd_ashr): Add case cmp case. * config/aarch64/constraints.md (D1): New. 2021-10-20 Tamar Christina * config/aarch64/aarch64-simd.md (*aarch64_topbits_shuffle_le): New. (*aarch64_topbits_shuffle_le): New. (*aarch64_topbits_shuffle_be): New. (*aarch64_topbits_shuffle_be): New. * config/aarch64/predicates.md (aarch64_simd_shift_imm_vec_exact_top): New. 2021-10-20 Tamar Christina * config/aarch64/aarch64-simd.md (*aarch64_shrn_vect, *aarch64_shrn2_vect_le, *aarch64_shrn2_vect_be): New. * config/aarch64/iterators.md (srn_op): New. 2021-10-20 Chung-Lin Tang * omp-low.c (omp_copy_decl_2): For !ctx, use record_vars to add new copy as local variable. (scan_sharing_clauses): Place copy of OMP_CLAUSE_IN_REDUCTION decl in ctx->outer instead of ctx. 2021-10-20 Martin Liska Revert: 2021-10-19 Martin Liska PR target/102374 * config/i386/i386-options.c (ix86_valid_target_attribute_inner_p): Strip whitespaces. * system.h (strip_whilespaces): New function. 2021-10-20 Martin Liska Revert: 2021-10-19 Martin Liska PR target/102375 * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Strip whitespaces. 2021-10-20 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_case_values_threshold): Change to 8 with -Os, 11 otherwise. 2021-10-20 Wilco Dijkstra * config/aarch64/aarch64.c (neoversev1_tunings): Enable AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. (neoversen2_tunings): Likewise. 2021-10-20 Wilco Dijkstra PR target/100966 * config/aarch64/aarch64.md (frint_pattern): Update comment. * config/aarch64/aarch64-simd-builtins.def: Change frintn to roundeven. * config/aarch64/arm_fp16.h: Change frintn to roundeven. * config/aarch64/arm_neon.h: Likewise. * config/aarch64/iterators.md (frint_pattern): Use roundeven for FRINTN. 2021-10-20 Martin Liska * config/arm/arm.c (arm_unwind_emit_sequence): Do not declare already declared global variable. (arm_unwind_emit_set): Use out_file as function argument. (arm_unwind_emit): Likewise. * config/darwin.c (machopic_output_data_section_indirection): Likewise. (machopic_output_stub_indirection): Likewise. (machopic_output_indirection): Likewise. (machopic_finish): Likewise. * config/i386/i386.c (ix86_asm_output_function_label): Likewise. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise. * config/ia64/ia64.c (process_epilogue): Likewise. (process_cfa_adjust_cfa): Likewise. (process_cfa_register): Likewise. (process_cfa_offset): Likewise. (ia64_asm_unwind_emit): Likewise. * config/s390/s390.c (s390_asm_output_function_label): Likewise. 2021-10-20 Andre Simoes Dias Vieira * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): lower vld1 and vst1 variants of the neon builtins * config/aarch64/aarch64-protos.h: (aarch64_general_gimple_fold_builtin): Add gsi parameter. * config/aarch64/aarch64.c (aarch64_general_gimple_fold_builtin): Likwise. 2021-10-20 Andre Simoes Dias Vieira * match.pd: Generate IFN_TRUNC. 2021-10-20 Richard Biener PR tree-optimization/102853 * tree-data-ref.c (split_constant_offset_1): Bail out immediately if the expression traps on overflow. 2021-10-20 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::~back_threader): Remove. 2021-10-20 Aldy Hernandez * tree-ssa-threadupdate.c (back_jt_path_registry::adjust_paths_after_duplication): Remove superflous debugging message. (back_jt_path_registry::duplicate_thread_path): Same. 2021-10-20 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader_registry::back_threader_registry): Remove. (back_threader_registry::register_path): Remove m_threaded_paths. 2021-10-20 Aldy Hernandez PR tree-optimization/102814 * doc/invoke.texi: Document --param=max-fsm-thread-length. * params.opt: Add --param=max-fsm-thread-length. * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Fail on paths longer than max-fsm-thread-length. 2021-10-20 Eric Botcazou PR middle-end/102764 * cfgexpand.c (expand_gimple_basic_block): Disregard a final debug statement to reset the current location for the outgoing edges. 2021-10-20 Aldy Hernandez Richard Biener * tree-ssa-threadupdate.c (cancel_thread): Dump threading reason on the same line as the threading cancellation. (jt_path_registry::cancel_invalid_paths): Avoid rotating loops. Avoid threading through loop headers where the path remains in the loop. 2021-10-20 Siddhesh Poyarekar * tree-object-size.c (unknown): Make into a function. Adjust all uses. (unknown_object_size): Simplify implementation. 2021-10-20 Hongtao Liu Kewen Lin * doc/sourcebuild.texi (Effective-Target Keywords): Document vect_slp_v2qi_store, vect_slp_v4qi_store, vect_slp_v8qi_store, vect_slp_v16qi_store, vect_slp_v2hi_store, vect_slp_v4hi_store, vect_slp_v2si_store, vect_slp_v4si_store. 2021-10-19 Jonathan Wakely * doc/extend.texi (Basic PowerPC Built-in Functions): Fix typo. 2021-10-19 Paul A. Clarke PR target/101893 PR target/102719 * config/rs6000/emmintrin.h: Guard POWER8 intrinsics. * config/rs6000/pmmintrin.h: Same. * config/rs6000/smmintrin.h: Same. * config/rs6000/tmmintrin.h: Same. 2021-10-19 Paul A. Clarke * config.gcc (extra_headers): Add nmmintrin.h. 2021-10-19 Richard Biener * tree-vectorizer.h (vect_supportable_dr_alignment): Add misalignment parameter. * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Do not change DR_MISALIGNMENT in place, instead pass the adjusted misalignment to vect_supportable_dr_alignment. (vect_peeling_supportable): Likewise. (vect_peeling_hash_get_lowest_cost): Adjust. (vect_enhance_data_refs_alignment): Likewise. (vect_vfa_access_size): Likewise. (vect_supportable_dr_alignment): Add misalignment parameter and simplify. * tree-vect-stmts.c (get_negative_load_store_type): Adjust. (get_group_load_store_type): Likewise. (get_load_store_type): Likewise. 2021-10-19 Clément Chigot * config/rs6000/rs6000.c (rs6000_xcoff_file_end): Move __tls_get_addr reference to .text csect. 2021-10-19 Martin Liska PR target/102375 * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Strip whitespaces. 2021-10-19 Richard Biener * tree-vectorizer.h (vect_get_store_cost): Adjust signature. (vect_get_load_cost): Likewise. * tree-vect-data-refs.c (vect_get_data_access_cost): Get alignment support scheme and misalignment as arguments and pass them down. (vect_get_peeling_costs_all_drs): Compute that info here and note that we shouldn't need to. * tree-vect-stmts.c (vect_model_store_cost): Get alignment support scheme and misalignment as arguments. (vect_get_store_cost): Likewise. (vect_model_load_cost): Likewise. (vect_get_load_cost): Likewise. (vectorizable_store): Pass down alignment support scheme and misalignment to costing. (vectorizable_load): Likewise. 2021-10-19 Richard Biener * tree-vect-stmts.c (get_negative_load_store_type): Add offset output parameter and initialize it. (get_group_load_store_type): Likewise. (get_load_store_type): Likewise. (vectorizable_store): Use offset as computed by get_load_store_type. (vectorizable_load): Likewise. 2021-10-19 Richard Biener PR tree-optimization/102827 * tree-if-conv.c (predicate_statements): Add pe parameter and use that edge to insert invariant stmts on. (combine_blocks): Pass through pe. (tree_if_conversion): Compute the edge to insert invariant stmts on and pass it along. 2021-10-19 Roger Sayle PR target/102785 * config/bfin/bfin.md (addsubv2hi3, subaddv2hi3, ssaddsubv2hi3, sssubaddv2hi3): Swap the order of operators in vec_concat. 2021-10-19 Xionghu Luo * config/rs6000/altivec.md (*altivec_vmrghb_internal): Delete. (altivec_vmrghb_direct): New. (*altivec_vmrghh_internal): Delete. (altivec_vmrghh_direct): New. (*altivec_vmrghw_internal): Delete. (altivec_vmrghw_direct_): New. (altivec_vmrghw_direct): Delete. (*altivec_vmrglb_internal): Delete. (altivec_vmrglb_direct): New. (*altivec_vmrglh_internal): Delete. (altivec_vmrglh_direct): New. (*altivec_vmrglw_internal): Delete. (altivec_vmrglw_direct_): New. (altivec_vmrglw_direct): Delete. * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust. * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Adjust. * config/rs6000/vsx.md (vsx_xxmrghw_): Adjust. (vsx_xxmrglw_): Adjust. 2021-10-19 Aldy Hernandez * passes.def: Change threading comment before pass_ccp pass. 2021-10-19 Haochen Gui * config/rs6000/rs6000-call.c (altivec_expand_lxvr_builtin): Modify the expansion for sign extension. All extensions are done within VSX registers. 2021-10-19 Richard Biener * tree-vect-stmts.c (get_group_load_store_type): Add misalignment output parameter and initialize it. (get_group_load_store_type): Likewise. (vectorizable_store): Remove now redundant queries. (vectorizable_load): Likewise. 2021-10-19 Richard Biener * tree-vectorizer.h (vect_supportable_dr_alignment): Remove check_aligned argument. * tree-vect-data-refs.c (vect_supportable_dr_alignment): Likewise. (vect_peeling_hash_insert): Add supportable_if_not_aligned argument and do not call vect_supportable_dr_alignment here. (vect_peeling_supportable): Adjust. (vect_enhance_data_refs_alignment): Compute whether the access is supported with different alignment here and pass that down to vect_peeling_hash_insert. (vect_vfa_access_size): Adjust. * tree-vect-stmts.c (vect_get_store_cost): Likewise. (vect_get_load_cost): Likewise. (get_negative_load_store_type): Likewise. (get_group_load_store_type): Likewise. (get_load_store_type): Likewise. 2021-10-19 Martin Liska PR target/102374 * config/i386/i386-options.c (ix86_valid_target_attribute_inner_p): Strip whitespaces. * system.h (strip_whilespaces): New function. 2021-10-19 dianhong xu * config/i386/avx512fp16intrin.h: (_mm512_set1_pch): New intrinsic. * config/i386/avx512fp16vlintrin.h: (_mm256_set1_pch): New intrinsic. (_mm_set1_pch): Ditto. 2021-10-18 Andrew MacLeod PR tree-optimization/102796 * gimple-range.cc (gimple_ranger::range_on_edge): Process EH edges normally. Return get_tree_range for non gimple_range_ssa_p names. (gimple_ranger::range_of_stmt): Use get_tree_range for non gimple_range_ssa_p names. 2021-10-18 Uroš Bizjak PR target/102761 * config/i386/i386.c (ix86_print_operand_address): Error out for non-address_operand asm operands. 2021-10-18 Richard Biener * tree-vect-data-refs.c (vect_peeling_hash_insert): Do not auto-convert dr_alignment_support to bool. (vect_peeling_supportable): Likewise. (vect_enhance_data_refs_alignment): Likewise. (vect_supportable_dr_alignment): Commonize read/write case. * tree-vect-stmts.c (vect_get_store_cost): Use dr_alignment_support, not int, for the vect_supportable_dr_alignment result. (vect_get_load_cost): Likewise. 2021-10-18 Siddhesh Poyarekar * tree-object-size.c (object_sizes_execute): Consolidate LHS null check and do it early. 2021-10-18 Richard Biener * tree-vect-stmts.c (vectorizable_store): Use the computed alignment scheme instead of querying aligned_access_p. 2021-10-18 Richard Biener * tree-vect-stmts.c (vectorizable_store): Do not recompute alignment scheme already determined by get_load_store_type. 2021-10-18 Aldy Hernandez * tree-ssa-threadbackward.c (class pass_thread_jumps_full): Clone corresponding pass. 2021-10-18 Roger Sayle * combine.c (recog_for_combine): For an unrecognized move/set of a constant, try force_const_mem to place it in the constant pool. * cse.c (constant_pool_entries_cost, constant_pool_entries_regcost): Delete global variables (that are no longer assigned a cost value). (cse_insn): Simplify logic for deciding whether to place a folded constant in the constant pool using force_const_mem. (cse_main): Remove zero initialization of constant_pool_entries_cost and constant_pool_entries_regcost. * config/i386/i386.c (ix86_rtx_costs): Make memory accesses fractionally more expensive, when optimizing for speed. 2021-10-18 Martin Liska PR gcov-profile/102746 PR gcov-profile/102747 * gcov.c (main): Return return_code. (output_gcov_file): Mark return_code when error happens. (generate_results): Likewise. (read_graph_file): Likewise. (read_count_file): Likewise. 2021-10-18 Roger Sayle * config/bfin/bfin.md (define_constants): Remove UNSPEC_ONES. (define_insn "ones"): Replace UNSPEC_ONES with a truncate of a popcount, allowing compile-time evaluation/simplification. (popcountsi2, popcounthi2): New expanders using a "ones" insn. 2021-10-18 Richard Biener PR tree-optimization/102788 * tree-vect-patterns.c (vect_init_pattern_stmt): Allow a NULL vectype. (vect_pattern_recog_1): Likewise. (vect_recog_bool_pattern): Continue matching the pattern even if we do not have a vector type for a conversion result. 2021-10-18 Roger Sayle * simplify-rtx.c (simplify_const_unary_operation) [SS_NEG, SS_ABS]: Evalute SS_NEG and SS_ABS of a constant argument. 2021-10-18 prathamesh.kulkarni PR target/93183 * gimple-match-head.c (try_conditional_simplification): Add case for single operand. * internal-fn.def: Add entry for COND_NEG internal function. * internal-fn.c (FOR_EACH_CODE_MAPPING): Add entry for NEGATE_EXPR, COND_NEG mapping. * optabs.def: Add entry for cond_neg_optab. * match.pd (UNCOND_UNARY, COND_UNARY): New operator lists. (vec_cond COND (foo A) B) -> (IFN_COND_FOO COND A B): New pattern. (vec_cond COND B (foo A)) -> (IFN_COND_FOO ~COND A B): Likewise. 2021-10-18 Aldy Hernandez * tree-ssa-strlen.c (class strlen_pass): Rename from strlen_dom_walker. (handle_builtin_stxncpy_strncat): Move to strlen_pass. (handle_assign): Same. (adjust_last_stmt): Same. (maybe_warn_overflow): Same. (handle_builtin_strlen): Same. (handle_builtin_strchr): Same. (handle_builtin_strcpy): Same. (handle_builtin_strncat): Same. (handle_builtin_stxncpy_strncat): Same. (handle_builtin_memcpy): Same. (handle_builtin_strcat): Same. (handle_alloc_call): Same. (handle_builtin_memset): Same. (handle_builtin_memcmp): Same. (get_len_or_size): Same. (strxcmp_eqz_result): Same. (handle_builtin_string_cmp): Same. (handle_pointer_plus): Same. (count_nonzero_bytes_addr): Same. (count_nonzero_bytes): Same. (handle_store): Same. (strlen_check_and_optimize_call): Same. (handle_integral_assign): Same. (check_and_optimize_stmt): Same. (printf_strlen_execute): Rename strlen_dom_walker to strlen_pass. 2021-10-18 Richard Biener PR tree-optimization/102798 * tree-vect-data-refs.c (vect_create_addr_base_for_vector_ref): Only copy points-to info to newly generated SSA names. 2021-10-18 Martin Liska * dbgcnt.c (dbg_cnt_process_opt): Remove unused but set variable. * gcov.c (get_cycles_count): Likewise. * lto-compress.c (lto_compression_zlib): Likewise. (lto_uncompression_zlib): Likewise. * targhooks.c (default_pch_valid_p): Likewise. 2021-10-17 Aldy Hernandez * tree-pass.h (make_pass_thread_jumps_full): New. * tree-ssa-threadbackward.c (pass_thread_jumps::gate): Inline. (try_thread_blocks): Add resolve and speed arguments. (pass_thread_jumps::execute): Inline. (do_early_thread_jumps): New. (do_thread_jumps): New. (make_pass_thread_jumps): Move. (pass_early_thread_jumps::gate): Inline. (pass_early_thread_jumps::execute): Inline. (class pass_thread_jumps_full): New. 2021-10-16 Piotr Kubaj * configure.ac: Treat powerpc64*-*-freebsd* the same as powerpc64-*-freebsd*. * configure: Regenerate. 2021-10-16 H.J. Lu * value-query.cc (get_ssa_name_ptr_info_nonnull): Change set_ptr_nonull to set_ptr_nonnull in comments. 2021-10-16 Jan Hubicka PR tree-optimization/102720 * tree-ssa-structalias.c (compute_points_to_sets): Fix producing of call used and clobbered sets. 2021-10-15 Iain Sandoe * config/darwin.h (LINK_COMMAND_SPEC_A): Update 'r' handling to skip gomp and itm when r or nodefaultlibs is given. (DSYMUTIL_SPEC): Do not call dsymutil for '-r' link lines. Update ordering of exclusions, remove duplicate 'v' addition (collect2 will add this from the main command line). 2021-10-15 Iain Sandoe * config/darwin-driver.c (darwin_driver_init): Revise comments, handle filelist and framework options in specs instead of code. * config/darwin.h (SUBTARGET_DRIVER_SELF_SPECS): Update to handle link specs that are really driver ones. (DARWIN_CC1_SPEC): Likewise. (CPP_SPEC): Likewise. (SYSROOT_SPEC): Append space. (LINK_SYSROOT_SPEC): Remove most driver link specs. (STANDARD_STARTFILE_PREFIX_2): Update link-related specs. (STARTFILE_SPEC): Likewise. (ASM_MMACOSX_VERSION_MIN_SPEC): Fix line wrap. (ASM_SPEC): Update driver-related specs. (ASM_FINAL_SPEC): Likewise. * config/darwin.opt: Remove now unused option aliases. * config/i386/darwin.h (EXTRA_ASM_OPTS): Ensure space after opt. (ASM_SPEC): Update driver-related specs. 2021-10-15 Roger Sayle * config/i386/i386.c (ix86_hardreg_mov_ok): For vector modes, allow standard_sse_constant_p immediate constants. 2021-10-15 Iain Sandoe * config.gcc: Add tm-dwarf2.h to tm_d-file. 2021-10-15 Andrew MacLeod * gimple-range-fold.h (gimple_range_ssa_p): Don't process names that occur in abnormal phis. * gimple-range.cc (gimple_ranger::range_on_edge): Return false for abnormal and EH edges. * gimple-ssa-evrp.c (rvrp_folder::value_of_expr): Ditto. (rvrp_folder::value_on_edge): Ditto. (rvrp_folder::value_of_stmt): Ditto. (hybrid_folder::value_of_expr): Ditto for ranger queries. (hybrid_folder::value_on_edge): Ditto. (hybrid_folder::value_of_stmt): Ditto. * value-query.cc (gimple_range_global): Always return a range if the type is supported. 2021-10-15 John David Anglin * config/pa/pa.md: Consistently use "rG" constraint for copy instruction in move patterns. 2021-10-15 Andrew Stubbs * config/gcn/gcn-hsa.h (S_FIJI): Set unconditionally. (S_900): Likewise. (S_906): Likewise. * config/gcn/gcn.c: Hard code SRAM ECC settings for old architectures. * config/gcn/mkoffload.c (ELFABIVERSION_AMDGPU_HSA): Rename to ... (ELFABIVERSION_AMDGPU_HSA_V3): ... this. (ELFABIVERSION_AMDGPU_HSA_V4): New. (SET_SRAM_ECC_UNSUPPORTED): New. (copy_early_debug_info): Create elf flags to match the other objects. (main): Just let the attribute flags pass through. 2021-10-15 Stefan Schulze Frielinghaus * tree-loop-distribution.c (reduction_var_overflows_first): Pass the type of reduction_var as first argument as it is also done for the load type. (loop_distribution::transform_reduction_loop): Add missing TREE_TYPE while determining precission of reduction_var. 2021-10-15 Richard Biener * defaults.h (PREFERRED_DEBUGGING_TYPE): Choose DWARF2_DEBUG when not set. * toplev.c (process_options): Warn when STABS debugging is enabled but not the preferred format. * config/pa/som.h (PREFERRED_DEBUGGING_TYPE): Define to DBX_DEBUG. * config/pdp11/pdp11.h (PREFERRED_DEBUGGING_TYPE): Likewise. 2021-10-15 Richard Biener PR ipa/102762 * tree-inline.c (copy_bb): Avoid underflowing nargs. 2021-10-15 Hongyu Wang * config/i386/i386-expand.c (ix86_expand_vec_perm): Convert HFmode input operand to HImode. (ix86_vectorize_vec_perm_const): Likewise. * config/i386/sse.md (*avx512bw_permvar_truncv16siv16hi_1_hf): New define_insn. (*avx512f_permvar_truncv8siv8hi_1_hf): Likewise. 2021-10-15 Richard Biener PR middle-end/102682 * expmed.c (store_bit_field_1): Ensure a LHS subreg would not create a paradoxical subreg. 2021-10-15 Hongyu Wang * config/i386/i386-expand.c (ix86_expand_vector_init): For half_vector concat for HFmode, handle them like HImode. 2021-10-14 Aldy Hernandez * tree-ssa-threadbackward.c (class back_threader): Add m_resolve. (back_threader::back_threader): Same. (back_threader::resolve_phi): Try to solve without looking back if possible. (back_threader::find_paths_to_names): Same. (try_thread_blocks): Pass resolve argument to back threader. (pass_early_thread_jumps::execute): Same. 2021-10-14 Aldy Hernandez * doc/invoke.texi: Remove max-fsm-thread-length, max-fsm-thread-paths, and fsm-maximum-phi-arguments. * params.opt: Same. * tree-ssa-threadbackward.c (back_threader::back_threader): Remove argument. (back_threader_registry::back_threader_registry): Same. (back_threader_profitability::profitable_path_p): Remove param_max_fsm_thread-length. (back_threader_registry::register_path): Remove m_max_allowable_paths. 2021-10-14 Aldy Hernandez * tree-ssa-threadbackward.c (class back_threader): Make m_imports an auto_bitmap. (back_threader::~back_threader): Do not release m_path. 2021-10-14 Andrew MacLeod PR tree-optimization/102738 * vr-values.c (simplify_using_ranges::simplify): Handle RSHIFT_EXPR. 2021-10-14 Kwok Cheung Yeung * omp-general.c (omp_check_context_selector): Move from c-omp.c. (omp_mark_declare_variant): Move from c-omp.c. (omp_context_name_list_prop): Update for Fortran strings. * omp-general.h (omp_check_context_selector): New prototype. (omp_mark_declare_variant): New prototype. 2021-10-14 Richard Sandiford * config/rs6000/rs6000.c (rs6000_density_test): Move early exit test further up the function. 2021-10-14 Richard Sandiford * config/arm/arm.c (arm_add_stmt_cost): Delete. (TARGET_VECTORIZE_ADD_STMT_COST): Delete. 2021-10-14 Martin Jambor * doc/invoke.texi (Optimize Options): Add entry for ipa-cp-recursive-freq-factor. 2021-10-14 Tamar Christina * match.pd: New rule. 2021-10-14 Jan Hubicka PR ipa/102557 * ipa-modref-tree.h (modref_access_node::update2): Also check that parm_offset is unchanged. (modref_ref_node::insert_access): Fix updating of parameter. 2021-10-14 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::resolve_phi): Add FIXME note. 2021-10-14 Richard Biener PR tree-optimization/102659 * tree-if-conv.c (if_convertible_gimple_assign_stmt_p): Also rewrite pointer typed undefined overflow operations. (predicate_statements): Likewise. Make sure to emit invariant conversions in the preheader. * tree-vectorizer.c (vect_loop_vectorized_call): Look through non-empty preheaders. * tree-data-ref.c (dr_analyze_indices): Strip useless conversions to the MEM_REF base type. 2021-10-14 Martin Liska * common.opt: Stop using AUTODETECT_VALUE and use EnabledBy where possible. * opts.c: Enable OPT_fvar_tracking with optimize >= 1. * toplev.c (AUTODETECT_VALUE): Remove macro. (process_options): Simplify by using EnabledBy and OPT_fvar_tracking. Use OPTION_SET_P macro instead of AUTODETECT_VALUE. 2021-10-14 Jonathan Wright * config/aarch64/arm_neon.h (vld1_s8_x3): Use signed type for pointer parameter. (vld1_s32_x3): Likewise. 2021-10-14 Aldy Hernandez PR tree-optimization/102736 PR tree-optimization/102736 * gimple-range-path.cc (path_range_query::range_on_path_entry): Assert that the requested range is defined outside the path. (path_range_query::ssa_range_in_phi): Do not call range_on_path_entry for SSA names that are defined within the path. 2021-10-14 Iain Sandoe * config/darwin-driver.c (darwin_find_version_from_kernel): Quote internal identifiers and avoid contractions in warnings. (darwin_default_min_version): Likewise. (darwin_driver_init): Likewise. 2021-10-14 Martin Jambor * params.opt (ipa-cp-recursive-freq-factor): New. * ipa-cp.c (ipcp_value): Switch to inline initialization. New members scc_no, self_recursion_generated_level, same_scc and self_recursion_generated_p. (ipcp_lattice::add_value): Replaced parameter unlimited with same_lat_gen_level, usit it determine limit of values and store it to the value. (ipcp_lattice::print): Dump the new fileds. (allocate_and_init_ipcp_value): Take same_lat_gen_level as a new parameter and store it to the new value. (self_recursively_generated_p): Removed. (propagate_vals_across_arith_jfunc): Use self_recursion_generated_p instead of self_recursively_generated_p, store self generation level to such values. (value_topo_info::add_val): Set scc_no. (value_topo_info::propagate_effects): Multiply frequencies of recursively feeding values and self generated values by appropriate new factors. 2021-10-14 Richard Sandiford * config/aarch64/aarch64.c (aarch64_add_stmt_cost): Remove redundant test for flag_vect_cost_model. 2021-10-14 Aldy Hernandez * bitmap.c (debug): New overloaded function for auto_bitmaps. * bitmap.h (debug): Same. 2021-10-14 Hongyu Wang * config/i386/avx512fp16intrin.h (_mm512_mask_fcmadd_pch): Adjust builtin call. (_mm512_mask3_fcmadd_pch): Likewise. (_mm512_mask_fmadd_pch): Likewise (_mm512_mask3_fmadd_pch): Likewise (_mm512_mask_fcmadd_round_pch): Likewise (_mm512_mask3_fcmadd_round_pch): Likewise (_mm512_mask_fmadd_round_pch): Likewise (_mm512_mask3_fmadd_round_pch): Likewise (_mm_mask_fcmadd_sch): Likewise (_mm_mask3_fcmadd_sch): Likewise (_mm_mask_fmadd_sch): Likewise (_mm_mask3_fmadd_sch): Likewise (_mm_mask_fcmadd_round_sch): Likewise (_mm_mask3_fcmadd_round_sch): Likewise (_mm_mask_fmadd_round_sch): Likewise (_mm_mask3_fmadd_round_sch): Likewise (_mm_fcmadd_round_sch): Likewise * config/i386/avx512fp16vlintrin.h (_mm_mask_fmadd_pch): Adjust builtin call. (_mm_mask3_fmadd_pch): Likewise (_mm256_mask_fmadd_pch): Likewise (_mm256_mask3_fmadd_pch): Likewise (_mm_mask_fcmadd_pch): Likewise (_mm_mask3_fcmadd_pch): Likewise (_mm256_mask_fcmadd_pch): Likewise (_mm256_mask3_fcmadd_pch): Likewise * config/i386/i386-builtin.def: Add mask3 builtin for complex fma, and adjust mask_builtin to corresponding expander. * config/i386/i386-expand.c (ix86_expand_round_builtin): Skip eraseing embedded rounding for expanders that emits multiple insns. * config/i386/sse.md (complexmove): New mode_attr. (_fmaddc__mask1): New expander. (_fcmaddc__mask1): Likewise. (avx512fp16_fmaddcsh_v8hf_mask1): Likewise. (avx512fp16_fcmaddcsh_v8hf_mask1): Likewise. (avx512fp16_fcmaddcsh_v8hf_mask3): Likewise. (avx512fp16_fmaddcsh_v8hf_mask3): Likewise. * config/i386/subst.md (round_embedded_complex): New subst. 2021-10-14 John David Anglin * config/pa/pa.md (cbranchsf4): Disable if TARGET_SOFT_FLOAT. (cbranchdf4): Likewise. Add missing move patterns for TARGET_SOFT_FLOAT. 2021-10-13 Roger Sayle * config/i386/i386-expand.c (ix86_expand_vector_move): Use a pseudo intermediate when moving a SUBREG into a hard register, by checking ix86_hardreg_mov_ok. (ix86_expand_vector_extract): Store zero-extended SImode intermediate in a pseudo, then set target using a SUBREG_PROMOTED annotated subreg. * config/i386/sse.md (mov_internal): Prevent CSE creating complex (SUBREG) sets of (vector) hard registers before reload, by checking ix86_hardreg_mov_ok. 2021-10-13 Indu Bhagat * ctfc.h (enum ctf_dtu_d_union_enum): Remove redundant comma. 2021-10-13 Indu Bhagat * dwarf2ctf.c (gen_ctf_array_type): Fix typo in comment. 2021-10-13 Martin Sebor PR middle-end/102630 * pointer-query.cc (compute_objsize_r): Handle named address spaces. 2021-10-13 Iain Sandoe * collect2.c (is_lto_object_file): Release simple-object resources, close files. 2021-10-13 Andre Vieira * config/arm/arm.c (thumb2_legitimate_address_p): Use VALID_MVE_MODE when checking mve addressing modes. (mve_vector_mem_operand): Fix the way we handle pre, post and offset addressing modes. (arm_print_operand): Fix printing of POST_ and PRE_MODIFY. * config/arm/mve.md: Use mve_memory_operand predicate everywhere where there is a single Ux constraint. 2021-10-13 John David Anglin * config/pa/pa.md (muldi3): Add support for inlining 64-bit multiplication on 32-bit PA 1.1 and 2.0 targets. 2021-10-13 Martin Liska PR gcov-profile/90364 * coverage.c (build_info): Emit checksum to the global variable. (build_info_type): Add new field for checksum. (coverage_obj_finish): Pass object_checksum. (coverage_init): Use 0 as checksum for .gcno files. * gcov-dump.c (dump_gcov_file): Dump also new checksum field. * gcov.c (read_graph_file): Read also checksum. * doc/invoke.texi: Document the behaviour change. 2021-10-13 Richard Biener * gimple-iterator.h (gsi_iterator_update): Add GSI_LAST_NEW_STMT, start at integer value 2. * gimple-iterator.c (gsi_insert_seq_nodes_before): Update the iterator for GSI_LAST_NEW_STMT. (gsi_insert_seq_nodes_after): Likewise. * tree-if-conv.c (predicate_statements): Use GSI_LAST_NEW_STMT. * tree-ssa.c (execute_update_addresses_taken): Correct bogus arguments to gsi_replace. 2021-10-13 Martin Liska PR target/102688 * common.opt: Use EnabledBy instead of detection in finish_options and process_options. * opts.c (finish_options): Remove handling of x_flag_unroll_all_loops. * toplev.c (process_options): Likewise for flag_web and flag_rename_registers. 2021-10-13 Richard Biener PR tree-optimization/102659 * tree-if-conv.c (need_to_rewrite_undefined): New flag. (if_convertible_gimple_assign_stmt_p): Mark the loop for rewrite when stmts with undefined behavior on integer overflow appear. (combine_blocks): Predicate also when we need to rewrite stmts. (predicate_statements): Rewrite affected stmts to something with well-defined behavior on overflow. (tree_if_conversion): Initialize need_to_rewrite_undefined. 2021-10-13 Richard Biener PR ipa/102714 * ipa-sra.c (ptr_parm_has_nonarg_uses): Fix volatileness check. 2021-10-13 Jose E. Marchesi * dwarf2ctf.c: Fix typo in comment. 2021-10-12 Bill Schmidt PR target/101985 * config/rs6000/altivec.h (vec_cpsgn): Swap operand order. * config/rs6000/rs6000-overload.def (VEC_COPYSIGN): Use SKIP to avoid generating an automatic #define of vec_cpsgn. Use the correct built-in for V4SFmode that doesn't depend on VSX. 2021-10-12 Uroš Bizjak PR target/85730 PR target/82524 * config/i386/i386.md (*add_1_slp): Rewrite as define_insn_and_split pattern. Add alternative 1 and split it post reload to insert operand 1 into the low part of operand 0. (*sub_1_slp): Ditto. (*and_1_slp): Ditto. (*_1_slp): Ditto. (*ashl3_1_slp): Ditto. (*3_1_slp): Ditto. (*3_1_slp): Ditto. (*neg_1_slp): New insn_and_split pattern. (*one_cmpl_1_slp): Ditto. 2021-10-12 David Edelsohn * doc/install.texi: Update MinGW and mingw-64 Binaries download links. 2021-10-12 Daniel Le Duc Khoi Nguyen * doc/extend.texi (Common Variable Attributes): Fix typos in alloc_size documentation. 2021-10-12 Richard Biener PR tree-optimization/102696 * tree-vect-slp.c (vect_build_slp_tree_2): Properly mark the tree fatally failed when we reject a BIT_FIELD_REF. 2021-10-12 Richard Biener PR tree-optimization/102572 * tree-vect-stmts.c (vect_build_gather_load_calls): When gathering the vectorized defs for the mask pass in the desired mask vector type so invariants will be handled correctly. 2021-10-12 Tamar Christina * config/aarch64/aarch64-sve.md (*fcm_bic_combine, *fcm_nor_combine, *fcmuo_bic_combine, *fcmuo_nor_combine): New. 2021-10-12 Eric Botcazou PR target/102588 * config/sparc/sparc-modes.def (OI): New integer mode. 2021-10-12 Jakub Jelinek * gimple-fold.h (clear_padding_type_may_have_padding_p): Declare. * gimple-fold.c (clear_padding_type_may_have_padding_p): No longer static. 2021-10-12 Jakub Jelinek * tree-vectorizer.h (loop_cost_model): New function. (unlimited_cost_model): Use it. * tree-vect-loop.c (vect_analyze_loop_costing): Use loop_cost_model call instead of flag_vect_cost_model. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise. (vect_prune_runtime_alias_test_list): Likewise. Also use it instead of flag_simd_cost_model. 2021-10-12 liuhongt PR target/102483 * config/i386/i386-expand.c (emit_reduc_half): Handle V4QImode. * config/i386/mmx.md (reduc__scal_v4qi): New expander. (reduc_plus_scal_v4qi): Ditto. 2021-10-12 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_cmpeq_epi64, _mm_cmpgt_epi64, _mm_mullo_epi32, _mm_mul_epi32, _mm_packus_epi32): New. * config/rs6000/nmmintrin.h: Copy from i386, tweak to suit. 2021-10-12 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_cvtepi8_epi16, _mm_cvtepi8_epi32, _mm_cvtepi8_epi64, _mm_cvtepi16_epi32, _mm_cvtepi16_epi64, _mm_cvtepi32_epi64, _mm_cvtepu8_epi16, _mm_cvtepu8_epi32, _mm_cvtepu8_epi64, _mm_cvtepu16_epi32, _mm_cvtepu16_epi64, _mm_cvtepu32_epi64): New. 2021-10-12 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_test_all_zeros, _mm_test_all_ones, _mm_test_mix_ones_zeros): Rewrite as macro. 2021-10-12 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_min_epi8, _mm_min_epu16, _mm_min_epi32, _mm_min_epu32, _mm_max_epi8, _mm_max_epu16, _mm_max_epi32, _mm_max_epu32): New. 2021-10-11 Jan Hubicka * ipa-modref-tree.h (struct modref_access_node): Revert accidental change. (struct modref_ref_node): Likewise. 2021-10-11 Jan Hubicka * ipa-modref-tree.h (modref_tree::global_access_p): New member function. * ipa-modref.c: (implicint_const_eaf_flags,implicit_pure_eaf_flags, ignore_stores_eaf_flags): Move to ipa-modref.h (remove_useless_eaf_flags): Remove early exit on NOCLOBBER. (modref_summary::global_memory_read_p): New member function. (modref_summary::global_memory_written_p): New member function. * ipa-modref.h (modref_summary::global_memory_read_p, modref_summary::global_memory_written_p): Declare. (implicint_const_eaf_flags,implicit_pure_eaf_flags, ignore_stores_eaf_flags): move here. * tree-ssa-structalias.c: Include ipa-modref-tree.h, ipa-modref.h and attr-fnspec.h. (handle_rhs_call): Rewrite. (handle_call_arg): New function. (determine_global_memory_access): New function. (handle_const_call): Remove (handle_pure_call): Remove (find_func_aliases_for_call): Update use of handle_rhs_call. (compute_points_to_sets): Handle global memory acccesses selectively 2021-10-11 Diane Meirowitz * doc/invoke.texi: Add link to UndefinedBehaviorSanitizer documentation, mention UBSAN_OPTIONS, similar to what is done for AddressSanitizer. 2021-10-11 Richard Biener PR middle-end/102683 * internal-fn.c (expand_DEFERRED_INIT): Check for mode availability before building an integer type for storage purposes. 2021-10-11 Richard Biener PR middle-end/101480 * gimple.c (gimple_call_fnspec): Do not mark operator new/delete as const. 2021-10-11 Martin Liska * common.opt: Remove Init(2) for some options. * toplev.c (process_options): Do not use AUTODETECT_VALUE, but use rather OPTION_SET_P. 2021-10-11 Martin Liska * common.opt: Remove usage of IRA_REGION_AUTODETECT. * flag-types.h (enum ira_region): Likewise. * toplev.c (process_options): Use OPTION_SET_P instead of IRA_REGION_AUTODETECT. 2021-10-11 Jakub Jelinek * omp-low.c (omp_runtime_api_call): Handle omp_get_max_teams, omp_[sg]et_teams_thread_limit and omp_set_num_teams. 2021-10-11 Stefan Schulze Frielinghaus * config/s390/s390-protos.h (s390_rawmemchr): Add prototype. * config/s390/s390.c (s390_rawmemchr): New function. * config/s390/s390.md (rawmemchr): New expander. * config/s390/vector.md (@vec_vfees): Basically a copy of the pattern vfees from vx-builtins.md. * config/s390/vx-builtins.md (*vfees): Remove. 2021-10-11 Stefan Schulze Frielinghaus * builtins.c (get_memory_rtx): Change to external linkage. * builtins.h (get_memory_rtx): Add function prototype. * doc/md.texi (rawmemchr): Document. * internal-fn.c (expand_RAWMEMCHR): Define. * internal-fn.def (RAWMEMCHR): Add. * optabs.def (rawmemchr_optab): Add. * tree-loop-distribution.c (find_single_drs): Change return code behaviour by also returning true if no single store was found but a single load. (loop_distribution::classify_partition): Respect the new return code behaviour of function find_single_drs. (loop_distribution::execute): Call new function transform_reduction_loop in order to replace rawmemchr or strlen like loops by calls into builtins. (generate_reduction_builtin_1): New function. (generate_rawmemchr_builtin): New function. (generate_strlen_builtin_1): New function. (generate_strlen_builtin): New function. (generate_strlen_builtin_using_rawmemchr): New function. (reduction_var_overflows_first): New function. (determine_reduction_stmt_1): New function. (determine_reduction_stmt): New function. (loop_distribution::transform_reduction_loop): New function. 2021-10-11 Martin Liska * tree.c (cl_option_hasher::hash): Use cl_optimization_hash and remove legacy hashing code. 2021-10-11 Kito Cheng PR target/100316 * builtins.c (maybe_emit_call_builtin___clear_cache): Allow CONST_INT for BEGIN and END, and use gcc_assert rather than error. 2021-10-10 Jakub Jelinek PR debug/102441 * var-tracking.c (add_stores): For cselib_sp_derived_value_p values use MO_VAL_SET if loc is not sp. 2021-10-10 Andrew Pinski PR tree-optimization/102622 * match.pd: Swap the order of a?pow2cst:0 and a?-1:0 transformations. Swap the order of a?0:pow2cst and a?0:-1 transformations. 2021-10-09 liuhongt PR target/102639 * config/i386/i386-expand.c (ix86_valid_mask_cmp_mode): Handle HFmode. (ix86_use_mask_cmp_p): Ditto. (ix86_expand_sse_movcc): Ditto. * config/i386/i386.md (setcc_hf_mask): New define_insn. (movhf_mask): Ditto. (UNSPEC_MOVCC_MASK): New unspec. * config/i386/sse.md (UNSPEC_PCMP): Move to i386.md. 2021-10-08 Vladimir N. Makarov PR rtl-optimization/102627 * lra-constraints.c (split_reg): Use at least natural mode of hard reg. 2021-10-08 Aldy Hernandez * gimple-range-cache.cc (non_null_ref::non_null_deref_p): Grow bitmap if needed. 2021-10-08 Aldy Hernandez * value-range.cc (irange::debug): New. * value-range.h (irange::debug): New. 2021-10-08 Richard Sandiford PR tree-optimization/102385 * predict.h (change_edge_frequency): Declare. * predict.c (change_edge_frequency): New function. * tree-ssa-loop-manip.h (tree_transform_and_unroll_loop): Remove edge argument. (tree_unroll_loop): Likewise. * gimple-loop-jam.c (tree_loop_unroll_and_jam): Update accordingly. * tree-predcom.c (pcom_worker::tree_predictive_commoning_loop): Likewise. * tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Likewise. * tree-ssa-loop-manip.c (tree_unroll_loop): Likewise. (tree_transform_and_unroll_loop): Likewise. Use single_dom_exit to retrieve the exit edges. Make all the old profile update code conditional on !single_loop_p -- the case it was written for -- and use a different approach for the single-loop case. 2021-10-08 Martin Liska * config/alpha/alpha.c (alpha_option_override): Use new macro OPTION_SET_P. * config/arc/arc.c (arc_override_options): Likewise. * config/arm/arm.c (arm_option_override): Likewise. * config/bfin/bfin.c (bfin_load_pic_reg): Likewise. * config/c6x/c6x.c (c6x_option_override): Likewise. * config/csky/csky.c: Likewise. * config/darwin.c (darwin_override_options): Likewise. * config/frv/frv.c (frv_option_override): Likewise. * config/i386/djgpp.h: Likewise. * config/i386/i386.c (ix86_stack_protect_guard): Likewise. (ix86_max_noce_ifcvt_seq_cost): Likewise. * config/ia64/ia64.c (ia64_option_override): Likewise. (ia64_override_options_after_change): Likewise. * config/m32c/m32c.c (m32c_option_override): Likewise. * config/m32r/m32r.c (m32r_init): Likewise. * config/m68k/m68k.c (m68k_option_override): Likewise. * config/microblaze/microblaze.c (microblaze_option_override): Likewise. * config/mips/mips.c (mips_option_override): Likewise. * config/nios2/nios2.c (nios2_option_override): Likewise. * config/nvptx/nvptx.c (nvptx_option_override): Likewise. * config/pa/pa.c (pa_option_override): Likewise. * config/riscv/riscv.c (riscv_option_override): Likewise. * config/rs6000/aix71.h: Likewise. * config/rs6000/aix72.h: Likewise. * config/rs6000/aix73.h: Likewise. * config/rs6000/rs6000.c (darwin_rs6000_override_options): Likewise. (rs6000_override_options_after_change): Likewise. (rs6000_linux64_override_options): Likewise. (glibc_supports_ieee_128bit): Likewise. (rs6000_option_override_internal): Likewise. (rs6000_file_start): Likewise. (rs6000_darwin_file_start): Likewise. * config/rs6000/rtems.h: Likewise. * config/rs6000/sysv4.h: Likewise. * config/rs6000/vxworks.h (SUB3TARGET_OVERRIDE_OPTIONS): Likewise. * config/s390/s390.c (s390_option_override): Likewise. * config/sh/linux.h: Likewise. * config/sh/netbsd-elf.h (while): Likewise. * config/sh/sh.c (sh_option_override): Likewise. * config/sol2.c (solaris_override_options): Likewise. * config/sparc/sparc.c (sparc_option_override): Likewise. * config/tilegx/tilegx.c (tilegx_option_override): Likewise. * config/visium/visium.c (visium_option_override): Likewise. * config/vxworks.c (vxworks_override_options): Likewise. * lto-opts.c (lto_write_options): Likewise. * omp-expand.c (expand_omp_simd): Likewise. * omp-general.c (omp_max_vf): Likewise. * omp-offload.c (oacc_xform_loop): Likewise. * opts.h (OPTION_SET_P): Likewise. * targhooks.c (default_max_noce_ifcvt_seq_cost): Likewise. * toplev.c (process_options): Likewise. * tree-predcom.c: Likewise. * tree-sra.c (analyze_all_variable_accesses): Likewise. 2021-10-08 liuhongt PR target/102464 * config/i386/i386.c (ix86_optab_supported_p): Return true for HFmode. * match.pd: Simplify (_Float16) ceil ((double) x) to __builtin_ceilf16 (a) when a is _Float16 type and direct_internal_fn_supported_p. 2021-10-08 liuhongt PR target/102494 * config/i386/i386-expand.c (emit_reduc_half): Hanlde V4HImode. * config/i386/mmx.md (reduc_plus_scal_v4hi): New. (reduc__scal_v4hi): New. 2021-10-08 liuhongt * common.opt (ftree-vectorize): Add Var(flag_tree_vectorize). * doc/invoke.texi (Options That Control Optimization): Update documents. * opts.c (default_options_table): Enable auto-vectorization at O2 with very-cheap cost model. (finish_options): Use cheap cost model for explicit -ftree{,-loop}-vectorize. 2021-10-07 Indu Bhagat * ctfc.c (ctfc_delete_container): Free hash table contents. 2021-10-07 Indu Bhagat * toplev.c (process_options): Do not warn for GNU GIMPLE. 2021-10-07 Siddhesh Poyarekar * tree-object-size.c (addr_object_size, compute_builtin_object_size): Drop PDECL and POFF arguments. (addr_object_size): Adjust calls. * tree-object-size.h (compute_builtin_object_size): Drop PDECL and POFF arguments. 2021-10-07 Roger Sayle * rtl.def (SMUL_HIGHPART, UMUL_HIGHPART): New RTX codes for representing signed and unsigned high-part multiplication resp. * simplify-rtx.c (simplify_binary_operation_1) [SMUL_HIGHPART, UMUL_HIGHPART]: Simplify high-part multiplications by zero. [SS_PLUS, US_PLUS, SS_MINUS, US_MINUS, SS_MULT, US_MULT, SS_DIV, US_DIV]: Similar simplifications for saturating arithmetic. (simplify_const_binary_operation) [SS_PLUS, US_PLUS, SS_MINUS, US_MINUS, SS_MULT, US_MULT, SMUL_HIGHPART, UMUL_HIGHPART]: Implement compile-time evaluation for constant operands. * dwarf2out.c (mem_loc_descriptor): Skip SMUL_HIGHPART and UMUL_HIGHPART. * doc/rtl.texi (smul_highpart, umul_highpart): Document RTX codes. * doc/md.texi (smul@var{m}3_highpart, umul@var{m3}_highpart): Mention the new smul_highpart and umul_highpart RTX codes. * doc/invoke.texi: Silence @xref "compilation" warnings. 2021-10-07 Martin Jambor PR ipa/102388 * ipa-prop.c (ipa_edge_args_sum_t::duplicate): Also handle the case when the source reference description corresponds to a referance taken in a function src->caller is inlined to. 2021-10-07 Jan Hubicka PR ipa/102581 * ipa-modref-tree.h (modref_access_node::contains_p): Handle offsets better. (modref_access_node::try_merge_with): Add sanity check that there are no redundant entries in the list. 2021-10-07 Richard Biener PR tree-optimization/102608 * tree-ssa-sccvn.c (visit_stmt): Drop .DEFERRED_INIT to varying. 2021-10-07 Martin Liska * toplev.c (toplev::main): Make save_opt_decoded_options a pointer type * toplev.h: Likewise. 2021-10-07 Andrew Stubbs * config/gcn/gcn-valu.md (gather_insn_2offsets): Apply HAVE_GCN_ASM_GLOBAL_LOAD_FIXED. (scatter_insn_2offsets): Likewise. 2021-10-07 Andrew Stubbs * config/gcn/gcn-hsa.h (SRAMOPT): Include the whole option string. Adjust for new -msram-ecc=any behaviour. (ASM_SPEC): Adjust -mxnack and -msram-ecc usage. * config/gcn/gcn.c (output_file_start): Implement -msram-ecc=any. * config/gcn/mkoffload.c (EF_AMDGPU_XNACK): Rename to ... (EF_AMDGPU_XNACK_V3): ... this. (EF_AMDGPU_SRAM_ECC): Rename to ... (EF_AMDGPU_SRAM_ECC_V3): ... this. (EF_AMDGPU_FEATURE_XNACK_V4): New. (EF_AMDGPU_FEATURE_XNACK_UNSUPPORTED_V4): New. (EF_AMDGPU_FEATURE_XNACK_ANY_V4): New. (EF_AMDGPU_FEATURE_XNACK_OFF_V4): New. (EF_AMDGPU_FEATURE_XNACK_ON_V4): New. (EF_AMDGPU_FEATURE_SRAMECC_V4): New. (EF_AMDGPU_FEATURE_SRAMECC_UNSUPPORTED_V4): New. (EF_AMDGPU_FEATURE_SRAMECC_ANY_V4): New. (EF_AMDGPU_FEATURE_SRAMECC_OFF_V4): New. (EF_AMDGPU_FEATURE_SRAMECC_ON_V4): New. (SET_XNACK_ON): New. (SET_XNACK_OFF): New. (TEST_XNACK): New. (SET_SRAM_ECC_ON): New. (SET_SRAM_ECC_ANY): New. (SET_SRAM_ECC_OFF): New. (TEST_SRAM_ECC_ANY): New. (TEST_SRAM_ECC_ON): New. (main): Implement HSACOv4 and -msram-ecc=any. 2021-10-07 Andrew Stubbs * config.in: Regenerate. * config/gcn/gcn-hsa.h (X_FIJI): New macro. (X_900): New macro. (X_906): New macro. (X_908): New macro. (A_FIJI): Rename to ... (S_FIJI): ... this. (A_900): Rename to ... (S_900): ... this. (A_906): Rename to ... (S_906): ... this. (A_908): Rename to ... (S_908): ... this. (SRAMOPT): New macro. (ASM_SPEC): Adjust xnack option usage. * config/gcn/gcn.c (output_file_start): Adjust amdgcn_target usage. * configure: Regenerate. * configure.ac: Detect LLVM assembler dialect. 2021-10-07 Richard Biener * tree-pretty-print.c (dump_generic_node): Do not elide printing '&' when dumping with -gimple. 2021-10-06 Andrew MacLeod * gimple-range-cache.cc (non_null_ref::adjust_range): Call new intersect routine. * gimple-range-fold.cc (adjust_pointer_diff_expr): Ditto. (adjust_imagpart_expr): Ditto. * value-range.cc (irange::irange_intersect): Call new routine if RHS is a single pair. (irange::intersect): New wide_int version. * value-range.h (class irange): New prototype. 2021-10-06 Andrew MacLeod * gimple-range-edge.cc (gimple_outgoing_range::gimple_outgoing_range): Add parameter to limit size when recognizing switches. (gimple_outgoing_range::edge_range_p): Check size limit. * gimple-range-edge.h (gimple_outgoing_range): Add size field. * gimple-range-gori.cc (gori_map::calculate_gori): Ignore switches that exceed the size limit. (gori_compute::gori_compute): Add initializer. * params.opt (evrp-switch-limit): New. * doc/invoke.texi: Update docs. 2021-10-06 Andrew MacLeod * value-range.h (irange::set_varying): Use TYPE_MIN_VALUE and TYPE_MAX_VALUE instead of creating new trees when possible. 2021-10-06 Andrew MacLeod * gimple-range-cache.cc (non_null_ref::adjust_range): Check for zero and non-zero more efficently. 2021-10-06 Richard Biener PR c/102605 * dumpfile.h (TDF_GIMPLE_VAL): New. (dump_flag): Re-order and adjust TDF_* flags. Make the enum uint32_t. Use std::underlying_type in the operator overloads. (optgroup_flag): Likewise for the operator overloads. * tree-pretty-print.c (dump_generic_node): Wrap ADDR_EXPR in _Literal if TDF_GIMPLE_VAL. * gimple-pretty-print.c (dump_gimple_assign): Add TDF_GIMPLE_VAL to flags when dumping operands where only is_gimple_val are allowed. (dump_gimple_cond): Likewise. 2021-10-06 prathamesh.kulkarni * gimple-isel.cc (gimple_expand_vec_cond_expr): Remove redundant if condition. 2021-10-05 qing zhao PR middle-end/102359 * gimplify.c (gimplify_decl_expr): Not add initialization for an auto variable when it has been initialized by frontend. 2021-10-05 Aldy Hernandez * tree-ssa-threadupdate.c (jt_path_registry::cancel_invalid_paths): Loosen restrictions 2021-10-05 Jan-Benedict Glaw * common/config/avr/avr-common.c (avr_handle_option): Mark argument as ATTRIBUTE_UNUSED. 2021-10-05 Jan-Benedict Glaw * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Undefine before redefinition. 2021-10-05 Richard Biener * toplev.c (no_backend): Remove global var. (process_options): Pass in no_backend, move post_options langhook call to toplev::main. (do_compile): Pass in no_backend, move process_options call to toplev::main. (toplev::run_self_tests): Check no_backend at the caller. (toplev::main): Call post_options and process_options split out from do_compile, do self-tests only if no_backend is initialized. 2021-10-05 Richard Biener * tree-cfg.c (dump_function_to_file): Dump the UID of the function as part of the name when requested. * tree-pretty-print.c (dump_function_name): Dump the UID when requested and the langhook produced the actual name. 2021-10-05 Richard Biener PR middle-end/102587 PR middle-end/102285 * internal-fn.c (expand_DEFERRED_INIT): Fall back to zero-initialization as last resort, use the constant size as given by the DEFERRED_INIT argument to build the initializer. 2021-10-04 Marek Polacek PR c++/97573 * doc/invoke.texi: Document -Warray-compare. 2021-10-04 Richard Biener * gimplify.c (is_var_need_auto_init): DECL_HARD_REGISTER variables are not to be initialized. 2021-10-04 Richard Biener * expr.h (non_mem_decl_p): Declare. (mem_ref_refers_to_non_mem_p): Likewise. * expr.c (non_mem_decl_p): Export. (mem_ref_refers_to_non_mem_p): Likewise. * internal-fn.c (expand_DEFERRED_INIT): Do not expand the LHS but check the base with mem_ref_refers_to_non_mem_p and non_mem_decl_p. 2021-10-04 Richard Biener PR tree-optimization/102570 * tree-ssa-sccvn.h (vn_reference_op_struct): Document we are using clique for the internal function code. * tree-ssa-sccvn.c (vn_reference_op_eq): Compare the internal function code. (print_vn_reference_ops): Print the internal function code. (vn_reference_op_compute_hash): Hash it. (copy_reference_ops_from_call): Record it. (visit_stmt): Remove the restriction around internal function calls. (fully_constant_vn_reference_p): Use fold_const_call and handle internal functions. (vn_reference_eq): Compare call return types. * tree-ssa-pre.c (create_expression_by_pieces): Handle generating calls to internal functions. (compute_avail): Remove the restriction around internal function calls. 2021-10-04 Aldy Hernandez PR tree-optimization/102560 * gimple-ssa-warn-alloca.c (alloca_call_type): Remove static marker for invalid_range. 2021-10-04 Richard Biener PR middle-end/102587 * internal-fn.c (expand_DEFERRED_INIT): Guard register initialization path an avoid initializing VLA registers with it. 2021-10-04 Eric Botcazou * config/rs6000/vxworks.h (TARGET_INIT_LIBFUNCS): Delete. 2021-10-03 Martin Liska * toplev.c (toplev::main): Check opt_index if it is a part of cl_options. 2021-10-02 Aldy Hernandez PR tree-optimization/102563 * range-op.cc (operator_lshift::op1_range): Do not clobber range. 2021-10-02 Martin Liska * toplev.c (toplev::main): save_decoded_options[0] is program name and so it should be skipped. 2021-10-01 Aldy Hernandez PR tree-optimization/102546 * range-op.cc (operator_lshift::op1_range): Teach range-ops that X << Y is non-zero implies X is also non-zero. 2021-10-01 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-X2 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update docs. 2021-10-01 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-A710 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update docs. 2021-10-01 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-A510 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update docs. 2021-10-01 Martin Sebor PR c/102103 * doc/invoke.texi (-Waddress): Update. * gengtype.c (write_types): Avoid -Waddress. * poly-int.h (POLY_SET_COEFF): Avoid using null. 2021-10-01 John David Anglin PR debug/102373 * config/pa/pa.c (pa_option_override): Default to dwarf version 4 on hppa64-hpux. 2021-10-01 Przemyslaw Wirkus * config/aarch64/aarch64.h (AARCH64_FL_V9): Update value. 2021-10-01 Aldy Hernandez * gimple-range-path.cc (path_range_query::compute_ranges): Use get_path_oracle. * gimple-range-path.h (class path_range_query): Remove shadowed m_oracle field. (path_range_query::get_path_oracle): New. 2021-10-01 Jakub Jelinek Richard Biener PR sanitizer/102515 * doc/invoke.texi (-fsanitize=integer-divide-by-zero): Remove INT_MIN / -1 division detection from here ... (-fsanitize=signed-integer-overflow): ... and add it here. 2021-10-01 Przemyslaw Wirkus * config/aarch64/aarch64-arches.def (AARCH64_ARCH): Added armv9-a. * config/aarch64/aarch64.h (AARCH64_FL_V9): New. (AARCH64_FL_FOR_ARCH9): New flags for Armv9-A. (AARCH64_ISA_V9): New ISA flag. * doc/invoke.texi: Update docs. 2021-10-01 Martin Liska * toplev.c (toplev::main): Save decoded optimization options. * toplev.h (save_opt_decoded_options): New. * doc/extend.texi: Be more clear about optimize and target attributes. 2021-10-01 Eric Botcazou * explow.c: Include langhooks.h. (set_stack_check_libfunc): Build a proper function type. 2021-10-01 Eric Botcazou PR c++/64697 * config/i386/i386.c (legitimate_pic_address_disp_p): For PE-COFF do not return true for external weak function symbols in medium model. 2021-10-01 Jakub Jelinek * tree.h (OMP_CLAUSE_ORDER_REPRODUCIBLE): Define. * tree-pretty-print.c (dump_omp_clause) : Print reproducible: for OMP_CLAUSE_ORDER_REPRODUCIBLE. * omp-general.c (omp_extract_for_data): If OMP_CLAUSE_ORDER is seen without OMP_CLAUSE_ORDER_UNCONSTRAINED, overwrite sched_kind to OMP_CLAUSE_SCHEDULE_STATIC. 2021-10-01 Richard Biener PR middle-end/102518 * tree-inline.c (setup_one_parameter): Avoid substituting an invariant into contexts where a GIMPLE register is not valid. 2021-09-30 Przemyslaw Wirkus * config/arm/arm-cpus.in: Add Cortex-R52+ CPU. * config/arm/arm-tables.opt: Regenerate. * config/arm/arm-tune.md: Regenerate. * doc/invoke.texi: Update docs. 2021-09-30 Uroš Bizjak PR target/89954 * config/i386/i386.md (sign_extend:WIDE (any_logic:NARROW (memory, immediate)) splitters): New splitters. 2021-09-30 Tobias Burnus * omp-low.c (omp_runtime_api_call): Add omp_aligned_{,c}alloc and omp_{c,re}alloc, fix omp_alloc/omp_free. 2021-09-30 Martin Liska * defaults.h (ASM_OUTPUT_ASCII): Do not hide global variable asm_out_file and stream directly to MYFILE. 2021-09-30 Richard Biener * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Restore and fix condition under which we apply npeel to the DRs misalignment value. 2021-09-30 Richard Biener * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Fix npeel check for variable amount of peeling. 2021-09-30 Aldy Hernandez * lto-wrapper.c (run_gcc): Plug snprintf overflow. 2021-09-30 Aldy Hernandez * gimple-range.cc (gimple_ranger::debug): New. * gimple-range.h (class gimple_ranger): Add debug. 2021-09-30 Aldy Hernandez PR middle-end/102519 * tree-vrp.c (hybrid_threader::~hybrid_threader): Free m_query. 2021-09-29 Indu Bhagat PR debug/102507 * btfout.c (GTY): Add GTY (()) albeit for cosmetic only purpose. (btf_finalize): Empty the hash_map btf_var_ids. 2021-09-29 Aldy Hernandez * tree-vrp.c (thread_through_all_blocks): Return bool. (execute_vrp_threader): Return TODO_* flags. (pass_data_vrp_threader): Set todo_flags_finish to 0. 2021-09-29 Aldy Hernandez * timevar.def (TV_TREE_VRP_THREADER): New. * tree-vrp.c: Use TV_TREE_VRP_THREADER for VRP threader pass. 2021-09-29 David Faust * config.gcc (bpf-*-*): Do not overwrite extra_headers. 2021-09-29 Jonathan Wright * config/aarch64/aarch64-builtins.c (TYPES_BINOP_PPU): Define new type qualifier enum. (TYPES_TERNOP_SSSU): Likewise. (TYPES_TERNOP_PPPU): Likewise. * config/aarch64/aarch64-simd-builtins.def: Define PPU, SSU, PPPU and SSSU builtin generator macros for qtbl1 and qtbx1 Neon builtins. * config/aarch64/arm_neon.h (vqtbl1_p8): Use type-qualified builtin and remove casts. (vqtbl1_s8): Likewise. (vqtbl1q_p8): Likewise. (vqtbl1q_s8): Likewise. (vqtbx1_s8): Likewise. (vqtbx1_p8): Likewise. (vqtbx1q_s8): Likewise. (vqtbx1q_p8): Likewise. (vtbl1_p8): Likewise. (vtbl2_p8): Likewise. (vtbx2_p8): Likewise. 2021-09-29 Richard Biener * tree-vect-data-refs.c (vect_dr_misalign_for_aligned_access): New helper. (vect_update_misalignment_for_peel): Use it to update misaligned to the value necessary for an aligned access. (vect_get_peeling_costs_all_drs): Likewise. (vect_enhance_data_refs_alignment): Likewise. 2021-09-29 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_expand_cpymem): Count number of emitted operations and adjust heuristic for code size. 2021-09-29 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_expand_setmem): Count number of emitted operations and adjust heuristic for code size. 2021-09-29 Jakub Jelinek PR middle-end/102504 * gimplify.c (gimplify_scan_omp_clauses): Use omp_check_private even in OMP_SCOPE clauses, not just on worksharing construct clauses. 2021-09-28 Geng Qi * config/riscv/riscv.md (mulv4): Call gen_smul3_highpart. (mulditi3): Call muldi3_highpart. (muldi3_highpart): Rename to muldi3_highpart. (mulsidi3): Call mulsi3_highpart. (mulsi3_highpart): Rename to mulsi3_highpart. 2021-09-28 Iain Sandoe * config/darwin.h (DSYMUTIL_SPEC): Recognize D sources. 2021-09-28 Iain Sandoe * config/rs6000/darwin.h (FIXED_R13): Add for PPC64. (FIRST_SAVED_GP_REGNO): Save from R13 even when it is one of the fixed regs. 2021-09-28 Kyrylo Tkachov * config/aarch64/aarch64.h (AARCH64_FL_LS64): Define (AARCH64_FL_V8_7): Likewise. (AARCH64_FL_FOR_ARCH8_7): Likewise. * config/aarch64/aarch64-arches.def (armv8.7-a): Define. * config/aarch64/aarch64-option-extensions.def (ls64): Define. * doc/invoke.texi: Document the above. 2021-09-28 Aldy Hernandez * dbgcnt.c (dbg_cnt_counter): New. * dbgcnt.h (dbg_cnt_counter): New. * dumpfile.c (dump_options): Add entry for TDF_THREADING. * dumpfile.h (enum dump_flag): Add TDF_THREADING. * gimple-range-path.cc (DEBUG_SOLVER): Use TDF_THREADING. * tree-ssa-threadupdate.c (dump_jump_thread_path): Dump out debug counter. 2021-09-28 Aldy Hernandez * cfgcleanup.c (pass_jump::execute): Check flag_expensive_optimizations. (pass_jump_after_combine::gate): Same. * doc/invoke.texi (-fthread-jumps): Enable for -O1. * opts.c (default_options_table): Enable -fthread-jumps at -O1. * tree-ssa-threadupdate.c (fwd_jt_path_registry::remove_jump_threads_including): Bail unless flag_thread_jumps. 2021-09-28 Ilya Leoshkevich * tree-ssa-reassoc.c (biased_names): New global. (propagate_bias_p): New function. (loop_carried_phi): Remove. (propagate_rank): Propagate bias along single uses. (get_rank): Update biased_names when needed. 2021-09-28 Ilya Leoshkevich * passes.def (pass_reassoc): Rename parameter to early_p. * tree-ssa-reassoc.c (reassoc_bias_loop_carried_phi_ranks_p): New variable. (phi_rank): Don't bias loop-carried phi ranks before vectorization pass. (execute_reassoc): Add bias_loop_carried_phi_ranks_p parameter. (pass_reassoc::pass_reassoc): Add bias_loop_carried_phi_ranks_p initializer. (pass_reassoc::set_param): Set bias_loop_carried_phi_ranks_p value. (pass_reassoc::execute): Pass bias_loop_carried_phi_ranks_p to execute_reassoc. (pass_reassoc::bias_loop_carried_phi_ranks_p): New member. 2021-09-28 Jakub Jelinek PR target/102498 * config/i386/i386.c (standard_80387_constant_p): Don't recognize special 80387 instruction XFmode constants if flag_rounding_math. 2021-09-28 Richard Biener PR tree-optimization/100112 * tree-ssa-sccvn.c (visit_reference_op_load): Record the referece into the hashtable twice in case last_vuse is different from the original vuse on the stmt. 2021-09-28 Jakub Jelinek PR middle-end/102492 * gimplify.c (gimplify_adjust_omp_clauses_1): Don't call the omp_finish_clause langhook on implicitly added OMP_CLAUSE_PRIVATE clauses on SIMD constructs. 2021-09-28 Aldy Hernandez PR tree-optimization/102511 * gimple-range-path.cc (path_range_query::range_on_path_entry): Return VARYING when nothing found. 2021-09-28 Hongyu Wang PR target/102230 * config/i386/i386.h (VALID_AVX512FP16_REG_MODE): Add V2HF mode check. (VALID_SSE2_REG_VHF_MODE): Add V4HFmode and V2HFmode. (VALID_MMX_REG_MODE): Add V4HFmode. (SSE_REG_MODE_P): Replace VALID_AVX512FP16_REG_MODE with vector mode condition. * config/i386/i386.c (classify_argument): Parse V4HF/V2HF via sse regs. (function_arg_32): Add V4HFmode. (function_arg_advance_32): Likewise. * config/i386/i386.md (mode): Add V4HF/V2HF. (MODE_SIZE): Likewise. * config/i386/mmx.md (MMXMODE): Add V4HF mode. (V_32): Add V2HF mode. (VHF_32_64): New mode iterator. (*mov_internal): Adjust sse alternatives to support V4HF mode move. (*mov_internal): Adjust sse alternatives to support V2HF mode move. (3): New define_insn for add/sub/mul/div. 2021-09-28 Aldy Hernandez * tree-ssa-threadbackward.c (pass_thread_jumps::gate): Check flag_thread_jumps. (pass_early_thread_jumps::gate): Same. * tree-ssa-threadedge.c (jump_threader::thread_outgoing_edges): Return if !flag_thread_jumps. * tree-ssa-threadupdate.c (jt_path_registry::register_jump_thread): Assert that flag_thread_jumps is true. 2021-09-28 liuhongt * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Relax condition of simplifying (vec_concat:M (vec_select op0 index0)(vec_select op1 index1)) to allow different modes between op0 and M, but have same inner mode. 2021-09-28 liuhongt * config/i386/i386-expand.c (emit_reduc_half): Handle V8HF/V16HF/V32HFmode. * config/i386/sse.md (REDUC_SSE_PLUS_MODE): Add V8HF. (REDUC_SSE_SMINMAX_MODE): Ditto. (REDUC_PLUS_MODE): Add V16HF and V32HF. (REDUC_SMINMAX_MODE): Ditto. 2021-09-27 Aldy Hernandez * gimple-range-path.cc (path_range_query::precompute_ranges_in_block): Rename to... (path_range_query::compute_ranges_in_block): ...this. (path_range_query::precompute_ranges): Rename to... (path_range_query::compute_ranges): ...this. (path_range_query::precompute_relations): Rename to... (path_range_query::compute_relations): ...this. (path_range_query::precompute_phi_relations): Rename to... (path_range_query::compute_phi_relations): ...this. * gimple-range-path.h: Rename precompute* to compute*. * tree-ssa-threadbackward.c (back_threader::find_taken_edge_switch): Same. (back_threader::find_taken_edge_cond): Same. * tree-ssa-threadedge.c (hybrid_jt_simplifier::compute_ranges_from_state): Same. (hybrid_jt_state::register_equivs_stmt): Inline... * tree-ssa-threadedge.h: ...here. 2021-09-27 Aldy Hernandez * tree-vrp.c (lhs_of_dominating_assert): Remove. (class vrp_jt_state): Remove. (class vrp_jt_simplifier): Remove. (vrp_jt_simplifier::simplify): Remove. (class vrp_jump_threader): Remove. (vrp_jump_threader::vrp_jump_threader): Remove. (vrp_jump_threader::~vrp_jump_threader): Remove. (vrp_jump_threader::before_dom_children): Remove. (vrp_jump_threader::after_dom_children): Remove. 2021-09-27 Aldy Hernandez * passes.def (pass_vrp_threader): New. * tree-pass.h (make_pass_vrp_threader): Add make_pass_vrp_threader. * tree-ssa-threadedge.c (hybrid_jt_state::register_equivs_stmt): New. (hybrid_jt_simplifier::hybrid_jt_simplifier): New. (hybrid_jt_simplifier::simplify): New. (hybrid_jt_simplifier::compute_ranges_from_state): New. * tree-ssa-threadedge.h (class hybrid_jt_state): New. (class hybrid_jt_simplifier): New. * tree-vrp.c (execute_vrp): Remove ASSERT_EXPR based jump threader. (class hybrid_threader): New. (hybrid_threader::hybrid_threader): New. (hybrid_threader::~hybrid_threader): New. (hybrid_threader::before_dom_children): New. (hybrid_threader::after_dom_children): New. (execute_vrp_threader): New. (class pass_vrp_threader): New. (make_pass_vrp_threader): New. 2021-09-27 Martin Liska * output.h (enum section_flag): New. (SECTION_FORGET): Remove. (SECTION_ENTSIZE): Make it (1UL << 8) - 1. (SECTION_STYLE_MASK): Define it based on other enum values. * varasm.c (switch_to_section): Remove unused handling of SECTION_FORGET. 2021-09-27 Martin Liska * common.opt: Add new variable flag_default_complex_method. * opts.c (finish_options): Handle flags related to x_flag_complex_method. * toplev.c (process_options): Remove option handling related to flag_complex_method. 2021-09-27 Richard Biener PR middle-end/102450 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid using type_for_size, instead use int_mode_for_size. 2021-09-27 Andrew Pinski PR c/94726 * gimplify.c (gimplify_save_expr): Return early if the type of val is error_mark_node. 2021-09-27 Aldy Hernandez * tree-ssanames.c (ssa_name_has_boolean_range): Use get_range_query. 2021-09-27 Aldy Hernandez * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove vrp_visit_cond_stmt. * tree-ssa-dom.c (cprop_operand): Convert to range_query API. (cprop_into_stmt): Same. (dom_opt_dom_walker::optimize_stmt): Same. 2021-09-27 Richard Biener PR tree-optimization/97351 PR tree-optimization/97352 PR tree-optimization/82426 * tree-vectorizer.h (dr_misalignment): Add vector type argument. (aligned_access_p): Likewise. (known_alignment_for_access_p): Likewise. (vect_supportable_dr_alignment): Likewise. (vect_known_alignment_in_bytes): Likewise. Refactor. (DR_MISALIGNMENT): Remove. (vect_update_shared_vectype): Likewise. * tree-vect-data-refs.c (dr_misalignment): Refactor, handle a vector type with larger alignment requirement and apply the negative step adjustment here. (vect_calculate_target_alignment): Remove. (vect_compute_data_ref_alignment): Get explicit vector type argument, do not apply a negative step alignment adjustment here. (vect_slp_analyze_node_alignment): Re-analyze alignment when we re-visit the DR with a bigger desired alignment but keep more precise results from smaller alignments. * tree-vect-slp.c (vect_update_shared_vectype): Remove. (vect_slp_analyze_node_operations_1): Do not update the shared vector type on stmts. * tree-vect-stmts.c (vect_analyze_stmt): Push/pop the vector type of an SLP node to the representative stmt-info. (vect_transform_stmt): Likewise. 2021-09-27 liuhongt Revert: 2021-09-09 liuhongt PR target/101059 * config/i386/sse.md (reduc_plus_scal_): Split to .. (reduc_plus_scal_v4sf): .. this, New define_expand. (reduc_plus_scal_v2df): .. and this, New define_expand. 2021-09-26 liuhongt * doc/extend.texi (Half-Precision): Remove storage only description for _Float16 w/o avx512fp16. 2021-09-25 Dimitar Dimitrov * config/pru/constraints.md (Rrio): New constraint. * config/pru/predicates.md (regio_operand): New predicate. * config/pru/pru-pragma.c (pru_register_pragmas): Register the __regio_symbol address space. * config/pru/pru-protos.h (pru_symref2ioregno): Declaration. * config/pru/pru.c (pru_symref2ioregno): New helper function. (pru_legitimate_address_p): Remove. (pru_addr_space_legitimate_address_p): Use the address space aware hook variant. (pru_nongeneric_pointer_addrspace): New helper function. (pru_insert_attributes): New function to validate __regio_symbol usage. (TARGET_INSERT_ATTRIBUTES): New macro. (TARGET_LEGITIMATE_ADDRESS_P): Remove. (TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P): New macro. * config/pru/pru.h (enum reg_class): Add REGIO_REGS class. * config/pru/pru.md (*regio_readsi): New pattern to read I/O registers. (*regio_nozext_writesi): New pattern to write to I/O registers. (*regio_zext_write_r30): Ditto. * doc/extend.texi: Document the new PRU Named Address Space. 2021-09-24 Patrick Palka PR c++/98216 PR c++/91292 * real.c (encode_ieee_double): Avoid unwanted sign extension. (encode_ieee_quad): Likewise. 2021-09-24 Vladimir Makarov PR rtl-optimization/102147 * ira-build.c (ira_conflict_vector_profitable_p): Make profitability calculation independent of host compiler pointer and IRA_INT_BITS sizes. 2021-09-24 Aldy Hernandez * gimple-range-path.cc (path_range_query::path_range_query): Move debugging header... (path_range_query::precompute_ranges): ...here. (path_range_query::internal_range_of_expr): Do not call range_on_path_entry if NAME is defined in the current block. 2021-09-24 Richard Biener * cfghooks.c (verify_flow_info): Verify unallocated BB and edge flags are not set. 2021-09-24 Aldy Hernandez * tree-ssa-threadupdate.c (jt_path_registry::cancel_invalid_paths): New. (jt_path_registry::register_jump_thread): Call cancel_invalid_paths. * tree-ssa-threadupdate.h (class jt_path_registry): Add cancel_invalid_paths. 2021-09-24 Feng Xue PR tree-optimization/102400 * tree-ssa-sccvn.c (vn_reference_insert_pieces): Initialize result_vdef to zero value. 2021-09-24 Feng Xue PR tree-optimization/102451 * tree-ssa-dse.c (delete_dead_or_redundant_call): Record bb of stmt before removal. 2021-09-24 Hongyu Wang * config/i386/sse.md (cond_): Extend to support vector HFmodes. (cond_mul): Likewise. (cond_div): Likewise. (cond_): Likewise. (cond_fma): Likewise. (cond_fms): Likewise. (cond_fnma): Likewise. (cond_fnms): Likewise. 2021-09-23 Andrew MacLeod PR tree-optimization/102463 * gimple-range-fold.cc (fold_using_range::relation_fold_and_or): If there is no range-ops handler, don't look for a relation. 2021-09-23 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Take non-executable_edge flag as parameter. * gimple-range-cache.h (ranger_cache): Adjust prototype. * gimple-range-gori.cc (gori_compute::gori_compute): Take non-executable_edge flag as parameter. (gori_compute::outgoing_edge_range_p): Check new flag. * gimple-range-gori.h (gori_compute): Adjust prototype. * gimple-range.cc (gimple_ranger::gimple_ranger): Create new flag. (gimple_ranger::range_on_edge): Check new flag. * gimple-range.h (gimple_ranger::non_executable_edge_flag): New. * gimple-ssa-evrp.c (rvrp_folder): Pass ranger flag to simplifer. (hybrid_folder::hybrid_folder): Set ranger non-executable flag value. (hybrid_folder::fold_stmt): Set flag value in the simplifer. * vr-values.c (simplify_using_ranges::set_and_propagate_unexecutable): Use not_executable flag if provided inmstead of EDGE_EXECUTABLE. (simplify_using_ranges::simplify_switch_using_ranges): Clear EDGE_EXECUTABLE like it originally did. (simplify_using_ranges::cleanup_edges_and_switches): Clear any NON_EXECUTABLE flags. (simplify_using_ranges::simplify_using_ranges): Adjust. * vr-values.h (class simplify_using_ranges): Adjust. (simplify_using_ranges::set_range_query): Add non-executable flag param. 2021-09-23 Bill Schmidt PR target/102024 * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Detect zero-width bit fields and return indicator. (rs6000_discover_homogeneous_aggregate): Diagnose when the presence of a zero-width bit field changes parameter passing in GCC 12. 2021-09-23 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::range_of_phi): Remove dominator check. 2021-09-23 Aldy Hernandez * gimple-range-path.cc (path_range_query::precompute_relations): Hoist edge calculations before using EDGE_SUCC. 2021-09-23 Jonathan Wakely * configure.ac: Fix --with-multilib-list description. * configure: Regenerate. 2021-09-23 Richard Biener PR tree-optimization/102448 * tree-vect-data-refs.c (vect_duplicate_ssa_name_ptr_info): Clear alignment info copied from DR_PTR_INFO. 2021-09-23 Hongyu Wang * config/i386/i386-expand.c (ix86_use_mask_cmp_p): Enable HFmode mask_cmp. * config/i386/sse.md (sseintvecmodelower): Add HF vector modes. (_store_mask): Extend to support HF vector modes. (vec_cmp): Likewise. (vcond_mask_): Likewise. (vcond): New expander. (vcond): Likewise. (vcond): Likewise. (vcondu): Likewise. 2021-09-23 Hongyu Wang * config/i386/sse.md (extend2): New expander. (extendv4hf2): Likewise. (extendv2hfv2df2): Likewise. (trunc2): Likewise. (avx512fp16_vcvt2ph_): Rename to ... (truncv4hf2): ... this, and drop constraints. (avx512fp16_vcvtpd2ph_v2df): Rename to ... (truncv2dfv2hf2): ... this, and likewise. 2021-09-23 Hongyu Wang * config/i386/sse.md (float2): New expander. (avx512fp16_vcvt2ph_): Rename to ... (floatv4hf2): ... this, and drop constraints. (avx512fp16_vcvtqq2ph_v2di): Rename to ... (floatv2div2hf2): ... this, and likewise. 2021-09-23 Hongyu Wang * config/i386/i386.md (fix_trunchf2): New expander. (fixuns_trunchfhi2): Likewise. (*fixuns_trunchfsi2zext): New define_insn. * config/i386/sse.md (ssePHmodelower): New mode_attr. (fix_trunc2): New expander for same element vector fix_truncate. (fix_trunc2): Likewise for V4HF to V4SI/V4DI fix_truncate. (fix_truncv2hfv2di2): Likeise for V2HF to V2DI fix_truncate. 2021-09-23 Hongyu Wang * config/i386/i386.md (hf3): New expander. 2021-09-23 liuhongt * config/i386/sse.md (FMAMODEM): extend to handle FP16. (VFH_SF_AVX512VL): Extend to handle HFmode. (VF_SF_AVX512VL): Deleted. 2021-09-23 liuhongt * config/i386/i386.md (rinthf2): New expander. (nearbyinthf2): New expander. 2021-09-23 Aldy Hernandez * tree-ssa-dom.c (class dom_jump_threader_simplifier): Rename... (class dom_jt_state): ...this and provide virtual overrides. (dom_jt_state::register_equiv): New. (class dom_jt_simplifier): Rename from dom_jump_threader_simplifier. (dom_jump_threader_simplifier::simplify): Rename... (dom_jt_simplifier::simplify): ...to this. (pass_dominator::execute): Use dom_jt_simplifier and dom_jt_state. * tree-ssa-threadedge.c (jump_threader::jump_threader): Clean-up. (jt_state::register_equivs_stmt): Abstract out... (jump_threader::record_temporary_equivalences_from_stmts_at_dest): ...from here. (jump_threader::thread_around_empty_blocks): Update state. (jump_threader::thread_through_normal_block): Same. (jt_state::jt_state): Remove. (jt_state::push): Remove pass specific bits. Keep block vector updated. (jt_state::append_path): New. (jt_state::pop): Remove pass specific bits. (jt_state::register_equiv): Same. (jt_state::record_ranges_from_stmt): Same. (jt_state::register_equivs_on_edge): Same. Rename... (jt_state::register_equivs_edge): ...to this. (jt_state::dump): New. (jt_state::debug): New. (jump_threader_simplifier::simplify): Remove. (jt_state::get_path): New. * tree-ssa-threadedge.h (class jt_simplifier): Make into a base class. Expose common functionality as virtual methods. (class jump_threader_simplifier): Same. Rename... (class jt_simplifier): ...to this. * tree-vrp.c (class vrp_jump_threader_simplifier): Rename... (class vrp_jt_simplifier): ...to this. Provide pass specific overrides. (class vrp_jt_state): New. (vrp_jump_threader_simplifier::simplify): Rename... (vrp_jt_simplifier::simplify): ...to this. Inline code from what used to be the base class. (vrp_jump_threader::vrp_jump_threader): Use vrp_jt_state and vrp_jt_simplifier. 2021-09-22 Tobias Burnus PR fortran/55534 * doc/invoke.texi (-Wno-missing-include-dirs.): Document Fortran behavior. 2021-09-22 Roger Sayle Richard Biener * match.pd (negation simplifications): Implement some negation folding transformations from fold-const.c's fold_negate_expr. * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Add a SIMPLIFY argument, to control whether the op should be simplified prior to looking up/assigning a value number. (vn_nary_build_or_lookup): Update call to vn_nary_build_or_lookup_1. (vn_nary_simplify): Likewise. (visit_nary_op): Likewise, but when constructing a NEGATE_EXPR now call vn_nary_build_or_lookup_1 disabling simplification. 2021-09-22 Jiufu Guo PR tree-optimization/102087 * tree-ssa-loop-niter.c (number_of_iterations_until_wrap): Update bound/cmp/control for niter. 2021-09-22 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::range_of_range_op): Move check for non-empty BB here. (fur_source::register_outgoing_edges): ...from here. 2021-09-22 Aldy Hernandez * gimple-range-path.cc (path_range_query::internal_range_of_expr): Remove call to improve_range_with_equivs. (path_range_query::improve_range_with_equivs): Remove * gimple-range-path.h: Remove improve_range_with_equivs. 2021-09-22 dianhong xu * config/i386/avx512fp16intrin.h: (_mm512_mask_blend_ph): New intrinsic. (_mm512_permutex2var_ph): Ditto. (_mm512_permutexvar_ph): Ditto. * config/i386/avx512fp16vlintrin.h: (_mm256_mask_blend_ph): New intrinsic. (_mm256_permutex2var_ph): Ditto. (_mm256_permutexvar_ph): Ditto. (_mm_mask_blend_ph): Ditto. (_mm_permutex2var_ph): Ditto. (_mm_permutexvar_ph): Ditto. 2021-09-22 dianhong xu * config/i386/avx512fp16intrin.h: Add new intrinsics. (_mm512_conj_pch): New intrinsic. (_mm512_mask_conj_pch): Ditto. (_mm512_maskz_conj_pch): Ditto. * config/i386/avx512fp16vlintrin.h: Add new intrinsics. (_mm256_conj_pch): New intrinsic. (_mm256_mask_conj_pch): Ditto. (_mm256_maskz_conj_pch): Ditto. (_mm_conj_pch): Ditto. (_mm_mask_conj_pch): Ditto. (_mm_maskz_conj_pch): Ditto. 2021-09-22 dianhong xu * config/i386/avx512fp16intrin.h (_MM512_REDUCE_OP): New macro (_mm512_reduce_add_ph): New intrinsic. (_mm512_reduce_mul_ph): Ditto. (_mm512_reduce_min_ph): Ditto. (_mm512_reduce_max_ph): Ditto. * config/i386/avx512fp16vlintrin.h (_MM256_REDUCE_OP/_MM_REDUCE_OP): New macro. (_mm256_reduce_add_ph): New intrinsic. (_mm256_reduce_mul_ph): Ditto. (_mm256_reduce_min_ph): Ditto. (_mm256_reduce_max_ph): Ditto. (_mm_reduce_add_ph): Ditto. (_mm_reduce_mul_ph): Ditto. (_mm_reduce_min_ph): Ditto. (_mm_reduce_max_ph): Ditto. 2021-09-22 dianhong xu * config/i386/avx512fp16intrin.h (__m512h_u, __m256h_u, __m128h_u): New typedef. (_mm512_load_ph): New intrinsic. (_mm256_load_ph): Ditto. (_mm_load_ph): Ditto. (_mm512_loadu_ph): Ditto. (_mm256_loadu_ph): Ditto. (_mm_loadu_ph): Ditto. (_mm512_store_ph): Ditto. (_mm256_store_ph): Ditto. (_mm_store_ph): Ditto. (_mm512_storeu_ph): Ditto. (_mm256_storeu_ph): Ditto. (_mm_storeu_ph): Ditto. (_mm512_abs_ph): Ditto. * config/i386/avx512fp16vlintrin.h (_mm_abs_ph): Ditto. (_mm256_abs_ph): Ditto. 2021-09-22 Andreas Krebbel * config/s390/tpf.md (prologue_tpf, epilogue_tpf): Add cc clobber. 2021-09-22 Andreas Krebbel PR target/102222 * config/s390/s390.c (s390_expand_insv): Emit a normal move if it is actually a full copy of the source operand into the target. Don't emit a strict low part move if source and target mode match. 2021-09-22 Jakub Jelinek PR middle-end/102415 * omp-expand.c (expand_omp_single): If region->exit is NULL, assert region->entry is GIMPLE_OMP_SCOPE region and return. 2021-09-22 Jakub Jelinek * tree.h (OMP_CLAUSE_ALLOCATE_ALIGN): Define. * tree.c (omp_clause_num_ops): Change number of OMP_CLAUSE_ALLOCATE arguments from 2 to 3. * tree-pretty-print.c (dump_omp_clause): Print allocator() around allocate clause allocator and print align if present. * omp-low.c (scan_sharing_clauses): Force allocate_map entry even for omp_default_mem_alloc if align modifier is present. If align modifier is present, use TREE_LIST to encode both allocator and align. (lower_private_allocate, lower_rec_input_clauses, create_task_copyfn): Handle align modifier on allocator clause if present. 2021-09-22 liuhongt * config/i386/i386.md (define_attr "isa"): Add fma_or_avx512vl. (define_attr "enabled"): Correspond fma_or_avx512vl to TARGET_FMA || TARGET_AVX512VL. * config/i386/mmx.md (fmav2sf4): Extend to AVX512 fma. (fmsv2sf4): Ditto. (fnmav2sf4): Ditto. (fnmsv2sf4): Ditto. 2021-09-22 liuhongt * config/i386/i386.md (cstorehf3): New define_expand. 2021-09-22 liuhongt * config/i386/i386.md (hf2): New expander. (sse4_1_round2): Extend from MODEF to MODEFH. * config/i386/sse.md (*sse4_1_round): Extend from VF_128 to VFH_128. 2021-09-22 liuhongt * config/i386/i386-features.c (i386-features.c): Handle E_HFmode. * config/i386/i386.md (sqrthf2): New expander. (*sqrthf2): New define_insn. * config/i386/sse.md (*_vmsqrt2): Extend to VFH_128. 2021-09-22 liuhongt * config/i386/avx512fp16intrin.h (_mm_mask_fcmadd_sch): New intrinsic. (_mm_mask3_fcmadd_sch): Likewise. (_mm_maskz_fcmadd_sch): Likewise. (_mm_fcmadd_sch): Likewise. (_mm_mask_fmadd_sch): Likewise. (_mm_mask3_fmadd_sch): Likewise. (_mm_maskz_fmadd_sch): Likewise. (_mm_fmadd_sch): Likewise. (_mm_mask_fcmadd_round_sch): Likewise. (_mm_mask3_fcmadd_round_sch): Likewise. (_mm_maskz_fcmadd_round_sch): Likewise. (_mm_fcmadd_round_sch): Likewise. (_mm_mask_fmadd_round_sch): Likewise. (_mm_mask3_fmadd_round_sch): Likewise. (_mm_maskz_fmadd_round_sch): Likewise. (_mm_fmadd_round_sch): Likewise. (_mm_fcmul_sch): Likewise. (_mm_mask_fcmul_sch): Likewise. (_mm_maskz_fcmul_sch): Likewise. (_mm_fmul_sch): Likewise. (_mm_mask_fmul_sch): Likewise. (_mm_maskz_fmul_sch): Likewise. (_mm_fcmul_round_sch): Likewise. (_mm_mask_fcmul_round_sch): Likewise. (_mm_maskz_fcmul_round_sch): Likewise. (_mm_fmul_round_sch): Likewise. (_mm_mask_fmul_round_sch): Likewise. (_mm_maskz_fmul_round_sch): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/sse.md (avx512fp16_fmaddcsh_v8hf_maskz): New expander. (avx512fp16_fcmaddcsh_v8hf_maskz): Ditto. (avx512fp16_fma_sh_v8hf): New define insn. (avx512fp16_sh_v8hf_mask): Ditto. (avx512fp16_sh_v8hf): Ditto. * config/i386/subst.md (mask_scalarcz_name): New. (mask_scalarc_name): Ditto. (mask_scalarc_operand3): Ditto. (mask_scalarcz_operand4): Ditto. (round_scalarcz_name): Ditto. (round_scalarc_mask_operand3): Ditto. (round_scalarcz_mask_operand4): Ditto. (round_scalarc_mask_op3): Ditto. (round_scalarcz_mask_op4): Ditto. (round_scalarcz_constraint): Ditto. (round_scalarcz_nimm_predicate): Ditto. (mask_scalarcz): Ditto. (mask_scalarc): Ditto. (round_scalarcz): Ditto. 2021-09-22 liuhongt * config/i386/avx512fp16intrin.h (_mm512_fcmadd_pch): New intrinsic. (_mm512_mask_fcmadd_pch): Likewise. (_mm512_mask3_fcmadd_pch): Likewise. (_mm512_maskz_fcmadd_pch): Likewise. (_mm512_fmadd_pch): Likewise. (_mm512_mask_fmadd_pch): Likewise. (_mm512_mask3_fmadd_pch): Likewise. (_mm512_maskz_fmadd_pch): Likewise. (_mm512_fcmadd_round_pch): Likewise. (_mm512_mask_fcmadd_round_pch): Likewise. (_mm512_mask3_fcmadd_round_pch): Likewise. (_mm512_maskz_fcmadd_round_pch): Likewise. (_mm512_fmadd_round_pch): Likewise. (_mm512_mask_fmadd_round_pch): Likewise. (_mm512_mask3_fmadd_round_pch): Likewise. (_mm512_maskz_fmadd_round_pch): Likewise. (_mm512_fcmul_pch): Likewise. (_mm512_mask_fcmul_pch): Likewise. (_mm512_maskz_fcmul_pch): Likewise. (_mm512_fmul_pch): Likewise. (_mm512_mask_fmul_pch): Likewise. (_mm512_maskz_fmul_pch): Likewise. (_mm512_fcmul_round_pch): Likewise. (_mm512_mask_fcmul_round_pch): Likewise. (_mm512_maskz_fcmul_round_pch): Likewise. (_mm512_fmul_round_pch): Likewise. (_mm512_mask_fmul_round_pch): Likewise. (_mm512_maskz_fmul_round_pch): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_fmadd_pch): New intrinsic. (_mm_mask_fmadd_pch): Likewise. (_mm_mask3_fmadd_pch): Likewise. (_mm_maskz_fmadd_pch): Likewise. (_mm256_fmadd_pch): Likewise. (_mm256_mask_fmadd_pch): Likewise. (_mm256_mask3_fmadd_pch): Likewise. (_mm256_maskz_fmadd_pch): Likewise. (_mm_fcmadd_pch): Likewise. (_mm_mask_fcmadd_pch): Likewise. (_mm_mask3_fcmadd_pch): Likewise. (_mm_maskz_fcmadd_pch): Likewise. (_mm256_fcmadd_pch): Likewise. (_mm256_mask_fcmadd_pch): Likewise. (_mm256_mask3_fcmadd_pch): Likewise. (_mm256_maskz_fcmadd_pch): Likewise. (_mm_fmul_pch): Likewise. (_mm_mask_fmul_pch): Likewise. (_mm_maskz_fmul_pch): Likewise. (_mm256_fmul_pch): Likewise. (_mm256_mask_fmul_pch): Likewise. (_mm256_maskz_fmul_pch): Likewise. (_mm_fcmul_pch): Likewise. (_mm_mask_fcmul_pch): Likewise. (_mm_maskz_fcmul_pch): Likewise. (_mm256_fcmul_pch): Likewise. (_mm256_mask_fcmul_pch): Likewise. (_mm256_maskz_fcmul_pch): Likewise. * config/i386/i386-builtin-types.def (V8HF_FTYPE_V8HF_V8HF_V8HF, V8HF_FTYPE_V16HF_V16HF_V16HF, V16HF_FTYPE_V16HF_V16HF_V16HF_UQI, V32HF_FTYPE_V32HF_V32HF_V32HF_INT, V32HF_FTYPE_V32HF_V32HF_V32HF_UHI_INT): Add new builtin types. * config/i386/i386-builtin.def: Add new builtins. * config/i386/i386-expand.c: Handle new builtin types. * config/i386/subst.md (SUBST_CV): New. (maskc_name): Ditto. (maskc_operand3): Ditto. (maskc): Ditto. (sdc_maskz_name): Ditto. (sdc_mask_op4): Ditto. (sdc_mask_op5): Ditto. (sdc_mask_mode512bit_condition): Ditto. (sdc): Ditto. (round_maskc_operand3): Ditto. (round_sdc_mask_operand4): Ditto. (round_maskc_op3): Ditto. (round_sdc_mask_op4): Ditto. (round_saeonly_sdc_mask_operand5): Ditto. * config/i386/sse.md (unspec): Add complex fma unspecs. (avx512fmaskcmode): New. (UNSPEC_COMPLEX_F_C_MA): Ditto. (UNSPEC_COMPLEX_F_C_MUL): Ditto. (complexopname): Ditto. (_fmaddc__maskz): New expander. (_fcmaddc__maskz): Ditto. (fma__): New define insn. (___mask): Ditto. (__): Ditto. 2021-09-22 Kewen Lin * config/rs6000/rs6000.opt (rs6000-density-pct-threshold, rs6000-density-size-threshold, rs6000-density-penalty, rs6000-density-load-pct-threshold, rs6000-density-load-num-threshold): New parameter. * config/rs6000/rs6000.c (rs6000_density_test): Adjust with corresponding parameters. 2021-09-21 Aldy Hernandez * gimple-range-path.cc (path_range_query::defined_outside_path): New. (path_range_query::range_on_path_entry): New. (path_range_query::internal_range_of_expr): Resolve unknowns with ranger. (path_range_query::improve_range_with_equivs): New. (path_range_query::ssa_range_in_phi): Resolve unknowns with ranger. * gimple-range-path.h (class path_range_query): Add defined_outside_path, range_on_path_entry, and improve_range_with_equivs. 2021-09-21 Aldy Hernandez * gimple-range-path.cc (path_range_query::add_to_imports): New. (path_range_query::add_copies_to_imports): New. (path_range_query::precompute_ranges): Call add_copies_to_imports. * gimple-range-path.h (class path_range_query): Add prototypes for add_copies_to_imports and add_to_imports. 2021-09-21 Aldy Hernandez * gimple-range-path.cc (path_range_query::range_defined_in_block): Remove useless code. 2021-09-21 Aldy Hernandez * gimple-range-fold.h (class fur_source): Make oracle protected. * gimple-range-path.cc (path_range_query::path_range_query): Add resolve argument. Initialize oracle. (path_range_query::~path_range_query): Delete oracle. (path_range_query::range_of_stmt): Adapt to use relations. (path_range_query::precompute_ranges): Pre-compute relations. (class jt_fur_source): New (jt_fur_source::jt_fur_source): New. (jt_fur_source::register_relation): New. (jt_fur_source::query_relation): New. (path_range_query::precompute_relations): New. (path_range_query::precompute_phi_relations): New. * gimple-range-path.h (path_range_query): Add resolve argument. Add oracle, precompute_relations, precompute_phi_relations. * tree-ssa-threadbackward.c (back_threader::back_threader): Pass resolve argument to solver. 2021-09-21 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::range_of_range_op): Rename postfold_gcond_edges to register_outgoing_edges and adapt. (fold_using_range::postfold_gcond_edges): Rename... (fur_source::register_outgoing_edges): ...to this. * gimple-range-fold.h (postfold_gcond_edges): Rename to register_outgoing_edges and move to fur_source. 2021-09-21 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::range_of_phi): Check dom_info_available_p. 2021-09-21 Aldy Hernandez * gimple-range-cache.cc (non_null_ref::non_null_ref): Use create and quick_grow_cleared instead of safe_grow_cleared. 2021-09-21 Thomas Schwinge PR other/102408 * omp-oacc-neuter-broadcast.cc (oacc_do_neutering): Evaluate 'random ()' to '0'. 2021-09-21 Richard Earnshaw * configure.ac: Detect when the assembler supports new-style architecture extensions. * common/config/arm/arm-common.c (arm_rewrite_mcpu): Return the full CPU string if the assembler can grok it. (arm_rewrite_march): Likewise but for the architecture. * config.in: Regenerate. * configure: Regenerate. 2021-09-21 Richard Biener PR tree-optimization/102421 * tree-vect-loop.c (vect_dissolve_slp_only_groups): Copy and adjust alignment info. 2021-09-21 Kewen Lin * ipa-fnsummary.c (ipa_fn_summary_write): Remove inconsistent bitfield stream out. 2021-09-20 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_phi): Ignore undefined edges, apply an equivalence if appropriate. * gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Return UNDEFINED if EDGE_EXECUTABLE is not set. * gimple-range.cc (gimple_ranger::gimple_ranger): Set all edges as EXECUTABLE upon startup. (gimple_ranger::range_on_edge): Return UNDEFINED for edges without EDGE_EXECUTABLE set. * vr-values.c (set_and_propagate_unexecutable): New. (simplify_using_ranges::fold_cond): Call set_and_propagate. (simplify_using_ranges::simplify_switch_using_ranges): Ditto. * vr-values.h: Add prototype. 2021-09-20 Andrew MacLeod * value-relation.cc (equiv_oracle::register_initial_def): New. (equiv_oracle::register_relation): Call register_initial_def. (equiv_oracle::add_equiv_to_block): New. Split register_relation. (relation_oracle::register_stmt): Check def block of PHI arguments. * value-relation.h (equiv_oracle): Add new prototypes. 2021-09-20 Matthias Kretz * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Define __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__, __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and __ROUNDING_MATH__ according to their corresponding flags. * doc/cpp.texi: Document __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__, __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and __ROUNDING_MATH__. 2021-09-20 Richard Biener * tree-vect-stmts.c (vectorizable_load): Use the vectype from the SLP node. 2021-09-20 Richard Biener * tree-vect-data-refs.c (vect_duplicate_ssa_name_ptr_info): Do not compute alignment of the vectorized access here. 2021-09-20 Richard Biener * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Store -1 for runtime alias peeling iterations. 2021-09-20 Richard Biener * config.gcc: Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*. 2021-09-20 Thomas Schwinge * input.c (string_concat_db::record_string_concatenation) (string_concat_db::get_string_concatenation): Skip for 'RESERVED_LOCATION_P'. 2021-09-20 Richard Biener PR tree-optimization/65206 * tree-data-ref.h (struct data_reference): Add alt_indices, order it last. * tree-data-ref.c (free_data_ref): Release alt_indices. (dr_analyze_indices): Work on struct indices and get DR_REF as tree. (create_data_ref): Adjust. (initialize_data_dependence_relation): Split into head and tail. When the base objects fail to match up try again with pointer-based analysis of indices. * tree-vectorizer.c (vec_info_shared::check_datarefs): Do not compare the lazily computed alternate set of indices. 2021-09-20 Iain Sandoe * gcc.c: Test for execute OK when we find the programs for assembler linker and dsymutil and those were specified at configure-time. 2021-09-19 Martin Sebor PR middle-end/102403 * gimple-predicate-analysis.cc (predicate::init_from_control_deps): Correct a function pre/postcondition. 2021-09-19 Martin Sebor PR middle-end/102243 * tree-ssa-strlen.c (get_range): Handle null cfun. 2021-09-19 Iain Sandoe * config/darwin.h (LINK_COMMAND_SPEC_A): Use Darwin10 unwinder shim as a convenience library. 2021-09-19 Andrew Pinski * doc/install.texi: Add note about binutils 2.35 is required for LTO usage. 2021-09-19 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader_registry::register_path): Use push_edge. * tree-ssa-threadedge.c (jump_threader::thread_around_empty_blocks): Same. (jump_threader::thread_through_normal_block): Same. (jump_threader::thread_across_edge): Same. Also, use auto_bitmap. Tidy up code. * tree-ssa-threadupdate.c (jt_path_registry::allocate_thread_edge): Remove. (jt_path_registry::push_edge): New. (dump_jump_thread_path): Make static. * tree-ssa-threadupdate.h (allocate_thread_edge): Remove. (push_edge): New. 2021-09-19 Aldy Hernandez * gimple-range-path.cc (path_range_query::path_range_query): Add header. (path_range_query::dump): Remove extern declaration of dump_ranger. * gimple-range-trace.cc (dump_ranger): Add DEBUG_FUNCTION marker. * gimple-range-trace.h (dump_ranger): Add prototype. 2021-09-19 John Ericson * gcc.c (find_a_program): New function, factored out of... (find_a_file): Here. (execute): Use find_a_program when looking for programs rather than find_a_file. 2021-09-19 Matwey V. Kornilov * config/avr/avr-mcus.def: Add atmega324pb. * doc/avr-mmcu.texi: Corresponding changes. 2021-09-19 Roger Sayle PR middle-end/88173 * match.pd (cmp @0 REAL_CST@1): When @0 is also REAL_CST, apply the same transformations as to @1. For comparisons against NaN, don't check HONOR_SNANS but confirm that neither operand is a signaling NaN. 2021-09-19 Benjamin Peterson * attribs.c (make_unique_name): Delete. * attribs.h (make_unique_name): Delete. 2021-09-19 Andrew Pinski * lra-constraints.c (check_and_process_move): Assert that dclass and sclass are greater than or equal to NO_REGS. 2021-09-18 Jakub Jelinek * tree.h (OMP_CLAUSE_ORDER_UNCONSTRAINED): Define. * tree-pretty-print.c (dump_omp_clause): Print unconstrained: for OMP_CLAUSE_ORDER_UNCONSTRAINED. 2021-09-18 liuhongt * config/i386/i386-features.c (remove_partial_avx_dependency): Restrict TARGET_USE_VECTOR_FP_CONVERTS and TARGET_USE_VECTOR_CONVERTS to conversion instructions only. 2021-09-18 Jakub Jelinek * gimplify.c (omp_default_clause): For C/C++ default({,first}private), if file/namespace scope variable doesn't have predetermined sharing, treat it as if there was default(none). 2021-09-18 liuhongt * config/i386/avx512fp16intrin.h (_mm_fmadd_sh): New intrinsic. (_mm_mask_fmadd_sh): Likewise. (_mm_mask3_fmadd_sh): Likewise. (_mm_maskz_fmadd_sh): Likewise. (_mm_fmadd_round_sh): Likewise. (_mm_mask_fmadd_round_sh): Likewise. (_mm_mask3_fmadd_round_sh): Likewise. (_mm_maskz_fmadd_round_sh): Likewise. (_mm_fnmadd_sh): Likewise. (_mm_mask_fnmadd_sh): Likewise. (_mm_mask3_fnmadd_sh): Likewise. (_mm_maskz_fnmadd_sh): Likewise. (_mm_fnmadd_round_sh): Likewise. (_mm_mask_fnmadd_round_sh): Likewise. (_mm_mask3_fnmadd_round_sh): Likewise. (_mm_maskz_fnmadd_round_sh): Likewise. (_mm_fmsub_sh): Likewise. (_mm_mask_fmsub_sh): Likewise. (_mm_mask3_fmsub_sh): Likewise. (_mm_maskz_fmsub_sh): Likewise. (_mm_fmsub_round_sh): Likewise. (_mm_mask_fmsub_round_sh): Likewise. (_mm_mask3_fmsub_round_sh): Likewise. (_mm_maskz_fmsub_round_sh): Likewise. (_mm_fnmsub_sh): Likewise. (_mm_mask_fnmsub_sh): Likewise. (_mm_mask3_fnmsub_sh): Likewise. (_mm_maskz_fnmsub_sh): Likewise. (_mm_fnmsub_round_sh): Likewise. (_mm_mask_fnmsub_round_sh): Likewise. (_mm_mask3_fnmsub_round_sh): Likewise. (_mm_maskz_fnmsub_round_sh): Likewise. * config/i386/i386-builtin-types.def (V8HF_FTYPE_V8HF_V8HF_V8HF_UQI_INT): New builtin type. * config/i386/i386-builtin.def: Add new builtins. * config/i386/i386-expand.c: Handle new builtin type. * config/i386/sse.md (fmai_vmfmadd_): Ajdust to support FP16. (fmai_vmfmsub_): Ditto. (fmai_vmfnmadd_): Ditto. (fmai_vmfnmsub_): Ditto. (*fmai_fmadd_): Ditto. (*fmai_fmsub_): Ditto. (*fmai_fnmadd_): Ditto. (*fmai_fnmsub_): Ditto. (avx512f_vmfmadd__mask): Ditto. (avx512f_vmfmadd__mask3): Ditto. (avx512f_vmfmadd__maskz): Ditto. (avx512f_vmfmadd__maskz_1): Ditto. (*avx512f_vmfmsub__mask): Ditto. (avx512f_vmfmsub__mask3): Ditto. (*avx512f_vmfmsub__maskz_1): Ditto. (*avx512f_vmfnmsub__mask): Ditto. (*avx512f_vmfnmsub__mask3): Ditto. (*avx512f_vmfnmsub__mask): Ditto. (*avx512f_vmfnmadd__mask): Renamed to ... (avx512f_vmfnmadd__mask) ... this, and adjust to support FP16. (avx512f_vmfnmadd__mask3): Ditto. (avx512f_vmfnmadd__maskz_1): Ditto. (avx512f_vmfnmadd__maskz): New expander. 2021-09-18 H.J. Lu * config/i386/sse.md (avx512fmaskmodelower): Extend to support HF modes. (maskload): Ditto. (maskstore): Ditto. 2021-09-18 H.J. Lu * config/i386/i386-expand.c (ix86_expand_fp_absneg_operator): Handle HFmode. (ix86_expand_copysign): Ditto. (ix86_expand_xorsign): Ditto. * config/i386/i386.c (ix86_build_const_vector): Handle HF vector modes. (ix86_build_signbit_mask): Ditto. (ix86_can_change_mode_class): Ditto. * config/i386/i386.md (SSEMODEF): Add HFmode. (ssevecmodef): Ditto. (hf2): New define_expand. (*hf2_1): New define_insn_and_split. (copysign): Extend to support HFmode under AVX512FP16. (xorsign): Ditto. * config/i386/sse.md (VFB): New mode iterator. (VFB_128_256): Ditto. (VFB_512): Ditto. (sseintvecmode2): Support HF vector mode. (2): Use new mode iterator. (*2): Ditto. (copysign3): Ditto. (xorsign3): Ditto. (3): Ditto. (3): Ditto. (_andnot3): Adjust for HF vector mode. (_andnot3): Ditto. (*3): Ditto. (*3): Ditto. 2021-09-18 liuhongt * config/i386/avx512fp16intrin.h (_mm512_mask_fmadd_ph): New intrinsic. (_mm512_mask3_fmadd_ph): Likewise. (_mm512_maskz_fmadd_ph): Likewise. (_mm512_fmadd_round_ph): Likewise. (_mm512_mask_fmadd_round_ph): Likewise. (_mm512_mask3_fmadd_round_ph): Likewise. (_mm512_maskz_fmadd_round_ph): Likewise. (_mm512_fnmadd_ph): Likewise. (_mm512_mask_fnmadd_ph): Likewise. (_mm512_mask3_fnmadd_ph): Likewise. (_mm512_maskz_fnmadd_ph): Likewise. (_mm512_fnmadd_round_ph): Likewise. (_mm512_mask_fnmadd_round_ph): Likewise. (_mm512_mask3_fnmadd_round_ph): Likewise. (_mm512_maskz_fnmadd_round_ph): Likewise. (_mm512_fmsub_ph): Likewise. (_mm512_mask_fmsub_ph): Likewise. (_mm512_mask3_fmsub_ph): Likewise. (_mm512_maskz_fmsub_ph): Likewise. (_mm512_fmsub_round_ph): Likewise. (_mm512_mask_fmsub_round_ph): Likewise. (_mm512_mask3_fmsub_round_ph): Likewise. (_mm512_maskz_fmsub_round_ph): Likewise. (_mm512_fnmsub_ph): Likewise. (_mm512_mask_fnmsub_ph): Likewise. (_mm512_mask3_fnmsub_ph): Likewise. (_mm512_maskz_fnmsub_ph): Likewise. (_mm512_fnmsub_round_ph): Likewise. (_mm512_mask_fnmsub_round_ph): Likewise. (_mm512_mask3_fnmsub_round_ph): Likewise. (_mm512_maskz_fnmsub_round_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm256_fmadd_ph): New intrinsic. (_mm256_mask_fmadd_ph): Likewise. (_mm256_mask3_fmadd_ph): Likewise. (_mm256_maskz_fmadd_ph): Likewise. (_mm_fmadd_ph): Likewise. (_mm_mask_fmadd_ph): Likewise. (_mm_mask3_fmadd_ph): Likewise. (_mm_maskz_fmadd_ph): Likewise. (_mm256_fnmadd_ph): Likewise. (_mm256_mask_fnmadd_ph): Likewise. (_mm256_mask3_fnmadd_ph): Likewise. (_mm256_maskz_fnmadd_ph): Likewise. (_mm_fnmadd_ph): Likewise. (_mm_mask_fnmadd_ph): Likewise. (_mm_mask3_fnmadd_ph): Likewise. (_mm_maskz_fnmadd_ph): Likewise. (_mm256_fmsub_ph): Likewise. (_mm256_mask_fmsub_ph): Likewise. (_mm256_mask3_fmsub_ph): Likewise. (_mm256_maskz_fmsub_ph): Likewise. (_mm_fmsub_ph): Likewise. (_mm_mask_fmsub_ph): Likewise. (_mm_mask3_fmsub_ph): Likewise. (_mm_maskz_fmsub_ph): Likewise. (_mm256_fnmsub_ph): Likewise. (_mm256_mask_fnmsub_ph): Likewise. (_mm256_mask3_fnmsub_ph): Likewise. (_mm256_maskz_fnmsub_ph): Likewise. (_mm_fnmsub_ph): Likewise. (_mm_mask_fnmsub_ph): Likewise. (_mm_mask3_fnmsub_ph): Likewise. (_mm_maskz_fnmsub_ph): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/sse.md (_fmadd__maskz): Adjust to support HF vector modes. (fma_fmadd_): Ditto. (*fma_fmadd__bcst_1): Ditto. (*fma_fmadd__bcst_2): Ditto. (*fma_fmadd__bcst_3): Ditto. (_fmadd__mask): Ditto. (_fmadd__mask3): Ditto. (_fmsub__maskz): Ditto. (fma_fmsub_): Ditto. (*fma_fmsub__bcst_1): Ditto. (*fma_fmsub__bcst_2): Ditto. (*fma_fmsub__bcst_3): Ditto. (_fmsub__mask): Ditto. (_fmsub__mask3): Ditto. (fma_fnmadd_): Ditto. (*fma_fnmadd__bcst_1): Ditto. (*fma_fnmadd__bcst_2): Ditto. (*fma_fnmadd__bcst_3): Ditto. (_fnmadd__mask): Ditto. (_fnmadd__mask3): Ditto. (_fnmsub__maskz): Ditto. (fma_fnmsub_): Ditto. (*fma_fnmsub__bcst_1): Ditto. (*fma_fnmsub__bcst_2): Ditto. (*fma_fnmsub__bcst_3): Ditto. (_fnmsub__mask): Ditto. (_fnmsub__mask3): Ditto. 2021-09-18 liuhongt * config/i386/avx512fp16intrin.h (_mm512_fmaddsub_ph): New intrinsic. (_mm512_mask_fmaddsub_ph): Likewise. (_mm512_mask3_fmaddsub_ph): Likewise. (_mm512_maskz_fmaddsub_ph): Likewise. (_mm512_fmaddsub_round_ph): Likewise. (_mm512_mask_fmaddsub_round_ph): Likewise. (_mm512_mask3_fmaddsub_round_ph): Likewise. (_mm512_maskz_fmaddsub_round_ph): Likewise. (_mm512_mask_fmsubadd_ph): Likewise. (_mm512_mask3_fmsubadd_ph): Likewise. (_mm512_maskz_fmsubadd_ph): Likewise. (_mm512_fmsubadd_round_ph): Likewise. (_mm512_mask_fmsubadd_round_ph): Likewise. (_mm512_mask3_fmsubadd_round_ph): Likewise. (_mm512_maskz_fmsubadd_round_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm256_fmaddsub_ph): New intrinsic. (_mm256_mask_fmaddsub_ph): Likewise. (_mm256_mask3_fmaddsub_ph): Likewise. (_mm256_maskz_fmaddsub_ph): Likewise. (_mm_fmaddsub_ph): Likewise. (_mm_mask_fmaddsub_ph): Likewise. (_mm_mask3_fmaddsub_ph): Likewise. (_mm_maskz_fmaddsub_ph): Likewise. (_mm256_fmsubadd_ph): Likewise. (_mm256_mask_fmsubadd_ph): Likewise. (_mm256_mask3_fmsubadd_ph): Likewise. (_mm256_maskz_fmsubadd_ph): Likewise. (_mm_fmsubadd_ph): Likewise. (_mm_mask_fmsubadd_ph): Likewise. (_mm_mask3_fmsubadd_ph): Likewise. (_mm_maskz_fmsubadd_ph): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/sse.md (VFH_SF_AVX512VL): New mode iterator. * (_fmsubadd__maskz): New expander. * (_fmaddsub__maskz): Use VFH_SF_AVX512VL. * (fma_fmaddsub_): Ditto. * (_fmaddsub__mask): Ditto. * (_fmaddsub__mask3): Ditto. * (fma_fmsubadd_): Ditto. * (_fmsubadd__mask): Ditto. * (_fmsubadd__mask3): Ditto. 2021-09-18 liuhongt PR target/87767 * config/i386/i386.c (ix86_print_operand): Handle V8HF/V16HF/V32HFmode. * config/i386/i386.h (VALID_BCST_MODE_P): Add HFmode. * config/i386/sse.md (avx512bcst): Remove. 2021-09-17 Martin Sebor * Makefile.in (OBJS): Add gimple-predicate-analysis.o. * tree-ssa-uninit.c (max_phi_args): Move to gimple-predicate-analysis. (MASK_SET_BIT, MASK_TEST_BIT, MASK_EMPTY): Same. (check_defs): Add comment. (can_skip_redundant_opnd): Update comment. (compute_uninit_opnds_pos): Adjust to namespace change. (find_pdom): Move to gimple-predicate-analysis.cc. (find_dom): Same. (struct uninit_undef_val_t): New. (is_non_loop_exit_postdominating): Move to gimple-predicate-analysis.cc. (find_control_equiv_block): Same. (MAX_NUM_CHAINS, MAX_CHAIN_LEN, MAX_POSTDOM_CHECK): Same. (MAX_SWITCH_CASES): Same. (compute_control_dep_chain): Same. (find_uninit_use): Use predicate analyzer. (struct pred_info): Move to gimple-predicate-analysis. (convert_control_dep_chain_into_preds): Same. (find_predicates): Same. (collect_phi_def_edges): Same. (warn_uninitialized_phi): Use predicate analyzer. (find_def_preds): Move to gimple-predicate-analysis. (dump_pred_info): Same. (dump_pred_chain): Same. (dump_predicates): Same. (destroy_predicate_vecs): Remove. (execute_late_warn_uninitialized): New. (get_cmp_code): Move to gimple-predicate-analysis. (is_value_included_in): Same. (value_sat_pred_p): Same. (find_matching_predicate_in_rest_chains): Same. (is_use_properly_guarded): Same. (prune_uninit_phi_opnds): Same. (find_var_cmp_const): Same. (use_pred_not_overlap_with_undef_path_pred): Same. (pred_equal_p): Same. (is_neq_relop_p): Same. (is_neq_zero_form_p): Same. (pred_expr_equal_p): Same. (is_pred_expr_subset_of): Same. (is_pred_chain_subset_of): Same. (is_included_in): Same. (is_superset_of): Same. (pred_neg_p): Same. (simplify_pred): Same. (simplify_preds_2): Same. (simplify_preds_3): Same. (simplify_preds_4): Same. (simplify_preds): Same. (push_pred): Same. (push_to_worklist): Same. (get_pred_info_from_cmp): Same. (is_degenerated_phi): Same. (normalize_one_pred_1): Same. (normalize_one_pred): Same. (normalize_one_pred_chain): Same. (normalize_preds): Same. (can_one_predicate_be_invalidated_p): Same. (can_chain_union_be_invalidated_p): Same. (uninit_uses_cannot_happen): Same. (pass_late_warn_uninitialized::execute): Define. * gimple-predicate-analysis.cc: New file. * gimple-predicate-analysis.h: New file. 2021-09-17 Julian Brown * config/gcn/gcn.c (gimple.h): Include. (gcn_fork_join): Emit barrier for worker-level joins. * omp-oacc-neuter-broadcast.cc (find_local_vars_to_propagate): Add writes_gang_private bitmap parameter. Set bit for blocks containing gang-private variable writes. (worker_single_simple): Don't emit barrier after predicated block. (worker_single_copy): Don't emit barrier if we're not broadcasting anything and the block contains no gang-private writes. (neuter_worker_single): Don't predicate blocks that only contain NOPs or internal marker functions. Pass has_gang_private_write argument to worker_single_copy. (oacc_do_neutering): Add writes_gang_private bitmap handling. 2021-09-17 Julian Brown * config/gcn/gcn-protos.h (gcn_goacc_create_worker_broadcast_record): Update prototype. * config/gcn/gcn-tree.c (gcn_goacc_get_worker_red_decl): Use preallocated block of LDS memory. Do not cache/share decls for reduction temporaries between invocations. (gcn_goacc_reduction_teardown): Unshare VAR on second use. (gcn_goacc_create_worker_broadcast_record): Add OFFSET parameter and return temporary LDS space at that offset. Return pointer in "sender" case. * config/gcn/gcn.c (acc_lds_size, gang_private_hwm, lds_allocs): New global vars. (ACC_LDS_SIZE): Define as acc_lds_size. (gcn_init_machine_status): Don't initialise lds_allocated, lds_allocs, reduc_decls fields of machine function struct. (gcn_option_override): Handle default size for gang-private variables and -mgang-private-size option. (gcn_expand_prologue): Use LDS_SIZE instead of LDS_SIZE-1 when initialising M0_REG. (gcn_shared_mem_layout): New function. (gcn_print_lds_decl): Update comment. Use global lds_allocs map and gang_private_hwm variable. (TARGET_GOACC_SHARED_MEM_LAYOUT): Define target hook. * config/gcn/gcn.h (machine_function): Remove lds_allocated, lds_allocs, reduc_decls. Add reduction_base, reduction_limit. * config/gcn/gcn.opt (gang_private_size_opt): New global. (mgang-private-size=): New option. * doc/tm.texi.in (TARGET_GOACC_SHARED_MEM_LAYOUT): Place documentation hook. * doc/tm.texi: Regenerate. * omp-oacc-neuter-broadcast.cc (targhooks.h, diagnostic-core.h): Add includes. (build_sender_ref): Handle sender_decl being pointer. (worker_single_copy): Add PLACEMENT and ISOLATE_BROADCASTS parameters. Pass placement argument to create_worker_broadcast_record hook invocations. Handle sender_decl being pointer and isolate_broadcasts inserting extra barriers. (blk_offset_map_t): Add typedef. (neuter_worker_single): Add BLK_OFFSET_MAP parameter. Pass preallocated range to worker_single_copy call. (dfs_broadcast_reachable_1): New function. (idx_decl_pair_t, used_range_vec_t): New typedefs. (sort_size_descending): New function. (addr_range): New class. (splay_tree_compare_addr_range, splay_tree_free_key) (first_fit_range, merge_ranges_1, merge_ranges): New functions. (execute_omp_oacc_neuter_broadcast): Rename to... (oacc_do_neutering): ... this. Add BOUNDS_LO, BOUNDS_HI parameters. Arrange layout of shared memory for broadcast operations. (execute_omp_oacc_neuter_broadcast): New function. (pass_omp_oacc_neuter_broadcast::gate): Remove num_workers==1 handling from here. Enable pass for all OpenACC routines in order to call shared memory-layout hook. * target.def (create_worker_broadcast_record): Add OFFSET parameter. (shared_mem_layout): New hook. 2021-09-17 Julian Brown Thomas Schwinge * omp-oacc-neuter-broadcast.cc (pass_omp_oacc_neuter_broadcast::gate): Disable if num_workers is 1. (execute_omp_oacc_neuter_broadcast): Adjust. 2021-09-17 Andrew MacLeod * value-relation.cc (class equiv_chain): Move to header file. (path_oracle::path_oracle): New. (path_oracle::~path_oracle): New. (path_oracle::register_relation): New. (path_oracle::query_relation): New. (path_oracle::reset_path): New. (path_oracle::dump): New. * value-relation.h (class equiv_chain): Move to here. (class path_oracle): New. 2021-09-17 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Create a DOM based oracle. * gimple-range-fold.cc (fur_depend::register_relation): Use register_stmt/edge routines. * value-relation.cc (equiv_chain::find): Relocate from equiv_oracle. (equiv_oracle::equiv_oracle): Create self equivalence cache. (equiv_oracle::~equiv_oracle): Release same. (equiv_oracle::equiv_set): Return entry from self equiv cache if there are no equivalences. (equiv_oracle::find_equiv_block): Move list find to equiv_chain. (equiv_oracle::register_relation): Rename from register_equiv. (relation_chain_head::find_relation): Relocate from dom_oracle. (relation_oracle::register_stmt): New. (relation_oracle::register_edge): New. (dom_oracle::*): Rename from relation_oracle. (dom_oracle::register_relation): Adjust to call equiv_oracle. (dom_oracle::set_one_relation): Split from register_relation. (dom_oracle::register_transitives): Consolidate 2 methods. (dom_oracle::find_relation_block): Move core to relation_chain. (dom_oracle::query_relation): Rename from find_relation_dom and adjust. * value-relation.h (class relation_oracle): New pure virtual base. (class equiv_oracle): Inherit from relation_oracle and adjust. (class dom_oracle): Rename from old relation_oracle and adjust. 2021-09-17 Martin Sebor PR middle-end/102200 * pointer-query.cc (access_ref::inform_access): Handle MIN/MAX_EXPR. (handle_min_max_size): Change argument. Store original SSA_NAME for operands to potentially distinct (sub)objects. (compute_objsize_r): Adjust call to the above. 2021-09-17 Bill Schmidt * config/rs6000/rs6000.c (rs6000-builtins.h): New include. (rs6000_new_builtin_vectorized_function): New function. (rs6000_new_builtin_md_vectorized_function): Likewise. (rs6000_builtin_vectorized_function): Call rs6000_new_builtin_vectorized_function. (rs6000_builtin_md_vectorized_function): Call rs6000_new_builtin_md_vectorized_function. 2021-09-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def (ASSEMBLE_ACC): Add mmaint flag. (ASSEMBLE_PAIR): Likewise. (BUILD_ACC): Likewise. (DISASSEMBLE_ACC): Likewise. (DISASSEMBLE_PAIR): Likewise. (PMXVBF16GER2): Likewise. (PMXVBF16GER2NN): Likewise. (PMXVBF16GER2NP): Likewise. (PMXVBF16GER2PN): Likewise. (PMXVBF16GER2PP): Likewise. (PMXVF16GER2): Likewise. (PMXVF16GER2NN): Likewise. (PMXVF16GER2NP): Likewise. (PMXVF16GER2PN): Likewise. (PMXVF16GER2PP): Likewise. (PMXVF32GER): Likewise. (PMXVF32GERNN): Likewise. (PMXVF32GERNP): Likewise. (PMXVF32GERPN): Likewise. (PMXVF32GERPP): Likewise. (PMXVF64GER): Likewise. (PMXVF64GERNN): Likewise. (PMXVF64GERNP): Likewise. (PMXVF64GERPN): Likewise. (PMXVF64GERPP): Likewise. (PMXVI16GER2): Likewise. (PMXVI16GER2PP): Likewise. (PMXVI16GER2S): Likewise. (PMXVI16GER2SPP): Likewise. (PMXVI4GER8): Likewise. (PMXVI4GER8PP): Likewise. (PMXVI8GER4): Likewise. (PMXVI8GER4PP): Likewise. (PMXVI8GER4SPP): Likewise. (XVBF16GER2): Likewise. (XVBF16GER2NN): Likewise. (XVBF16GER2NP): Likewise. (XVBF16GER2PN): Likewise. (XVBF16GER2PP): Likewise. (XVF16GER2): Likewise. (XVF16GER2NN): Likewise. (XVF16GER2NP): Likewise. (XVF16GER2PN): Likewise. (XVF16GER2PP): Likewise. (XVF32GER): Likewise. (XVF32GERNN): Likewise. (XVF32GERNP): Likewise. (XVF32GERPN): Likewise. (XVF32GERPP): Likewise. (XVF64GER): Likewise. (XVF64GERNN): Likewise. (XVF64GERNP): Likewise. (XVF64GERPN): Likewise. (XVF64GERPP): Likewise. (XVI16GER2): Likewise. (XVI16GER2PP): Likewise. (XVI16GER2S): Likewise. (XVI16GER2SPP): Likewise. (XVI4GER8): Likewise. (XVI4GER8PP): Likewise. (XVI8GER4): Likewise. (XVI8GER4PP): Likewise. (XVI8GER4SPP): Likewise. (XXMFACC): Likewise. (XXMTACC): Likewise. (XXSETACCZ): Likewise. (ASSEMBLE_PAIR_V): Likewise. (BUILD_PAIR): Likewise. (DISASSEMBLE_PAIR_V): Likewise. (LXVP): New. (STXVP): New. * config/rs6000/rs6000-call.c (rs6000_gimple_fold_new_mma_builtin): Handle RS6000_BIF_LXVP and RS6000_BIF_STXVP. * config/rs6000/rs6000-gen-builtins.c (attrinfo): Add ismmaint. (parse_bif_attrs): Handle ismmaint. (write_decls): Add bif_mmaint_bit and bif_is_mmaint. (write_bif_static_init): Handle ismmaint. 2021-09-17 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_gimple_fold_new_builtin): New forward decl. (rs6000_gimple_fold_builtin): Call rs6000_gimple_fold_new_builtin. (rs6000_new_builtin_valid_without_lhs): New function. (rs6000_gimple_fold_new_mma_builtin): Likewise. (rs6000_gimple_fold_new_builtin): Likewise. 2021-09-17 Thomas Schwinge * hash-table.h (hash_table::expand): Destruct stale Value objects. * hash-map-tests.c (test_map_of_type_with_ctor_and_dtor_expand): Update. 2021-09-17 Roger Sayle PR c/102245 * match.pd (shift optimizations): Disable recent sign-changing optimization for shifts by zero, these will be folded later. 2021-09-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def (__builtin_mffsl): Move from [power9] to [always]. 2021-09-17 Richard Biener * tree-vect-stmts.c (vectorizable_load): Do not frob stmt_info for SLP. 2021-09-17 H.J. Lu * config/i386/i386-features.c (remove_partial_avx_dependency): Also check TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY and and TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY before generating vxorps. * config/i386/i386.h (TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): New. (TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Likewise. * config/i386/i386.md (SSE FP to FP splitters): Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY. (SSE INT to FP splitter): Replace TARGET_SSE_PARTIAL_REG_DEPENDENCY with TARGET_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY. * config/i386/x86-tune.def (X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): New. (X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Likewise. 2021-09-17 H.J. Lu PR target/101900 * config/i386/i386-features.c (remove_partial_avx_dependency): Check TARGET_USE_VECTOR_FP_CONVERTS and TARGET_USE_VECTOR_CONVERTS before generating vxorps. 2021-09-17 H.J. Lu * config/i386/i386-options.c (processor_cost_table): Use tremont_cost for Tremont. * config/i386/x86-tune-costs.h (tremont_memcpy): New. (tremont_memset): Likewise. (tremont_cost): Likewise. * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Enable for Tremont. 2021-09-17 H.J. Lu * common/config/i386/i386-common.c: Use Haswell scheduling model for Tremont. * config/i386/i386.c (ix86_sched_init_global): Prepare for Tremont scheduling pass. * config/i386/x86-tune-sched.c (ix86_issue_rate): Change Tremont issue rate to 4. (ix86_adjust_cost): Handle Tremont. * config/i386/x86-tune.def (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Enable for Tremont. (X86_TUNE_USE_LEAVE): Likewise. (X86_TUNE_PUSH_MEMORY): Likewise. (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Likewise. (X86_TUNE_USE_CLTD): Likewise. (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Likewise. (X86_TUNE_AVOID_MFENCE): Likewise. (X86_TUNE_SSE_TYPELESS_STORES): Likewise. (X86_TUNE_SSE_LOAD0_BY_PXOR): Likewise. (X86_TUNE_ACCUMULATE_OUTGOING_ARGS): Disable for Tremont. (X86_TUNE_FOUR_JUMP_LIMIT): Likewise. (X86_TUNE_OPT_AGU): Likewise. (X86_TUNE_AVOID_LEA_FOR_ADDR): Likewise. (X86_TUNE_AVOID_MEM_OPND_FOR_CMOVE): Likewise. (X86_TUNE_EXPAND_ABS): Likewise. (X86_TUNE_SPLIT_MEM_OPND_FOR_FP_CONVERTS): Likewise. (X86_TUNE_SLOW_PSHUFB): Likewise. 2021-09-17 Eric Botcazou PR rtl-optimization/102306 * combine.c (try_combine): Abort the combination if we are about to duplicate volatile references. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm_undefined_ph): New intrinsic. (_mm256_undefined_ph): Likewise. (_mm512_undefined_ph): Likewise. (_mm_cvtsh_h): Likewise. (_mm256_cvtsh_h): Likewise. (_mm512_cvtsh_h): Likewise. (_mm512_castph_ps): Likewise. (_mm512_castph_pd): Likewise. (_mm512_castph_si512): Likewise. (_mm512_castph512_ph128): Likewise. (_mm512_castph512_ph256): Likewise. (_mm512_castph128_ph512): Likewise. (_mm512_castph256_ph512): Likewise. (_mm512_zextph128_ph512): Likewise. (_mm512_zextph256_ph512): Likewise. (_mm512_castps_ph): Likewise. (_mm512_castpd_ph): Likewise. (_mm512_castsi512_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_castph_ps): New intrinsic. (_mm256_castph_ps): Likewise. (_mm_castph_pd): Likewise. (_mm256_castph_pd): Likewise. (_mm_castph_si128): Likewise. (_mm256_castph_si256): Likewise. (_mm_castps_ph): Likewise. (_mm256_castps_ph): Likewise. (_mm_castpd_ph): Likewise. (_mm256_castpd_ph): Likewise. (_mm_castsi128_ph): Likewise. (_mm256_castsi256_ph): Likewise. (_mm256_castph256_ph128): Likewise. (_mm256_castph128_ph256): Likewise. (_mm256_zextph128_ph256): Likewise. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm_cvtsh_ss): New intrinsic. (_mm_mask_cvtsh_ss): Likewise. (_mm_maskz_cvtsh_ss): Likewise. (_mm_cvtsh_sd): Likewise. (_mm_mask_cvtsh_sd): Likewise. (_mm_maskz_cvtsh_sd): Likewise. (_mm_cvt_roundsh_ss): Likewise. (_mm_mask_cvt_roundsh_ss): Likewise. (_mm_maskz_cvt_roundsh_ss): Likewise. (_mm_cvt_roundsh_sd): Likewise. (_mm_mask_cvt_roundsh_sd): Likewise. (_mm_maskz_cvt_roundsh_sd): Likewise. (_mm_cvtss_sh): Likewise. (_mm_mask_cvtss_sh): Likewise. (_mm_maskz_cvtss_sh): Likewise. (_mm_cvtsd_sh): Likewise. (_mm_mask_cvtsd_sh): Likewise. (_mm_maskz_cvtsd_sh): Likewise. (_mm_cvt_roundss_sh): Likewise. (_mm_mask_cvt_roundss_sh): Likewise. (_mm_maskz_cvt_roundss_sh): Likewise. (_mm_cvt_roundsd_sh): Likewise. (_mm_mask_cvt_roundsd_sh): Likewise. (_mm_maskz_cvt_roundsd_sh): Likewise. * config/i386/i386-builtin-types.def (V8HF_FTYPE_V2DF_V8HF_V8HF_UQI_INT, V8HF_FTYPE_V4SF_V8HF_V8HF_UQI_INT, V2DF_FTYPE_V8HF_V2DF_V2DF_UQI_INT, V4SF_FTYPE_V8HF_V4SF_V4SF_UQI_INT): Add new builtin types. * config/i386/i386-builtin.def: Add corrresponding new builtins. * config/i386/i386-expand.c: Handle new builtin types. * config/i386/sse.md (VF48_128): New mode iterator. (avx512fp16_vcvtsh2): New. (avx512fp16_vcvt2sh): Ditto. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm512_cvtph_pd): New intrinsic. (_mm512_mask_cvtph_pd): Likewise. (_mm512_maskz_cvtph_pd): Likewise. (_mm512_cvt_roundph_pd): Likewise. (_mm512_mask_cvt_roundph_pd): Likewise. (_mm512_maskz_cvt_roundph_pd): Likewise. (_mm512_cvtxph_ps): Likewise. (_mm512_mask_cvtxph_ps): Likewise. (_mm512_maskz_cvtxph_ps): Likewise. (_mm512_cvtx_roundph_ps): Likewise. (_mm512_mask_cvtx_roundph_ps): Likewise. (_mm512_maskz_cvtx_roundph_ps): Likewise. (_mm512_cvtxps_ph): Likewise. (_mm512_mask_cvtxps_ph): Likewise. (_mm512_maskz_cvtxps_ph): Likewise. (_mm512_cvtx_roundps_ph): Likewise. (_mm512_mask_cvtx_roundps_ph): Likewise. (_mm512_maskz_cvtx_roundps_ph): Likewise. (_mm512_cvtpd_ph): Likewise. (_mm512_mask_cvtpd_ph): Likewise. (_mm512_maskz_cvtpd_ph): Likewise. (_mm512_cvt_roundpd_ph): Likewise. (_mm512_mask_cvt_roundpd_ph): Likewise. (_mm512_maskz_cvt_roundpd_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvtph_pd): New intrinsic. (_mm_mask_cvtph_pd): Likewise. (_mm_maskz_cvtph_pd): Likewise. (_mm256_cvtph_pd): Likewise. (_mm256_mask_cvtph_pd): Likewise. (_mm256_maskz_cvtph_pd): Likewise. (_mm_cvtxph_ps): Likewise. (_mm_mask_cvtxph_ps): Likewise. (_mm_maskz_cvtxph_ps): Likewise. (_mm256_cvtxph_ps): Likewise. (_mm256_mask_cvtxph_ps): Likewise. (_mm256_maskz_cvtxph_ps): Likewise. (_mm_cvtxps_ph): Likewise. (_mm_mask_cvtxps_ph): Likewise. (_mm_maskz_cvtxps_ph): Likewise. (_mm256_cvtxps_ph): Likewise. (_mm256_mask_cvtxps_ph): Likewise. (_mm256_maskz_cvtxps_ph): Likewise. (_mm_cvtpd_ph): Likewise. (_mm_mask_cvtpd_ph): Likewise. (_mm_maskz_cvtpd_ph): Likewise. (_mm256_cvtpd_ph): Likewise. (_mm256_mask_cvtpd_ph): Likewise. (_mm256_maskz_cvtpd_ph): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-expand.c: Handle new builtin types. * config/i386/sse.md (VF4_128_8_256): New. (VF48H_AVX512VL): Ditto. (ssePHmode): Add HF vector modes. (castmode): Add new convertable modes. (qq2phsuff): Ditto. (ph2pssuffix): New. (avx512fp16_vcvt2ph_): Ditto. (avx512fp16_vcvt2ph_): Ditto. (*avx512fp16_vcvt2ph_): Ditto. (avx512fp16_vcvt2ph__mask): Ditto. (*avx512fp16_vcvt2ph__mask): Ditto. (*avx512fp16_vcvt2ph__mask_1): Ditto. (avx512fp16_float_extend_ph2): Ditto. (avx512fp16_float_extend_ph2): Ditto. (*avx512fp16_float_extend_ph2_load): Ditto. (avx512fp16_float_extend_phv2df2): Ditto. (*avx512fp16_float_extend_phv2df2_load): Ditto. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm_cvttsh_i32): New intrinsic. (_mm_cvttsh_u32): Likewise. (_mm_cvtt_roundsh_i32): Likewise. (_mm_cvtt_roundsh_u32): Likewise. (_mm_cvttsh_i64): Likewise. (_mm_cvttsh_u64): Likewise. (_mm_cvtt_roundsh_i64): Likewise. (_mm_cvtt_roundsh_u64): Likewise. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/sse.md (avx512fp16_fix_trunc2): New. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm512_cvttph_epi32): New intrinsic. (_mm512_mask_cvttph_epi32): Likewise. (_mm512_maskz_cvttph_epi32): Likewise. (_mm512_cvtt_roundph_epi32): Likewise. (_mm512_mask_cvtt_roundph_epi32): Likewise. (_mm512_maskz_cvtt_roundph_epi32): Likewise. (_mm512_cvttph_epu32): Likewise. (_mm512_mask_cvttph_epu32): Likewise. (_mm512_maskz_cvttph_epu32): Likewise. (_mm512_cvtt_roundph_epu32): Likewise. (_mm512_mask_cvtt_roundph_epu32): Likewise. (_mm512_maskz_cvtt_roundph_epu32): Likewise. (_mm512_cvttph_epi64): Likewise. (_mm512_mask_cvttph_epi64): Likewise. (_mm512_maskz_cvttph_epi64): Likewise. (_mm512_cvtt_roundph_epi64): Likewise. (_mm512_mask_cvtt_roundph_epi64): Likewise. (_mm512_maskz_cvtt_roundph_epi64): Likewise. (_mm512_cvttph_epu64): Likewise. (_mm512_mask_cvttph_epu64): Likewise. (_mm512_maskz_cvttph_epu64): Likewise. (_mm512_cvtt_roundph_epu64): Likewise. (_mm512_mask_cvtt_roundph_epu64): Likewise. (_mm512_maskz_cvtt_roundph_epu64): Likewise. (_mm512_cvttph_epi16): Likewise. (_mm512_mask_cvttph_epi16): Likewise. (_mm512_maskz_cvttph_epi16): Likewise. (_mm512_cvtt_roundph_epi16): Likewise. (_mm512_mask_cvtt_roundph_epi16): Likewise. (_mm512_maskz_cvtt_roundph_epi16): Likewise. (_mm512_cvttph_epu16): Likewise. (_mm512_mask_cvttph_epu16): Likewise. (_mm512_maskz_cvttph_epu16): Likewise. (_mm512_cvtt_roundph_epu16): Likewise. (_mm512_mask_cvtt_roundph_epu16): Likewise. (_mm512_maskz_cvtt_roundph_epu16): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvttph_epi32): New intirnsic. (_mm_mask_cvttph_epi32): Likewise. (_mm_maskz_cvttph_epi32): Likewise. (_mm256_cvttph_epi32): Likewise. (_mm256_mask_cvttph_epi32): Likewise. (_mm256_maskz_cvttph_epi32): Likewise. (_mm_cvttph_epu32): Likewise. (_mm_mask_cvttph_epu32): Likewise. (_mm_maskz_cvttph_epu32): Likewise. (_mm256_cvttph_epu32): Likewise. (_mm256_mask_cvttph_epu32): Likewise. (_mm256_maskz_cvttph_epu32): Likewise. (_mm_cvttph_epi64): Likewise. (_mm_mask_cvttph_epi64): Likewise. (_mm_maskz_cvttph_epi64): Likewise. (_mm256_cvttph_epi64): Likewise. (_mm256_mask_cvttph_epi64): Likewise. (_mm256_maskz_cvttph_epi64): Likewise. (_mm_cvttph_epu64): Likewise. (_mm_mask_cvttph_epu64): Likewise. (_mm_maskz_cvttph_epu64): Likewise. (_mm256_cvttph_epu64): Likewise. (_mm256_mask_cvttph_epu64): Likewise. (_mm256_maskz_cvttph_epu64): Likewise. (_mm_cvttph_epi16): Likewise. (_mm_mask_cvttph_epi16): Likewise. (_mm_maskz_cvttph_epi16): Likewise. (_mm256_cvttph_epi16): Likewise. (_mm256_mask_cvttph_epi16): Likewise. (_mm256_maskz_cvttph_epi16): Likewise. (_mm_cvttph_epu16): Likewise. (_mm_mask_cvttph_epu16): Likewise. (_mm_maskz_cvttph_epu16): Likewise. (_mm256_cvttph_epu16): Likewise. (_mm256_mask_cvttph_epu16): Likewise. (_mm256_maskz_cvttph_epu16): Likewise. * config/i386/i386-builtin.def: Add new builtins. * config/i386/sse.md (avx512fp16_fix_trunc2): New. (avx512fp16_fix_trunc2): Ditto. (*avx512fp16_fix_trunc2_load): Ditto. (avx512fp16_fix_truncv2di2): Ditto. (avx512fp16_fix_truncv2di2_load): Ditto. 2021-09-17 liuhongt * config/i386/avx512fp16intrin.h (_mm_cvtsh_i32): New intrinsic. (_mm_cvtsh_u32): Likewise. (_mm_cvt_roundsh_i32): Likewise. (_mm_cvt_roundsh_u32): Likewise. (_mm_cvtsh_i64): Likewise. (_mm_cvtsh_u64): Likewise. (_mm_cvt_roundsh_i64): Likewise. (_mm_cvt_roundsh_u64): Likewise. (_mm_cvti32_sh): Likewise. (_mm_cvtu32_sh): Likewise. (_mm_cvt_roundi32_sh): Likewise. (_mm_cvt_roundu32_sh): Likewise. (_mm_cvti64_sh): Likewise. (_mm_cvtu64_sh): Likewise. (_mm_cvt_roundi64_sh): Likewise. (_mm_cvt_roundu64_sh): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_round_builtin): Handle new builtin types. * config/i386/sse.md (avx512fp16_vcvtsh2si): New define_insn. (avx512fp16_vcvtsh2si_2): Likewise. (avx512fp16_vcvtsi2sh): Likewise. 2021-09-16 Bill Schmidt * config/rs6000/rs6000-c.c (rs6000-builtins.h): New include. (altivec_resolve_new_overloaded_builtin): New forward decl. (rs6000_new_builtin_type_compatible): New function. (altivec_resolve_overloaded_builtin): Call altivec_resolve_new_overloaded_builtin. (altivec_build_new_resolved_builtin): New function. (altivec_resolve_new_overloaded_builtin): Likewise. * config/rs6000/rs6000-call.c (rs6000_new_builtin_is_supported): Likewise. * config/rs6000/rs6000-gen-builtins.c (write_decls): Remove _p from name of rs6000_new_builtin_is_supported. 2021-09-16 Uroš Bizjak * config/i386/i386-protos.h (ix86_decompose_address): Change return type to bool. * config/i386/i386.c (ix86_decompose_address): Ditto. 2021-09-16 Tobias Burnus PR target/102353 * config/rs6000/t-rs6000 (build/rs6000-gen-builtins.o, build/rbtree.o): Added 'build/' to target, use build/%.o rule. (build/rs6000-gen-builtins$(build_exeext)): Add 'build/' and '$(build_exeext)' to target and 'build/' for the *.o files. (rs6000-builtins.c): Update for those changes; run rs6000-gen-builtins with $(RUN_GEN). 2021-09-16 Martin Jambor * cgraph.c (cgraph_node::dump): Do not check caller count sums if the body has been removed. Remove trailing whitespace. 2021-09-16 Richard Biener PR middle-end/102360 * internal-fn.c (expand_DEFERRED_INIT): Make pattern-init of non-memory more robust. 2021-09-16 Daniel Cederman * config/sparc/sparc-opts.h (enum sparc_processor_type): Add LEON5 * config/sparc/sparc.c (struct processor_costs): Add LEON5 costs (leon5_adjust_cost): Increase cost of store with data dependency on ALU instruction and FPU anti-dependencies. (sparc_option_override): Add LEON5 costs (sparc_adjust_cost): Add LEON5 cost adjustments * config/sparc/sparc.h: Add LEON5 * config/sparc/sparc.md: Include LEON5 scheduling information * config/sparc/sparc.opt: Add LEON5 * doc/invoke.texi: Add LEON5 * config/sparc/leon5.md: New file. 2021-09-16 Daniel Cederman * config/sparc/sparc.md (stack_protect_set32): Add NOP to prevent sensitive sequence for B2BST errata workaround. 2021-09-16 Daniel Cederman * config/sparc/sparc.c (sparc_do_work_around_errata): Do not begin functions with atomic instruction in the UT700 errata workaround. 2021-09-16 Daniel Cederman * config/sparc/sparc.c (next_active_non_empty_insn): New function that returns next active non empty assembly instruction. (sparc_do_work_around_errata): Use new function. 2021-09-16 Daniel Cederman * config/sparc/sparc.c (store_insn_p): Add predicate for store attributes. (load_insn_p): Add predicate for load attributes. (sparc_do_work_around_errata): Use new predicates. 2021-09-16 Andreas Larsson * config/sparc/sparc.c (dump_target_flag_bits): Print bit names for LEON and LEON3. 2021-09-16 Martin Liska * config/mips/netbsd.h: Fix typo in name of a macro. 2021-09-16 liuhongt PR middle-end/102080 * match.pd: Check mask type when doing cond_op related gimple simplification. * tree.c (is_truth_type_for): New function. * tree.h (is_truth_type_for): New declaration. 2021-09-16 liuhongt * config/i386/avx512fp16intrin.h (_mm512_cvtepi32_ph): New intrinsic. (_mm512_mask_cvtepi32_ph): Likewise. (_mm512_maskz_cvtepi32_ph): Likewise. (_mm512_cvt_roundepi32_ph): Likewise. (_mm512_mask_cvt_roundepi32_ph): Likewise. (_mm512_maskz_cvt_roundepi32_ph): Likewise. (_mm512_cvtepu32_ph): Likewise. (_mm512_mask_cvtepu32_ph): Likewise. (_mm512_maskz_cvtepu32_ph): Likewise. (_mm512_cvt_roundepu32_ph): Likewise. (_mm512_mask_cvt_roundepu32_ph): Likewise. (_mm512_maskz_cvt_roundepu32_ph): Likewise. (_mm512_cvtepi64_ph): Likewise. (_mm512_mask_cvtepi64_ph): Likewise. (_mm512_maskz_cvtepi64_ph): Likewise. (_mm512_cvt_roundepi64_ph): Likewise. (_mm512_mask_cvt_roundepi64_ph): Likewise. (_mm512_maskz_cvt_roundepi64_ph): Likewise. (_mm512_cvtepu64_ph): Likewise. (_mm512_mask_cvtepu64_ph): Likewise. (_mm512_maskz_cvtepu64_ph): Likewise. (_mm512_cvt_roundepu64_ph): Likewise. (_mm512_mask_cvt_roundepu64_ph): Likewise. (_mm512_maskz_cvt_roundepu64_ph): Likewise. (_mm512_cvtepi16_ph): Likewise. (_mm512_mask_cvtepi16_ph): Likewise. (_mm512_maskz_cvtepi16_ph): Likewise. (_mm512_cvt_roundepi16_ph): Likewise. (_mm512_mask_cvt_roundepi16_ph): Likewise. (_mm512_maskz_cvt_roundepi16_ph): Likewise. (_mm512_cvtepu16_ph): Likewise. (_mm512_mask_cvtepu16_ph): Likewise. (_mm512_maskz_cvtepu16_ph): Likewise. (_mm512_cvt_roundepu16_ph): Likewise. (_mm512_mask_cvt_roundepu16_ph): Likewise. (_mm512_maskz_cvt_roundepu16_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvtepi32_ph): New intrinsic. (_mm_mask_cvtepi32_ph): Likewise. (_mm_maskz_cvtepi32_ph): Likewise. (_mm256_cvtepi32_ph): Likewise. (_mm256_mask_cvtepi32_ph): Likewise. (_mm256_maskz_cvtepi32_ph): Likewise. (_mm_cvtepu32_ph): Likewise. (_mm_mask_cvtepu32_ph): Likewise. (_mm_maskz_cvtepu32_ph): Likewise. (_mm256_cvtepu32_ph): Likewise. (_mm256_mask_cvtepu32_ph): Likewise. (_mm256_maskz_cvtepu32_ph): Likewise. (_mm_cvtepi64_ph): Likewise. (_mm_mask_cvtepi64_ph): Likewise. (_mm_maskz_cvtepi64_ph): Likewise. (_mm256_cvtepi64_ph): Likewise. (_mm256_mask_cvtepi64_ph): Likewise. (_mm256_maskz_cvtepi64_ph): Likewise. (_mm_cvtepu64_ph): Likewise. (_mm_mask_cvtepu64_ph): Likewise. (_mm_maskz_cvtepu64_ph): Likewise. (_mm256_cvtepu64_ph): Likewise. (_mm256_mask_cvtepu64_ph): Likewise. (_mm256_maskz_cvtepu64_ph): Likewise. (_mm_cvtepi16_ph): Likewise. (_mm_mask_cvtepi16_ph): Likewise. (_mm_maskz_cvtepi16_ph): Likewise. (_mm256_cvtepi16_ph): Likewise. (_mm256_mask_cvtepi16_ph): Likewise. (_mm256_maskz_cvtepi16_ph): Likewise. (_mm_cvtepu16_ph): Likewise. (_mm_mask_cvtepu16_ph): Likewise. (_mm_maskz_cvtepu16_ph): Likewise. (_mm256_cvtepu16_ph): Likewise. (_mm256_mask_cvtepu16_ph): Likewise. (_mm256_maskz_cvtepu16_ph): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Ditto. * config/i386/i386-modes.def: Declare V2HF and V6HF. * config/i386/sse.md (VI2H_AVX512VL): New. (qq2phsuff): Ditto. (sseintvecmode): Add HF vector modes. (avx512fp16_vcvt2ph_): New. (avx512fp16_vcvt2ph_): Ditto. (*avx512fp16_vcvt2ph_): Ditto. (avx512fp16_vcvt2ph__mask): Ditto. (*avx512fp16_vcvt2ph__mask): Ditto. (*avx512fp16_vcvt2ph__mask_1): Ditto. (avx512fp16_vcvtqq2ph_v2di): Ditto. (*avx512fp16_vcvtqq2ph_v2di): Ditto. (avx512fp16_vcvtqq2ph_v2di_mask): Ditto. (*avx512fp16_vcvtqq2ph_v2di_mask): Ditto. (*avx512fp16_vcvtqq2ph_v2di_mask_1): Ditto. * config/i386/subst.md (round_qq2phsuff): New subst_attr. 2021-09-16 liuhongt * config/i386/avx512fp16intrin.h (_mm512_cvtph_epi32): New intrinsic/ (_mm512_mask_cvtph_epi32): Likewise. (_mm512_maskz_cvtph_epi32): Likewise. (_mm512_cvt_roundph_epi32): Likewise. (_mm512_mask_cvt_roundph_epi32): Likewise. (_mm512_maskz_cvt_roundph_epi32): Likewise. (_mm512_cvtph_epu32): Likewise. (_mm512_mask_cvtph_epu32): Likewise. (_mm512_maskz_cvtph_epu32): Likewise. (_mm512_cvt_roundph_epu32): Likewise. (_mm512_mask_cvt_roundph_epu32): Likewise. (_mm512_maskz_cvt_roundph_epu32): Likewise. (_mm512_cvtph_epi64): Likewise. (_mm512_mask_cvtph_epi64): Likewise. (_mm512_maskz_cvtph_epi64): Likewise. (_mm512_cvt_roundph_epi64): Likewise. (_mm512_mask_cvt_roundph_epi64): Likewise. (_mm512_maskz_cvt_roundph_epi64): Likewise. (_mm512_cvtph_epu64): Likewise. (_mm512_mask_cvtph_epu64): Likewise. (_mm512_maskz_cvtph_epu64): Likewise. (_mm512_cvt_roundph_epu64): Likewise. (_mm512_mask_cvt_roundph_epu64): Likewise. (_mm512_maskz_cvt_roundph_epu64): Likewise. (_mm512_cvtph_epi16): Likewise. (_mm512_mask_cvtph_epi16): Likewise. (_mm512_maskz_cvtph_epi16): Likewise. (_mm512_cvt_roundph_epi16): Likewise. (_mm512_mask_cvt_roundph_epi16): Likewise. (_mm512_maskz_cvt_roundph_epi16): Likewise. (_mm512_cvtph_epu16): Likewise. (_mm512_mask_cvtph_epu16): Likewise. (_mm512_maskz_cvtph_epu16): Likewise. (_mm512_cvt_roundph_epu16): Likewise. (_mm512_mask_cvt_roundph_epu16): Likewise. (_mm512_maskz_cvt_roundph_epu16): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cvtph_epi32): New intrinsic. (_mm_mask_cvtph_epi32): Likewise. (_mm_maskz_cvtph_epi32): Likewise. (_mm256_cvtph_epi32): Likewise. (_mm256_mask_cvtph_epi32): Likewise. (_mm256_maskz_cvtph_epi32): Likewise. (_mm_cvtph_epu32): Likewise. (_mm_mask_cvtph_epu32): Likewise. (_mm_maskz_cvtph_epu32): Likewise. (_mm256_cvtph_epu32): Likewise. (_mm256_mask_cvtph_epu32): Likewise. (_mm256_maskz_cvtph_epu32): Likewise. (_mm_cvtph_epi64): Likewise. (_mm_mask_cvtph_epi64): Likewise. (_mm_maskz_cvtph_epi64): Likewise. (_mm256_cvtph_epi64): Likewise. (_mm256_mask_cvtph_epi64): Likewise. (_mm256_maskz_cvtph_epi64): Likewise. (_mm_cvtph_epu64): Likewise. (_mm_mask_cvtph_epu64): Likewise. (_mm_maskz_cvtph_epu64): Likewise. (_mm256_cvtph_epu64): Likewise. (_mm256_mask_cvtph_epu64): Likewise. (_mm256_maskz_cvtph_epu64): Likewise. (_mm_cvtph_epi16): Likewise. (_mm_mask_cvtph_epi16): Likewise. (_mm_maskz_cvtph_epi16): Likewise. (_mm256_cvtph_epi16): Likewise. (_mm256_mask_cvtph_epi16): Likewise. (_mm256_maskz_cvtph_epi16): Likewise. (_mm_cvtph_epu16): Likewise. (_mm_mask_cvtph_epu16): Likewise. (_mm_maskz_cvtph_epu16): Likewise. (_mm256_cvtph_epu16): Likewise. (_mm256_mask_cvtph_epu16): Likewise. (_mm256_maskz_cvtph_epu16): Likewise. * config/i386/i386-builtin-types.def: Add new builtin types. * config/i386/i386-builtin.def: Add new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Ditto. * config/i386/sse.md (sseintconvert): New. (ssePHmode): Ditto. (UNSPEC_US_FIX_NOTRUNC): Ditto. (sseintconvertsignprefix): Ditto. (avx512fp16_vcvtph2_): Ditto. 2021-09-16 liuhongt * config/i386/avx512fp16intrin.h: (_mm_cvtsi16_si128): New intrinsic. (_mm_cvtsi128_si16): Likewise. (_mm_mask_load_sh): Likewise. (_mm_maskz_load_sh): Likewise. (_mm_mask_store_sh): Likewise. (_mm_move_sh): Likewise. (_mm_mask_move_sh): Likewise. (_mm_maskz_move_sh): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_special_args_builtin): Handle new builtin types. (ix86_expand_vector_init_one_nonzero): Adjust for FP16 target. * config/i386/sse.md (VI2F): New mode iterator. (vec_set_0): Use new mode iterator. (avx512f_mov_mask): Adjust for HF vector mode. (avx512f_store_mask): Ditto. 2021-09-16 Kewen Lin * config/rs6000/rs6000.opt (-mtoc-fusion): Remove. 2021-09-15 David Edelsohn * config/rs6000/rs6000.c (rs6000_xcoff_encode_section_info): Proceed if no symbol summary or the symbol alias flag is false. 2021-09-15 Jakub Jelinek PR c++/88578 PR c++/102295 * varasm.c (output_constructor_regular_field): Instead of assertion that array_size_for_constructor result is equal to size of TREE_TYPE (local->val) in bytes, assert that the type size is greater or equal to array_size_for_constructor result and use type size as fieldsize. 2021-09-15 Martin Liska PR target/102351 * config/i386/vxworks.h: Use new macro TARGET_CPU_P. 2021-09-15 Martin Liska PR target/102349 * config/rs6000/rs6000.c (rs6000_xcoff_encode_section_info): Check that we have a symbol summary for a symbol. 2021-09-15 Richard Biener PR target/102348 * config/rs6000/lynx.h: Remove undef of PREFERRED_DEBUGGING_TYPE to inherit from elfos.h 2021-09-15 liuhongt PR target/102327 * config/i386/i386-expand.c (ix86_expand_vector_init_interleave): Use puncklwd to pack 2 HFmodes. (ix86_expand_vector_set): Use blendw instead of pinsrw. * config/i386/i386.c (ix86_can_change_mode_class): Adjust for AVX512FP16 which supports 16bit vector load. * config/i386/sse.md (avx512bw_interleave_highv32hi): Rename to .. (avx512bw_interleave_high): .. this, and extend to V32HFmode. (avx2_interleave_highv16hi): Rename to .. (avx2_interleave_high): .. this, and extend to V16HFmode. (vec_interleave_highv8hi): Rename to .. (vec_interleave_high): .. this, and extend to V8HFmode. (avx512bw_interleave_lowv32hi): Rename to .. (avx512bw_interleave_low): this, and extend to V32HFmode. (avx2_interleave_lowv16hi): Rename to .. (avx2_interleave_low): .. this, and extend to V16HFmode. (vec_interleave_lowv8hi): Rename to .. (vec_interleave_low): .. this, and extend to V8HFmode. (sse4_1_pblendw): Rename to .. (sse4_1_pblend): .. this, and extend to V8HFmode. (avx2_pblendph): New define_expand. (_pinsr): Refactor, use sseintmodesuffix instead of ssemodesuffix. (blendsuf): New mode attr. 2021-09-15 Richard Biener * tree-vectorizer.h (dr_misalignment): Move out of line. (dr_target_alignment): New. (DR_TARGET_ALIGNMENT): Wrap dr_target_alignment. (set_dr_target_alignment): New. (SET_DR_TARGET_ALIGNMENT): Wrap set_dr_target_alignment. * tree-vect-data-refs.c (dr_misalignment): Compute and return the group members misalignment. (vect_compute_data_ref_alignment): Use SET_DR_TARGET_ALIGNMENT. (vect_analyze_data_refs_alignment): Compute alignment only for the first element of a DR group. (vect_slp_analyze_node_alignment): Likewise. 2021-09-15 Hongyu Wang * config/i386/avx512fp16intrin.h: Adjust all builtin calls. * config/i386/avx512fp16vlintrin.h: Likewise. * config/i386/i386-builtin.def: Adjust builtin name and enumeration to match AVX512F style. 2021-09-15 Richard Biener PR tree-optimization/102318 * tree-vect-loop.c (vect_transform_cycle_phi): Revert previous change and do the mode conversion separately from the sign conversion. 2021-09-15 Hongtao Liu Peter Cordes PR target/91103 * config/i386/sse.md (extract_suf): Add V8SF/V8SI/V4DF/V4DI. (*vec_extract_valign): Output vextract{i,f}{32x4,64x2} instruction when byte_offset % 16 == 0. 2021-09-15 Richard Biener * config.gcc: Remove vax-*-openbsd* configuration. 2021-09-15 Richard Biener * config.gcc: Remove m68k-openbsd. 2021-09-15 Max Filippov PR target/102336 * config/xtensa/t-xtensa (TM_H): Add include/xtensa-config.h. 2021-09-14 Peter Bergner * config/rs6000/mma.md (unspec): Delete UNSPEC_MMA_XXSETACCZ. (unspecv): Add UNSPECV_MMA_XXSETACCZ. (*mma_xxsetaccz): Delete. (mma_xxsetaccz): Change to define_insn. Remove operand 1. Use UNSPECV_MMA_XXSETACCZ. Update comment. * config/rs6000/rs6000.c (rs6000_rtx_costs): Use UNSPECV_MMA_XXSETACCZ. 2021-09-14 Iain Sandoe * Makefile.in: Remove variables related to applying no-PIE to the exes on $build. * configure: Regenerate. * configure.ac: Remove configuration related to applying no-PIE to the exes on $build. 2021-09-14 Claudiu Zissulescu * config/arc/arc.md (doloop_end): Add missing mode. (loop_end): Likewise. 2021-09-14 Jakub Jelinek * gimplify.c (goa_stabilize_expr): Add depth argument, propagate it to recursive calls, for depth above 7 just gimplify or return. Perform a test even for MODIFY_EXPR, ADDR_EXPR, COMPOUND_EXPR with __builtin_clear_padding and TARGET_EXPR. (gimplify_omp_atomic): Adjust goa_stabilize_expr callers. 2021-09-14 liuhongt * config/i386/avx512fp16intrin.h (_mm_fpclass_sh_mask): New intrinsic. (_mm_mask_fpclass_sh_mask): Likewise. (_mm512_mask_fpclass_ph_mask): Likewise. (_mm512_fpclass_ph_mask): Likewise. (_mm_getexp_sh): Likewise. (_mm_mask_getexp_sh): Likewise. (_mm_maskz_getexp_sh): Likewise. (_mm512_getexp_ph): Likewise. (_mm512_mask_getexp_ph): Likewise. (_mm512_maskz_getexp_ph): Likewise. (_mm_getexp_round_sh): Likewise. (_mm_mask_getexp_round_sh): Likewise. (_mm_maskz_getexp_round_sh): Likewise. (_mm512_getexp_round_ph): Likewise. (_mm512_mask_getexp_round_ph): Likewise. (_mm512_maskz_getexp_round_ph): Likewise. (_mm_getmant_sh): Likewise. (_mm_mask_getmant_sh): Likewise. (_mm_maskz_getmant_sh): Likewise. (_mm512_getmant_ph): Likewise. (_mm512_mask_getmant_ph): Likewise. (_mm512_maskz_getmant_ph): Likewise. (_mm_getmant_round_sh): Likewise. (_mm_mask_getmant_round_sh): Likewise. (_mm_maskz_getmant_round_sh): Likewise. (_mm512_getmant_round_ph): Likewise. (_mm512_mask_getmant_round_ph): Likewise. (_mm512_maskz_getmant_round_ph): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_mask_fpclass_ph_mask): New intrinsic. (_mm_fpclass_ph_mask): Likewise. (_mm256_mask_fpclass_ph_mask): Likewise. (_mm256_fpclass_ph_mask): Likewise. (_mm256_getexp_ph): Likewise. (_mm256_mask_getexp_ph): Likewise. (_mm256_maskz_getexp_ph): Likewise. (_mm_getexp_ph): Likewise. (_mm_mask_getexp_ph): Likewise. (_mm_maskz_getexp_ph): Likewise. (_mm256_getmant_ph): Likewise. (_mm256_mask_getmant_ph): Likewise. (_mm256_maskz_getmant_ph): Likewise. (_mm_getmant_ph): Likewise. (_mm_mask_getmant_ph): Likewise. (_mm_maskz_getmant_ph): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Ditto. * config/i386/sse.md (vecmemsuffix): Add HF vector modes. (_getexp): Adjust to support HF vector modes. (avx512f_sgetexp): Ditto. (avx512dq_vmfpclass): Ditto. (_getmant): Ditto. (avx512f_vgetmant): Ditto. 2021-09-14 liuhongt * config/i386/avx512fp16intrin.h (_mm512_reduce_ph): New intrinsic. (_mm512_mask_reduce_ph): Likewise. (_mm512_maskz_reduce_ph): Likewise. (_mm512_reduce_round_ph): Likewise. (_mm512_mask_reduce_round_ph): Likewise. (_mm512_maskz_reduce_round_ph): Likewise. (_mm_reduce_sh): Likewise. (_mm_mask_reduce_sh): Likewise. (_mm_maskz_reduce_sh): Likewise. (_mm_reduce_round_sh): Likewise. (_mm_mask_reduce_round_sh): Likewise. (_mm_maskz_reduce_round_sh): Likewise. (_mm512_roundscale_ph): Likewise. (_mm512_mask_roundscale_ph): Likewise. (_mm512_maskz_roundscale_ph): Likewise. (_mm512_roundscale_round_ph): Likewise. (_mm512_mask_roundscale_round_ph): Likewise. (_mm512_maskz_roundscale_round_ph): Likewise. (_mm_roundscale_sh): Likewise. (_mm_mask_roundscale_sh): Likewise. (_mm_maskz_roundscale_sh): Likewise. (_mm_roundscale_round_sh): Likewise. (_mm_mask_roundscale_round_sh): Likewise. (_mm_maskz_roundscale_round_sh): Likewise. * config/i386/avx512fp16vlintrin.h: (_mm_reduce_ph): New intrinsic. (_mm_mask_reduce_ph): Likewise. (_mm_maskz_reduce_ph): Likewise. (_mm256_reduce_ph): Likewise. (_mm256_mask_reduce_ph): Likewise. (_mm256_maskz_reduce_ph): Likewise. (_mm_roundscale_ph): Likewise. (_mm_mask_roundscale_ph): Likewise. (_mm_maskz_roundscale_ph): Likewise. (_mm256_roundscale_ph): Likewise. (_mm256_mask_roundscale_ph): Likewise. (_mm256_maskz_roundscale_ph): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Ditto. * config/i386/sse.md (reducep): Renamed to ... (reducep): ... this, and adjust for round operands. (reduces): Likewise, with ... (reduces_rndscale): Adjust for HF vector modes. (avx512f_rndscale): Ditto. (*avx512f_rndscale): Ditto. 2021-09-14 liuhongt * config/i386/avx512fp16intrin.h: (_mm512_rcp_ph): New intrinsic. (_mm512_mask_rcp_ph): Likewise. (_mm512_maskz_rcp_ph): Likewise. (_mm_rcp_sh): Likewise. (_mm_mask_rcp_sh): Likewise. (_mm_maskz_rcp_sh): Likewise. (_mm512_scalef_ph): Likewise. (_mm512_mask_scalef_ph): Likewise. (_mm512_maskz_scalef_ph): Likewise. (_mm512_scalef_round_ph): Likewise. (_mm512_mask_scalef_round_ph): Likewise. (_mm512_maskz_scalef_round_ph): Likewise. (_mm_scalef_sh): Likewise. (_mm_mask_scalef_sh): Likewise. (_mm_maskz_scalef_sh): Likewise. (_mm_scalef_round_sh): Likewise. (_mm_mask_scalef_round_sh): Likewise. (_mm_maskz_scalef_round_sh): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_rcp_ph): New intrinsic. (_mm256_rcp_ph): Likewise. (_mm_mask_rcp_ph): Likewise. (_mm256_mask_rcp_ph): Likewise. (_mm_maskz_rcp_ph): Likewise. (_mm256_maskz_rcp_ph): Likewise. (_mm_scalef_ph): Likewise. (_mm256_scalef_ph): Likewise. (_mm_mask_scalef_ph): Likewise. (_mm256_mask_scalef_ph): Likewise. (_mm_maskz_scalef_ph): Likewise. (_mm256_maskz_scalef_ph): Likewise. * config/i386/i386-builtin.def: Add new builtins. * config/i386/sse.md (VFH_AVX512VL): New. (avx512fp16_rcp2): Ditto. (avx512fp16_vmrcpv8hf2): Ditto. (avx512f_vmscalef): Adjust to support HF vector modes. (_scalef): Ditto. 2021-09-14 liuhongt * config/i386/avx512fp16intrin.h: (_mm512_sqrt_ph): New intrinsic. (_mm512_mask_sqrt_ph): Likewise. (_mm512_maskz_sqrt_ph): Likewise. (_mm512_sqrt_round_ph): Likewise. (_mm512_mask_sqrt_round_ph): Likewise. (_mm512_maskz_sqrt_round_ph): Likewise. (_mm512_rsqrt_ph): Likewise. (_mm512_mask_rsqrt_ph): Likewise. (_mm512_maskz_rsqrt_ph): Likewise. (_mm_rsqrt_sh): Likewise. (_mm_mask_rsqrt_sh): Likewise. (_mm_maskz_rsqrt_sh): Likewise. (_mm_sqrt_sh): Likewise. (_mm_mask_sqrt_sh): Likewise. (_mm_maskz_sqrt_sh): Likewise. (_mm_sqrt_round_sh): Likewise. (_mm_mask_sqrt_round_sh): Likewise. (_mm_maskz_sqrt_round_sh): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_sqrt_ph): New intrinsic. (_mm256_sqrt_ph): Likewise. (_mm_mask_sqrt_ph): Likewise. (_mm256_mask_sqrt_ph): Likewise. (_mm_maskz_sqrt_ph): Likewise. (_mm256_maskz_sqrt_ph): Likewise. (_mm_rsqrt_ph): Likewise. (_mm256_rsqrt_ph): Likewise. (_mm_mask_rsqrt_ph): Likewise. (_mm256_mask_rsqrt_ph): Likewise. (_mm_maskz_rsqrt_ph): Likewise. (_mm256_maskz_rsqrt_ph): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtins. (ix86_expand_round_builtin): Ditto. * config/i386/sse.md (VF_AVX512FP16VL): New. (sqrt2): Adjust for HF vector modes. (_sqrt2): Likewise. (_vmsqrt2): Likewise. (_rsqrt2): New. (avx512fp16_vmrsqrtv8hf2): Likewise. 2021-09-13 Thomas Schwinge PR bootstrap/101574 * diagnostic-spec.c (warning_suppressed_at, copy_warning): Handle 'RESERVED_LOCATION_P' locations. * warning-control.cc (get_nowarn_spec, suppress_warning) (copy_warning): Likewise. 2021-09-13 Thomas Schwinge * diagnostic-spec.h (typedef xint_hash_t): Use 'location_t' instead of... (typedef key_type_t): ... this. Remove. (nowarn_map): Document. * diagnostic-spec.c (nowarn_map): Likewise. * warning-control.cc (convert_to_key): Evolve functions into... (get_location): ... these. Adjust all users. 2021-09-13 Thomas Schwinge * warning-control.cc (copy_warning): Remove 'nowarn_map' setup. 2021-09-13 Jason Merrill * params.opt: Add destructive-interference-size and constructive-interference-size. * doc/invoke.texi: Document them. * config/aarch64/aarch64.c (aarch64_override_options_internal): Set them. * config/arm/arm.c (arm_option_override): Set them. * config/i386/i386-options.c (ix86_option_override_internal): Set them. 2021-09-13 Martin Liska H.J. Lu PR target/101696 * common/config/i386/cpuinfo.h (cpu_indicator_init): Add support for x86-64 micro levels for __builtin_cpu_supports. * common/config/i386/i386-cpuinfo.h (enum feature_priority): Add priorities for the micro-arch levels. (enum processor_features): Add new features. * common/config/i386/i386-isas.h: Add micro-arch features. * config/i386/i386-builtins.c (get_builtin_code_for_version): Support the micro-arch levels by callsing __builtin_cpu_supports. * doc/extend.texi: Document that the levels are support by __builtin_cpu_supports. 2021-09-13 Andrew Pinski PR target/95969 * config/aarch64/aarch64-builtins.c (aarch64_fold_builtin_lane_check): New function. (aarch64_general_fold_builtin): Handle AARCH64_SIMD_BUILTIN_LANE_CHECK. (aarch64_general_gimple_fold_builtin): Likewise. 2021-09-13 Andrew Pinski * config.gcc: Add m32r-*-linux* and m32rle-*-linux* to the Unsupported targets list. Remove support for m32r-*-linux* and m32rle-*-linux*. * config/m32r/linux.h: Removed. * config/m32r/t-linux: Removed. 2021-09-13 Kyrylo Tkachov PR target/102252 * config/aarch64/aarch64.c (aarch64_classify_address): Don't allow register index for SVE predicate modes. 2021-09-13 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Remove FSM references. (back_threader_registry::register_path): Same. * tree-ssa-threadedge.c (jump_threader::simplify_control_stmt_condition): Same. * tree-ssa-threadupdate.c (jt_path_registry::jt_path_registry): Add backedge_threads argument. (fwd_jt_path_registry::fwd_jt_path_registry): Pass backedge_threads argument. (back_jt_path_registry::back_jt_path_registry): Same. (dump_jump_thread_path): Adjust for FSM removal. (back_jt_path_registry::rewire_first_differing_edge): Same. (back_jt_path_registry::adjust_paths_after_duplication): Same. (back_jt_path_registry::update_cfg): Same. (jt_path_registry::register_jump_thread): Same. * tree-ssa-threadupdate.h (enum jump_thread_edge_type): Remove EDGE_FSM_THREAD. (class back_jt_path_registry): Add backedge_threads to constructor. 2021-09-13 Martin Liska PR c++/101331 * asan.h (sanitize_coverage_p): Handle when fn == NULL. 2021-09-13 H.J. Lu PR target/101935 * config/i386/i386.h (TARGET_AVX256_MOVE_BY_PIECES): New. (TARGET_AVX256_STORE_BY_PIECES): Likewise. (MOVE_MAX): Check TARGET_AVX256_MOVE_BY_PIECES and TARGET_AVX256_STORE_BY_PIECES instead of TARGET_AVX256_SPLIT_UNALIGNED_LOAD and TARGET_AVX256_SPLIT_UNALIGNED_STORE. (STORE_MAX_PIECES): Check TARGET_AVX256_STORE_BY_PIECES instead of TARGET_AVX256_SPLIT_UNALIGNED_STORE. * config/i386/x86-tune.def (X86_TUNE_AVX256_MOVE_BY_PIECES): New. (X86_TUNE_AVX256_STORE_BY_PIECES): Likewise. 2021-09-13 liuhongt PR bootstrap/102302 * expmed.c (extract_bit_field_using_extv): Use gen_lowpart_if_possible instead of gen_lowpart to avoid ICE. 2021-09-13 Aldy Hernandez * Makefile.in (OBJS): Add value-pointer-equiv.o. * gimple-ssa-evrp.c (class ssa_equiv_stack): Move to value-pointer-equiv.*. (ssa_equiv_stack::ssa_equiv_stack): Same. (ssa_equiv_stack::enter): Same. (ssa_equiv_stack::leave): Same. (ssa_equiv_stack::push_replacement): Same. (ssa_equiv_stack::get_replacement): Same. (is_pointer_ssa): Same. (class pointer_equiv_analyzer): Same. (pointer_equiv_analyzer::pointer_equiv_analyzer): Same. (pointer_equiv_analyzer::~pointer_equiv_analyzer): Same. (pointer_equiv_analyzer::set_global_equiv): Same. (pointer_equiv_analyzer::set_cond_equiv): Same. (pointer_equiv_analyzer::get_equiv): Same. (pointer_equiv_analyzer::enter): Same. (pointer_equiv_analyzer::leave): Same. (pointer_equiv_analyzer::get_equiv_expr): Same. (pta_valueize): Same. (pointer_equiv_analyzer::visit_stmt): Same. (pointer_equiv_analyzer::visit_edge): Same. (hybrid_folder::value_of_expr): Same. (hybrid_folder::value_on_edge): Same. * value-pointer-equiv.cc: New file. * value-pointer-equiv.h: New file. 2021-09-13 Richard Earnshaw PR target/102125 * gimple-fold.c (gimple_fold_builtin_memory_op): Allow folding memcpy if the size is not more than MOVE_MAX * MOVE_RATIO. 2021-09-13 Richard Earnshaw PR target/102125 * config/arm/arm.md (movmisaligndi): New define_expand. * config/arm/vec-common.md (movmisalign): Iterate over VDQ mode. 2021-09-13 Richard Earnshaw PR target/102125 * emit-rtl.c (gen_highpart): Use adjust_address to handle MEM rather than calling simplify_gen_subreg. 2021-09-13 Jan-Benedict Glaw * config/alpha/vms.h (INIT_CUMULATIVE_ARGS): Wrap multi-statment define into a block. 2021-09-13 Richard Biener * config/darwin.h (DARWIN_PREFER_DWARF): Do not define. * config/i386/darwin.h (PREFERRED_DEBUGGING_TYPE): Do not change based on DARWIN_PREFER_DWARF not being defined. 2021-09-13 Richard Biener * config/i386/lynx.h: Remove undef of PREFERRED_DEBUGGING_TYPE to inherit from elfos.h 2021-09-13 Richard Biener * config.gcc: Add cr16-*-* to the list of obsoleted targets. 2021-09-13 Richard Biener * config/avr/elf.h (PREFERRED_DEBUGGING_TYPE): Remove override, pick up DWARF2_DEBUG define from elfos.h 2021-09-13 Richard Biener * config/rx/rx.h (PREFERRED_DEBUGGING_TYPE): Always define to DWARF2_DEBUG. 2021-09-13 Richard Biener * config/alpha/vms.h (PREFERRED_DEBUGGING_TYPE): Define to DWARF2_DEBUG. 2021-09-13 Richard Biener * config/i386/cygming.h: Always default to DWARF2 debugging. Do not define DBX_DEBUGGING_INFO, that's done via dbxcoff.h already. * doc/install.texi: Document binutils 2.16 as minimum requirement for mingw. 2021-09-13 Kewen Lin * config/rs6000/rs6000.c (struct rs6000_cost_data): New members nstmts, nloads and extra_ctor_cost. (rs6000_density_test): Add load density related heuristics. Do extra costing on vector construction statements if need. (rs6000_init_cost): Init new members. (rs6000_update_target_cost_per_stmt): New function. (rs6000_add_stmt_cost): Factor vect_nonmem hunk out to function rs6000_update_target_cost_per_stmt and call it. 2021-09-13 Kewen Lin * config/rs6000/rs6000.c (struct rs6000_cost_data): Remove typedef. (rs6000_init_cost): Adjust. 2021-09-13 liuhongt * config/i386/i386.md: (UNSPEC_COPYSIGN): Remove. (UNSPEC_XORSIGN): Ditto. 2021-09-12 Roger Sayle * expr.c (convert_move): Preserve SUBREG_PROMOTED_VAR_P when creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P subreg. 2021-09-11 Aldy Hernandez * tree-ssa-threadbackward.c (class back_threader_registry): Use back_jt_path_registry. * tree-ssa-threadedge.c (jump_threader::jump_threader): Use fwd_jt_path_registry. * tree-ssa-threadedge.h (class jump_threader): Same.. * tree-ssa-threadupdate.c (jump_thread_path_registry::jump_thread_path_registry): Rename... (jt_path_registry::jt_path_registry): ...to this. (jump_thread_path_registry::~jump_thread_path_registry): Rename... (jt_path_registry::~jt_path_registry): ...this. (fwd_jt_path_registry::fwd_jt_path_registry): New. (fwd_jt_path_registry::~fwd_jt_path_registry): New. (jump_thread_path_registry::allocate_thread_edge): Rename... (jt_path_registry::allocate_thread_edge): ...to this. (jump_thread_path_registry::allocate_thread_path): Rename... (jt_path_registry::allocate_thread_path): ...to this. (jump_thread_path_registry::lookup_redirection_data): Rename... (fwd_jt_path_registry::lookup_redirection_data): ...to this. (jump_thread_path_registry::thread_block_1): Rename... (fwd_jt_path_registry::thread_block_1): ...to this. (jump_thread_path_registry::thread_block): Rename... (fwd_jt_path_registry::thread_block): ...to this. (jt_path_registry::thread_through_loop_header): Rename... (fwd_jt_path_registry::thread_through_loop_header): ...to this. (jump_thread_path_registry::mark_threaded_blocks): Rename... (fwd_jt_path_registry::mark_threaded_blocks): ...to this. (jump_thread_path_registry::debug_path): Rename... (jt_path_registry::debug_path): ...to this. (jump_thread_path_registry::dump): Rename... (jt_path_registry::debug): ...to this. (jump_thread_path_registry::rewire_first_differing_edge): Rename... (back_jt_path_registry::rewire_first_differing_edge): ...to this. (jump_thread_path_registry::adjust_paths_after_duplication): Rename... (back_jt_path_registry::adjust_paths_after_duplication): ...to this. (jump_thread_path_registry::duplicate_thread_path): Rename... (back_jt_path_registry::duplicate_thread_path): ...to this. Also, drop ill-formed candidates. (jump_thread_path_registry::remove_jump_threads_including): Rename... (fwd_jt_path_registry::remove_jump_threads_including): ...to this. (jt_path_registry::thread_through_all_blocks): New. (back_jt_path_registry::update_cfg): New. (fwd_jt_path_registry::update_cfg): New. (jump_thread_path_registry::register_jump_thread): Rename... (jt_path_registry::register_jump_thread): ...to this. * tree-ssa-threadupdate.h (class jump_thread_path_registry): Abstract to... (class jt_path_registry): ...here. (class fwd_jt_path_registry): New. (class back_jt_path_registry): New. 2021-09-10 liuhongt Revert: 2021-09-01 liuhongt * emit-rtl.c (validate_subreg): Get rid of all float-int special cases. 2021-09-10 Jakub Jelinek * tree-core.h (enum omp_memory_order): Add OMP_MEMORY_ORDER_MASK, OMP_FAIL_MEMORY_ORDER_UNSPECIFIED, OMP_FAIL_MEMORY_ORDER_RELAXED, OMP_FAIL_MEMORY_ORDER_ACQUIRE, OMP_FAIL_MEMORY_ORDER_RELEASE, OMP_FAIL_MEMORY_ORDER_ACQ_REL, OMP_FAIL_MEMORY_ORDER_SEQ_CST and OMP_FAIL_MEMORY_ORDER_MASK enumerators. (OMP_FAIL_MEMORY_ORDER_SHIFT): Define. * gimple-pretty-print.c (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Print [weak] for weak atomic load/store. * gimple.h (enum gf_mask): Change GF_OMP_ATOMIC_MEMORY_ORDER to 6-bit mask, adjust GF_OMP_ATOMIC_NEED_VALUE value and add GF_OMP_ATOMIC_WEAK. (gimple_omp_atomic_weak_p, gimple_omp_atomic_set_weak): New inline functions. * tree.h (OMP_ATOMIC_WEAK): Define. * tree-pretty-print.c (dump_omp_atomic_memory_order): Adjust for fail memory order being encoded in the same enum and also print fail clause if present. (dump_generic_node): Print weak clause if OMP_ATOMIC_WEAK. * gimplify.c (goa_stabilize_expr): Add target_expr and rhs arguments, handle pre_p == NULL case as a test mode that only returns value but doesn't change gimplify nor change anything otherwise, adjust recursive calls, add MODIFY_EXPR, ADDR_EXPR, COND_EXPR, TARGET_EXPR and CALL_EXPR handling, adjust COMPOUND_EXPR handling for __builtin_clear_padding calls, for !rhs gimplify as lvalue rather than rvalue. (gimplify_omp_atomic): Adjust goa_stabilize_expr caller. Handle COND_EXPR rhs. Set weak flag on gimple load/store for OMP_ATOMIC_WEAK. * omp-expand.c (omp_memory_order_to_fail_memmodel): New function. (omp_memory_order_to_memmodel): Adjust for fail clause encoded in the same enum. (expand_omp_atomic_cas): New function. (expand_omp_atomic_pipeline): Use omp_memory_order_to_fail_memmodel function. (expand_omp_atomic): Attempt to optimize atomic compare and exchange using expand_omp_atomic_cas. 2021-09-10 Aldy Hernandez Michael Matz * tree-pass.h (PROP_loop_opts_done): New. * gimple-range-path.cc (path_range_query::internal_range_of_expr): Intersect with global range. * tree-ssa-loop.c (tree_ssa_loop_done): Set PROP_loop_opts_done. * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Disable threading through latches until after loop optimizations have run. 2021-09-10 David Faust * doc/invoke.texi: Document BPF -mcpu, -mjmpext, -mjmp32 and -malu32 options. 2021-09-10 David Faust * config/bpf/bpf-opts.h (bpf_isa_version): New enum. * config/bpf/bpf-protos.h (bpf_expand_cbranch): New. * config/bpf/bpf.c (bpf_option_override): Handle -mcpu option. (bpf_expand_cbranch): New function. * config/bpf/bpf.md (AM mode iterator): Conditionalize support for SI mode. (zero_extendsidi2): Only use mov32 instruction if it is available. (SIM mode iterator): Conditionalize support for SI mode. (JM mode iterator): New. (cbranchdi4): Update name, use new JM iterator. Use bpf_expand_cbranch. (*branch_on_di): Update name, use new JM iterator. * config/bpf/bpf.opt: (mjmpext): New option. (malu32): Likewise. (mjmp32): Likewise. (mcpu): Likewise. (bpf_isa): New enum. 2021-09-10 David Faust * config/bpf/bpf.md (zero_extendhidi2): Add new output template for register-to-register extensions. (zero_extendqidi2): Likewise. 2021-09-10 Richard Biener PR middle-end/102273 * internal-fn.c (expand_DEFERRED_INIT): Always expand non-SSA vars. 2021-09-10 Richard Biener PR middle-end/102269 * gimplify.c (is_var_need_auto_init): Empty types do not need initialization. 2021-09-10 Richard Biener * configure.ac (--with-stabs): Remove. * configure: Regenerate. * doc/install.texi: Remove --with-stabs documentation. 2021-09-10 liuhongt * config/i386/avx512fp16intrin.h: (_mm512_cmp_ph_mask): New intrinsic. (_mm512_mask_cmp_ph_mask): Likewise. (_mm512_cmp_round_ph_mask): Likewise. (_mm512_mask_cmp_round_ph_mask): Likewise. (_mm_cmp_sh_mask): Likewise. (_mm_mask_cmp_sh_mask): Likewise. (_mm_cmp_round_sh_mask): Likewise. (_mm_mask_cmp_round_sh_mask): Likewise. (_mm_comieq_sh): Likewise. (_mm_comilt_sh): Likewise. (_mm_comile_sh): Likewise. (_mm_comigt_sh): Likewise. (_mm_comige_sh): Likewise. (_mm_comineq_sh): Likewise. (_mm_ucomieq_sh): Likewise. (_mm_ucomilt_sh): Likewise. (_mm_ucomile_sh): Likewise. (_mm_ucomigt_sh): Likewise. (_mm_ucomige_sh): Likewise. (_mm_ucomineq_sh): Likewise. (_mm_comi_round_sh): Likewise. (_mm_comi_sh): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_cmp_ph_mask): New intrinsic. (_mm_mask_cmp_ph_mask): Likewise. (_mm256_cmp_ph_mask): Likewise. (_mm256_mask_cmp_ph_mask): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Ditto. * config/i386/i386.md (ssevecmode): Add HF mode. (MODEFH): New mode iterator. * config/i386/sse.md (V48H_AVX512VL): New mode iterator to support HF vector modes. Ajdust corresponding description. (ssecmpintprefix): New. (VI12_AVX512VL): Adjust to support HF vector modes. (cmp_imm_predicate): Likewise. (_cmp3): Likewise. (avx512f_vmcmp3): Likewise. (avx512f_vmcmp3_mask): Likewise. (_comi): Likewise. 2021-09-10 liuhongt * config/i386/avx512fp16intrin.h: (_mm512_max_ph): New intrinsic. (_mm512_mask_max_ph): Likewise. (_mm512_maskz_max_ph): Likewise. (_mm512_min_ph): Likewise. (_mm512_mask_min_ph): Likewise. (_mm512_maskz_min_ph): Likewise. (_mm512_max_round_ph): Likewise. (_mm512_mask_max_round_ph): Likewise. (_mm512_maskz_max_round_ph): Likewise. (_mm512_min_round_ph): Likewise. (_mm512_mask_min_round_ph): Likewise. (_mm512_maskz_min_round_ph): Likewise. (_mm_max_sh): Likewise. (_mm_mask_max_sh): Likewise. (_mm_maskz_max_sh): Likewise. (_mm_min_sh): Likewise. (_mm_mask_min_sh): Likewise. (_mm_maskz_min_sh): Likewise. (_mm_max_round_sh): Likewise. (_mm_mask_max_round_sh): Likewise. (_mm_maskz_max_round_sh): Likewise. (_mm_min_round_sh): Likewise. (_mm_mask_min_round_sh): Likewise. (_mm_maskz_min_round_sh): Likewise. * config/i386/avx512fp16vlintrin.h (_mm_max_ph): New intrinsic. (_mm256_max_ph): Likewise. (_mm_mask_max_ph): Likewise. (_mm256_mask_max_ph): Likewise. (_mm_maskz_max_ph): Likewise. (_mm256_maskz_max_ph): Likewise. (_mm_min_ph): Likewise. (_mm256_min_ph): Likewise. (_mm_mask_min_ph): Likewise. (_mm256_mask_min_ph): Likewise. (_mm_maskz_min_ph): Likewise. (_mm256_maskz_min_ph): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. * config/i386/sse.md (3): Adjust to support HF vector modes. (*3): Likewise. (ieee_3): Likewise. (_vm3): Likewise. * config/i386/subst.md (round_saeonly_mode512bit_condition): Adjust for HF vector modes. 2021-09-10 Liu, Hongtao * config/i386/avx512fp16intrin.h (_mm_add_sh): New intrinsic. (_mm_mask_add_sh): Likewise. (_mm_maskz_add_sh): Likewise. (_mm_sub_sh): Likewise. (_mm_mask_sub_sh): Likewise. (_mm_maskz_sub_sh): Likewise. (_mm_mul_sh): Likewise. (_mm_mask_mul_sh): Likewise. (_mm_maskz_mul_sh): Likewise. (_mm_div_sh): Likewise. (_mm_mask_div_sh): Likewise. (_mm_maskz_div_sh): Likewise. (_mm_add_round_sh): Likewise. (_mm_mask_add_round_sh): Likewise. (_mm_maskz_add_round_sh): Likewise. (_mm_sub_round_sh): Likewise. (_mm_mask_sub_round_sh): Likewise. (_mm_maskz_sub_round_sh): Likewise. (_mm_mul_round_sh): Likewise. (_mm_mask_mul_round_sh): Likewise. (_mm_maskz_mul_round_sh): Likewise. (_mm_div_round_sh): Likewise. (_mm_mask_div_round_sh): Likewise. (_mm_maskz_div_round_sh): Likewise. * config/i386/i386-builtin-types.def: Add corresponding builtin types. * config/i386/i386-builtin.def: Add corresponding new builtins. * config/i386/i386-expand.c (ix86_expand_round_builtin): Handle new builtins. * config/i386/sse.md (VF_128): Change description. (_vm3): Adjust to support HF vector modes. (_vm3): Likewise. 2021-09-10 H.J. Lu * config/i386/i386-expand.c (ix86_avx256_split_vector_move_misalign): Handle V16HF mode. * config/i386/i386.c (ix86_preferred_simd_mode): Handle HF mode. * config/i386/sse.md (V_256H): New mode iterator. (avx_vextractf128): Use it. (VEC_INIT_MODE): Align vector HFmode condition to vector HImodes since there're no real HF instruction used. (VEC_INIT_HALF_MODE): Ditto. (VIHF): Ditto. (VIHF_AVX512BW): Ditto. (*vec_extracthf): Ditto. (VEC_EXTRACT_MODE): Ditto. 2021-09-10 Richard Biener PR target/102255 * config/dbx.h: Remove. * config/dbxcoff.h: Do not define PREFERRED_DEBUGGING_TYPE. * config/lynx.h: Likewise. 2021-09-10 liuhongt * config/i386/i386-expand.c (ix86_expand_copysign): Expand right into ANDNOT + AND + IOR, using paradoxical subregs. (ix86_split_copysign_const): Remove. (ix86_split_copysign_var): Ditto. * config/i386/i386-protos.h (ix86_split_copysign_const): Dotto. (ix86_split_copysign_var): Ditto. * config/i386/i386.md (@copysign3_const): Ditto. (@copysign3_var): Ditto. 2021-09-09 qing zhao * builtins.c (expand_builtin_memset): Make external visible. * builtins.h (expand_builtin_memset): Declare extern. * common.opt (ftrivial-auto-var-init=): New option. * doc/extend.texi: Document the uninitialized attribute. * doc/invoke.texi: Document -ftrivial-auto-var-init. * flag-types.h (enum auto_init_type): New enumerated type auto_init_type. * gimple-fold.c (clear_padding_type): Add one new parameter. (clear_padding_union): Likewise. (clear_padding_emit_loop): Likewise. (clear_type_padding_in_mask): Likewise. (gimple_fold_builtin_clear_padding): Handle this new parameter. * gimplify.c (gimple_add_init_for_auto_var): New function. (gimple_add_padding_init_for_auto_var): New function. (is_var_need_auto_init): New function. (gimplify_decl_expr): Add initialization to automatic variables per users' requests. (gimplify_call_expr): Add one new parameter for call to __builtin_clear_padding. (gimplify_init_constructor): Add padding initialization in the end. * internal-fn.c (INIT_PATTERN_VALUE): New macro. (expand_DEFERRED_INIT): New function. * internal-fn.def (DEFERRED_INIT): New internal function. * tree-cfg.c (verify_gimple_call): Verify calls to .DEFERRED_INIT. * tree-sra.c (generate_subtree_deferred_init): New function. (scan_function): Avoid setting cannot_scalarize_away_bitmap for calls to .DEFERRED_INIT. (sra_modify_deferred_init): New function. (sra_modify_function_body): Handle calls to DEFERRED_INIT specially. * tree-ssa-structalias.c (find_func_aliases_for_call): Likewise. * tree-ssa-uninit.c (warn_uninit): Handle calls to DEFERRED_INIT specially. (check_defs): Likewise. (warn_uninitialized_vars): Likewise. * tree-ssa.c (ssa_undefined_value_p): Likewise. * tree.c (build_common_builtin_nodes): Build tree node for BUILT_IN_CLEAR_PADDING when needed. 2021-09-09 Richard Biener * tree-ssa-loop-im.c (fill_always_executed_in_1): Walk into all subloops. 2021-09-09 Richard Biener * tree-ssa-loop-im.c (fill_always_executed_in_1): Integrate DOM walk from get_loop_body_in_dom_order using a worklist approach. 2021-09-09 liuhongt * config.gcc: Add avx512fp16vlintrin.h. * config/i386/avx512fp16intrin.h: (_mm512_add_ph): New intrinsic. (_mm512_mask_add_ph): Likewise. (_mm512_maskz_add_ph): Likewise. (_mm512_sub_ph): Likewise. (_mm512_mask_sub_ph): Likewise. (_mm512_maskz_sub_ph): Likewise. (_mm512_mul_ph): Likewise. (_mm512_mask_mul_ph): Likewise. (_mm512_maskz_mul_ph): Likewise. (_mm512_div_ph): Likewise. (_mm512_mask_div_ph): Likewise. (_mm512_maskz_div_ph): Likewise. (_mm512_add_round_ph): Likewise. (_mm512_mask_add_round_ph): Likewise. (_mm512_maskz_add_round_ph): Likewise. (_mm512_sub_round_ph): Likewise. (_mm512_mask_sub_round_ph): Likewise. (_mm512_maskz_sub_round_ph): Likewise. (_mm512_mul_round_ph): Likewise. (_mm512_mask_mul_round_ph): Likewise. (_mm512_maskz_mul_round_ph): Likewise. (_mm512_div_round_ph): Likewise. (_mm512_mask_div_round_ph): Likewise. (_mm512_maskz_div_round_ph): Likewise. * config/i386/avx512fp16vlintrin.h: New header. * config/i386/i386-builtin-types.def (V16HF, V8HF, V32HF): Add new builtin types. * config/i386/i386-builtin.def: Add corresponding builtins. * config/i386/i386-expand.c (ix86_expand_args_builtin): Handle new builtin types. (ix86_expand_round_builtin): Likewise. * config/i386/immintrin.h: Include avx512fp16vlintrin.h * config/i386/sse.md (VFH): New mode_iterator. (VF2H): Likewise. (avx512fmaskmode): Add HF vector modes. (avx512fmaskhalfmode): Likewise. (3): Adjust to for HF vector modes. (*3): Likewise. (mul3): Likewise. (*mul3): Likewise. (div3): Likewise. (_div3): Likewise. * config/i386/subst.md (SUBST_V): Add HF vector modes. (SUBST_A): Likewise. (round_mode512bit_condition): Adjust for V32HFmode. 2021-09-09 liuhongt PR target/101059 * config/i386/sse.md (reduc_plus_scal_): Split to .. (reduc_plus_scal_v4sf): .. this, New define_expand. (reduc_plus_scal_v2df): .. and this, New define_expand. 2021-09-09 liuhongt PR target/91103 * config/i386/sse.md (*vec_extract_valign): New define_insn. 2021-09-08 Jonathan Wakely PR c++/60318 * doc/trouble.texi (Copy Assignment): Fix description of behaviour and fix code in example. 2021-09-08 Segher Boessenkool PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): For ELFv2 use r11 instead of r12 for restoring CR. 2021-09-08 Jakub Jelinek liuhongt PR target/89984 * config/i386/i386.md (@xorsign3_1): Remove. * config/i386/i386-expand.c (ix86_expand_xorsign): Expand right away into AND with mask and XOR, using paradoxical subregs. (ix86_split_xorsign): Remove. * config/i386/i386-protos.h (ix86_split_xorsign): Remove. 2021-09-08 Di Zhao * tree-ssa-sccvn.c (vn_nary_op_insert_into): fix result compare 2021-09-08 Jakub Jelinek PR target/102224 * config/i386/i386.md (xorsign3): If operands[1] is equal to operands[2], emit abs2 instead. (@xorsign3_1): Add early-clobbers for output operand, enable first alternative even for avx, add another alternative with =&Yv <- 0, Yv, Yvm constraints. * config/i386/i386-expand.c (ix86_split_xorsign): If op0 is equal to op1, emit vpandn instead. 2021-09-08 liuhongt * config/i386/avx512fp16intrin.h (_mm_set_ph): New intrinsic. (_mm256_set_ph): Likewise. (_mm512_set_ph): Likewise. (_mm_setr_ph): Likewise. (_mm256_setr_ph): Likewise. (_mm512_setr_ph): Likewise. (_mm_set1_ph): Likewise. (_mm256_set1_ph): Likewise. (_mm512_set1_ph): Likewise. (_mm_setzero_ph): Likewise. (_mm256_setzero_ph): Likewise. (_mm512_setzero_ph): Likewise. (_mm_set_sh): Likewise. (_mm_load_sh): Likewise. (_mm_store_sh): Likewise. * config/i386/i386-builtin-types.def (V8HF): New type. (DEF_FUNCTION_TYPE (V8HF, V8HI)): New builtin function type * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): Support vector HFmodes. (ix86_expand_vector_init_one_nonzero): Likewise. (ix86_expand_vector_init_one_var): Likewise. (ix86_expand_vector_init_interleave): Likewise. (ix86_expand_vector_init_general): Likewise. (ix86_expand_vector_set): Likewise. (ix86_expand_vector_extract): Likewise. (ix86_expand_vector_init_concat): Likewise. (ix86_expand_sse_movcc): Handle vector HFmodes. (ix86_expand_vector_set_var): Ditto. * config/i386/i386-modes.def: Add HF vector modes in comment. * config/i386/i386.c (classify_argument): Add HF vector modes. (ix86_hard_regno_mode_ok): Allow HF vector modes for AVX512FP16. (ix86_vector_mode_supported_p): Likewise. (ix86_set_reg_reg_cost): Handle vector HFmode. (ix86_get_ssemov): Handle vector HFmode. (function_arg_advance_64): Pass unamed V16HFmode and V32HFmode by stack. (function_arg_advance_32): Pass V8HF/V16HF/V32HF by sse reg for 32bit mode. (function_arg_advance_32): Ditto. * config/i386/i386.h (VALID_AVX512FP16_REG_MODE): New. (VALID_AVX256_REG_OR_OI_MODE): Rename to .. (VALID_AVX256_REG_OR_OI_VHF_MODE): .. this, and add V16HF. (VALID_SSE2_REG_VHF_MODE): New. (VALID_AVX512VL_128_REG_MODE): Add V8HF and TImode. (SSE_REG_MODE_P): Add vector HFmode. * config/i386/i386.md (mode): Add HF vector modes. (MODE_SIZE): Likewise. (ssemodesuffix): Add ph suffix for HF vector modes. * config/i386/sse.md (VFH_128): New mode iterator. (VMOVE): Adjust for HF vector modes. (V): Likewise. (V_256_512): Likewise. (avx512): Likewise. (avx512fmaskmode): Likewise. (shuffletype): Likewise. (sseinsnmode): Likewise. (ssedoublevecmode): Likewise. (ssehalfvecmode): Likewise. (ssehalfvecmodelower): Likewise. (ssePScmode): Likewise. (ssescalarmode): Likewise. (ssescalarmodelower): Likewise. (sseintprefix): Likewise. (i128): Likewise. (bcstscalarsuff): Likewise. (xtg_mode): Likewise. (VI12HF_AVX512VL): New mode_iterator. (VF_AVX512FP16): Likewise. (VIHF): Likewise. (VIHF_256): Likewise. (VIHF_AVX512BW): Likewise. (V16_256): Likewise. (V32_512): Likewise. (sseintmodesuffix): New mode_attr. (sse): Add scalar and vector HFmodes. (ssescalarmode): Add vector HFmode mapping. (ssescalarmodesuffix): Add sh suffix for HFmode. (*_vm3): Use VFH_128. (*_vm3): Likewise. (*ieee_3): Likewise. (_blendm): New define_insn. (vec_setv8hf): New define_expand. (vec_set_0): New define_insn for HF vector set. (*avx512fp16_movsh): Likewise. (avx512fp16_movsh): Likewise. (vec_extract_lo_v32hi): Rename to ... (vec_extract_lo_): ... this, and adjust to allow HF vector modes. (vec_extract_hi_v32hi): Likewise. (vec_extract_hi_): Likewise. (vec_extract_lo_v16hi): Likewise. (vec_extract_lo_): Likewise. (vec_extract_hi_v16hi): Likewise. (vec_extract_hi_): Likewise. (vec_set_hi_v16hi): Likewise. (vec_set_hi_): Likewise. (vec_set_lo_v16hi): Likewise. (vec_set_lo_): Likewise. (*vec_extract_0): New define_insn_and_split for HF vector extract. (*vec_extracthf): New define_insn. (VEC_EXTRACT_MODE): Add HF vector modes. (PINSR_MODE): Add V8HF. (sse2p4_1): Likewise. (pinsr_evex_isa): Likewise. (_pinsr): Adjust to support insert for V8HFmode. (pbroadcast_evex_isa): Add HF vector modes. (AVX2_VEC_DUP_MODE): Likewise. (VEC_INIT_MODE): Likewise. (VEC_INIT_HALF_MODE): Likewise. (avx2_pbroadcast): Adjust to support HF vector mode broadcast. (avx2_pbroadcast_1): Likewise. (_vec_dup_1): Likewise. (_vec_dup): Likewise. (_vec_dup_gpr): Likewise. 2021-09-08 Guo, Xuepeng H.J. Lu Liu Hongtao Wang Hongyu Xu Dianhong * common/config/i386/cpuinfo.h (get_available_features): Detect FEATURE_AVX512FP16. * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512FP16_SET, OPTION_MASK_ISA_AVX512FP16_UNSET, OPTION_MASK_ISA2_AVX512FP16_SET, OPTION_MASK_ISA2_AVX512FP16_UNSET): New. (OPTION_MASK_ISA2_AVX512BW_UNSET, OPTION_MASK_ISA2_AVX512BF16_UNSET): Add AVX512FP16. (ix86_handle_option): Handle -mavx512fp16. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVX512FP16. * common/config/i386/i386-isas.h: Add entry for AVX512FP16. * config.gcc: Add avx512fp16intrin.h. * config/i386/avx512fp16intrin.h: New intrinsic header. * config/i386/cpuid.h: Add bit_AVX512FP16. * config/i386/i386-builtin-types.def: (FLOAT16): New primitive type. * config/i386/i386-builtins.c: Support _Float16 type for i386 backend. (ix86_register_float16_builtin_type): New function. (ix86_float16_type_node): New. * config/i386/i386-c.c (ix86_target_macros_internal): Define __AVX512FP16__. * config/i386/i386-expand.c (ix86_expand_branch): Support HFmode. (ix86_prepare_fp_compare_args): Adjust TARGET_SSE_MATH && SSE_FLOAT_MODE_P to SSE_FLOAT_MODE_SSEMATH_OR_HF_P. (ix86_expand_fp_movcc): Ditto. * config/i386/i386-isa.def: Add PTA define for AVX512FP16. * config/i386/i386-options.c (isa2_opts): Add -mavx512fp16. (ix86_valid_target_attribute_inner_p): Add avx512fp16 attribute. * config/i386/i386.c (ix86_get_ssemov): Use vmovdqu16/vmovw/vmovsh for HFmode/HImode scalar or vector. (ix86_get_excess_precision): Use FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when TARGET_AVX512FP16 existed. (sse_store_index): Use SFmode cost for HFmode cost. (inline_memory_move_cost): Add HFmode, and perfer SSE cost over GPR cost for HFmode. (ix86_hard_regno_mode_ok): Allow HImode in sse register. (ix86_mangle_type): Add manlging for _Float16 type. (inline_secondary_memory_needed): No memory is needed for 16bit movement between gpr and sse reg under TARGET_AVX512FP16. (ix86_multiplication_cost): Adjust TARGET_SSE_MATH && SSE_FLOAT_MODE_P to SSE_FLOAT_MODE_SSEMATH_OR_HF_P. (ix86_division_cost): Ditto. (ix86_rtx_costs): Ditto. (ix86_add_stmt_cost): Ditto. (ix86_optab_supported_p): Ditto. * config/i386/i386.h (VALID_AVX512F_SCALAR_MODE): Add HFmode. (SSE_FLOAT_MODE_SSEMATH_OR_HF_P): Add HFmode. (PTA_SAPPHIRERAPIDS): Add PTA_AVX512FP16. * config/i386/i386.md (mode): Add HFmode. (MODE_SIZE): Add HFmode. (isa): Add avx512fp16. (enabled): Handle avx512fp16. (ssemodesuffix): Add sh suffix for HFmode. (comm): Add mult, div. (plusminusmultdiv): New code iterator. (insn): Add mult, div. (*movhf_internal): Adjust for avx512fp16 instruction. (*movhi_internal): Ditto. (*cmpihf): New define_insn for HFmode. (*ieee_shf3): Likewise. (extendhf2): Likewise. (trunchf2): Likewise. (floathf2): Likewise. (*hf): Likewise. (cbranchhf4): New expander. (movhfcc): Likewise. (hf3): Likewise. (mulhf3): Likewise. (divhf3): Likewise. * config/i386/i386.opt: Add mavx512fp16. * config/i386/immintrin.h: Include avx512fp16intrin.h. * doc/invoke.texi: Add mavx512fp16. * doc/extend.texi: Add avx512fp16 Usage Notes. 2021-09-08 liuhongt * common.opt: Support -fexcess-precision=16. * config/aarch64/aarch64.c (aarch64_excess_precision): Return FLT_EVAL_METHOD_PROMOTE_TO_FLOAT16 when EXCESS_PRECISION_TYPE_FLOAT16. * config/arm/arm.c (arm_excess_precision): Ditto. * config/i386/i386.c (ix86_get_excess_precision): Ditto. * config/m68k/m68k.c (m68k_excess_precision): Issue an error when EXCESS_PRECISION_TYPE_FLOAT16. * config/s390/s390.c (s390_excess_precision): Ditto. * coretypes.h (enum excess_precision_type): Add EXCESS_PRECISION_TYPE_FLOAT16. * doc/tm.texi (TARGET_C_EXCESS_PRECISION): Update documents. * doc/tm.texi.in (TARGET_C_EXCESS_PRECISION): Ditto. * doc/extend.texi (Half-Precision): Document -fexcess-precision=16. * flag-types.h (enum excess_precision): Add EXCESS_PRECISION_FLOAT16. * target.def (excess_precision): Update document. * tree.c (excess_precision_type): Set excess_precision_type to EXCESS_PRECISION_FLOAT16 when -fexcess-precision=16. 2021-09-08 liuhongt * doc/extend.texi: (@node Floating Types): Adjust the wording. (@node Half-Precision): Ditto. 2021-09-07 Takayuki 'January June' Suwa PR target/102115 * config/xtensa/xtensa.c (xtensa_emit_move_sequence): Add 'CONST_INT_P (src)' to the condition of the block that tries to eliminate literal when loading integer contant. 2021-09-07 David Faust * doc/extend.texi (BPF Type Attributes) New node. Document new preserve_access_index attribute. Document new preserve_access_index builtin. * doc/invoke.texi: Document -mco-re and -mno-co-re options. 2021-09-07 David Faust * config/bpf/bpf.c: Adjust includes. (bpf_handle_preserve_access_index_attribute): New function. (bpf_attribute_table): Use it here. (bpf_builtins): Add BPF_BUILTIN_PRESERVE_ACCESS_INDEX. (bpf_option_override): Handle "-mco-re" option. (bpf_asm_init_sections): New. (TARGET_ASM_INIT_SECTIONS): Redefine. (bpf_file_end): New. (TARGET_ASM_FILE_END): Redefine. (bpf_init_builtins): Add "__builtin_preserve_access_index". (bpf_core_compute, bpf_core_get_index): New. (is_attr_preserve_access): New. (bpf_expand_builtin): Handle new builtins. (bpf_core_newdecl, bpf_core_is_maybe_aggregate_access): New. (bpf_core_walk): New. (bpf_resolve_overloaded_builtin): New. (TARGET_RESOLVE_OVERLOADED_BUILTIN): Redefine. (handle_attr): New. (pass_bpf_core_attr): New RTL pass. * config/bpf/bpf-passes.def: New file. * config/bpf/bpf-protos.h (make_pass_bpf_core_attr): New. * config/bpf/coreout.c: New file. * config/bpf/coreout.h: Likewise. * config/bpf/t-bpf (TM_H): Add $(srcdir)/config/bpf/coreout.h. (coreout.o): New rule. (PASSES_EXTRA): Add $(srcdir)/config/bpf/bpf-passes.def. * config.gcc (bpf): Add coreout.h to extra_headers. Add coreout.o to extra_objs. Add $(srcdir)/config/bpf/coreout.c to target_gtfiles. 2021-09-07 David Faust * btfout.c (get_btf_id): Function is no longer static. * ctfc.h: Expose it here. 2021-09-07 David Faust * ctfc.c (ctf_lookup_tree_type): New function. * ctfc.h: Likewise. 2021-09-07 David Faust * ctfc.c (ctf_dtd_lookup): Function is no longer static. * ctfc.h: Analogous change. 2021-09-07 David Faust * dwarf2out.c (lookup_type_die): Function is no longer static. * dwarf2out.h: Expose it here. 2021-09-07 Indu Bhagat * dwarf2ctf.c (ctf_debug_finalize): Make it static. (ctf_debug_early_finish): New definition. (ctf_debug_finish): Likewise. * dwarf2ctf.h (ctf_debug_finalize): Remove declaration. (ctf_debug_early_finish): New declaration. (ctf_debug_finish): Likewise. * dwarf2out.c (dwarf2out_finish): Invoke ctf_debug_finish. (dwarf2out_early_finish): Invoke ctf_debug_early_finish. 2021-09-07 Indu Bhagat * config/bpf/bpf.c (bpf_option_override): For BPF backend, disable LTO support when compiling for CO-RE. * config/bpf/bpf.opt: Add new command line option -mco-re. 2021-09-07 Indu Bhagat * flag-types.h (enum debug_info_type): Add new enum DINFO_TYPE_BTF_WITH_CORE. (BTF_WITH_CORE_DEBUG): New bitmask. * flags.h (btf_with_core_debuginfo_p): New declaration. * opts.c (btf_with_core_debuginfo_p): New definition. 2021-09-07 Jason Merrill * tree.h (error_operand_p): Change to inline function. 2021-09-07 Aldy Hernandez * tree-ssa-threadedge.c (forwarder_block_p): Rename to... (empty_block_with_phis_p): ...this. (potentially_threadable_block): Same. (jump_threader::thread_through_normal_block): Same. 2021-09-07 Eric Botcazou PR debug/101947 * dwarf2out.c (mark_base_types): New overloaded function. (dwarf2out_early_finish): Invoke it on the COMDAT type list as well as the compilation unit, and call move_marked_base_types afterward. 2021-09-07 H.J. Lu PR target/85819 * config/i386/i386-expand.c (ix86_expand_convert_uns_sisf_sse): Enable FMA. (ix86_expand_vector_convert_uns_vsivsf): Likewise. 2021-09-07 Richard Biener PR tree-optimization/102226 * tree-vect-loop.c (vect_transform_cycle_phi): Record the converted value for the epilogue PHI use. 2021-09-07 Martin Liska PR gcov-profile/80223 * ipa-inline.c (can_inline_edge_p): Similarly to sanitizer options, do not inline when no_profile_instrument_function attributes are different in early inliner. It's fine to inline it after PGO instrumentation. 2021-09-07 Richard Biener PR tree-optimization/101555 * tree-ssa-pre.c (translate_vuse_through_block): Do not perform an alias walk to determine the validity of the mem at the start of the block which is already guaranteed by means of prune_clobbered_mems. (phi_translate_1): Pass edge to translate_vuse_through_block. 2021-09-07 Xionghu Luo PR target/97142 * config/rs6000/rs6000.md (fmod3): New define_expand. (remainder3): Likewise. 2021-09-07 YunQiang Su * config/mips/mips.c (mips_file_start): add .module for arch and ase. 2021-09-06 Roger Sayle * wide-int.cc (wi::clz): Reorder tests to ensure the result is zero for all negative values. 2021-09-06 Tobias Burnus * doc/invoke.texi (-foffload-options): Fix @opindex. 2021-09-06 H.J. Lu PR target/89984 * config/i386/i386-expand.c (ix86_split_xorsign): Use operands[2]. * config/i386/i386.md (@xorsign3_1): Add non-destructive source alternative for AVX. 2021-09-06 liuhongt PR middle-end/102182 * optabs.c (expand_fix): Add from1 to avoid from being overwritten. 2021-09-06 Eric Botcazou * dwarf2out.c (modified_type_die): Deal with all array types earlier and use local variable consistently throughout the function. 2021-09-06 Jakub Jelinek PR tree-optimization/102207 * match.pd: Don't demote operands of IFN_{ADD,SUB,MUL}_OVERFLOW if they were promoted from signed to wider unsigned type. 2021-09-06 Andrew Pinski PR tree-optimization/63184 * match.pd: Add simplification of pointer_diff of two pointer_plus with addr_expr in the first operand of each pointer_plus. Add simplificatoin of ne/eq of two pointer_plus with addr_expr in the first operand of each pointer_plus. 2021-09-06 Richard Biener PR tree-optimization/102176 * tree-vect-slp.c (vect_slp_gather_vectorized_scalar_stmts): New function. (vect_bb_slp_scalar_cost): Use the computed set of vectorized scalar stmts instead of relying on the out-of-date and not accurate PURE_SLP_STMT. (vect_bb_vectorization_profitable_p): Compute the set of vectorized scalar stmts. 2021-09-05 Aldy Hernandez * gimple-range-path.cc (path_range_query::range_of_stmt): Remove GIMPLE_COND special casing. (path_range_query::range_defined_in_block): Use range_of_stmt instead of calling fold_range directly. 2021-09-05 Aldy Hernandez * gimple-range-path.cc (path_range_query::range_of_expr): Set m_undefined_path when appropriate. (path_range_query::internal_range_of_expr): Copy from range_of_expr. (path_range_query::unreachable_path_p): New. (path_range_query::precompute_ranges): Set m_undefined_path. * gimple-range-path.h (path_range_query::unreachable_path_p): New. (path_range_query::internal_range_of_expr): New. * tree-ssa-threadbackward.c (back_threader::find_taken_edge_cond): Use unreachable_path_p. 2021-09-05 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::maybe_register_path): Remove argument and call find_taken_edge. (back_threader::resolve_phi): Do not calculate taken edge before calling maybe_register_path. (back_threader::find_paths_to_names): Same. 2021-09-05 Jeff Law * config/h8300/h8300.md (QHSI2 mode iterator): New mode iterator. * config/h8300/testcompare.md (store_c): Update name, use new QHSI2 iterator. (store_neg_c, store_shifted_c): New patterns. 2021-09-03 Segher Boessenkool PR target/102107 * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): On ELFv2 use r11 instead of r12 for CR save, in all cases. 2021-09-03 Andrew Pinski * config/aarch64/aarch64-sve-builtins.cc (register_vector_type): Handle error_mark_node as the type of the type_decl. 2021-09-03 Andrew Pinski * config/aarch64/aarch64-builtins.c (struct aarch64_simd_type_info): Mark with GTY. (aarch64_simd_types): Likewise. (aarch64_simd_intOI_type_node): Likewise. (aarch64_simd_intCI_type_node): Likewise. (aarch64_simd_intXI_type_node): Likewise. * config/aarch64/aarch64.h (aarch64_fp16_type_node): Likewise. (aarch64_fp16_ptr_type_node): Likewise. (aarch64_bf16_type_node): Likewise. (aarch64_bf16_ptr_type_node): Likewise. 2021-09-03 Aldy Hernandez * range-op.cc (operator_minus::op1_op2_relation_effect): Abstract out to... (minus_op1_op2_relation_effect): ...here. (class operator_pointer_diff): New. (operator_pointer_diff::op1_op2_relation_effect): Call minus_op1_op2_relation_effect. (integral_table::integral_table): Add entry for POINTER_DIFF_EXPR. 2021-09-03 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::thread_through_all_blocks): Add may_peel_loop_headers. (back_threader_registry::thread_through_all_blocks): Same. (try_thread_blocks): Pass may_peel_loop_headers argument. (pass_early_thread_jumps::execute): Same. 2021-09-03 Aldy Hernandez * tree-ssa-threadedge.c (has_phis_p): New. (forwarder_block_p): New. (potentially_threadable_block): Call forwarder_block_p. (jump_threader::thread_around_empty_blocks): Call has_phis_p. (jump_threader::thread_through_normal_block): Call forwarder_block_p. 2021-09-03 Aldy Hernandez * tree-ssa-threadbackward.c (back_threader::dump): New. (back_threader::debug): New. (back_threader_profitability::profitable_path_p): Dump blocks even if we are bailing early. 2021-09-03 Aldy Hernandez * tree-ssa-threadupdate.c (cancel_thread): New. (jump_thread_path_registry::thread_block_1): Use cancel_thread. (jump_thread_path_registry::mark_threaded_blocks): Same. (jump_thread_path_registry::register_jump_thread): Same. 2021-09-03 Aldy Hernandez * tree-ssa-threadedge.c (jt_state::push): Only call methods for which objects are available. (jt_state::pop): Same. (jt_state::register_equiv): Same. (jt_state::register_equivs_on_edge): Same. 2021-09-03 Aldy Hernandez * tree-ssa-threadedge.c (jump_threader::thread_across_edge): Move pop until after a thread is registered. 2021-09-03 Aldy Hernandez * tree-ssa-threadupdate.c (debug): New. 2021-09-03 Aldy Hernandez * gimple-range-trace.cc (push_dump_file::push_dump_file): New. (push_dump_file::~push_dump_file): New. (dump_ranger): Change dump_file temporarily while dumping ranger. * gimple-range-trace.h (class push_dump_file): New. 2021-09-03 Aldy Hernandez * gimple-range-trace.cc (debug_seed_ranger): Remove static. (dump_ranger): Dump function name. 2021-09-03 Aldy Hernandez * gimple-range-path.cc (path_range_query::range_defined_in_block): Adjust for non-null. (path_range_query::adjust_for_non_null_uses): New. (path_range_query::precompute_ranges): Call adjust_for_non_null_uses. * gimple-range-path.h: Add m_non_null and adjust_for_non_null_uses. 2021-09-03 Aldy Hernandez * gimple-range-path.cc (path_range_query::dump): Dump path length. (path_range_query::precompute_ranges): Dump entire path. 2021-09-03 Aldy Hernandez * value-relation.cc (relation_oracle::debug): New. * value-relation.h (relation_oracle::debug): New. 2021-09-03 Aldy Hernandez * tree-ssa-loop-ch.c: Remove unnecessary include file. 2021-09-03 Aldy Hernandez * gimple-range-fold.cc (fold_using_range::postfold_gcond_edges): Skip statements with no defining BB. * gimple-range-path.cc (path_range_query::range_defined_in_block): Do not get confused by statements with no defining BB. 2021-09-03 Aldy Hernandez * gimple-range-fold.cc (adjust_imagpart_expr): Move from gimple_range_adjustment. Add support for constants. (adjust_realpart_expr): New. (gimple_range_adjustment): Move IMAGPART_EXPR code to adjust_imagpart_expr. * range-op.cc (integral_table::integral_table): Add entry for REALPART_CST. 2021-09-03 Jakub Jelinek * omp-expand.c (expand_omp_atomic_pipeline): Use IFN_ATOMIC_COMPARE_EXCHANGE instead of BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_? so that memory order can be provided. 2021-09-03 Jakub Jelinek PR target/102024 * tree.h (DECL_FIELD_ABI_IGNORED): Changed into rvalue only macro that is false if DECL_BIT_FIELD. (SET_DECL_FIELD_ABI_IGNORED, DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD, SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD): Define. * tree-streamer-out.c (pack_ts_decl_common_value_fields): For DECL_BIT_FIELD stream DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead of DECL_FIELD_ABI_IGNORED. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Use SET_DECL_FIELD_ABI_IGNORED instead of writing to DECL_FIELD_ABI_IGNORED and for DECL_BIT_FIELD use SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead. * lto-streamer-out.c (hash_tree): For DECL_BIT_FIELD hash DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD instead of DECL_FIELD_ABI_IGNORED. 2021-09-03 liuhongt PR target/102166 * config/i386/amxbf16intrin.h : Remove macro check for __AMX_BF16__. * config/i386/amxint8intrin.h : Remove macro check for __AMX_INT8__. * config/i386/amxtileintrin.h : Remove macro check for __AMX_TILE__. 2021-09-02 Martin Sebor PR tree-optimization/17506 PR testsuite/37182 * tree-ssa-uninit.c (warn_uninit): Remove conditional guarding note. 2021-09-02 Richard Biener * tree-ssa-loop-im.c (fill_always_executed_in_1): Refine fix for PR78185 and continue processing when leaving finite inner loops. 2021-09-02 Jakub Jelinek PR tree-optimization/99591 * match.pd: Demote operands of IFN_{ADD,SUB,MUL}_OVERFLOW if they were promoted. 2021-09-02 Richard Biener Revert: 2021-09-02 Richard Biener PR tree-optimization/102155 * tree-ssa-loop-im.c (fill_always_executed_in_1): Iterate over a part of the RPO array and do not recurse here. Dump blocks marked as always executed. (fill_always_executed_in): Walk over the RPO array and process loops whose header we run into. (loop_invariant_motion_in_fun): Compute the first RPO using rev_post_order_and_mark_dfs_back_seme in iteration order and pass that to fill_always_executed_in. 2021-09-02 liuhongt * config/i386/i386-modes.def (FLOAT_MODE): Define ieee HFmode. * config/i386/i386.c (enum x86_64_reg_class): Add X86_64_SSEHF_CLASS. (merge_classes): Handle X86_64_SSEHF_CLASS. (examine_argument): Ditto. (construct_container): Ditto. (classify_argument): Ditto, and set HFmode/HCmode to X86_64_SSEHF_CLASS. (function_value_32): Return _FLoat16/Complex Float16 by %xmm0. (function_value_64): Return _Float16/Complex Float16 by SSE register. (ix86_print_operand): Handle CONST_DOUBLE HFmode. (ix86_secondary_reload): Require gpr as intermediate register to store _Float16 from sse register when sse4 is not available. (ix86_libgcc_floating_mode_supported_p): Enable _FLoat16 under sse2. (ix86_scalar_mode_supported_p): Ditto. (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Defined. * config/i386/i386.h (VALID_SSE2_REG_MODE): Add HFmode. (VALID_INT_MODE_P): Add HFmode and HCmode. * config/i386/i386.md (*pushhf_rex64): New define_insn. (*pushhf): Ditto. (*movhf_internal): Ditto. * doc/extend.texi (Half-Precision Floating Point): Documemt _Float16 for x86. 2021-09-02 Richard Biener PR tree-optimization/102155 * tree-ssa-loop-im.c (fill_always_executed_in_1): Iterate over a part of the RPO array and do not recurse here. Dump blocks marked as always executed. (fill_always_executed_in): Walk over the RPO array and process loops whose header we run into. (loop_invariant_motion_in_fun): Compute the first RPO using rev_post_order_and_mark_dfs_back_seme in iteration order and pass that to fill_always_executed_in. 2021-09-02 YunQiang Su Revert: 2021-08-31 YunQiang Su * config/mips/mips.c (mips_module_isa_name): New. mips_file_start: add .module mipsREV to all asm output 2021-09-01 Jeff Law PR tree-optimization/102152 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Reduce a vector comparison to a scalar comparison before calling update_stmt_if_modified. 2021-09-01 Andrew Pinski PR target/101934 * config/aarch64/aarch64.c (aarch64_expand_setmem): Check STRICT_ALIGNMENT before creating an overlapping store. 2021-09-01 Martin Sebor * gimple-ssa-warn-access.cc (get_size_range): Add argument. (check_access): Pass additional argument. (check_memop_access): Remove template and make a member function. (maybe_check_dealloc_call): Make a pass_waccess member function. (class pass_waccess): Add, rename, and remove members. (pass_waccess::pass_waccess): Adjust to name change. (pass_waccess::~pass_waccess): Same. (check_alloca): Make a member function. (check_alloc_size_call): Same. (check_strcat): Same. (check_strncat): Same. (check_stxcpy): Same. (check_stxncpy): Same. (check_strncmp): Same. (maybe_warn_rdwr_sizes): Rename... (pass_waccess::maybe_check_access_sizes): ...to this. (pass_waccess::check_call): Adjust to name changes. (pass_waccess::maybe_check_dealloc_call): Make a pass_waccess member function. (pass_waccess::execute): Adjust to name changes. * gimple-ssa-warn-access.h (check_memop_access): Remove. * pointer-query.cc (access_ref::phi): Handle null pointer. (access_ref::inform_access): Same. (pointer_query::put_ref): Modify a cached value, not a copy of it. (pointer_query::dump): New function. (compute_objsize_r): Avoid overwriting access_ref::bndrng. Cache more results. * pointer-query.h (pointer_query::dump): Declare. * tree-ssa-strlen.c (get_range): Simplify. Use function query. (dump_strlen_info): Use function query. (printf_strlen_execute): Factor code out into pointer_query::put_ref. 2021-09-01 Thomas Schwinge * tree.c (walk_tree_1) : Simplify. 2021-09-01 Iain Sandoe * doc/extend.texi: Document unavailable attribute. * print-tree.c (print_node): Handle unavailable attribute. * tree-core.h (struct tree_base): Add a bit to carry unavailability. * tree.c (error_unavailable_use): New. * tree.h (TREE_UNAVAILABLE): New. (error_unavailable_use): New. 2021-09-01 Jakub Jelinek PR tree-optimization/102124 * tree-vect-patterns.c (vect_recog_widen_op_pattern): For ORIG_CODE MINUS_EXPR, if itype is unsigned with smaller precision than type, add an extra cast to signed variant of itype to ensure sign-extension. 2021-09-01 Martin Liska * graph.c (draw_cfg_node_succ_edges): Do not color fallthru edges and rather use colors for TRUE and FALSE edges. 2021-09-01 Richard Biener PR tree-optimization/93491 * tree-ssa-pre.c (compute_avail): Set BB_MAY_NOTRETURN after processing the stmt itself. Do not consider pure functions possibly not returning. Properly avoid adding possibly trapping calls to EXP_GEN when there's a preceeding possibly not returning call. * tree-ssa-sccvn.c (vn_reference_may_trap): Conservatively not handle calls. 2021-09-01 Richard Biener PR tree-optimization/102139 * tree-vectorizer.h (vec_base_alignments): Adjust hash-map type to record a std::pair of the stmt-info and the innermost loop behavior. (dr_vec_info::group): New member. * tree-vect-data-refs.c (vect_record_base_alignment): Adjust. (vect_compute_data_ref_alignment): Verify the recorded base alignment can be used. (data_ref_pair): Remove. (dr_group_sort_cmp): Adjust. (vect_analyze_data_ref_accesses): Store the group-ID in the dr_vec_info and operate on a vector of dr_vec_infos. 2021-09-01 YunQiang Su * read-md.c (md_reader::handle_enum): support value assignation. * doc/md.texi: record define_c_enum value assignation support. 2021-09-01 Jakub Jelinek PR tree-optimization/102141 * gimple-ssa-store-merging.c (bswap_view_convert): Add BEFORE argument. If false, emit stmts after gsi instead of before, and with GSI_NEW_STMT. (bswap_replace): Adjust callers. When converting output of bswap, emit VIEW_CONVERT prepratation stmts after a copy of gsi instead of before it. 2021-09-01 liuhongt * emit-rtl.c (validate_subreg): Get rid of all float-int special cases. 2021-09-01 liuhongt Revert: 2021-08-30 liuhongt * expmed.c (extract_bit_field_1): Make sure we're playing with integral modes before call extract_integral_bit_field. (extract_integral_bit_field): Add a parameter of type scalar_int_mode which corresponds to of tmode. And call extract_and_convert_fixed_bit_field instead of extract_fixed_bit_field and convert_extracted_bit_field. (extract_and_convert_fixed_bit_field): New function, it's a combination of extract_fixed_bit_field and convert_extracted_bit_field. 2021-08-31 Thomas Schwinge * tree.c (walk_tree_1) : Handle three operands. 2021-08-31 Thomas Schwinge * omp-general.h (omp_is_reference): Rename to... (omp_privatize_by_reference): ... this. Adjust all users... * omp-general.c: ... here, ... * gimplify.c: ... here, ... * omp-expand.c: ... here, ... * omp-low.c: ... here. 2021-08-31 Martin Sebor * gimple-ssa-warn-access.cc (maybe_warn_alloc_args_overflow): Test pointer element for equality to zero, not that of the cotaining array. 2021-08-31 Martin Sebor * gcc-rich-location.h (gcc_rich_location): Make ctor explicit. 2021-08-31 Martin Sebor * function.h (function): Add comments. (get_range_query): Same. Add attribute returns nonnull. 2021-08-31 Roger Sayle * expr.c (convert_modes): Don't use subreg_promoted_mode on a SUBREG if it can't be guaranteed to a SUBREG_PROMOTED_VAR_P set. Instead use the standard (safer) is_a idiom. 2021-08-31 Jeff Law * config.gcc (cris-*-elf, cris-*-none): Remove dbxelf.h from tm_file. (m32r-*-elf, m32rle-*-elf, m32r-*-linux): Likewise. (mn10300-*-*, am33_2.0-*-linux*): Likewise. (xtensa*-*-elf, xtensa*-*-linux, xtensa*-*-uclinux): Likewise. (m32c-*-elf*, m32c-*-rtems*): Likewise. * config/cris/cris.h (DBX_NO_XREFS): Remove. (DBX_CONTIN_LENGTH, DBX_CONTIN_CHAR): Likewise. * config/m32r/m32r.h (DBXOUT_SOURCE_LINE): Likewise. (DBX_DEBUGGING_INFO, DBX_CONTIN_LENGTH): Likewise. * config/mn10300/mn10300.h (DEFAULT_GDB_EXTENSIONS): Likewise. * config/mn10300/linux.h (DBX_REGISTER_NAMES): Likewise. 2021-08-31 Marcel Vollweiler * gimplify.c (gimplify_scan_omp_clauses): Error handling. 'ancestor' only allowed on target constructs and only with particular other clauses. * omp-expand.c (expand_omp_target): Output of 'sorry, not supported' if 'ancestor' is used. * omp-low.c (check_omp_nesting_restrictions): Error handling. No nested OpenMP structs when 'ancestor' is used. (scan_omp_1_stmt): No usage of OpenMP runtime routines in a target region when 'ancestor' is used. * tree-pretty-print.c (dump_omp_clause): Append 'ancestor'. * tree.h (OMP_CLAUSE_DEVICE_ANCESTOR): Define macro. 2021-08-31 Roger Sayle * expr.c (convert_modes): Preserve SUBREG_PROMOTED_VAR_P when creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P subreg. * simplify-rtx.c (simplify_unary_operation_1) [SIGN_EXTEND]: Likewise, preserve SUBREG_PROMOTED_VAR_P when creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P subreg. Generate SIGN_EXTEND of the SUBREG_REG when a subreg would be paradoxical. [ZERO_EXTEND]: Likewise, preserve SUBREG_PROMOTED_VAR_P when creating a (wider) partial subreg from a SUBREG_PROMOTED_VAR_P subreg. Generate ZERO_EXTEND of the SUBREG_REG when a subreg would be paradoxical. 2021-08-31 Roger Sayle * combine.c (combine_simplify_rtx): Avoid converting an explicit TRUNCATE into a lowpart SUBREG on !TRULY_NOOP_TRUNCATION targets. * simplify-rtx.c (simplify_unary_operation_1): Likewise. 2021-08-31 Richard Biener PR tree-optimization/102142 * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Fix condition under which to unset the visited flag. 2021-08-31 Richard Biener PR middle-end/102129 * tree-ssa-ter.c (find_replaceable_in_bb): Do not move possibly trapping expressions across calls. 2021-08-31 Jakub Jelinek PR tree-optimization/102134 * tree-ssa-ccp.c (bit_value_binop) : If sgn is UNSIGNED and r1val | r1mask has MSB set, ensure lzcount doesn't become negative. 2021-08-31 Andrew Pinski PR driver/79181 * collect-utils.c (setup_signals): New declaration. * collect-utils.h (setup_signals): New function. * collect2.c (handler): Delete. (main): Instead of manually setting up the signals, just call setup_signals. * lto-wrapper.c (main): Likewise. 2021-08-31 Andrew Pinski PR target/56337 * config/i386/i386-protos.h (x86_output_aligned_bss): Change align argument to unsigned type. (x86_elf_aligned_decl_common): Likewise. * config/i386/i386.c (x86_elf_aligned_decl_common): Likewise. (x86_output_aligned_bss): Likewise. 2021-08-31 YunQiang Su * config/mips/mips.c (mips_module_isa_name): New. mips_file_start: add .module mipsREV to all asm output 2021-08-31 YunQiang Su * config/mips/mips.h (struct mips_cpu_info): define enum mips_isa; use enum instead of int for 'isa' member. * config.gcc, config/mips/mips.c, config/mips/mips-cpus.def, config/mips/netbsd.h: replace hardcoded numbers with enum. 2021-08-31 liuhongt * config/i386/sse.md (*_ucmp3_1): Change from define_split to define_insn_and_split. (*avx2_eq3): Removed. (_eq3): Adjust pattern (_eq3_1): Rename to .. (*_eq3_1): .. this, and adjust pattern. (*avx2_gt3): Removed. (_gt3): Change from define_insn to define_expand, and adjust pattern. (UNSPEC_MASKED_EQ, UNSPEC_MASKED_GT): Removed. 2021-08-30 David Malcolm PR analyzer/99260 * Makefile.in (ANALYZER_OBJS): Add analyzer/call-info.o. 2021-08-30 Jason Merrill * doc/invoke.texi: Document -Wmissing-requires. 2021-08-30 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_init_builtins): Remove TARGET_EXTRA_BUILTINS guard. 2021-08-30 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_init_builtins): Change initialization of V2DI_type_node and unsigned_V2DI_type_node. 2021-08-30 Bill Schmidt * config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Use the new decl when new_builtins_are_live. * config/rs6000/rs6000-builtin-new.def (__builtin_cfstring): New built-in. 2021-08-30 Pat Haugen * config/rs6000/rs6000-cpus.def (ISA_3_1_MASKS_SERVER): Add OPTION_MASK_P10_FUSION_2STORE. (POWERPC_MASKS): Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable store fusion for Power10. (is_fusable_store): New. (power10_sched_reorder): Likewise. (rs6000_sched_reorder): Do Power10 specific reordering. (rs6000_sched_reorder2): Likewise. * config/rs6000/rs6000.opt: Add new option. 2021-08-30 Richard Biener PR tree-optimization/102128 * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Move scanning for if-converted scalar code to the caller and instead delay clearing the visited flag for profitable subgraphs. (vect_slp_region): Cost all subgraphs before scheduling. For if-converted BB vectorization scan for scalar COND_EXPRs and do not vectorize if any found and the cost model is very-cheap. 2021-08-30 Richard Biener * common.opt (fexceptions): Mark EnabledBy(fnon-call-exceptions). * doc/invoke.texi (fnon-call-exceptions): Document this enables -fexceptions. 2021-08-30 Sebastian Huber * tsystem.h (abort): Define abort() if inhibit_libc is defined and it is not already defined. 2021-08-30 liuhongt * expmed.c (extract_bit_field_1): Make sure we're playing with integral modes before call extract_integral_bit_field. (extract_integral_bit_field): Add a parameter of type scalar_int_mode which corresponds to of tmode. And call extract_and_convert_fixed_bit_field instead of extract_fixed_bit_field and convert_extracted_bit_field. (extract_and_convert_fixed_bit_field): New function, it's a combination of extract_fixed_bit_field and convert_extracted_bit_field. 2021-08-29 Iain Sandoe * config/darwin.c (darwin_libc_has_function): Do not run the checks for x86 or modern Darwin. Make sure that there is a value set for darwin_macosx_version_min before testing. 2021-08-29 Iain Sandoe * config/i386/darwin.h (CLEAR_INSN_CACHE): New. 2021-08-28 Jan Hubicka * ipa-modref-tree.h (modref_access_node::merge): Break out logic combining offsets and logic merging ranges to ... (modref_access_node::combined_offsets): ... here (modref_access_node::update2): ... here (modref_access_node::closer_pair_p): New member function. (modref_access_node::forced_merge): New member function. (modre_ref_node::insert): Do merging when table is full. 2021-08-28 YunQiang Su PR target/102089 * config.gcc: MIPS: use N64 ABI by default if the triple end with -gnuabi64, which is used by Debian since 2013. 2021-08-28 Alexandre Oliva * ipa-modref.c (analyze_function): Skip debug stmts. * tree-inline.c (estimate_num_insn): Consider builtins even without a cgraph_node. 2021-08-27 Jeff Law * config/h8300/bitfield.md (cstore4): Remove expander. * config/h8300/h8300.c (h8300_expand_branch): Remove function. * config/h8300/h8300-protos.h (h8300_expadn_branch): Remove prototype. * config/h8300/h8300.md (eqne): New code iterator. (geultu, geultu_to_c): Similarly. * config/h8300/testcompare.md (cstore4): Dummy expander. (store_c_, store_c_i_): New define_insn_and_splits (cmp_c): New pattern 2021-08-27 Jeff Law * tree-ssa-dom.c (reduce_vector_comparison_to_scalar_comparison): New function. (dom_opt_dom_walker::optimize_stmt): Use it. 2021-08-27 Iain Sandoe * config/darwin.c (finalize_ctors): Add a section-start linker- visible symbol. (finalize_dtors): Likewise. * config/darwin.h (MIN_LD64_INIT_TERM_START_LABELS): New. 2021-08-27 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000-builtins.h): New #include. (rs6000_init_builtins): Call rs6000_init_generated_builtins. Skip the old initialization logic when new builtins are enabled. * config/rs6000/rs6000-gen-builtins.c (write_decls): Rename rs6000_autoinit_builtins to rs6000_init_generated_builtins. (write_init_file): Likewise. 2021-08-27 Iain Sandoe * configure.ac (darwin2[[0-9]]* | darwin19*): Alter use of gcc_GAS_CHECK_FEATURE to remove an extraneous parameter. (amdgcn-* | gcn-*) Likewise. 2021-08-27 Anthony Sharp * symbol-summary.h: Added missing template keyword. 2021-08-27 Richard Biener PR tree-optimization/45178 * tree-ssa-dce.c (find_obviously_necessary_stmts): For infinite loops without exit do not mark control dependent edges of the latch necessary. 2021-08-27 konglin1 PR target/101472 * config/i386/sse.md: (scattersi): Add mask operand to UNSPEC_VSIBADDR. (scattersi): Likewise. (*avx512f_scattersi): Merge mask operand to set_dest. (*avx512f_scatterdi): Likewise 2021-08-27 Kewen Lin * config/rs6000/rs6000.c (rs6000_builtin_md_vectorized_function): Add support for built-in functions MISC_BUILTIN_DIVWE, MISC_BUILTIN_DIVWEU, MISC_BUILTIN_DIVDE, MISC_BUILTIN_DIVDEU, P10_BUILTIN_CFUGED, P10_BUILTIN_CNTLZDM, P10_BUILTIN_CNTTZDM, P10_BUILTIN_PDEPD and P10_BUILTIN_PEXTD on Power10. 2021-08-27 Kewen Lin * config/rs6000/rs6000-call.c (builtin_function_type): Add unsigned signedness for some Power10 bifs. 2021-08-27 David Edelsohn PR target/102068 * config/rs6000/rs6000.c (rs6000_adjust_field_align): Use computed alignment if the entire struct has attribute packed. 2021-08-27 liuhongt PR target/98167 PR target/43147 * config/i386/i386.c (ix86_gimple_fold_builtin): Fold IX86_BUILTIN_SHUFPD512, IX86_BUILTIN_SHUFPS512, IX86_BUILTIN_SHUFPD256, IX86_BUILTIN_SHUFPS, IX86_BUILTIN_SHUFPS256. (ix86_masked_all_ones): New function. 2021-08-26 Uroš Bizjak * config/i386/i386.md (*btr_1): Call force_reg unconditionally. (conditional moves with memory inputs splitters): Ditto. * config/i386/sse.md (one_cmpl2): Simplify. 2021-08-26 Jan Hubicka * ipa-modref-tree.h (modref_access_node::try_merge_with): Restart search after merging. 2021-08-26 Bill Schmidt * config/rs6000/rs6000-overload.def: Add remaining overloads. 2021-08-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add cell stanza. 2021-08-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add ieee128-hw, dfp, crypto, and htm stanzas. 2021-08-26 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add mma stanza. 2021-08-26 Martin Sebor * tree-ssa-uninit.c (warn_uninit): Refactor and simplify. (warn_uninit_phi_uses): Remove argument from calls to warn_uninit. (warn_uninitialized_vars): Same. Reduce visibility of locals. (warn_uninitialized_phi): Same. 2021-08-26 Roger Sayle * tree-ssa-ccp.c (get_individual_bits): Helper function to extract the individual bits from a widest_int constant (mask). (gray_code_bit_flips): New read-only table for effiently enumerating permutations/combinations of bits. (bit_value_binop) [LROTATE_EXPR, RROTATE_EXPR]: Handle rotates by unknown counts that are guaranteed less than the target precision and four or fewer unknown bits by enumeration. [LSHIFT_EXPR, RSHIFT_EXPR]: Likewise, also handle shifts by enumeration under the same conditions. Handle remaining shifts as a mask based upon the minimum possible shift value. 2021-08-26 Roger Sayle Richard Biener * match.pd (shift transformations): Remove a redundant !POINTER_TYPE_P check. 2021-08-26 Uroš Bizjak PR target/102057 * config/i386/i386.md (cmove reg-reg move elimination peephole2s): Set all_regs to true in the call to replace_rtx. 2021-08-26 Jan Hubicka * ipa-modref-tree.c (test_insert_search_collapse): Update test. * ipa-modref-tree.h (modref_base_node::insert): Be smarter when hiting --param modref-max-refs limit. (modref_tree:insert_base): Be smarter when hitting --param modref-max-bases limit. Add new parameter REF. (modref_tree:insert): Update. (modref_tree:merge): Update. * ipa-modref.c (read_modref_records): Update. 2021-08-26 Jan Hubicka * params.opt: (modref-max-adjustments): Add full stop. 2021-08-26 Jan Hubicka * ipa-modref-tree.h (modref_ref_node::verify): New member functoin. (modref_ref_node::insert): Use it. (modref_ref_node::try_mere_with): Fix off by one error. 2021-08-26 Martin Liska Stefan Kneifel * cgraph.h (create_version_clone_with_body): Add new parameter. * cgraphclones.c: Likewise. * multiple_target.c (create_dispatcher_calls): Do not use numbered suffixes. (create_target_clone): Likewise here. 2021-08-26 Jonathan Yong <10walls@gmail.com> * doc/extend.texi: Add note about reserved priorities to the constructor attribute. 2021-08-25 Martin Sebor * gimple-range-cache.cc (ssa_global_cache::dump): Avoid printing range table header alone. * gimple-range.cc (gimple_ranger::export_global_ranges): Same. 2021-08-25 Jan Hubicka * doc/invoke.texi: Document --param modref-max-adjustments. * ipa-modref-tree.c (test_insert_search_collapse): Update. (test_merge): Update. * ipa-modref-tree.h (struct modref_access_node): Add adjustments; (modref_access_node::operator==): Fix handling of access ranges. (modref_access_node::contains): Constify parameter; handle also mismatched parm offsets. (modref_access_node::update): New function. (modref_access_node::merge): New function. (unspecified_modref_access_node): Update constructor. (modref_ref_node::insert_access): Add record_adjustments parameter; handle merging. (modref_ref_node::try_merge_with): New private function. (modref_tree::insert): New record_adjustments parameter. (modref_tree::merge): New record_adjustments parameter. (modref_tree::copy_from): Update. * ipa-modref.c (dump_access): Dump adjustments field. (get_access): Update constructor. (record_access): Update call of insert. (record_access_lto): Update call of insert. (merge_call_side_effects): Add record_adjustments parameter. (get_access_for_fnspec): Update. (process_fnspec): Update. (analyze_call): Update. (analyze_function): Update. (read_modref_records): Update. (ipa_merge_modref_summary_after_inlining): Update. (propagate_unknown_call): Update. (modref_propagate_in_scc): Update. * params.opt (param-max-modref-adjustments=): New. 2021-08-25 Michael Meissner * config/rs6000/vsx.md (UNSPEC_XXSPLTIDP): Rename from UNSPEC_XXSPLTID. (xxspltiw_v4si): Use vecperm type attribute. (xxspltiw_v4si_inst): Use vecperm type attribute. (xxspltiw_v4sf_inst): Likewise. (xxspltidp_v2df): Use vecperm type attribute. Use UNSPEC_XXSPLTIDP instead of UNSPEC_XXSPLTID. (xxspltidp_v2df_inst): Likewise. (xxsplti32dx_v4si): Use vecperm type attribute. (xxsplti32dx_v4si_inst): Likewise. (xxsplti32dx_v4sf_inst): Likewise. (xxblend_): Likewise. (xxpermx): Likewise. (xxpermx_inst): Likewise. (xxeval): Likewise. 2021-08-25 Lewis Hyatt PR other/93067 * coretypes.h (typedef diagnostic_input_charset_callback): Declare. * diagnostic.c (diagnostic_initialize_input_context): New function. * diagnostic.h (diagnostic_initialize_input_context): Declare. * input.c (default_charset_callback): New function. (file_cache::initialize_input_context): New function. (file_cache_slot::create): Added ability to convert the input according to the input context. (file_cache::file_cache): Initialize the new input context. (class file_cache_slot): Added new m_alloc_offset member. (file_cache_slot::file_cache_slot): Initialize the new member. (file_cache_slot::~file_cache_slot): Handle potentially offset buffer. (file_cache_slot::maybe_grow): Likewise. (file_cache_slot::needs_read_p): Handle NULL fp, which is now possible. (file_cache_slot::get_next_line): Likewise. * input.h (class file_cache): Added input context member. 2021-08-25 Richard Biener PR tree-optimization/102046 * tree-vect-slp.c (vect_build_slp_tree_2): Conservatively update ->any_pattern when swapping operands. 2021-08-25 Hongyu Wang PR target/101716 * config/i386/i386.c (ix86_live_on_entry): Adjust comment. (ix86_decompose_address): Remove retval check for ASHIFT, allow non-canonical zero extend if AND mask covers ASHIFT count. (ix86_legitimate_address_p): Adjust condition for decompose. (ix86_rtx_costs): Adjust cost for lea with non-canonical zero-extend. Co-Authored by: Uros Bizjak 2021-08-25 Jiufu Guo PR tree-optimization/101145 * tree-ssa-loop-niter.c (number_of_iterations_until_wrap): New function. (number_of_iterations_lt): Invoke above function. (adjust_cond_for_loop_until_wrap): Merge to number_of_iterations_until_wrap. (number_of_iterations_cond): Update invokes for adjust_cond_for_loop_until_wrap and number_of_iterations_lt. 2021-08-25 konglin1 PR target/101471 * config/i386/avx512dqintrin.h (_mm512_fpclass_ps_mask): Fix macro define in O0. (_mm512_mask_fpclass_ps_mask): Ditto. 2021-08-25 Kewen Lin * config/rs6000/altivec.md (vec_unpacku_hi_v16qi): Remove. (vec_unpacku_hi_v8hi): Likewise. (vec_unpacku_lo_v16qi): Likewise. (vec_unpacku_lo_v8hi): Likewise. (vec_unpacku_hi_): New define_expand. (vec_unpacku_lo_): Likewise. 2021-08-24 David Edelsohn * config/rs6000/aix.h (SYSTEM_IMPLICIT_EXTERN_C): Delete. * config/rs6000/aix71.h (SYSTEM_IMPLICIT_EXTERN_C): Define. * config/rs6000/aix72.h (SYSTEM_IMPLICIT_EXTERN_C): Define. * config/rs6000/aix73.h (TARGET_AIX_VERSION): Increase to 73. 2021-08-24 Roger Sayle PR middle-end/102031 * simplify-rtx.c (simplify_truncation): When comparing precisions use "subreg_prec" variable, not "subreg_mode". 2021-08-24 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power10 and power10-64 stanzas. 2021-08-24 Bill Schmidt * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize various pointer type nodes. * config/rs6000/rs6000.h (rs6000_builtin_type_index): Add enum values for various pointer types. (ptr_V16QI_type_node): New macro. (ptr_V1TI_type_node): New macro. (ptr_V2DI_type_node): New macro. (ptr_V2DF_type_node): New macro. (ptr_V4SI_type_node): New macro. (ptr_V4SF_type_node): New macro. (ptr_V8HI_type_node): New macro. (ptr_unsigned_V16QI_type_node): New macro. (ptr_unsigned_V1TI_type_node): New macro. (ptr_unsigned_V8HI_type_node): New macro. (ptr_unsigned_V4SI_type_node): New macro. (ptr_unsigned_V2DI_type_node): New macro. (ptr_bool_V16QI_type_node): New macro. (ptr_bool_V8HI_type_node): New macro. (ptr_bool_V4SI_type_node): New macro. (ptr_bool_V2DI_type_node): New macro. (ptr_bool_V1TI_type_node): New macro. (ptr_pixel_type_node): New macro. (ptr_intQI_type_node): New macro. (ptr_uintQI_type_node): New macro. (ptr_intHI_type_node): New macro. (ptr_uintHI_type_node): New macro. (ptr_intSI_type_node): New macro. (ptr_uintSI_type_node): New macro. (ptr_intDI_type_node): New macro. (ptr_uintDI_type_node): New macro. (ptr_intTI_type_node): New macro. (ptr_uintTI_type_node): New macro. (ptr_long_integer_type_node): New macro. (ptr_long_unsigned_type_node): New macro. (ptr_float_type_node): New macro. (ptr_double_type_node): New macro. (ptr_long_double_type_node): New macro. (ptr_dfloat64_type_node): New macro. (ptr_dfloat128_type_node): New macro. (ptr_ieee128_type_node): New macro. (ptr_ibm128_type_node): New macro. (ptr_vector_pair_type_node): New macro. (ptr_vector_quad_type_node): New macro. (ptr_long_long_integer_type_node): New macro. (ptr_long_long_unsigned_type_node): New macro. 2021-08-24 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power9-vector, power9, and power9-64 stanzas. 2021-08-24 Roger Sayle Tom de Vries * config.gcc (nvptx-*-*): Define {c,c++}_target_objs. * config/nvptx/nvptx-protos.h (nvptx_cpu_cpp_builtins): Prototype. * config/nvptx/nvptx.h (TARGET_CPU_CPP_BUILTINS): Implement with a call to the new nvptx_cpu_cpp_builtins function in nvptx-c.c. * config/nvptx/t-nvptx (nvptx-c.o): New rule. * config/nvptx/nvptx-c.c: New source file. (nvptx_cpu_cpp_builtins): Move implementation here. 2021-08-24 Martin Sebor PR middle-end/101600 PR middle-end/101977 * gimple-ssa-warn-access.cc (maybe_warn_for_bound): Tighten up the phrasing of a warning. (check_access): Use the remaining size after subtracting any offset rather than the whole object size. * pointer-query.cc (access_ref::get_ref): Clear BASE0 flag if it's clear for any nonnull PHI argument. (compute_objsize): Clear argument. 2021-08-24 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza. 2021-08-24 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64 stanzas. 2021-08-24 Andrew MacLeod * value-relation.cc (rr_transitive_table): New. (relation_transitive): New. (value_relation::swap): Remove. (value_relation::apply_transitive): New. (relation_oracle::relation_oracle): Allocate a new tmp bitmap. (relation_oracle::register_relation): Call register_transitives. (relation_oracle::register_transitives): New. * value-relation.h (relation_oracle): Add new temporary bitmap and methods. 2021-08-24 H.J. Lu PR target/102021 * config/i386/i386-expand.c (ix86_expand_vector_move): Broadcast from integer to a pseudo vector register. 2021-08-24 Richard Biener PR tree-optimization/100089 * tree-vectorizer.h (vect_slp_bb): Rename to ... (vect_slp_if_converted_bb): ... this and get the original loop as new argument. * tree-vectorizer.c (try_vectorize_loop_1): Revert previous fix, pass original loop to vect_slp_if_converted_bb. * tree-vect-slp.c (vect_bb_vectorization_profitable_p): If orig_loop was passed scan the not vectorized stmts for COND_EXPRs and force not profitable if found. (vect_slp_region): Pass down all SLP instances to costing if orig_loop was specified. (vect_slp_bbs): Pass through orig_loop. (vect_slp_bb): Rename to ... (vect_slp_if_converted_bb): ... this and get the original loop as new argument. (vect_slp_function): Adjust. 2021-08-24 Richard Earnshaw PR target/102035 * config/arm/arm.md (attribute arch): Add fix_vlldm. (arch_enabled): Use it. * config/arm/vfp.md (lazy_store_multiple_insn): Add alternative to use when erratum mitigation is needed. 2021-08-24 Richard Earnshaw PR target/102035 * config/arm/arm.opt (mfix-cmse-cve-2021-35465): New option. * doc/invoke.texi (Arm Options): Document it. * config/arm/arm-cpus.in (quirk_vlldm): New feature bit. (ALL_QUIRKS): Add quirk_vlldm. (cortex-m33): Add quirk_vlldm. (cortex-m35p, cortex-m55): Likewise. * config/arm/arm.c (arm_option_override): Enable fix_vlldm if targetting an affected CPU and not explicitly controlled on the command line. 2021-08-24 Richard Earnshaw * config/arm/vfp.md (lazy_store_multiple_insn): Rewrite as valid RTL. (lazy_load_multiple_insn): Likewise. 2021-08-24 liuhongt PR target/101989 * config/i386/sse.md (_vternlog): Enable avx512 embedded broadcast. (*_vternlog_all): Ditto. (_vternlog_mask): Ditto. 2021-08-24 liuhongt PR target/101989 * config/i386/i386.c (ix86_rtx_costs): Define cost for UNSPEC_VTERNLOG. * config/i386/i386.h (STRIP_UNARY): New macro. * config/i386/predicates.md (reg_or_notreg_operand): New predicate. * config/i386/sse.md (*_vternlog_all): New define_insn. (*_vternlog_1): New pre_reload define_insn_and_split. (*_vternlog_2): Ditto. (*_vternlog_3): Ditto. (any_logic1,any_logic2): New code iterator. (logic_op): New code attribute. (ternlogsuffix): Extend to VNxDF and VNxSF. 2021-08-24 Richard Biener * doc/invoke.texi (vect-inner-loop-cost-factor): Adjust. * params.opt (--param vect-inner-loop-cost-factor): Adjust maximum value. * tree-vect-loop.c (vect_analyze_loop_form): Initialize inner_loop_cost_factor to the minimum of the estimated number of iterations of the inner loop and vect-inner-loop-cost-factor. 2021-08-24 Roger Sayle Richard Biener * config/i386/i386-features.c (compute_convert_gain): Provide more accurate values for CONST_INT, when optimizing for size. * config/i386/i386.c (COSTS_N_BYTES): Move definition from here... * config/i386/i386.h (COSTS_N_BYTES): to here. 2021-08-24 Roger Sayle Jakub Jelinek PR middle-end/102029 * match.pd (shift transformations): Add an additional check for !POINTER_TYPE_P in the recently added left shift transformation. 2021-08-24 liuhongt PR tree-optimization/100089 * tree-vectorizer.c (try_vectorize_loop_1): Disable slp in loop vectorizer when cost model is very-cheap. 2021-08-23 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_bif_entry): Don't call asprintf, which is not available on AIX. 2021-08-23 Bill Schmidt * config.gcc (target_gtfiles): Add ./rs6000-builtins.h. * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set. 2021-08-23 Bill Schmidt * config.gcc (powerpc*-*-*): Add rs6000-builtins.o to extra_objs. * config/rs6000/rs6000-gen-builtins.c (main): Close init_file last. * config/rs6000/t-rs6000 (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins): Likewise. (rs6000-builtins.c): Likewise. (rs6000-builtins.h): Likewise. (rs6000.o): Add dependency. (EXTRA_HEADERS): Add rs6000-vecdefines.h. (rs6000-vecdefines.h): New target. (rs6000-builtins.o): Likewise. (rs6000-call.o): Add rs6000-builtins.h as a dependency. (rs6000-c.o): Likewise. 2021-08-23 Bill Schmidt PR target/101830 * config/rs6000/rs6000-gen-builtins.c (consume_whitespace): Diagnose buffer overrun. (safe_inc_pos): Fix overrun detection. (match_identifier): Diagnose buffer overrun. (match_integer): Likewise. (match_to_right_bracket): Likewise. 2021-08-23 Jan Hubicka * ipa-modref-tree.h (modref_access_node::range_info_useful_p): Improve range compare. (modref_access_node::contains): New member function. (modref_access_node::search): Remove. (modref_access_node::insert): Be smarter about subaccesses. 2021-08-23 Thomas Schwinge * config/i386/i386-options.c (ix86_omp_device_kind_arch_isa) [ACCEL_COMPILER]: Match "intel_mic". * config/i386/t-omp-device (omp-device-properties-i386) : Add "intel_mic". 2021-08-23 Jeff Law * config/h8300/h8300-protos.h (h8300_expand_epilogue): Add new argument. * config/h8300/jumpcall.md (call, call_value): Restrict to !SIBLING_CALL_P cases. (subcall, sibcall_value): New patterns & expanders. * config/h8300/proepi.md (epilogue): Pass new argument to h8300_expand_epilogue. (sibcall_epilogue): New expander. * config/h8300/h8300.c (h8300_expand_epilogue): Handle sibcall epilogues too. (h8300_ok_for_sibcall_p): New function. (TARGET_FUNCTION_OK_FOR_SIBCALL): define. 2021-08-23 Roger Sayle * simplify-rtx.c (simplify_unary_operation_1): [TRUNCATE]: Handle case where the operand is already the desired mode. 2021-08-23 Richard Biener PR ipa/97565 * tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition in addition to has_gimple_body. 2021-08-23 Jan Hubicka PR middle-end/101949 * ipa-modref.c (analyze_ssa_name_flags): Fix merging of EAF_NOCLOBBER 2021-08-23 Martin Liska * doc/invoke.texi: Put the option out of -mxl-mode-app-model table. 2021-08-23 Richard Biener * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Properly scale the inner loop cost only once. 2021-08-23 Roger Sayle * tree-ssa-ccp.c (bit_value_binop) [TRUNC_MOD_EXPR, TRUNC_DIV_EXPR]: Provide bounds for unsigned (and signed with non-negative operands) division and modulus. 2021-08-23 Roger Sayle * simplify-rtx.c (simplify_truncation): Generalize simplification of (truncate:A (subreg:B X)). (simplify_unary_operation_1) [FLOAT_TRUNCATE, FLOAT_EXTEND, SIGN_EXTEND, ZERO_EXTEND]: Handle cases where the operand already has the desired machine mode. (test_scalar_int_ops): Add tests that useless extensions and truncations are optimized away. (test_scalar_int_ext_ops): New self-test function to confirm that truncations of extensions are correctly simplified. (test_scalar_int_ext_ops2): New self-test function to check truncations of truncations, extensions of extensions, and truncations of extensions. (test_scalar_ops): Call the above two functions with a representative sampling of integer machine modes. 2021-08-23 Roger Sayle * match.pd (shift transformations): Change the sign of an LSHIFT_EXPR if it reduces the number of explicit conversions. 2021-08-23 Jakub Jelinek PR tree-optimization/86723 * gimple-ssa-store-merging.c (find_bswap_or_nop_finalize): Add cast64_to_32 argument, set *cast64_to_32 to false, unless n is non-memory permutation of 64-bit src which only has bytes of 0 or [5..8] and n->range is 4. (find_bswap_or_nop): Add cast64_to_32 and mask arguments, adjust find_bswap_or_nop_finalize caller, support bswap with some bytes zeroed, as long as at least two bytes are not zeroed. (bswap_replace): Add mask argument and handle masking of bswap result. (maybe_optimize_vector_constructor): Adjust find_bswap_or_nop caller, punt if cast64_to_32 or mask is not all ones. (pass_optimize_bswap::execute): Adjust find_bswap_or_nop_finalize caller, for now punt if cast64_to_32. 2021-08-23 Richard Biener PR tree-optimization/79334 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record a type also for COMPONENT_REFs. (vn_reference_may_trap): Check ARRAY_REF with constant index against the array domain. 2021-08-23 liuhongt PR target/102016 * config/i386/sse.md (*avx512f_pshufb_truncv8hiv8qi_1): Add TARGET_AVX512BW to condition. 2021-08-23 Jakub Jelinek PR debug/101905 * dwarf2out.c (gen_variable_die): Add DW_AT_location for global register variables already during early_dwarf if possible. 2021-08-23 Christophe Lyon * config/arm/arm_mve.h: Fix __arm_vctp16q return type. 2021-08-23 Christophe Lyon PR target/100856 * config/arm/arm.opt: Fix typo. * config/arm/t-rmprofile: Fix typo. 2021-08-23 Jakub Jelinek * tree.h (OMP_CLAUSE_GRAINSIZE_STRICT): Define. (OMP_CLAUSE_NUM_TASKS_STRICT): Define. * tree-pretty-print.c (dump_omp_clause) : Print strict: modifier. * omp-expand.c (expand_task_call): Use GOMP_TASK_FLAG_STRICT in iflags if either grainsize or num_tasks clause has the strict modifier. 2021-08-23 Martin Liska * dbgcnt.def (DEBUG_COUNTER): New counter. * gimple.c (gimple_call_arg_flags): Use it in IPA PTA. 2021-08-23 Jan Hubicka * ipa-modref.c (analyze_ssa_name_flags): Improve handling of return slot. 2021-08-23 Xi Ruoyao PR target/101922 * config/mips/mips-protos.h (mips_msa_output_shift_immediate): Declare. * config/mips/mips.c (mips_msa_output_shift_immediate): New function. * config/mips/mips-msa.md (vashl3, vashr3, vlshr3): Call it. 2021-08-22 Jan Hubicka Martin Liska PR middle-end/101949 * ipa-modref.c (analyze_ssa_name_flags): Indirect call implies ~EAF_NOCLOBBER. 2021-08-21 Dragan Mladjenovic * config/mips/mips.c (mips_function_rodata_section, TARGET_ASM_FUNCTION_RODATA_SECTION): Removed. 2021-08-21 John David Anglin * config/pa/pa.c (pa_asm_output_aligned_common): Remove warning. 2021-08-20 Serge Belyshev * configure.ac (thread-local storage support): Remove tls_first_major and tls_first_minor. Use "$conftest_s" to check support. * configure: Regenerate. 2021-08-20 Serge Belyshev * configure.ac: Fixup formatting. 2021-08-20 Serge Belyshev * acinclude.m4 (gcc_GAS_CHECK_FEATURE): Remove third argument and ... * configure.ac: ... update all callers. 2021-08-20 Serge Belyshev PR target/91602 * acinclude.m4 (_gcc_COMPUTE_GAS_VERSION, _gcc_GAS_VERSION_GTE_IFELSE) (gcc_GAS_VERSION_GTE_IFELSE): Remove. (gcc_GAS_CHECK_FEATURE): Do not handle in-tree case specially. * configure.ac: Remove gcc_cv_gas_major_version, gcc_cv_gas_minor_version. Remove remaining checks for in-tree assembler. * configure: Regenerate. 2021-08-20 Jeff Law * config/h8300/h8300.c (shift_alg_hi): Improve arithmetic shift right by 15 bits for H8/300H and H8/S. Improve logical shifts by 12 bits for H8/S. (shift_alg_si): Improve arithmetic right shift by 28-30 bits for H8/300H. Improve arithmetic shift right by 15 bits for H8/S. Improve logical shifts by 27 bits for H8/S. (get_shift_alg): Corresponding changes. (h8300_option_override): Revert to loops for -Os when profitable. 2021-08-20 Richard Biener * tree-vect-data-refs.c (dr_group_sort_cmp): Do not compare BBs. (vect_analyze_data_ref_accesses): Likewise. Assign the BB index as group_id when dataref_groups were not computed. * tree-vect-slp.c (vect_slp_bbs): Bump current_group when we advace to the next BB. 2021-08-20 Jakub Jelinek * omp-builtins.def (BUILT_IN_GOMP_WARNING, BUILT_IN_GOMP_ERROR): New builtins. 2021-08-20 Martin Liska PR gcov-profile/89961 * gcov.c (make_gcov_file_name): Rewrite using std::string. (mangle_name): Simplify, do not used the second argument. (strip_extention): New function. (get_md5sum): Likewise. (get_gcov_intermediate_filename): Handle properly -p and -x options. (output_gcov_file): Use string type. (generate_results): Likewise. (md5sum_to_hex): Remove. 2021-08-20 Michael Meissner * config/rs6000/altivec.md (UNSPEC_XXEVAL): Move to vsx.md. (UNSPEC_XXSPLTIW): Move to vsx.md. (UNSPEC_XXSPLTID): Move to vsx.md. (UNSPEC_XXSPLTI32DX): Move to vsx.md. (UNSPEC_XXBLEND): Move to vsx.md. (UNSPEC_XXPERMX): Move to vsx.md. (VM3): Move to vsx.md. (VM3_char): Move to vsx.md. (xxspltiw_v4si): Move to vsx.md. (xxspltiw_v4sf): Move to vsx.md. (xxspltiw_v4sf_inst): Move to vsx.md. (xxspltidp_v2df): Move to vsx.md. (xxspltidp_v2df_inst): Move to vsx.md. (xxsplti32dx_v4si_inst): Move to vsx.md. (xxsplti32dx_v4sf): Move to vsx.md. (xxsplti32dx_v4sf_inst): Move to vsx.md. (xxblend_): Move to vsx.md. (xxpermx): Move to vsx.md. (xxpermx_inst): Move to vsx.md. * config/rs6000/vsx.md (UNSPEC_XXEVAL): Move from altivec.md. (UNSPEC_XXSPLTIW): Move from altivec.md. (UNSPEC_XXSPLTID): Move from altivec.md. (UNSPEC_XXSPLTI32DX): Move from altivec.md. (UNSPEC_XXBLEND): Move from altivec.md. (UNSPEC_XXPERMX): Move from altivec.md. (VM3): Move from altivec.md. (VM3_char): Move from altivec.md. (xxspltiw_v4si): Move from altivec.md. (xxspltiw_v4sf): Move from altivec.md. (xxspltiw_v4sf_inst): Move from altivec.md. (xxspltidp_v2df): Move from altivec.md. (xxspltidp_v2df_inst): Move from altivec.md. (xxsplti32dx_v4si_inst): Move from altivec.md. (xxsplti32dx_v4sf): Move from altivec.md. (xxsplti32dx_v4sf_inst): Move from altivec.md. (xxblend_): Move from altivec.md. (xxpermx): Move from altivec.md. (xxpermx_inst): Move from altivec.md. 2021-08-19 Roger Sayle * tree-vect-generic.c (expand_vector_operations_1): Use either gimplify_build1 or gimplify_build2 instead of gimple_build_assign when constructing scalar splat expressions. 2021-08-19 Peter Bergner PR target/101849 * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Cast pointer to __vector_pair *. 2021-08-19 Martin Sebor * gimple-range.cc: Add comments. * gimple-range.h: Same. 2021-08-19 Martin Sebor PR middle-end/101984 * gimple-ssa-warn-access.cc (pass_waccess::execute): Also call disable_ranger. 2021-08-19 Jeff Law * config.gcc (h8300-*-elf*): Do not include dbxelf.h. (h8300-*-linux*, v850-*-rtems*, v850*-elf*): Likewise. * config/v850/v850.h (DEFAULT_GDB_EXTENSIONS): Remove. 2021-08-19 Jakub Jelinek PR middle-end/101950 * optabs.c (expand_clrsb_using_clz): New function. (expand_unop): Use it as another clrsb expansion fallback. 2021-08-19 liuhongt Revert: 2021-07-28 liuhongt PR target/99881 * config/i386/i386.h (processor_costs): Add new member integer_to_sse. * config/i386/x86-tune-costs.h (ix86_size_cost, i386_cost, i486_cost, pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost, bdver_cost, znver1_cost, znver2_cost, znver3_cost, btver1_cost, btver2_cost, btver3_cost, pentium4_cost, nocona_cost, atom_cost, atom_cost, slm_cost, intel_cost, generic_cost, core_cost): Initialize integer_to_sse same value as sse_op. (skylake_cost): Initialize integer_to_sse twice as much as sse_op. * config/i386/i386.c (ix86_builtin_vectorization_cost): Use integer_to_sse instead of sse_op to calculate the cost of vec_construct. 2021-08-18 Iain Sandoe * config.gcc: Include rpath.opt for Darwin. * config/darwin.h (DRIVER_SELF_SPECS): Handle -rpath. 2021-08-18 Thomas Schwinge PR bootstrap/101959 * hash-map-tests.c (test_map_of_type_with_ctor_and_dtor_expand): Use an 'int_hash'. 2021-08-18 Jonathan Wright * config/aarch64/arm_neon.h (vld3_lane_f64): Use float RTL pattern and type cast. (vld4_lane_f32): Use float RTL pattern. (vld4q_lane_f64): Use float type cast. 2021-08-18 Jan Hubicka * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Check also EAF_NOREAD. 2021-08-18 Thomas Schwinge * hash-map-tests.c (test_map_of_type_with_ctor_and_dtor): Extend. (test_map_of_type_with_ctor_and_dtor_expand): Add function. (hash_map_tests_c_tests): Call it. 2021-08-18 Thomas Schwinge * ggc.h (enum ggc_collect): New. (ggc_collect): Use it. * ggc-page.c: Adjust. * ggc-common.c: Likewise. * ggc-tests.c: Likewise. * read-rtl-function.c: Likewise. * selftest-run-tests.c: Likewise. * doc/gty.texi (Invoking the garbage collector): Likewise. 2021-08-18 liuhongt PR target/97147 * config/i386/i386.h (TARGET_V2DF_REDUCTION_PREFER_HADDPD): New macro. * config/i386/sse.md (*sse3_haddv2df3_low): Add TARGET_V2DF_REDUCTION_PREFER_HADDPD. (*sse3_hsubv2df3_low): Ditto. * config/i386/x86-tune.def (X86_TUNE_V2DF_REDUCTION_PREFER_HADDPD): New tune. 2021-08-17 Andrew MacLeod * gimple-range-gori.cc (gori_compute::gori_compute): Enable tracing. (gori_compute::compute_operand_range): Add tracing. (gori_compute::logical_combine): Ditto. (gori_compute::compute_logical_operands): Ditto. (gori_compute::compute_operand1_range): Ditto. (gori_compute::compute_operand2_range): Ditto. (gori_compute::outgoing_edge_range_p): Ditto. * gimple-range-gori.h (class gori_compute): Add range_tracer. 2021-08-17 Andrew MacLeod * flag-types.h (enum evrp_mode): Adjust evrp-mode values. * gimple-range-cache.cc (DEBUG_RANGE_CACHE): Relocate from. * gimple-range-trace.h (DEBUG_RANGE_CACHE): Here. * params.opt (--param=evrp-mode): Adjust options. 2021-08-17 Andrew MacLeod * Makefile.in (OBJS): Add gimple-range-trace.o. * gimple-range-cache.h (enable_new_values): Remove unused prototype. * gimple-range-fold.cc: Adjust headers. * gimple-range-trace.cc: New. * gimple-range-trace.h: New. * gimple-range.cc (gimple_ranger::gimple_ranger): Enable tracer. (gimple_ranger::range_of_expr): Add tracing. (gimple_ranger::range_on_entry): Ditto. (gimple_ranger::range_on_exit): Ditto. (gimple_ranger::range_on_edge): Ditto. (gimple_ranger::fold_range_internal): Ditto. (gimple_ranger::dump_bb): Do not calculate edge range twice. (trace_ranger::*): Remove. (enable_ranger): Never create a trace_ranger. (debug_seed_ranger): Move to gimple-range-trace.cc. (dump_ranger): Ditto. (debug_ranger): Ditto. * gimple-range.h: Include gimple-range-trace.h. (range_on_entry, range_on_exit): No longer virtual. (class trace_ranger): Remove. (DEBUG_RANGE_CACHE): Move to gimple-range-trace.h. 2021-08-17 Martin Sebor PR middle-end/101854 * builtins.c (expand_builtin_alloca): Move warning code to check_alloca in gimple-ssa-warn-access.cc. * calls.c (alloc_max_size): Move code to check_alloca. (get_size_range): Move to pointer-query.cc. (maybe_warn_alloc_args_overflow): Move to gimple-ssa-warn-access.cc. (get_attr_nonstring_decl): Move to tree.c. (fntype_argno_type): Move to gimple-ssa-warn-access.cc. (append_attrname): Same. (maybe_warn_rdwr_sizes): Same. (initialize_argument_information): Move code to gimple-ssa-warn-access.cc. * calls.h (maybe_warn_alloc_args_overflow): Move to gimple-ssa-warn-access.h. (get_attr_nonstring_decl): Move to tree.h. (maybe_warn_nonstring_arg): Move to gimple-ssa-warn-access.h. (enum size_range_flags): Move to pointer-query.h. (get_size_range): Same. * gimple-ssa-warn-access.cc (has_location): Remove unused overload to avoid Clang -Wunused-function. (get_size_range): Declare static. (maybe_emit_free_warning): Rename... (maybe_check_dealloc_call): ...to this for consistency. (class pass_waccess): Add members. (pass_waccess::~pass_waccess): Defined. (alloc_max_size): Move here from calls.c. (maybe_warn_alloc_args_overflow): Same. (check_alloca): New function. (check_alloc_size_call): New function. (check_strncat): Handle another warning flag. (pass_waccess::check_builtin): Handle alloca. (fntype_argno_type): Move here from calls.c. (append_attrname): Same. (maybe_warn_rdwr_sizes): Same. (pass_waccess::check_call): Define. (check_nonstring_args): New function. (pass_waccess::check): Call new member functions. (pass_waccess::execute): Enable ranger. * gimple-ssa-warn-access.h (get_size_range): Move here from calls.h. (maybe_warn_nonstring_arg): Same. * gimple-ssa-warn-restrict.c: Remove #include. * pointer-query.cc (get_size_range): Move here from calls.c. * pointer-query.h (enum size_range_flags): Same. (get_size_range): Same. * tree.c (get_attr_nonstring_decl): Move here from calls.c. * tree.h (get_attr_nonstring_decl): Move here from calls.h. 2021-08-17 Thomas Schwinge * ggc.h (ggc_collect): Add 'force_collect' parameter. * ggc-page.c (ggc_collect): Use that one instead of global 'ggc_force_collect'. Adjust all users. * doc/gty.texi (Invoking the garbage collector): Update. * ggc-internal.h (ggc_force_collect): Remove. * ggc-common.c (ggc_force_collect): Likewise. * selftest.h (forcibly_ggc_collect): Remove. * ggc-tests.c (selftest::forcibly_ggc_collect): Likewise. * read-rtl-function.c (test_loading_labels): Adjust. * selftest-run-tests.c (run_tests): Likewise. 2021-08-17 Iain Sandoe * config/darwin.c (darwin_file_end): Reset and reclaim the section names table at the end of compile. 2021-08-17 Iain Sandoe PR target/100340 * config.in: Regenerate. * config/i386/darwin.h (EXTRA_ASM_OPTS): New (ASM_SPEC): Pass options to disable branch shortening where needed. * configure: Regenerate. * configure.ac: Detect versions of 'as' that support the optimisation which has the bug. 2021-08-17 Richard Biener * optabs-query.c (supports_vec_gather_load_p): Also check for masked optabs. (supports_vec_scatter_store_p): Likewise. * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Fall back to masked variants if non-masked are not supported. * tree-vect-patterns.c (vect_recog_gather_scatter_pattern): When we need to use masked gather/scatter but do not have a mask set up a constant true one. * tree-vect-stmts.c (vect_check_scalar_mask): Also allow non-SSA_NAME masks. 2021-08-17 Roger Sayle * tree-ssa-ccp.c (bit_value_binop) [MINUS_EXPR]: Use same algorithm as PLUS_EXPR to improve subtraction bit bounds. [POINTER_DIFF_EXPR]: Treat as synonymous with MINUS_EXPR. 2021-08-17 Roger Sayle * tree-ssa-ccp.c (bit_value_mult_const): New helper function to calculate the mask-value pair result of a multiplication by an unsigned constant. (bit_value_binop) [MULT_EXPR]: Call it from here for multiplications by (sparse) non-negative constants. 2021-08-17 Christophe Lyon PR target/100896 * config.gcc (gcc_cv_initfini_array): Leave undefined for uclinuxfdpiceabi targets. 2021-08-17 Alexandre Oliva * tree-inline.c (maybe_move_debug_stmts_to_successors): Don't reverse debug stmts. 2021-08-17 Alexandre Oliva * tree-cfg.c (dump_function_to_file): Use fun, not cfun. 2021-08-17 Jonathan Wright * config/aarch64/arm_neon.h (__LD4_LANE_FUNC): Delete. (__LD4Q_LANE_FUNC): Likewise. (vld4_lane_u8): Define without macro. (vld4_lane_u16): Likewise. (vld4_lane_u32): Likewise. (vld4_lane_u64): Likewise. (vld4_lane_s8): Likewise. (vld4_lane_s16): Likewise. (vld4_lane_s32): Likewise. (vld4_lane_s64): Likewise. (vld4_lane_f16): Likewise. (vld4_lane_f32): Likewise. (vld4_lane_f64): Likewise. (vld4_lane_p8): Likewise. (vld4_lane_p16): Likewise. (vld4_lane_p64): Likewise. (vld4q_lane_u8): Likewise. (vld4q_lane_u16): Likewise. (vld4q_lane_u32): Likewise. (vld4q_lane_u64): Likewise. (vld4q_lane_s8): Likewise. (vld4q_lane_s16): Likewise. (vld4q_lane_s32): Likewise. (vld4q_lane_s64): Likewise. (vld4q_lane_f16): Likewise. (vld4q_lane_f32): Likewise. (vld4q_lane_f64): Likewise. (vld4q_lane_p8): Likewise. (vld4q_lane_p16): Likewise. (vld4q_lane_p64): Likewise. (vld4_lane_bf16): Likewise. (vld4q_lane_bf16): Likewise. 2021-08-17 Jonathan Wright * config/aarch64/arm_neon.h (__LD3_LANE_FUNC): Delete. (__LD3Q_LANE_FUNC): Delete. (vld3_lane_u8): Define without macro. (vld3_lane_u16): Likewise. (vld3_lane_u32): Likewise. (vld3_lane_u64): Likewise. (vld3_lane_s8): Likewise. (vld3_lane_s16): Likewise. (vld3_lane_s32): Likewise. (vld3_lane_s64): Likewise. (vld3_lane_f16): Likewise. (vld3_lane_f32): Likewise. (vld3_lane_f64): Likewise. (vld3_lane_p8): Likewise. (vld3_lane_p16): Likewise. (vld3_lane_p64): Likewise. (vld3q_lane_u8): Likewise. (vld3q_lane_u16): Likewise. (vld3q_lane_u32): Likewise. (vld3q_lane_u64): Likewise. (vld3q_lane_s8): Likewise. (vld3q_lane_s16): Likewise. (vld3q_lane_s32): Likewise. (vld3q_lane_s64): Likewise. (vld3q_lane_f16): Likewise. (vld3q_lane_f32): Likewise. (vld3q_lane_f64): Likewise. (vld3q_lane_p8): Likewise. (vld3q_lane_p16): Likewise. (vld3q_lane_p64): Likewise. (vld3_lane_bf16): Likewise. (vld3q_lane_bf16): Likewise. 2021-08-17 Jonathan Wright * config/aarch64/arm_neon.h (__LD2_LANE_FUNC): Delete. (__LD2Q_LANE_FUNC): Likewise. (vld2_lane_u8): Define without macro. (vld2_lane_u16): Likewise. (vld2_lane_u32): Likewise. (vld2_lane_u64): Likewise. (vld2_lane_s8): Likewise. (vld2_lane_s16): Likewise. (vld2_lane_s32): Likewise. (vld2_lane_s64): Likewise. (vld2_lane_f16): Likewise. (vld2_lane_f32): Likewise. (vld2_lane_f64): Likewise. (vld2_lane_p8): Likewise. (vld2_lane_p16): Likewise. (vld2_lane_p64): Likewise. (vld2q_lane_u8): Likewise. (vld2q_lane_u16): Likewise. (vld2q_lane_u32): Likewise. (vld2q_lane_u64): Likewise. (vld2q_lane_s8): Likewise. (vld2q_lane_s16): Likewise. (vld2q_lane_s32): Likewise. (vld2q_lane_s64): Likewise. (vld2q_lane_f16): Likewise. (vld2q_lane_f32): Likewise. (vld2q_lane_f64): Likewise. (vld2q_lane_p8): Likewise. (vld2q_lane_p16): Likewise. (vld2q_lane_p64): Likewise. (vld2_lane_bf16): Likewise. (vld2q_lane_bf16): Likewise. 2021-08-17 Maxim Kuvyrkov * haifa-sched.c (advance_one_cycle): Output more context-synchronization lines for diff. 2021-08-17 Maxim Kuvyrkov * haifa-sched.c (enum rfs_decision, rfs_str): Add RFS_AUTOPREF. (rank_for_schedule): Use it. 2021-08-17 Maxim Kuvyrkov PR rtl-optimization/91598 * haifa-sched.c (autopref_rank_for_schedule): Prioritize "irrelevant" insns after memory reads and before memory writes. 2021-08-17 Alistair_Lee * rtl.h (CONST_VECTOR_P): New macro. * config/aarch64/aarch64.c (aarch64_get_sve_pred_bits): Use RTL code testing macros. (aarch64_ptrue_all_mode): Likewise. (aarch64_expand_mov_immediate): Likewise. (aarch64_const_vec_all_in_range_p): Likewise. (aarch64_rtx_costs): Likewise. (aarch64_legitimate_constant_p): Likewise. (aarch64_simd_valid_immediate): Likewise. (aarch64_simd_make_constant): Likewise. (aarch64_convert_mult_to_shift): Likewise. (aarch64_expand_sve_vec_perm): Likewise. (aarch64_vec_fpconst_pow_of_2): Likewise. 2021-08-17 Andrew MacLeod PR tree-optimization/101938 * range-op.cc (operator_abs::op1_range): Special case -TYPE_MIN_VALUE for flag_wrapv. 2021-08-17 Kewen Lin * tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Add the cost for value extraction. 2021-08-17 Jakub Jelinek * tree.def (OMP_SCOPE): New tree code. * tree.h (OMP_SCOPE_BODY, OMP_SCOPE_CLAUSES): Define. * tree-nested.c (convert_nonlocal_reference_stmt, convert_local_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_SCOPE. * tree-pretty-print.c (dump_generic_node): Handle OMP_SCOPE. * gimple.def (GIMPLE_OMP_SCOPE): New gimple code. * gimple.c (gimple_build_omp_scope): New function. (gimple_copy): Handle GIMPLE_OMP_SCOPE. * gimple.h (gimple_build_omp_scope): Declare. (gimple_has_substatements): Handle GIMPLE_OMP_SCOPE. (gimple_omp_scope_clauses, gimple_omp_scope_clauses_ptr, gimple_omp_scope_set_clauses): New inline functions. (CASE_GIMPLE_OMP): Add GIMPLE_OMP_SCOPE. * gimple-pretty-print.c (dump_gimple_omp_scope): New function. (pp_gimple_stmt_1): Handle GIMPLE_OMP_SCOPE. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple-low.c (lower_stmt): Likewise. * gimplify.c (is_gimple_stmt): Handle OMP_MASTER. (gimplify_scan_omp_clauses): For task reductions, handle OMP_SCOPE like ORT_WORKSHARE constructs. Adjust diagnostics for % allowing task reductions. Reject inscan reductions on scope. (omp_find_stores_stmt): Handle GIMPLE_OMP_SCOPE. (gimplify_omp_workshare, gimplify_expr): Handle OMP_SCOPE. * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_SCOPE. (estimate_num_insns): Likewise. * omp-low.c (build_outer_var_ref): Look through GIMPLE_OMP_SCOPE contexts if var isn't privatized there. (check_omp_nesting_restrictions): Handle GIMPLE_OMP_SCOPE. (scan_omp_1_stmt): Likewise. (maybe_add_implicit_barrier_cancel): Look through outer scope constructs. (lower_omp_scope): New function. (lower_omp_task_reductions): Handle OMP_SCOPE. (lower_omp_1): Handle GIMPLE_OMP_SCOPE. (diagnose_sb_1, diagnose_sb_2): Likewise. * omp-expand.c (expand_omp_single): Support also GIMPLE_OMP_SCOPE. (expand_omp): Handle GIMPLE_OMP_SCOPE. (omp_make_gimple_edges): Likewise. * omp-builtins.def (BUILT_IN_GOMP_SCOPE_START): New built-in. 2021-08-17 Richard Biener PR tree-optimization/101925 * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Set reverse on COMPONENT_REF and ARRAY_REF according to what reverse_storage_order_for_component_p does. (vn_reference_eq): Compare reversed on reference ops. (reverse_storage_order_for_component_p): New overload. (vn_reference_lookup_3): Check reverse_storage_order_for_component_p on the reference looked up. 2021-08-17 Jeff Law * config/h8300/h8300.c (shift_alg_si): Avoid loops for most SImode shifts on the H8/S. (h8300_option_override): Use loops on H8/S more often when optimizing for size. (get_shift_alg): Handle new "special" cases on H8/S. Simplify accordingly. Handle various arithmetic right shifts with special sequences that we couldn't handle before. 2021-08-16 Jeff Law * config.gcc (rl78-*-elf*): Do not include dbxelf.h. 2021-08-16 Sebastian Huber * config/sparc/rtemself.h (SPARC_GCOV_TYPE_SIZE): Define. * config/sparc/sparc.c (sparc_gcov_type_size): New. (TARGET_GCOV_TYPE_SIZE): Redefine if SPARC_GCOV_TYPE_SIZE is defined. * coverage.c (get_gcov_type): Use targetm.gcov_type_size(). * doc/tm.texi (TARGET_GCOV_TYPE_SIZE): Add hook under "Misc". * doc/tm.texi.in: Regenerate. * target.def (gcov_type_size): New target hook. * targhooks.c (default_gcov_type_size): New. * targhooks.h (default_gcov_type_size): Declare. * tree-profile.c (gimple_gen_edge_profiler): Use precision of gcov_type_node. (gimple_gen_time_profiler): Likewise. 2021-08-16 Eric Botcazou * dwarf2out.c (add_scalar_info): Deal with DW_AT_data_bit_offset. 2021-08-16 Tobias Burnus PR middle-end/101931 * omp-low.c (omp_runtime_api_call): Update for routines added in the meanwhile. 2021-08-16 Martin Liska PR tree-optimization/100393 * tree-switch-conversion.c (group_cluster::dump): Use get_comparison_count. (jump_table_cluster::find_jump_tables): Pre-compute number of comparisons and then decrement it. Cache also max_ratio. (jump_table_cluster::can_be_handled): Change signature. * tree-switch-conversion.h (get_comparison_count): New. 2021-08-16 Eric Botcazou * dwarf2out.c (add_data_member_location_attribute): Use GNAT encodings only when -fgnat-encodings=all is specified. (add_bound_info): Likewise. (add_byte_size_attribute): Likewise. (gen_member_die): Likewise. 2021-08-16 Thomas Schwinge * omp-oacc-neuter-broadcast.cc (execute_omp_oacc_neuter_broadcast): Plug 'par' memory leak. 2021-08-16 Thomas Schwinge * omp-oacc-neuter-broadcast.cc (execute_omp_oacc_neuter_broadcast): Clarify memory management for 'prop_set'. 2021-08-16 Thomas Schwinge * omp-oacc-neuter-broadcast.cc (field_map): Move variable into... (execute_omp_oacc_neuter_broadcast): ... here. (install_var_field, build_receiver_ref, build_sender_ref): Take 'field_map_t *' parameter. Adjust all users. (worker_single_copy, neuter_worker_single): Take a 'record_field_map_t *' parameter. Adjust all users. 2021-08-16 liuhongt PR target/101930 * config/i386/i386.md (ldexp3): Force operands[1] to reg. 2021-08-16 Martin Liska PR ipa/101726 * multiple_target.c (create_dispatcher_calls): Make default function local only if it is a definition. 2021-08-16 Martin Liska PR ipa/100600 * ipa-icf-gimple.c (func_checker::compare_ssa_name): Do not consider equal SSA_NAMEs when one is a param. 2021-08-16 liuhongt PR target/101846 * config/i386/i386-expand.c (ix86_expand_vec_perm_vpermt2): Support vpermi2b for V32QI/V16QImode. (ix86_extract_perm_from_pool_constant): New function. (ix86_expand_vec_one_operand_perm_avx512): Support vpermw/vpermb under TARGET_AVX512BW/TARGET_AVX512VBMI. (expand_vec_perm_1): Adjust comments for upper. * config/i386/i386-protos.h (ix86_extract_perm_from_pool_constant): New declare. * config/i386/predicates.md (permvar_truncate_operand): New predicate. (pshufb_truncv4siv4hi_operand): Ditto. (pshufb_truncv8hiv8qi_operand): Ditto. * config/i386/sse.md (*avx512bw_permvar_truncv16siv16hi_1): New pre_reload define_insn_and_split. (*avx512f_permvar_truncv8siv8hi_1): Ditto. (*avx512f_vpermvar_truncv8div8si_1): Ditto. (*avx512f_permvar_truncv32hiv32qi_1): Ditto. (*avx512f_permvar_truncv16hiv16qi_1): Ditto. (*avx512f_permvar_truncv4div4si_1): Ditto. (*avx512f_pshufb_truncv8hiv8qi_1): Ditto. (*avx512f_pshufb_truncv4siv4hi_1): Ditto. (*avx512f_pshufd_truncv2div2si_1): Ditto. 2021-08-16 Kito Cheng * config/riscv/multilib-generator: Support code model option for multi-lib. * doc/install.texi: Add document of new option for --with-multilib-generator. 2021-08-15 Clément Chigot * config/rs6000/rs6000.c (xcoff_tls_exec_model_detected): New. (rs6000_legitimize_tls_address_aix): Use it. (rs6000_xcoff_file_end): Add ".ref __tls_get_addr" when xcoff_tls_exec_model_detected is true. 2021-08-15 Jeff Law * config/h8300/h8300.c (shift_alg_si): Retune H8/300H shifts to allow a bit more code growth, saving many dozens of cycles. (h8300_option_override): Adjus shift_alg_si if optimizing for code size. (get_shift_alg): Use special + inline shifts for residuals in more cases. 2021-08-14 Stafford Horne PR target/99783 * config/or1k/or1k-opts.h: New file. * config/or1k/or1k.c (or1k_legitimize_address_1, print_reloc): Support generating gotha relocations if -mcmodel=large is specified. * config/or1k/or1k.h (TARGET_CMODEL_SMALL, TARGET_CMODEL_LARGE): New macros. * config/or1k/or1k.opt (mcmodel=): New option. * doc/invoke.texi (OpenRISC Options): Document mcmodel. 2021-08-14 Martin Sebor PR middle-end/101791 * gimple-ssa-warn-access.cc (new_delete_mismatch_p): Use new argument to valid_new_delete_pair_p. * tree.c (valid_new_delete_pair_p): Add argument. * tree.h (valid_new_delete_pair_p): Same. 2021-08-14 Jakub Jelinek PR target/101896 * config/i386/i386-expand.c (expand_vec_perm_broadcast_1) : For this mode assert !TARGET_AVX512BW || d->perm[0] rather than !TARGET_AVX2 || d->perm[0]. 2021-08-13 Michael Meissner PR target/99921 * config/rs6000/altivec.md (xxeval): Use register_predicate instead of altivec_register_predicate. 2021-08-13 Martin Sebor PR middle-end/101734 * tree-ssa-uninit.c (maybe_warn_read_write_only): New function. (maybe_warn_operand): Call it. 2021-08-13 Martin Liska PR ipa/101354 * attribs.c (decl_attributes): Make naked functions "noipa" functions. 2021-08-13 Martin Liska PR ipa/101261 * symtab.c (symtab_node::noninterposable_alias): Do not create local aliases for target_clone functions as the clonning pass rejects aliases. 2021-08-13 Martin Liska * opts.c (LIVE_PATCHING_OPTION): Define. (control_options_for_live_patching): Use it in error messages. 2021-08-13 Jan Hubicka * ipa-modref.c (dump_eaf_flags): Dump EAF_NOREAD. (implicit_const_eaf_flags, implicit_pure_eaf_flags, ignore_stores_eaf_flags): New constants. (remove_useless_eaf_flags): New function. (eaf_flags_useful_p): Use it. (deref_flags): Add EAF_NOT_RETURNED if flag is unused; handle EAF_NOREAD. (modref_lattice::init): Add EAF_NOREAD. (modref_lattice::add_escape_point): Do not reacord escape point if result is unused. (modref_lattice::merge): EAF_NOESCAPE implies EAF_NODIRECTESCAPE; use remove_useless_eaf_flags. (modref_lattice::merge_deref): Use ignore_stores_eaf_flags. (modref_lattice::merge_direct_load): Add EAF_NOREAD (analyze_ssa_name_flags): Fix handling EAF_NOT_RETURNED (analyze_parms): Use remove_useless_eaf_flags. (ipa_merge_modref_summary_after_inlining): Use ignore_stores_eaf_flags. (modref_merge_call_site_flags): Add caller and ecf_flags parameter; use remove_useless_eaf_flags. (modref_propagate_flags_in_scc): Update. * ipa-modref.h: Turn eaf_flags_t back to char. * tree-core.h (EAF_NOT_RETURNED): Fix. (EAF_NOREAD): New constant * tree-ssa-alias.c: (ref_maybe_used_by_call_p_1): Check for EAF_NOREAD. * tree-ssa-structalias.c (handle_rhs_call): Handle new flags. (handle_pure_call): Likewise. 2021-08-12 Jakub Jelinek * tree.def (OMP_MASKED): New tree code. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_FILTER. * tree.h (OMP_MASKED_BODY, OMP_MASKED_CLAUSES, OMP_MASKED_COMBINED, OMP_CLAUSE_FILTER_EXPR): Define. * tree.c (omp_clause_num_ops): Add OMP_CLAUSE_FILTER entry. (omp_clause_code_name): Likewise. (walk_tree_1): Handle OMP_CLAUSE_FILTER. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_FILTER. (convert_nonlocal_reference_stmt, convert_local_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_MASTER. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_FILTER. (dump_generic_node): Handle OMP_MASTER. * gimple.def (GIMPLE_OMP_MASKED): New gimple code. * gimple.c (gimple_build_omp_masked): New function. (gimple_copy): Handle GIMPLE_OMP_MASKED. * gimple.h (gimple_build_omp_masked): Declare. (gimple_has_substatements): Handle GIMPLE_OMP_MASKED. (gimple_omp_masked_clauses, gimple_omp_masked_clauses_ptr, gimple_omp_masked_set_clauses): New inline functions. (CASE_GIMPLE_OMP): Add GIMPLE_OMP_MASKED. * gimple-pretty-print.c (dump_gimple_omp_masked): New function. (pp_gimple_stmt_1): Handle GIMPLE_OMP_MASKED. * gimple-walk.c (walk_gimple_stmt): Likewise. * gimple-low.c (lower_stmt): Likewise. * gimplify.c (is_gimple_stmt): Handle OMP_MASTER. (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_FILTER. For clauses that take one expression rather than decl or constant, force gimplification of that into a SSA_NAME or temporary unless min invariant. (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_FILTER. (gimplify_expr): Handle OMP_MASKED. * tree-inline.c (remap_gimple_stmt): Handle GIMPLE_OMP_MASKED. (estimate_num_insns): Likewise. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_FILTER. (check_omp_nesting_restrictions): Handle GIMPLE_OMP_MASKED. Adjust diagnostics for existence of masked construct. (scan_omp_1_stmt, lower_omp_master, lower_omp_1, diagnose_sb_1, diagnose_sb_2): Handle GIMPLE_OMP_MASKED. * omp-expand.c (expand_omp_synch, expand_omp, omp_make_gimple_edges): Likewise. 2021-08-12 Uroš Bizjak PR target/98309 * config/i386/i386.md (avx512f_scalef2): New insn pattern. (ldexp3): Use avx512f_scalef2. (UNSPEC_SCALEF): Move from ... * config/i386/sse.md (UNSPEC_SCALEF): ... here. 2021-08-12 Jan Hubicka * ipa-split.c (consider_split): Fix condition testing void functions. 2021-08-12 Aldy Hernandez * doc/invoke.texi: Remove docs for threader-mode param. * flag-types.h (enum threader_mode): Remove. * params.opt: Remove threader-mode param. * tree-ssa-threadbackward.c (class back_threader): Remove path_is_unreachable_p. Make find_paths private. Add maybe_thread and thread_through_all_blocks. Remove reference marker for m_registry. Remove reference marker for m_profit. (back_threader::back_threader): Adjust for registry and profit not being references. (dump_path): Move down. (debug): Move down. (class thread_jumps): Remove. (class back_threader_registry): Remove m_all_paths. Remove destructor. (thread_jumps::thread_through_all_blocks): Move to back_threader class. (fsm_find_thread_path): Remove (back_threader::maybe_thread): New. (back_threader::thread_through_all_blocks): Move from thread_jumps. (back_threader_registry::back_threader_registry): Remove m_all_paths. (back_threader_registry::~back_threader_registry): Remove. (thread_jumps::find_taken_edge): Remove. (thread_jumps::check_subpath_and_update_thread_path): Remove. (thread_jumps::maybe_register_path): Remove. (thread_jumps::handle_phi): Remove. (handle_assignment_p): Remove. (thread_jumps::handle_assignment): Remove. (thread_jumps::fsm_find_control_statement_thread_paths): Remove. (thread_jumps::find_jump_threads_backwards): Remove. (thread_jumps::find_jump_threads_backwards_with_ranger): Remove. (try_thread_blocks): Rename find_jump_threads_backwards to maybe_thread. (pass_early_thread_jumps::execute): Same. 2021-08-12 Tobias Burnus * tree-core.h (omp_clause_proc_bind_kind): Add OMP_CLAUSE_PROC_BIND_PRIMARY. * tree-pretty-print.c (dump_omp_clause): Add TODO comment to change 'master' to 'primary' in proc_bind for OpenMP 5.1. 2021-08-12 Claudiu Zissulescu * common/config/arc/arc-common.c (arc_option_init_struct): Remove fno-common reference. * config/arc/arc.c (arc_override_options): Remove overriding of flag_no_common. 2021-08-12 Jakub Jelinek PR target/101860 * config/i386/i386-expand.c (ix86_expand_vec_one_operand_perm_avx512): If d->testing_p, return true after performing checks instead of actually expanding the insn. (expand_vec_perm_broadcast_1): Handle V32HImode - assert !TARGET_AVX512BW and return false. 2021-08-12 Eric Botcazou * configure.ac (PE linker --disable-dynamicbase support): New check. * configure: Regenerate. * config.in: Likewise. * config/i386/mingw32.h (LINK_SPEC_DISABLE_DYNAMICBASE): New define. (LINK_SPEC): Use it. * config/i386/mingw-w64.h (LINK_SPEC_DISABLE_DYNAMICBASE): Likewise. (LINK_SPEC): Likewise. 2021-08-12 liuhongt PR target/101846 * config/i386/sse.md (*avx2_zero_extendv16qiv16hi2_2): New post_reload define_insn_and_split. (*avx512bw_zero_extendv32qiv32hi2_2): Ditto. (*sse4_1_zero_extendv8qiv8hi2_4): Ditto. (*avx512f_zero_extendv16hiv16si2_2): Ditto. (*avx2_zero_extendv8hiv8si2_2): Ditto. (*sse4_1_zero_extendv4hiv4si2_4): Ditto. (*avx512f_zero_extendv8siv8di2_2): Ditto. (*avx2_zero_extendv4siv4di2_2): Ditto. (*sse4_1_zero_extendv2siv2di2_4): Ditto. (VI248_256, VI248_512, VI148_512, VI148_256, VI148_128): New mode iterator. 2021-08-11 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 stanzas. 2021-08-11 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add vsx stanza. 2021-08-11 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza. * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move initialization of pcvoid_type_node here... (altivec_init_builtins): ...from here. * config/rs6000/rs6000.h (rs6000_builtin_type_index): Add RS6000_BTI_const_ptr_void. (pcvoid_type_node): New macro. 2021-08-11 Richard Biener PR target/101877 * tree-ssa-forwprop.c (pass_forwprop::execute): Do not decompose hard-register accesses. 2021-08-11 Richard Biener * tree-ssa-operands.c (operands_scanner::get_expr_operands): Do not look at COMPONENT_REF FIELD_DECLs TREE_THIS_VOLATILE to determine has_volatile_ops. 2021-08-11 Eric Botcazou * cfgexpand.c (expand_used_vars): Reuse attribs local variable. 2021-08-11 Jan Hubicka Alexandre Oliva * ipa-modref.c (modref_lattice::dump): Fix escape_point's min_flags dumping. (modref_lattice::merge_deref): Fix handling of indirect scape points. (update_escape_summary_1): Likewise. (update_escape_summary): Likewise. (ipa_merge_modref_summary_after_inlining): Likewise. 2021-08-11 Richard Biener PR middle-end/101858 * fold-const.c (fold_binary_loc): Guard simplification of X < (cast) (1 << Y) to integer types. 2021-08-11 Richard Biener PR tree-optimization/101861 * tree-vect-stmts.c (vectorizable_load): Fix error in previous change with regard to gather vectorization. 2021-08-11 prathamesh.kulkarni PR target/66791 * config/arm/arm_neon.h (vdup_n_s8): Replace call to builtin with constructor. (vdup_n_s16): Likewise. (vdup_n_s32): Likewise. (vdup_n_s64): Likewise. (vdup_n_u8): Likewise. (vdup_n_u16): Likewise. (vdup_n_u32): Likewise. (vdup_n_u64): Likewise. (vdup_n_p8): Likewise. (vdup_n_p16): Likewise. (vdup_n_p64): Likewise. (vdup_n_f16): Likewise. (vdup_n_f32): Likewise. (vdupq_n_s8): Likewise. (vdupq_n_s16): Likewise. (vdupq_n_s32): Likewise. (vdupq_n_s64): Likewise. (vdupq_n_u8): Likewise. (vdupq_n_u16): Likewise. (vdupq_n_u32): Likewise. (vdupq_n_u64): Likewise. (vdupq_n_p8): Likewise. (vdupq_n_p16): Likewise. (vdupq_n_p64): Likewise. (vdupq_n_f16): Likewise. (vdupq_n_f32): Likewise. (vmov_n_s8): Replace call to builtin with call to corresponding vdup_n intrinsic. (vmov_n_s16): Likewise. (vmov_n_s32): Likewise. (vmov_n_s64): Likewise. (vmov_n_u8): Likewise. (vmov_n_u16): Likewise. (vmov_n_u32): Likewise. (vmov_n_u64): Likewise. (vmov_n_p8): Likewise. (vmov_n_p16): Likewise. (vmov_n_f16): Likewise. (vmov_n_f32): Likewise. (vmovq_n_s8): Likewise. (vmovq_n_s16): Likewise. (vmovq_n_s32): Likewise. (vmovq_n_s64): Likewise. (vmovq_n_u8): Likewise. (vmovq_n_u16): Likewise. (vmovq_n_u32): Likewise. (vmovq_n_u64): Likewise. (vmovq_n_p8): Likewise. (vmovq_n_p16): Likewise. (vmovq_n_f16): Likewise. (vmovq_n_f32): Likewise. * config/arm/arm_neon_builtins.def: Remove entries for vdup_n. 2021-08-11 liuhongt PR target/98309 * config/i386/i386.md (ldexp3): Extend to vscalefs[sd] when TARGET_AVX512F and TARGET_SSE_MATH. 2021-08-10 Jakub Jelinek PR target/80355 * config/i386/i386-expand.c (expand_vec_perm_even_odd): Return false for V32HImode if !TARGET_AVX512BW. (ix86_vectorize_vec_perm_const) : If !TARGET_AVX512BW and TARGET_AVX512F and d.testing_p, don't fail early, but actually check the permutation. 2021-08-10 Richard Biener PR tree-optimization/101809 * tree-vect-stmts.c (get_load_store_type): Allow emulated gathers with offset vector nunits being a constant multiple of the data vector nunits. (vect_get_gather_scatter_ops): Use the appropriate nunits for the offset vector defs. (vectorizable_store): Adjust call to vect_get_gather_scatter_ops. (vectorizable_load): Likewise. Handle the case of less offset vectors than data vectors. 2021-08-10 Jakub Jelinek PR target/80355 * config/i386/sse.md (*avx512f_shuf_64x2_1_1, *avx512f_shuf_32x4_1_1): New define_insn patterns. 2021-08-10 Richard Biener PR tree-optimization/101801 PR tree-optimization/101819 * tree-vectorizer.h (vect_emulated_vector_p): Declare. * tree-vect-loop.c (vect_emulated_vector_p): New function. (vectorizable_reduction): Re-instantiate a check for emulated operations. * tree-vect-stmts.c (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. Cost emulated vector operations according to the scalar sequence synthesized by vector lowering. 2021-08-10 Richard Biener PR middle-end/101824 * tree-nested.c (get_frame_field): Mark the COMPONENT_REF as volatile in case the variable was. 2021-08-10 H.J. Lu PR target/101804 * config/i386/constraints.md (BC): Document for integer SSE constant all bits set operand. (BF): New constraint for const floating-point all bits set vectors. * config/i386/i386.c (standard_sse_constant_p): Likewise. (standard_sse_constant_opcode): Likewise. * config/i386/sse.md (sseconstm1): New mode attribute. (mov_internal): Replace BC with . 2021-08-10 liuhongt * config/i386/sse.md (cond_): New expander. (VI248_AVX512VLBW): New mode iterator. * config/i386/predicates.md (nonimmediate_or_const_vec_dup_operand): New predicate. 2021-08-09 Andrew MacLeod PR tree-optimization/101741 * gimple-range-fold.cc (fold_using_range::range_of_builtin_call): Check type of parameter for toupper/tolower. 2021-08-09 Martin Jambor PR testsuite/101654 * ipa-prop.c (propagate_controlled_uses): Removed a spurious space. 2021-08-09 Pat Haugen * config/rs6000/rs6000.c (is_load_insn1): Verify destination is a register. (is_store_insn1): Verify source is a register. 2021-08-09 Uroš Bizjak PR target/101812 * config/i386/mmx.md (v2sf3): Rename from *mmx_v2sf3 2021-08-09 Thomas Schwinge * config/nvptx/nvptx.c: Cross-reference parts adapted in 'gcc/omp-oacc-neuter-broadcast.cc'. * omp-low.c: Likewise. * omp-oacc-neuter-broadcast.cc: Cross-reference parts adapted from the above files. 2021-08-09 Julian Brown Kwok Cheung Yeung Thomas Schwinge * config/gcn/gcn.c (gcn_init_builtins): Override decls for BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START, BUILT_IN_GOACC_SINGLE_COPY_END and BUILT_IN_GOACC_BARRIER. (gcn_goacc_validate_dims): Turn on worker partitioning unconditionally. (gcn_fork_join): Update comment. * config/gcn/gcn.opt (flag_worker_partitioning): Remove. (macc_experimental_workers): Remove unused option. 2021-08-09 Julian Brown Nathan Sidwell (via 'gcc/config/nvptx/nvptx.c' master) Kwok Cheung Yeung Thomas Schwinge * Makefile.in (OBJS): Add omp-oacc-neuter-broadcast.o. * doc/tm.texi.in (TARGET_GOACC_CREATE_WORKER_BROADCAST_RECORD): Add documentation hook. * doc/tm.texi: Regenerate. * omp-oacc-neuter-broadcast.cc: New file. * omp-builtins.def (BUILT_IN_GOACC_BARRIER) (BUILT_IN_GOACC_SINGLE_START, BUILT_IN_GOACC_SINGLE_COPY_START) (BUILT_IN_GOACC_SINGLE_COPY_END): New builtins. * passes.def (pass_omp_oacc_neuter_broadcast): Add pass. * target.def (goacc.create_worker_broadcast_record): Add target hook. * tree-pass.h (make_pass_omp_oacc_neuter_broadcast): Add prototype. * config/gcn/gcn-protos.h (gcn_goacc_adjust_propagation_record): Rename prototype to... (gcn_goacc_create_worker_broadcast_record): ... this. * config/gcn/gcn-tree.c (gcn_goacc_adjust_propagation_record): Rename function to... (gcn_goacc_create_worker_broadcast_record): ... this. * config/gcn/gcn.c (TARGET_GOACC_ADJUST_PROPAGATION_RECORD): Rename to... (TARGET_GOACC_CREATE_WORKER_BROADCAST_RECORD): ... this. 2021-08-09 Tejas Belagod PR target/101609 * config/aarch64/aarch64-simd.md (vlshr3, vashr3): Use the right iterator. 2021-08-09 Thomas Schwinge * Makefile.in (GTFILES): Remove '$(srcdir)/omp-offload.c'. 2021-08-09 Thomas Schwinge * builtins.def (DEF_GOACC_BUILTIN, DEF_GOMP_BUILTIN): Don't consider '-foffload-abi'. * common.opt (-foffload-abi): Remove 'Var', 'Init'. * opts.c (common_handle_option) <-foffload-abi> [ACCEL_COMPILER]: Ignore. 2021-08-09 Thomas Schwinge * optc-gen.awk: Sanity check that 'Init' doesn't appear without 'Var'. 2021-08-09 Thomas Schwinge * omp-builtins.def (BUILT_IN_ACC_GET_DEVICE_TYPE): Remove. 2021-08-09 Thomas Schwinge * doc/gty.texi (Files): Update. 2021-08-09 Thomas Schwinge * doc/gty.texi (Files): Fix GTY header file example. 2021-08-09 Roger Sayle * tree-ssa-ccp.c (value_mask_to_min_max): Helper function to determine the upper and lower bounds from a mask-value pair. (bit_value_unop) [ABS_EXPR, ABSU_EXPR]: Add support for absolute value and unsigned absolute value expressions. (bit_value_binop): Initialize *VAL's precision. [LT_EXPR, LE_EXPR]: Use value_mask_to_min_max to determine upper and lower bounds of operands. Add LE_EXPR/GE_EXPR support when the operands are unknown but potentially equal. [MIN_EXPR, MAX_EXPR]: Support minimum/maximum expressions. 2021-08-09 Bin Cheng * config/aarch64/aarch64.md (*extend2_aarch64): Use %0. 2021-08-08 Sergei Trofimovich * lra-constraints.c: Fix s/otput/output/ typo. 2021-08-06 Martin Sebor * builtins.c (expand_builtin_memchr): Move to gimple-ssa-warn-access.cc. (expand_builtin_strcat): Same. (expand_builtin_stpncpy): Same. (expand_builtin_strncat): Same. (check_read_access): Same. (check_memop_access): Same. (expand_builtin_strlen): Move checks to gimple-ssa-warn-access.cc. (expand_builtin_strnlen): Same. (expand_builtin_memcpy): Same. (expand_builtin_memmove): Same. (expand_builtin_mempcpy): Same. (expand_builtin_strcpy): Same. (expand_builtin_strcpy_args): Same. (expand_builtin_stpcpy_1): Same. (expand_builtin_strncpy): Same. (expand_builtin_memset): Same. (expand_builtin_bzero): Same. (expand_builtin_strcmp): Same. (expand_builtin_strncmp): Same. (expand_builtin): Remove handlers. (fold_builtin_strlen): Add a comment. * builtins.h (check_access): Move to gimple-ssa-warn-access.cc. * calls.c (maybe_warn_nonstring_arg): Same. * diagnostic-spec.c (nowarn_spec_t::nowarn_spec_t): Add warning option. * gimple-fold.c (gimple_fold_builtin_strcpy): Pass argument to callee. (gimple_fold_builtin_stpcpy): Same. * gimple-ssa-warn-access.cc (has_location): New function. (get_location): Same. (get_callee_fndecl): Same. (call_nargs): Same. (call_arg): Same. (warn_string_no_nul): Define. (unterminated_array): Same. (check_nul_terminated_array): Same. (maybe_warn_nonstring_arg): Same. (maybe_warn_for_bound): Same. (warn_for_access): Same. (check_access): Same. (check_memop_access): Same. (check_read_access): Same. (warn_dealloc_offset): Use helper functions. (maybe_emit_free_warning): Same. (class pass_waccess): Add members. (check_strcat): New function. (check_strncat): New function. (check_stxcpy): New function. (check_stxncpy): New function. (check_strncmp): New function. (pass_waccess::check_builtin): New function. (pass_waccess::check): Call it. * gimple-ssa-warn-access.h (warn_string_no_nul): Move here from builtins.h. (maybe_warn_for_bound): Same. (check_access): Same. (check_memop_access): Same. (check_read_access): Same. * pointer-query.h (struct access_data): Define a ctor overload. 2021-08-06 Richard Biener PR tree-optimization/101801 * tree-vectorizer.h (vect_worthwhile_without_simd_p): Rename... (vect_can_vectorize_without_simd_p): ... to this. * tree-vect-loop.c (vect_worthwhile_without_simd_p): Rename... (vect_can_vectorize_without_simd_p): ... to this and fold in vect_min_worthwhile_factor. (vect_min_worthwhile_factor): Remove. (vectorizable_reduction): Adjust and remove the cost part. * tree-vect-stmts.c (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. 2021-08-06 Uroš Bizjak PR target/101797 * config/i386/i386.md (cmove reg-to-reg move elimination peephole2s): Add general_gr_operand predicate to operand 3. 2021-08-06 Roger Sayle * tree-ssa-phiopt.c (cond_removal_in_builtin_zero_pattern): Use CFN_BUILT_IN_CLRSB* instead of BUILT_IN_CLRSB* for consistency. 2021-08-06 Tamar Christina * config/aarch64/aarch64-sve-builtins.cc (register_svpattern, register_svprfop): Pass vec<> by pointer. * langhooks-def.h (lhd_simulate_enum_decl): Likewise. * langhooks.c (lhd_simulate_enum_decl): Likewise. * langhooks.h (struct lang_hooks_for_types): Likewise. 2021-08-06 Jonathan Wright * config/aarch64/arm_neon.h (vst1_bf16_x2): Use __builtin_memcpy instead of constructing an additional __builtin_aarch64_simd_oi one vector at a time. (vst1q_bf16_x2): Likewise. (vst1_bf16_x3): Use __builtin_memcpy instead of constructing an additional __builtin_aarch64_simd_ci one vector at a time. (vst1q_bf16_x3): Likewise. (vst1_bf16_x4): Use __builtin_memcpy instead of a union. (vst1q_bf16_x4): Likewise. (vst2_bf16): Use __builtin_memcpy instead of constructing an additional __builtin_aarch64_simd_oi one vector at a time. (vst2q_bf16): Likewise. (vst3_bf16): Use __builtin_memcpy instead of constructing an additional __builtin_aarch64_simd_ci mode one vector at a time. (vst3q_bf16): Likewise. (vst4_bf16): Use __builtin_memcpy instead of constructing an additional __builtin_aarch64_simd_xi one vector at a time. (vst4q_bf16): Likewise. 2021-08-06 Jonathan Wright * config/aarch64/arm_neon.h (__ST2_LANE_FUNC): Delete. (__ST2Q_LANE_FUNC): Delete. (vst2_lane_f16): Use __builtin_memcpy to copy vector structure instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vst2_lane_f32): Likewise. (vst2_lane_f64): Likewise. (vst2_lane_p8): Likewise. (vst2_lane_p16): Likewise. (vst2_lane_p64): Likewise. (vst2_lane_s8): Likewise. (vst2_lane_s16): Likewise. (vst2_lane_s32): Likewise. (vst2_lane_s64): Likewise. (vst2_lane_u8): Likewise. (vst2_lane_u16): Likewise. (vst2_lane_u32): Likewise. (vst2_lane_u64): Likewise. (vst2_lane_bf16): Likewise. (vst2q_lane_f16): Use __builtin_memcpy to copy vector structure instead of using a union. (vst2q_lane_f32): Likewise. (vst2q_lane_f64): Likewise. (vst2q_lane_p8): Likewise. (vst2q_lane_p16): Likewise. (vst2q_lane_p64): Likewise. (vst2q_lane_s8): Likewise. (vst2q_lane_s16): Likewise. (vst2q_lane_s32): Likewise. (vst2q_lane_s64): Likewise. (vst2q_lane_u8): Likewise. (vst2q_lane_u16): Likewise. (vst2q_lane_u32): Likewise. (vst2q_lane_u64): Likewise. (vst2q_lane_bf16): Likewise. 2021-08-06 Jonathan Wright * config/aarch64/arm_neon.h (__ST3_LANE_FUNC): Delete. (__ST3Q_LANE_FUNC): Delete. (vst3_lane_f16): Use __builtin_memcpy to copy vector structure instead of constructing __builtin_aarch64_simd_ci one vector at a time. (vst3_lane_f32): Likewise. (vst3_lane_f64): Likewise. (vst3_lane_p8): Likewise. (vst3_lane_p16): Likewise. (vst3_lane_p64): Likewise. (vst3_lane_s8): Likewise. (vst3_lane_s16): Likewise. (vst3_lane_s32): Likewise. (vst3_lane_s64): Likewise. (vst3_lane_u8): Likewise. (vst3_lane_u16): Likewise. (vst3_lane_u32): Likewise. (vst3_lane_u64): Likewise. (vst3_lane_bf16): Likewise. (vst3q_lane_f16): Use __builtin_memcpy to copy vector structure instead of using a union. (vst3q_lane_f32): Likewise. (vst3q_lane_f64): Likewise. (vst3q_lane_p8): Likewise. (vst3q_lane_p16): Likewise. (vst3q_lane_p64): Likewise. (vst3q_lane_s8): Likewise. (vst3q_lane_s16): Likewise. (vst3q_lane_s32): Likewise. (vst3q_lane_s64): Likewise. (vst3q_lane_u8): Likewise. (vst3q_lane_u16): Likewise. (vst3q_lane_u32): Likewise. (vst3q_lane_u64): Likewise. (vst3q_lane_bf16): Likewise. 2021-08-06 Jonathan Wright * config/aarch64/arm_neon.h (__ST4_LANE_FUNC): Delete. (__ST4Q_LANE_FUNC): Delete. (vst4_lane_f16): Use __builtin_memcpy to copy vector structure instead of constructing __builtin_aarch64_simd_xi one vector at a time. (vst4_lane_f32): Likewise. (vst4_lane_f64): Likewise. (vst4_lane_p8): Likewise. (vst4_lane_p16): Likewise. (vst4_lane_p64): Likewise. (vst4_lane_s8): Likewise. (vst4_lane_s16): Likewise. (vst4_lane_s32): Likewise. (vst4_lane_s64): Likewise. (vst4_lane_u8): Likewise. (vst4_lane_u16): Likewise. (vst4_lane_u32): Likewise. (vst4_lane_u64): Likewise. (vst4_lane_bf16): Likewise. (vst4q_lane_f16): Use __builtin_memcpy to copy vector structure instead of using a union. (vst4q_lane_f32): Likewise. (vst4q_lane_f64): Likewise. (vst4q_lane_p8): Likewise. (vst4q_lane_p16): Likewise. (vst4q_lane_p64): Likewise. (vst4q_lane_s8): Likewise. (vst4q_lane_s16): Likewise. (vst4q_lane_s32): Likewise. (vst4q_lane_s64): Likewise. (vst4q_lane_u8): Likewise. (vst4q_lane_u16): Likewise. (vst4q_lane_u32): Likewise. (vst4q_lane_u64): Likewise. (vst4q_lane_bf16): Likewise. 2021-08-06 Martin Liska * config/rs6000/rs6000.c (rs6000_option_override_internal): When a target option is restored, it can have rs6000_long_double_type_size set to FLOAT_PRECISION_TFmode and error should not be emitted. 2021-08-06 Sebastian Huber * gcov-io.h (gcov_write): Declare. * gcov-io.c (gcov_write): New. (gcov_write_counter): Remove. (gcov_write_tag_length): Likewise. (gcov_write_summary): Replace gcov_write_tag_length() with calls to gcov_write_unsigned(). * doc/invoke.texi (fprofile-info-section): Mention __gcov_info_to_gdca(). 2021-08-06 Martin Sebor * dominance.c (prune_bbs_to_update_dominators): Adjust by-value vec arguments to by-reference. (iterate_fix_dominators): Same. * dominance.h (iterate_fix_dominators): Same. * ipa-prop.h: Call auto_vec::to_vec_legacy. * tree-data-ref.c (dump_data_dependence_relation): Adjust by-value vec arguments to by-reference. (debug_data_dependence_relation): Same. (dump_data_dependence_relations): Same. * tree-data-ref.h (debug_data_dependence_relation): Same. (dump_data_dependence_relations): Same. * tree-predcom.c (dump_chains): Same. (initialize_root_vars_lm): Same. (determine_unroll_factor): Same. (replace_phis_by_defined_names): Same. (insert_init_seqs): Same. (pcom_worker::tree_predictive_commoning_loop): Call auto_vec::to_vec_legacy. * tree-ssa-pre.c (insert_into_preds_of_block): Adjust by-value vec arguments to by-reference. * tree-ssa-threadbackward.c (populate_worklist): Same. (back_threader::resolve_def): Same. * tree-vect-data-refs.c (vect_check_nonzero_value): Same. (vect_enhance_data_refs_alignment): Same. (vect_check_lower_bound): Same. (vect_prune_runtime_alias_test_list): Same. (vect_permute_store_chain): Same. * tree-vect-slp-patterns.c (vect_normalize_conj_loc): Same. * tree-vect-stmts.c (vect_create_vectorized_demotion_stmts): Same. * tree-vectorizer.h (vect_permute_store_chain): Same. * vec.c (test_init): New function. (vec_c_tests): Call new function. * vec.h (vec): Declare ctors, dtor, and assignment. (auto_vec::vec_to_legacy): New function. (vec::copy): Adjust initialization. 2021-08-05 H.J. Lu PR target/99744 * config/i386/i386.c (ix86_can_inline_p): Ignore MASK_80387 if callee only uses GPRs. * config/i386/ia32intrin.h: Revert commit 5463cee2770. * config/i386/serializeintrin.h: Revert commit 71958f740f1. * config/i386/x86gprintrin.h: Add #pragma GCC target("general-regs-only") and #pragma GCC pop_options to disable non-GPR ISAs. 2021-08-05 Richard Sandiford PR middle-end/101787 * doc/md.texi (cond_ashl, cond_ashr, cond_lshr): Document. 2021-08-05 Richard Sandiford * tree-vectorizer.h (vect_is_store_elt_extraction, vect_is_reduction) (vect_reduc_type, vect_embedded_comparison_type, vect_comparison_type) (vect_is_extending_load, vect_is_integer_truncation): New functions, moved from aarch64.c but given different names. * config/aarch64/aarch64.c (aarch64_is_store_elt_extraction) (aarch64_is_reduction, aarch64_reduc_type) (aarch64_embedded_comparison_type, aarch64_comparison_type) (aarch64_extending_load_p, aarch64_integer_truncation_p): Delete in favor of the above. Update callers accordingly. 2021-08-05 Richard Earnshaw PR target/101723 * config/arm/arm-cpus.in (generic-armv7-a): Add quirk to suppress writing .cpu directive in asm output. * config/arm/arm.c (arm_identify_fpu_from_isa): New variable. (arm_last_printed_arch_string): Delete. (arm_last-printed_fpu_string): Delete. (arm_configure_build_target): If use of floating-point/SIMD is disabled, remove all fp/simd related features from the target ISA. (last_arm_targ_options): New variable. (arm_print_asm_arch_directives): Add new parameters. Change order of emitted directives and handle all cases here. (arm_file_start): Always call arm_print_asm_arch_directives, move all generation of .arch/.arch_extension here. (arm_file_end): Call arm_print_asm_arch. (arm_declare_function_name): Call arm_print_asm_arch_directives instead of printing .arch/.fpu directives directly. 2021-08-05 Richard Earnshaw * config/arm/arm.c (arm_configure_build_target): Don't call arm_option_reconfigure_globals. (arm_option_restore): Call arm_option_reconfigure_globals after reconfiguring the target. * config/arm/arm-c.c (arm_pragma_target_parse): Likewise. 2021-08-05 Richard Earnshaw * config/arm/arm.c (arm_configure_build_target): Ensure the target's arch_name is always set. 2021-08-05 Jonathan Wright * config/aarch64/aarch64.c: Traverse RTL tree to prevent cost of vec_select high-half from being added into Neon subtract cost. 2021-08-05 Jonathan Wright * config/aarch64/aarch64.c: Traverse RTL tree to prevent cost of vec_select high-half from being added into Neon add cost. 2021-08-05 Kewen Lin * cfgloop.h (loops_list::loops_list): Add one optional argument root and adjust accordingly, update loop tree walking and factor out to ... * cfgloop.c (loops_list::walk_loop_tree): ... this. New function. 2021-08-05 Eric Botcazou PR tree-optimization/101626 * tree-sra.c (propagate_subaccesses_from_rhs): Do not set the reverse scalar storage order on a pointer or vector component. 2021-08-05 liuhongt * config/i386/sse.md (cond_): New expander. 2021-08-05 liuhongt * config/i386/sse.md (cond_): New expander. 2021-08-05 liuhongt * config/i386/sse.md (cond_): New expander. 2021-08-04 David Malcolm PR analyzer/101570 * Makefile.in (ANALYZER_OBJS): Add analyzer/region-model-asm.o. 2021-08-04 H.J. Lu PR target/101742 * config/i386/i386.h (STORE_MAX_PIECES): Allow 16/32/64 bytes only if TARGET_INTER_UNIT_MOVES_TO_VEC is true. 2021-08-04 H.J. Lu PR target/101772 * config/i386/i386-expand.c (ix86_expand_vector_move): Call ix86_gen_scratch_sse_rtx to get a scratch SSE register to copy data with SSE register from one memory location to another. 2021-08-04 Andreas Krebbel * config/s390/s390.c (expand_perm_with_vpdi): New function. (vectorize_vec_perm_const_1): Call expand_perm_with_vpdi. * config/s390/vector.md (*vpdi1, @vpdi1): Enable a parameterized expander. (*vpdi4, @vpdi4): Likewise. 2021-08-04 Andreas Krebbel * config/s390/s390.c (MAX_VECT_LEN): Define macro. (struct expand_vec_perm_d): Define struct. (expand_perm_with_merge): New function. (vectorize_vec_perm_const_1): New function. (s390_vectorize_vec_perm_const): New function. (TARGET_VECTORIZE_VEC_PERM_CONST): Define target macro. 2021-08-04 Andreas Krebbel * config/s390/vector.md (V_HW_64): Remove mode iterator. (*vec_load_pair): Use V_HW_2 instead of V_HW_64. * config/s390/vx-builtins.md (vec_scatter_element_SI): Use V_HW_2 instead of V_HW_64. 2021-08-04 Andreas Krebbel * config/s390/s390.md (UNSPEC_VEC_PERMI): Remove constant definition. * config/s390/vector.md (*vpdi1, *vpdi4): New pattern definitions. * config/s390/vx-builtins.md (*vec_permi): Emit generic rtx instead of an unspec. 2021-08-04 Andreas Krebbel * config/s390/s390-modes.def: Add more vector modes to support concatenation of two vectors. * config/s390/s390-protos.h (s390_expand_merge_perm_const): Add prototype. (s390_expand_merge): Likewise. * config/s390/s390.c (s390_expand_merge_perm_const): New function. (s390_expand_merge): New function. * config/s390/s390.md (UNSPEC_VEC_MERGEH, UNSPEC_VEC_MERGEL): Remove constant definitions. * config/s390/vector.md (V_HW_2): Add mode iterators. (VI_HW_4, V_HW_4): Rename VI_HW_4 to V_HW_4. (vec_2x_nelts, vec_2x_wide): New mode attributes. (*vmrhb, *vmrlb, *vmrhh, *vmrlh, *vmrhf, *vmrlf, *vmrhg, *vmrlg): New pattern definitions. (vec_widen_umult_lo_, vec_widen_umult_hi_) (vec_widen_smult_lo_, vec_widen_smult_hi_) (vec_unpacks_lo_v4sf, vec_unpacks_hi_v4sf, vec_unpacks_lo_v2df) (vec_unpacks_hi_v2df): Adjust expanders to emit non-unspec RTX for vec merge. * config/s390/vx-builtins.md (V_HW_4): Remove mode iterator. Now in vector.md. (vec_mergeh, vec_mergel): Use s390_expand_merge to emit vec merge pattern. 2021-08-04 Jonathan Wright * config/aarch64/aarch64.c (aarch64_strip_extend_vec_half): Define. (aarch64_rtx_mult_cost): Traverse RTL tree to prevent cost of vec_select high-half from being added into Neon multiply cost. * rtlanal.c (vec_series_highpart_p): Define. * rtlanal.h (vec_series_highpart_p): Declare. 2021-08-04 Jonathan Wright * config/aarch64/aarch64.c (aarch64_strip_duplicate_vec_elt): Define. (aarch64_rtx_mult_cost): Traverse RTL tree to prevent vec_select cost from being added into Neon multiply cost. 2021-08-04 Richard Sandiford * tree-vect-loop.c (vect_better_loop_vinfo_p): Detect cases in which old_loop_vinfo is an epilogue loop that handles a constant number of iterations. 2021-08-04 Richard Sandiford * tree-vect-loop.c (vect_analyze_loop): Print a dump message when a reanalyzed loop fails to be cheaper than the current main loop. 2021-08-04 Richard Sandiford * config/aarch64/aarch64.c: Fix a typo. 2021-08-04 Vincent Lefèvre PR gcov-profile/101773 * gcov-io.c (gcov_close): Check return code of a fclose. 2021-08-04 Bernd Edlinger PR ada/101575 * dwarf2out.c (dwarf2out_assembly_start): Emit a dummy .file statement when needed. 2021-08-04 Richard Biener * tree-vect-data-refs.c (vect_check_gather_scatter): Include widening conversions only when the result is still handed by native gather or the current offset size not already matches the data size. Also succeed analysis in case there's no native support, noted by a IFN_LAST ifn and a NULL decl. (vect_analyze_data_refs): Always consider gathers. * tree-vect-patterns.c (vect_recog_gather_scatter_pattern): Test for no IFN gather rather than decl gather. * tree-vect-stmts.c (vect_model_load_cost): Pass in the gather-scatter info and cost emulated gathers accordingly. (vect_truncate_gather_scatter_offset): Properly test for no IFN gather. (vect_use_strided_gather_scatters_p): Likewise. (get_load_store_type): Handle emulated gathers and its restrictions. (vectorizable_load): Likewise. Emulate them by extracting scalar offsets, doing scalar loads and a vector construct. 2021-08-04 H.J. Lu PR target/101742 * expr.c (op_by_pieces_d::op_by_pieces_d): Add a max_pieces argument to set m_max_size. (move_by_pieces_d): Pass MOVE_MAX_PIECES to op_by_pieces_d. (store_by_pieces_d): Pass STORE_MAX_PIECES to op_by_pieces_d. (compare_by_pieces_d): Pass COMPARE_MAX_PIECES to op_by_pieces_d. 2021-08-04 Roger Sayle Marc Glisse * match.pd (bit_ior, bit_xor): Canonicalize (X*C1)|(X*C2) and (X*C1)^(X*C2) as X*(C1+C2), and related variants, using tree_nonzero_bits to ensure that operands are bit-wise disjoint. 2021-08-04 Richard Biener * tree-ssa-forwprop.c (pass_forwprop::execute): Split out code to decompose vector loads ... (optimize_vector_load): ... here. Generalize it to handle intermediate widening and TARGET_MEM_REF loads and apply it to loads with a supported vector mode as well. 2021-08-04 Richard Biener PR tree-optimization/101756 * tree-vect-slp.c (vectorizable_bb_reduc_epilogue): Make sure the result of the reduction epilogue is compatible to the original scalar result. 2021-08-04 liuhongt PR target/101743 * config/i386/i386.md (peephole2): Refine predicate from register_operand to general_reg_operand. 2021-08-04 Aldy Hernandez * gimple-range-path.h (path_range_query::dump): Mark override. 2021-08-04 Richard Biener PR tree-optimization/101769 * tree-tailcall.c (eliminate_tail_call): Add the created loop for the first recursion and return it via the new output parameter. (optimize_tail_call): Pass through new output param. (tree_optimize_tail_calls_1): After creating all latches, add the created loop to the loop tree. Do not mark loops for fixup. 2021-08-04 Martin Liska * doc/invoke.texi: Document threader-mode param. 2021-08-04 liuhongt * config/i386/sse.md (cond_fma): New expander. (cond_fms): Ditto. (cond_fnma): Ditto. (cond_fnms): Ditto. 2021-08-03 Segher Boessenkool * config/rs6000/vsx.md (*vsx_le_perm_store_): Use && instead of &. 2021-08-03 Segher Boessenkool * config/rs6000/constraints.md: Remove "e" from the list of available constraint characters. 2021-08-03 Eugene Rozenfeld PR gcov-profile/71672 * auto-profile.c (afdo_indirect_call): Fix setup of the historgram value for indirect calls. 2021-08-03 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_minpos_epu16): New. 2021-08-03 H.J. Lu * config/i386/i386.c (ix86_gen_scratch_sse_rtx): In 64-bit mode, try XMM31 to avoid vzeroupper. 2021-08-03 Richard Sandiford * doc/invoke.texi: Document -mtune=neoverse-512tvb and -mcpu=neoverse-512tvb. * config/aarch64/aarch64-cores.def (neoverse-512tvb): New entry. * config/aarch64/aarch64-tune.md: Regenerate. * config/aarch64/aarch64.c (neoverse512tvb_sve_vector_cost) (neoverse512tvb_sve_issue_info, neoverse512tvb_vec_issue_info) (neoverse512tvb_vector_cost, neoverse512tvb_tunings): New structures. (aarch64_adjust_body_cost_sve): Handle -mtune=neoverse-512tvb. (aarch64_adjust_body_cost): Likewise. 2021-08-03 Richard Sandiford * config/aarch64/aarch64.c (aarch64_add_stmt_cost): Only record issue information for operations that occur in the innermost loop. 2021-08-03 Richard Sandiford * config/aarch64/aarch64.c (aarch64_multiply_add_p): Add a vec_flags parameter. Detect cases in which an Advanced SIMD MLA would almost certainly require a MOV. (aarch64_count_ops): Update accordingly. 2021-08-03 Richard Sandiford * config/aarch64/aarch64.c (aarch64_is_store_elt_extraction): New function, split out from... (aarch64_detect_vector_stmt_subtype): ...here. (aarch64_add_stmt_cost): Treat extracting element 0 as free. 2021-08-03 Richard Sandiford * config/aarch64/aarch64-protos.h (sve_vec_cost): Add gather_load_x32_cost and gather_load_x64_cost. * config/aarch64/aarch64.c (generic_sve_vector_cost) (a64fx_sve_vector_cost, neoversev1_sve_vector_cost): Update accordingly, using the values given by the scalar_load * number of elements calculation that we used previously. (aarch64_detect_vector_stmt_subtype): Use the new fields. 2021-08-03 Richard Sandiford * config/aarch64/aarch64.c (aarch64_adjust_body_cost_sve): New function, split out from... (aarch64_adjust_body_cost): ...here. 2021-08-03 Richard Sandiford * config/aarch64/fractional-cost.h: New file. * config/aarch64/aarch64.c: Include (indirectly) and cost_fraction.h. (vec_cost_fraction): New typedef. (aarch64_detect_scalar_stmt_subtype): Use it for statement costs. (aarch64_detect_vector_stmt_subtype): Likewise. (aarch64_sve_adjust_stmt_cost, aarch64_adjust_stmt_cost): Likewise. (aarch64_estimate_min_cycles_per_iter): Use vec_cost_fraction for cycle counts. (aarch64_adjust_body_cost): Likewise. (aarch64_test_cost_fraction): New function. (aarch64_run_selftests): Call it. 2021-08-03 Richard Sandiford * config/aarch64/aarch64-protos.h (tune_params::sve_width): Turn into a bitmask. * config/aarch64/aarch64.c (aarch64_cmp_autovec_modes): Update accordingly. (aarch64_estimated_poly_value): Likewise. Use the least significant set bit for the minimum and likely values. Use the most significant set bit for the maximum value. 2021-08-03 liuhongt * config/i386/sse.md (cond_): New expander. (cond_mul): Ditto. 2021-08-03 Kewen Lin * tree-cfg.c (move_sese_region_to_fn): Fix typos on dloop. 2021-08-03 liuhongt * config/i386/sse.md (cond_):New expander. (cond_mul): Ditto. (cond_div): Ditto. 2021-08-02 H.J. Lu * config/i386/i386.c (ix86_finalize_stack_frame_flags): Also check stack_realign_needed for stack realignment. (ix86_legitimate_constant_p): Always allow CONST_WIDE_INT smaller than the largest integer supported by vector register. * config/i386/i386.h (MAX_MOVE_MAX): New. Set to 64. (MOVE_MAX): Set to bytes of the largest integer supported by vector register. (STORE_MAX_PIECES): New. 2021-08-02 H.J. Lu * config/i386/i386-expand.c (ix86_expand_vector_move): Call ix86_gen_scratch_sse_rtx to get a scratch SSE register to copy data from one memory location to another. 2021-08-02 H.J. Lu PR middle-end/90773 * config/i386/i386.c (TARGET_GEN_MEMSET_SCRATCH_RTX): New. 2021-08-02 Aldy Hernandez PR tree-optimization/101724 * params.opt: Remove --param=threader-iterative. * tree-ssa-threadbackward.c (pass_thread_jumps::execute): Remove iterative mode. 2021-08-02 Tom de Vries PR middle-end/101665 * doc/extend.texi (nonnull attribute): Improve documentation. 2021-08-02 Andrew Pinski PR rtl-optimization/101683 * rtlanal.c (may_trap_p_1): Handle UNSIGNED_FIX. 2021-08-02 Roger Sayle * tree-ssa-phiopt.c (cond_removal_in_builtin_zero_pattern): Renamed from cond_removal_in_popcount_clz_ctz_pattern. Add support for BSWAP, FFS, PARITY and CLRSB builtins. (tree_ssa_phiop_worker): Update call to function above. 2021-08-01 H.J. Lu PR target/78103 * config/i386/i386.md (bsr_rex64_1_zext): New. (combine splitter for constant - clzll): Replace gen_bsr_rex64_1 with gen_bsr_rex64_1_zext. 2021-07-31 Jakub Jelinek PR target/78103 * config/i386/i386.md (bsr_rex64_1, bsr_1, bsr_zext_1): New define_insn patterns. (*bsr_rex64_2, *bsr_2): New define_insn_and_split patterns. Add combine splitters for constant - clz. (clz2): Use a temporary pseudo for bsr result. 2021-07-30 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_floor_pd, _mm_floor_ps, _mm_floor_sd, _mm_floor_ss): New. 2021-07-30 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_ceil_pd, _mm_ceil_ps, _mm_ceil_sd, _mm_ceil_ss): New. 2021-07-30 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_blend_pd, _mm_blendv_pd, _mm_blend_ps, _mm_blendv_ps): New. 2021-07-30 Roger Sayle Uroš Bizjak * config/i386/i386.md (*dec_cmov): New define_insn_and_split to generate a conditional move using the carry flag after sub $1. (peephole2): Eliminate a register-to-register move by inverting the condition of a conditional move. 2021-07-30 Hans-Peter Nilsson * config/mmix/mmix.md ("call", "call_value", "*call_real") ("*call_value_real"): Don't generate rtx mentioning the generic operands 1 and 2 to "call", and similarly for "call_value". * config/mmix/mmix.c (mmix_print_operand_punct_valid_p) (mmix_print_operand): Use '!' instead of 'p'. 2021-07-30 Hans-Peter Nilsson * doc/md.texi (call): Correct information about operand 2. * config/mmix/mmix.md ("call", "call_value"): Remove fixed FIXMEs. 2021-07-30 Andrew MacLeod * range-op.cc (operator_trunc_mod::wi_fold): Fold constants. 2021-07-30 Andrew MacLeod * range-op.cc (operator_div::wi_fold): Return UNDEFINED for [0, 0] divisor. 2021-07-30 Andrew MacLeod * gimple-range-cache.cc (*::set_bb_range): Change const basic_block to const_basic_block.. (*::get_bb_range): Ditto. (*::bb_range_p): Ditto. * gimple-range-cache.h: Change prototypes. 2021-07-30 H.J. Lu PR middle-end/90773 * builtins.c (builtin_memcpy_read_str): Change the mode argument from scalar_int_mode to fixed_size_mode. (builtin_strncpy_read_str): Likewise. (gen_memset_value_from_prev): New function. (builtin_memset_read_str): Change the mode argument from scalar_int_mode to fixed_size_mode. Use gen_memset_value_from_prev and support CONST_VECTOR. (builtin_memset_gen_str): Likewise. (try_store_by_multiple_pieces): Use by_pieces_constfn to declare constfun. * builtins.h (builtin_strncpy_read_str): Replace scalar_int_mode with fixed_size_mode. (builtin_memset_read_str): Likewise. * expr.c (widest_int_mode_for_size): Renamed to ... (widest_fixed_size_mode_for_size): Add a bool argument to indicate if QI vector mode can be used. (by_pieces_ninsns): Call widest_fixed_size_mode_for_size instead of widest_int_mode_for_size. (pieces_addr::adjust): Change the mode argument from scalar_int_mode to fixed_size_mode. (op_by_pieces_d): Make m_len read-only. Add a bool member, m_qi_vector_mode, to indicate that QI vector mode can be used. (op_by_pieces_d::op_by_pieces_d): Add a bool argument to initialize m_qi_vector_mode. Call widest_fixed_size_mode_for_size instead of widest_int_mode_for_size. (op_by_pieces_d::get_usable_mode): Change the mode argument from scalar_int_mode to fixed_size_mode. Call widest_fixed_size_mode_for_size instead of widest_int_mode_for_size. (op_by_pieces_d::smallest_fixed_size_mode_for_size): New member function to return the smallest integer or QI vector mode. (op_by_pieces_d::run): Call widest_fixed_size_mode_for_size instead of widest_int_mode_for_size. Call smallest_fixed_size_mode_for_size instead of smallest_int_mode_for_size. (store_by_pieces_d::store_by_pieces_d): Add a bool argument to indicate that QI vector mode can be used and pass it to op_by_pieces_d::op_by_pieces_d. (can_store_by_pieces): Call widest_fixed_size_mode_for_size instead of widest_int_mode_for_size. Pass memsetp to widest_fixed_size_mode_for_size to support QI vector mode. Allow all CONST_VECTORs for memset if vec_duplicate is supported. (store_by_pieces): Pass memsetp to store_by_pieces_d::store_by_pieces_d. (clear_by_pieces_1): Removed. (clear_by_pieces): Replace clear_by_pieces_1 with builtin_memset_read_str and pass true to store_by_pieces_d to support vector mode broadcast. (string_cst_read_str): Change the mode argument from scalar_int_mode to fixed_size_mode. * expr.h (by_pieces_constfn): Change scalar_int_mode to fixed_size_mode. (by_pieces_prev): Likewise. * rtl.h (lowpart_subreg_regno): New. * rtlanal.c (lowpart_subreg_regno): New. A wrapper around simplify_subreg_regno. * target.def (gen_memset_scratch_rtx): New hook. * doc/tm.texi.in: Add TARGET_GEN_MEMSET_SCRATCH_RTX. * doc/tm.texi: Regenerated. 2021-07-30 Xi Ruoyao PR target/94780 * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use TARGET_EXPR instead of MODIFY_EXPR. 2021-07-30 Xi Ruoyao PR target/101132 * config/mips/mips-protos.h (mips_expand_vec_cmp_expr): Declare. * config/mips/mips.c (mips_expand_vec_cmp_expr): New function. * config/mips/mips-msa.md (vec_cmp): New expander. (vec_cmpu): New expander. 2021-07-30 H.J. Lu PR target/101685 * config/i386/i386-options.c (ix86_option_override_internal): Don't enable LZCNT/POPCNT if they have been disabled explicitly. 2021-07-30 prathamesh.kulkarni PR target/66791 * config/arm/arm_neon.h (vld1_p64): Replace call to builtin by explicitly dereferencing __a. (vld1_s64): Likewise. (vld1_u64): Likewise. * config/arm/arm_neon_builtins.def (vld1): Remove entry for di and change to VAR13. 2021-07-30 Aldy Hernandez * gimple-loop-versioning.cc (lv_dom_walker::lv_dom_walker): Remove use of m_range_analyzer. (loop_versioning::lv_dom_walker::before_dom_children): Same. (loop_versioning::lv_dom_walker::after_dom_children): Remove. (loop_versioning::prune_loop_conditions): Replace vr_values use with range_query interface. (pass_loop_versioning::execute): Use ranger. 2021-07-30 Xi Ruoyao PR ipa/101396 * ipa-devirt.c (ipa_odr_read_section): Compare the precision of enum values, and emit a warning if they mismatch. 2021-07-30 Kewen Lin * cfgloop.h (as_const): New function. (class loop_iterator): Rename to ... (class loops_list): ... this. (loop_iterator::next): Rename to ... (loops_list::Iter::fill_curr_loop): ... this and adjust. (loop_iterator::loop_iterator): Rename to ... (loops_list::loops_list): ... this and adjust. (loops_list::Iter): New class. (loops_list::iterator): New type. (loops_list::const_iterator): New type. (loops_list::begin): New function. (loops_list::end): Likewise. (loops_list::begin const): Likewise. (loops_list::end const): Likewise. (FOR_EACH_LOOP): Remove. (FOR_EACH_LOOP_FN): Remove. * cfgloop.c (flow_loops_dump): Adjust FOR_EACH_LOOP* with range-based for loop with loops_list instance. (sort_sibling_loops): Likewise. (disambiguate_loops_with_multiple_latches): Likewise. (verify_loop_structure): Likewise. * cfgloopmanip.c (create_preheaders): Likewise. (force_single_succ_latches): Likewise. * config/aarch64/falkor-tag-collision-avoidance.c (execute_tag_collision_avoidance): Likewise. * config/mn10300/mn10300.c (mn10300_scan_for_setlb_lcc): Likewise. * config/s390/s390.c (s390_adjust_loops): Likewise. * doc/loop.texi: Likewise. * gimple-loop-interchange.cc (pass_linterchange::execute): Likewise. * gimple-loop-jam.c (tree_loop_unroll_and_jam): Likewise. * gimple-loop-versioning.cc (loop_versioning::analyze_blocks): Likewise. (loop_versioning::make_versioning_decisions): Likewise. * gimple-ssa-split-paths.c (split_paths): Likewise. * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise. * graphite.c (canonicalize_loop_form): Likewise. (graphite_transform_loops): Likewise. * ipa-fnsummary.c (analyze_function_body): Likewise. * ipa-pure-const.c (analyze_function): Likewise. * loop-doloop.c (doloop_optimize_loops): Likewise. * loop-init.c (loop_optimizer_finalize): Likewise. (fix_loop_structure): Likewise. * loop-invariant.c (calculate_loop_reg_pressure): Likewise. (move_loop_invariants): Likewise. * loop-unroll.c (decide_unrolling): Likewise. (unroll_loops): Likewise. * modulo-sched.c (sms_schedule): Likewise. * predict.c (predict_loops): Likewise. (pass_profile::execute): Likewise. * profile.c (branch_prob): Likewise. * sel-sched-ir.c (sel_finish_pipelining): Likewise. (sel_find_rgns): Likewise. * tree-cfg.c (replace_loop_annotate): Likewise. (replace_uses_by): Likewise. (move_sese_region_to_fn): Likewise. * tree-if-conv.c (pass_if_conversion::execute): Likewise. * tree-loop-distribution.c (loop_distribution::execute): Likewise. * tree-parloops.c (parallelize_loops): Likewise. * tree-predcom.c (tree_predictive_commoning): Likewise. * tree-scalar-evolution.c (scev_initialize): Likewise. (scev_reset): Likewise. * tree-ssa-dce.c (find_obviously_necessary_stmts): Likewise. * tree-ssa-live.c (remove_unused_locals): Likewise. * tree-ssa-loop-ch.c (ch_base::copy_headers): Likewise. * tree-ssa-loop-im.c (analyze_memory_references): Likewise. (tree_ssa_lim_initialize): Likewise. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise. * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize): Likewise. * tree-ssa-loop-manip.c (get_loops_exits): Likewise. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations): Likewise. (free_numbers_of_iterations_estimates): Likewise. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise. * tree-ssa-loop-split.c (tree_ssa_split_loops): Likewise. * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Likewise. * tree-ssa-loop.c (gate_oacc_kernels): Likewise. (pass_scev_cprop::execute): Likewise. * tree-ssa-propagate.c (clean_up_loop_closed_phi): Likewise. * tree-ssa-sccvn.c (do_rpo_vn): Likewise. * tree-ssa-threadupdate.c (jump_thread_path_registry::thread_through_all_blocks): Likewise. * tree-vectorizer.c (vectorize_loops): Likewise. * tree-vrp.c (vrp_asserts::find_assert_locations): Likewise. 2021-07-29 Hans-Peter Nilsson * config/mmix/mmix.c (mmix_function_arg_1): Avoid generating a VOIDmode register for e.g the function_arg_info::end_marker. 2021-07-29 Jeff Law * config/h8300/h8300-modes.def: Add CCZ, CCV and CCC, drop CCZNV. * config/h8300/h8300.md (H8cc mode iterator): Add CCZ. (cc mode_attr): Similarly. (ccz subst_attr): Similarly. * config/h8300/jumpcall.md: Add new patterns for branch-on-bit. * config/h8300/testcompare.md: Remove various cc0 based patterns that had been commented out. Add pattern to set CCZ from a bit test. 2021-07-29 Thomas Schwinge Julian Brown Kwok Cheung Yeung * omp-offload.c (oacc_loop_xform_head_tail, oacc_loop_process): 'update_stmt' after modification. (pass_oacc_loop_designation): New function, extracted out of... (pass_oacc_device_lower): ... this. (pass_data_oacc_loop_designation, pass_oacc_loop_designation) (make_pass_oacc_loop_designation): New * passes.def: Add it. * tree-parloops.c (create_parallel_loop): Adjust. * tree-pass.h (make_pass_oacc_loop_designation): New. 2021-07-29 Aldy Hernandez * flag-types.h (enum threader_mode): New. * params.opt: Add entry for --param=threader-mode. * tree-ssa-threadbackward.c (THREADER_ITERATIVE_MODE): New. (class back_threader): New. (back_threader::back_threader): New. (back_threader::~back_threader): New. (back_threader::maybe_register_path): New. (back_threader::find_taken_edge): New. (back_threader::find_taken_edge_switch): New. (back_threader::find_taken_edge_cond): New. (back_threader::resolve_def): New. (back_threader::resolve_phi): New. (back_threader::find_paths_to_names): New. (back_threader::find_paths): New. (dump_path): New. (debug): New. (thread_jumps::find_jump_threads_backwards): Call ranger threader. (thread_jumps::find_jump_threads_backwards_with_ranger): New. (pass_thread_jumps::execute): Abstract out code... (try_thread_blocks): ...here. * tree-ssa-threadedge.c (jump_threader::thread_outgoing_edges): Abstract out threading candidate code to... (single_succ_to_potentially_threadable_block): ...here. * tree-ssa-threadedge.h (single_succ_to_potentially_threadable_block): New. * tree-ssa-threadupdate.c (register_jump_thread): Return boolean. * tree-ssa-threadupdate.h (class jump_thread_path_registry): Return bool from register_jump_thread. 2021-07-29 Andreas Krebbel * target.def: in0 and in1 do not need to be registers. * doc/tm.texi: Regenerate. 2021-07-29 liuhongt PR target/39821 * config/i386/i386.c (ix86_widen_mult_cost): New function. (ix86_add_stmt_cost): Use ix86_widen_mult_cost for WIDEN_MULT_EXPR. 2021-07-29 Jiufu Guo PR target/61837 * config/rs6000/rs6000.c (TARGET_PREFERRED_DOLOOP_MODE): New hook. (rs6000_preferred_doloop_mode): New hook. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Add hook preferred_doloop_mode. * target.def (preferred_doloop_mode): New hook. * targhooks.c (default_preferred_doloop_mode): New hook. * targhooks.h (default_preferred_doloop_mode): New hook. * tree-ssa-loop-ivopts.c (compute_doloop_base_on_mode): New function. (add_iv_candidate_for_doloop): Call targetm.preferred_doloop_mode and compute_doloop_base_on_mode. 2021-07-28 Martin Sebor PR middle-end/101494 * tree-ssa-uninit.c (maybe_warn_operand): Correct object offset and size computation. 2021-07-28 Martin Sebor PR middle-end/101601 * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Remove a pointless test. Handle pointers to functions. 2021-07-28 Martin Sebor * Makefile.in (OBJS): Add gimple-ssa-warn-access.o and pointer-query.o. * attribs.h (fndecl_dealloc_argno): Move fndecl_dealloc_argno to tree.h. * builtins.c (compute_objsize_r): Move to pointer-query.cc. (access_ref::access_ref): Same. (access_ref::phi): Same. (access_ref::get_ref): Same. (access_ref::size_remaining): Same. (access_ref::offset_in_range): Same. (access_ref::add_offset): Same. (access_ref::inform_access): Same. (ssa_name_limit_t::visit_phi): Same. (ssa_name_limit_t::leave_phi): Same. (ssa_name_limit_t::next): Same. (ssa_name_limit_t::next_phi): Same. (ssa_name_limit_t::~ssa_name_limit_t): Same. (pointer_query::pointer_query): Same. (pointer_query::get_ref): Same. (pointer_query::put_ref): Same. (pointer_query::flush_cache): Same. (warn_string_no_nul): Move to gimple-ssa-warn-access.cc. (check_nul_terminated_array): Same. (unterminated_array): Same. (maybe_warn_for_bound): Same. (check_read_access): Same. (warn_for_access): Same. (get_size_range): Same. (check_access): Same. (gimple_call_alloc_size): Move to tree.c. (gimple_parm_array_size): Move to pointer-query.cc. (get_offset_range): Same. (gimple_call_return_array): Same. (handle_min_max_size): Same. (handle_array_ref): Same. (handle_mem_ref): Same. (compute_objsize): Same. (gimple_call_alloc_p): Move to gimple-ssa-warn-access.cc. (call_dealloc_argno): Same. (fndecl_dealloc_argno): Same. (new_delete_mismatch_p): Same. (matching_alloc_calls_p): Same. (warn_dealloc_offset): Same. (maybe_emit_free_warning): Same. * builtins.h (check_nul_terminated_array): Move to gimple-ssa-warn-access.h. (check_nul_terminated_array): Same. (warn_string_no_nul): Same. (unterminated_array): Same. (class ssa_name_limit_t): Same. (class pointer_query): Same. (struct access_ref): Same. (class range_query): Same. (struct access_data): Same. (gimple_call_alloc_size): Same. (gimple_parm_array_size): Same. (compute_objsize): Same. (class access_data): Same. (maybe_emit_free_warning): Same. * calls.c (initialize_argument_information): Remove call to maybe_emit_free_warning. * gimple-array-bounds.cc: Include new header.. * gimple-fold.c: Same. * gimple-ssa-sprintf.c: Same. * gimple-ssa-warn-restrict.c: Same. * passes.def: Add pass_warn_access. * tree-pass.h (make_pass_warn_access): Declare. * tree-ssa-strlen.c: Include new headers. * tree.c (fndecl_dealloc_argno): Move here from builtins.c. * tree.h (fndecl_dealloc_argno): Move here from attribs.h. * gimple-ssa-warn-access.cc: New file. * gimple-ssa-warn-access.h: New file. * pointer-query.cc: New file. * pointer-query.h: New file. 2021-07-28 Jakub Jelinek PR middle-end/101624 * ubsan.c (maybe_instrument_pointer_overflow, instrument_object_size): Only test DECL_REGISTER on VAR_DECLs, PARM_DECLs or RESULT_DECLs. * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Likewise. 2021-07-28 Jakub Jelinek PR middle-end/101642 * match.pd (bswap16 (x) == bswap16 (y)): Cast both operands to type of bswap16 for comparison. (bswap16 (x) == cst): Cast bswap16 operand to type of cst. 2021-07-28 Richard Biener PR tree-optimization/101615 * tree-vect-slp.c (vect_optimize_slp): Materialize permutes at CTOR SLP graph entries. 2021-07-28 Kyrylo Tkachov * config/aarch64/aarch64.md (*extend2_aarch64): Add "r,w" alternative. 2021-07-28 H.J. Lu PR target/101456 * config/i386/i386.c (ix86_avx_u128_mode_needed): Don't set AVX_U128_DIRTY when all bits are zero. 2021-07-28 Richard Biener PR tree-optimization/101615 * tree-vect-slp.c (vect_optimize_slp): Pre-existing vector external nodes cannot be permuted so make them perm_out 0. 2021-07-28 Andrew Stubbs PR target/100208 * config.in: Regenerate. * config/gcn/gcn-hsa.h (A_FIJI): New define. (A_900): New define. (A_906): New define. (A_908): New define. (ASM_SPEC): Use A_FIJI, A_900, A_906 and A_908. * config/gcn/gcn.c (output_file_start): Adjust attributes according to the assembler capabilities. * config/gcn/mkoffload.c (main): Likewise. * configure: Regenerate. * configure.ac: Add tests for LLVM assembler attribute features. 2021-07-28 Andrew MacLeod * gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Check for cond_false and cond_true on branches. 2021-07-28 Bin Cheng * config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): use gcc_stablesort. 2021-07-28 Bin Cheng * alias.c (init_alias_analysis): Don't skip prologue/epilogue. 2021-07-28 Jakub Jelinek PR target/101611 * config/i386/sse.md (vashr3): Split into vashrv8di3 expander and vashrv4di3 expander, where the latter requires just TARGET_AVX2 and has special !TARGET_AVX512VL expansion. (vashrv2di3): Rename to ... (vashrv2di3): ... this. Change condition to TARGET_XOP || TARGET_AVX2 and add special !TARGET_XOP && !TARGET_AVX512VL expansion. 2021-07-28 Martin Uecker * calls.c (maybe_warn_rdwr_sizes): Correct argument numbers in warning that were switched. 2021-07-28 Kewen Lin PR tree-optimization/101596 * tree-vect-patterns.c (vect_recog_mulhs_pattern): Fix wrong check by using new_type's precision instead. 2021-07-28 liuhongt PR target/99881 * config/i386/i386.h (processor_costs): Add new member integer_to_sse. * config/i386/x86-tune-costs.h (ix86_size_cost, i386_cost, i486_cost, pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost, athlon_cost, k8_cost, amdfam10_cost, bdver_cost, znver1_cost, znver2_cost, znver3_cost, btver1_cost, btver2_cost, btver3_cost, pentium4_cost, nocona_cost, atom_cost, atom_cost, slm_cost, intel_cost, generic_cost, core_cost): Initialize integer_to_sse same value as sse_op. (skylake_cost): Initialize integer_to_sse twice as much as sse_op. * config/i386/i386.c (ix86_builtin_vectorization_cost): Use integer_to_sse instead of sse_op to calculate the cost of vec_construct. 2021-07-27 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New function. (write_init_file): Call write_ovld_static_init. 2021-07-27 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_bif_static_init): New function. (write_init_file): Call write_bif_static_init. 2021-07-27 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. (TYPE_MAP_SIZE): New macro. (type_map): New initialized variable. (typemap_cmp): New function. (write_type_node): Likewise. (write_fntype_init): Implement. 2021-07-27 Martin Sebor PR tree-optimization/101584 * tree-ssa-uninit.c (builtin_call_nomodifying_p): New function. (check_defs): Call it. 2021-07-27 Aldy Hernandez * tree-ssa-dom.c (dom_jump_threader_simplifier): Put avail_exprs_stack in the class, instead of passing it to jump_threader_simplifier. (dom_jump_threader_simplifier::simplify): Add state argument. (dom_opt_dom_walker): Add state. (pass_dominator::execute): Pass state to threader. (dom_opt_dom_walker::before_dom_children): Use state. * tree-ssa-threadedge.c (jump_threader::jump_threader): Replace arguments by state. (jump_threader::record_temporary_equivalences_from_phis): Register equivalences through the state variable. (jump_threader::record_temporary_equivalences_from_stmts_at_dest): Record ranges in a statement through the state variable. (jump_threader::simplify_control_stmt_condition): Pass state to simplify. (jump_threader::simplify_control_stmt_condition_1): Same. (jump_threader::thread_around_empty_blocks): Remove obsolete comment. (jump_threader::thread_through_normal_block): Record equivalences on edge through the state variable. (jump_threader::thread_across_edge): Abstract state pushing. (jt_state::jt_state): New. (jt_state::push): New. (jt_state::pop): New. (jt_state::register_equiv): New. (jt_state::record_ranges_from_stmt): New. (jt_state::register_equivs_on_edge): New. (jump_threader_simplifier::jump_threader_simplifier): Move from header. (jump_threader_simplifier::simplify): Add state argument. * tree-ssa-threadedge.h (class jt_state): New. (class jump_threader): Add state to constructor. (class jump_threader_simplifier): Add state to simplify. Remove avail_exprs_stack from class. * tree-vrp.c (vrp_jump_threader_simplifier::simplify): Add state argument. (vrp_jump_threader::vrp_jump_threader): Add state. (vrp_jump_threader::~vrp_jump_threader): Cleanup state. 2021-07-27 Aldy Hernandez * Makefile.in (OBJS): Add gimple-range-path.o. * gimple-range-path.cc: New file. * gimple-range-path.h: New file. 2021-07-27 Jonathan Wright * config/aarch64/aarch64-simd.md: Push sign/zero-extension inside vec_duplicate for all patterns. * simplify-rtx.c (simplify_context::simplify_unary_operation_1): Push sign/zero-extension inside vec_duplicate. 2021-07-27 Richard Biener PR tree-optimization/101573 * tree-ssa-uninit.c (warn_uninit_phi_uses): New function looking at uninitialized PHI arg defs in some constrained cases. (warn_uninitialized_vars): Call it. (execute_early_warn_uninitialized): Calculate dominators. 2021-07-27 Richard Biener PR tree-optimization/39821 * tree-vect-stmts.c (vect_model_promotion_demotion_cost): Use vector_stmt for widening arithmetic. (vectorizable_conversion): Adjust. 2021-07-27 Martin Jambor * cgraph.h (ipa_replace_map): New field force_load_ref. * ipa-prop.h (ipa_param_descriptor): Reduce precision of move_cost, aded new flag load_dereferenced, adjusted comments. (ipa_get_param_dereferenced): New function. (ipa_set_param_dereferenced): Likewise. * cgraphclones.c (cgraph_node::create_virtual_clone): Follow it. * ipa-cp.c: Include gimple.h. (ipcp_discover_new_direct_edges): Take into account dereferenced flag. (get_replacement_map): New parameter force_load_ref, set the appropriate flag in ipa_replace_map if set. (struct symbol_and_index_together): New type. (adjust_refs_in_act_callers): New function. (adjust_references_in_caller): Likewise. (create_specialized_node): When appropriate, call adjust_references_in_caller and force only load references. * ipa-prop.c (load_from_dereferenced_name): New function. (ipa_analyze_controlled_uses): Also detect loads from a dereference, harden testing of call statements. (ipa_write_node_info): Stream the dereferenced flag. (ipa_read_node_info): Likewise. (ipa_set_jf_constant): Also create refdesc when jump function references a variable. (cgraph_node_for_jfunc): Rename to symtab_node_for_jfunc, work also on references of variables and return a symtab_node. Adjust all callers. (propagate_controlled_uses): Also remove references to VAR_DECLs. 2021-07-27 Jakub Jelinek PR middle-end/101586 * gimple-fold.c (clear_padding_type): Ignore FIELD_DECLs with byte positions above or equal to sz except for diagnostics of flexible array members. 2021-07-26 Andrew MacLeod PR tree-optimization/78888 * gimple-range-fold.cc (get_letter_range): New. (fold_using_range::range_of_builtin_call): Call get_letter_range. 2021-07-26 Andrew MacLeod PR tree-optimization/78888 * gimple-range-fold.cc (fold_using_range::range_of_builtin_call): Add cases for CFN_BUILT_IN_TOUPPER and CFN_BUILT_IN_TOLOWER. 2021-07-26 Roger Sayle Marc Glisse * match.pd (rotate): Simplify equality/inequality of rotations. (bswap): Simplify equality/inequality tests of byte swapping. 2021-07-26 Aldy Hernandez * range-op.cc (operator_bitwise_xor::op1_op2_relation_effect): New. 2021-07-26 Aldy Hernandez * range-op.cc (operator_lshift::fold_range): Pass rel to base class fold_range. (operator_rshift::fold_range): Same. 2021-07-26 Ashimida PR driver/101447 * toplev.h (min_align_loops_log): Remove declaration. (min_align_jumps_log, min_align_labels_log): Likewise. (min_align_functions_log): Likewise. 2021-07-26 Aldy Hernandez * tree-vrp.c (vrp_simplify_cond_using_ranges): Rename vr_values with range_query. (execute_vrp): Abstract out simplification of conditionals... (simplify_casted_conds): ...here. 2021-07-26 Aldy Hernandez * gimple-array-bounds.cc (array_bounds_checker::get_value_range): Add gimple argument. (array_bounds_checker::check_array_ref): Same. (array_bounds_checker::check_addr_expr): Same. (array_bounds_checker::check_array_bounds): Pass statement to check_array_bounds and check_addr_expr. * gimple-array-bounds.h (check_array_bounds): Add gimple argument. (check_addr_expr): Same. (get_value_range): Same. 2021-07-26 Tamar Christina * config/aarch64/aarch64-simd-builtins.def (sdot, udot): Rename to.. (sdot_prod, udot_prod): ... This. * config/aarch64/aarch64-simd.md (aarch64_dot): Merged into... (dot_prod): ... this. (aarch64_dot_lane, aarch64_dot_laneq): Change operands order. (sadv16qi): Use new operands order. * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): Use new RTL ordering. 2021-07-26 Tamar Christina * config/aarch64/aarch64-builtins.c (TYPES_TERNOP_SUSS, aarch64_types_ternop_suss_qualifiers): New. * config/aarch64/aarch64-simd-builtins.def (usdot_prod): Use it. * config/aarch64/aarch64-simd.md (usdot_prod): Re-organize RTL. * config/aarch64/arm_neon.h (vusdot_s32, vusdotq_s32): Use it. 2021-07-23 Jakub Jelinek PR rtl-optimization/101562 * expmed.c (store_integral_bit_field): Only use movstrict_optab if the operand isn't paradoxical. 2021-07-23 Aldy Hernandez * gimple-array-bounds.h (class array_bounds_checker): Change ranges type to range_query. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vst1_s64_x2): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vst1_u64_x2): Likewise. (vst1_f64_x2): Likewise. (vst1_s8_x2): Likewise. (vst1_p8_x2): Likewise. (vst1_s16_x2): Likewise. (vst1_p16_x2): Likewise. (vst1_s32_x2): Likewise. (vst1_u8_x2): Likewise. (vst1_u16_x2): Likewise. (vst1_u32_x2): Likewise. (vst1_f16_x2): Likewise. (vst1_f32_x2): Likewise. (vst1_p64_x2): Likewise. (vst1q_s8_x2): Likewise. (vst1q_p8_x2): Likewise. (vst1q_s16_x2): Likewise. (vst1q_p16_x2): Likewise. (vst1q_s32_x2): Likewise. (vst1q_s64_x2): Likewise. (vst1q_u8_x2): Likewise. (vst1q_u16_x2): Likewise. (vst1q_u32_x2): Likewise. (vst1q_u64_x2): Likewise. (vst1q_f16_x2): Likewise. (vst1q_f32_x2): Likewise. (vst1q_f64_x2): Likewise. (vst1q_p64_x2): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vst1_s64_x3): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_ci one vector at a time. (vst1_u64_x3): Likewise. (vst1_f64_x3): Likewise. (vst1_s8_x3): Likewise. (vst1_p8_x3): Likewise. (vst1_s16_x3): Likewise. (vst1_p16_x3): Likewise. (vst1_s32_x3): Likewise. (vst1_u8_x3): Likewise. (vst1_u16_x3): Likewise. (vst1_u32_x3): Likewise. (vst1_f16_x3): Likewise. (vst1_f32_x3): Likewise. (vst1_p64_x3): Likewise. (vst1q_s8_x3): Likewise. (vst1q_p8_x3): Likewise. (vst1q_s16_x3): Likewise. (vst1q_p16_x3): Likewise. (vst1q_s32_x3): Likewise. (vst1q_s64_x3): Likewise. (vst1q_u8_x3): Likewise. (vst1q_u16_x3): Likewise. (vst1q_u32_x3): Likewise. (vst1q_u64_x3): Likewise. (vst1q_f16_x3): Likewise. (vst1q_f32_x3): Likewise. (vst1q_f64_x3): Likewise. (vst1q_p64_x3): Likewise. 2021-07-23 H.J. Lu PR target/101504 * config/i386/i386.c (ix86_gen_scratch_sse_rtx): Don't return hard register when LRA is in progress. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vst1_s8_x4): Use __builtin_memcpy instead of using a union. (vst1q_s8_x4): Likewise. (vst1_s16_x4): Likewise. (vst1q_s16_x4): Likewise. (vst1_s32_x4): Likewise. (vst1q_s32_x4): Likewise. (vst1_u8_x4): Likewise. (vst1q_u8_x4): Likewise. (vst1_u16_x4): Likewise. (vst1q_u16_x4): Likewise. (vst1_u32_x4): Likewise. (vst1q_u32_x4): Likewise. (vst1_f16_x4): Likewise. (vst1q_f16_x4): Likewise. (vst1_f32_x4): Likewise. (vst1q_f32_x4): Likewise. (vst1_p8_x4): Likewise. (vst1q_p8_x4): Likewise. (vst1_p16_x4): Likewise. (vst1q_p16_x4): Likewise. (vst1_s64_x4): Likewise. (vst1_u64_x4): Likewise. (vst1_p64_x4): Likewise. (vst1q_s64_x4): Likewise. (vst1q_u64_x4): Likewise. (vst1q_p64_x4): Likewise. (vst1_f64_x4): Likewise. (vst1q_f64_x4): Likewise. 2021-07-23 Jonathan Wrightt * config/aarch64/arm_neon.h (vst2_s64): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vst2_u64): Likewise. (vst2_f64): Likewise. (vst2_s8): Likewise. (vst2_p8): Likewise. (vst2_s16): Likewise. (vst2_p16): Likewise. (vst2_s32): Likewise. (vst2_u8): Likewise. (vst2_u16): Likewise. (vst2_u32): Likewise. (vst2_f16): Likewise. (vst2_f32): Likewise. (vst2_p64): Likewise. (vst2q_s8): Likewise. (vst2q_p8): Likewise. (vst2q_s16): Likewise. (vst2q_p16): Likewise. (vst2q_s32): Likewise. (vst2q_s64): Likewise. (vst2q_u8): Likewise. (vst2q_u16): Likewise. (vst2q_u32): Likewise. (vst2q_u64): Likewise. (vst2q_f16): Likewise. (vst2q_f32): Likewise. (vst2q_f64): Likewise. (vst2q_p64): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vst3_s64): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_ci one vector at a time. (vst3_u64): Likewise. (vst3_f64): Likewise. (vst3_s8): Likewise. (vst3_p8): Likewise. (vst3_s16): Likewise. (vst3_p16): Likewise. (vst3_s32): Likewise. (vst3_u8): Likewise. (vst3_u16): Likewise. (vst3_u32): Likewise. (vst3_f16): Likewise. (vst3_f32): Likewise. (vst3_p64): Likewise. (vst3q_s8): Likewise. (vst3q_p8): Likewise. (vst3q_s16): Likewise. (vst3q_p16): Likewise. (vst3q_s32): Likewise. (vst3q_s64): Likewise. (vst3q_u8): Likewise. (vst3q_u16): Likewise. (vst3q_u32): Likewise. (vst3q_u64): Likewise. (vst3q_f16): Likewise. (vst3q_f32): Likewise. (vst3q_f64): Likewise. (vst3q_p64): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vst4_s64): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_xi one vector at a time. (vst4_u64): Likewise. (vst4_f64): Likewise. (vst4_s8): Likewise. (vst4_p8): Likewise. (vst4_s16): Likewise. (vst4_p16): Likewise. (vst4_s32): Likewise. (vst4_u8): Likewise. (vst4_u16): Likewise. (vst4_u32): Likewise. (vst4_f16): Likewise. (vst4_f32): Likewise. (vst4_p64): Likewise. (vst4q_s8): Likewise. (vst4q_p8): Likewise. (vst4q_s16): Likewise. (vst4q_p16): Likewise. (vst4q_s32): Likewise. (vst4q_s64): Likewise. (vst4q_u8): Likewise. (vst4q_u16): Likewise. (vst4q_u32): Likewise. (vst4q_u64): Likewise. (vst4q_f16): Likewise. (vst4q_f32): Likewise. (vst4q_f64): Likewise. (vst4q_p64): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vtbx4_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vtbx4_u8): Likewise. (vtbx4_p8): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vtbl3_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vtbl3_u8): Likewise. (vtbl3_p8): Likewise. (vtbl4_s8): Likewise. (vtbl4_u8): Likewise. (vtbl4_p8): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vqtbx2_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vqtbx2_u8): Likewise. (vqtbx2_p8): Likewise. (vqtbx2q_s8): Likewise. (vqtbx2q_u8): Likewise. (vqtbx2q_p8): Likewise. (vqtbx3_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_ci one vector at a time. (vqtbx3_u8): Likewise. (vqtbx3_p8): Likewise. (vqtbx3q_s8): Likewise. (vqtbx3q_u8): Likewise. (vqtbx3q_p8): Likewise. (vqtbx4_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_xi one vector at a time. (vqtbx4_u8): Likewise. (vqtbx4_p8): Likewise. (vqtbx4q_s8): Likewise. (vqtbx4q_u8): Likewise. (vqtbx4q_p8): Likewise. 2021-07-23 Jonathan Wright * config/aarch64/arm_neon.h (vqtbl2_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_oi one vector at a time. (vqtbl2_u8): Likewise. (vqtbl2_p8): Likewise. (vqtbl2q_s8): Likewise. (vqtbl2q_u8): Likewise. (vqtbl2q_p8): Likewise. (vqtbl3_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_ci one vector at a time. (vqtbl3_u8): Likewise. (vqtbl3_p8): Likewise. (vqtbl3q_s8): Likewise. (vqtbl3q_u8): Likewise. (vqtbl3q_p8): Likewise. (vqtbl4_s8): Use __builtin_memcpy instead of constructing __builtin_aarch64_simd_xi one vector at a time. (vqtbl4_u8): Likewise. (vqtbl4_p8): Likewise. (vqtbl4q_s8): Likewise. (vqtbl4q_u8): Likewise. (vqtbl4q_p8): Likewise. 2021-07-23 Haochen Gui PR target/100952 * config/rs6000/rs6000.md (cstore4): Fix wrong fall through. 2021-07-22 Andrew Pinski PR tree-optimization/10153 * tree-tailcall.c (create_tailcall_accumulator): Don't call fold_convert as the type should be correct already. (tree_optimize_tail_calls_1): Use build_{one,zero}_cst instead of integer_{one,zero}_node for the call of create_tailcall_accumulator. 2021-07-22 Aldy Hernandez * gimple-range-cache.cc (non_null_ref::adjust_range): Replace varying_p check for null/non-null check. 2021-07-22 Andrew MacLeod PR tree-optimization/101511 * value-relation.cc (relation_oracle::query_relation): Check if ssa1 is in ssa2's equiv set, and don't trap if so. 2021-07-22 Andrew MacLeod PR tree-optimization/101497 * gimple-range-fold.cc (fold_using_range::range_of_cond_expr): Check for undefined. 2021-07-22 Andrew MacLeod PR tree-optimization/101496 * vr-values.c (simplify_using_ranges::fold_cond): Call range_of_stmt first, then vrp_visit_cond_Stmt. 2021-07-22 liuhongt * config/i386/i386-expand.c (ix86_broadcast_from_integer_constant): Rename to .. (ix86_broadcast_from_constant): .. this, and extend it to handle float mode. (ix86_expand_vector_move): Extend to float mode. * config/i386/i386-features.c (replace_constant_pool_with_broadcast): Remove. (remove_partial_avx_dependency_gate): Ditto. (constant_pool_broadcast): Ditto. (class pass_constant_pool_broadcast): Ditto. (make_pass_constant_pool_broadcast): Ditto. (remove_partial_avx_dependency): Adjust gate. * config/i386/i386-passes.def: Remove pass_constant_pool_broadcast. * config/i386/i386-protos.h (make_pass_constant_pool_broadcast): Remove. 2021-07-22 liuhongt * config/i386/constraints.md (Wb): New constraint. (Ww): Ditto. * config/i386/i386.md (*ashlhi3_1): Extend to avx512 mask shift. (*ashlqi3_1): Ditto. (*3_1): Split to .. (*ashr3_1): this, ... (*lshr3_1): and this, also extend this pattern to avx512 mask registers. (*3_1): Split to .. (*ashr3_1): this, ... (*lshrqi3_1): and this, also extend this pattern to avx512 mask registers. (*lshrhi3_1): And this, also extend this pattern to avx512 mask registers. * config/i386/sse.md (k): New define_split after it to convert generic shift pattern to mask shift ones. 2021-07-21 Thomas Schwinge Joseph Myers Cesar Philippidis * tree-core.h (omp_clause_code): Add 'OMP_CLAUSE_NOHOST'. * tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1): Handle it. * tree-pretty-print.c (dump_omp_clause): Likewise. * omp-general.c (oacc_verify_routine_clauses): Likewise. * gimplify.c (gimplify_scan_omp_clauses) (gimplify_adjust_omp_clauses): Likewise. * tree-nested.c (convert_nonlocal_omp_clauses) (convert_local_omp_clauses): Likewise. * omp-low.c (scan_sharing_clauses): Likewise. * omp-offload.c (execute_oacc_device_lower): Update. 2021-07-21 Martin Sebor * tree-ssa-alias.c (walk_aliased_vdefs_1): Fix typos in a comment. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_fntype): New callback function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_autogenerated_header): New function. (write_decls): Likewise. (write_extern_fntype): New callback function. (write_header_file): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (complete_vector_type): New function. (complete_base_type): Likewise. (construct_fntype_id): Likewise. (parse_bif_entry): Call contruct_fntype_id. (parse_ovld_entry): Likewise. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (ovld_stanza): New struct. (MAXOVLDSTANZAS): New macro. (ovld_stanzas): New variable. (curr_ovld_stanza): Likewise. (MAXOVLDS): New macro. (ovlddata): New struct. (ovlds): New variable. (curr_ovld): Likewise. (max_ovld_args): Likewise. (parse_ovld_entry): New function. (parse_ovld_stanza): Likewise. (parse_ovld): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_bif_attrs): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_args): New function. (parse_prototype): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (bif_stanza): New enum. (curr_bif_stanza): New variable. (stanza_entry): New struct. (stanza_map): New initialized variable. (enable_string): Likewise. (fnkinds): New enum. (typelist): New struct. (attrinfo): Likewise. (MAXRESTROPNDS): New macro. (prototype): New struct. (MAXBIFS): New macro. (bifdata): New struct. (bifs): New variable. (curr_bif): Likewise. (bif_order): Likewise. (bif_index): Likewise. (fatal): New function. (stanza_name_to_stanza): Likewise. (parse_bif_attrs): New stub function. (parse_prototype): Likewise. (parse_bif_entry): New function. (parse_bif_stanza): Likewise. (parse_bif): Implement. (set_bif_order): New function. (create_bif_order): Implement. 2021-07-21 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bifs): New variable. (num_ovld_stanzas): Likewise. (num_ovlds): Likewise. (parse_codes): New enum. (bif_rbt): New variable. (ovld_rbt): Likewise. (fntype_rbt): Likewise. (bifo_rbt): Likewise. (parse_bif): New stub function. (create_bif_order): Likewise. (parse_ovld): Likewise. (write_header_file): Likewise. (write_init_file): Likewise. (write_defines_file): Likewise. (delete_output_files): New function. (main): Likewise. 2021-07-21 H.J. Lu PR target/101549 * config/i386/i386-builtin.def: Remove OPTION_MASK_ISA_SSE4_2 from CRC32 _builtin functions. 2021-07-21 Sebastian Huber * coverage.c (build_gcov_info_var_registration): Mark the object placed in the linker set as referenced so that it does not get optimized away. 2021-07-21 Kito Cheng Revert: 2021-07-20 Kito Cheng * config.gcc (riscv*-*-*): Detect which python is available. 2021-07-21 Jakub Jelinek PR middle-end/101535 * gimplify.c (omp_check_private): Properly skip ORT_TARGET_DATA contexts in which decl isn't privatized and for ORT_TARGET return false if decl is mapped. 2021-07-21 Richard Sandiford * gimple-loop-jam.c: Include tree-ssa-sccvn.h. (tree_loop_unroll_and_jam): Run value-numbering on a loop that has been successfully unrolled. 2021-07-21 Richard Sandiford * tree-ssa-loop-manip.c (determine_exit_conditions): Return a null exit condition if no tail loop is needed, and if the original exit condition should therefore be kept as-is. (tree_transform_and_unroll_loop): Handle that case here too. 2021-07-21 Kewen Lin * tree-data-ref.c (free_dependence_relations): Adjust to pass vec by reference. (free_data_refs): Likewise. * tree-data-ref.h (free_dependence_relations): Likewise. (free_data_refs): Likewise. * tree-predcom.c (struct chain): Use auto_vec instead of vec for members. (struct component): Likewise. (pcom_worker::pcom_worker): Adjust for auto_vec and renaming changes. (pcom_worker::~pcom_worker): Likewise. (pcom_worker::release_chain): Adjust as auto_vec changes. (pcom_worker::loop): Rename to ... (pcom_worker::m_loop): ... this. (pcom_worker::datarefs): Rename to ... (pcom_worker::m_datarefs): ... this. Use auto_vec instead of vec. (pcom_worker::dependences): Rename to ... (pcom_worker::m_dependences): ... this. Use auto_vec instead of vec. (pcom_worker::chains): Rename to ... (pcom_worker::m_chains): ... this. Use auto_vec instead of vec. (pcom_worker::looparound_phis): Rename to ... (pcom_worker::m_looparound_phis): ... this. Use auto_vec instead of vec. (pcom_worker::cache): Rename to ... (pcom_worker::m_cache): ... this. Use auto_vec instead of vec. (pcom_worker::release_chain): Adjust for auto_vec changes. (pcom_worker::release_chains): Adjust for auto_vec and renaming changes. (release_component): Remove. (release_components): Adjust for release_component removal. (component_of): Adjust to use vec. (merge_comps): Likewise. (pcom_worker::aff_combination_dr_offset): Adjust for renaming changes. (pcom_worker::determine_offset): Likewise. (class comp_ptrs): Remove. (pcom_worker::split_data_refs_to_components): Adjust for renaming changes, for comp_ptrs removal with auto_vec. (pcom_worker::suitable_component_p): Adjust for renaming changes. (pcom_worker::filter_suitable_components): Adjust for release_component removal. (pcom_worker::valid_initializer_p): Adjust for renaming changes. (pcom_worker::find_looparound_phi): Likewise. (pcom_worker::add_looparound_copies): Likewise. (pcom_worker::determine_roots_comp): Likewise. (pcom_worker::single_nonlooparound_use): Likewise. (pcom_worker::execute_pred_commoning_chain): Likewise. (pcom_worker::execute_pred_commoning): Likewise. (pcom_worker::try_combine_chains): Likewise. (pcom_worker::prepare_initializers_chain): Likewise. (pcom_worker::prepare_initializers): Likewise. (pcom_worker::prepare_finalizers_chain): Likewise. (pcom_worker::prepare_finalizers): Likewise. (pcom_worker::tree_predictive_commoning_loop): Likewise. 2021-07-20 Martin Sebor PR middle-end/101397 * builtins.c (gimple_call_return_array): Add argument. Correct offsets for memchr, mempcpy, stpcpy, and stpncpy. (compute_objsize_r): Adjust offset computation for argument returning built-ins. 2021-07-20 Martin Sebor PR middle-end/101300 * tree-ssa-uninit.c (check_defs): Handle UBSAN built-ins. 2021-07-20 Jeff Law * function.c (assign_parm_setup_block): Use adjust_address instead of change_address to preserve MEM_EXPR and friends. 2021-07-20 Martin Sebor * cfgloop.h (single_likely_exit): Adjust by-value argument to by-const-reference. * cfgloopanal.c (single_likely_exit): Same. * cgraph.h (struct cgraph_node): Same. * cgraphclones.c (cgraph_node::create_virtual_clone): Same. * genautomata.c (merge_states): Same. * genextract.c (VEC_char_to_string): Same. * genmatch.c (dt_node::gen_kids_1): Same. (walk_captures): Adjust by-value argument to by-reference. * gimple-ssa-store-merging.c (check_no_overlap): Adjust by-value argument to by-const-reference. * gimple.c (gimple_build_call_vec): Same. (gimple_build_call_internal_vec): Same. (gimple_build_switch): Same. (sort_case_labels): Same. (preprocess_case_label_vec_for_gimple): Adjust by-value argument to by-reference. * gimple.h (gimple_build_call_vec): Adjust by-value argument to by-const-reference. (gimple_build_call_internal_vec): Same. (gimple_build_switch): Same. (sort_case_labels): Same. (preprocess_case_label_vec_for_gimple): Adjust by-value argument to by-reference. * haifa-sched.c (calc_priorities): Adjust by-value argument to by-const-reference. (sched_init_luids): Same. (haifa_init_h_i_d): Same. * ipa-cp.c (ipa_get_indirect_edge_target_1): Same. (adjust_callers_for_value_intersection): Adjust by-value argument to by-reference. (find_more_scalar_values_for_callers_subset): Adjust by-value argument to by-const-reference. (find_more_contexts_for_caller_subset): Same. (find_aggregate_values_for_callers_subset): Same. (copy_useful_known_contexts): Same. * ipa-fnsummary.c (remap_edge_summaries): Same. (remap_freqcounting_predicate): Same. * ipa-inline.c (add_new_edges_to_heap): Adjust by-value argument to by-reference. * ipa-predicate.c (predicate::remap_after_inlining): Adjust by-value argument to by-const-reference. * ipa-predicate.h (predicate::remap_after_inlining): Same. * ipa-prop.c (ipa_find_agg_cst_for_param): Same. * ipa-prop.h (ipa_find_agg_cst_for_param): Same. * ira-build.c (ira_loop_tree_body_rev_postorder): Same. * read-rtl.c (add_overload_instance): Same. * rtl.h (native_decode_rtx): Same. (native_decode_vector_rtx): Same. * sched-int.h (sched_init_luids): Same. (haifa_init_h_i_d): Same. * simplify-rtx.c (native_decode_vector_rtx): Same. (native_decode_rtx): Same. * tree-call-cdce.c (gen_shrink_wrap_conditions): Same. (shrink_wrap_one_built_in_call_with_conds): Same. (shrink_wrap_conditional_dead_built_in_calls): Same. * tree-data-ref.c (create_runtime_alias_checks): Same. (compute_all_dependences): Same. * tree-data-ref.h (compute_all_dependences): Same. (create_runtime_alias_checks): Same. (index_in_loop_nest): Same. * tree-if-conv.c (mask_exists): Same. * tree-loop-distribution.c (class loop_distribution): Same. (loop_distribution::create_rdg_vertices): Same. (dump_rdg_partitions): Same. (debug_rdg_partitions): Same. (partition_contains_all_rw): Same. (loop_distribution::distribute_loop): Same. * tree-parloops.c (oacc_entry_exit_ok_1): Same. (oacc_entry_exit_single_gang): Same. * tree-ssa-loop-im.c (hoist_memory_references): Same. (loop_suitable_for_sm): Same. * tree-ssa-loop-niter.c (bound_index): Same. * tree-ssa-reassoc.c (update_ops): Same. (swap_ops_for_binary_stmt): Same. (rewrite_expr_tree): Same. (rewrite_expr_tree_parallel): Same. * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Same. * tree-ssa-sccvn.h (ao_ref_init_from_vn_reference): Same. * tree-ssa-structalias.c (process_all_all_constraints): Same. (make_constraints_to): Same. (handle_lhs_call): Same. (find_func_aliases_for_builtin_call): Same. (sort_fieldstack): Same. (check_for_overlaps): Same. * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Same. (vect_create_cond_for_unequal_addrs): Same. (vect_create_cond_for_lower_bounds): Same. (vect_create_cond_for_alias_checks): Same. * tree-vect-slp-patterns.c (vect_validate_multiplication): Same. * tree-vect-slp.c (vect_analyze_slp_instance): Same. (vect_make_slp_decision): Same. (vect_slp_bbs): Same. (duplicate_and_interleave): Same. (vect_transform_slp_perm_load): Same. (vect_schedule_slp): Same. * tree-vectorizer.h (vect_transform_slp_perm_load): Same. (vect_schedule_slp): Same. (duplicate_and_interleave): Same. * tree.c (build_vector_from_ctor): Same. (build_vector): Same. (check_vector_cst): Same. (check_vector_cst_duplicate): Same. (check_vector_cst_fill): Same. (check_vector_cst_stepped): Same. * tree.h (build_vector_from_ctor): Same. 2021-07-20 Jakub Jelinek PR target/101384 * config/rs6000/rs6000-protos.h (easy_altivec_constant): Change return type from bool to int. * config/rs6000/rs6000.c (vspltis_constant): Fix up handling the EASY_VECTOR_MSB case if either step or copies is not 1. (vspltis_shifted): Fix comment typo. (easy_altivec_constant): Change return type from bool to int, instead of returning true return byte size of the element mode that should be used to synthetize the constant. * config/rs6000/predicates.md (easy_vector_constant_msb): Require that vspltis_shifted is 0, handle the case where easy_altivec_constant assumes using different vector mode from CONST_VECTOR's mode. * config/rs6000/altivec.md (easy_vector_constant_msb splitter): Use easy_altivec_constant to determine mode in which -1 >> -1 should be performed, use rs6000_expand_vector_init instead of gen_vec_initv4sisi. 2021-07-20 Richard Biener PR debug/101473 * dwarf2out.h (dwarf_file_data): Add key member. * dwarf2out.c (dwarf_file_hasher::equal): Compare key. (dwarf_file_hasher::hash): Hash key. (lookup_filename): Remap the filename and store it in the filename member of dwarf_file_data when creating a new dwarf_file_data. (file_name_acquire): Do not remap the filename again. (maybe_emit_file): Likewise. 2021-07-20 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use two variant generators for all TBL/TBX intrinsics and rename to consistent forms: qtbl[1234] or qtbx[1234]. * config/aarch64/aarch64-simd.md (aarch64_tbl1): Rename to... (aarch64_qtbl1): This. (aarch64_tbx1): Rename to... (aarch64_qtbx1): This. (aarch64_tbl2v16qi): Delete. (aarch64_tbl3): Rename to... (aarch64_qtbl2): This. (aarch64_tbx4): Rename to... (aarch64_qtbx2): This. * config/aarch64/aarch64.c (aarch64_expand_vec_perm_1): Use renamed qtbl1 and qtbl2 RTL patterns. * config/aarch64/arm_neon.h (vqtbl1_p8): Use renamed qtbl1 RTL pattern. (vqtbl1_s8): Likewise. (vqtbl1_u8): Likewise. (vqtbl1q_p8): Likewise. (vqtbl1q_s8): Likewise. (vqtbl1q_u8): Likewise. (vqtbx1_s8): Use renamed qtbx1 RTL pattern. (vqtbx1_u8): Likewise. (vqtbx1_p8): Likewise. (vqtbx1q_s8): Likewise. (vqtbx1q_u8): Likewise. (vqtbx1q_p8): Likewise. (vtbl1_s8): Use renamed qtbl1 RTL pattern. (vtbl1_u8): Likewise. (vtbl1_p8): Likewise. (vtbl2_s8): Likewise (vtbl2_u8): Likewise. (vtbl2_p8): Likewise. (vtbl3_s8): Use renamed qtbl2 RTL pattern. (vtbl3_u8): Likewise. (vtbl3_p8): Likewise. (vtbl4_s8): Likewise. (vtbl4_u8): Likewise. (vtbl4_p8): Likewise. (vtbx2_s8): Use renamed qtbx2 RTL pattern. (vtbx2_u8): Likewise. (vtbx2_p8): Likewise. (vqtbl2_s8): Use renamed qtbl2 RTL pattern. (vqtbl2_u8): Likewise. (vqtbl2_p8): Likewise. (vqtbl2q_s8): Likewise. (vqtbl2q_u8): Likewise. (vqtbl2q_p8): Likewise. (vqtbx2_s8): Use renamed qtbx2 RTL pattern. (vqtbx2_u8): Likewise. (vqtbx2_p8): Likewise. (vqtbx2q_s8): Likewise. (vqtbx2q_u8): Likewise. (vqtbx2q_p8): Likewise. (vtbx4_s8): Likewise. (vtbx4_u8): Likewise. (vtbx4_p8): Likewise. 2021-07-20 Uroš Bizjak PR target/100182 * config/i386/sync.md (define_peephole2 atomic_storedi_fpu): Remove. (define_peephole2 atomic_loaddi_fpu): Ditto. 2021-07-20 Kito Cheng * config.gcc (riscv*-*-*): Detect which python is available. 2021-07-20 Kewen Lin * config/rs6000/vsx.md (mulhs_): Rename to... (smul3_highpart): ... this. (mulhu_): Rename to... (umul3_highpart): ... this. * config/rs6000/rs6000-builtin.def (MULHS_V2DI, MULHS_V4SI, MULHU_V2DI, MULHU_V4SI): Adjust. 2021-07-20 Kewen Lin PR tree-optimization/100696 * internal-fn.c (first_commutative_argument): Add info for IFN_MULH. * internal-fn.def (IFN_MULH): New internal function. * tree-vect-patterns.c (vect_recog_mulhs_pattern): Add support to recog normal multiply highpart as IFN_MULH. * config/i386/i386.c (ix86_add_stmt_cost): Adjust for combined function CFN_MULH. 2021-07-19 Indu Bhagat * config/elfos.h (CTF_DEBUGGING_INFO): New definition. (BTF_DEBUGGING_INFO): Likewise. * doc/tm.texi.in: Document the new macros. * doc/tm.texi: Regenerated. * toplev.c: Guard initialization of debug hooks. 2021-07-19 Indu Bhagat * flags.h (ctf_debuginfo_p): New function declaration. * opts.c (ctf_debuginfo_p): New function definition. 2021-07-19 Andrew Stubbs PR target/100208 * config/gcn/gcn-hsa.h (DRIVER_SELF_SPECS): New. (ASM_SPEC): Set -mattr for xnack and sram-ecc. * config/gcn/gcn-opts.h (enum sram_ecc_type): New. * config/gcn/gcn-valu.md: Add a warning comment. * config/gcn/gcn.c (gcn_option_override): Add "sorry" for -mxnack. (output_file_start): Add xnack and sram-ecc state to ".amdgcn_target". * config/gcn/gcn.md: Add a warning comment. * config/gcn/gcn.opt: Add -mxnack and -msram-ecc. * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): Remove SRAM-ECC flag. (EF_AMDGPU_XNACK): New. (EF_AMDGPU_SRAM_ECC): New. (elf_flags): New. (copy_early_debug_info): Use elf_flags. (main): Handle -mxnack and -msram-ecc options. * doc/invoke.texi: Document -mxnack and -msram-ecc. 2021-07-19 Andrew Pinski PR target/101205 * config/aarch64/aarch64.md (csneg3_uxtw_insn): Rename to ... (*cs3_uxtw_insn4): and extend to NEG_NOT. 2021-07-19 Richard Biener PR tree-optimization/101505 * tree-vect-patterns.c (vect_determine_precisions): Walk PHIs also for loop vectorization. 2021-07-19 Richard Biener * gimple.h (gimple_expr_type): Remove. * doc/gimple.texi: Remove gimple_expr_type documentation. 2021-07-19 Richard Biener * tree-ssa-sccvn.c (vn_reference_eq): Handle NULL vr->type. (ao_ref_init_from_vn_reference): Likewise. (fully_constant_reference): Likewise. (vn_reference_lookup_call): Do not set vr->type to random values. * tree-ssa-pre.c (compute_avail): Do not try to PRE calls without a value. * tree-vect-generic.c (expand_vector_piecewise): Pass in whether we expanded parallel. (expand_vector_parallel): Adjust. (expand_vector_addition): Likewise. (expand_vector_comparison): Likewise. (expand_vector_operation): Likewise. (expand_vector_scalar_condition): Likewise. (expand_vector_conversion): Likewise. 2021-07-19 Richard Biener * tree-vrp.c (register_edge_assert_for_2): Use the type from the LHS. (vrp_folder::fold_predicate_in): Likewise. * vr-values.c (gimple_assign_nonzero_p): Likewise. (vr_values::extract_range_from_comparison): Likewise. (vr_values::extract_range_from_ubsan_builtin): Use the type of the first operand. (vr_values::extract_range_basic): Push down type computation, use the appropriate LHS. (vr_values::extract_range_from_assignment): Use the type of the LHS. 2021-07-18 H.J. Lu PR target/101492 * common/config/i386/i386-common.c (ix86_handle_option): For -mgeneral-regs-only, enable the GPR only instructions which are enabled implicitly by SSE ISAs unless they have been disabled explicitly. 2021-07-18 H.J. Lu PR target/101495 * config/i386/i386.c (ix86_check_avx_upper_stores): Moved before ix86_avx_u128_mode_needed. (ix86_avx_u128_mode_needed): Return AVX_U128_DIRTY if callee returns AVX register. 2021-07-17 Jan Hubicka * tree-ssa-structalias.c (handle_rhs_call): Support EAF_NOT_RETURNED. (handle_const_call): Liekise (handle_pure_call): Liekise 2021-07-17 Andrew MacLeod PR tree-optimization/96542 * range-op.cc (range_operator::wi_fold_in_parts): New. (range_operator::fold_range): Call wi_fold_in_parts. (operator_lshift::wi_fold): Fix broken lshift by [0,0]. * range-op.h (wi_fold_in_parts): Add prototype. 2021-07-16 David Malcolm * doc/analyzer.texi: Add __analyzer_dump_state. 2021-07-16 Bill Schmidt * config/rs6000/rbtree.c: New file. * config/rs6000/rbtree.h: New file. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (restriction): New enum. (typeinfo): Add restr field. (match_bracketed_pair): New function. (match_const_restriction): Implement. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (void_status): New enum. (basetype): Likewise. (typeinfo): Likewise. (handle_pointer): New function. (match_basetype): New stub function. (match_const_restriction): Likewise. (match_type): New function. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (consume_whitespace): New function. (advance_line): Likewise. (safe_inc_pos): Likewise. (match_identifier): Likewise. (match_integer): Likewise. (match_to_right_bracket): Likewise. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (bif_file): New variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise. (bif_path): Likewise. (ovld_path): Likewise. (header_path): Likewise. (init_path): Likewise. (defines_path): Likewise. (LINELEN): New macro. (linebuf): New variable. (line): Likewise. (pos): Likewise. (diag): Likewise. (bif_diag): New function. (ovld_diag): Likewise. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: New. * config/rs6000/rs6000-overload.def: New. 2021-07-16 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c: New. 2021-07-16 Bill Schmidt * Makefile.in (EXTRA_GTYPE_DEPS): New variable. (s-gtype): Depend on EXTRA_GTYPE_DEPS. * gengtype-state.c (state_writer::write_state_file_list): Add a parameter to the fileslist expression for the number of build headers to scan. (read_state_files_list): Detect build headers and strip the initial "./" or ".\" from their names. * gengtype.c (build_headers): New global variable. (num_build_headers): Likewise. (open_base_files): Emit #include for each build header. (main): Detect and count build headers. * gengtype.h (build_headers): New extern variable. (num_build_headers): Likewise. 2021-07-16 Richard Biener * gimple-ssa-store-merging.c (verify_symbolic_number_p): Use the type of the LHS. (find_bswap_or_nop_1): Likewise. (find_bswap_or_nop): Likewise. * tree-vectorizer.h (vect_get_smallest_scalar_type): Adjust prototype. * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Remove unused parameters, pass in the scalar type. Fix internal store function handling. * tree-vect-stmts.c (vect_analyze_stmt): Remove assert. (vect_get_vector_types_for_stmt): Move down check for existing vector stmt after we've determined a scalar type. Pass down the used scalar type to vect_get_smallest_scalar_type. * tree-vect-generic.c (expand_vector_condition): Use the type of the LHS. (expand_vector_scalar_condition): Likewise. (expand_vector_operations_1): Likewise. * tree-vect-patterns.c (vect_widened_op_tree): Likewise. (vect_recog_dot_prod_pattern): Likewise. (vect_recog_sad_pattern): Likewise. (vect_recog_widen_op_pattern): Likewise. (vect_recog_widen_sum_pattern): Likewise. (vect_recog_mixed_size_cond_pattern): Likewise. 2021-07-16 Jan Hubicka * ipa-modref.c (struct escape_entry): Use eaf_fleags_t. (dump_eaf_flags): Dump EAF_NOT_RETURNED (eaf_flags_useful_p): Use eaf_fleags_t; handle const functions and EAF_NOT_RETURNED. (modref_summary::useful_p): Likewise. (modref_summary_lto::useful_p): Likewise. (struct) modref_summary_lto: Use eaf_fleags_t. (deref_flags): Handle EAF_NOT_RETURNED. (struct escape_point): Use min_flags. (modref_lattice::init): Add EAF_NOT_RETURNED. (merge_call_lhs_flags): Ignore EAF_NOT_RETURNED functions (analyze_ssa_name_flags): Clear EAF_NOT_RETURNED on return; handle call flags. (analyze_parms): Also analyze const functions; update conition on flags usefulness. (modref_write): Update streaming. (read_section): Update streaming. (remap_arg_flags): Use eaf_flags_t. (modref_merge_call_site_flags): Hanlde EAF_NOT_RETURNED. * ipa-modref.h: (eaf_flags_t): New typedef. (struct modref_summary): Use eaf_flags_t. * tree-core.h (EAF_NOT_RETURNED): New constant. 2021-07-16 Richard Biener * gimple-fold.c (gimple_fold_stmt_to_constant_1): Use the type of the LHS. (gimple_assign_nonnegative_warnv_p): Likewise. (gimple_call_nonnegative_warnv_p): Likewise. Return false if the call has no LHS. * gimple.c (gimple_could_trap_p_1): Use the type of the LHS. * tree-eh.c (stmt_could_throw_1_p): Likewise. * tree-inline.c (insert_init_stmt): Likewise. * tree-ssa-loop-niter.c (get_val_for): Likewise. * tree-outof-ssa.c (ssa_is_replaceable_p): Use the type of the def. * tree-ssa-sccvn.c (init_vn_nary_op_from_stmt): Take a gassign *. Use the type of the lhs. (vn_nary_op_lookup_stmt): Adjust. (vn_nary_op_insert_stmt): Likewise. 2021-07-16 Ilya Leoshkevich * config/s390/predicates.md (bras_sym_operand): Accept all functions in 64-bit mode, use UNSPEC_PLT31. (larl_operand): Use UNSPEC_PLT31. * config/s390/s390.c (s390_loadrelative_operand_p): Likewise. (legitimize_pic_address): Likewise. (s390_emit_tls_call_insn): Mark __tls_get_offset as function, use UNSPEC_PLT31. (s390_delegitimize_address): Use UNSPEC_PLT31. (s390_output_addr_const_extra): Likewise. (print_operand): Add @PLT to TLS calls, handle %K. (s390_function_profiler): Mark __fentry__/_mcount as function, use %K, use UNSPEC_PLT31. (s390_output_mi_thunk): Use only UNSPEC_GOT, use %K. (s390_emit_call): Use UNSPEC_PLT31. (s390_emit_tpf_eh_return): Mark __tpf_eh_return as function. * config/s390/s390.md (UNSPEC_PLT31): Rename from UNSPEC_PLT. (*movdi_64): Use %K. (reload_base_64): Likewise. (*sibcall_brc): Likewise. (*sibcall_brcl): Likewise. (*sibcall_value_brc): Likewise. (*sibcall_value_brcl): Likewise. (*bras): Likewise. (*brasl): Likewise. (*bras_r): Likewise. (*brasl_r): Likewise. (*bras_tls): Likewise. (*brasl_tls): Likewise. (main_base_64): Likewise. (reload_base_64): Likewise. (@split_stack_call): Likewise. 2021-07-16 Richard Biener PR tree-optimization/101467 * tree-vect-stmts.c (vect_gen_while): Properly guard make_temp_ssa_name usage. 2021-07-16 Cooper Qu * config.gcc: Don't use forked print-sysroot-suffix.sh and t-sysroot-suffix for C-SKY. * config/csky/print-sysroot-suffix.sh: Delete. * config/csky/t-csky-linux: Delete. * config/csky/t-sysroot-suffix: Define MULTILIB_DIRNAMES instead of CSKY_MULTILIB_DIRNAMES. 2021-07-16 Richard Biener * tree-vect-loop.c (vect_transform_cycle_phi): Correct sign conversion issues with the partial reduction of the reused vector accumulator. 2021-07-16 Richard Biener * config/i386/i386-options.c (ix86_option_override_internal): Set param_vect_partial_vector_usage to zero if not set. 2021-07-15 Uroš Bizjak PR target/101346 * config/i386/i386.h (VALID_SSE_REG_MODE): Add TDmode. (VALID_INT_MODE_P): Add SDmode and DDmode. Add TDmode for TARGET_64BIT. (VALID_DFP_MODE_P): Remove. * config/i386/i386.c (ix86_hard_regno_mode_ok): Do not use VALID_DFP_MODE_P. 2021-07-15 Andrew MacLeod * gimple-range-fold.cc (adjust_pointer_diff_expr): Use gimple_range_type. (fold_using_range::fold_stmt): Ditto. (fold_using_range::range_of_range_op): Ditto. (fold_using_range::range_of_phi): Ditto. (fold_using_range::range_of_call): Ditto. (fold_using_range::range_of_builtin_ubsan_call): Ditto. (fold_using_range::range_of_builtin_call): Ditto. (fold_using_range::range_of_cond_expr): Ditto. * gimple-range-fold.h (gimple_range_type): New. 2021-07-15 Martin Sebor PR middle-end/97027 * tree-ssa-strlen.c (handle_assign): New function. (maybe_warn_overflow): Add argument. (nonzero_bytes_for_type): New function. (count_nonzero_bytes): Handle more tree types. Call nonzero_bytes_for_tye. (count_nonzero_bytes): Handle types. (handle_store): Handle stores from function calls. (strlen_check_and_optimize_call): Move code to handle_assign. Call it for assignments from function calls. 2021-07-15 David Malcolm PR analyzer/95006 PR analyzer/94713 PR analyzer/94714 * doc/invoke.texi: Add -Wanalyzer-use-of-uninitialized-value. 2021-07-15 David Malcolm * doc/invoke.texi (-fdump-analyzer-exploded-paths): New. 2021-07-15 Martin Sebor PR c/101289 PR c/97548 * fold-const.c (operand_compare::operand_equal_p): Handle OEP_DECL_NAME. (operand_compare::verify_hash_value): Same. * tree-core.h (OEP_DECL_NAME): New. 2021-07-15 Martin Jambor * profile-count.h (profile_count::value): Change the return type to uint64_t. * gimple-pretty-print.c (dump_gimple_bb_header): Adjust print statement. * tree-cfg.c (dump_function_to_file): Likewise. 2021-07-15 Bill Schmidt PR target/101129 * config/rs6000/rs6000-p8swap.c (has_part_mult): New. (rs6000_analyze_swaps): Insns containing a subreg of a mult are not swappable. 2021-07-15 Richard Biener * tree-vectorizer.h (vect_gen_while): Match up with vect_gen_while_not. * tree-vect-stmts.c (vect_gen_while): Adjust API to that of vect_gen_while_not. (vect_gen_while_not): Adjust. * tree-vect-loop-manip.c (vect_set_loop_controls_directly): Likewise. 2021-07-15 Aldy Hernandez * gimple-range-cache.cc (non_null_ref::adjust_range): New. (ranger_cache::range_of_def): Call adjust_range. (ranger_cache::entry_range): Same. * gimple-range-cache.h (non_null_ref::adjust_range): New. * gimple-range.cc (gimple_ranger::range_of_expr): Call adjust_range. (gimple_ranger::range_on_entry): Same. 2021-07-15 Tamar Christina Revert: 2021-07-14 Tamar Christina * config/arm/neon.md (dot_prod): Drop statements. 2021-07-15 Tamar Christina Revert: 2021-07-14 Tamar Christina * config/aarch64/aarch64-simd-builtins.def (udot, sdot): Rename to... (sdot_prod, udot_prod): ...These. * config/aarch64/aarch64-simd.md (dot_prod): Remove. (aarch64_dot): Rename to... (dot_prod): ...This. * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): Update builtins. 2021-07-15 Jakub Jelinek PR middle-end/101437 * gimplify.c (gimplify_expr): Throw away volatile reads from empty types even if they have non-BLKmode TYPE_MODE. 2021-07-15 Richard Biener PR driver/101383 * gcc.c (process_command): Process -gtoggle like process_options would after parsing options. 2021-07-15 Trevor Saunders * cfgexpand.c (expand_asm_loc): Adjust. (expand_asm_stmt): Likewise. * config/arm/aarch-common-protos.h (arm_md_asm_adjust): Likewise. * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise. * config/arm/arm.c (thumb1_md_asm_adjust): Likewise. * config/avr/avr.c (avr_md_asm_adjust): Likewise. * config/cris/cris.c (cris_md_asm_adjust): Likewise. * config/i386/i386.c (ix86_md_asm_adjust): Likewise. * config/mn10300/mn10300.c (mn10300_md_asm_adjust): Likewise. * config/nds32/nds32.c (nds32_md_asm_adjust): Likewise. * config/pdp11/pdp11.c (pdp11_md_asm_adjust): Likewise. * config/rs6000/rs6000.c (rs6000_md_asm_adjust): Likewise. * config/s390/s390.c (s390_md_asm_adjust): Likewise. * config/vax/vax.c (vax_md_asm_adjust): Likewise. * config/visium/visium.c (visium_md_asm_adjust): Likewise. * doc/tm.texi: Regenerate. * target.def: Add location argument to md_asm_adjust. 2021-07-15 Trevor Saunders * tree-diagnostic.c (diagnostic_report_current_function): Use the diagnostic's location, not input_location. 2021-07-15 Trevor Saunders * cfgexpand.c (tree_conflicts_with_clobbers_p): Pass location to diagnostics. (expand_asm_stmt): Likewise. 2021-07-14 Peter Bergner * config/rs6000/rs6000.c (adjacent_mem_locations): Return the lower addressed memory rtx, if any. (rs6000_split_multireg_move): Fix code formatting. Handle MMA build built-ins with operands in adjacent memory locations. 2021-07-14 Peter Bergner * config/rs6000/rs6000.c (rs6000_split_multireg_move): Move to later in the file. 2021-07-14 Jason Merrill * sel-sched-ir.h (get_all_loop_exits): Use auto_vec. 2021-07-14 Jason Merrill * doc/invoke.texi: -fdelete-dead-exceptions is on by default for C++. 2021-07-14 Tamar Christina * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove erroneous line. 2021-07-14 Andrew MacLeod * params.opt (param_evrp_mode): Change default. 2021-07-14 Tamar Christina * config/aarch64/aarch64-simd-builtins.def (udot, sdot): Rename to... (sdot_prod, udot_prod): ...These. * config/aarch64/aarch64-simd.md (dot_prod): Remove. (aarch64_dot): Rename to... (dot_prod): ...This. * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32): Update builtins. 2021-07-14 Tamar Christina * config/arm/neon.md (dot_prod): Drop statements. 2021-07-14 Tamar Christina * doc/sourcebuild.texi (arm_v8_2a_i8mm_neon_hw): Document. 2021-07-14 Tamar Christina * config/arm/neon.md (usdot_prod): New. 2021-07-14 Tamar Christina * config/aarch64/aarch64-simd.md (aarch64_usdot): Rename to... (usdot_prod): ... This. * config/aarch64/aarch64-simd-builtins.def (usdot): Rename to... (usdot_prod): ...This. * config/aarch64/arm_neon.h (vusdot_s32, vusdotq_s32): Likewise. * config/aarch64/aarch64-sve.md (@aarch64_dot_prod): Rename to... (@dot_prod): ...This. * config/aarch64/aarch64-sve-builtins-base.cc (svusdot_impl::expand): Use it. 2021-07-14 Tamar Christina * optabs.def (usdot_prod_optab): New. * doc/md.texi: Document it and clarify other dot prod optabs. * optabs-tree.h (enum optab_subtype): Add optab_vector_mixed_sign. * optabs-tree.c (optab_for_tree_code): Support usdot_prod_optab. * optabs.c (expand_widen_pattern_expr): Likewise. * tree-cfg.c (verify_gimple_assign_ternary): Likewise. * tree-vect-loop.c (vectorizable_reduction): Query dot-product kind. * tree-vect-patterns.c (vect_supportable_direct_optab_p): Take optional optab subtype. (vect_widened_op_tree): Optionally ignore mismatch types. (vect_recog_dot_prod_pattern): Support usdot_prod_optab. 2021-07-14 H.J. Lu PR target/101395 * config/i386/driver-i386.c (host_detect_local_cpu): Check "arch [32|64]" and "tune [32|64]" for 32-bit and 64-bit codegen. Enable UINTR only for 64-bit codegen. * config/i386/i386-options.c (ix86_option_override_internal::DEF_PTA): Skip PTA_UINTR if not in 64-bit mode. * config/i386/i386.h (ARCH_ARG): New. (CC1_CPU_SPEC): Pass "[arch|tune] 32" for 32-bit codegen and "[arch|tune] 64" for 64-bit codegen. 2021-07-14 Richard Biener PR tree-optimization/101445 * tree-vect-stmts.c (vectorizable_load): Do the gap adjustment of the IV in the correct direction for negative stride accesses. 2021-07-14 Jakub Jelinek PR go/101407 * godump.c (godump_str_hash): New type. (godump_container::pot_dummy_types): Use string_hash instead of ptr_hash in the hash_set. 2021-07-14 Richard Biener * tree-vect-loop.c (vect_find_reusable_accumulator): Handle vector types where the old vector type has a multiple of the new vector type elements. (vect_create_partial_epilog): New function, split out from... (vect_create_epilog_for_reduction): ... here. (vect_transform_cycle_phi): Reduce the re-used accumulator to the new vector type. 2021-07-14 Alexandre Oliva * tree-ssa-alias.c (attr_fnspec::verify): Fix index in non-'t'-sized arg check. 2021-07-14 Alexandre Oliva * tree-cfg.c (cleanup_dead_labels_eh): Update post_landing_pad label upon change of landing pad block's primary label. (cleanup_dead_labels): Check that a removed label is not that of a landing pad. 2021-07-13 Jonathan Wright * combine.c (combine_simplify_rtx): Add vec_select -> subreg simplification. * config/aarch64/aarch64.md (*zero_extend2_aarch64): Add Neon to general purpose register case for zero-extend pattern. * config/arm/vfp.md (*arm_movsi_vfp): Remove "*" from *t -> r case to prevent some cases opting to go through memory. * cse.c (fold_rtx): Add vec_select -> subreg simplification. * rtl.c (rtvec_series_p): Define predicate to determine whether a vector contains a linear series of integers. * rtl.h (rtvec_series_p): Define. * rtlanal.c (vec_series_lowpart_p): Define predicate to determine if a vector selection is equivalent to the low part of the vector. * rtlanal.h (vec_series_lowpart_p): Define. * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Add vec_select -> subreg simplification. 2021-07-13 Paul A. Clarke * config/rs6000/smmintrin.h (_mm_testz_si128, _mm_testc_si128, _mm_testnzc_si128, _mm_test_all_ones, _mm_test_all_zeros, _mm_test_mix_ones_zeros): New. 2021-07-13 Roger Sayle Richard Biener * gimple.c (gimple_could_trap_p_1): Make S argument a "const gimple*". Preserve constness in call to gimple_asm_volatile_p. (gimple_could_trap_p): Make S argument a "const gimple*". * gimple.h (gimple_could_trap_p_1, gimple_could_trap_p): Update function prototypes. 2021-07-13 Richard Sandiford * tree-vectorizer.h (vect_reusable_accumulator): New structure. (_loop_vec_info::main_loop_edge): New field. (_loop_vec_info::skip_main_loop_edge): Likewise. (_loop_vec_info::skip_this_loop_edge): Likewise. (_loop_vec_info::reusable_accumulators): Likewise. (_stmt_vec_info::reduc_scalar_results): Likewise. (_stmt_vec_info::reused_accumulator): Likewise. (vect_get_main_loop_result): Declare. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize reduc_scalar_inputs. (vec_info::free_stmt_vec_info): Free reduc_scalar_inputs. * tree-vect-loop-manip.c (vect_get_main_loop_result): New function. (vect_do_peeling): Fill an epilogue loop's main_loop_edge, skip_main_loop_edge and skip_this_loop_edge fields. * tree-vect-loop.c (INCLUDE_ALGORITHM): Define. (vect_emit_reduction_init_stmts): New function. (get_initial_def_for_reduction): Use it. (get_initial_defs_for_reduction): Likewise. Change the vinfo parameter to a loop_vec_info. (vect_create_epilog_for_reduction): Store the scalar results in the reduc_info. If an epilogue loop is reusing an accumulator from the main loop, and if the epilogue loop can also be skipped, try to place the reduction code in the join block. Record accumulators that could potentially be reused by epilogue loops. (vect_transform_cycle_phi): When vectorizing epilogue loops, try to reuse accumulators from the main loop. Record the initial value in reduc_info for non-SLP reductions too. 2021-07-13 Richard Sandiford * tree-vect-loop.c (get_initial_def_for_reduction): Remove adjustment handling. Take the neutral value as an argument, in place of the code argument. (vect_transform_cycle_phi): Update accordingly. Handle the initial values of cond reductions separately from code reductions. Choose the adjustment here rather than in get_initial_def_for_reduction. Sink the splat of vec_initial_def. 2021-07-13 Richard Sandiford * tree-vect-loop.c (neutral_op_for_slp_reduction): Replace with... (neutral_op_for_reduction): ...this, providing a more general interface. (vect_create_epilog_for_reduction): Update accordingly. (vectorizable_reduction): Likewise. (vect_transform_cycle_phi): Likewise. 2021-07-13 Richard Sandiford * tree-vect-loop.c (get_initial_def_for_reduction): Take the reduc_info instead of the original stmt_vec_info. (vect_transform_cycle_phi): Update accordingly. 2021-07-13 Richard Sandiford * tree-vect-loop.c (get_initial_defs_for_reduction): Take the reduc_info as an additional parameter. (vect_transform_cycle_phi): Update accordingly. 2021-07-13 Richard Sandiford * tree-vectorizer.h: Include tree-ssa-operands.h. (vect_phi_initial_value): New function. * tree-vect-loop.c (neutral_op_for_slp_reduction): Use it. (get_initial_defs_for_reduction, info_for_reduction): Likewise. (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise. (vect_transform_cycle_phi, vectorizable_induction): Likewise. 2021-07-13 Richard Sandiford * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert the phi results to vectype after creating them. Remove later conversion code that thus becomes redundant. 2021-07-13 Richard Sandiford * tree-vect-loop.c (vect_create_epilog_for_reduction): Replace the new_phis vector with a reduc_inputs vector. Combine handling of reduction chains and ncopies > 1. 2021-07-13 Richard Sandiford * tree-vect-loop.c (vect_create_epilog_for_reduction): Truncate scalar_results to group_size elements after reducing down from N*group_size elements. Construct an array_slice of the live-out stmts and assert that there is one stmt per scalar result. 2021-07-13 Richard Sandiford * tree-vect-loop.c (vect_create_epilog_for_reduction): Remove nested_in_vect_loop and use double_reduc everywhere. Remove dead assignment to "loop". 2021-07-13 Richard Sandiford * internal-fn.c (vectorized_internal_fn_supported_p): Handle vector types first. For scalar types, consider both the preferred vector mode and the alternative vector modes. * optabs-query.c (can_vec_mask_load_store_p): Use the same structure as above, in particular using related_vector_mode for modes provided by autovectorize_vector_modes. 2021-07-13 Jakub Jelinek Richard Biener PR tree-optimization/101419 * tree-pass.h (PROP_objsz): Define. (make_pass_early_object_sizes): Declare. * passes.def (pass_all_early_optimizations): Rename pass_object_sizes there to pass_early_object_sizes, drop parameter. (pass_all_optimizations): Move pass_object_sizes right after pass_ccp, drop parameter, move pass_post_ipa_warn right after that. * tree-object-size.c (pass_object_sizes::execute): Rename to... (object_sizes_execute): ... this. Add insert_min_max_p argument. (pass_data_object_sizes): Move after object_sizes_execute. (pass_object_sizes): Likewise. In execute method call object_sizes_execute, drop set_pass_param method and insert_min_max_p non-static data member and its initializer in the ctor. (pass_data_early_object_sizes, pass_early_object_sizes, make_pass_early_object_sizes): New. * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Use (cfun->curr_properties & PROP_objsz) instead of cfun->after_inlining. 2021-07-13 Kito Cheng PR target/101275 * config/riscv/constraints.md ("S"): Update description and remove @internal. * doc/md.texi (Machine Constraints): Document the 'S' constraints for RISC-V. 2021-07-13 Richard Biener Revert: 2021-07-12 Richard Biener * tree-vect-slp.c (vect_slp_region): Show the number of SLP graph entries in the optimization message. 2021-07-13 Michael Meissner * config/rs6000/altivec.md (xxspltiw_v4sf): Change local variable value to to long. * config/rs6000/rs6000-protos.h (rs6000_const_f32_to_i32): Change return type to long. * config/rs6000/rs6000.c (rs6000_const_f32_to_i32): Change return type to long. 2021-07-12 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_builtin_ubsan_call): Query relation between the 2 operands and use it. 2021-07-12 Sergei Trofimovich * doc/cfg.texi: Fix s/ei_safe_safe/ei_safe_edge/ typo. 2021-07-12 Uroš Bizjak PR target/101424 * config/i386/predicates.md (vec_setm_sse41_operand): Rename from vec_setm_operand. (vec_setm_avx2_operand): New predicate. * config/i386/sse.md (vec_set): Use V_128 mode iterator. Use vec_setm_sse41_operand as operand 2 predicate. (vec_set PR tree-optimization/101335 * range-op.cc (operator_cast::lhs_op1_relation): Delete. 2021-07-12 Andrew Pinski * tree-ssa-phiopt.c (match_simplify_replacement): Move insert of the sequence before the movement of the statement. Check if to see if the statement is used outside of the original phi to see if we should move it. 2021-07-12 Richard Biener * dump-context.h (debug_dump_context::debug_dump_context): Add FILE * parameter defaulted to stderr. * dumpfile.c (debug_dump_context::debug_dump_context): Adjust. * tree-vect-slp.c (dot_slp_tree): New functions. 2021-07-12 Richard Biener PR tree-optimization/101373 * tree-ssa-pre.c (prune_clobbered_mems): Also prune trapping references when the BB may not return. (compute_avail): Pass in the function we're working on and replace cfun references with it. Externally throwing const calls also possibly terminate the function. (pass_pre::execute): Pass down the function we're working on. * gcse.c (compute_hash_table_work): Externally throwing const/pure calls also need record_last_mem_set_info. * postreload-gcse.c (record_opr_changes): Looping or externally throwing const/pure calls also need record_last_mem_set_info. 2021-07-12 Uroš Bizjak * recog.c (memory_address_addr_space_p): Change the type to bool. Return true/false instead of 1/0. (offsettable_memref_p): Ditto. (offsettable_nonstrict_memref_p): Ditto. (offsettable_address_addr_space_p): Ditto. Change the type of addressp indirect function to bool. * recog.h (memory_address_addr_space_p): Change the type to bool. (strict_memory_address_addr_space_p): Ditto. (offsettable_memref_p): Ditto. (offsettable_nonstrict_memref_p): Ditto. (offsettable_address_addr_space_p): Ditto. * reload.c (maybe_memory_address_addr_space_p): Ditto. (strict_memory_address_addr_space_p): Change the type to bool. Return true/false instead of 1/0. (maybe_memory_address_addr_space_p): Change the type to bool. 2021-07-12 Richard Biener * tree-vect-slp.c (vect_slp_region): Show the number of SLP graph entries in the optimization message. 2021-07-12 Richard Biener PR tree-optimization/101394 * tree-ssa-pre.c (do_pre_regular_insertion): Avoid inserting copies from abnormals for a full redundancy. 2021-07-12 Richard Biener PR middle-end/101423 * gimple.c (gimple_could_trap_p_1): Internal function calls do not trap. * tree-eh.c (tree_could_trap_p): Likewise. 2021-07-12 prathamesh.kulkarni PR target/66791 * config/arm/arm_neon.h (vmul_n_u32): Replace call to builtin with __a * __b. (vmulq_n_u32): Likewise. (vmul_n_f32): Gate __a * __b on __FAST_MATH__. (vmulq_n_f32): Likewise. (vmul_n_f16): Likewise. (vmulq_n_f16): Likewise. 2021-07-12 Martin Liska PR sanitizer/101425 * gcc.c (check_offload_target_name): Call candidates_list_and_hint only if we have a candidate. 2021-07-12 prathamesh.kulkarni PR target/98435 * config/arm/neon.md (vec_init): Move to ... * config/arm/vec-common.md (vec_init): ... here. Change the pattern's mode to VDQX and gate it on VALID_MVE_MODE. 2021-07-12 Roger Sayle PR tree-optimization/101403 * match.pd ((T)bswap(X)>>C): Correctly handle cases where signedness of the shift is not the same as the signedness of the type extension. 2021-07-09 Roger Sayle Uroš Bizjak * config/i386/i386.md (*divmodsi4_const): Optimize SImode divmod of a constant numerator with new define_insn_and_split. 2021-07-09 Iain Sandoe PR target/100152 * config/i386/i386-expand.c (ix86_expand_call): If a call is to a non-local-binding, or local but to a public symbol, then assume that it might be indirected via the lazy symbol binder. Mark R10 and R10 as clobbered in that case. 2021-07-09 Eric Botcazou PR target/101377 * gcc.c (ASM_DEBUG_DWARF_OPTION): Set again to --gdwarf2 in the case where HAVE_AS_WORKING_DWARF_N_FLAG is not defined and HAVE_LD_BROKEN_PE_DWARF5 is defined. 2021-07-09 Uroš Bizjak * config/i386/i386.md (*udivmodsi4_pow2_zext_1): Limit the log2 range of operands[3] to [1,31]. (*udivmodsi4_pow2_zext_2): Ditto. Correct insn RTX pattern. 2021-07-09 Sergei Trofimovich * doc/md.texi: Don't split @smallexample in multiple @groups. 2021-07-09 Sergei Trofimovich * doc/md.texi: Add missing 'see' word. 2021-07-09 Andrew Pinski * tree-ssa-phiopt.c (phiopt_early_allow): Change arguments to take sequence and gimple_match_op. Accept the case where op is a SSA_NAME and one statement in the sequence. Also allow constants. (gimple_simplify_phiopt): Always pass a sequence to resimplify. Update call to phiopt_early_allow. Discard the sequence if not used. 2021-07-09 Xi Ruoyao PR target/100760 PR target/100761 PR target/100762 * config/mips/mips.c (mips_const_insns): Use MSA_SUPPORTED_MODE_P instead of ISA_HAS_MSA. (mips_expand_vec_unpack): Likewise. (mips_expand_vector_init): Likewise. 2021-07-09 Kewen Lin * config/rs6000/vsx.md (mods_): Rename to... (mod3): ... this. (modu_): Rename to... (umod3): ... this. * config/rs6000/rs6000-builtin.def (MODS_V2DI, MODS_V4SI, MODU_V2DI, MODU_V4SI): Adjust. 2021-07-08 Jeff Law * config/h8300/shiftrotate.md (variable shifts): Expose condition code handling for the test before the loop. 2021-07-08 Martin Jambor PR ipa/101066 * ipa-sra.c (class isra_call_summary): New member m_before_any_store, initialize it in the constructor. (isra_call_summary::dump): Dump the new field. (ipa_sra_call_summaries::duplicate): Copy it. (process_scan_results): Set it. (isra_write_edge_summary): Stream it. (isra_read_edge_summary): Likewise. (param_splitting_across_edge): Only override safe_to_import_accesses if m_before_any_store is set. 2021-07-08 Martin Sebor PR bootstrap/101374 * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Use Object Size Type 0 instead of 1. 2021-07-08 Richard Sandiford * tree-vect-loop.c (vectorizable_reduction): Remove always-true if condition. 2021-07-08 Richard Sandiford * match.pd: Simplify an extend-operate-truncate sequence involving a POLY_INT_CST. 2021-07-08 Roger Sayle Richard Biener PR tree-optimization/40210 * match.pd (bswap optimizations): Simplify (bswap(x)>>C1)&C2 as (x>>C3)&C2 when possible. Simplify bswap(x)>>C1 as ((T)x)>>C2 when possible. Simplify bswap(x)&C1 as (x>>C2)&C1 when 0<=C1<=255. 2021-07-08 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_sse_unpack): Handle V4QI mode. * config/i386/mmx.md (V_32): New mode iterator. (mov): Use V_32 mode iterator. (*mov_internal): Ditto. (*push2_rex64): Ditto. (*push2): Ditto. (movmisalign): Ditto. (mmx_v1si3): New insn pattern. (sse4_1_v2qiv2hi2): Ditto. (vec_unpacks_lo_v4qi): New expander. (vec_unpacks_hi_v4qi): Ditto. (vec_unpacku_lo_v4qi): Ditto. (vec_unpacku_hi_v4qi): Ditto. * config/i386/i386.h (VALID_SSE2_REG_MODE): Add V1SImode. (VALID_INT_MODE_P): Ditto. 2021-07-08 Michael Meissner PR target/100809 * config/rs6000/rs6000.md (udivti3): New insn. (divti3): New insn. (umodti3): New insn. (modti3): New insn. 2021-07-07 Martin Sebor PR tree-optimization/100137 PR tree-optimization/99121 PR tree-optimization/97027 * builtins.c (access_ref::access_ref): Also set offmax. (access_ref::offset_in_range): Define new function. (access_ref::add_offset): Set offmax. (access_ref::inform_access): Handle access_none. (handle_mem_ref): Clear ostype. (compute_objsize_r): Handle ASSERT_EXPR. * builtins.h (struct access_ref): Add offmax member. * gimple-array-bounds.cc (array_bounds_checker::check_mem_ref): Use compute_objsize() and simplify. 2021-07-07 Peter Bergner * config/rs6000/rs6000-call.c (mma_init_builtins): Use VSX_BUILTIN_LXVP and VSX_BUILTIN_STXVP. 2021-07-07 Martin Sebor PR target/101363 * config/aarch64/aarch64.c (aarch64_simd_lane_bounds): Remove a stray %K from error_at() missed in r12-2088. 2021-07-07 Richard Biener PR tree-optimization/99728 * tree-ssa-loop-im.c (gather_mem_refs_stmt): Record aggregate copies. (mem_refs_may_alias_p): Add assert we handled aggregate copies elsewhere. (sm_seq_valid_bb): Give up when running into aggregate copies. (ref_indep_loop_p): Handle aggregate copies as never being invariant themselves but allow other refs to be disambiguated against them. (can_sm_ref_p): Do not try to apply store-motion to aggregate copies. 2021-07-06 Indu Bhagat PR debug/101283 * dwarf2ctf.c (ctf_get_AT_data_member_location): Multiply by 8 to get number of bits. 2021-07-06 Martin Sebor * gimple-pretty-print.c (percent_G_format): Remove. * tree-diagnostic.c (default_tree_printer): Remove calls. * tree-pretty-print.c (percent_K_format): Remove. * tree-pretty-print.h (percent_K_format): Remove. 2021-07-06 Martin Sebor * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_builtin): Remove %K and use error_at. (aarch64_expand_fcmla_builtin): Same. (aarch64_expand_builtin_tme): Same. (aarch64_expand_builtin_memtag): Same. * config/arm/arm-builtins.c (arm_expand_acle_builtin): Same. (arm_expand_builtin): Same. * config/arm/arm.c (bounds_check): Same. 2021-07-06 Martin Sebor * builtins.c (warn_string_no_nul): Remove %G. (maybe_warn_for_bound): Same. (warn_for_access): Same. (check_access): Same. (check_strncat_sizes): Same. (expand_builtin_strncat): Same. (expand_builtin_strncmp): Same. (expand_builtin): Same. (expand_builtin_object_size): Same. (warn_dealloc_offset): Same. (maybe_emit_free_warning): Same. * calls.c (maybe_warn_alloc_args_overflow): Same. (maybe_warn_nonstring_arg): Same. (maybe_warn_rdwr_sizes): Same. * expr.c (expand_expr_real_1): Remove %K. * gimple-fold.c (gimple_fold_builtin_strncpy): Remove %G. (gimple_fold_builtin_strncat): Same. * gimple-ssa-sprintf.c (format_directive): Same. (handle_printf_call): Same. * gimple-ssa-warn-alloca.c (pass_walloca::execute): Same. * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Same. (maybe_diag_access_bounds): Same. Call gimple_location. (check_bounds_or_overlap): Same. * trans-mem.c (ipa_tm_scan_irr_block): Remove %K. Simplify. * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Remove %G. * tree-ssa-strlen.c (maybe_warn_overflow): Same. (maybe_diag_stxncpy_trunc): Same. (handle_builtin_stxncpy_strncat): Same. (maybe_warn_pointless_strcmp): Same. * tree-ssa-uninit.c (maybe_warn_operand): Same. 2021-07-06 Uroš Bizjak PR target/97194 * config/i386/predicates.md (vec_setm_operand): Enable register_operand for TARGET_SSE4_1. * config/i386/mmx.md (vec_setv2hi): Use vec_setm_operand as operand 2 predicate. Call ix86_expand_vector_set_var for non-constant index operand. (vec_setv4qi): Use vec_setm_mmx_operand as operand 2 predicate. Call ix86_expand_vector_set_var for non-constant index operand. 2021-07-06 Jeff Law * config/h8300/jumpcall.md (*branch): When possible, generate the comparison in CCZN mode. * config/h8300/predicates.md (simple_memory_operand): Reject all auto-increment addressing modes. 2021-07-06 Iain Sandoe PR bootstrap/100246 * config/i386/i386.h (struct stringop_algs): Define a CTOR for this type. 2021-07-06 Richard Biener * doc/md.texi (vec_fmaddsub4): Document. (vec_fmsubadd4): Likewise. * optabs.def (vec_fmaddsub$a4): Add. (vec_fmsubadd$a4): Likewise. * internal-fn.def (IFN_VEC_FMADDSUB): Add. (IFN_VEC_FMSUBADD): Likewise. * tree-vect-slp-patterns.c (addsub_pattern::recognize): Refactor to handle IFN_VEC_FMADDSUB and IFN_VEC_FMSUBADD. (addsub_pattern::build): Likewise. * tree-vect-slp.c (vect_optimize_slp): CFN_VEC_FMADDSUB and CFN_VEC_FMSUBADD are not transparent for permutes. * config/i386/sse.md (vec_fmaddsub4): New expander. (vec_fmsubadd4): Likewise. 2021-07-06 Richard Biener * doc/invoke.texi (fmove-loop-stores): Document. * common.opt (fmove-loop-stores): New option. * opts.c (default_options_table): Enable -fmove-loop-stores at -O1 but not -Og. * tree-ssa-loop-im.c (pass_lim::execute): Pass flag_move_loop_stores instead of true to loop_invariant_motion_in_fun. 2021-07-06 Iain Sandoe * doc/install.texi: Document --with-dsymutil. 2021-07-06 Andrew Pinski PR tree-optimization/101256 * dbgcnt.def (phiopt_edge_range): New counter. * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Check to make sure the new name is defined in the same bb as the conditional before duplicating range info. Also add debug counter. 2021-07-06 Kewen Lin PR rtl-optimization/100328 * config/i386/i386-options.c (ix86_option_override_internal): Set param_ira_consider_dup_in_all_alts to 0. 2021-07-06 Kewen Lin PR rtl-optimization/100328 * doc/invoke.texi (ira-consider-dup-in-all-alts): Document new parameter. * ira.c (ira_get_dup_out_num): Adjust as parameter param_ira_consider_dup_in_all_alts. * params.opt (ira-consider-dup-in-all-alts): New. * ira-conflicts.c (process_regs_for_copy): Add one parameter single_input_op_has_cstr_p. (get_freq_for_shuffle_copy): New function. (add_insn_allocno_copies): Adjust as single_input_op_has_cstr_p. * ira-int.h (ira_get_dup_out_num): Add one bool parameter. 2021-07-05 Jeff Law * config/h8300/shiftrotate.md (shift-by-variable patterns): Update to generate condition code aware RTL directly. 2021-07-05 Andrew Pinski PR tree-optimization/101039 * match.pd (A CMP 0 ? A : -A): New patterns. * tree-ssa-phiopt.c (abs_replacement): Delete function. (tree_ssa_phiopt_worker): Don't call abs_replacement. Update comment about abs_replacement. 2021-07-05 Andrew Pinski * tree-ssa-phiopt.c (gimple_simplify_phiopt): If "A ? B : C" fails to simplify, try "(!A) ? C : B". 2021-07-05 Andrew Pinski * tree-ssa-phiopt.c (match_simplify_replacement): Add early_p argument. Call gimple_simplify_phiopt instead of gimple_simplify. (tree_ssa_phiopt_worker): Update call to match_simplify_replacement and allow unconditionally. (phiopt_early_allow): New function. (gimple_simplify_phiopt): New function. 2021-07-05 Andrew Pinski PR middle-end/101237 * fold-const.c (negate_expr_p): Remove call to element_mode and TREE_MODE/TREE_TYPE when calling HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS. (fold_negate_expr_1): Likewise. (const_unop): Likewise. (fold_cond_expr_with_comparison): Likewise. (fold_binary_loc): Likewise. (fold_ternary_loc): Likewise. (tree_call_nonnegative_warnv_p): Likewise. * match.pd (-(A + B) -> (-B) - A): Likewise. 2021-07-05 Iain Sandoe * configure.ac: Handle --with-dsymutil in the same way as we do for the assembler and linker. (DEFAULT_DSYMUTIL): New. Extract the type and version for the dsymutil configured or found by the default searches. * config.in: Regenerated. * configure: Regenerated. * collect2.c (do_dsymutil): Handle locating dsymutil in the same way as for the assembler and linker. * config/darwin.h (DSYMUTIL): Delete. * gcc.c: Report a configured dsymutil correctly. * exec-tool.in: Allow for dsymutil. 2021-07-05 Uroš Bizjak * config/i386/i386-expand.c (ix86_split_mmx_punpck): Handle V4QI and V2HI modes. (expand_vec_perm_blend): Allow 4-byte vector modes with TARGET_SSE4_1. Handle V4QI mode. Emit mmx_pblendvb32 for 4-byte modes. (expand_vec_perm_pshufb): Rewrite to use switch statemets. Handle 4-byte dual operands with TARGET_XOP and single operands with TARGET_SSSE3. Emit mmx_ppermv32 for TARGET_XOP and mmx_pshufbv4qi3 for TARGET_SSSE3. (expand_vec_perm_pblendv): Allow 4-byte vector modes with TARGET_SSE4_1. (expand_vec_perm_interleave2): Allow 4-byte vector modes. (expand_vec_perm_pshufb2): Allow 4-byte vector modes with TARGET_SSSE3. (expand_vec_perm_even_odd_1): Handle V4QI mode. (expand_vec_perm_broadcast_1): Handle V4QI mode. (ix86_vectorize_vec_perm_const): Handle V4QI mode. * config/i386/mmx.md (mmx_ppermv32): New insn pattern. (mmx_pshufbv4qi3): Ditto. (*mmx_pblendw32): Ditto. (*mmx_pblendw64): Rename from *mmx_pblendw. (mmx_punpckhbw_low): New insn_and_split pattern. (mmx_punpcklbw_low): Ditto. 2021-07-05 Richard Biener * tree-vect-loop-manip.c (vect_loop_versioning): Do not set LOOP_C_INFINITE on the vectorized loop. 2021-07-05 Richard Biener PR middle-end/101291 * cfgloopmanip.c (loop_version): Set the loop copy of the versioned loop to the new loop. 2021-07-04 Iain Sandoe PR target/100269 * config.gcc: Ensure that Darwin biarch definitions are added before i386.h. * config/i386/darwin.h (TARGET_64BIT): Remove. (PR80556_WORKAROUND): New. (REAL_LIBGCC_SPEC): Amend to use PR80556_WORKAROUND. (DARWIN_SUBARCH_SPEC): New. * config/i386/darwin32-biarch.h (TARGET_64BIT_DEFAULT, TARGET_BI_ARCH, PR80556_WORKAROUND): New. (REAL_LIBGCC_SPEC): Remove. * config/i386/darwin64-biarch.h (TARGET_64BIT_DEFAULT, TARGET_BI_ARCH, PR80556_WORKAROUND): New. (REAL_LIBGCC_SPEC): Remove. 2021-07-03 H.J. Lu PR middle-end/101294 * expr.c (store_constructor): Don't use vec_duplicate on vector. 2021-07-02 Martin Sebor PR middle-end/98871 PR middle-end/98512 * diagnostic.c (get_any_inlining_info): New. (update_effective_level_from_pragmas): Handle inlining context. (diagnostic_enabled): Same. (diagnostic_report_diagnostic): Same. * diagnostic.h (struct diagnostic_info): Add ctor. (struct diagnostic_context): Add new member. * tree-diagnostic.c (set_inlining_locations): New. (tree_diagnostics_defaults): Set new callback pointer. 2021-07-02 Peter Bergner * config/rs6000/rs6000-builtin.def (BU_MMA_PAIR_LD, BU_MMA_PAIR_ST): New macros. (__builtin_vsx_lxvp, __builtin_vsx_stxvp): New built-ins. * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Expand lxvp and stxvp built-ins. (mma_init_builtins): Handle lxvp and stxvp built-ins. (builtin_function_type): Likewise. * doc/extend.texi (__builtin_vsx_lxvp, __builtin_mma_stxvp): Document. 2021-07-02 Jeff Law * config/h8300/h8300-protos.h (compute_a_shift_cc): Accept additional argument for the code. * config/h8300/h8300.c (compute_a_shift_cc): Accept additional argument for the code. Just return if the ZN bits are useful or not rather than the old style CC_* enums. * config/h8300/shiftrotate.md (shiftqi_noscratch): Move before more generic shiftqi patterns. (shifthi_noscratch, shiftsi_noscratch): Similarly. (shiftqi_noscratch_set_flags): New pattern. (shifthi_noscratch_set_flags, shiftsi_noscratch_set_flags): Likewise. 2021-07-02 Andrew MacLeod PR tree-optimization/101223 * range-op.cc (build_lt): Add -1 for signed values. (built_gt): Subtract -1 for signed values. 2021-07-02 David Faust * btfout.c (get_btf_kind): Support BTF_KIND_FLOAT. (btf_asm_type): Likewise. 2021-07-02 Jeff Law * config/h8300/h8300-protos.h (output_a_shift): Make first argument an array of rtx rather than a pointer to rtx. Add code argument. (compute_a_shift_length): Similarly. * config/h8300/h8300.c (h8300_shift_costs): Adjust now that the shift itself isn't an operand. Create dummy operand[0] to carry a mode and pass a suitable rtx code to compute_a_shift_length. (get_shift_alg): Adjust operand number of clobber in output templates. (output_a_shift): Make first argument an array of rtx rather than a pointer to rtx. Add code argument for the type of shift. Adjust now that the shift itself is no longer an operand. (compute_a_shift_length): Similarly. * config/h8300/shiftrotate.md (shiftqi, shifthi, shiftsi): Use an iterator rather than nshift_operator. (shiftqi_noscratch, shifthi_noscratch, shiftsi_noscratch): Likewise. (shiftqi_clobber_flags): Adjust to API changes in output_a_shift and compute_a_shift_length. (shiftqi_noscratch_clobber_flags): Likewise. (shifthi_noscratch_clobber_flags): Likewise. (shiftsi_noscratch_clobber_flags): Likewise. 2021-07-02 Iain Sandoe PR debug/101283 * config/darwin.h (DSYMUTIL_SPEC): Do not try to run dsymutil for BTF/CTF. 2021-07-02 Iain Sandoe PR debug/101283 * config/darwin.h (CTF_INFO_SECTION_NAME): Update the segment to include BTF. (BTF_INFO_SECTION_NAME): New. 2021-07-02 Jeff Law * config/m32r/m32r-protos.h (call_operand): Adjust return type. (small_data_operand, memreg_operand, small_insn_p): Likewise. * config/m32r/m32r.c (call_operand): Adjust return type. (small_data_operand, memreg_operand): Likewise. 2021-07-02 Jeff Law * config/frv/frv-protos.h (integer_register_operand): Adjust return type. (frv_load_operand, gpr_or_fpr_operand, gpr_no_subreg_operand): Likewise. (fpr_or_int6_operand, gpr_or_int_operand); Likewise. (gpr_or_int12_operand, gpr_or_int10_operand); Likewise. (move_source_operand, move_destination_operand): Likewise. (condexec_source_operand, condexec_dest_operand): Likewise. (lr_operand, gpr_or_memory_operand, fpr_or_memory_operand): Likewise. (reg_or_0_operand, fcc_operand, icc_operand, cc_operand): Likewise. (fcr_operand, icr_operand, cr_operand, call_operand): Likewise. (fpr_operand, even_reg_operand, odd_reg_operand): Likewise. (even_gpr_operand, odd_gpr_operand, quad_fpr_operand): Likewise. (even_fpr_operand, odd_fpr_operand): Likewise. (dbl_memory_one_insn_operand, dbl_memory_two_insn_operand): Likewise. (int12_operand, int6_operand, int5_operand, uint5_operand): Likewise. (uint4_operand, uint1_operand, int_2word_operand): Likewise (upper_int16_operand, uint16_operand, symbolic_operand): Likewise. (relational_operator, float_relational_operator): Likewise. (ccr_eqne_operator, minmax_operator): Likewise. (condexec_si_binary_operator, condexec_si_media_operator): Likewise. (condexec_si_divide_operator, condexec_si_unary_operator): Likewise. (condexec_sf_conv_operator, condexec_sf_add_operator): Likewise. (intop_compare_operator, acc_operand, even_acc_operand): Likewise. (quad_acc_operand, accg_operand): Likewise. 2021-07-02 Jeff Law * config/stormy16/stormy16-protos.h (xstormy16_below_100_symbol): Change return type to a bool. (nonimmediate_nonstack_operand): Likewise. (xstormy16_splittable_below100_operand): Likewise. * config/stormy16/stormy16.c (xstormy16_below_100_symbol): Fix return type. (xstormy16_splittable_below100_operand): Likewise. 2021-07-02 Richard Biener PR tree-optimization/101293 * tree-ssa-loop-im.c (mem_ref_hasher::equal): Compare MEM_REF bases with combined offsets. (gather_mem_refs_stmt): Hash MEM_REFs as if their offset were combined with the rest of the offset. 2021-07-02 Eric Botcazou * config/i386/i386.c (asm_preferred_eh_data_format): Always use the PIC encodings for PE-COFF targets. 2021-07-02 Jakub Jelinek PR target/101286 * config/i386/i386-expand.c (ix86_broadcast_from_integer_constant): Return nullptr for TImode inner mode. 2021-07-02 Richard Biener PR tree-optimization/101280 PR tree-optimization/101173 * gimple-loop-interchange.cc (tree_loop_interchange::valid_data_dependences): Properly guard all dependence checks with DDR_REVERSED_P or its inverse. 2021-07-02 Hongyu Wang * config/i386/i386-expand.c (ix86_expand_builtin): Add branch to clear odata when ZF is set for asedecenc_expand and wideaesdecenc_expand. 2021-07-02 Eugene Rozenfeld * config/i386/gcc-auto-profile: regenerate 2021-07-02 liuhongt * config/i386/sse.md (trunc2): Refined to .. (trunc2): this. 2021-07-01 David Malcolm * diagnostic.h (diagnostic_context::m_file_cache): New field. * input.c (class fcache): Rename to... (class file_cache_slot): ...this, making most members private and prefixing fields with "m_". (file_cache_slot::get_file_path): New accessor. (file_cache_slot::get_use_count): New accessor. (file_cache_slot::missing_trailing_newline_p): New accessor. (file_cache_slot::inc_use_count): New. (fcache_buffer_size): Move to... (file_cache_slot::buffer_size): ...here. (fcache_line_record_size): Move to... (file_cache_slot::line_record_size): ...here. (fcache_tab): Delete, in favor of global_dc->m_file_cache. (fcache_tab_size): Move to file_cache::num_file_slots. (diagnostic_file_cache_init): Update for move of fcache_tab to global_dc->m_file_cache. (diagnostic_file_cache_fini): Likewise. (lookup_file_in_cache_tab): Convert to... (file_cache::lookup_file): ...this. (diagnostics_file_cache_forcibly_evict_file): Update for move of fcache_tab to global_dc->m_file_cache, moving most of implementation to... (file_cache::forcibly_evict_file): ...this new function and... (file_cache_slot::evict): ...this new function. (evicted_cache_tab_entry): Convert to... (file_cache::evicted_cache_tab_entry): ...this. (add_file_to_cache_tab): Convert to... (file_cache::add_file): ...this, moving bulk of implementation to... (file_cache_slot::create): ..this new function. (file_cache::file_cache): New. (file_cache::~file_cache): New. (lookup_or_add_file_to_cache_tab): Convert to... (file_cache::lookup_or_add_file): ..this new function. (fcache::fcache): Rename to... (file_cache_slot::file_cache_slot): ...this, adding "m_" prefixes to fields. (fcache::~fcache): Rename to... (file_cache_slot::~file_cache_slot): ...this, adding "m_" prefixes to fields. (needs_read): Convert to... (file_cache_slot::needs_read_p): ...this. (needs_grow): Convert to... (file_cache_slot::needs_grow_p): ...this. (maybe_grow): Convert to... (file_cache_slot::maybe_grow): ...this. (read_data): Convert to... (file_cache_slot::read_data): ...this. (maybe_read_data): Convert to... (file_cache_slot::maybe_read_data): ...this. (get_next_line): Convert to... (file_cache_slot::get_next_line): ...this. (goto_next_line): Convert to... (file_cache_slot::goto_next_line): ...this. (read_line_num): Convert to... (file_cache_slot::read_line_num): ...this. (location_get_source_line): Update for moving of globals to global_dc->m_file_cache. (location_missing_trailing_newline): Likewise. * input.h (class file_cache_slot): New forward decl. (class file_cache): New. 2021-07-01 Michael Meissner * config/rs6000/rs6000.c (rs6000_maybe_emit_fp_cmove): Add IEEE 128-bit floating point conditional move support. (have_compare_and_set_mask): Add IEEE 128-bit floating point types. * config/rs6000/rs6000.md (movcc, IEEE128 iterator): New insn. (movcc_p10, IEEE128 iterator): New insn. (movcc_invert_p10, IEEE128 iterator): New insn. (fpmask, IEEE128 iterator): New insn. (xxsel, IEEE128 iterator): New insn. 2021-07-01 Iain Sandoe PR debug/101283 * config/darwin.h (CTF_INFO_SECTION_NAME): New. 2021-07-01 H.J. Lu * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): Make it global. * config/i386/i386-protos.h (ix86_expand_vector_init_duplicate): New prototype. * config/i386/sse.md (INT_BROADCAST_MODE): New mode iterator. (vec_duplicate): New expander. 2021-07-01 H.J. Lu PR target/100865 * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): New prototype. (ix86_byte_broadcast): New function. (ix86_convert_const_wide_int_to_broadcast): Likewise. (ix86_expand_move): Convert CONST_WIDE_INT to broadcast if mode size is 16 bytes or bigger. (ix86_broadcast_from_integer_constant): New function. (ix86_expand_vector_move): Convert CONST_WIDE_INT and CONST_VECTOR to broadcast if mode size is 16 bytes or bigger. * config/i386/i386-protos.h (ix86_gen_scratch_sse_rtx): New prototype. * config/i386/i386.c (ix86_gen_scratch_sse_rtx): New function. 2021-07-01 Uroš Bizjak * config/i386/predicates.md (ix86_endbr_immediate_operand): Return true/false instead of 1/0. (movq_parallel): Ditto. 2021-07-01 Uroš Bizjak * recog.c (general_operand): Return true/false instead of 1/0. (register_operand): Ditto. (immediate_operand): Ditto. (const_int_operand): Ditto. (const_scalar_int_operand): Ditto. (const_double_operand): Ditto. (push_operand): Ditto. (pop_operand): Ditto. (memory_operand): Ditto. (indirect_operand): Ditto. 2021-07-01 Uroš Bizjak * genpreds.c (write_predicate_subfunction): Change the type of written subfunction to bool. (write_one_predicate_function): Change the type of written function to bool. (write_tm_preds_h): Ditto. * recog.h (*insn_operand_predicate_fn): Change the type to bool. * recog.c (general_operand): Change the type to bool. (address_operand): Ditto. (register_operand): Ditto. (pmode_register_operand): Ditto. (scratch_operand): Ditto. (immediate_operand): Ditto. (const_int_operand): Ditto. (const_scalar_int_operand): Ditto. (const_double_operand): Ditto. (nonimmediate_operand): Ditto. (nonmemory_operand): Ditto. (push_operand): Ditto. (pop_operand): Ditto. (memory_operand): Ditto. (indirect_operand): Ditto. (ordered_comparison_operator): Ditto. (comparison_operator): Ditto. * config/i386/i386-expand.c (ix86_expand_sse_cmp): Change the type of indirect predicate function to bool. * config/rs6000/rs6000.c (easy_vector_constant): Change the type to bool. * config/mips/mips-protos.h (m16_based_address_p): Change the type of operand 3 to bool. 2021-07-01 Richard Biener PR tree-optimization/101280 PR tree-optimization/101173 * gimple-loop-interchange.cc (tree_loop_interchange::valid_data_dependences): Revert previous change and instead correctly handle DDR_REVERSED_P dependence. 2021-07-01 Richard Biener PR tree-optimization/101278 * tree-ssa-dse.c (dse_classify_store): First check for uses, then ignore stmt for chaining purposes. 2021-07-01 Richard Biener PR tree-optimization/100778 * tree-vect-slp.c (vect_schedule_slp_node): Do not place trapping vectorized ops ahead of their scalar BB. 2021-07-01 Uroš Bizjak PR target/101044 * config/i386/i386.md (*nabs2_doubleword): New insn_and_split pattern. (*nabs2_1): Ditto. * config/i386/i386-features.c (general_scalar_chain::compute_convert_gain): Handle (NEG (ABS (...))) RTX. Rewrite src code scanner as switch statement. (general_scalar_chain::convert_insn): Handle (NEG (ABS (...))) RTX. (general_scalar_to_vector_candidate_p): Detect (NEG (ABS (...))) RTX. Reorder case statements for (AND (NOT (...) ...)) fallthrough. 2021-07-01 Richard Biener PR tree-optimization/101178 * tree-vect-slp.c (slpg_vertex::materialize): Remove. (slpg::perm_in): Add. (slpg::get_perm_in): Remove. (slpg::get_perm_materialized): Add. (vect_optimize_slp): Handle VEC_PERM nodes more optimally during permute propagation and materialization. 2021-07-01 Jakub Jelinek PR debug/101266 * dwarf2out.c (loc_list_from_tree_1): Handle COMPOUND_LITERAL_EXPR. 2021-07-01 Jakub Jelinek PR middle-end/94366 * omp-low.c (lower_rec_input_clauses): Rename is_fp_and_or to is_truth_op, set it for TRUTH_*IF_EXPR regardless of new_var's type, use boolean_type_node instead of integer_type_node as NE_EXPR type. (lower_reduction_clauses): Likewise. 2021-06-30 Hafiz Abid Qadeer * config/gcn/gcn.c: Include dwarf2.h. (gcn_addr_space_debug): New function. (TARGET_ADDR_SPACE_DEBUG): New hook. 2021-06-30 Hafiz Abid Qadeer * common/config/gcn/gcn-common.c (gcn_option_optimization_table): Change OPT_fomit_frame_pointer to -O3. * config/gcn/gcn.c (gcn_expand_prologue): Prefer the frame pointer when emitting CFI. (gcn_expand_prologue): Prefer the frame pointer when emitting CFI. (gcn_frame_pointer_rqd): New function. (TARGET_FRAME_POINTER_REQUIRED): New hook. 2021-06-30 Hafiz Abid Qadeer * config/gcn/gcn.c (move_callee_saved_registers): Emit CFI notes for prologue register saves. (gcn_debug_unwind_info): Use UI_DWARF2. (gcn_dwarf_register_number): Map DWARF_LINK_REGISTER to DWARF PC. (gcn_dwarf_register_span): DWARF_LINK_REGISTER doesn't span. * config/gcn/gcn.h: (DWARF_FRAME_RETURN_COLUMN): New define. (DWARF_LINK_REGISTER): New define. (FIRST_PSEUDO_REGISTER): Increment. (FIXED_REGISTERS): Add entry for DWARF_LINK_REGISTER. (CALL_USED_REGISTERS): Likewise. (REGISTER_NAMES): Likewise. 2021-06-30 Richard Biener PR tree-optimization/101267 * tree-vect-stmts.c (vect_check_scalar_mask): Adjust API and use SLP compatible interface of vect_is_simple_use. Reject not vectorized SLP defs for callers that do not support that. (vect_check_store_rhs): Handle masked stores and pass down the appropriate operator index. (vectorizable_call): Adjust. (vectorizable_store): Likewise. (vectorizable_load): Likewise. Handle SLP pecularity of masked loads. (vect_is_simple_use): Remove special-casing of masked stores. 2021-06-30 Tobias Burnus * common.opt (foffload): Remove help as Driver only. * gcc.c (display_help): Add -foffload. 2021-06-30 Tobias Burnus * gcc.c (close_at_file, execute): Replace alloca by XALLOCAVEC. (check_offload_target_name): Fix splitting OFFLOAD_TARGETS into a candidate list; better inform no offload target is configured and fix hint extraction when passed target is not '\0' at [len]. * common.opt (foffload): Add tailing '.'. (foffload-options): Likewise; fix flag name in the help string. 2021-06-30 prathamesh.kulkarni PR target/66791 * config/arm/arm_neon.h: Move vabs intrinsics before vcage_f32. (vcage_f32): Gate comparison on __FAST_MATH__. (vcageq_f32): Likewise. (vcale_f32): Likewise. (vcaleq_f32): Likewise. (vcagt_f32): Likewise. (vcagtq_f32): Likewise. (vcalt_f32): Likewise. (vcaltq_f32): Likewise. (vcage_f16): Likewise. (vcageq_f16): Likewise. (vcale_f16): Likewise. (vcaleq_f16): Likewise. (vcagt_f16): Likewise. (vcagtq_f16): Likewise. (vcalt_f16): Likewise. (vcaltq_f16): Likewise. 2021-06-30 Richard Biener PR tree-optimization/101264 * tree-vect-slp.c (vect_optimize_slp): Propagate the computed perm_in to all "any" permute successors we cannot de-duplicate immediately. 2021-06-30 liuhongt PR target/101248 * config/i386/sse.md (avx512f_sfixupimm): Refined to .. (avx512f_sfixupimm): this. (avx512f_sfixupimm_mask"): Refined. * config/i386/subst.md (maskz_scalar): New define_subst. (maskz_scalar_name): New subst_attr. (maskz_scalar_op5): Ditto. (round_saeonly_maskz_scalar_op5): Ditto. (round_saeonly_maskz_scalar_operand5): Ditto. 2021-06-30 David Edelsohn * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags): Increase code CSECT alignment to at least 32 bytes. * config/rs6000/xcoff.h (TEXT_SECTION_ASM_OP): Add 32 byte alignment designation. 2021-06-29 Sergei Trofimovich * doc/generic.texi: Fix s/net yet/not yet/ typo. 2021-06-29 Andrew MacLeod PR tree-optimization/101254 * range-op.cc (operator_minus::op1_op2_relation_effect): Check for wrapping/non-wrapping when setting the result range. 2021-06-29 Andrew MacLeod * value-query.cc (gimple_range_global): Allow phis. 2021-06-29 Andrew MacLeod * vr-values.c (vr_values::vrp_stmt_computes_nonzero): Use stmt. (simplify_using_ranges::op_with_boolean_value_range_p): Add a statement for location context. (check_for_binary_op_overflow): Ditto. (simplify_using_ranges::get_vr_for_comparison): Ditto. (simplify_using_ranges::compare_name_with_value): Ditto. (simplify_using_ranges::compare_names): Ditto. (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Ditto. (simplify_using_ranges::simplify_truth_ops_using_ranges): Ditto. (simplify_using_ranges::simplify_min_or_max_using_ranges): Ditto. (simplify_using_ranges::simplify_internal_call_using_ranges): Ditto. (simplify_using_ranges::two_valued_val_range_p): Ditto. (simplify_using_ranges::simplify): Ditto. * vr-values.h: Adjust prototypes. 2021-06-29 Uroš Bizjak PR target/95046 * config/i386/mmx.md (vec_addsubv2sf3): New insn pattern. 2021-06-29 Julian Brown * config/gcn/gcn.c (gcn_init_libfuncs): New function. (TARGET_INIT_LIBFUNCS): Define target hook using above function. * config/gcn/gcn.h (UNITS_PER_WORD): Define to 8 for IN_LIBGCC2, 4 otherwise. (LIBGCC2_UNITS_PER_WORD, BITS_PER_WORD): Remove definitions. (MAX_FIXED_MODE_SIZE): Change to 128. 2021-06-29 Julian Brown * config/gcn/gcn.md (UNSPEC_FLBIT_INT): New unspec constant. (s_mnemonic): Add clrsb. (gcn_flbit_int): Add insn pattern for SImode/DImode. (clrsb2): Add expander for SImode/DImode. 2021-06-29 Julian Brown * config/gcn/gcn.md (mulsidi3, mulsidi3_reg, mulsidi3_imm, muldi3): Add patterns. 2021-06-29 Julian Brown * config/gcn/gcn.md (mulsi3_highpart): Change to expander. (mulsi3_highpart_reg, mulsi3_highpart_imm): New patterns. 2021-06-29 Julian Brown * config/gcn/gcn.md (mulsi3): Make s_mulk_i32 variant clobber SCC. 2021-06-29 Joseph Myers * btfout.c, ctfout.c: Include "memmodel.h". 2021-06-29 Tobias Burnus * gcc.c (check_offload_target_name): Cast len argument to %q.*s to 'int'; avoid -Wstringop-truncation warning. 2021-06-29 Richard Biener * tree-vect-slp.c (vect_optimize_slp): Forward propagate to "any" permute nodes and relax "any" permute proapgation during iterative backward propagation. 2021-06-29 Tobias Burnus PR other/67300 * common.opt (-foffload=): Update description. (-foffload-options=): New. * doc/invoke.texi (C Language Options): Document -foffload and -foffload-options. * gcc.c (check_offload_target_name): New, split off from handle_foffload_option. (check_foffload_target_names): New. (handle_foffload_option): Handle -foffload=default. (driver_handle_option): Update for -foffload-options. * lto-opts.c (lto_write_options): Use -foffload-options instead of -foffload. * lto-wrapper.c (merge_and_complain, append_offload_options): Likewise. * opts.c (common_handle_option): Likewise. 2021-06-29 Tobias Burnus * doc/invoke.texi (C Language Options): Sort options alphabetically in optlist and also the description itself. Remove leftover -fallow-single-precision from and add missing -fgnu-tm to the optlist. 2021-06-29 Richard Biener * tree-vect-slp.c (slpg_vertex::visited): Remove. (vect_slp_perms_eq): Handle -1 permutes. (vect_optimize_slp): Rewrite permute propagation. 2021-06-29 Jakub Jelinek PR c++/101210 * match.pd ((intptr_t)x eq/ne CST to x eq/ne (typeof x) CST): Don't perform the optimization in GENERIC when sanitizing and x has a reference type. 2021-06-29 Richard Biener PR tree-optimization/101242 * tree-vect-slp.c (vect_slp_build_vertices): Force-add PHIs with not represented initial values as leafs. 2021-06-29 Jan-Benedict Glaw * config/pdp11/pdp11.h (ASM_OUTPUT_SKIP): Fix signedness warning. * config/pdp11/pdp11.c (pdp11_asm_print_operand_punct_valid_p): Remove "register" keyword. (pdp11_initial_elimination_offset) Remove unused variable. (pdp11_cmp_length) Ditto. (pdp11_insn_cost): Ditto, and fix signedness warning. 2021-06-29 David Edelsohn * btfout.c: Include tm_p.h. * ctfout.c: Same. 2021-06-28 Indu Bhagat * config/bpf/bpf.c (bpf_expand_prologue): Do not mark insns as frame related. (bpf_expand_epilogue): Likewise. * config/bpf/bpf.h (DWARF2_FRAME_INFO): Define to 0. Do not define DBX_DEBUGGING_INFO. 2021-06-28 Indu Bhagat * doc/invoke.texi: Document the CTF and BTF debug info options. 2021-06-28 Indu Bhagat David Faust Jose E. Marchesi Weimin Pan * Makefile.in: Add ctfc.*, ctfout.c and btfout.c files to GTFILES. Add new object files. * common.opt: Add CTF and BTF debug info options. * btfout.c: New file. * ctfc.c: Likewise. * ctfc.h: Likewise. * ctfout.c: Likewise. * dwarf2ctf.c: Likewise. * dwarf2ctf.h: Likewise. * dwarf2cfi.c (dwarf2out_do_frame): Acknowledge CTF_DEBUG and BTF_DEBUG. * dwarf2out.c (dwarf2out_source_line): Likewise. (dwarf2out_finish): Skip emitting DWARF if CTF or BTF are to be generated. (debug_format_do_cu): New function. (dwarf2out_early_finish): Traverse DIEs and emit CTF/BTF for them if requested. Include dwarf2ctf.c. * final.c (dwarf2_debug_info_emitted_p): Acknowledge DWARF-based debug formats. * flag-types.h (enum debug_info_type): Add CTF_DEBUG and BTF_DEBUG. (CTF_DEBUG): New bitmask. (BTF_DEBUG): Likewise. (enum ctf_debug_info_levels): New enum. * gengtype.c (open_base_files): Handle ctfc.h. (main): Handle uint32_t type. * flags.h (btf_debuginfo_p): New definition. (dwarf_based_debuginfo_p): Likewise. * opts.c (debug_type_names): Add entries for CTF and BTF. (btf_debuginfo_p): New function. (dwarf_based_debuginfo_p): Likewise. (common_handle_option): Handle -gctfN and -gbtf options. (set_debug_level): Set CTF_DEBUG, BTF_DEBUG whenever appropriate. * toplev.c (process_options): Inform the user and ignore -gctfLEVEL if frontend is not C. 2021-06-28 Jose E. Marchesi * dwarf2out.c (AT_class): Function is no longer static. (AT_int): Likewise. (AT_unsigned): Likewise. (AT_loc): Likewise. (get_AT): Likewise. (get_AT_string): Likewise. (get_AT_flag): Likewise. (get_AT_unsigned): Likewise. (get_AT_ref): Likewise. (new_die_raw): Likewise. (lookup_decl_die): Likewise. (base_type_die): Likewise. (add_name_attribute): Likewise. (add_AT_int): Likewise. (add_AT_unsigned): Likewise. (add_AT_loc): Likewise. (dw_get_die_tag): New function. (dw_get_die_child): Likewise. (dw_get_die_sib): Likewise. (struct dwarf_file_data): Move from here to dwarf2out.h (struct dw_attr_struct): Likewise. * dwarf2out.h: Analogous changes. 2021-06-28 Martin Jambor PR ipa/93385 * ipa-param-manipulation.h (class ipa_param_body_adjustments): New members m_dead_stmts and m_dead_ssas. * ipa-param-manipulation.c (ipa_param_body_adjustments::mark_dead_statements): New function. (ipa_param_body_adjustments::common_initialization): Call it on all removed but not split parameters. (ipa_param_body_adjustments::ipa_param_body_adjustments): Initialize new mwmbers. (ipa_param_body_adjustments::modify_call_stmt): Remove arguments that are dead. * tree-inline.c (remap_gimple_stmt): Do not copy dead statements, reset dead debug statements. (copy_phis_for_bb): Do not copy dead PHI nodes. 2021-06-28 Martin Jambor PR ipa/93385 * symtab-clones.h (clone_info): Removed member param_adjustments. * ipa-param-manipulation.h: Adjust initial comment to reflect how we deal with pass-through splits now. (ipa_param_performed_split): Removed. (ipa_param_adjustments::modify_call): Adjusted parameters. (class ipa_param_body_adjustments): Adjusted parameters of register_replacement, modify_gimple_stmt and modify_call_stmt. (ipa_verify_edge_has_no_modifications): Declare. (ipa_edge_modifications_finalize): Declare. * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Remove performed_splits processing, pas only edge to padjs->modify_call, check that call arguments were not modified if they should not have been. * cgraphclones.c (cgraph_node::create_clone): Do not copy performed splits. * ipa-param-manipulation.c (struct pass_through_split_map): New type. (ipa_edge_modification_info): Likewise. (ipa_edge_modification_sum): Likewise. (ipa_edge_modifications): New edge summary. (ipa_verify_edge_has_no_modifications): New function. (transitive_split_p): Removed. (transitive_split_map): Likewise. (init_transitive_splits): Likewise. (ipa_param_adjustments::modify_call): Adjusted to use the new edge summary instead of performed_splits. (ipa_param_body_adjustments::register_replacement): Drop dummy parameter, set base_index of the created ipa_param_body_replacement. (phi_arg_will_live_p): New function. (ipa_param_body_adjustments::common_initialization): Do not create IPA_SRA dummy decls. (simple_tree_swap_info): Removed. (remap_split_decl_to_dummy): Likewise. (record_argument_state_1): New function. (record_argument_state): Likewise. (ipa_param_body_adjustments::modify_call_stmt): New parameter orig_stmt. Do not work with dummy decls, save necessary info about changes to ipa_edge_modifications. (ipa_param_body_adjustments::modify_gimple_stmt): New parameter orig_stmt, pass it to modify_call_stmt. (ipa_param_body_adjustments::modify_cfun_body): Adjust call to modify_gimple_stmt. (ipa_edge_modifications_finalize): New function. * tree-inline.c (remap_gimple_stmt): Pass original statement to modify_gimple_stmt. (copy_phis_for_bb): Do not copy dead PHI nodes. (expand_call_inline): Do not remap performed_splits. (update_clone_info): Likewise. * toplev.c: Include ipa-param-manipulation.h. (toplev::finalize): Call ipa_edge_modifications_finalize. 2021-06-28 Andrew Pinski * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Duplicate range info if we're the only things setting the target PHI. (value_replacement): Don't duplicate range here. (minmax_replacement): Likewise. 2021-06-28 Richard Biener PR tree-optimization/101229 * gimple-walk.c (gimple_walk_op): Handle PHIs. 2021-06-28 Martin Liska * config/v850/v850.c (construct_dispose_instruction): Allocate a bigger buffer. (construct_prepare_instruction): Likewise. 2021-06-28 Martin Liska * config/v850/v850.c (v850_option_override): Build default target node. (v850_can_inline_p): New. Allow MASK_PROLOG_FUNCTION to be ignored for inlining. (TARGET_CAN_INLINE_P): New. 2021-06-28 Richard Biener PR tree-optimization/101207 * tree-vect-slp.c (vect_optimize_slp): Do BB reduction permute eliding for load permutations properly. 2021-06-28 Richard Biener PR tree-optimization/101173 * gimple-loop-interchange.cc (tree_loop_interchange::valid_data_dependences): Disallow outer loop dependence distance of zero. 2021-06-28 liuhongt PR target/100648 * config/i386/sse.md (*avx_cmp3_lt): New define_insn_and_split. (*avx_cmp3_ltint): Ditto. (*avx2_pcmp3_3): Ditto. (*avx2_pcmp3_4): Ditto. (*avx2_pcmp3_5): Ditto. 2021-06-28 liuhongt * config/i386/i386-builtin.def (IX86_BUILTIN_BLENDVPD256, IX86_BUILTIN_BLENDVPS256, IX86_BUILTIN_PBLENDVB256, IX86_BUILTIN_BLENDVPD, IX86_BUILTIN_BLENDVPS, IX86_BUILTIN_PBLENDVB128): Replace icode with CODE_FOR_nothing. * config/i386/i386.c (ix86_gimple_fold_builtin): Fold blendv builtins. * config/i386/sse.md (*_pblendvb_lt_subreg_not): New pre_reload splitter. 2021-06-27 Andrew Pinski PR middle-end/101230 * fold-const.c (fold_ternary_loc): Check the return value of invert_tree_comparison. 2021-06-27 David Edelsohn * config.gcc: Add SPDX License Identifier. (powerpc-ibm-aix789): Default to aix73.h. (powerpc-ibm-aix7.2.*.*): New stanza. * config/rs6000/aix72.h: Add SPDX License Identifier. * config/rs6000/aix73.h: New file. 2021-06-26 Jason Merrill * except.c: #include "dwarf2.h" instead of "dwarf2out.h". 2021-06-26 Andrew Pinski * genmatch.c (lower_cond): Copy for_subst_vec for the simplify also. (lower): Swap the order for lower_for and lower_cond. 2021-06-26 Andrew Pinski * tree-ssa-phiopt.c (match_simplify_replacement): Reset flow senatitive info on the moved ssa set. 2021-06-26 Andrew Pinski * fold-const.c (fold_cond_expr_with_comparison): Exand arg0 into comp_code, arg00, and arg01. (fold_ternary_loc): Use invert_tree_comparison instead of fold_invert_truthvalue for the case where we have A CMP B ? C : A. 2021-06-25 Martin Sebor PR middle-end/101216 * calls.c (maybe_warn_rdwr_sizes): Use the no_warning constant. 2021-06-25 Jeff Law * config/h8300/h8300.c (select_cc_mode): Handle ASHIFTRT and LSHIFTRT. 2021-06-25 Richard Biener PR tree-optimization/101202 * tree-vect-slp.c (vect_optimize_slp): Explicitely handle failed nodes. 2021-06-25 Richard Biener * tree-vect-slp-patterns.c (addsub_pattern::build): Copy STMT_VINFO_REDUC_DEF from the original representative. 2021-06-25 Martin Sebor * builtins.c (warn_string_no_nul): Replace uses of TREE_NO_WARNING, gimple_no_warning_p and gimple_set_no_warning with warning_suppressed_p, and suppress_warning. (c_strlen): Same. (maybe_warn_for_bound): Same. (warn_for_access): Same. (check_access): Same. (expand_builtin_strncmp): Same. (fold_builtin_varargs): Same. * calls.c (maybe_warn_nonstring_arg): Same. (maybe_warn_rdwr_sizes): Same. * cfgexpand.c (expand_call_stmt): Same. * cgraphunit.c (check_global_declaration): Same. * fold-const.c (fold_undefer_overflow_warnings): Same. (fold_truth_not_expr): Same. (fold_unary_loc): Same. (fold_checksum_tree): Same. * gimple-array-bounds.cc (array_bounds_checker::check_array_ref): Same. (array_bounds_checker::check_mem_ref): Same. (array_bounds_checker::check_addr_expr): Same. (array_bounds_checker::check_array_bounds): Same. * gimple-expr.c (copy_var_decl): Same. * gimple-fold.c (gimple_fold_builtin_strcpy): Same. (gimple_fold_builtin_strncat): Same. (gimple_fold_builtin_stxcpy_chk): Same. (gimple_fold_builtin_stpcpy): Same. (gimple_fold_builtin_sprintf): Same. (fold_stmt_1): Same. * gimple-ssa-isolate-paths.c (diag_returned_locals): Same. * gimple-ssa-nonnull-compare.c (do_warn_nonnull_compare): Same. * gimple-ssa-sprintf.c (handle_printf_call): Same. * gimple-ssa-store-merging.c (imm_store_chain_info::output_merged_store): Same. * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Same. * gimple-ssa-warn-restrict.h: Adjust declarations. (maybe_diag_access_bounds): Replace uses of TREE_NO_WARNING, gimple_no_warning_p and gimple_set_no_warning with warning_suppressed_p, and suppress_warning. (check_call): Same. (check_bounds_or_overlap): Same. * gimple.c (gimple_build_call_from_tree): Same. * gimplify.c (gimplify_return_expr): Same. (gimplify_cond_expr): Same. (gimplify_modify_expr_complex_part): Same. (gimplify_modify_expr): Same. (gimple_push_cleanup): Same. (gimplify_expr): Same. * omp-expand.c (expand_omp_for_generic): Same. (expand_omp_taskloop_for_outer): Same. * omp-low.c (lower_rec_input_clauses): Same. (lower_lastprivate_clauses): Same. (lower_send_clauses): Same. (lower_omp_target): Same. * tree-cfg.c (pass_warn_function_return::execute): Same. * tree-complex.c (create_one_component_var): Same. * tree-inline.c (remap_gimple_op_r): Same. (copy_tree_body_r): Same. (declare_return_variable): Same. (expand_call_inline): Same. * tree-nested.c (lookup_field_for_decl): Same. * tree-sra.c (create_access_replacement): Same. (generate_subtree_copies): Same. * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Same. * tree-ssa-forwprop.c (combine_cond_expr_cond): Same. * tree-ssa-loop-ch.c (ch_base::copy_headers): Same. * tree-ssa-loop-im.c (execute_sm): Same. * tree-ssa-phiopt.c (cond_store_replacement): Same. * tree-ssa-strlen.c (maybe_warn_overflow): Same. (handle_builtin_strcpy): Same. (maybe_diag_stxncpy_trunc): Same. (handle_builtin_stxncpy_strncat): Same. (handle_builtin_strcat): Same. * tree-ssa-uninit.c (get_no_uninit_warning): Same. (set_no_uninit_warning): Same. (uninit_undefined_value_p): Same. (warn_uninit): Same. (maybe_warn_operand): Same. * tree-vrp.c (compare_values_warnv): Same. * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr): Same. (test_for_singularity): Same. * gimple.h (warning_suppressed_p): New function. (suppress_warning): Same. (copy_no_warning): Same. (gimple_set_block): Call gimple_set_location. (gimple_set_location): Call copy_warning. 2021-06-25 Martin Sebor * tree.h (warning_suppressed_at, copy_warning, warning_suppressed_p, suppress_warning): New functions. 2021-06-25 Martin Sebor * Makefile.in (OBJS-libcommon): Add diagnostic-spec.o. * gengtype.c (open_base_files): Add diagnostic-spec.h. * diagnostic-spec.c: New file. * diagnostic-spec.h: New file. * tree.h (no_warning, all_warnings, suppress_warning_at): New declarations. * warning-control.cc: New file. 2021-06-25 liuhongt PR target/101185 * config/i386/i386.c (x86_order_regs_for_local_alloc): Revert r12-1669. 2021-06-24 Andrew MacLeod PR tree-optimization/101189 * gimple-range-fold.cc (fold_using_range::range_of_range_op): Pass LHS range of condition to postfold routine. (fold_using_range::postfold_gcond_edges): Only process the TRUE or FALSE edge if the LHS range supports it being taken. * gimple-range-fold.h (postfold_gcond_edges): Add range parameter. 2021-06-24 Andrew MacLeod * value-relation.cc (equiv_oracle::dump): Do not dump NULL blocks. (relation_oracle::find_relation_block): Check correct bitmap. (relation_oracle::dump): Do not dump NULL blocks. 2021-06-24 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::propagate_cache): Call range_on_edge instead of manually calculating. 2021-06-24 Andrew MacLeod * range-op.cc: Fix comment. 2021-06-24 Uroš Bizjak PR target/89021 * config/i386/i386-expand.c (ix86_expand_sse_unpack): Handle V8QI and V4HI modes. * config/i386/mmx.md (sse4_1_v4qiv4hi2): New insn pattern. (sse4_1_v4qiv4hi2): Ditto. (mmxpackmode): New mode attribute. (vec_pack_trunc_): New expander. (mmxunpackmode): New mode attribute. (vec_unpacks_lo_): New expander. (vec_unpacks_hi_): Ditto. (vec_unpacku_lo_): Ditto. (vec_unpacku_hi_): Ditto. * config/i386/i386.md (extsuffix): Move from ... * config/i386/sse.md: ... here. 2021-06-24 Eric Botcazou * dwarf2out.c (dwarf2out_assembly_start): Emit .file 0 marker here.. (dwarf2out_finish): ...instead of here. 2021-06-24 Eric Botcazou * configure.ac (--gdwarf-5 option): Use objdump instead of readelf. (working --gdwarf-4/--gdwarf-5 for all sources): Likewise. (--gdwarf-4 not refusing generated .debug_line): Adjust for Windows. * configure: Regenerate. 2021-06-24 Richard Biener * config/i386/sse.md (vec_addsubv4df3, vec_addsubv2df3, vec_addsubv8sf3, vec_addsubv4sf3): Merge into ... (vec_addsub3): ... using a new addsub_cst mode attribute. 2021-06-24 Richard Biener * config/i386/sse.md (avx_addsubv4df3): Rename to vec_addsubv4df3. (avx_addsubv8sf3): Rename to vec_addsubv8sf3. (sse3_addsubv2df3): Rename to vec_addsubv2df3. (sse3_addsubv4sf3): Rename to vec_addsubv4sf3. * config/i386/i386-builtin.def: Adjust. * internal-fn.def (VEC_ADDSUB): New internal optab fn. * optabs.def (vec_addsub_optab): New optab. * tree-vect-slp-patterns.c (class addsub_pattern): New. (slp_patterns): Add addsub_pattern. * tree-vect-slp.c (vect_optimize_slp): Disable propagation across CFN_VEC_ADDSUB. * tree-vectorizer.h (vect_pattern::vect_pattern): Make m_ops optional. * doc/md.texi (vec_addsub3): Document. 2021-06-24 Jakub Jelinek PR middle-end/101170 * df-scan.c (df_ref_record): For paradoxical big-endian SUBREGs where regno + subreg_regno_offset wraps around use 0 as starting regno. 2021-06-24 Jakub Jelinek PR middle-end/101172 * stor-layout.c (finish_bitfield_representative): If nextf has error_mark_node type, set repr type to error_mark_node too. 2021-06-24 Ilya Leoshkevich * config/s390/s390.c (s390_function_profiler): Ignore labelno parameter. * config/s390/s390.h (NO_PROFILE_COUNTERS): Define. 2021-06-24 Richard Biener * tree-vect-slp.c (vect_optimize_slp): Do not propagate across operations that have different semantics on different lanes. 2021-06-24 Jakub Jelinek * tree.h (OMP_CLAUSE_MAP_IN_REDUCTION): Document meaning for OpenMP. * gimplify.c (gimplify_scan_omp_clauses): For OpenMP map clauses with OMP_CLAUSE_MAP_IN_REDUCTION flag partially defer gimplification of non-decl OMP_CLAUSE_DECL. For OMP_CLAUSE_IN_REDUCTION on OMP_TARGET user outer_ctx instead of ctx for placeholders and initializer/combiner gimplification. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_MAP_IN_REDUCTION on target constructs. (lower_rec_input_clauses): Likewise. (lower_omp_target): Likewise. * omp-expand.c (expand_omp_target): Temporarily ignore nowait clause on target if in_reduction is present. 2021-06-24 Kewen Lin * tree-predcom.c (class pcom_worker): New class. (release_chain): Renamed to... (pcom_worker::release_chain): ...this. (release_chains): Renamed to... (pcom_worker::release_chains): ...this. (aff_combination_dr_offset): Renamed to... (pcom_worker::aff_combination_dr_offset): ...this. (determine_offset): Renamed to... (pcom_worker::determine_offset): ...this. (class comp_ptrs): New class. (split_data_refs_to_components): Renamed to... (pcom_worker::split_data_refs_to_components): ...this, and update with class comp_ptrs. (suitable_component_p): Renamed to... (pcom_worker::suitable_component_p): ...this. (filter_suitable_components): Renamed to... (pcom_worker::filter_suitable_components): ...this. (valid_initializer_p): Renamed to... (pcom_worker::valid_initializer_p): ...this. (find_looparound_phi): Renamed to... (pcom_worker::find_looparound_phi): ...this. (add_looparound_copies): Renamed to... (pcom_worker::add_looparound_copies): ...this. (determine_roots_comp): Renamed to... (pcom_worker::determine_roots_comp): ...this. (determine_roots): Renamed to... (pcom_worker::determine_roots): ...this. (single_nonlooparound_use): Renamed to... (pcom_worker::single_nonlooparound_use): ...this. (remove_stmt): Renamed to... (pcom_worker::remove_stmt): ...this. (execute_pred_commoning_chain): Renamed to... (pcom_worker::execute_pred_commoning_chain): ...this. (execute_pred_commoning): Renamed to... (pcom_worker::execute_pred_commoning): ...this. (struct epcc_data): New member worker. (execute_pred_commoning_cbck): Call execute_pred_commoning with pcom_worker pointer. (find_use_stmt): Renamed to... (pcom_worker::find_use_stmt): ...this. (find_associative_operation_root): Renamed to... (pcom_worker::find_associative_operation_root): ...this. (find_common_use_stmt): Renamed to... (pcom_worker::find_common_use_stmt): ...this. (combinable_refs_p): Renamed to... (pcom_worker::combinable_refs_p): ...this. (reassociate_to_the_same_stmt): Renamed to... (pcom_worker::reassociate_to_the_same_stmt): ...this. (stmt_combining_refs): Renamed to... (pcom_worker::stmt_combining_refs): ...this. (combine_chains): Renamed to... (pcom_worker::combine_chains): ...this. (try_combine_chains): Renamed to... (pcom_worker::try_combine_chains): ...this. (prepare_initializers_chain): Renamed to... (pcom_worker::prepare_initializers_chain): ...this. (prepare_initializers): Renamed to... (pcom_worker::prepare_initializers): ...this. (prepare_finalizers_chain): Renamed to... (pcom_worker::prepare_finalizers_chain): ...this. (prepare_finalizers): Renamed to... (pcom_worker::prepare_finalizers): ...this. (tree_predictive_commoning_loop): Renamed to... (pcom_worker::tree_predictive_commoning_loop): ...this, adjust some calls and remove some cleanup code. (tree_predictive_commoning): Adjusted to use pcom_worker instance. (static variable looparound_phis): Remove. (static variable name_expansions): Remove. 2021-06-24 Richard Biener * tree-vect-slp.c (slpg_vertex): New struct. (vect_slp_build_vertices): Adjust. (vect_optimize_slp): Likewise. Maintain an outgoing permute and a materialized one. 2021-06-24 Richard Biener PR tree-optimization/101105 * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Only ignore steps when they are equal or scalar order is preserved. 2021-06-24 liuhongt PR target/98434 * config/i386/i386-expand.c (ix86_expand_vec_interleave): Adjust comments for ix86_expand_vecop_qihi2. (ix86_expand_vecmul_qihi): Renamed to .. (ix86_expand_vecop_qihi2): Adjust function prototype to support shift operation, add static to definition. (ix86_expand_vec_shift_qihi_constant): Add static to definition. (ix86_expand_vecop_qihi): Call ix86_expand_vecop_qihi2 and ix86_expand_vec_shift_qihi_constant. * config/i386/i386-protos.h (ix86_expand_vecmul_qihi): Deleted. (ix86_expand_vec_shift_qihi_constant): Deleted. * config/i386/sse.md (VI12_256_512_AVX512VL): New mode iterator. (mulv8qi3): Call ix86_expand_vecop_qihi directly, add condition TARGET_64BIT. (mul3): Ditto. (3): Ditto. (vlshr3): Extend to support avx512 vlshr. (v3): New expander for vashr/vlshr/vashl. (vv8qi3): Ditto. (vashrv8hi3): Renamed to .. (vashr3): And extend to support V16QImode for avx512. (vashrv16qi3): Deleted. (vashrv2di3): Extend expander to support avx512 instruction. 2021-06-23 Dimitar Dimitrov * doc/lto.texi (Design Overview): Update that slim objects are the default. 2021-06-23 Aaron Sawdey * config/rs6000/rs6000-cpus.def: Take OPTION_MASK_PCREL_OPT out of OTHER_POWER10_MASKS so it will not be enabled by default. 2021-06-23 Richard Biener Martin Jambor * tree-inline.c (setup_one_parameter): Set TREE_READONLY of the param replacement unconditionally. Adjust comment. 2021-06-23 Andrew MacLeod * Makefile.in (OBJS): Add gimple-range-fold.o * gimple-range-fold.cc: New. * gimple-range-fold.h: New. * gimple-range-gori.cc (gimple_range_calc_op1): Move to here. (gimple_range_calc_op2): Ditto. * gimple-range-gori.h: Move prototypes to here. * gimple-range.cc: Adjust include files. (fur_source:fur_source): Relocate to gimple-range-fold.cc. (fur_source::get_operand): Ditto. (fur_source::get_phi_operand): Ditto. (fur_source::query_relation): Ditto. (fur_source::register_relation): Ditto. (class fur_edge): Ditto. (fur_edge::fur_edge): Ditto. (fur_edge::get_operand): Ditto. (fur_edge::get_phi_operand): Ditto. (fur_stmt::fur_stmt): Ditto. (fur_stmt::get_operand): Ditto. (fur_stmt::get_phi_operand): Ditto. (fur_stmt::query_relation): Ditto. (class fur_depend): Relocate to gimple-range-fold.h. (fur_depend::fur_depend): Relocate to gimple-range-fold.cc. (fur_depend::register_relation): Ditto. (fur_depend::register_relation): Ditto. (class fur_list): Ditto. (fur_list::fur_list): Ditto. (fur_list::get_operand): Ditto. (fur_list::get_phi_operand): Ditto. (fold_range): Ditto. (adjust_pointer_diff_expr): Ditto. (gimple_range_adjustment): Ditto. (gimple_range_base_of_assignment): Ditto. (gimple_range_operand1): Ditto. (gimple_range_operand2): Ditto. (gimple_range_calc_op1): Relocate to gimple-range-gori.cc. (gimple_range_calc_op2): Ditto. (fold_using_range::fold_stmt): Relocate to gimple-range-fold.cc. (fold_using_range::range_of_range_op): Ditto. (fold_using_range::range_of_address): Ditto. (fold_using_range::range_of_phi): Ditto. (fold_using_range::range_of_call): Ditto. (fold_using_range::range_of_builtin_ubsan_call): Ditto. (fold_using_range::range_of_builtin_call): Ditto. (fold_using_range::range_of_cond_expr): Ditto. (fold_using_range::range_of_ssa_name_with_loop_info): Ditto. (fold_using_range::relation_fold_and_or): Ditto. (fold_using_range::postfold_gcond_edges): Ditto. * gimple-range.h: Add gimple-range-fold.h to include files. Change GIMPLE_RANGE_STMT_H to GIMPLE_RANGE_H. (gimple_range_handler): Relocate to gimple-range-fold.h. (gimple_range_ssa_p): Ditto. (range_compatible_p): Ditto. (class fur_source): Ditto. (class fur_stmt): Ditto. (class fold_using_range): Ditto. (gimple_range_calc_op1): Relocate to gimple-range-gori.h (gimple_range_calc_op2): Ditto. 2021-06-23 Andrew MacLeod PR tree-optimization/101148 PR tree-optimization/101014 * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust. (ranger_cache::~ranger_cache): Adjust. (ranger_cache::block_range): Check if propagation disallowed. (ranger_cache::propagate_cache): Disallow propagation if new value can't be stored properly. * gimple-range-cache.h (ranger_cache::m_propfail): New member. 2021-06-23 Andrew MacLeod * gimple-range-cache.cc (class ssa_block_ranges): Adjust prototype. (sbr_vector::set_bb_range): Return true. (class sbr_sparse_bitmap): Adjust. (sbr_sparse_bitmap::set_bb_range): Return value. (block_range_cache::set_bb_range): Return value. (ranger_cache::propagate_cache): Use return value to print msg. * gimple-range-cache.h (class block_range_cache): Adjust. 2021-06-23 Andrew MacLeod * gimple-range.cc (dump_bb): Use range_on_edge from the cache. 2021-06-23 Jeff Law * config/h8300/logical.md (3): Use so this pattern can be used for test/compare removal. Pass current insn to compute_logical_op_length and output_logical_op. * config/h8300/h8300.c (compute_logical_op_cc): Remove. (h8300_and_costs): Add argument to compute_logical_op_length. (output_logical_op): Add new argument. Use it to determine if the condition codes are used and adjust the output accordingly. (compute_logical_op_length): Add new argument and update length computations when condition codes are used. * config/h8300/h8300-protos.h (compute_logical_op_length): Update prototype. (output_logical_op): Likewise. 2021-06-23 Uroš Bizjak PR target/89021 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Handle 64bit modes for TARGET_XOP. Use indirect gen_* functions. * config/i386/mmx.md (mmx_ppermv64): New insn pattern. * config/i386/i386.md (unspec): Move UNSPEC_XOP_PERMUTE from ... * config/i386/sse.md (unspec): ... here. 2021-06-23 Martin Liska PR target/98636 * optc-save-gen.awk: Put back arm_fp16_format to checked_options. 2021-06-23 Uroš Bizjak PR target/101175 * config/i386/i386.md (bsr_rex64): Add zero-flag setting RTX. (bsr): Ditto. (*bsrhi): Remove. (clz2): Update RTX pattern for additions. 2021-06-23 Jakub Jelinek PR middle-end/101167 * omp-low.c (lower_omp_regimplify_p): Regimplify also PARM_DECLs and RESULT_DECLs that have DECL_HAS_VALUE_EXPR_P set. 2021-06-22 Sergei Trofimovich * doc/rtl.texi: drop unbalanced parenthesis. 2021-06-22 Richard Biener PR middle-end/101156 * gimplify.c (gimplify_expr): Remove premature incorrect optimization. 2021-06-22 Jakub Jelinek PR tree-optimization/101159 * tree-vect-patterns.c (vect_recog_popcount_pattern): Fix some comment typos. 2021-06-22 Jakub Jelinek PR middle-end/101160 * function.c (assign_parms): For decl_result with TYPE_EMPTY_P type clear crtl->return_rtx instead of keeping it referencing a pseudo. 2021-06-22 Jakub Jelinek Andrew Pinski PR tree-optimization/101162 * fold-const.c (range_check_type): Handle OFFSET_TYPE like pointer types. 2021-06-22 Andrew MacLeod * range-op.cc (range_relational_tests): New. (range_op_tests): Call range_relational_tests. 2021-06-22 Andrew MacLeod * range-op.cc (operator_cast::lhs_op1_relation): New. (operator_identity::lhs_op1_relation): Mew. 2021-06-22 Andrew MacLeod * range-op.cc (operator_minus::op1_op2_relation_effect): New. 2021-06-22 Andrew MacLeod * range-op.cc (operator_plus::lhs_op1_relation): New. (operator_plus::lhs_op2_relation): New. 2021-06-22 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Create a relation_oracle if dominators exist. (ranger_cache::~ranger_cache): Dispose of oracle. (ranger_cache::dump_bb): Dump oracle. * gimple-range.cc (fur_source::fur_source): New. (fur_source::get_operand): Use mmeber query. (fur_source::get_phi_operand): Use member_query. (fur_source::query_relation): New. (fur_source::register_dependency): Delete. (fur_source::register_relation): New. (fur_edge::fur_edge): Adjust. (fur_edge::get_phi_operand): Fix comment. (fur_edge::query): Delete. (fur_stmt::fur_stmt): Adjust. (fur_stmt::query): Delete. (fur_depend::fur_depend): Adjust. (fur_depend::register_relation): New. (fur_depend::register_relation): New. (fur_list::fur_list): Adjust. (fur_list::get_operand): Use member query. (fold_using_range::range_of_range_op): Process and query relations. (fold_using_range::range_of_address): Adjust dependency call. (fold_using_range::range_of_phi): Ditto. (gimple_ranger::gimple_ranger): New. Use ranger_ache oracle. (fold_using_range::relation_fold_and_or): New. (fold_using_range::postfold_gcond_edges): New. * gimple-range.h (class gimple_ranger): Adjust. (class fur_source): Adjust members. (class fur_stmt): Ditto. (class fold_using_range): Ditto. 2021-06-22 Andrew MacLeod * range-op.cc (range_operator::wi_fold): Apply relation effect. (range_operator::fold_range): Adjust and apply relation effect. (*::fold_range): Add relation parameters. (*::op1_range): Ditto. (*::op2_range): Ditto. (range_operator::lhs_op1_relation): New. (range_operator::lhs_op2_relation): New. (range_operator::op1_op2_relation): New. (range_operator::op1_op2_relation_effect): New. (relop_early_resolve): New. (operator_equal::op1_op2_relation): New. (operator_equal::fold_range): Call relop_early_resolve. (operator_not_equal::op1_op2_relation): New. (operator_not_equal::fold_range): Call relop_early_resolve. (operator_lt::op1_op2_relation): New. (operator_lt::fold_range): Call relop_early_resolve. (operator_le::op1_op2_relation): New. (operator_le::fold_range): Call relop_early_resolve. (operator_gt::op1_op2_relation): New. (operator_gt::fold_range): Call relop_early_resolve. (operator_ge::op1_op2_relation): New. (operator_ge::fold_range): Call relop_early_resolve. * range-op.h (class range_operator): Adjust parameters and methods. 2021-06-22 Andrew MacLeod * Makefile.in (OBJS): Add value-relation.o. * gimple-range.h: Adjust include files. * tree-data-ref.c: Adjust include file order. * value-query.cc (range_query::get_value_range): Default to no oracle. (range_query::query_relation): New. (range_query::query_relation): New. * value-query.h (class range_query): Adjust. * value-relation.cc: New. * value-relation.h: New. 2021-06-22 Richard Biener PR tree-optimization/101151 * tree-ssa-sink.c (statement_sink_location): Expand irreducible region check. 2021-06-22 Jojo R * config/riscv/riscv.c (thead_c906_tune_info): New. (riscv_tune_info_table): Use new tune. 2021-06-22 Richard Biener PR tree-optimization/101158 * tree-vect-slp.c (vect_build_slp_tree_1): Move same operand checking after checking for matching operation. 2021-06-22 Richard Biener PR tree-optimization/101159 * tree-vect-patterns.c (vect_recog_popcount_pattern): Add missing NULL vectype check. 2021-06-22 Richard Biener PR tree-optimization/101154 * tree-vect-slp.c (vect_build_slp_tree_2): Fix out-of-bound access. 2021-06-22 Jakub Jelinek PR target/11877 * config/i386/i386-protos.h (ix86_last_zero_store_uid): Declare. * config/i386/i386-expand.c (ix86_last_zero_store_uid): New variable. * config/i386/i386.c (ix86_expand_prologue): Clear it. * config/i386/i386.md (peephole2s for 1/2/4 stores of const0_rtx): Remove "" from match_operand. Emit new insns using emit_move_insn and set ix86_last_zero_store_uid to INSN_UID of the last store. Add peephole2s for 1/2/4 stores of const0_rtx following previous successful peep2s. 2021-06-22 Martin Liska * auto-profile.c (AUTO_PROFILE_VERSION): Bump as string format was changed. 2021-06-22 Martin Liska * gcov-io.h: Remove padding entries. 2021-06-22 liuhongt PR tree-optimization/97770 * tree-vect-patterns.c (vect_recog_popcount_pattern): New. (vect_recog_func vect_vect_recog_func_ptrs): Add new pattern. 2021-06-22 liuhongt PR target/100267 * config/i386/i386-builtin.def (BDESC): Adjust builtin name. * config/i386/sse.md (_expand_mask): Rename to .. (expand_mask): this .. (*expand_mask): New pre_reload splitter to transform v{,p}expand* to vmov* when mask is zero, all ones, or has all ones in it's lower part, otherwise still generate v{,p}expand*. 2021-06-22 liuhongt PR target/100310 * config/i386/i386-expand.c (ix86_expand_special_args_builtin): Keep constm1_operand only if it satisfies insn's operand predicate. 2021-06-21 Jason Merrill PR target/88529 * df-scan.c (df_ref_record): Check that regno < endregno. * function.c (assign_parms, expand_function_end): Do nothing with a TYPE_EMPTY_P result. 2021-06-21 Richard Biener PR tree-optimization/101120 * tree-vect-data-refs.c (bump_vector_ptr): Fold the built increment. * tree-vect-slp.c (vect_transform_slp_perm_load): Add DR chain DCE capability. * tree-vectorizer.h (vect_transform_slp_perm_load): Adjust. * tree-vect-stmts.c (vectorizable_load): Remove unused loads in the DR chain for SLP. 2021-06-21 Jakub Jelinek PR inline-asm/100785 * gimplify.c (gimplify_asm_expr): Don't diagnose errors if output or input operands were already error_mark_node. * cfgexpand.c (expand_asm_stmt): If errors are emitted, remove all inputs, outputs and clobbers from the asm and set template to "". 2021-06-21 prathamesh.kulkarni * config/arm/arm_neon.h (vceq_s8): Replace builtin with __a == __b. (vceq_s16): Likewise. (vceq_s32): Likewise. (vceq_u8): Likewise. (vceq_u16): Likewise. (vceq_u32): Likewise. (vceq_p8): Likewise. (vceqq_s8): Likewise. (vceqq_s16): Likewise. (vceqq_s32): Likewise. (vceqq_u8): Likewise. (vceqq_u16): Likewise. (vceqq_u32): Likewise. (vceqq_p8): Likewise. (vceq_f32): Gate __a == __b on __FAST_MATH__. (vceqq_f32): Likewise. (vceq_f16): Likewise. (vceqq_f16): Likewise. 2021-06-21 prathamesh.kulkarni PR target/97906 * config/arm/iterators.md (NEON_VACMP): Remove. * config/arm/neon.md (neon_vca): Use GLTE instead of GTGE iterator. (neon_vca_insn): Likewise. (neon_vca_insn_unspec): Use NEON_VAGLTE instead of NEON_VACMP. 2021-06-21 Richard Biener PR tree-optimization/101121 * tree-vect-slp.c (vect_build_slp_tree_2): To not fail fatally when we just lack a stmt with the desired op when doing permutation. (vect_build_slp_tree): When caching a failed SLP build attempt assert that at least one lane is marked as not matching. 2021-06-21 liuhongt PR target/101142 * config/i386/i386.md: (*anddi_1): Disparage slightly the mask register alternative. (*and_1): Ditto. (*andqi_1): Ditto. (*andn_1): Ditto. (*_1): Ditto. (*qi_1): Ditto. (*one_cmpl2_1): Ditto. (*one_cmplsi2_1_zext): Ditto. (*one_cmplqi2_1): Ditto. * config/i386/i386.c (x86_order_regs_for_local_alloc): Change the order of mask registers to be before general registers. 2021-06-21 Roger Sayle PR target/11877 * config/i386/i386.md: New define_peephole2s to shrink writing 1, 2 or 4 consecutive zeros to memory when optimizing for size. 2021-06-18 Jeff Law * config/h8300/h8300.c (h8300_select_cc_mode): Handle SYMBOL_REF. * config/h8300/logical.md (3 logcial expander): Generate more efficient code when the source can be trivially simplified. 2021-06-18 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::range_of_def): Calculate a range if global is not available. (ranger_cache::entry_range): Fallback to range_of_def. * gimple-range-cache.h (range_of_def): Adjust prototype. 2021-06-18 Andrew MacLeod PR tree-optimization/101014 * gimple-range-cache.cc (ranger_cache::ranger_cache): Remove poor value list. (ranger_cache::~ranger_cache): Ditto. (ranger_cache::enable_new_values): Delete. (ranger_cache::push_poor_value): Delete. (ranger_cache::range_of_def): Remove poor value processing. (ranger_cache::entry_range): Ditto. (ranger_cache::fill_block_cache): Ditto. * gimple-range-cache.h (class ranger_cache): Remove poor value members. * gimple-range.cc (gimple_ranger::range_of_expr): Remove call. * gimple-range.h (class gimple_ranger): Adjust. 2021-06-18 Srinath Parvathaneni PR target/100856 * common/config/arm/arm-common.c (arm_canon_arch_option_1): New function derived from arm_canon_arch. (arm_canon_arch_option): Call it. (arm_canon_arch_multilib_option): New function. * config/arm/arm-cpus.in (IGNORE_FOR_MULTILIB): New fgroup. * config/arm/arm.h (arm_canon_arch_multilib_option): New prototype. (CANON_ARCH_MULTILIB_SPEC_FUNCTION): New macro. (MULTILIB_ARCH_CANONICAL_SPECS): New macro. (DRIVER_SELF_SPECS): Add MULTILIB_ARCH_CANONICAL_SPECS. * config/arm/arm.opt (mlibarch): New option. * config/arm/t-rmprofile (MULTILIB_MATCHES): For armv8*-m, replace use of march on RHS with mlibarch. 2021-06-18 Marcel Vollweiler * config.in: Regenerate. * config/gcn/gcn.c (print_operand_address): Fix for global_load assembler functions. * configure: Regenerate. * configure.ac: Fix for global_load assembler functions. 2021-06-18 Richard Biener PR tree-optimization/101112 * tree-vect-slp.c (vect_slp_linearize_chain): Fix condition to lookup a pattern stmt def. 2021-06-18 Jakub Jelinek PR middle-end/101062 * stor-layout.c (finish_bitfield_layout): Don't add bitfield representatives in QUAL_UNION_TYPE. 2021-06-18 Andrew Pinski * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Add counting of how many times it is done. (factor_out_conditional_conversion): Likewise. (match_simplify_replacement): Likewise. (value_replacement): Likewise. (spaceship_replacement): Likewise. (cond_store_replacement): Likewise. (cond_if_else_store_replacement_1): Likewise. (hoist_adjacent_loads): Likewise. 2021-06-18 Andrew Pinski * tree-cfg.c (verify_gimple_assign_unary): Reject point and offset types on NEGATE_EXPR, ABS_EXPR, BIT_NOT_EXPR, PAREN_EXPR and CNONJ_EXPR. (verify_gimple_assign_binary): Reject point and offset types on MULT_EXPR, MULT_HIGHPART_EXPR, TRUNC_DIV_EXPR, CEIL_DIV_EXPR, FLOOR_DIV_EXPR, ROUND_DIV_EXPR, TRUNC_MOD_EXPR, CEIL_MOD_EXPR, FLOOR_MOD_EXPR, ROUND_MOD_EXPR, RDIV_EXPR, and EXACT_DIV_EXPR. 2021-06-18 Michael Meissner * config/rs6000/rs6000.c (rs6000_emit_minmax): Add support for ISA 3.1 IEEE 128-bit floating point xsmaxcqp/xsmincqp instructions. * config/rs6000/rs6000.md (s3, IEEE128 iterator): New insns. 2021-06-17 Aaron Sawdey * config/rs6000/genfusion.pl (gen_logical_addsubf): Add earlyclobber to alts 0/1. (gen_addadd): Add earlyclobber to alts 0/1. * config/rs6000/fusion.md: Regenerate file. 2021-06-17 Trevor Saunders * cfgloopanal.c (get_loop_hot_path): Make path an auto_vec. 2021-06-17 Andrew MacLeod * gimple-range-cache.cc: Comment cleanups. * gimple-range-gori.cc: Comment cleanups. * gimple-range.cc: Comment/spacing cleanups * value-range.h: Comment cleanups. 2021-06-17 H.J. Lu PR target/100704 * calls.c (expand_call): Replace PUSH_ARGS with targetm.calls.push_argument (0). (emit_library_call_value_1): Likewise. * defaults.h (PUSH_ARGS): Removed. (PUSH_ARGS_REVERSED): Replace PUSH_ARGS with targetm.calls.push_argument (0). * expr.c (block_move_libcall_safe_for_call_parm): Likewise. (emit_push_insn): Pass the number bytes to push to targetm.calls.push_argument and pass 0 if ARGS_ADDR is 0. * hooks.c (hook_bool_uint_true): New. * hooks.h (hook_bool_uint_true): Likewise. * rtlanal.c (nonzero_bits1): Replace PUSH_ARGS with targetm.calls.push_argument (0). * target.def (push_argument): Add a targetm.calls hook. * targhooks.c (default_push_argument): New. * targhooks.h (default_push_argument): Likewise. * config/bpf/bpf.h (PUSH_ARGS): Removed. * config/cr16/cr16.c (TARGET_PUSH_ARGUMENT): New. * config/cr16/cr16.h (PUSH_ARGS): Removed. * config/i386/i386.c (ix86_push_argument): New. (TARGET_PUSH_ARGUMENT): Likewise. * config/i386/i386.h (PUSH_ARGS): Removed. * config/m32c/m32c.c (TARGET_PUSH_ARGUMENT): New. * config/m32c/m32c.h (PUSH_ARGS): Removed. * config/nios2/nios2.h (PUSH_ARGS): Likewise. * config/pru/pru.h (PUSH_ARGS): Likewise. * doc/tm.texi.in: Remove PUSH_ARGS documentation. Add TARGET_PUSH_ARGUMENT hook. * doc/tm.texi: Regenerated. 2021-06-17 Uroš Bizjak PR target/97194 * config/i386/i386-expand.c (expand_vector_set_var): Handle V2FS mode remapping. Pass TARGET_MMX_WITH_SSE to ix86_expand_vector_init_duplicate. (ix86_expand_vector_init_duplicate): Emit insv_1 for QImode for !TARGET_PARTIAL_REG_STALL. * config/i386/predicates.md (vec_setm_mmx_operand): New predicate. * config/i386/mmx.md (vec_setv2sf): Use vec_setm_mmx_operand as operand 2 predicate. Call ix86_expand_vector_set_var for non-constant index operand. (vec_setv2si): Ditto. (vec_setv4hi): Ditto. (vec_setv8qi): ditto. 2021-06-17 Aldy Hernandez PR tree-optimization/100790 * gimple-range.cc (range_of_builtin_call): Cleanup clz and ctz code. 2021-06-17 Martin Liska * doc/invoke.texi: Use consistently -O1 instead of -O. 2021-06-17 Martin Liska * gcov-io.h: Update documentation entry about string format. 2021-06-17 Marius Hillenbrand PR target/100871 * config/s390/vecintrin.h (vec_doublee): Fix to use __builtin_s390_vflls. (vec_floate): Fix to use __builtin_s390_vflrd. 2021-06-17 Trevor Saunders * dominance.c (get_dominated_to_depth): Return auto_vec. * dominance.h (get_dominated_to_depth): Likewise. (get_all_dominated_blocks): Likewise. * cfgcleanup.c (delete_unreachable_blocks): Adjust. * gcse.c (hoist_code): Likewise. * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise. * tree-parloops.c (oacc_entry_exit_ok): Likewise. * tree-ssa-dce.c (eliminate_unnecessary_stmts): Likewise. * tree-ssa-phiprop.c (pass_phiprop::execute): Likewise. 2021-06-17 Trevor Saunders * dominance.c (get_dominated_by_region): Return auto_vec. * dominance.h (get_dominated_by_region): Likewise. * tree-cfg.c (gimple_duplicate_sese_region): Adjust. (gimple_duplicate_sese_tail): Likewise. (move_sese_region_to_fn): Likewise. 2021-06-17 Trevor Saunders * dominance.c (get_dominated_by): Return auto_vec. * dominance.h (get_dominated_by): Likewise. * auto-profile.c (afdo_find_equiv_class): Adjust. * cfgloopmanip.c (duplicate_loop_to_header_edge): Likewise. * loop-unroll.c (unroll_loop_runtime_iterations): Likewise. * tree-cfg.c (test_linear_chain): Likewise. (test_diamond): Likewise. 2021-06-17 Trevor Saunders * cfgloop.h (get_loop_hot_path): Return auto_vec. * cfgloopanal.c (get_loop_hot_path): Likewise. * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise. 2021-06-17 Trevor Saunders * cgraph.c (cgraph_node::collect_callers): Return auto_vec. * cgraph.h (cgraph_node::collect_callers): Likewise. * ipa-cp.c (create_specialized_node): Adjust. (decide_about_value): Likewise. (decide_whether_version_node): Likewise. * ipa-sra.c (process_isra_node_results): Likewise. 2021-06-17 Trevor Saunders * vec.h (vl_ptr>::using_auto_storage): Handle null m_vec. (auto_vec::auto_vec): Define move constructor, and delete copy constructor. (auto_vec::operator=): Define move assignment and delete copy assignment. 2021-06-17 Aldy Hernandez * gimple-range.cc (debug_seed_ranger): New. (dump_ranger): New. (debug_ranger): New. 2021-06-17 Richard Biener PR tree-optimization/54400 * tree-vectorizer.h (enum slp_instance_kind): Add slp_inst_kind_bb_reduc. (reduction_fn_for_scalar_code): Declare. * tree-vect-data-refs.c (vect_slp_analyze_instance_dependence): Check SLP_INSTANCE_KIND instead of looking at the representative. (vect_slp_analyze_instance_alignment): Likewise. * tree-vect-loop.c (reduction_fn_for_scalar_code): Export. * tree-vect-slp.c (vect_slp_linearize_chain): Split out chain linearization from vect_build_slp_tree_2 and generalize for the use of BB reduction vectorization. (vect_build_slp_tree_2): Adjust accordingly. (vect_optimize_slp): Elide permutes at the root of BB reduction instances. (vectorizable_bb_reduc_epilogue): New function. (vect_slp_prune_covered_roots): Likewise. (vect_slp_analyze_operations): Use them. (vect_slp_check_for_constructors): Recognize associatable chains for BB reduction vectorization. (vectorize_slp_instance_root_stmt): Generate code for the BB reduction epilogue. 2021-06-17 Andrew MacLeod * gimple-range-gori.cc (gori_compute::has_edge_range_p): Check with may_recompute_p. (gori_compute::may_recompute_p): New. (gori_compute::outgoing_edge_range_p): Perform recomputations. * gimple-range-gori.h (class gori_compute): Add prototype. 2021-06-17 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::range_on_edge): Always return true when a range can be calculated. * gimple-range.cc (gimple_ranger::dump_bb): Check has_edge_range_p. 2021-06-16 Martin Sebor * doc/invoke.texi (-Wmismatched-dealloc, -Wmismatched-new-delete): Correct documented defaults. 2021-06-16 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Initialize m_new_value_p directly. 2021-06-16 Uroš Bizjak PR target/89021 * config/i386/i386-expand.c (expand_vec_perm_2perm_pblendv): Handle 64bit modes for TARGET_SSE4_1. (expand_vec_perm_pshufb2): Handle 64bit modes for TARGET_SSSE3. (expand_vec_perm_even_odd_pack): Handle V4HI mode. (expand_vec_perm_even_odd_1) : Expand via expand_vec_perm_pshufb2 for TARGET_SSSE3 and via expand_vec_perm_even_odd_pack for TARGET_SSE4_1. * config/i386/mmx.md (mmx_packusdw): New insn pattern. 2021-06-16 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_hn): Change to an expander that emits the correct instruction depending on endianness. (aarch64_hn_insn_le): Define. (aarch64_hn_insn_be): Define. 2021-06-16 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Split generator for aarch64_qmovn builtins into scalar and vector variants. * config/aarch64/aarch64-simd.md (aarch64_qmovn_insn_le): Define. (aarch64_qmovn_insn_be): Define. (aarch64_qmovn): Split into scalar and vector variants. Change vector variant to an expander that emits the correct instruction depending on endianness. 2021-06-16 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Split generator for aarch64_sqmovun builtins into scalar and vector variants. * config/aarch64/aarch64-simd.md (aarch64_sqmovun): Split into scalar and vector variants. Change vector variant to an expander that emits the correct instruction depending on endianness. (aarch64_sqmovun_insn_le): Define. (aarch64_sqmovun_insn_be): Define. 2021-06-16 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_xtn_insn_le): Define - modeling zero-high-half semantics. (aarch64_xtn): Change to an expander that emits the appropriate instruction depending on endianness. (aarch64_xtn_insn_be): Define - modeling zero-high-half semantics. (aarch64_xtn2_le): Rename to... (aarch64_xtn2_insn_le): This. (aarch64_xtn2_be): Rename to... (aarch64_xtn2_insn_be): This. (vec_pack_trunc_): Emit truncation instruction instead of aarch64_xtn. * config/aarch64/iterators.md (Vnarrowd): Add Vnarrowd mode attribute iterator. 2021-06-16 Martin Jambor PR tree-optimization/100453 * tree-sra.c (create_access): Disqualify any const candidates which are written to. (sra_modify_expr): Do not store sub-replacements back to a const base. (handle_unscalarized_data_in_subtree): Likewise. (sra_modify_assign): Likewise. Earlier, use TREE_READONLy test instead of constant_decl_p. 2021-06-16 Jakub Jelinek PR middle-end/101062 * stor-layout.c (finish_bitfield_representative): For fields in unions assume nextf is always NULL. (finish_bitfield_layout): Compute bit field representatives also in unions, but handle it as if each bitfield was the only field in the aggregate. 2021-06-16 Richard Biener PR tree-optimization/101088 * tree-ssa-loop-im.c (sm_seq_valid_bb): Only look for supported refs on edges. Do not assert same ref but different kind stores are unsuported but mark them so. (hoist_memory_references): Only look for supported refs on exits. 2021-06-16 Roger Sayle PR rtl-optimization/46235 * config/i386/i386.md: New define_split for bt followed by cmov. (*bt_setcqi): New define_insn_and_split for bt followed by setc. (*bt_setncqi): New define_insn_and_split for bt then setnc. (*bt_setnc): New define_insn_and_split for bt followed by setnc with zero extension. 2021-06-16 Richard Biener PR tree-optimization/101083 * tree-vect-slp.c (vect_slp_build_two_operator_nodes): Get vectype as argument. (vect_build_slp_tree_2): Adjust. 2021-06-15 Martin Sebor PR middle-end/100876 * builtins.c: (gimple_call_return_array): Account for size_t mangling as either unsigned int or unsigned long 2021-06-15 Jeff Law * compare-elim.c (try_eliminate_compare): Run DCE to clean things up before eliminating comparisons. 2021-06-15 Aldy Hernandez * range-op.cc (operator_bitwise_or::wi_fold): Make sure nonzero|X is nonzero. (range_op_bitwise_and_tests): Add tests for above. 2021-06-15 Carl Love PR target/101022 * config/rs6000/rs6000-builtin.def (VCMPEQUT): Fix the ICODE for the enum definition. (VRLQ, VSLQ, VSRQ, VSRAQ): Remove unused BU_P10_OVERLOAD_2 definitions. 2021-06-15 Tobias Burnus PR fortran/92568 * gimplify.c (enum gimplify_defaultmap_kind): Add GDMK_SCALAR_TARGET. (struct gimplify_omp_ctx): Extend defaultmap array by one. (new_omp_context): Init defaultmap[GDMK_SCALAR_TARGET]. (omp_notice_variable): Update type classification for Fortran. (gimplify_scan_omp_clauses): Update calls for new argument; handle GDMK_SCALAR_TARGET; for Fortran, GDMK_POINTER avoid GOVD_MAP_0LEN_ARRAY. * langhooks-def.h (lhd_omp_scalar_p): Add 'ptr_ok' argument. * langhooks.c (lhd_omp_scalar_p): Likewise. (LANG_HOOKS_OMP_ALLOCATABLE_P, LANG_HOOKS_OMP_SCALAR_TARGET_P): New. (LANG_HOOKS_DECLS): Add them. * langhooks.h (struct lang_hooks_for_decls): Add new hooks, update omp_scalar_p pointer type to include the new bool argument. 2021-06-15 David Malcolm * doc/analyzer.texi (Special Functions for Debugging the Analyzer): Add __analyzer_dump_capacity. 2021-06-15 Jakub Jelinek PR target/101046 * expr.c (expand_expr_real_2) : Clear subtarget when changing mode. 2021-06-15 Richard Biener * cfgloopanal.c (mark_irreducible_loops): Use a dominance check to identify loop latches. * cfgloop.c (verify_loop_structure): Likewise. * loop-init.c (apply_loop_flags): Allow marked irreducible regions even with multiple latches. * predict.c (rebuild_frequencies): Simplify. 2021-06-15 Richard Biener * tree-ssa-threadupdate.c (jump_thread_path_registry::mark_threaded_blocks): Assert we have marked irreducible regions. 2021-06-14 Martin Sebor PR c++/100876 * builtins.c (gimple_call_return_array): Check for attribute fn spec. Handle calls to placement new. (ndecl_dealloc_argno): Avoid placement delete. 2021-06-14 Peter Bergner PR target/100777 * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Use create_tmp_reg_or_ssa_name(). 2021-06-14 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust. (ranger_cache::enable_new_values): Set to specified value and return the old value. (ranger_cache::disable_new_values): Delete. (ranger_cache::fill_block_cache): Disable non 1st order derived poor values. * gimple-range-cache.h (ranger_cache): Adjust prototypes. * gimple-range.cc (gimple_ranger::range_of_expr): Adjust. 2021-06-14 Uroš Bizjak PR target/101058 * config/i386/i386-expand.c (ix86_vectorize_vec_perm_const): Return true early when testing with V2HImode. * config/i386/mmx.md (*punpckwd): Split to sse2_pshuflw_1. 2021-06-14 Christophe Lyon * config/arm/mve.md (mve_vec_unpack_lo_): New pattern. (mve_vec_unpack_hi_): New pattern. (@mve_vec_pack_trunc_lo_): New pattern. (mve_vmovntq_): Prefix with '@'. * config/arm/neon.md (vec_unpack_hi_): Move to vec-common.md. (vec_unpack_lo_): Likewise. (vec_pack_trunc_): Rename to neon_quad_vec_pack_trunc_. * config/arm/vec-common.md (vec_unpack_hi_): New pattern. (vec_unpack_lo_): New. (vec_pack_trunc_): New. 2021-06-14 Richard Biener PR tree-optimization/100934 * tree-ssa-dom.c (pass_dominator::execute): Properly mark irreducible regions. 2021-06-14 Martin Liska * doc/invoke.texi: Put r{...} on the same line as @item. 2021-06-14 Martin Liska * doc/invoke.texi: Add missing newline. 2021-06-14 Martin Liska * doc/invoke.texi: Remove '+' charasters. 2021-06-14 Claudiu Zissulescu * config.gcc (arc): Add support for with_cpu option. * config/arc/arc.h (OPTION_DEFAULT_SPECS): Add fpu. 2021-06-14 Richard Biener PR tree-optimization/101031 * tree-ssa-strlen.c (maybe_invalidate): Increment max_size instead of size when accounting for a possibly string terminating nul. 2021-06-14 Martin Liska * gimple-ssa-evrp.c (pointer_equiv_analyzer::~pointer_equiv_analyzer): Use delete[]. 2021-06-14 Aldy Hernandez * value-query.cc (gimple_range_global): Call get_range_global if called after inlining. 2021-06-13 Uroš Bizjak PR target/101021 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Emit constant permutation insn directly from here. 2021-06-13 Trevor Saunders * attribs.c (find_attribute_namespace): Iterate over vec<> with range based for. * auto-profile.c (afdo_find_equiv_class): Likewise. * gcc.c (do_specs_vec): Likewise. (do_spec_1): Likewise. (driver::set_up_specs): Likewise. * gimple-loop-jam.c (any_access_function_variant_p): Likewise. * gimple-ssa-store-merging.c (compatible_load_p): Likewise. (imm_store_chain_info::try_coalesce_bswap): Likewise. (imm_store_chain_info::coalesce_immediate_stores): Likewise. (get_location_for_stmts): Likewise. * graphite-poly.c (print_iteration_domains): Likewise. (free_poly_bb): Likewise. (remove_gbbs_in_scop): Likewise. (free_scop): Likewise. (dump_gbb_cases): Likewise. (dump_gbb_conditions): Likewise. (print_pdrs): Likewise. (print_scop): Likewise. * ifcvt.c (cond_move_process_if_block): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * sanopt.c (sanitize_rewrite_addressable_params): Likewise. * sel-sched-dump.c (dump_insn_vector): Likewise. * store-motion.c (store_ops_ok): Likewise. (store_killed_in_insn): Likewise. * timevar.c (timer::named_items::print): Likewise. * tree-cfgcleanup.c (cleanup_control_flow_pre): Likewise. (cleanup_tree_cfg_noloop): Likewise. * tree-data-ref.c (dump_data_references): Likewise. (print_dir_vectors): Likewise. (print_dist_vectors): Likewise. (dump_data_dependence_relations): Likewise. (dump_dist_dir_vectors): Likewise. (dump_ddrs): Likewise. (create_runtime_alias_checks): Likewise. (free_subscripts): Likewise. (save_dist_v): Likewise. (save_dir_v): Likewise. (invariant_access_functions): Likewise. (same_access_functions): Likewise. (access_functions_are_affine_or_constant_p): Likewise. (find_data_references_in_stmt): Likewise. (graphite_find_data_references_in_stmt): Likewise. (free_dependence_relations): Likewise. (free_data_refs): Likewise. * tree-inline.c (copy_debug_stmts): Likewise. * tree-into-ssa.c (dump_currdefs): Likewise. (rewrite_update_phi_arguments): Likewise. * tree-ssa-propagate.c (clean_up_loop_closed_phi): Likewise. * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr): Likewise. (vect_slp_analyze_node_dependences): Likewise. (vect_slp_analyze_instance_dependence): Likewise. (vect_record_base_alignments): Likewise. (vect_get_peeling_costs_all_drs): Likewise. (vect_peeling_supportable): Likewise. * tree-vectorizer.c (vec_info::~vec_info): Likewise. (vec_info::free_stmt_vec_infos): Likewise. 2021-06-13 Jeff Law * config/h8300/logical.md (qi3_1): New pattern. (andqi3_1): Removed. (qi3_1): Do not split for IOR/XOR a single bit. (H8/SX bit logicals): Split out from other patterns. * config/h8300/multiply.md (mulqihi3_const): Renamed from mulqihi3_const_clobber_flags. (mulqihi3, mulhisi3_const, mulhisi3): Similarly 2021-06-13 H.J. Lu PR target/101023 * config/i386/i386.c (ix86_expand_prologue): Set red_zone_used to true if red zone is used. (ix86_output_indirect_jmp): Replace ix86_red_zone_size with ix86_red_zone_used. * config/i386/i386.h (machine_function): Add red_zone_used. (ix86_red_zone_size): Removed. (ix86_red_zone_used): New. * config/i386/i386.md (peephole2 patterns): Replace ix86_red_zone_size with ix86_red_zone_used. 2021-06-12 Jason Merrill * doc/extend.texi (unused variable attribute): Applies to structure fields as well. 2021-06-12 Eugene Rozenfeld * auto-profile.c (read_profile): fix a typo in an error string 2021-06-11 Thomas Schwinge * tree-pretty-print.h (dump_omp_clauses): Add 'bool = true' default argument. * tree-pretty-print.c (dump_omp_clauses): Update. (dump_generic_node) : Use it. 2021-06-11 Srinath Parvathaneni PR target/101016 * config/arm/arm_mve.h (__arm_vld1q): Change __ARM_mve_coerce(p0, int8_t const *) to __ARM_mve_coerce1(p0, int8_t *) in the argument for the polymorphic variants matching code. (__arm_vld1q_z): Likewise. (__arm_vld2q): Likewise. (__arm_vld4q): Likewise. (__arm_vldrbq_gather_offset): Likewise. (__arm_vldrbq_gather_offset_z): Likewise. 2021-06-11 Roger Sayle PR tree-optimization/96392 * fold-const.h (tree_expr_maybe_real_minus_zero_p): Fix prototype. 2021-06-11 Roger Sayle PR tree-optimization/96392 * fold-const.c (fold_real_zero_addition_p): Take both arguments of the addition or subtraction, not just the zero. Use this other argument in tests for signaling NaNs and signed zeros. (tree_expr_maybe_real_minus_zero_p): New predicate. * fold-const.h (fold_real_zero_addition_p): Update prototype. (tree_expr_maybe_real_minus_zero_p): New function prototype. * match.pd: Update calls to fold_real_zero_addition_p. Replace HONOR_NANS with tree_expr_maybe_nan_p. Replace HONOR_SIGNED_ZEROS with tree_expr_maybe_real_minus_zero_p. Replace HONOR_SNANS with tree_expr_maybe_signaling_nan_p. * tree-ssa-reassoc.c (eliminate_using_constants): Update call to fold_real_zero_addition_p. 2021-06-11 Richard Biener PR tree-optimization/101025 * tree-ssa-loop-im.c (sm_seq_valid_bb): Make sure to process all refs that require dependence checking. 2021-06-11 Richard Biener PR tree-optimization/101028 * tree-vect-slp.c (vect_build_slp_tree_2): When SLP reassoc discovery fails fatally, mark appropriate lanes in matches[] so. 2021-06-11 Richard Biener PR tree-optimization/101026 * tree-vect-slp.c (vect_build_slp_tree_2): Make sure we have a representative for the associated chain nodes. 2021-06-11 Jakub Jelinek PR rtl-optimization/101008 * simplify-rtx.c (relational_result): New function. (simplify_logical_relational_operation, simplify_relational_operation): Use it. 2021-06-11 Jakub Jelinek PR target/101007 * config/i386/sse.md (*vec_concat_0_1): Require TARGET_SSE2. 2021-06-11 Uroš Bizjak PR target/101021 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Return false if the permutation can be implemented with constant permutation instruction in wider mode. (canonicalize_vector_int_perm): Move above expand_vec_perm_pshufb. Handle V8QImode and V4HImode. 2021-06-11 Martin Liska PR gcov-profile/100788 * common.opt: Add new option. * coverage.c (coverage_begin_function): Emit warning instead on the internal compiler error. * doc/invoke.texi: Document the option. * toplev.c (process_options): Enable it by default. 2021-06-11 Richard Biener PR middle-end/101009 * tree-data-ref.c (build_classic_dist_vector_1): Make sure to set *init_b to true when we encounter a constant equal index pair. (compute_affine_dependence): Also dump the actual DR_REF. 2021-06-10 Aldy Hernandez PR tree-optimization/100984 * gimple-ssa-evrp.c (ssa_equiv_stack): Use auto_vec for replacements table. (ssa_equiv_stack::~ssa_equiv_stack): Remove. 2021-06-11 Kewen Lin * config/rs6000/rs6000.md (floatsi2_lfiwax__mem_zext): New define_insn_and_split. 2021-06-11 Richard Biener * tree-vect-slp.c (vect_build_slp_tree_2): Use stablesort to sort operands of the associative chain. 2021-06-11 Richard Biener * system.h (gcc_stablesort_r): Declare. * sort.cc (gcc_sort_r): Support stable sort. (gcc_stablesort_r): Define. * vec.h (vec<>::stablesort): Add. 2021-06-10 Uroš Bizjak PR target/89021 * config/i386/i386-expand.c (ix86_split_mmx_punpck): Handle V2SF mode. Emit SHUFPS to fixup unpack-high for V2SF mode. (expand_vec_perm_blend): Handle 64bit modes for TARGET_SSE4_1. (expand_vec_perm_pshufb): Handle 64bit modes for TARGET_SSSE3. (expand_vec_perm_pblendv): Handle 64bit modes for TARGET_SSE4_1. (expand_vec_perm_interleave2): Handle 64bit modes. (expand_vec_perm_even_odd_pack): Handle V8QI mode. (expand_vec_perm_even_odd_1): Ditto. (ix86_vectorize_vec_perm_const): Ditto. * config/i386/i386.md (UNSPEC_PSHUFB): Move from ... * config/i386/sse.md: ... here. * config/i386/mmx.md (*vec_interleave_lowv2sf): New insn_and_split pattern. (*vec_interleave_highv2sf): Ditto. (mmx_pshufbv8qi3): New insn pattern. (*mmx_pblendw): Ditto. 2021-06-10 Peter Bergner * config/rs6000/rs6000-builtin.def (build_pair): New built-in. (build_acc): Likewise. * config/rs6000/rs6000-call.c (mma_expand_builtin): Swap assemble source operands in little-endian mode. (rs6000_gimple_fold_mma_builtin): Handle VSX_BUILTIN_BUILD_PAIR. (mma_init_builtins): Likewise. * config/rs6000/rs6000.c (rs6000_split_multireg_move): Handle endianness ordering for the MMA assemble and build source operands. * doc/extend.texi (__builtin_vsx_build_acc, __builtin_mma_build_pair): Document. (__builtin_mma_assemble_acc, __builtin_mma_assemble_pair): Remove documentation. 2021-06-10 Jeff Law * config/h8300/h8300.c (select_cc_mode): Handle MEM. Use REG_P. * config/h8300/extensions.md: Replace _clobber_flags patterns with . 2021-06-10 Robin Dapp * config/s390/vector.md (vcond_mask_): Change to (vcond_mask_): this. 2021-06-10 Andrew Stubbs Thomas Schwinge * omp-builtins.def (BUILT_IN_GOACC_ENTER_EXIT_DATA): Split into... (BUILT_IN_GOACC_ENTER_DATA, BUILT_IN_GOACC_EXIT_DATA): ... these. * gimple.h (enum gf_mask): Split 'GF_OMP_TARGET_KIND_OACC_ENTER_EXIT_DATA' into 'GF_OMP_TARGET_KIND_OACC_ENTER_DATA' and 'GF_OMP_TARGET_KIND_OACC_EXIT_DATA'. (is_gimple_omp_oacc): Update. * gimple-pretty-print.c (dump_gimple_omp_target): Likewise. * gimplify.c (gimplify_omp_target_update): Likewise. * omp-expand.c (expand_omp_target, build_omp_regions_1) (omp_make_gimple_edges): Likewise. * omp-low.c (check_omp_nesting_restrictions, lower_omp_target): Likewise. 2021-06-10 Aldy Hernandez * value-query.cc (value_query::value_on_edge): Rename name to expr. (range_query::range_on_edge): Same. (range_query::value_of_expr): Same. (range_query::value_on_edge): Same. * value-query.h (class value_query): Same. (class range_query): Same. 2021-06-10 Richard Biener PR tree-optimization/101003 * tree-vect-slp.c (vect_build_slp_tree_2): Appropriately use the pattern stmt defs when linearizing a chain. 2021-06-10 Jakub Jelinek PR debug/100852 * ifcvt.c (noce_get_alt_condition, noce_try_abs): Use prev_nonnote_nondebug_insn instead of prev_nonnote_insn. 2021-06-10 Clement Chigot * config/rs6000/aix71.h (ASM_CPU_SPEC): Add Power10 directive. * config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise. 2021-06-09 Andrew Pinski PR tree-optimization/100925 * match.pd (a ? CST1 : CST2): Limit transformations that would produce a negative to integeral types only. Change !POINTER_TYPE_P to INTEGRAL_TYPE_P also. 2021-06-09 Jeff Law Revert: 2021-06-09 Jeff Law * doc/tm.texi: Correctly update. 2021-06-09 Jeff Law * doc/tm.texi: Correctly update. 2021-06-09 H.J. Lu PR other/100735 * doc/tm.texi.in (Trampolines): Add a missing blank line. 2021-06-09 Paul Eggert PR other/100735 * doc/invoke.texi (Code Gen Options); Document that -fno-trampolines and -ftrampolines work only with Ada. * doc/tm.texi.in (Trampolines): Likewise. * doc/tm.texi: Regenerated. 2021-06-09 Carl Love * config/rs6000/altivec.h (vec_signextll, vec_signexti, vec_signextq): Add define for new builtins. * config/rs6000/altivec.md(altivec_vreveti2): Add define_expand. * config/rs6000/rs6000-builtin.def (VSIGNEXTI, VSIGNEXTLL): Add overloaded builtin definitions. (VSIGNEXTSB2W, VSIGNEXTSH2W, VSIGNEXTSB2D, VSIGNEXTSH2D,VSIGNEXTSW2D, VSIGNEXTSD2Q): Add builtin expansions. (SIGNEXT): Add P10 overload definition. * config/rs6000/rs6000-call.c (P9V_BUILTIN_VEC_VSIGNEXTI, P9V_BUILTIN_VEC_VSIGNEXTLL, P10_BUILTIN_VEC_SIGNEXT): Add overloaded argument definitions. * config/rs6000/vsx.md (vsx_sign_extend_v2di_v1ti): Add define_insn. (vsignextend_v2di_v1ti, vsignextend_qi_, vsignextend_hi_, vsignextend_si_v2di)[VIlong]: Add define_expand. Make define_insn vsx_sign_extend_si_v2di visible. * doc/extend.texi: Add documentation for the vec_signexti, vec_signextll builtins and vec_signextq. 2021-06-09 Carl Love * config/rs6000/rs6000.c (__fixkfti, __fixunskfti, __floattikf, __floatuntikf): Names changed to __fixkfti_sw, __fixunskfti_sw, __floattikf_sw, __floatuntikf_sw respectively. * config/rs6000/rs6000.md (floatti2, floatunsti2, fix_truncti2, fixuns_truncti2): Add define_insn for mode IEEE 128. 2021-06-09 Carl Love * config/rs6000/altivec.md (altivec_vslq, altivec_vsrq): Rename to altivec_vslq_, altivec_vsrq_, mode VEC_TI. * config/rs6000/vector.md (VEC_TI): Was named VSX_TI in vsx.md. (vashlv1ti3): Change to vashl3, mode VEC_TI. (vlshrv1ti3): Change to vlshr3, mode VEC_TI. * config/rs6000/vsx.md (VSX_TI): Remove define_mode_iterator. Update uses of VSX_TI to VEC_TI. 2021-06-09 Carl Love * config/rs6000/dfp.md (floattitd2, fixtdti2): New define_insns. 2021-06-09 Carl Love * config/rs6000/altivec.h (vec_dive, vec_mod): Add define for new builtins. * config/rs6000/altivec.md (UNSPEC_VMULEUD, UNSPEC_VMULESD, UNSPEC_VMULOUD, UNSPEC_VMULOSD): New unspecs. (altivec_eqv1ti, altivec_gtv1ti, altivec_gtuv1ti, altivec_vmuleud, altivec_vmuloud, altivec_vmulesd, altivec_vmulosd, altivec_vrlq, altivec_vrlqmi, altivec_vrlqmi_inst, altivec_vrlqnm, altivec_vrlqnm_inst, altivec_vslq, altivec_vsrq, altivec_vsraq, altivec_vcmpequt_p, altivec_vcmpgtst_p, altivec_vcmpgtut_p): New define_insn. (vec_widen_umult_even_v2di, vec_widen_smult_even_v2di, vec_widen_umult_odd_v2di, vec_widen_smult_odd_v2di, altivec_vrlqmi, altivec_vrlqnm): New define_expands. * config/rs6000/rs6000-builtin.def (VCMPEQUT_P, VCMPGTST_P, VCMPGTUT_P): Add macro expansions. (BU_P10V_AV_P): Add builtin predicate definition. (VCMPGTUT, VCMPGTST, VCMPEQUT, CMPNET, CMPGE_1TI, CMPGE_U1TI, CMPLE_1TI, CMPLE_U1TI, VNOR_V1TI_UNS, VNOR_V1TI, VCMPNET_P, VCMPAET_P, VMULEUD, VMULESD, VMULOUD, VMULOSD, VRLQ, VSLQ, VSRQ, VSRAQ, VRLQNM, DIV_V1TI, UDIV_V1TI, DIVES_V1TI, DIVEU_V1TI, MODS_V1TI, MODU_V1TI, VRLQMI): New macro expansions. (VRLQ, VSLQ, VSRQ, VSRAQ, DIVE, MOD): New overload expansions. * config/rs6000/rs6000-call.c (P10_BUILTIN_VCMPEQUT, P10V_BUILTIN_CMPGE_1TI, P10V_BUILTIN_CMPGE_U1TI, P10V_BUILTIN_VCMPGTUT, P10V_BUILTIN_VCMPGTST, P10V_BUILTIN_CMPLE_1TI, P10V_BUILTIN_VCMPLE_U1TI, P10V_BUILTIN_DIV_V1TI, P10V_BUILTIN_UDIV_V1TI, P10V_BUILTIN_VMULESD, P10V_BUILTIN_VMULEUD, P10V_BUILTIN_VMULOSD, P10V_BUILTIN_VMULOUD, P10V_BUILTIN_VNOR_V1TI, P10V_BUILTIN_VNOR_V1TI_UNS, P10V_BUILTIN_VRLQ, P10V_BUILTIN_VRLQMI, P10V_BUILTIN_VRLQNM, P10V_BUILTIN_VSLQ, P10V_BUILTIN_VSRQ, P10V_BUILTIN_VSRAQ, P10V_BUILTIN_VCMPGTUT_P, P10V_BUILTIN_VCMPGTST_P, P10V_BUILTIN_VCMPEQUT_P, P10V_BUILTIN_VCMPGTUT_P, P10V_BUILTIN_VCMPGTST_P, P10V_BUILTIN_CMPNET, P10V_BUILTIN_VCMPNET_P, P10V_BUILTIN_VCMPAET_P, P10V_BUILTIN_DIVES_V1TI, P10V_BUILTIN_MODS_V1TI, P10V_BUILTIN_MODU_V1TI): New overloaded definitions. (rs6000_gimple_fold_builtin) [P10V_BUILTIN_VCMPEQUT, P10V_BUILTIN_CMPNET, P10V_BUILTIN_CMPGE_1TI, P10V_BUILTIN_CMPGE_U1TI, P10V_BUILTIN_VCMPGTUT, P10V_BUILTIN_VCMPGTST, P10V_BUILTIN_CMPLE_1TI, P10V_BUILTIN_CMPLE_U1TI]: New case statements. (rs6000_init_builtins) [bool_V1TI_type_node, int_ftype_int_v1ti_v1ti]: New assignments. (altivec_init_builtins): New E_V1TImode case statement. (builtin_function_type)[P10_BUILTIN_128BIT_VMULEUD, P10_BUILTIN_128BIT_VMULOUD, P10_BUILTIN_128BIT_DIVEU_V1TI, P10_BUILTIN_128BIT_MODU_V1TI, P10_BUILTIN_CMPGE_U1TI, P10_BUILTIN_VCMPGTUT, P10_BUILTIN_VCMPEQUT]: New case statements. * config/rs6000/rs6000.c (rs6000_handle_altivec_attribute) [E_TImode, E_V1TImode]: New case statements. * config/rs6000/rs6000.h (rs6000_builtin_type_index): New enum value RS6000_BTI_bool_V1TI. * config/rs6000/vector.md (vector_gtv1ti,vector_nltv1ti, vector_gtuv1ti, vector_nltuv1ti, vector_ngtv1ti, vector_ngtuv1ti, vector_eq_v1ti_p, vector_ne_v1ti_p, vector_ae_v1ti_p, vector_gt_v1ti_p, vector_gtu_v1ti_p, vrotlv1ti3, vashlv1ti3, vlshrv1ti3, vashrv1ti3): New define_expands. * config/rs6000/vsx.md (UNSPEC_VSX_DIVSQ, UNSPEC_VSX_DIVUQ, UNSPEC_VSX_DIVESQ, UNSPEC_VSX_DIVEUQ, UNSPEC_VSX_MODSQ, UNSPEC_VSX_MODUQ): New unspecs. (mulv2di3, vsx_div_v1ti, vsx_udiv_v1ti, vsx_dives_v1ti, vsx_diveu_v1ti, vsx_mods_v1ti, vsx_modu_v1ti, xxswapd_v1ti): New define_insns. (vcmpnet): New define_expand. * doc/extend.texi: Add documentation for the new builtins vec_rl, vec_rlmi, vec_rlnm, vec_sl, vec_sr, vec_sra, vec_mule, vec_mulo, vec_div, vec_dive, vec_mod, vec_cmpeq, vec_cmpne, vec_cmpgt, vec_cmplt, vec_cmpge, vec_cmple, vec_all_eq, vec_all_ne, vec_all_gt, vec_all_lt, vec_all_ge, vec_all_le, vec_any_eq, vec_any_ne, vec_any_gt, vec_any_lt, vec_any_ge, vec_any_le. 2021-06-09 Carl Love * config/rs6000/altivec.md (altivec_vrlmi): Fix bug in argument generation. 2021-06-09 Christophe Lyon * config/arm/iterators.md (): Remove VCLZQ_U, VCLZQ_S. (VCLZQ): Remove. * config/arm/mve.md (mve_vclzq_): Add '@' prefix, remove iterator. (mve_vclzq_u): New. * config/arm/neon.md (clz2): Rename to neon_vclz. (neon_vclz * config/arm/mve.md (mve_vhaddq_): Prefix with '@'. (@mve_vrhaddq_hadd): Likewise. * config/arm/vec-common.md (avg3_floor, uavg3_floor) (avg3_ceil", uavg3_ceil): New patterns. 2021-06-09 imba-tjd <109224573@qq.com> * doc/invoke.texi: Fix typo. 2021-06-09 Roger Sayle PR middle-end/53267 * fold-const-call.c (fold_const_call_sss) [CASE_CFN_FMOD]: Support evaluation of fmod/fmodf/fmodl at compile-time. 2021-06-09 Richard Biener PR tree-optimization/100981 * tree-vect-loop.c (vect_create_epilog_for_reduction): Use gimple_get_lhs to also handle calls. * tree-vect-slp-patterns.c (complex_pattern::build): Transfer reduction info. 2021-06-09 Richard Biener PR tree-optimization/97832 * tree-vectorizer.h (_slp_tree::failed): New. * tree-vect-slp.c (_slp_tree::_slp_tree): Initialize failed member. (_slp_tree::~_slp_tree): Free failed. (vect_build_slp_tree): Retain failed nodes and record matches in them, copying that back out when running into a cached fail. Dump start and end of discovery. (dt_sort_cmp): New. (vect_build_slp_tree_2): Handle associatable chains together doing more aggressive operand swapping. 2021-06-09 H.J. Lu PR target/100896 * config.gcc (gcc_cv_initfini_array): Set to yes for Linux and GNU targets. * doc/install.texi: Require glibc 2.1 and binutils 2.12 for Linux and GNU targets. 2021-06-09 Richard Biener * tree-vect-stmts.c (vect_is_simple_use): Always get dt from the stmt. 2021-06-09 Claudiu Zissulescu * config/arc/arc.md (loop_end): Change it to define_insn_and_split. 2021-06-09 Claudiu Zissulescu * config/arc/arc.md (maddhisi4): Use VMAC2H instruction. (machi): New pattern. (umaddhisi4): Use VMAC2HU instruction. (umachi): New pattern. 2021-06-09 Claudiu Zissulescu * config/arc/arc-protos.h (arc_split_move_p): New prototype. * config/arc/arc.c (arc_split_move_p): New function. (arc_split_move): Clean up. * config/arc/arc.md (movdi_insn): Clean up, use arc_split_move_p. (movdf_insn): Likewise. * config/arc/simdext.md (mov_insn): Likewise. 2021-06-09 Uroš Bizjak PR target/100936 * config/i386/i386.c (print_operand_address_as): Rename "no_rip" argument to "raw". Do not emit segment overrides when "raw" is true. 2021-06-09 Martin Liska * doc/gcov.texi: Create a proper JSON files. * doc/invoke.texi: Remove dots in order to make it a valid JSON object. 2021-06-09 Xionghu Luo * config/rs6000/rs6000-p8swap.c (pattern_is_rotate64): New. (insn_is_load_p): Use pattern_is_rotate64. (insn_is_swap_p): Likewise. (quad_aligned_load_p): Likewise. (const_load_sequence_p): Likewise. (replace_swapped_aligned_load): Likewise. (recombine_lvx_pattern): Likewise. (recombine_stvx_pattern): Likewise. 2021-06-09 Andrew MacLeod * gimple-range-gori.cc (gori_compute::outgoing_edge_range_p): Use a fur_stmt source record. * gimple-range.cc (fur_source::get_operand): Generic range query. (fur_source::get_phi_operand): New. (fur_source::register_dependency): New. (fur_source::query): New. (class fur_edge): New. Edge source for operands. (fur_edge::fur_edge): New. (fur_edge::get_operand): New. (fur_edge::get_phi_operand): New. (fur_edge::query): New. (fur_stmt::fur_stmt): New. (fur_stmt::get_operand): New. (fur_stmt::get_phi_operand): New. (fur_stmt::query): New. (class fur_depend): New. Statement source and process dependencies. (fur_depend::fur_depend): New. (fur_depend::register_dependency): New. (class fur_list): New. List source for operands. (fur_list::fur_list): New. (fur_list::get_operand): New. (fur_list::get_phi_operand): New. (fold_range): New. Instantiate appropriate fur_source class and fold. (fold_using_range::range_of_range_op): Use new API. (fold_using_range::range_of_address): Ditto. (fold_using_range::range_of_phi): Ditto. (imple_ranger::fold_range_internal): Use fur_depend class. (fold_using_range::range_of_ssa_name_with_loop_info): Use new API. * gimple-range.h (class fur_source): Now a base class. (class fur_stmt): New. (fold_range): New prototypes. (fur_source::fur_source): Delete. 2021-06-08 Andrew Pinski PR tree-optimization/25290 * tree-ssa-phiopt.c (xor_replacement): Delete. (tree_ssa_phiopt_worker): Delete use of xor_replacement. (match_simplify_replacement): Allow one cheap preparation statement that can be moved to before the if. 2021-06-08 Pat Haugen * config/rs6000/power10.md (power10-fused-load, power10-fused-store, power10-fused_alu, power10-fused-vec, power10-fused-branch): New. 2021-06-08 Jeff Law * config/h8300/logical.md (andqi3_1): Move BCLR case into define_insn_and_split. Create length attribute on define_insn_and_split. Only split for cases which we know will use AND. (andqi3_1): Renamed from andqi3_1_clobber_flags. Only handle AND here and fix length computation. (bmsx): Combine QImode and HImode H8/SX patterns using iterator. 2021-06-08 Richard Biener PR tree-optimization/100923 * tree-ssa-sccvn.c (valueize_refs_1): Take a pointer to the operand vector to be valueized. (valueize_refs): Likewise. (valueize_shared_reference_ops_from_ref): Adjust. (valueize_shared_reference_ops_from_call): Likewise. (vn_reference_lookup_3): Likewise. (vn_reference_lookup_pieces): Likewise. Re-valueize with honoring availability when we are about to create the ao_ref and valueized before. (vn_reference_lookup): Likewise. (vn_reference_insert_pieces): Adjust. 2021-06-08 Richard Biener * tree-vectorizer.h (_slp_instance::root_stmt): Change to... (_slp_instance::root_stmts): ... a vector. (SLP_INSTANCE_ROOT_STMT): Rename to ... (SLP_INSTANCE_ROOT_STMTS): ... this. (slp_root::root): Change to... (slp_root::roots): ... a vector. (slp_root::slp_root): Adjust. * tree-vect-slp.c (_slp_instance::location): Adjust. (vect_free_slp_instance): Release the root stmt vector. (vect_build_slp_instance): Adjust. (vect_analyze_slp): Likewise. (_bb_vec_info::~_bb_vec_info): Likewise. (vect_slp_analyze_operations): Likewise. (vect_bb_vectorization_profitable_p): Likewise. Adjust costs for the root stmt. (vect_slp_check_for_constructors): Gather all BIT_INSERT_EXPRs as root stmts. (vect_slp_analyze_bb_1): Simplify by marking all root stmts as pure_slp. (vectorize_slp_instance_root_stmt): Adjust. (vect_schedule_slp): Likewise. 2021-06-08 Aldy Hernandez * gimple-ssa-evrp.c (class ssa_equiv_stack): New. (ssa_equiv_stack::ssa_equiv_stack): New. (ssa_equiv_stack::~ssa_equiv_stack): New. (ssa_equiv_stack::enter): New. (ssa_equiv_stack::leave): New. (ssa_equiv_stack::push_replacement): New. (ssa_equiv_stack::get_replacement): New. (is_pointer_ssa): New. (class pointer_equiv_analyzer): New. (pointer_equiv_analyzer::pointer_equiv_analyzer): New. (pointer_equiv_analyzer::~pointer_equiv_analyzer): New. (pointer_equiv_analyzer::set_global_equiv): New. (pointer_equiv_analyzer::set_cond_equiv): New. (pointer_equiv_analyzer::get_equiv): New. (pointer_equiv_analyzer::enter): New. (pointer_equiv_analyzer::leave): New. (pointer_equiv_analyzer::get_equiv_expr): New. (pta_valueize): New. (pointer_equiv_analyzer::visit_stmt): New. (pointer_equiv_analyzer::visit_edge): New. (hybrid_folder::value_of_expr): Call PTA. (hybrid_folder::value_on_edge): Same. (hybrid_folder::pre_fold_bb): New. (hybrid_folder::post_fold_bb): New. (hybrid_folder::pre_fold_stmt): New. (rvrp_folder::pre_fold_bb): New. (rvrp_folder::post_fold_bb): New. (rvrp_folder::pre_fold_stmt): New. (rvrp_folder::value_of_expr): Call PTA. (rvrp_folder::value_on_edge): Same. 2021-06-08 Jakub Jelinek PR c++/100957 * tree-inline.c (copy_tree_body_r): For OMP_CLAUSE_DEPEND don't check TREE_CODE if OMP_CLAUSE_DECL is NULL. 2021-06-08 Richard Biener PR middle-end/100951 * tree-vect-generic.c (expand_vector_piecewise): Build a VECTOR_CST if all elements are constant. (expand_vector_condition): Likewise. (lower_vec_perm): Likewise. (expand_vector_conversion): Likewise. 2021-06-08 Martin Liska * doc/invoke.texi: Document new param evrp-sparse-threshold. 2021-06-08 Martin Liska * genautomata.c (create_automata): Fix typo. 2021-06-08 Kewen Lin PR tree-optimization/100794 * tree-predcom.c (tree_predictive_commoning_loop): Add parameter allow_unroll_p and only allow unrolling when it's true. (tree_predictive_commoning): Add parameter allow_unroll_p and adjust for it. (run_tree_predictive_commoning): Likewise. (pass_predcom::gate): Check flag_tree_loop_vectorize and global_options_set.x_flag_predictive_commoning. (pass_predcom::execute): Adjust for allow_unroll_p. 2021-06-08 Kewen Lin * tree-predcom.c (execute_pred_commoning): Remove update_ssa call. (tree_predictive_commoning_loop): Factor some cleanup stuffs into lambda function cleanup, remove scev_reset call, and adjust return value. (tree_predictive_commoning): Adjust for different changed values, only set flag TODO_update_ssa_only_virtuals if changed. (pass_data pass_data_predcom): Remove TODO_update_ssa_only_virtuals from todo_flags_finish. 2021-06-07 Andrew MacLeod * gimple-range-cache.cc (class sbr_sparse_bitmap): New. (sbr_sparse_bitmap::sbr_sparse_bitmap): New. (sbr_sparse_bitmap::bitmap_set_quad): New. (sbr_sparse_bitmap::bitmap_get_quad): New. (sbr_sparse_bitmap::set_bb_range): New. (sbr_sparse_bitmap::get_bb_range): New. (sbr_sparse_bitmap::bb_range_p): New. (block_range_cache::block_range_cache): initialize bitmap obstack. (block_range_cache::~block_range_cache): Destruct obstack. (block_range_cache::set_bb_range): Decide when to utilze the sparse on entry cache. * gimple-range-cache.h (block_range_cache): Add bitmap obstack. * params.opt (-param=evrp-sparse-threshold): New. 2021-06-07 Andrew MacLeod * bitmap.c (bitmap_set_aligned_chunk): New. (bitmap_get_aligned_chunk): New. (test_aligned_chunk): New. (bitmap_c_tests): Call test_aligned_chunk. * bitmap.h (bitmap_set_aligned_chunk, bitmap_get_aligned_chunk): New. 2021-06-07 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): Handle V4QI mode. (ix86_expand_vector_init_one_nonzero): Ditto. (ix86_expand_vector_init_one_var): Ditto. (ix86_expand_vector_init_general): Ditto. * config/i386/mmx.md (vec_initv4qiqi): New expander. 2021-06-07 Jeff Law * config/h8300/movepush.md: Change most _clobber_flags patterns to instead use subst. (movsi_cczn): New pattern with usable CC cases split out. (movsi_h8sx_cczn): Likewise. 2021-06-07 Martin Liska * common/common-target.def: Split long lines and replace them with '\n\'. * target.def: Likewise. * doc/tm.texi: Re-generated. 2021-06-07 Jakub Jelinek PR target/100887 * fold-const.c (fold_read_from_vector): Return NULL if trying to read from a CONSTRUCTOR with vector type elements. 2021-06-07 Jakub Jelinek PR middle-end/100898 * tree-inline.c (copy_bb): Only use gimple_call_arg_ptr if memcpy should copy any arguments. Don't call gimple_call_num_args on id->call_stmt or call_stmt more than once. 2021-06-07 liuhongt PR target/100885 * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3): Refine constraints. (v4siv4di2): Delete constraints for define_expand. 2021-06-07 liuhongt PR target/82735 * config/i386/i386-expand.c (ix86_expand_builtin): Remove assignment of cfun->machine->has_explicit_vzeroupper. * config/i386/i386-features.c (ix86_add_reg_usage_to_vzerouppers): Delete. (ix86_add_reg_usage_to_vzeroupper): Ditto. (rest_of_handle_insert_vzeroupper): Remove ix86_add_reg_usage_to_vzerouppers, add df_analyze at the end of the function. (gate): Remove cfun->machine->has_explicit_vzeroupper. * config/i386/i386-protos.h (ix86_expand_avx_vzeroupper): Declared. * config/i386/i386.c (ix86_insn_callee_abi): New function. (ix86_initialize_callee_abi): Ditto. (ix86_expand_avx_vzeroupper): Ditto. (ix86_hard_regno_call_part_clobbered): Adjust for vzeroupper ABI. (TARGET_INSN_CALLEE_ABI): Define as ix86_insn_callee_abi. (ix86_emit_mode_set): Call ix86_expand_avx_vzeroupper directly. * config/i386/i386.h (struct GTY(()) machine_function): Delete has_explicit_vzeroupper. * config/i386/i386.md (enum unspec): New member UNSPEC_CALLEE_ABI. (ABI_DEFAULT,ABI_VZEROUPPER,ABI_UNKNOWN): New define_constants for insn callee abi index. * config/i386/predicates.md (vzeroupper_pattern): Adjust. * config/i386/sse.md (UNSPECV_VZEROUPPER): Deleted. (avx_vzeroupper): Call ix86_expand_avx_vzeroupper. (*avx_vzeroupper): Rename to .. (avx_vzeroupper_callee_abi): .. this, and adjust pattern as call_insn which has a special vzeroupper ABI. (*avx_vzeroupper_1): Deleted. 2021-06-07 liuhongt PR target/82735 * df-scan.c (df_get_call_refs): When call_insn is a fake call, it won't use stack pointer reg. * final.c (leaf_function_p): When call_insn is a fake call, it won't affect caller as a leaf function. * reg-stack.c (callee_clobbers_any_stack_reg): New. (subst_stack_regs): When call_insn doesn't clobber any stack reg, don't clear the arguments. * rtl.c (shallow_copy_rtx): Don't clear flag used when orig is a insn. * shrink-wrap.c (requires_stack_frame_p): No need for stack frame for a fake call. * rtl.h (FAKE_CALL_P): New macro. 2021-06-06 Eric Botcazou * config/sparc/sparc-protos.h (order_regs_for_local_alloc): Rename to... (sparc_order_regs_for_local_alloc): ...this. (sparc_leaf_reg_remap): Declare. * config/sparc/sparc.h (ADJUST_REG_ALLOC_ORDER): Adjust. (LEAF_REG_REMAP): Reimplement as call to sparc_leaf_reg_remap. * config/sparc/sparc.c (leaf_reg_remap): Delete. (order_regs_for_local_alloc): Rename to... (sparc_order_regs_for_local_alloc): ...this. (sparc_leaf_reg_remap): New function. (sparc_conditional_register_usage): Do not modify leaf_reg_remap. 2021-06-06 David Edelsohn * config/rs6000/rs6000.c (rs6000_xcoff_asm_output_aligned_decl_common): Use assemble_name to output BSS section name. 2021-06-06 Uroš Bizjak * config/i386/constraints.md (Bs): Remove boolean operators from match_test RTX. (Bw): Ditto. (L): Ditto. (M): Use "mode" variable instead of GET_MODE (op) in match_test RTX. (Wz): Ditto. 2021-06-06 Martin Liska * doc/extend.texi: Add missing @headitem. * doc/invoke.texi: Likewise. * doc/objc.texi: Likewise. 2021-06-06 Martin Liska * genhooks.c (emit_findices): Remove unused function. (emit_documentation): Do not call emit_findices and do not search for @Fcode directives. 2021-06-06 Martin Liska * doc/invoke.texi: Remove extra character. 2021-06-05 Kewen Lin * config/sh/sh.md (doloop_end_split): Fix empty split condition. 2021-06-05 Kewen Lin * config/sparc/sparc.md (*snedi_zero_vis3, *neg_snedi_zero_subxc, *plus_snedi_zero, *plus_plus_snedi_zero, *minus_snedi_zero, *minus_minus_snedi_zero): Fix empty split condition. 2021-06-05 Kewen Lin * config/or1k/or1k.md (*movdi): Fix empty split condition. 2021-06-05 Kewen Lin * config/mips/mips.md (, bswapsi2, bswapdi2): Fix empty split condition. 2021-06-05 Kewen Lin * config/m68k/m68k.md (*zero_extend_inc, *zero_extend_dec, *zero_extendsidi2): Fix empty split condition. 2021-06-05 Jeff Law * config/h8300/addsub.md: Fix split condition in define_insn_and_split patterns. * config/h8300/bitfield.md: Likewise. * config/h8300/combiner.md: Likewise. * config/h8300/divmod.md: Likewise. * config/h8300/extensions.md: Likewise. * config/h8300/jumpcall.md: Likewise. * config/h8300/movepush.md: Likewise. * config/h8300/multiply.md: Likewise. * config/h8300/other.md: Likewise. * config/h8300/shiftrotate.md: Likewise. * config/h8300/logical.md: Likewise. Fix split pattern to use code iterator that somehow slipped through. 2021-06-04 Tobias Burnus PR middle-end/100905 * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_BIND. 2021-06-04 Martin Sebor PR middle-end/100732 * gimple-fold.c (gimple_fold_builtin_sprintf): Avoid folding calls with either source or destination argument of invalid type. * tree-ssa-uninit.c (maybe_warn_pass_by_reference): Avoid checking calls with arguments of invalid type. 2021-06-04 Martin Sebor * attribs.c (init_attr_rdwr_indices): Use VLA bounds in the expected order. (attr_access::vla_bounds): Also handle VLA bounds. 2021-06-04 Uroš Bizjak * config/i386/predicates.md (GOT_memory_operand): Implement using match_code RTXes. (GOT32_symbol_operand): Ditto. 2021-06-04 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_vector_init_duplicate): Handle V2HI mode. (ix86_expand_vector_init_general): Ditto. Use SImode instead of word_mode for logic operations when GET_MODE_SIZE (mode) < UNITS_PER_WORD. (expand_vec_perm_even_odd_1): Assert that V2HI mode should be implemented by expand_vec_perm_1. (expand_vec_perm_broadcast_1): Assert that V2HI and V4HI modes should be implemented using standard shuffle patterns. (ix86_vectorize_vec_perm_const): Handle V2HImode. Add V4HI and V2HI modes to modes, implementable with shuffle for one operand. * config/i386/mmx.md (*punpckwd): New insn_and_split pattern. (*pshufw_1): New insn pattern. (*vec_dupv2hi): Ditto. (vec_initv2hihi): New expander. 2021-06-04 Kewen Lin * config/arm/vfp.md (no_literal_pool_df_immediate, no_literal_pool_sf_immediate): Fix empty split condition. 2021-06-04 Kewen Lin * config/i386/i386.md (*load_tp_x32_zext, *add_tp_x32_zext, *tls_dynamic_gnu2_combine_32): Fix empty split condition. * config/i386/sse.md (*_pmovmskb_lt, *_pmovmskb_zext_lt, *sse2_pmovmskb_ext_lt, *_pblendvb_lt): Likewise. 2021-06-04 Jakub Jelinek PR target/100887 * config/i386/i386-expand.c (ix86_expand_vector_init): Handle concatenation from half-sized modes with TImode elements. 2021-06-04 Claudiu Zissulescu * config/arc/arc.c (arc_override_options): Disable millicode thunks when RF16 is on. 2021-06-04 Haochen Gui * config/rs6000/rs6000.h (PROMOTE_MODE): Remove. 2021-06-04 Haochen Gui * config/rs6000/rs6000-call.c (rs6000_promote_function_mode): Replace PROMOTE_MODE marco with its content. 2021-06-03 Kewen Lin * config/cris/cris.md (*addi_reload): Fix empty split condition. 2021-06-03 Jim Wilson * config.gcc (riscv*-*-*): If --with-riscv-attribute not used, turn it on for all riscv targets. 2021-06-03 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_vector_set): Handle V2HI and V4QI modes. (ix86_expand_vector_extract): Ditto. * config/i386/mmx.md (*pinsrw): New insn pattern. (*pinsrb): Ditto. (*pextrw): Ditto. (*pextrw_zext): Ditto. (*pextrb): Ditto. (*pextrb_zext): Ditto. (vec_setv2hi): New expander. (vec_extractv2hihi): Ditto. (vec_setv4qi): Ditto. (vec_extractv4qiqi): Ditto. (vec_setv8qi): Enable only for TARGET_SSE4_1. (vec_extractv8qiqi): Ditto. 2021-06-03 Aaron Sawdey * config/rs6000/genfusion.pl (gen_logical_addsubf): Fix input order to subf instruction. * config/rs6000/fusion.md: Regenerate. 2021-06-03 Aldy Hernandez * calls.c (get_size_range): Use range_of_expr instead of determine_value_range. * tree-affine.c (expr_to_aff_combination): Same. * tree-data-ref.c (split_constant_offset): Same. * tree-vrp.c (determine_value_range_1): Remove. (determine_value_range): Remove. * tree-vrp.h (determine_value_range): Remove. 2021-06-03 Aldy Hernandez * function-tests.c (test_ranges): Call gimple_range_tests. * gimple-range-cache.cc (ranger_cache::range_of_expr): Pass stmt to get_tree_range. * gimple-range.cc (fur_source::get_operand): Do not call get_tree_range or gimple_range_global. get_tree_range. (get_tree_range): Move to value-query.cc. Call get_arith_expr_range. (gimple_ranger::range_of_expr): Add argument to get_tree_range. Include gimple-range-tests.cc. * gimple-range.h (fold_range): Add argument. (get_tree_range): Remove. * selftest.h (gimple_range_tests): New. * value-query.cc (global_range_query::range_of_expr): Add stmt argument. (range_query::get_tree_range): Move from gimple-range.cc. * value-query.h (class range_query): Add get_tree_range and get_arith_expr_range. Make fur_source a friend. * vr-values.c (vr_values::range_of_expr): Pass stmt to get_tree_range. * gimple-range-tests.cc: New file. 2021-06-03 Aldy Hernandez * gimple-range.cc (gimple_ranger::export_global_ranges): Call update_global_range. * value-query.cc (update_global_range): New. * value-query.h (update_global_range): New. 2021-06-03 David Malcolm * diagnostic-show-locus.c (diagnostic_show_locus): Don't reject printing the same location twice if there are fix-it hints, multiple locations, or a label. 2021-06-03 Andre Vieira * tree-vect-loop.c (vect_transform_loop): Use main loop's various' thresholds to narrow the upper bound on epilogue iterations. 2021-06-03 Christophe Lyon * config/arm/mve.md (mve_vabsq_f): Use 'abs' instead of unspec. (mve_vabsq_s): Likewise. * config/arm/neon.md (abs2): Rename to neon_abs2. * config/arm/unspecs.md (VABSQ_F, VABSQ_S): Delete. * config/arm/vec-common.md (neg2): Rename to 2. 2021-06-03 Claudiu Zissulescu * common/config/arc/arc-common.c (arc_option_optimization_table): Remove malign-call. * config/arc/arc.c (arc_unalign_branch_p): Remove unused function. * config/arc/arc.h (TARGET_MIXED_CODE): Remove macro. (INDEX_REG_CLASS): Only refer to GENERAL_REGS. * config/arc/arc.md (abssi2_mixed): Remove pattern. * config/arc/arc.opt (munalign-prob-threshold): Mark it obsolete. (malign-call): Likewise. (mmixed-code): Likewise. * doc/invoke.texi (ARC): Update doc. 2021-06-03 Martin Liska * common.opt: Use proper Enum values. * opts.c (COVERAGE_SANITIZER_OPT): Remove. (parse_sanitizer_options): Handle only sanitizer_opts. (common_handle_option): Just assign value. 2021-06-03 Eric Botcazou PR ipa/99122 * tree-inline.c (inline_forbidden_p): Remove test on return type. 2021-06-03 Eric Botcazou * dwarf2out.c (loc_list_from_tree_1) : Also generate DW_OP_GNU_variable_value referencing an existing DIE at file scope. (type_byte_size): Inline into... (add_byte_size_attribute): ...this and call add_scalar_info. 2021-06-03 Eric Botcazou * dwarf2out.c (mem_loc_descriptor) : Fix typo. (typed_binop_from_tree): New function. (loc_list_from_tree_1) : For an unsigned type, turn a divide by a power of 2 into a shift. : For an unsigned type, use a signed divide if the size of the mode is lower than DWARF2_ADDR_SIZE; otherwise, do a typed divide by calling typed_binop_from_tree. 2021-06-03 Eric Botcazou * dwarf2out.c (scompare_loc_descriptor): Fix head comment. (is_handled_procedure_type): Likewise. (struct loc_descr_context): Add strict_signedness field. (resolve_args_picking_1): Deal with DW_OP_[GNU_]deref_type, DW_OP_[GNU_]convert and DW_OP_[GNU_]reinterpret. (resolve_args_picking): Minor tweak. (function_to_dwarf_procedure): Initialize strict_signedness field. (type_byte_size): Likewise. (field_byte_offset): Likewise. (gen_descr_array_type_die): Likewise. (gen_variant_part): Likewise. (loc_list_from_tree_1) : Tidy up and set strict_signedness to true when a context is present before evaluating the arguments. : Do not generate a useless comparison with zero. When dereferencing an address, if strict_signedness is true and the type is small and signed, use DW_OP_deref_type to do the dereference and then DW_OP_convert to convert back to the generic type. 2021-06-03 Jakub Jelinek PR c++/100859 * tree-inline.c (copy_tree_body_r): Handle iterators on OMP_CLAUSE_AFFINITY or OMP_CLAUSE_DEPEND. 2021-06-03 Kewen Lin * config/arc/arc.md (*bbit_di): Remove. 2021-06-02 Christoph Muellner PR rtl-optimization/100264 * ree.c (get_sub_rtx): Ignore SET expressions without register destinations and remove assertion, as it is not valid anymore with this new behaviour. (merge_def_and_ext): Eliminate destination check for register as such SET expressions can't occur anymore. (combine_reaching_defs): Likewise. 2021-06-02 Jakub Jelinek PR target/100841 * config/xtensa/xtensa.h (LEAF_REG_REMAP): Cast REGNO to int to avoid -Wtype-limits warnings. (DWARF_FRAME_REGISTER): Rewrite into ternary operator with addition in operands to avoid -Wsign-compare warnings. 2021-06-02 Pat Haugen * config/rs6000/rs6000-logue.c (rs6000_emit_prologue): Use gen_frame_store. 2021-06-02 Vineet Gupta * config/arc/arc.h (TARGET_CPU_DEFAULT): Change to hs38_linux. 2021-06-02 Ilya Leoshkevich * config/s390/s390.md(*ashrdi3_31): Use a single constraint. * config/s390/subst.md(cconly_subst): Use a single constraint in (match_scratch). 2021-06-02 Martin Liska * ipa-icf.h: Use auto_vec for memory_access_types. 2021-06-02 Jeff Law * config/h8300/h8300-protos.h (compute_a_shift_length): Drop unused argument from prototype. (output_logical_op): Add rtx_code argument. (compute_logical_op_length): Likewise. * config/h8300/h8300.c (h8300_and_costs): Pass additional argument to compute_a_shift_length. (output_logical_op); New argument with the rtx code rather than extracting it from an operand. Handle QImode too. (compute_logical_op_length): Similary. (compute_a_shift_length): Drop unused argument. * config/h8300/h8300.md (logicals): New code iterator. * config/h8300/logical.md (3 expander): Combine the "and" expander with the "ior"/"xor" expander. (bclrmsx): Combine the QI/HI mode patterns. (3 insns): Use code iterator rather than match_operator. Handle QImode as well. Update call to output_logical_op and compute_logical_op_length to pass in rtx_code Fix split condition on all define_insn_and_split patterns. (one_cmpl2): Use to support both clobbering the flags and setting ZN via existing define_subst. * config/h8300/shiftrotate.md: Drop unused argument from calls to compute_a_shift_length. Signed-off-by: Jeff Law 2021-06-01 Andrew Pinski PR tree-optimization/25290 * tree-ssa-phiopt.c (match_simplify_replacement): New function. (tree_ssa_phiopt_worker): Use match_simplify_replacement. (two_value_replacement): Change the comment about conditional_replacement. (conditional_replacement): Delete. 2021-06-01 Andrew Pinski PR tree-optimization/95481 * tree-tailcall.c (find_tail_calls): Handle empty typed return decls. 2021-06-01 Andrew Pinski * gimplify.c (zero_sized_field_decl): Delete (zero_sized_type): Delete (gimplify_init_ctor_eval): Use is_empty_type instead of zero_sized_field_decl. (gimplify_modify_expr): Use is_empty_type instead of zero_sized_type. 2021-06-01 Jason Merrill PR c++/91859 * tree.h (CALL_FROM_NEW_OR_DELETE_P): Adjust comment. 2021-06-01 Jason Merrill PR c++/94492 * diagnostic.h (warning_enabled_at): Declare. * diagnostic.c (diagnostic_enabled): Factor out from... (diagnostic_report_diagnostic): ...here. (warning_enabled_at): New. 2021-06-01 Aldy Hernandez * gimple-ssa-evrp.c: Enable exporting of global ranges. 2021-06-01 Martin Liska PR other/100826 * doc/invoke.texi: Mention that -fgcse-after-reload is enabled with -O3. 2021-06-01 liuhongt PR tree-optimization/98365 * tree-if-conv.c (strip_nop_cond_scalar_reduction): New function. (is_cond_scalar_reduction): Handle nop_expr in cond scalar reduction. (convert_scalar_cond_reduction): Ditto. (predicate_scalar_phi): Ditto. 2021-06-01 Andrew MacLeod PR tree-optimization/100781 * gimple-range-cache.cc (ranger_cache::ranger_cache): Enable new value calculation by default. (ranger_cache::enable_new_values): New. (ranger_cache::disable_new_values): New. (ranger_cache::push_poor_value): Check if new values are allowed. * gimple-range-cache.h (class ranger_cache): New member/methods. * gimple-range.cc (gimple_ranger::range_of_expr): Check for debug statement, and disable/renable new value calculation. 2021-06-01 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ssa_range_in_bb): Delete. (ranger_cache::range_of_def): New. (ranger_cache::entry_range): New. (ranger_cache::exit_range): New. (ranger_cache::range_of_expr): Adjust. (ranger_cache::range_on_edge): Adjust. (ranger_cache::propagate_cache): Call exit_range directly. * gimple-range-cache.h (class ranger_cache): Adjust. 2021-06-01 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Adjust for gori_compute being a member rather than base class. dervied call to member call. (ranger_cache::dump): No longer dump gori_map. (ranger_cache::dump_bb): New. (ranger_cache::get_non_stale_global_range): Adjust for gori_compute being a member rather than base class. (ranger_cache::set_global_range): Ditto. (ranger_cache::ssa_range_in_bb): Ditto. (ranger_cache::range_of_expr): New. (ranger_cache::range_on_edge): New. (ranger_cache::block_range): Adjust for gori_computes. Debug changes. (ranger_cache::propagate_cache): Adjust debugging output. (ranger_cache::fill_block_cache): Adjust for gori_computes. Debug output changes. * gimple-range-cache.h (class ranger_cache): Make gori_compute a member, and inherit from range_query instead. (ranger_cache::dump_bb): New. split from dump. * gimple-range-gori.cc (gori_compute::ssa_range_in_bb): Delete. (gori_compute::expr_range_at_stmt): Delete. (gori_compute::compute_name_range_op): Delete. (gori_compute::compute_operand_range_switch): Add fur_source. (gori_compute::compute_operand_range): Add fur_source param, inline old compute_name_range_op and optimize_logical_operands. (struct tf_range): Delete. (gori_compute::logical_combine): Adjust (gori_compute::optimize_logical_operands): Delete. (gori_compute::compute_logical_operands_in_chain): Delete. (gori_compute::compute_logical_operands): Adjust. (gori_compute::compute_operand1_range): Adjust to fur_source. (gori_compute::compute_operand2_range): Ditto. (gori_compute::compute_operand1_and_operand2_range): Ditto. (gori_compute::outgoing_edge_range_p): Add range_query parameter, and adjust to fur_source. * gimple-range-gori.h (class gori_compute): Simplify and adjust to range_query and fur_source. * gimple-range.cc (gimple_ranger::range_on_edge): Query range_on_edge from the ranger_cache.. (gimple_ranger::fold_range_internal): Adjust to base class change of ranger_cache. (gimple_ranger::dump_bb): Adjust dump. * gimple-range.h (gimple_ranger):export gori computes object. 2021-06-01 Andrew MacLeod PR tree-optimization/100774 * gimple-range-cache.cc (ranger_cache::get_non_stale_global_range): Constant values are also not stale. (ranger_cache::set_global_range): Range invariant values should also have the correct timestamp. 2021-05-31 Martin Liska * tree-streamer-in.c (unpack_ts_function_decl_value_fields): Unpack FUNCTION_DECL_DECL_TYPE. * tree-streamer-out.c (pack_ts_function_decl_value_fields): Stream FUNCTION_DECL_DECL_TYPE instead of DECL_IS_OPERATOR_NEW_P. * tree.h (set_function_decl_type): Use FUNCTION_DECL_DECL_TYPE macro. (DECL_IS_OPERATOR_NEW_P): Likewise. (DECL_IS_OPERATOR_DELETE_P): Likewise. (DECL_LAMBDA_FUNCTION_P): Likewise. 2021-05-31 Richard Biener PR c++/88601 * internal-fn.c (expand_SHUFFLEVECTOR): Define. * internal-fn.def (SHUFFLEVECTOR): New. * internal-fn.h (expand_SHUFFLEVECTOR): Declare. * doc/extend.texi: Document __builtin_shufflevector. 2021-05-31 Peter Bergner PR target/99842 * config/rs6000/predicates.md(mma_assemble_input_operand): Allow indexed form addresses. 2021-05-29 Jeff Law * config/h8300/h8300.c (h8300_emit_stack_adjustment): Drop unused parameter. Call callers fixed. (push): Likewise. (output_plussi): Add FALLTHRU markers. (h8300_shift_needs_scratch_p): Add gcc_unreachable marker. 2021-05-29 Jakub Jelinek PR middle-end/99928 * gimplify.c (gimplify_scan_omp_clauses): For taskloop simd combined with parallel, make sure to add shared clause to parallel for explicit linear clause. 2021-05-29 Aldy Hernandez PR tree-optimization/100787 * gimple-ssa-evrp.c: Disable exporting of global ranges. 2021-05-28 Jason Merrill * tree-iterator.h (struct tree_stmt_iterator): Add operator++, operator--, operator*, operator==, and operator!=. (class tsi_range): New. 2021-05-28 Richard Biener PR tree-optimization/100778 * tree-vect-slp.c (vect_build_slp_tree_1): Prevent possibly trapping ops in different BBs. 2021-05-28 Richard Biener PR ipa/100791 * tree-inline.c (copy_bb): When processing __builtin_va_arg_pack copy fntype from original call. 2021-05-28 Martin Liska PR gcov-profile/100751 * doc/gcov.texi: Revert partially a hunk that was wrong. 2021-05-28 Cooper Qu * config/csky/csky-linux-elf.h (HAVE_sync_compare_and_swapqi): Defined. (HAVE_sync_compare_and_swaphi): Likewise. (HAVE_sync_compare_and_swapsi): Likewise. 2021-05-28 Jakub Jelinek PR middle-end/99928 * tree.h (OMP_CLAUSE_MAP_IMPLICIT): Define. 2021-05-28 Tobias Burnus * gimplify.c (gimplify_omp_affinity): New. (gimplify_scan_omp_clauses): Call it; remove affinity clause afterwards. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_AFFINITY. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_AFFINITY. * tree.c (omp_clause_num_ops, omp_clause_code_name): Add clause. (walk_tree_1): Handle OMP_CLAUSE_AFFINITY. 2021-05-28 Joern Rennecke Richard Biener * match.pd : When generating popcount directly fails, try doing it in two halves. 2021-05-28 Bernd Edlinger * Makefile.in (generated_files): Add gimple-match.c and generic-match.c 2021-05-28 Joern Rennecke * gensupport.c (alter_predicate_for_insn): Handle MATCH_DUP. 2021-05-28 Joern Rennecke * gensupport.c (alter_constraints): Add MATCH_SCRATCH case. 2021-05-28 Kewen Lin PR tree-optimization/99398 * tree-ssa-forwprop.c (simplify_permutation): Optimize some cases where the fed operands are CTOR/CST and propagated through VIEW_CONVERT_EXPR. Call vec_perm_indices::new_shrunk_vector. * vec-perm-indices.c (vec_perm_indices::new_shrunk_vector): New function. * vec-perm-indices.h (vec_perm_indices::new_shrunk_vector): New declare. 2021-05-27 Uroš Bizjak * config/i386/mmx.md (addv2sf3): Do not call ix86_fixup_binary_operands_no_copy. (subv2sf3): Ditto. (mulv2sf3): Ditto. (v2sf3): Ditto. (3): Ditto. (3): Remove expander. (3): Rename from "*3". (mulv4hi): Do not call ix86_fixup_binary_operands_no_copy. (mulv2hi3): Remove expander. (mulv2hi3): Rename from *mulv2hi3. (mulv2hi3_highpart): Remove expander. (mulv2hi3_highpart): Rename from *mulv2hi3_highpart. (3): Rename from "*mmx_3". (3): Remove expander. (SMAXMIN_MMXMODEI): Remove mode iterator. (v4hi3): New expander. (v4qi3): Rename from *v4qi3. (v2hi3): Rename from *v2hi3. (3): Remove expander. (SMAXMIN_VI_32): Remove mode iterator. (3): Rename from "*mmx_3". (3): Remove expander. (UMAXMIN_MMXMODEI): Remove mode iterator. (v8qi3): New expander. (v4qi3): Rename from *v4qi3. (v2hi3): Rename from *v2hi3. (3): Remove expander. (UMAXMIN_VI_32): Remove mode iterator. (v2hi3): Remove expander. (v2hi3): Rename from *v2hi3. (3): Do not call ix86_fixup_binary_operands_no_copy. (3): Remove expander. (3): Rename from "*3". (uavg3_ceil): Do not call ix86_fixup_binary_operands_no_copy. * config/i386/sse.md (div3): Do not call ix86_fixup_binary_operands_no_copy. (div3): Ditto. (3): Ditto. (smulhrsv4hi3): Ditto. (smulhrsv2hi3): Ditto. 2021-05-27 Martin Sebor * ggc.h (gt_ggc_mx): Add overloads for all integers. (gt_pch_nx): Same. * hash-map.h (class hash_map): Add pch_nx_helper overloads for all integers. (hash_map::operator==): New function. 2021-05-27 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_int_sse_cmp): For TARGET_XOP bypass SSE comparisons for all supported vector modes. * config/i386/mmx.md (*xop_maskcmp3): New insn pattern. (*xop_maskcmp3): Ditto. (*xop_maskcmp_uns3): Ditto. (*xop_maskcmp_uns3): Ditto. 2021-05-27 Richard Earnshaw PR target/100767 * config/arm/arm.c (arm_configure_build_target): Remove parameter opts_set, directly check opts parameters for being non-null. (arm_option_restore): Update call to arm_configure_build_target. (arm_option_override): Likewise. (arm_can_inline_p): Likewise. (arm_valid_target_attribute_tree): Likewise. * config/arm/arm-c.c (arm_pragma_target_parse): Likewise. * config/arm/arm-protos.h (arm_configure_build_target): Adjust prototype. 2021-05-27 Aldy Hernandez * vr-values.c (simplify_conversion_using_ranges): Use get_range_query instead of get_global_range_query. 2021-05-27 Aldy Hernandez * gimple-range.cc (get_range_global): Move to value-query.cc. (gimple_range_global): Same. (get_global_range_query): Same. (global_range_query::range_of_expr): Same. * gimple-range.h (class global_range_query): Move to value-query.h. (gimple_range_global): Same. * tree-ssanames.c (get_range_info): Move to value-query.cc. (get_ptr_nonnull): Same. * tree-ssanames.h (get_range_info): Remove. (get_ptr_nonnull): Remove. * value-query.cc (get_ssa_name_range_info): Move from tree-ssanames.c. (get_ssa_name_ptr_info_nonnull): Same. (get_range_global): Move from gimple-range.cc. (gimple_range_global): Same. (get_global_range_query): Same. (global_range_query::range_of_expr): Same. * value-query.h (class global_range_query): Move from gimple-range.h. (gimple_range_global): Same. 2021-05-27 Uroš Bizjak PR target/100637 * config/i386/mmx.md (uavgv4qi3_ceil): New insn pattern. (uavgv2hi3_ceil): Ditto. 2021-05-26 Eric Botcazou PR c/100653 * doc/extend.texi (scalar_storage_order): Rephrase slightly. 2021-05-26 Aldy Hernandez * tree-ssanames.c (get_range_info): Merge both copies of get_range_info into one that works with irange. * tree-ssanames.h (get_range_info): Remove version that works on wide_ints. 2021-05-26 Aldy Hernandez * builtins.c (check_nul_terminated_array): Convert to get_range_query. (expand_builtin_strnlen): Same. (determine_block_size): Same. * fold-const.c (expr_not_equal_to): Same. * gimple-fold.c (size_must_be_zero_p): Same. * gimple-match-head.c: Include gimple-range.h. * gimple-pretty-print.c (dump_ssaname_info): Convert to get_range_query. * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): Same. * graphite-sese-to-poly.c (add_param_constraints): Same. * internal-fn.c (get_min_precision): Same. * ipa-fnsummary.c (set_switch_stmt_execution_predicate): Same. * ipa-prop.c (ipa_compute_jump_functions_for_edge): Same. * match.pd: Same. * tree-data-ref.c (split_constant_offset): Same. (dr_step_indicator): Same. * tree-dfa.c (get_ref_base_and_extent): Same. * tree-scalar-evolution.c (iv_can_overflow_p): Same. * tree-ssa-loop-niter.c (refine_value_range_using_guard): Same. (determine_value_range): Same. (record_nonwrapping_iv): Same. (infer_loop_bounds_from_signedness): Same. (scev_var_range_cant_overflow): Same. * tree-ssa-phiopt.c (two_value_replacement): Same. * tree-ssa-pre.c (insert_into_preds_of_block): Same. * tree-ssa-reassoc.c (optimize_range_tests_to_bit_test): Same. * tree-ssa-strlen.c (handle_builtin_stxncpy_strncat): Same. (get_range): Same. (dump_strlen_info): Same. (set_strlen_range): Same. (maybe_diag_stxncpy_trunc): Same. (get_len_or_size): Same. (handle_integral_assign): Same. * tree-ssa-structalias.c (find_what_p_points_to): Same. * tree-ssa-uninit.c (find_var_cmp_const): Same. * tree-switch-conversion.c (bit_test_cluster::emit): Same. * tree-vect-patterns.c (vect_get_range_info): Same. (vect_recog_divmod_pattern): Same. * tree-vrp.c (intersect_range_with_nonzero_bits): Same. (register_edge_assert_for_2): Same. (determine_value_range_1): Same. * tree.c (get_range_pos_neg): Same. * vr-values.c (vr_values::get_lattice_entry): Same. (vr_values::update_value_range): Same. (simplify_conversion_using_ranges): Same. 2021-05-26 Aldy Hernandez * gimple-ssa-warn-alloca.c (alloca_call_type): Use get_range_query instead of query argument. (pass_walloca::execute): Enable and disable global ranger. 2021-05-26 Aldy Hernandez * gimple-ssa-evrp.c (rvrp_folder::rvrp_folder): Call enable_ranger. (rvrp_folder::~rvrp_folder): Call disable_ranger. (hybrid_folder::hybrid_folder): Call enable_ranger. (hybrid_folder::~hybrid_folder): Call disable_ranger. 2021-05-26 Aldy Hernandez * function.c (allocate_struct_function): Set cfun->x_range_query. * function.h (struct function): Declare x_range_query. (get_range_query): New. (get_global_range_query): New. * gimple-range-cache.cc (ssa_global_cache::ssa_global_cache): Remove call to safe_grow_cleared. * gimple-range.cc (get_range_global): New. (gimple_range_global): Move from gimple-range.h. (get_global_range_query): New. (global_range_query::range_of_expr): New. (enable_ranger): New. (disable_ranger): New. * gimple-range.h (gimple_range_global): Move to gimple-range.cc. (class global_range_query): New. (enable_ranger): New. (disable_ranger): New. * gimple-ssa-evrp.c (evrp_folder::~evrp_folder): Rename dump_all_value_ranges to dump. * tree-vrp.c (vrp_prop::finalize): Same. * value-query.cc (range_query::dump): New. * value-query.h (range_query::dump): New. * vr-values.c (vr_values::dump_all_value_ranges): Rename to... (vr_values::dump): ...this. * vr-values.h (class vr_values): Rename dump_all_value_ranges to dump and make virtual. 2021-05-26 Uroš Bizjak * config/i386/i386.c (ix86_autovectorize_vector_modes): Add V4QImode and V16QImode for TARGET_SSE2. * doc/sourcebuild.texi (Vector-specific attributes): Add vect64 and vect32 description. 2021-05-26 Bernd Edlinger * gimple-range-gori.cc (range_def_chain::register_dependency): Resize m_def_chain when needed. 2021-05-26 Christophe Lyon * config/arm/mve.md (mve_vaddvq_): Prefix with '@'. * config/arm/neon.md (reduc_plus_scal_): Move to .. * config/arm/vec-common.md: .. here. Add support for MVE. 2021-05-26 Jakub Jelinek * config/epiphany/epiphany.c (epiphany_print_operand_address): Remove register keywords. * config/microblaze/microblaze.c (microblaze_legitimize_address, call_internal1, microblaze_option_override, print_operand): Likewise. * config/microblaze/microblaze.md (call_internal_plt, call_value_intern_plt, call_value_intern): Likewise. * config/arm/aout.h (ASM_OUTPUT_ALIGN): Likewise. * config/iq2000/iq2000.md (call_internal1, call_value_internal1, call_value_multiple_internal1): Likewise. * config/bfin/bfin.c (symbolic_reference_mentioned_p): Likewise. 2021-05-26 Jan-Benedict Glaw * config/arc/arc.c (arc_address_cost, arc_print_operand_address, arc_ccfsm_advance, symbolic_reference_mentioned_p, arc_raw_symbolic_reference_mentioned_p): Remove register keyword. 2021-05-26 Jakub Jelinek PR libgomp/100573 * omp-low.c: Include omp-offload.h. (create_omp_child_function): If current_function_decl has "omp declare target" attribute and is_gimple_omp_offloaded, remove that attribute from the copy of attribute list and add "omp target entrypoint" attribute instead. (lower_omp_target): Mark .omp_data_sizes.* and .omp_data_kinds.* variables for offloading if in omp_maybe_offloaded_ctx. * omp-offload.c (pass_omp_target_link::execute): Nullify second argument to GOMP_target_data_ext in offloaded code. 2021-05-26 Geng Qi * config/csky/csky.c (csky_can_change_mode_class): Delete. For csky, HF/SF mode use the low bits of VREGS. 2021-05-26 Eric Botcazou * gimplify.c (gimplify_decl_expr): Do not clear TREE_READONLY on a DECL which is a reference for OMP. 2021-05-26 Martin Liska PR gcov-profile/100751 * doc/gcov.texi: Document that __gcov_dump can be called just once and that __gcov_reset resets run-time counters. 2021-05-26 Martin Liska * doc/install.texi: Port relevant part from install-old.texi and re-generate list of CPUs and systems. 2021-05-26 Martin Liska * Makefile.in: Remove it. * doc/include/fdl.texi: Update next/previous chapters. * doc/install.texi: Likewise. * doc/install-old.texi: Removed. 2021-05-26 Geng Qi * config/csky/csky.c (ck810_legitimate_index_p): Support "base + index" with DF mode. * config/csky/constraints.md ("Y"): New constraint for memory operands without index register. * config/csky/csky_insn_fpuv2.md (fpuv3_movdf): Use "Y" instead of "m" when mov between memory and general registers, and lower their priority. * config/csky/csky_insn_fpuv3.md (fpuv2_movdf): Likewise. 2021-05-26 Geng Qi * config/csky/csky.c (TARGET_PROMOTE_PROTOTYPES): Delete. 2021-05-26 Geng Qi * config/csky/csky.md (untyped_call): Emit clobber for return registers to mark them used. 2021-05-26 Geng Qi * config/csky/csky.md (cskyv2_sextend_ldbs): New. 2021-05-26 Andrew Pinski * match.pd (x < 0 ? ~y : y): New patterns. 2021-05-26 Andrew Pinski * match.pd (A?CST1:CST2): Add simplifcations for A?0:+-1, A?+-1:0, A?POW2:0 and A?0:POW2. 2021-05-25 Andrew MacLeod * gimple-range-gori.cc (class logical_stmt_cache): Delete (logical_stmt_cache::logical_stmt_cache ): Delete. (logical_stmt_cache::~logical_stmt_cache): Delete. (logical_stmt_cache::cache_entry::dump): Delete. (logical_stmt_cache::get_range): Delete. (logical_stmt_cache::cached_name ): Delete. (logical_stmt_cache::same_cached_name): Delete. (logical_stmt_cache::cacheable_p): Delete. (logical_stmt_cache::slot_diagnostics ): Delete. (logical_stmt_cache::dump): Delete. (gori_compute_cache::gori_compute_cache): Delete. (gori_compute_cache::~gori_compute_cache): Delete. (gori_compute_cache::compute_operand_range): Delete. (gori_compute_cache::cache_stmt): Delete. * gimple-range-gori.h (gori_compute::compute_operand_range): Remove virtual. (class gori_compute_cache): Delete. 2021-05-25 Andrew MacLeod * gimple-range.cc (fold_using_range::range_of_range_op): Use m_gori intead of m_cache. (fold_using_range::range_of_address): Adjust. (fold_using_range::range_of_phi): Adjust. * gimple-range.h (class fur_source): Adjust. (fur_source::fur_source): Adjust. 2021-05-25 Andrew MacLeod * gimple-range-gori.cc (gori_compute::expr_range_at_stmt): Rename from expr_range_in_bb and adjust. (gori_compute::compute_name_range_op): Adjust. (gori_compute::optimize_logical_operands): Adjust. (gori_compute::compute_logical_operands_in_chain): Adjust. (gori_compute::compute_operand1_range): Adjust. (gori_compute::compute_operand2_range): Adjust. (ori_compute_cache::cache_stmt): Adjust. * gimple-range-gori.h (gori_compute): Rename prototype. 2021-05-25 Andrew MacLeod * gimple-range.cc (gimple_ranger::range_of_expr): Non-null should be checked only after range_of_stmt, not range_on_entry. (gimple_ranger::range_on_entry): Check for non-null in any predecessor block, if it is not already non-null. (gimple_ranger::range_on_exit): DOnt check for non-null after range on entry call. (gimple_ranger::dump_bb): New. Split from dump. (gimple_ranger::dump): Adjust. * gimple-range.h (class gimple_ranger): Adjust. 2021-05-25 Andrew MacLeod * gimple-range-cache.cc (struct range_timestamp): Delete. (class temporal_cache): Adjust. (temporal_cache::get_timestamp): Delete. (temporal_cache::set_dependency): Delete. (temporal_cache::temporal_value): Adjust. (temporal_cache::current_p): Take dependencies as params. (temporal_cache::set_timestamp): Adjust. (temporal_cache::set_always_current): Adjust. (ranger_cache::get_non_stale_global_range): Adjust. (ranger_cache::register_dependency): Delete. * gimple-range-cache.h (class range_cache): Adjust. 2021-05-25 Andrew MacLeod * gimple-range-gori.cc (range_def_chain::range_def_chain): init bitmap obstack. (range_def_chain::~range_def_chain): Dispose of obstack rather than each individual bitmap. (range_def_chain::set_import): New. (range_def_chain::get_imports): New. (range_def_chain::chain_import_p): New. (range_def_chain::register_dependency): Rename from build_def_chain and set imports. (range_def_chain::def_chain_in_bitmap_p): New. (range_def_chain::add_def_chain_to_bitmap): New. (range_def_chain::has_def_chain): Just check first depenedence. (range_def_chain::get_def_chain): Process imports, use generic register_dependency routine. (range_def_chain::dump): New. (gori_map::gori_map): Allocate import list. (gori_map::~gori_map): Release imports. (gori_map::exports): Check for past allocated block size. (gori_map::imports): New. (gori_map::def_chain_in_export_p): Delete. (gori_map::is_import_p): New. (gori_map::maybe_add_gori): Handle imports. (gori_map::dump): Adjust output, add imports. (gori_compute::has_edge_range_p): Remove def_chain_in_export call. (gori_export_iterator::gori_export_iterator): New. (gori_export_iterator::next): New. (gori_export_iterator::get_name): New. * gimple-range-gori.h (range_def_chain): Add imports and direct dependecies via struct rdc. (range_def_chain::depend1): New. (range_def_chain::depend2): New. (class gori_map): Adjust. (FOR_EACH_GORI_IMPORT_NAME): New. (FOR_EACH_GORI_EXPORT_NAME): New. (class gori_export_iterator): New. 2021-05-25 Andrew MacLeod * gimple-range-cache.cc (ranger_cache::ranger_cache): Move initial export cache filling to here. * gimple-range-gori.cc (gori_compute::gori_compute) : From Here. 2021-05-25 Andrew MacLeod * gimple-range-gori.cc (range_def_chain): Move to gimple-range-gori.h. (gori_map): Move to gimple-range-gori.h. (gori_compute::gori_compute): Adjust. (gori_compute::~gori_compute): Delete. (gori_compute::compute_operand_range_switch): Adjust. (gori_compute::compute_operand_range): Adjust. (gori_compute::compute_logical_operands): Adjust. (gori_compute::has_edge_range_p ): Adjust. (gori_compute::set_range_invariant): Delete. (gori_compute::dump): Adjust. (gori_compute::outgoing_edge_range_p): Adjust. * gimple-range-gori.h (class range_def_chain): Relocate here. (class gori_map): Relocate here. (class gori_compute): Inherit from gori_map, and adjust. 2021-05-25 Aldy Hernandez * value-range.cc (range_tests_legacy): Use build_nonstandard_integer_type instead of int and short. 2021-05-25 Eric Botcazou * gimplify.c (gimplify_decl_expr): Clear TREE_READONLY on the DECL when really creating an initialization statement for it. 2021-05-25 Eric Botcazou * tree-inline.c (setup_one_parameter): Fix thinko in new condition. 2021-05-25 Kito Cheng * config/riscv/riscv.h (ASM_SPEC): Pass -mno-relax. 2021-05-25 Martin Liska PR tree-optimization/92860 PR target/99592 * optc-save-gen.awk: Remove exceptions. 2021-05-25 Martin Liska * asan.h (sanitize_coverage_p): New function. * doc/extend.texi: Document it. * fold-const.c (fold_range_test): Use sanitize_flags_p instead of flag_sanitize_coverage. (fold_truth_andor): Likewise. * sancov.c: Likewise. * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise. * ipa-inline.c (sanitize_attrs_match_for_inline_p): Handle -fsanitize-coverage when inlining. 2021-05-25 Cooper Qu * config/csky/csky-modes.def : Fix copyright. 2021-05-25 Cooper Qu * config/csky/csky-modes.def : Amend copyright. * config/csky/csky_insn_fpuv2.md : Likewise. * config/csky/csky_insn_fpuv3.md : Likewise. 2021-05-25 Richard Biener PR middle-end/100727 * calls.c (initialize_argument_information): Explicitely test for WITH_SIZE_EXPR. * gimple-expr.c (mark_addressable): Skip outer WITH_SIZE_EXPR. 2021-05-25 Geng Qi * config/csky/csky.h (FRAME_POINTER_REGNUM): Use HARD_FRAME_POINTER_REGNUM and FRAME_POINTER_REGNUM instead of the signle definition. The signle definition may not work well at simplify_subreg_regno(). (HARD_FRAME_POINTER_REGNUM): New. (ELIMINABLE_REGS): Add for HARD_FRAME_POINTER_REGNUM. * config/csky/csky.c (get_csky_live_regs, csky_can_eliminate, csky_initial_elimination_offset, csky_expand_prologue, csky_expand_epilogue): Add for HARD_FRAME_POINTER_REGNUM. 2021-05-25 Geng Qi * config/csky/csky.c (csky_option_override): Init csky_arch_isa_features[] in advance, so TARGET_DSP and TARGET_DIV can be set well. 2021-05-25 Geng Qi * config/csky/constraints.md ("l", "h"): Delete. * config/csky/csky.h (reg_class, REG_CLASS_NAMES, REG_CLASS_CONTENTS): Delete LO_REGS and HI_REGS. * config/csky/csky.c (regno_reg_classm, csky_secondary_reload, csky_register_move_cost): Use HILO_REGS instead of LO_REGS and HI_REGS. 2021-05-25 Geng Qi * config/csky/constraints.md ("W"): New constriant for mem operand with base reg, index register. ("Q"): Renamed and modified "csky_valid_fpuv2_mem_operand" to "csky_valid_mem_constraint_operand" to deal with both "Q" and "W" constraint. ("Dv"): New constraint for const double value that can be used at fmovi instruction. * config/csky/csky-modes.def (HFmode): New mode. * config/csky/csky-protos.h (csky_valid_fpuv2_mem_operand): Rename to "csky_valid_mem_constraint_operand" and support new constraint "W". (csky_get_movedouble_length): New. (fpuv3_output_move): New. (fpuv3_const_double): New. * config/csky/csky.c (csky_option_override): New arch CK860 with fpv3. (decompose_csky_address): Refine. (csky_print_operand): New "CONST_DOUBLE" operand. (csky_output_move): Support fpv3 instructions. (csky_get_movedouble_length): New. (fpuv3_output_move): New. (fpuv3_const_double): New. (csky_emit_compare): Cover float comparsion. (csky_emit_compare_float): Refine. (csky_vaild_fpuv2_mem_operand): Rename to "csky_valid_mem_constraint_operand" and support new constraint "W". (ck860_rtx_costs): New. (csky_rtx_costs): Add the cost calculation of CK860. (regno_reg_class): New vregs for fpuv3. (csky_dbx_regno): Likewise. (csky_cpu_cpp_builtins): New builtin macro for fpuv3. (csky_conditional_register_usage): Suporrot fpuv3. (csky_dwarf_register_span): Suporrot fpuv3. (csky_init_builtins, csky_mangle_type): Support "__fp16" type. (ck810_legitimate_index_p): Support fp16. * config/csky/csky.h (TARGET_TLS): ADD CK860. (CSKY_VREG_P, CSKY_VREG_LO_P, CSKY_VREG_HI_P): Support fpuv3. (TARGET_SINGLE_FPU): Support fpuv3. (TARGET_SUPPORT_FPV3): New. (FIRST_PSEUDO_REGISTER): Change to 202 to hold the new fpuv3 registers. (FIXED_REGISTERS, CALL_REALLY_USED_REGISTERS, REGISTER_NAMES, REG_CLASS_CONTENTS): Support fpuv3. * config/csky/csky.md (movsf): Move to cksy_insn_fpu.md and refine. (csky_movsf_fpv2): Likewise. (ck801_movsf): Likewise. (csky_movsf): Likewise. (movdf): Likewise. (csky_movdf_fpv2): Likewise. (ck801_movdf): Likewise. (csky_movdf): Likewise. (movsicc): Refine. Use "comparison_operatior" instead of "ordered_comparison_operatior". (addsicc): Likewise. (CSKY_FIRST_VFP3_REGNUM, CSKY_LAST_VFP3_REGNUM): New constant. (call_value_internal_vh): New. * config/csky/csky_cores.def (CK860): New arch and cpu. (fpv3_hf): New. (fpv3_hsf): New. (fpv3_sdf): New. (fpv3): New. * config/csky/csky_insn_fpu.md: Refactor. Separate all float patterns into emit-patterns and match-patterns, remain the emit-patterns here, and move the match-patterns to csky_insn_fpuv2.md or csky_insn_fpuv3.md. * config/csky/csky_insn_fpuv2.md: New file for fpuv2 instructions. * config/csky/csky_insn_fpuv3.md: New file and new patterns for fpuv3 isntructions. * config/csky/csky_isa.def (fcr): New. (fpv3_hi): New. (fpv3_hf): New. (fpv3_sf): New. (fpv3_df): New. (CK860): New definition for ck860. * config/csky/csky_tables.opt (ck860): New processors ck860, ck860f. And new arch ck860. (fpv3_hf): New. (fpv3_hsf): New. (fpv3_hdf): New. (fpv3): New. * config/csky/predicates.md (csky_float_comparsion_operator): Delete "geu", "gtu", "leu", "ltu", which will never appear at float comparison. * config/csky/t-csky-elf: Support 860. * config/csky/t-csky-linux: Likewise. * doc/md.texi: Add "Q" and "W" constraints for C-SKY. 2021-05-24 Aaron Sawdey * config/rs6000/genfusion.pl (gen_logical_addsubf): Refactor to add generation of logical-add and add-logical fusion pairs. * config/rs6000/rs6000-cpus.def: Add new fusion to ISA 3.1 mask and powerpc mask. * config/rs6000/rs6000.c (rs6000_option_override_internal): Turn on logical-add and add-logical fusion by default. * config/rs6000/rs6000.opt: Add -mpower10-fusion-logical-add and -mpower10-fusion-add-logical options. * config/rs6000/fusion.md: Regenerate file. 2021-05-24 Aldy Hernandez * value-range.cc (irange::legacy_equal_p): Check type when comparing VR_VARYING types. (range_tests_legacy): Test comparing VARYING ranges of different sizes. 2021-05-24 Wilco Dijkstra * config/aarch64/aarch64.c (neoversen1_tunings): Enable AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. 2021-05-24 Wilco Dijkstra * config/aarch64/aarch64.c (aarch64_classify_symbol): Use GOT for extern weak symbols. Limit symbol offsets for non-GOT symbols with PIC/PIE. 2021-05-24 Christophe Lyon * config/arm/neon.md (vec_load_lanesxi) (vec_store_lanexoi): Move ... * config/arm/vec-common.md: here. 2021-05-24 Christophe Lyon * config/arm/neon.md (vec_load_lanesoi) (vec_store_lanesoi): Move ... * config/arm/vec-common.md: here. 2021-05-24 liuhongt PR target/100660 * config/i386/i386.c (ix86_gimple_fold_builtin): Replacing stmt with GIMPLE_NOP when lhs doesn't exist. 2021-05-23 Uroš Bizjak PR target/100722 * config/i386/mmx.md (*push2_rex64): New instruction pattern. (*push2): Ditto. (push splitter for SSE registers): New splitter. 2021-05-23 Andrew Pinski * match.pd ((A & C) != 0 ? D : 0): Limit to non pointer types. 2021-05-22 Aaron Sawdey * config/rs6000/genfusion.pl (gen_addadd): Fix incorrect attr types. * config/rs6000/fusion.md: Regenerate file. 2021-05-21 Aaron Sawdey * config/rs6000/genfusion.pl (gen_addadd): New function. * config/rs6000/fusion.md: Regenerate file. * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_P10_FUSION_2ADD to masks. * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle default value of OPTION_MASK_P10_FUSION_2ADD. * config/rs6000/rs6000.opt: Add -mpower10-fusion-2add. 2021-05-21 Jakub Jelinek PR middle-end/99928 * tree.h (OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET): Define. * gimplify.c (enum gimplify_omp_var_data): Fix up GOVD_MAP_HAS_ATTACHMENTS value, add GOVD_FIRSTPRIVATE_IMPLICIT. (omp_lastprivate_for_combined_outer_constructs): If combined target has GOVD_FIRSTPRIVATE_IMPLICIT set for the decl, change it to GOVD_MAP | GOVD_SEEN. (gimplify_scan_omp_clauses): Set GOVD_FIRSTPRIVATE_IMPLICIT for firstprivate clauses with OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT. (gimplify_adjust_omp_clauses): For firstprivate clauses with OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT either clear that bit and OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET too, or remove it and let it be replaced by implicit map clause. 2021-05-21 Jakub Jelinek PR middle-end/99928 * gimplify.c (omp_lastprivate_for_combined_outer_constructs): New function. (gimplify_scan_omp_clauses) : Use it. (gimplify_omp_for): Likewise. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-low.c (oacc_privatization_candidate_p): Reject 'static', 'external' in blocks. 2021-05-21 Thomas Schwinge PR middle-end/90115 * flag-types.h (enum openacc_privatization): New. * params.opt (-param=openacc-privatization): New. * doc/invoke.texi (openacc-privatization): Document it. * omp-general.h (get_openacc_privatization_dump_flags): New function. * omp-low.c (oacc_privatization_candidate_p): Add diagnostics. * omp-offload.c (execute_oacc_device_lower) : Re-work diagnostics. * target.def (goacc.adjust_private_decl): Add 'location_t' parameter. * doc/tm.texi: Regenerate. * config/gcn/gcn-protos.h (gcn_goacc_adjust_private_decl): Adjust. * config/gcn/gcn-tree.c (gcn_goacc_adjust_private_decl): Likewise. * config/nvptx/nvptx.c (nvptx_goacc_adjust_private_decl): Likewise. Preserve it for... (nvptx_goacc_expand_var_decl): ... use here. 2021-05-21 Thomas Schwinge * doc/sourcebuild.texi (Other attributes): Document '__OPTIMIZE__' DejaGnu selector. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-low.c (oacc_privatization_candidate_p): New function. (oacc_privatization_scan_clause_chain) (oacc_privatization_scan_decl_chain): Use it. Also 'gcc_checking_assert' that we're not seeing duplicates. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower): Skip processing if no work to be done. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower): Explain. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-offload.c (execute_oacc_device_lower) : Diagnose and handle for 'level == -1' case, too. * internal-fn.c (expand_UNIQUE): Don't expect 'IFN_UNIQUE_OACC_PRIVATE'. 2021-05-21 Thomas Schwinge PR middle-end/90115 * omp-low.c (lower_omp_for): Don't evaluate OpenMP 'for' clauses. 2021-05-21 Thomas Schwinge PR middle-end/90115 * config/nvptx/nvptx.c (nvptx_goacc_adjust_private_decl) (nvptx_goacc_expand_var_decl): Tighten. 2021-05-21 Julian Brown Chung-Lin Tang Thomas Schwinge PR middle-end/90115 * doc/tm.texi.in (TARGET_GOACC_EXPAND_VAR_DECL) (TARGET_GOACC_ADJUST_PRIVATE_DECL): Add documentation hooks. * doc/tm.texi: Regenerate. * expr.c (expand_expr_real_1): Expand decls using the expand_var_decl OpenACC hook if defined. * internal-fn.c (expand_UNIQUE): Handle IFN_UNIQUE_OACC_PRIVATE. * internal-fn.h (IFN_UNIQUE_CODES): Add OACC_PRIVATE. * omp-low.c (omp_context): Add oacc_privatization_candidates field. (lower_oacc_reductions): Add PRIVATE_MARKER parameter. Insert before fork. (lower_oacc_head_tail): Add PRIVATE_MARKER parameter. Modify private marker's gimple call arguments, and pass it to lower_oacc_reductions. (oacc_privatization_scan_clause_chain) (oacc_privatization_scan_decl_chain, lower_oacc_private_marker): New functions. (lower_omp_for, lower_omp_target, lower_omp_1): Use these. * omp-offload.c (convert.h): Include. (oacc_loop_xform_head_tail): Treat private-variable markers like fork/join when transforming head/tail sequences. (struct var_decl_rewrite_info): Add struct. (oacc_rewrite_var_decl, is_sync_builtin_call): New functions. (execute_oacc_device_lower): Support rewriting gang-private variables using target hook, and fix up addr_expr and var_decl nodes afterwards. * target.def (adjust_private_decl, expand_var_decl): New hooks. * config/gcn/gcn-protos.h (gcn_goacc_adjust_gangprivate_decl): Rename to... (gcn_goacc_adjust_private_decl): ...this. * config/gcn/gcn-tree.c (gcn_goacc_adjust_gangprivate_decl): Rename to... (gcn_goacc_adjust_private_decl): ...this. Add LEVEL parameter. * config/gcn/gcn.c (TARGET_GOACC_ADJUST_GANGPRIVATE_DECL): Rename definition using gcn_goacc_adjust_gangprivate_decl... (TARGET_GOACC_ADJUST_PRIVATE_DECL): ...to this, using gcn_goacc_adjust_private_decl. * config/nvptx/nvptx.c (tree-pretty-print.h): Include. (gang_private_shared_size): New global variable. (gang_private_shared_align): Likewise. (gang_private_shared_sym): Likewise. (gang_private_shared_hmap): Likewise. (nvptx_option_override): Initialize these. (nvptx_file_end): Output gang_private_shared_sym. (nvptx_goacc_adjust_private_decl, nvptx_goacc_expand_var_decl): New functions. (nvptx_set_current_function): Clear gang_private_shared_hmap. (TARGET_GOACC_ADJUST_PRIVATE_DECL): Define hook. (TARGET_GOACC_EXPAND_VAR_DECL): Likewise. 2021-05-21 H.J. Lu * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed. 2021-05-21 Richard Biener H.J. Lu PR middle-end/90773 * expr.c (expand_constructor): Elide expand_constructor if move by pieces is preferred. 2021-05-21 Kyrylo Tkachov * config/aarch64/aarch64-builtins.c (aarch64_call_properties): Take a flag and mode value as arguments. (aarch64_modifies_global_state_p): Likewise. (aarch64_reads_global_state_p): Likewise. (aarch64_could_trap_p): Likewise. (aarch64_get_attributes): Likewise. (aarch64_init_simd_builtins): Adjust callsite of above. (aarch64_init_fcmla_laneq_builtins): Use aarch64_get_attributes to get function attributes to apply to builtins. (aarch64_init_crc32_builtins): Likewise. (aarch64_init_builtin_rsqrt): Likewise. 2021-05-21 Aaron Sawdey * config/rs6000/rs6000.md (define_attr "type"): Add types for fusion. * config/rs6000/genfusion.pl (gen_ld_cmpi_p10): Use new fusion types. (gen_2logical): Use new fusion types. * config/rs6000/fusion.md: Regenerate. 2021-05-21 Uroš Bizjak PR target/100637 * config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V4QI and V2HI modes. (ix86_expand_sse_movcc): Ditto. * config/i386/mmx.md (*3): New instruction pattern. (*eq3): Ditto. (*gt3): Ditto. (*xop_pcmov_): Ditto. (mmx_pblendvb32): Ditto. (mmx_pblendvb64): Rename from mmx_pblendvb. (vec_cmp): New expander. (vec_cmpu): Ditto. (vcond): Ditto. (vcondu): Ditto. (vcond_mask_): Ditto. 2021-05-21 Jakub Jelinek PR tree-optimization/94589 * tree-ssa-phiopt.c (spaceship_replacement): For integral rhs1 and rhs2, treat x <= 4 equivalently to x < 5 etc. In cmp1 and cmp2 (if not the same as cmp3) treat <= the same as < and >= the same as >. Don't require that cond2_phi_edge is true edge, instead take false/true edges into account based on cmp1/cmp2 comparison kinds. 2021-05-21 Uroš Bizjak PR target/100637 * config/i386/mmx.md (SMAXMIN_MMXMODEI): New mode iterator. (3): Macroize expander from v4hi3> and 3 using SMAXMIN_MMXMODEI mode iterator. (*v4qi3): New insn pattern. (*v2hi3): Ditto. (SMAXMIN_VI_32): New mode iterator. (mode3): New expander. (UMAXMIN_MMXMODEI): New mode iterator. (3): Macroize expander from v8qi3> and 3 using UMAXMIN_MMXMODEI mode iterator. (*v4qi3): New insn pattern. (*v2hi3): Ditto. (UMAXMIN_VI_32): New mode iterator. (mode3): New expander. (abs2): New insn pattern. (ssse3_abs2, abs2): Move from ... * config/i386/sse.md: ... here. 2021-05-20 Clement Chigot David Edelsohn * collect2.c (scan_prog_file): Issue non-fatal warning for non-COFF files. 2021-05-20 Jonathan Wakely * doc/invoke.texi (-Wno-c++11-extensions) (-Wno-c++14-extensions, -Wno-c++17-extensions) (-Wno-c++20-extensions, -Wno-c++23-extensions): Document new options. 2021-05-20 Indu Bhagat * config/c6x/c6x.c (c6x_output_file_unwind): Use dwarf_debuginfo_p. * config/darwin.c (darwin_override_options): Likewise. * config/i386/cygming.h (DBX_REGISTER_NUMBER): Likewise. * config/i386/darwin.h (DBX_REGISTER_NUMBER): Likewise. (DWARF2_FRAME_REG_OUT): Likewise. * config/mips/mips.c (mips_output_filename): Likewise. * config/rs6000/rs6000.c (rs6000_xcoff_declare_function_name): Likewise. (rs6000_dbx_register_number): Likewise. * dbxout.c: Include flags.h. * dwarf2cfi.c (cfi_label_required_p): Likewise. (dwarf2out_do_frame): Likewise. * except.c: Include flags.h. * final.c (dwarf2_debug_info_emitted_p): Likewise. (final_scan_insn_1): Likewise. * flags.h (dwarf_debuginfo_p): New function declaration. * opts.c (dwarf_debuginfo_p): New function definition. * targhooks.c (default_debug_unwind_info): Use dwarf_debuginfo_p. * toplev.c (process_options): Likewise. 2021-05-20 Indu Bhagat * common.opt: Change type to support bitmasks. * flag-types.h (enum debug_info_type): Rename enumerator constants. (NO_DEBUG): New bitmask. (DBX_DEBUG): Likewise. (DWARF2_DEBUG): Likewise. (XCOFF_DEBUG): Likewise. (VMS_DEBUG): Likewise. (VMS_AND_DWARF2_DEBUG): Likewise. * flags.h (debug_set_to_format): New function declaration. (debug_set_count): Likewise. (debug_set_names): Likewise. * opts.c (debug_type_masks): Array of bitmasks for debug formats. (debug_set_to_format): New function definition. (debug_set_count): Likewise. (debug_set_names): Likewise. (set_debug_level): Update access to debug_type_names. * toplev.c: Likewise. 2021-05-20 Martin Sebor PR middle-end/100684 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Handle C++ lambda. 2021-05-20 Uroš Bizjak PR target/100701 * config/i386/i386.md (isa): Remove x64_bmi. (enabled): Remove x64_bmi. * config/i386/mmx.md (mmx_andnot3): Remove general register alternative. (*andnot3): Ditto. (*mmx_3): Ditto. (*3): Ditto. 2021-05-20 Kewen Lin * config/arm/arm.c: Include head files tree-vectorizer.h and cfgloop.h. 2021-05-20 Uroš Bizjak PR target/100637 * config/i386/mmx.md (Yv_Yw): Revert adding V4QI and V2HI modes. (*3): Use Yw instad of constrint. (mulv4hi3_highpart): New expander. (*mulv2hi3_highpart): New insn pattern. (mulv2hi3_higpart): New expander. (*v2hi3): New insn pattern. (v2hi3): New expander. * config/i386/sse.md (smulhrsv2hi3): New expander. (*smulhrsv2hi3): New insn pattern. 2021-05-20 Kewen Lin * doc/invoke.texi (vect-inner-loop-cost-factor): Document new parameter. * params.opt (vect-inner-loop-cost-factor): New. * targhooks.c (default_add_stmt_cost): Replace hardcoded factor 50 with LOOP_VINFO_INNER_LOOP_COST_FACTOR, include head file tree-vectorizer.h and its required ones. * config/aarch64/aarch64.c (aarch64_add_stmt_cost): Replace hardcoded factor 50 with LOOP_VINFO_INNER_LOOP_COST_FACTOR. * config/arm/arm.c (arm_add_stmt_cost): Likewise. * config/i386/i386.c (ix86_add_stmt_cost): Likewise. * config/rs6000/rs6000.c (rs6000_add_stmt_cost): Likewise. * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Likewise. (_loop_vec_info::_loop_vec_info): Init inner_loop_cost_factor. * tree-vectorizer.h (_loop_vec_info): Add inner_loop_cost_factor. (LOOP_VINFO_INNER_LOOP_COST_FACTOR): New macro. 2021-05-20 Christophe Lyon Torbjörn Svensson PR c/42579 * doc/cpp.texi (Common Predefined Macros): Document __FILE_NAME__. 2021-05-20 Jakub Jelinek PR middle-end/99928 * gimplify.c (gimplify_scan_omp_clauses) : For explicit linear clause when combined with target, make it map(tofrom:) instead of no clause or firstprivate. 2021-05-20 Jakub Jelinek PR tree-optimization/94589 * match.pd ((X & Y) == X -> (X & ~Y) == 0): Simplify even in presence of integral conversions. 2021-05-19 Andrew MacLeod * gimple-range.cc (fur_source::get_operand): New. (gimple_range_fold): Delete. (fold_using_range::fold_stmt): Move from gimple_ranger::calc_stmt. (fold_using_range::range_of_range_op): Move from gimple_ranger. (fold_using_range::range_of_address): Ditto. (fold_using_range::range_of_phi): Ditto. (fold_using_range::range_of_call): Ditto. (fold_using_range::range_of_builtin_ubsan_call): Move from range_of_builtin_ubsan_call. (fold_using_range::range_of_builtin_call): Move from range_of_builtin_call. (gimple_ranger::range_of_builtin_call): Delete. (fold_using_range::range_of_cond_expr): Move from gimple_ranger. (gimple_ranger::fold_range_internal): New. (gimple_ranger::range_of_stmt): Use new fold_using_range API. (fold_using_range::range_of_ssa_name_with_loop_info): Move from gimple_ranger. Improve ranges of SSA_NAMES when possible. * gimple-range.h (gimple_ranger): Remove various range_of routines. (class fur_source): New. (class fold_using_range): New. (fur_source::fur_source): New. (fold_range): New. * vr-values.c (vr_values::extract_range_basic): Use fold_using_range instead of range_of_builtin_call. 2021-05-19 Jonathan Wakely * doc/cpp.texi (Common Predefined Macros): Update documentation for the __GXX_EXPERIMENTAL_CXX0X__ macro. 2021-05-19 Alex Coplan PR target/100333 * config/arm/arm.md (nonsecure_call_internal): Always ensure callee's address is in a register. 2021-05-19 Geng Qi * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Properly parse the letter 'p' in '-march'. (riscv_subset_list::parse_std_ext, riscv_subset_list::parse_multiletter_ext): To handle errors generated in riscv_subset_list::parsing_subset_version. 2021-05-19 Jonathan Wright * config/aarch64/aarch64-simd.md: Use "neon_move_narrow_q" type attribute in patterns generating XTN(2). 2021-05-19 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_simd_vec_pack_trunc_): Remove as duplicate of... (aarch64_xtn): This. (aarch64_xtn2_le): Move position in file. (aarch64_xtn2_be): Move position in file. (aarch64_xtn2): Move position in file. (vec_pack_trunc_): Define as an expander. 2021-05-19 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Split builtin generation for aarch64_qshrn_n pattern into separate scalar and vector generators. * config/aarch64/aarch64-simd.md (aarch64_qshrn_n): Define as an expander and split into... (aarch64_qshrn_n_insn_le): This and... (aarch64_qshrn_n_insn_be): This. * config/aarch64/iterators.md: Define SD_HSDI iterator. 2021-05-19 Jonathn Wright * config/aarch64/aarch64-simd.md: Use UNSPEC_SQXTUN instead of UNSPEC_SQXTUN2. * config/aarch64/iterators.md: Remove UNSPEC_SQXTUN2. 2021-05-19 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_qshrn2_n): Implement as an expand emitting a big/little endian instruction pattern. (aarch64_qshrn2_n_insn_le): Define. (aarch64_qshrn2_n_insn_be): Define. 2021-05-19 Jonathan Wright * config/aarch64/aarch64-simd.md (aarch64_hn2): Implement as an expand emitting a big/little endian instruction pattern. (aarch64_hn2_insn_le): Define. (aarch64_hn2_insn_be): Define. * config/aarch64/iterators.md: Remove UNSPEC_[R]ADDHN2 and UNSPEC_[R]SUBHN2 unspecs and ADDSUBHN2 iterator. 2021-05-19 Richard Biener PR middle-end/100672 * fold-const.c (fold_negate_expr_1): Use element_precision. (negate_expr_p): Likewise. 2021-05-19 Andre Vieira * config/aarch64/iterators.md (SVE_PRED_LOAD): New iterator. (pred_load): New int attribute. * config/aarch64/aarch64-sve.md (aarch64_load_): Use SVE_PRED_LOAD enum iterator and corresponding pred_load attribute. * config/aarch64/aarch64-sve-builtins-base.cc (expand): Update call to code_for_aarch64_load. 2021-05-19 Richard Biener * cfgexpand.c (discover_nonconstant_array_refs_r): Make sure TARGET_MEM_REF bases are expanded as memory. * tree-ssa-operands.c (operands_scanner::get_tmr_operands): Do not mark TARGET_MEM_REF bases addressable. * tree-ssa.c (non_rewritable_mem_ref_base): Handle TARGET_MEM_REF bases as never rewritable. * gimple-walk.c (walk_stmt_load_store_addr_ops): Do not walk TARGET_MEM_REF bases as address-takens. * tree-ssa-dce.c (ref_may_be_aliased): Handle TARGET_MEM_REF. 2021-05-19 Richard Biener * builtins.c (get_object_alignment_1): Strip outer WITH_SIZE_EXPR. * tree-dfa.c (get_ref_base_and_extent): Handle outer WITH_SIZE_EXPR for size processing and process the containing ref. * tree-ssa-alias.c (ao_ref_base_alias_set): Strip outer WITH_SIZE_EXPR. (ao_ref_base_alias_ptr_type): Likewise. (refs_may_alias_p_2): Allow WITH_SIZE_EXPR in ref->ref and handle that accordingly, stripping it for the core alias workers. * tree.c (get_base_address): Handle WITH_SIZE_EXPR by looking through it instead of returning NULL. 2021-05-19 Jakub Jelinek PR middle-end/100576 * builtins.c (check_read_access): Convert bound to size_type_node if non-NULL. 2021-05-19 Richard Biener * tree-cfg.c (verify_types_in_gimple_min_lval): Inline... (verify_types_in_gimple_reference): ... here. Sanitize. (verify_gimple_call): Verify references in LHS and arguments. (verify_gimple_assign_single): Reject WITH_SIZE_EXPR. 2021-05-19 Uroš Bizjak * config/i386/i386.h (VALID_INT_MODE_P): Add V8QI, V4HI and V2SI modes for TARGET_64BIT. * config/i386/i386.md (isa): Add x64_bmi. (enabled): Handle x64_bmi. * config/i386/mmx.md (mmx_andnot3): Add alternative using 64bit general registers. (*mmx_3): Ditto. 2021-05-19 Jakub Jelinek PR middle-end/99928 * tree.h (OMP_MASTER_COMBINED): Define. * gimplify.c (gimplify_scan_omp_clauses): Rewrite lastprivate handling for outer combined/composite constructs to a loop. Handle lastprivate on combined target. (gimplify_expr): Formatting fix. 2021-05-19 Xionghu Luo * passes.def: Add sink_code pass before store_merging. * tree-ssa-sink.c (pass_sink_code:clone): New. 2021-05-18 Bill Schmidt * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/rs6000-call.c (rs6000_function_arg_boundary): Remove ABI warning. (rs6000_function_arg): Likewise. * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align_p): Remove prototype. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): Remove. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove call to rs6000_special_adjust_field_align_p. 2021-05-18 Uroš Bizjak PR target/100637 * config/i386/i386.h (VALID_SSE2_REG_MODE): Add V4QI and V2HI modes. (VALID_INT_MODE_P): Ditto. * config/i386/mmx.md (VI_32): New mode iterator. (mmxvecsize): Handle V4QI and V2HI. (Yv_Yw): Ditto. (mov): New expander. (*mov_internal): New insn pattern. (movmisalign): New expander. (neg): New expander. (3): New expander. (*3): New insn pattern. (mulv2hi3): New expander. (*mulv2hi3): New insn pattern. (one_cmpl2): New expander. (*andnot3): New insn pattern. (3): New expander. (*3): New insn pattern. 2021-05-18 Uroš Bizjak * config/i386/sse.md (v4qiv4di2): Fix a mode mismatch with operand 1. 2021-05-18 Uroš Bizjak PR target/100626 * config/i386/i386-expand.c (split_double_mode): Return temporary register when simplify_gen_subreg fails with the high half od the paradoxical subreg. 2021-05-18 Richard Biener * cfgexpand.c (expand_one_var): Pass in forced_stack_var and honor it when expanding. (expand_used_vars_for_block): Pass through forced_stack_var. (expand_used_vars): Likewise. (discover_nonconstant_array_refs_r): Set bits in forced_stack_vars instead of marking vars TREE_ADDRESSABLE. (avoid_type_punning_on_regs): Likewise. (discover_nonconstant_array_refs): Likewise. (pass_expand::execute): Create and pass down forced_stack_var bitmap. For parameters and returns temporarily set TREE_ADDRESSABLE when expand_function_start. 2021-05-18 Thomas Schwinge * doc/sourcebuild.texi: Document 'dg-note'. 2021-05-18 Tobias Burnus PR other/100598 * configure: Regenerate. * configure.ac (BUILD_CFLAG, BUILD_CXXFLAGS): Add $(CFLAGS-$@). 2021-05-18 Thomas Schwinge * gimple.h (is_gimple_omp_oacc): Tighten. * omp-low.c (check_omp_nesting_restrictions): Adjust. 2021-05-18 Richard Biener * tree-ssa-operands.c (mark_address_taken): Simplify. 2021-05-18 Martin Liska * config/gcn/mkoffload.c (STR): Redefine. * config/i386/intelmic-mkoffload.c (STR): Likewise. * config/nvptx/mkoffload.c (STR): Likewise. 2021-05-18 Martin Liska * common/config/aarch64/aarch64-common.c (aarch64_parse_extension): Use startswith function instead of strncmp. * common/config/bfin/bfin-common.c (bfin_handle_option): Likewise. * common/config/riscv/riscv-common.c (riscv_subset_list::parse): Likewise. * config/aarch64/aarch64-sve-builtins-shapes.cc (parse_type): Likewise. * config/aarch64/aarch64.c (aarch64_process_one_target_attr): Likewise. * config/alpha/alpha.c (alpha_elf_section_type_flags): Likewise. * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise. * config/arm/arm.c (arm_file_start): Likewise. (arm_valid_target_attribute_rec): Likewise. (thumb1_md_asm_adjust): Likewise. * config/arm/driver-arm.c (host_detect_local_cpu): Likewise. * config/avr/avr.c (STR_PREFIX_P): Likewise. (avr_set_current_function): Likewise. (avr_handle_addr_attribute): Likewise. (avr_asm_output_aligned_decl_common): Likewise. (avr_asm_named_section): Likewise. (avr_section_type_flags): Likewise. (avr_asm_select_section): Likewise. * config/c6x/c6x.c (c6x_in_small_data_p): Likewise. (c6x_section_type_flags): Likewise. * config/darwin-c.c (darwin_cfstring_ref_p): Likewise. (darwin_objc_declare_unresolved_class_reference): Likewise. (darwin_objc_declare_class_definition): Likewise. * config/darwin.c (indirect_data): Likewise. (darwin_encode_section_info): Likewise. (darwin_objc2_section): Likewise. (darwin_objc1_section): Likewise. (machopic_select_section): Likewise. (darwin_globalize_label): Likewise. (darwin_label_is_anonymous_local_objc_name): Likewise. (darwin_asm_named_section): Likewise. (darwin_asm_output_dwarf_offset): Likewise. * config/frv/frv.c (frv_string_begins_with): Likewise. (frv_in_small_data_p): Likewise. * config/gcn/mkoffload.c (STR): Likewise. (main): Likewise. * config/i386/i386-builtins.c (get_builtin_code_for_version): Likewise. * config/i386/i386-options.c (ix86_option_override_internal): Likewise. * config/i386/i386.c (x86_64_elf_section_type_flags): Likewise. (ix86_md_asm_adjust): Likewise. * config/i386/intelmic-mkoffload.c (STR): Likewise. * config/i386/winnt.c (i386_pe_asm_named_section): Likewise. (i386_pe_file_end): Likewise. * config/ia64/ia64.c (ia64_in_small_data_p): Likewise. (ia64_section_type_flags): Likewise. * config/mips/driver-native.c (host_detect_local_cpu): Likewise. * config/mips/mips.c (mips_handle_interrupt_attr): Likewise. (mips16_stub_function_p): Likewise. (mips_function_rodata_section): Likewise. * config/msp430/msp430.c (msp430_mcu_name): Likewise. (msp430_function_section): Likewise. (msp430_section_type_flags): Likewise. (msp430_expand_helper): Likewise. * config/nios2/nios2.c (nios2_small_section_name_p): Likewise. (nios2_valid_target_attribute_rec): Likewise. * config/nvptx/mkoffload.c (process): Likewise. (STR): Likewise. * config/pa/som.h: Likewise. * config/pdp11/pdp11.c (pdp11_output_ident): Likewise. * config/riscv/riscv.c (riscv_elf_select_rtx_section): Likewise. * config/rs6000/rs6000.c (VTABLE_NAME_P): Likewise. (rs6000_inner_target_options): Likewise. * config/s390/driver-native.c (s390_host_detect_local_cpu): Likewise. * config/sparc/driver-sparc.c (host_detect_local_cpu): Likewise. * config/vax/vax.c (vax_output_int_move): Likewise. * config/vms/vms-ld.c (startswith): Likewise. (process_args): Likewise. (main): Likewise. * config/vms/vms.c: Likewise. 2021-05-18 Jakub Jelinek PR rtl-optimization/100590 * regcprop.c (copyprop_hardreg_forward_1): Only DCE dead sets if they are NONJUMP_INSN_P. 2021-05-18 Jakub Jelinek PR c++/100580 * function.c (push_dummy_function): Set DECL_ARTIFICIAL and DECL_ASSEMBLER_NAME on the fn_decl. 2021-05-18 Jakub Jelinek PR tree-optimization/94589 * tree-ssa-phiopt.c (spaceship_replacement): Pattern match phi result used in (res & ~1) == 0 comparison as res >= 0 as res == 2 would be UB with -ffinite-math-only. 2021-05-18 Martin Liska * Makefile.in: genversion.o should depend on DATESTAMP. 2021-05-18 Claudiu Zissulescu * config/arc/simdext.md (negv2si2): Remove round bracket. 2021-05-18 Andreas Krebbel * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define _Bool as macro expanding to _Bool. 2021-05-18 Andreas Krebbel PR c++/100281 * tree.c (build_reference_type_for_mode) (build_pointer_type_for_mode): Pick pointer mode if MODE argument is VOIDmode. (build_reference_type, build_pointer_type): Invoke build_*_type_for_mode with VOIDmode. 2021-05-17 Andrew MacLeod PR tree-optimization/100512 * gimple-range-cache.cc (ranger_cache::set_global_range): Mark const and non-zero pointer ranges as invariant. * gimple-range.cc (gimple_ranger::range_of_stmt): Remove pointer processing from here. 2021-05-17 Tom de Vries PR target/100497 * config/nvptx/nvptx-protos.h (nvptx_output_atomic_insn): Declare * config/nvptx/nvptx.c (nvptx_output_barrier) (nvptx_output_atomic_insn): New function. (nvptx_print_operand): Add support for 'B'. * config/nvptx/nvptx.md: Use nvptx_output_atomic_insn for atomic insns. 2021-05-17 Aldy Hernandez PR tree-optimization/100349 * vr-values.c (bounds_of_var_in_loop): Bail if scev returns NULL. 2021-05-17 Tamar Christina * config/aarch64/driver-aarch64.c (DEFAULT_ARCH): New. (host_detect_local_cpu): Use it. 2021-05-17 Martin Liska * doc/invoke.texi: Add 2 missing dots. 2021-05-17 Marius Hillenbrand PR bootstrap/100552 * configure.ac: Replace pattern substitution with call to sed. * configure: Regenerate. 2021-05-17 Richard Biener PR middle-end/100582 * tree.c (array_at_struct_end_p): Get to the base of the reference before looking for the underlying decl. 2021-05-17 Joern Rennecke * genoutput.c (validate_insn_alternatives) Make "wrong number of alternatives" message more specific, and remove assumption on where the problem is. 2021-05-17 Christophe Lyon * config/arm/iterators.md (V16): New iterator. (VH_cvtto): New iterator. (v_cmp_result): Added V4HF and V8HF support. * config/arm/vec-common.md (vec_cmp): Use VDQWH. (vcond): Likewise. (vcond_mask_): Likewise. (vcond): New expander. 2021-05-17 Christophe Lyon * config/arm/arm-protos.h (arm_expand_vector_compare): Update prototype. * config/arm/arm.c (arm_expand_vector_compare): Add support for MVE. (arm_expand_vcond): Likewise. * config/arm/iterators.md (supf): Remove VCMPNEQ_S, VCMPEQQ_S, VCMPEQQ_N_S, VCMPNEQ_N_S. (VCMPNEQ, VCMPEQQ, VCMPEQQ_N, VCMPNEQ_N): Remove. * config/arm/mve.md (@mve_vcmpq_): Add '@' prefix. (@mve_vcmpq_f): Likewise. (@mve_vcmpq_n_f): Likewise. (@mve_vpselq_): Likewise. (@mve_vpselq_f"): Likewise. * config/arm/neon.md (vec_cmp): Likewise. (vcond): Likewise. (vcond): Likewise. (vcondu): Likewise. (vcond_mask_): Likewise. * config/arm/unspecs.md (VCMPNEQ_U, VCMPNEQ_S, VCMPEQQ_S) (VCMPEQQ_N_S, VCMPNEQ_N_S, VCMPEQQ_U, CMPEQQ_N_U, VCMPNEQ_N_U) (VCMPGEQ_N_S, VCMPGEQ_S, VCMPGTQ_N_S, VCMPGTQ_S, VCMPLEQ_N_S) (VCMPLEQ_S, VCMPLTQ_N_S, VCMPLTQ_S, VCMPCSQ_N_U, VCMPCSQ_U) (VCMPHIQ_N_U, VCMPHIQ_U): Remove. * config/arm/vec-common.md (vec_cmp): Likewise. (vcond): Likewise. (vcond): Likewise. (vcondu): Likewise. (vcond_mask_): Likewise. Added unsafe math condition. 2021-05-17 liuhongt PR target/100549 * config/i386/i386.c (ix86_gimple_fold_builtin): Use gsi_insert_seq_before instead. 2021-05-17 Christophe Lyon * doc/sourcebuild.texi (arm_qbit_ok): Rename into... (arm_sat_ok): ...this. 2021-05-17 Martin Liska * lto-wrapper.c (merge_flto_options): Factor out a new function. (merge_and_complain): Use it. (run_gcc): Merge also linker command line -flto=foo argument with IL files. 2021-05-16 Christophe Lyon * config/arm/arm.h (CPP_SPEC): Remove error message about -mlittle-endian/-mbig-endian conflict. 2021-05-15 Bill Schmidt * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define __ROP_PROTECT__ if -mrop-protect is selected. 2021-05-15 Bill Schmidt * config/rs6000/rs6000-internal.h (rs6000_stack): Add rop_hash_save_offset and rop_hash_size. * config/rs6000/rs6000-logue.c (rs6000_stack_info): Compute rop_hash_size and rop_hash_save_offset. (debug_stack_info): Dump rop_hash_save_offset and rop_hash_size. (rs6000_emit_prologue): Emit hashst[p] in prologue. (rs6000_emit_epilogue): Emit hashchk[p] in epilogue. * config/rs6000/rs6000.md (unspec): Add UNSPEC_HASHST and UNSPEC_HASHCHK. (hashst): New define_insn. (hashchk): Likewise. 2021-05-15 Bill Schmidt * config/rs6000/rs6000.c (rs6000_option_override_internal): Disable shrink wrap when inserting ROP-protect instructions. * config/rs6000/rs6000.opt (mrop-protect): New option. (mprivileged): Likewise. * doc/invoke.texi: Document mrop-protect and mprivileged. 2021-05-15 Hans-Peter Nilsson * reorg.c (fill_slots_from_thread): Reinstate code typoed out in "Remove CC0". 2021-05-15 Martin Jambor Revert: 2021-05-13 Martin Jambor PR tree-optimization/100453 * tree-sra.c (sra_modify_assign): All const base accesses do not need refreshing, not just those from decl_pool. (sra_modify_assign): Do not refresh into a const base decl. 2021-05-15 Jakub Jelinek PR rtl-optimization/100342 * regcprop.c (copy_value): When copying a source reg in a wider mode than it has recorded for the value, adjust recorded destination mode too or punt if !REG_CAN_CHANGE_MODE_P. 2021-05-14 Jason Merrill * intl.h: Add comments. 2021-05-14 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_sqdmll2_lane_internal): Split into... (aarch64_sqdmlsl2_lane_internal): ... This... (aarch64_sqdmlal2_lane_internal): ... And this. (aarch64_sqdmll2_laneq_internal): Split into ... (aarch64_sqdmlsl2_laneq_internal): ... This... (aarch64_sqdmlal2_laneq_internal): ... And this. (aarch64_sqdmll2_n_internal): Split into... (aarch64_sqdmlsl2_n_internal): ... This... (aarch64_sqdmlal2_n_internal): ... And this. 2021-05-14 Prathamesh Kulkarni PR target/66791 * config/arm/arm_neon.h (vtst_s8): Replace call to vtst builtin with it's boolean logic equivalent. (vtst_s16): Likewise. (vtst_s32): Likewise. (vtst_u8): Likewise. (vtst_u16): Likewise. (vtst_u32): Likewise. (vtst_p8): Likewise. (vtst_p16): Likewise. (vtstq_s8): Likewise. (vtstq_s16): Likewise. (vtstq_s32): Likewise. (vtstq_u8): Likewise. (vtstq_u16): Likewise. (vtstq_u32): Likewise. (vtstq_p8): Likewise. (vtstq_p16): Likewise. * config/arm/arm_neon_builtins.def: Remove entry for vtst. * config/arm/neon.md (neon_vtst): Remove pattern. 2021-05-14 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_sqdmlal2): Merge into... (aarch64_sqdmll2): ... This. (aarch64_sqdmlsl2): Delete. (aarch64_sqdmlal2_lane): Merge this... (aarch64_sqdmlsl2_lane): ... And this... (aarch64_sqdmll2_lane): ... Into this. (aarch64_sqdmlal2_laneq): Merge this... (aarch64_sqdmlsl2_laneq): ... And this... (aarch64_sqdmll2_laneq): ... Into this. (aarch64_sqdmlal2_n): Merge this... (aarch64_sqdmlsl2_n): ... And this... (aarch64_sqdmll2_n): ... Into this. 2021-05-13 Martin Sebor PR middle-end/100574 * builtins.c (access_ref::get_ref): Improve detection of PHIs with all null arguments. 2021-05-13 Martin Sebor PR tree-optimization/93100 PR middle-end/98583 * tree-ssa-uninit.c (check_defs): Exclude intrinsic functions that don't modify referenced objects. 2021-05-13 Martin Jambor PR tree-optimization/100453 * tree-sra.c (sra_modify_assign): All const base accesses do not need refreshing, not just those from decl_pool. (sra_modify_assign): Do not refresh into a const base decl. 2021-05-13 Martin Liska * tree-ssa-dom.c: Remove m_simplifier. 2021-05-13 Richard Earnshaw PR target/100563 * config/arm/arm.c (arm_canonicalize_comparison): Correctly canonicalize DImode inequality comparisons against the maximum integral value. 2021-05-13 Jakub Jelinek PR tree-optimization/98856 * config/i386/i386.c (ix86_shift_rotate_cost): Add CODE argument. Expect V2DI and V4DI arithmetic right shifts to be emulated. (ix86_rtx_costs, ix86_add_stmt_cost): Adjust ix86_shift_rotate_cost caller. * config/i386/i386-expand.c (expand_vec_perm_2perm_interleave, expand_vec_perm_2perm_pblendv): New functions. (ix86_expand_vec_perm_const_1): Use them. * config/i386/sse.md (ashr3): Rename to ... (ashr3): ... this. (ashr3): New define_expand with VI248_AVX512BW iterator. (ashrv4di3): New define_expand. (ashrv2di3): Change condition to TARGET_SSE2, handle !TARGET_XOP and !TARGET_AVX512VL expansion. 2021-05-13 Uroš Bizjak PR target/100581 * config/i386/i386-expand.c (ix86_expand_sse_movcc): Force mode sizes < 16 to a register when constructing vpcmov pattern. * config/i386/mmx.md (*xop_pcmov_): Use MMXMODE124 mode. 2021-05-13 Martin Liska * gcov-io.c (gcov_write_block): Remove. (gcov_write_words): Likewise. (gcov_read_words): Re-implement using gcov_read_bytes. (gcov_allocate): Remove. (GCOV_BLOCK_SIZE): Likewise. (struct gcov_var): Remove most of the fields. (gcov_position): Implement with ftell. (gcov_rewrite): Remove setting of start and offset fields. (from_file): Re-format. (gcov_open): Remove setbuf call. It should not be needed. (gcov_close): Remove internal buffer handling. (gcov_magic): Use __builtin_bswap32. (gcov_write_counter): Use directly gcov_write_unsigned. (gcov_write_string): Use direct fwrite and do not round to 4 bytes. (gcov_seek): Use directly fseek. (gcov_write_tag): Use gcov_write_unsigned directly. (gcov_write_length): Likewise. (gcov_write_tag_length): Likewise. (gcov_read_bytes): Use directly fread. (gcov_read_unsigned): Use gcov_read_words. (gcov_read_counter): Likewise. (gcov_read_string): Use gcov_read_bytes. * gcov-io.h (GCOV_WORD_SIZE): Adjust to reflect that size is not in bytes, but words (4B). (GCOV_TAG_FUNCTION_LENGTH): Likewise. (GCOV_TAG_ARCS_LENGTH): Likewise. (GCOV_TAG_ARCS_NUM): Likewise. (GCOV_TAG_COUNTER_LENGTH): Likewise. (GCOV_TAG_COUNTER_NUM): Likewise. (GCOV_TAG_SUMMARY_LENGTH): Likewise. 2021-05-13 liuhongt PR target/94680 * config/i386/sse.md (ssedoublevecmode): Add attribute for V64QI/V32HI/V16SI/V4DI. (ssehalfvecmode): Add attribute for V2DI/V2DF. (*vec_concatv4si_0): Extend to VI124_128. (*vec_concat_0): New pre-reload splitter. * config/i386/predicates.md (movq_parallel): New predicate. 2021-05-13 Alexandre Oliva * targhooks.c (default_zero_call_used_regs): Retry using successfully-zeroed registers as sources. 2021-05-12 Tobias Burnus * omp-low.c (finish_taskreg_scan): Use the proper detach decl. 2021-05-12 Aldy Hernandez PR c/100521 * gimple-range.cc (range_of_builtin_call): Skip out on processing __builtin_clz when varying. 2021-05-12 Tom de Vries PR target/96005 * config/nvptx/nvptx-opts.h (enum ptx_version): New enum. * config/nvptx/nvptx.c (nvptx_file_start): Print .version according to ptx_version_option. * config/nvptx/nvptx.h (TARGET_PTX_6_3): Define. * config/nvptx/nvptx.md (define_insn "nvptx_shuffle") (define_insn "nvptx_vote_ballot"): Use sync variant for TARGET_PTX_6_3. * config/nvptx/nvptx.opt (ptx_version): Add enum. (mptx): Add option. * doc/invoke.texi (Nvidia PTX Options): Add mptx item. 2021-05-12 Richard Biener PR tree-optimization/100566 * tree-ssa-sccvn.c (dominated_by_p_w_unex): Properly handle allow_back for all edge queries. 2021-05-12 liuhongt PR target/99908 * config/i386/sse.md (_pblendvb): Add splitters for pblendvb of NOT mask register. 2021-05-12 Richard Biener PR tree-optimization/100519 * tree-ssa-reassoc.c (can_associate_p): Split into... (can_associate_op_p): ... this (can_associate_type_p): ... and this. (is_reassociable_op): Call can_associate_op_p. (break_up_subtract_bb): Call the appropriate predicates. (reassociate_bb): Likewise. 2021-05-12 Martin Liska * lto-wrapper.c (merge_and_complain): Merge -flto=arg options. (run_gcc): Use -flto argument detection for merged fdecoded_options. 2021-05-12 Martin Liska * lto-wrapper.c (print_lto_docs_link): New function. (run_gcc): Print warning about missing job server detection after we know NR of partitions. Do the same for -flto{,=1}. * opts.c (get_option_html_page): Support -flto option. 2021-05-12 Martin Liska * lto-wrapper.c (get_options_from_collect_gcc_options): Change return type. (append_option): Remove. (find_option): Rework to use the vector type. (remove_option): Remove. (merge_and_complain): Use vectors for cl_decoded_option data type arguments. (append_compiler_options): Likewise. (append_diag_options): Likewise. (append_linker_options): Likewise. (append_offload_options): Likewise. (compile_offload_image): Likewise. (compile_images_for_offload_targets): Likewise. (find_and_merge_options): Likewise. (run_gcc): Likewise. 2021-05-12 Bernd Edlinger PR debug/100515 * dwarf2out.c (dwarf2out_finish): Set have_multiple_function_sections with multi-range text_section. 2021-05-12 Martin Liska PR bootstrap/100560 * Makefile.in: Remove version.h from linker command line. 2021-05-12 Richard Biener PR middle-end/100547 * rtl.h (rtvec_alloc): Make argument size_t. * rtl.c (rtvec_alloc): Verify the count is less than INT_MAX. 2021-05-12 Jakub Jelinek PR middle-end/100508 * cfgexpand.c (expand_debug_expr): For DEBUG_EXPR_DECL with vector type, don't reuse DECL_RTL if it has different mode, instead force creation of a new DEBUG_EXPR. 2021-05-12 Jakub Jelinek Marc Glisse PR tree-optimization/94589 * match.pd ((X & Y) == X -> (X & ~Y) == 0, (X | Y) == Y -> (X & ~Y) == 0): New GIMPLE simplifications. 2021-05-12 Uroš Bizjak PR target/98218 * config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V2SF mode. * config/i386/mmx.md (MMXMODE124): New mode iterator. (V2FI): Ditto. (mmxintvecmode): New mode attribute. (mmxintvecmodelower): Ditto. (*mmx_maskcmpv2sf3_comm): New insn pattern. (*mmx_maskcmpv2sf3): Ditto. (vec_cmpv2sfv2si): New expander. (vcondv2si): Ditto. (mmx_vlendvps): New insn pattern. (vcond): Also handle V2SFmode. (vcondu): Ditto. (vcond_mask_): Ditto. 2021-05-11 Martin Sebor PR middle-end/21433 * expr.c (expand_expr_real_1): Replace unreachable code with an assert. 2021-05-11 Richard Biener * gimple-fold.c (gimple_fold_call): Do not call maybe_fold_reference on call arguments or the static chain. (fold_stmt_1): Do not call maybe_fold_reference on GIMPLE_ASM inputs. 2021-05-11 Martin Liska * builtins.def (DEF_HSAIL_BUILTIN): Remove. (DEF_HSAIL_ATOMIC_BUILTIN): Likewise. (DEF_HSAIL_SAT_BUILTIN): Likewise. (DEF_HSAIL_INTR_BUILTIN): Likewise. (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise. * doc/frontends.texi: Remove BRIG. * doc/install.texi: Likewise. * doc/invoke.texi: Likewise. * doc/standards.texi: Likewise. * brig-builtins.def: Removed. * brig/ChangeLog: Removed. * brig/Make-lang.in: Removed. * brig/brig-builtins.h: Removed. * brig/brig-c.h: Removed. * brig/brig-lang.c: Removed. * brig/brigfrontend/brig-arg-block-handler.cc: Removed. * brig/brigfrontend/brig-atomic-inst-handler.cc: Removed. * brig/brigfrontend/brig-basic-inst-handler.cc: Removed. * brig/brigfrontend/brig-branch-inst-handler.cc: Removed. * brig/brigfrontend/brig-cmp-inst-handler.cc: Removed. * brig/brigfrontend/brig-code-entry-handler.cc: Removed. * brig/brigfrontend/brig-code-entry-handler.h: Removed. * brig/brigfrontend/brig-comment-handler.cc: Removed. * brig/brigfrontend/brig-control-handler.cc: Removed. * brig/brigfrontend/brig-copy-move-inst-handler.cc: Removed. * brig/brigfrontend/brig-cvt-inst-handler.cc: Removed. * brig/brigfrontend/brig-fbarrier-handler.cc: Removed. * brig/brigfrontend/brig-function-handler.cc: Removed. * brig/brigfrontend/brig-function.cc: Removed. * brig/brigfrontend/brig-function.h: Removed. * brig/brigfrontend/brig-inst-mod-handler.cc: Removed. * brig/brigfrontend/brig-label-handler.cc: Removed. * brig/brigfrontend/brig-lane-inst-handler.cc: Removed. * brig/brigfrontend/brig-machine.c: Removed. * brig/brigfrontend/brig-machine.h: Removed. * brig/brigfrontend/brig-mem-inst-handler.cc: Removed. * brig/brigfrontend/brig-module-handler.cc: Removed. * brig/brigfrontend/brig-queue-inst-handler.cc: Removed. * brig/brigfrontend/brig-seg-inst-handler.cc: Removed. * brig/brigfrontend/brig-signal-inst-handler.cc: Removed. * brig/brigfrontend/brig-to-generic.cc: Removed. * brig/brigfrontend/brig-to-generic.h: Removed. * brig/brigfrontend/brig-util.cc: Removed. * brig/brigfrontend/brig-util.h: Removed. * brig/brigfrontend/brig-variable-handler.cc: Removed. * brig/brigfrontend/hsa-brig-format.h: Removed. * brig/brigfrontend/phsa.h: Removed. * brig/brigspec.c: Removed. * brig/config-lang.in: Removed. * brig/gccbrig.texi: Removed. * brig/lang-specs.h: Removed. * brig/lang.opt: Removed. 2021-05-11 Richard Biener PR ipa/100513 * ipa-param-manipulation.c (ipa_param_body_adjustments::modify_call_stmt): Avoid altering SSA_NAME_DEF_STMT by adjusting the calls LHS via gimple_call_lhs_ptr. 2021-05-11 Alex Coplan PR target/99725 * config/arm/arm.c (cmse_nonsecure_call_inline_register_clear): Avoid emitting CFA adjusts on the sp if we have the fp. 2021-05-11 Richard Sandiford * config/aarch64/iterators.md (VMUL_CHANGE_NLANES): Delete. (VMULD): New iterator. (VCOND): Handle V4HF and V8HF. (VCONQ): Fix entry for V2SF. * config/aarch64/aarch64-simd.md (mul_lane3): Use VMULD instead of VMUL. Use a 64-bit vector mode for the indexed operand. (*aarch64_mul3_elt_): Merge with... (mul_laneq3): ...this define_insn. Use VMUL instead of VDQSF. Use a 128-bit vector mode for the indexed operand. Use stype for the scheduling type. 2021-05-11 Richard Biener * gimple-fold.c (maybe_fold_reference): Only return is_gimple_min_invariant values. 2021-05-11 Richard Biener PR middle-end/100509 * gimple-fold.c (fold_gimple_assign): Only call get_symbol_constant_value on register type symbols. 2021-05-11 Srinath Parvathaneni Joe Ramsay PR target/100419 * config/arm/arm_mve.h (__arm_vstrwq_scatter_offset): Fix wrong arguments. (__arm_vcmpneq): Remove duplicate definition. (__arm_vstrwq_scatter_offset_p): Likewise. (__arm_vmaxq_x): Likewise. (__arm_vmlsdavaq): Likewise. (__arm_vmlsdavaxq): Likewise. (__arm_vmlsdavq_p): Likewise. (__arm_vmlsdavxq_p): Likewise. (__arm_vrmlaldavhaq): Likewise. (__arm_vstrbq_p): Likewise. (__arm_vstrbq_scatter_offset): Likewise. (__arm_vstrbq_scatter_offset_p): Likewise. (__arm_vstrdq_scatter_offset): Likewise. (__arm_vstrdq_scatter_offset_p): Likewise. (__arm_vstrdq_scatter_shifted_offset): Likewise. (__arm_vstrdq_scatter_shifted_offset_p): Likewise. 2021-05-11 Jakub Jelinek PR middle-end/100471 * omp-low.c (lower_omp_task_reductions): For OMP_TASKLOOP, if data is 0, bypass the reduction loop including GOMP_taskgroup_reduction_unregister call. 2021-05-11 Kewen Lin * config/rs6000/rs6000.c (struct rs6000_cost_data): New member costing_for_scalar. (rs6000_density_test): Early return if costing_for_scalar is true. (rs6000_init_cost): Init costing_for_scalar of rs6000_cost_data. 2021-05-11 Kewen Lin * doc/tm.texi: Regenerated. * target.def (init_cost): Add new parameter costing_for_scalar. * targhooks.c (default_init_cost): Adjust for new parameter. * targhooks.h (default_init_cost): Likewise. * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise. (vect_compute_single_scalar_iteration_cost): Likewise. (vect_analyze_loop_2): Likewise. * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise. (vect_bb_vectorization_profitable_p): Likewise. * tree-vectorizer.h (init_cost): Likewise. * config/aarch64/aarch64.c (aarch64_init_cost): Likewise. * config/i386/i386.c (ix86_init_cost): Likewise. * config/rs6000/rs6000.c (rs6000_init_cost): Likewise. 2021-05-11 Kewen Lin * config/rs6000/rs6000.c (rs6000_vect_nonmem): Renamed to vect_nonmem and moved into... (struct rs6000_cost_data): ...here. (rs6000_init_cost): Use vect_nonmem of cost_data instead. (rs6000_add_stmt_cost): Likewise. (rs6000_finish_cost): Likewise. 2021-05-10 Eric Botcazou * range-op.cc (get_bool_state): Adjust head comment. (operator_not_equal::op1_range): Fix comment. (operator_bitwise_xor::op1_range): Remove call to gcc_unreachable. 2021-05-10 Martin Sebor PR middle-end/100425 PR middle-end/100510 * gimple-ssa-warn-alloca.c (pass_walloca::firast_time_p): Rename... (pass_walloca::xlimit_certain_p): ...to this. (pass_walloca::gate): Execute for any kind of handled warning. (pass_walloca::execute): Avoid issuing "maybe" and "unbounded" warnings when xlimit_certain_p is set. 2021-05-10 Pat Haugen * config/rs6000/rs6000.c (rs6000_ira_change_pseudo_allocno_class): Return ALTIVEC_REGS if that is best_class. (rs6000_compute_pressure_classes): Add ALTIVEC_REGS. 2021-05-10 Christophe Lyon * config/arm/arm.h (CPP_SPEC): Remove error message about -mfloat-abi. 2021-05-10 Martin Jambor * ipa-prop.h (IPA_NODE_REF): Removed. (IPA_NODE_REF_GET_CREATE): Likewise. (IPA_EDGE_REF): Likewise. (IPA_EDGE_REF_GET_CREATE): Likewise. (IS_VALID_JUMP_FUNC_INDEX): Likewise. * ipa-cp.c (print_all_lattices): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (ipcp_versionable_function_p): Likewise. (push_node_to_stack): Likewise. (pop_node_from_stack): Likewise. (set_single_call_flag): Replaced two IPA_NODE_REF with one single direct use of ipa_node_params_sum. (initialize_node_lattices): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (ipa_context_from_jfunc): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (ipcp_verify_propagated_values): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (self_recursively_generated_p): Likewise. (propagate_scalar_across_jump_function): Likewise. (propagate_context_across_jump_function): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum, moved the lookup after the early exit. Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (propagate_bits_across_jump_function): Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum. (propagate_vr_across_jump_function): Likewise. (propagate_aggregate_lattice): Likewise. (propagate_aggs_across_jump_function): Likewise. (propagate_constants_across_call): Likewise, also replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (good_cloning_opportunity_p): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (estimate_local_effects): Likewise. (add_all_node_vals_to_toposort): Likewise. (propagate_constants_topo): Likewise. (ipcp_propagate_stage): Likewise. (ipcp_discover_new_direct_edges): Likewise. (calls_same_node_or_its_all_contexts_clone_p): Likewise. (cgraph_edge_brings_value_p): Likewise (in both overloaded functions). (get_info_about_necessary_edges): Likewise. (want_remove_some_param_p): Likewise. (create_specialized_node): Likewise. (self_recursive_pass_through_p): Likewise. (self_recursive_agg_pass_through_p): Likewise. (find_more_scalar_values_for_callers_subset): Likewise and also replaced IPA_EDGE_REF with direct uses of ipa_edge_args_sum, in one case replacing two of those with a single query. (find_more_contexts_for_caller_subset): Likewise for the ipa_polymorphic_call_context overload. (intersect_aggregates_with_edge): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum. (find_aggregate_values_for_callers_subset): Likewise, also reusing results of ipa_edge_args_sum->get. (cgraph_edge_brings_all_scalars_for_node): Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum, replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (cgraph_edge_brings_all_agg_vals_for_node): Likewise, moved node summary query after the early exit and reused the result later. (decide_about_value): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (decide_whether_version_node): Likewise. Removed re-querying for summaries after cloning. (spread_undeadness): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (has_undead_caller_from_outside_scc_p): Likewise, reusing results of some queries. (identify_dead_nodes): Likewise. (ipcp_store_bits_results): Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum. (ipcp_store_vr_results): Likewise. * ipa-fnsummary.c (evaluate_properties_for_edge): Likewise. (ipa_fn_summary_t::duplicate): Likewise. (analyze_function_body): Likewise. (estimate_calls_size_and_time): Likewise. (ipa_cached_call_context::duplicate_from): Likewise. (ipa_call_context::equal_to): Likewise. (remap_edge_params): Likewise. (ipa_merge_fn_summary_after_inlining): Likewise. (inline_read_section): Likewise. * ipa-icf.c (sem_function::param_used_p): Likewise. * ipa-modref.c (compute_parm_map): Likewise. (compute_parm_map): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (get_access_for_fnspec): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. * ipa-profile.c (check_argument_count): Likewise. * ipa-prop.c (ipa_alloc_node_params): Replaced IPA_NODE_REF_GET_CREATE with a direct use of ipa_node_params_sum. (ipa_initialize_node_params): Likewise. (ipa_print_node_jump_functions_for_edge): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum and reused the query result. (ipa_compute_jump_functions_for_edge): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (ipa_note_param_call): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum and reused the result of the query. (ipa_analyze_node): Likewise. (ipa_analyze_controlled_uses): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (update_jump_functions_after_inlining): Replaced IPA_EDGE_REF with direct uses of ipa_edge_args_sum. (update_indirect_edges_after_inlining): Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. Removed superficial re-querying the top edge summary. (propagate_controlled_uses): Replaced IPA_NODE_REF with direct uses of ipa_node_params_sum and replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (ipa_propagate_indirect_call_infos): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (ipa_edge_args_sum_t::duplicate): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (ipa_print_node_params): Likewise. (ipa_write_node_info): Likewise and also replaced IPA_EDGE_REF with direct uses of ipa_edge_args_sum. (ipa_read_edge_info): Replaced IPA_EDGE_REF with a direct use of ipa_edge_args_sum. (ipa_read_node_info): Replaced IPA_NODE_REF with a direct use of ipa_node_params_sum. (ipa_prop_write_jump_functions): Likewise. Move variable node to the scopes where it is used. 2021-05-10 Uroš Bizjak * config/i386/i386-expand.c (ix86_expand_sse_movcc) : Force op_true to register. 2021-05-10 Christophe Lyon * config/arm/iterators.md (MVE_FP_COMPARISONS): New. * config/arm/mve.md (mve_vcmpq_f) (mve_vcmpq_n_f): New, merge all vcmp_*f* patterns. (mve_vcmpeqq_f, mve_vcmpeqq_n_f, mve_vcmpgeq_f) (mve_vcmpgeq_n_f, mve_vcmpgtq_f) (mve_vcmpgtq_n_f, mve_vcmpleq_f) (mve_vcmpleq_n_f, mve_vcmpltq_f) (mve_vcmpltq_n_f, mve_vcmpneq_f) (mve_vcmpneq_n_f): Remove. * config/arm/unspecs.md (VCMPEQQ_F, VCMPEQQ_N_F, VCMPGEQ_F) (VCMPGEQ_N_F, VCMPGTQ_F, VCMPGTQ_N_F, VCMPLEQ_F, VCMPLEQ_N_F) (VCMPLTQ_F, VCMPLTQ_N_F, VCMPNEQ_F, VCMPNEQ_N_F): Remove. 2021-05-10 Christophe Lyon * config/arm/iterators.md (MVE_COMPARISONS): New. (mve_cmp_op): New. (mve_cmp_type): New. * config/arm/mve.md (mve_vcmpq_): New, merge all mve_vcmp patterns. (mve_vcmpneq_, mve_vcmpcsq_n_, mve_vcmpcsq_) (mve_vcmpeqq_n_, mve_vcmpeqq_, mve_vcmpgeq_n_) (mve_vcmpgeq_, mve_vcmpgtq_n_, mve_vcmpgtq_) (mve_vcmphiq_n_, mve_vcmphiq_, mve_vcmpleq_n_) (mve_vcmpleq_, mve_vcmpltq_n_, mve_vcmpltq_) (mve_vcmpneq_n_, mve_vcmpltq_n_, mve_vcmpltq_) (mve_vcmpneq_n_): Remove. 2021-05-10 Christophe Lyon * config/arm/arm_mve.h (__arm_vcmp*): Remove 's' suffix. * config/arm/arm_mve_builtins.def (vcmp*): Remove 's' suffix. * config/arm/mve.md (mve_vcmp*): Remove 's' suffix in pattern names. 2021-05-10 Christophe Lyon * config/arm/arm_mve_builtins.def (vcmpneq_u): Remove. (vcmpneq_n_u): Likewise. (vcmpeqq_u,): Likewise. (vcmpeqq_n_u): Likewise. * config/arm/iterators.md (supf): Remove VCMPNEQ_U, VCMPEQQ_U, VCMPEQQ_N_U and VCMPNEQ_N_U. * config/arm/mve.md (mve_vcmpneq): Remove iteration. (mve_vcmpeqq_n): Likewise. (mve_vcmpeqq): Likewise. (mve_vcmpneq_n): Likewise. 2021-05-10 Christophe Lyon * config/arm/arm_mve.h (__arm_vcmpeq*u*, __arm_vcmpne*u*): Call the 's' version of the builtin. 2021-05-10 Richard Biener PR tree-optimization/100492 * tree-loop-distribution.c (find_seed_stmts_for_distribution): Find nothing when the loop contains an irreducible region. 2021-05-10 Richard Biener PR middle-end/100464 PR c++/100468 * gimple-fold.c (canonicalize_constructor_val): Do not set TREE_ADDRESSABLE. 2021-05-10 Richard Biener PR tree-optimization/100434 * tree-ssa-dse.c (initialize_ao_ref_for_dse): Handle call LHS. (dse_optimize_stmt): Handle call LHS by dropping the LHS or the whole call if it doesn't have other side-effects. (pass_dse::execute): Adjust. 2021-05-10 Martin Liska * Makefile.in: Add missing genversion rule. 2021-05-10 Alex Coplan PR target/99960 * config/arm/mve.md (*mve_mov): Simplify output code. Use vldrw.u32 and vstrw.32 for V2D[IF]mode loads and stores. 2021-05-10 Martin Liska * builtins.c (is_builtin_name): Use startswith function instead of strncmp. * collect2.c (main): Likewise. (has_lto_section): Likewise. (scan_libraries): Likewise. * coverage.c (coverage_checksum_string): Likewise. (coverage_init): Likewise. * dwarf2out.c (is_cxx): Likewise. (gen_compile_unit_die): Likewise. * gcc-ar.c (main): Likewise. * gcc.c (init_spec): Likewise. (read_specs): Likewise. (execute): Likewise. (check_live_switch): Likewise. * genattrtab.c (write_attr_case): Likewise. (IS_ATTR_GROUP): Likewise. * gencfn-macros.c (main): Likewise. * gengtype.c (type_for_name): Likewise. (gen_rtx_next): Likewise. (get_file_langdir): Likewise. (write_local): Likewise. * genmatch.c (get_operator): Likewise. (get_operand_type): Likewise. (expr::gen_transform): Likewise. * genoutput.c (validate_optab_operands): Likewise. * incpath.c (add_sysroot_to_chain): Likewise. * langhooks.c (lang_GNU_C): Likewise. (lang_GNU_CXX): Likewise. (lang_GNU_Fortran): Likewise. (lang_GNU_OBJC): Likewise. * lto-wrapper.c (run_gcc): Likewise. * omp-general.c (omp_max_simt_vf): Likewise. * omp-low.c (omp_runtime_api_call): Likewise. * opts-common.c (parse_options_from_collect_gcc_options): Likewise. * read-rtl-function.c (function_reader::read_rtx_operand_r): Likewise. * real.c (real_from_string): Likewise. * selftest.c (assert_str_startswith): Likewise. * timevar.c (timer::validate_phases): Likewise. * tree.c (get_file_function_name): Likewise. * ubsan.c (ubsan_use_new_style_p): Likewise. * varasm.c (default_function_rodata_section): Likewise. (incorporeal_function_p): Likewise. (default_section_type_flags): Likewise. * system.h (startswith): Define startswith. 2021-05-10 Martin Liska * bitmap.h (class auto_bitmap): Remove __cplusplus >= 201103. * config/aarch64/aarch64.c: Likewise. * gimple-ssa-store-merging.c (store_immediate_info::store_immediate_info): Likewise. * sbitmap.h: Likewise. 2021-05-10 Martin Liska * Makefile.in: Rename gcov-iov to genversion and depend on version.h (instead of gcov-iov.h). * gcov-io.h: Include version.h instread of gcov-iov.h. * gengtype-state.c (read_state_version): Likewise. * gcov-iov.c: Moved to... * genversion.c: ...here. * lto-streamer.h (LTO_major_version): Define it with GCC_major_version. * version.c: Removed. * version.h: Removed. 2021-05-10 Claudiu Zissulescu * config/arc/arc.md (UNSPEC_ARC_DMPYWH): Define. * config/arc/simdext.md (VCT): Add predicates for iterator elements. (EMUVEC): Define. (voptab): Likewise. (vec_widen_mult_hi_v4hi): Change pattern predicate. (v2si3): New patterns. (neg): Likewise. (reduc_plus_scal_v4hi): Likewise. (reduc_plus_scal_v2si): Likewise. (vec_duplicatev2si): Likewise. (vec_duplicatev4hi): Likewise. 2021-05-10 Claudiu Zissulescu * config/arc/simdext.md: Format and cleanup file. 2021-05-10 Claudiu Zissulescu * config/arc/simdext.md (movmisalignv2hi): Allow misaligned access only when munaligned-access option is on. (movmisalign): Likewise. 2021-05-10 Claudiu Zissulescu * common/config/arc/arc-common.c (arc_handle_option): Remove dot from string. * config/arc/arc.c (arc_reorg): Remove underscore from string. 2021-05-10 Claudiu Zissulescu * config/arc/arc.h (CLZ_DEFINED_VALUE_AT_ZERO): Define. (CTZ_DEFINED_VALUE_AT_ZERO): Likewise. * config/arc/arc.md (clrsbsi2): Cleanup pattern. (norm_f): Likewise. (ffs): Likewise. (ffs_f): Likewise. (clzsi2): Use fls instruction when available. (arc_clzsi2): Likewise. 2021-05-10 Claudiu Zissulescu * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add r26 and r27. 2021-05-10 Claudiu Zissulescu * doc/extend.texi (__builtin_arc_sr): Swap arguments. 2021-05-10 Bernd Edlinger PR middle-end/100467 * toplev.c (compile_file): Call insn_locations_init before targetm.asm_out.code_end. 2021-05-07 Andrew Stubbs Revert: 2021-05-07 Andrew Stubbs * config/gcn/gcn.c (gcn_scalar_mode_supported_p): Disable TImode. 2021-05-07 Jakub Jelinek Andrew Stubbs PR target/100418 * builtins.c (try_store_by_multiple_pieces): Use force_operand for emit_move_insn operands. 2021-05-07 Eric Botcazou * cfgexpand.c (expand_gimple_basic_block): Do not inherit a current location for the outgoing edges of an empty block. * dwarf2out.c (add_subscript_info): Retrieve the bounds and index type by means of the get_array_descr_info langhook, if it is set and returns true. Remove obsolete code dealing with unnamed subtypes. 2021-05-07 Andrew MacLeod * gimple-range-cache.cc (ssa_block_ranges): Virtualize. (sbr_vector): Renamed from ssa_block_cache. (sbr_vector::sbr_vector): Allocate from obstack abd initialize. (ssa_block_ranges::~ssa_block_ranges): Remove. (sbr_vector::set_bb_range): Use varying and undefined cached values. (ssa_block_ranges::set_bb_varying): Remove. (sbr_vector::get_bb_range): Adjust assert. (sbr_vector::bb_range_p): Adjust assert. (~block_range_cache): No freeing loop required. (block_range_cache::get_block_ranges): Remove. (block_range_cache::set_bb_range): Inline get_block_ranges. (block_range_cache::set_bb_varying): Remove. * gimple-range-cache.h (set_bb_varying): Remove prototype. * value-range.h (irange_allocator::get_memory): New. 2021-05-07 Andrew MacLeod * gimple-range-cache.cc (non_null_ref::non_null_deref_p): Search dominator tree is available and requested. (ranger_cache::ssa_range_in_bb): Don't search dom tree here. (ranger_cache::fill_block_cache): Don't search dom tree here either. * gimple-range-cache.h (non_null_deref_p): Add dom_search param. 2021-05-07 Andrew MacLeod * gimple-range.cc (gimple_ranger::range_on_exit): Handle block with only PHI nodes better. 2021-05-07 Andrew MacLeod * gimple-range-edge.h (gimple_outgoing_range): Rename from outgoing_range. (gcond_edge_range): Export prototype. * gimple-range-edge.cc (gcond_edge_range): New. (gimple_outgoing_range::edge_range_p): Use gcond_edge_range. * gimple-range-gori.h (gori_compute): Use gimple_outgoing_range. 2021-05-07 Andrew MacLeod * gimple-range-edge.cc (outgoing_range::calc_switch_ranges): Compute default range into a temp and allocate only what is needed. 2021-05-07 Andrew MacLeod * range-op.cc (operator_trunc_mod::wi_fold): x % 0 is UNDEFINED. 2021-05-07 Andrew MacLeod * gimple-range.h (gimple_range_global): Pick up parameter initial values, and use-before defined locals are UNDEFINED. 2021-05-07 Eric Botcazou * doc/extend.texi (scalar_storage_order): Mention effect on pointer and vector fields. * tree.h (reverse_storage_order_for_component_p): Return false if the type is a pointer. 2021-05-07 Andrew Stubbs * config/gcn/gcn.c (gcn_scalar_mode_supported_p): Disable TImode. 2021-05-07 Uroš Bizjak PR target/98218 * config/i386/i386-expand.c (ix86_expand_sse_movcc): Handle V8QI, V4HI and V2SI modes. * config/i386/mmx.md (mmx_pblendvb): New insn pattern. * config/i386/sse.md (unspec): Move UNSPEC_BLENDV ... * config/i386/i386.md (unspec): ... here. 2021-05-07 Tobias Burnus Tom de Vries * omp-low.c (lower_rec_simd_input_clauses): Set max_vf = 1 if a truth_value_p reduction variable is nonintegral. 2021-05-07 Uroš Bizjak PR target/100445 * config/i386/i386-expand.c (ix86_use_mask_cmp_p): Return false for mode sizes < 16. 2021-05-07 Jakub Jelinek PR target/100445 * config/i386/mmx.md (*xop_pcmov_): New define_insn. 2021-05-06 Martin Jambor * ipa-sra.c (ipa_sra_dump_all_summaries): Dump edge summaries even when there is no function summary. (ipa_sra_summarize_function): produce edge summaries even when bailing out early. 2021-05-06 Tom Tromey * godump.c (string_hash_eq): Remove. (go_finish): Use htab_eq_string. 2021-05-06 Tom Tromey * gengtype-state.c (read_state): Use htab_eq_string. (string_eq): Remove. 2021-05-06 Tom Tromey * gensupport.c (htab_eq_string): Remove. 2021-05-06 Bernd Edlinger PR ipa/97937 * debug.h (gcc_debug_hooks): Add set_ignored_loc function pointer. * dwarf2out.h (dw_fde_node::ignored_debug): New data item. * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Add dummy set_ignored_loc callbacks. * debug.c (do_nothing_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * dwarf2out.c (text_section_used, cold_text_section_used): Remove. (in_text_section_p, last_text_label, last_cold_label, switch_text_ranges, switch_cold_ranges): New data items. (dwarf2out_note_section_used): Remove. (dwarf2out_begin_prologue): Set fde->ignored_debug and in_text_section_p. (mark_ignored_debug_section): New helper function. (dwarf2out_end_epilogue, dwarf2out_switch_text_section): Call mark_ignored_debug_section. (dwarf2_debug_hooks): Use dwarf2out_set_ignored_loc. (dwarf2_lineno_debug_hooks): Use dummy for set_ignored_loc. (size_of_aranges): Adjust formula for multi-part text ranges size. (output_aranges): Output multi-part text ranges. (dwarf2out_set_ignored_loc): New callback function. (dwarf2out_finish): Output multi-part text ranges. (dwarf2out_c_finalize): Clear new data items. * final.c (final_start_function_1): Call set_ignored_loc callback. (final_scan_insn_1): Likewise. * ggc-page.c (gt_ggc_mx): New helper function. * stringpool.c (gt_pch_nx): Likewise. 2021-05-06 Richard Biener * timevar.def (TV_TREE_INSERT_PHI_NODES): Remove. (TV_TREE_SSA_REWRITE_BLOCKS): Likewise. (TV_TREE_INTO_SSA): New. * tree-into-ssa.c (insert_phi_nodes): Do not account separately. (rewrite_blocks): Likewise. (pass_data_build_ssa): Account to TV_TREE_INTO_SSA. 2021-05-06 Jakub Jelinek * tree-ssa-phiopt.c (value_replacement, minmax_replacement, abs_replacement, xor_replacement, cond_removal_in_popcount_clz_ctz_pattern, replace_phi_edge_with_variable): Change type of phi argument from gimple * to gphi *. 2021-05-06 Richard Biener * tree-ssa-loop-split.c (split_loop): Delay updating SSA form. Output an opt-info message. (do_split_loop_on_cond): Likewise. (tree_ssa_split_loops): Update SSA form here. 2021-05-06 Richard Biener * tree-inline.c (tree_function_versioning): Fix DECL_BY_REFERENCE return variable removal. 2021-05-06 Marius Hillenbrand * config/s390/s390-builtins.def (O_M5, O1_M5, ...): Remove unused macros. (s390_vec_permi_s64, s390_vec_permi_b64, s390_vec_permi_u64) (s390_vec_permi_dbl, s390_vpdi): Use the O3_U2 type for the immediate operand. * config/s390/s390.c (s390_const_operand_ok): Remove unused values. 2021-05-06 Jakub Jelinek PR tree-optimization/94589 * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Call spaceship_replacement. (cond_only_block_p, spaceship_replacement): New functions. 2021-05-06 Richard Biener PR ipa/100373 * tree-emutls.c (gen_emutls_addr): Pass in whether we're dealing with a debug use and only query existing addresses if so. (lower_emutls_1): Avoid splitting out addresses for debug stmts, reset the debug stmt when we fail to find existing lowered addresses. (lower_emutls_phi_arg): Set wi.stmt. 2021-05-06 Christoph Muellner PR target/100266 * config/riscv/riscv.c (riscv_block_move_loop): Use cbranch helper. * config/riscv/riscv.md (cbranch4): Generate helpers. (stack_protect_test): Use cbranch helper. 2021-05-05 Eric Botcazou PR target/100402 * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target, always return the establisher frame for __builtin_frame_address (0). 2021-05-05 Ivan Sorokin PR target/91400 * config/i386/i386-builtins.c (ix86_cpu_model_type_node): New. (ix86_cpu_model_var): Likewise. (ix86_cpu_features2_type_node): Likewise. (ix86_cpu_features2_var): Likewise. (fold_builtin_cpu): Cache __cpu_model and __cpu_features2 with their types. 2021-05-05 Martin Sebor * passes.def (pass_warn_printf): Run after SSA. 2021-05-05 Prathamesh Kulkarni * config/arm/neon.md (neon_vtst_combine): New pattern. * config/arm/predicates.md (minus_one_operand): New predicate. 2021-05-05 Jeff Law * config/avr/avr.md: Remove references to CC_STATUS_INIT. 2021-05-05 Stefan Schulze Frielinghaus PR rtl-optimization/100263 * postreload.c (move2add_valid_value_p): Ensure register can change mode. 2021-05-05 Eric Botcazou PR rtl-optimization/100411 * cfgcleanup.c (try_crossjump_to_edge): Also skip end of prologue and beginning of function markers. 2021-05-05 Jeff Law * config/cr16/cr16.h (NOTICE_UPDATE_CC): Remove. * config/cr16/cr16.c (notice_update_cc): Remove. * config/cr16/cr16-protos.h (notice_update_cc): Remove. 2021-05-05 Uroš Bizjak PR target/98218 * config/i386/i386-expand.c (ix86_expand_int_sse_cmp): Handle V8QI, V4HI and V2SI modes. * config/i386/i386.c (ix86_build_const_vector): Handle V2SImode. (ix86_build_signbit_mask): Ditto. * config/i386/mmx.md (MMXMODE14): New mode iterator. (3): New expander. (*mmx_3): New insn pattern. (3): New expander. (*mmx_3): New insn pattern. (vec_cmp): New expander. (vec_cmpu): Ditto. (vcond): Ditto. (vcondu): Ditto. (vcond_mask_): Ditto. 2021-05-05 Eric Botcazou * dwarf2out.c (loc_list_from_tree_1) : During early DWARF, do not expand the VALUE_EXPR of variables put in the non-local frame. * gimplify.c (gimplify_type_sizes) : If the type is not to be ignored for debug info, ensure its variable offsets are not. 2021-05-05 Richard Biener PR tree-optimization/79333 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Fold stmt following SSA edges. 2021-05-05 Richard Biener PR middle-end/100394 * calls.c (expand_call): Preserve possibly throwing calls. * cfgexpand.c (expand_call_stmt): When a call can throw signal RTL expansion there are side-effects. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Simplify, mark all possibly throwing stmts necessary unless we can elide dead EH. * tree-ssa-dse.c (pass_dse::execute): Preserve exceptions unless -fdelete-dead-exceptions. * tree.h (DECL_PURE_P): Add note about exceptions. 2021-05-05 Alexandre Oliva * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Make it unconditional. 2021-05-04 David Edelsohn * config/rs6000/rs6000-call.c (rs6000_output_mi_thunk): Use get_fnname_from_decl for name of thunk. * config/rs6000/rs6000.c (rs6000_declare_alias): Use assemble_name and ASM_OUTPUT_LABEL. (rs6000_xcoff_declare_function_name): Use assemble_name and ASM_OUTPUT_LABEL. (rs6000_xcoff_declare_object_name): Use ASM_OUTPUT_LABEL. (rs6000_xcoff_encode_section_info): Don't add mapping class for aliases. Always add [DS] mapping class to primary FUNCTION_DECL. (rs6000_asm_weaken_decl): Don't explicitly add [DS]. 2021-05-04 Martin Sebor PR middle-end/100307 * builtins.c (compute_objsize_r): Clear base0 for pointers. 2021-05-04 Jeff Law * config/bfin/bfin.h (NOTICE_UPDATE_CC): Remove. 2021-05-04 Segher Boessenkool * caller-save.c: Remove CC0. * cfgcleanup.c: Remove CC0. * cfgrtl.c: Remove CC0. * combine.c: Remove CC0. * compare-elim.c: Remove CC0. * conditions.h: Remove CC0. * config/h8300/h8300.h: Remove CC0. * config/h8300/h8300-protos.h: Remove CC0. * config/h8300/peepholes.md: Remove CC0. * config/i386/x86-tune-sched.c: Remove CC0. * config/m68k/m68k.c: Remove CC0. * config/rl78/rl78.c: Remove CC0. * config/sparc/sparc.c: Remove CC0. * config/xtensa/xtensa.c: Remove CC0. (gen_conditional_move): Use pc_rtx instead of cc0_rtx in a piece of RTL where that is used as a placeholder only. * cprop.c: Remove CC0. * cse.c: Remove CC0. * cselib.c: Remove CC0. * df-problems.c: Remove CC0. * df-scan.c: Remove CC0. * doc/md.texi: Remove CC0. Adjust an example. * doc/rtl.texi: Remove CC0. Adjust an example. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Remove CC0. * emit-rtl.c: Remove CC0. * final.c: Remove CC0. * fwprop.c: Remove CC0. * gcse-common.c: Remove CC0. * gcse.c: Remove CC0. * genattrtab.c: Remove CC0. * genconfig.c: Remove CC0. * genemit.c: Remove CC0. * genextract.c: Remove CC0. * gengenrtl.c: Remove CC0. * genrecog.c: Remove CC0. * haifa-sched.c: Remove CC0. * ifcvt.c: Remove CC0. * ira-costs.c: Remove CC0. * ira.c: Remove CC0. * jump.c: Remove CC0. * loop-invariant.c: Remove CC0. * lra-constraints.c: Remove CC0. * lra-eliminations.c: Remove CC0. * optabs.c: Remove CC0. * postreload-gcse.c: Remove CC0. * postreload.c: Remove CC0. * print-rtl.c: Remove CC0. * read-rtl-function.c: Remove CC0. * reg-notes.def: Remove CC0. * reg-stack.c: Remove CC0. * reginfo.c: Remove CC0. * regrename.c: Remove CC0. * reload.c: Remove CC0. * reload1.c: Remove CC0. * reorg.c: Remove CC0. * resource.c: Remove CC0. * rtl.c: Remove CC0. * rtl.def: Remove CC0. * rtl.h: Remove CC0. * rtlanal.c: Remove CC0. * sched-deps.c: Remove CC0. * sched-rgn.c: Remove CC0. * shrink-wrap.c: Remove CC0. * simplify-rtx.c: Remove CC0. * system.h: Remove CC0. Poison NOTICE_UPDATE_CC, CC_STATUS_MDEP_INIT, CC_STATUS_MDEP, and CC_STATUS. * target.def: Remove CC0. * valtrack.c: Remove CC0. * var-tracking.c: Remove CC0. 2021-05-04 Richard Biener PR tree-optimization/100414 * tree-ssa-phiopt.c (get_non_trapping): Do not compute dominance info here. (tree_ssa_phiopt_worker): But unconditionally here. 2021-05-04 Tobias Burnus * omp-low.c (lower_rec_input_clauses, lower_reduction_clauses): Handle && and || with floating-point and complex arguments. 2021-05-04 Eric Botcazou * tree-inline.c (insert_debug_decl_map): Delete. (copy_debug_stmt): Minor tweak. (setup_one_parameter): Do not use a variable if the value is either a read-only DECL or a non-addressable local variable in the caller. In this case, insert the debug-only variable in the map manually. (expand_call_inline): Do not generate a CLOBBER for these values. * tree-inline.h (debug_map): Minor tweak. 2021-05-04 Eric Botcazou * builtins.c (builtin_with_linkage_p): Return true for stp[n]cpy. * symtab.c (symtab_node::output_to_lto_symbol_table_p): Tidy up. 2021-05-04 Richard Biener PR tree-optimization/100329 * tree-ssa-reassoc.c (can_reassociate_p): Do not reassociate asm goto defs. (insert_stmt_after): Assert we're not running into asm goto. 2021-05-04 Richard Biener PR tree-optimization/100398 * tree-ssa-dse.c (pass_dse::execute): Preserve control altering stmts. 2021-05-04 Prathamesh Kulkarni * builtins.c (try_store_by_multiple_pieces): Fix constfun's prototype. 2021-05-04 Alexandre Oliva * builtins.c (try_store_by_multiple_pieces): New. (expand_builtin_memset_args): Use it. If target_char_cast fails, proceed as for non-constant val. Pass len's ctz to... * expr.c (clear_storage_hints): ... this. Try store by multiple pieces after setmem. (clear_storage): Adjust. * expr.h (clear_storage_hints): Likewise. (try_store_by_multiple_pieces): Declare. * passes.def: Replace the last copy_prop with ccp. 2021-05-03 Tom de Vries PR target/100321 * omp-low.c (lower_rec_input_clauses): Disable SIMT for user-defined reduction. 2021-05-03 Richard Biener * tree-ssa-dse.c (dse_classify_store): Track two PHI defs. 2021-05-03 Richard Biener * tree-ssa-dse.c: Do not include domwalk.h but cfganal.h. (dse_dom_walker): Remove. (dse_dom_walker::dse_optimize_stmt): Rename... (dse_optimize_stmt): ... to this, pass in live_bytes sbitmap. (dse_dom_walker::before_dom_children): Inline ... (pass_dse::execute): ... here. Perform a reverse program order walk. 2021-05-03 H.J. Lu PR bootstrap/99703 * configure: Regenerated. 2021-05-03 Ilya Leoshkevich PR target/100217 * config/s390/s390.c (s390_hard_fp_reg_p): New function. (s390_md_asm_adjust): Handle hard registers. 2021-05-03 Jakub Jelinek PR tree-optimization/100382 * tree-ssa-dse.c: Include tree-eh.h. (dse_dom_walker::before_dom_children): Don't remove stmts if stmt_unremovable_because_of_non_call_eh_p is true. 2021-05-02 David Edelsohn * varasm.c (compute_reloc_for_var): Split out from... (get_variable_section): Use it. * output.h (compute_reloc_for_var): Declare. * config/rs6000/rs6000-protos.h (rs6000_xcoff_asm_output_aligned_decl_common): Change alignment to unsigned int. * config/rs6000/rs6000.c (rs6000_legitimize_tls_address_aix): Don't append storage mapping class to symbol. (rs6000_xcoff_asm_named_section): Add BS and UL mapping classes. Don't convert TLS BSS to common. (rs6000_xcoff_unique_section): Don't fall back to select_secton. (rs6000_xcoff_section_type_flags): Add SECTION_BSS if DECL is bss_initializer. (rs6000_xcoff_asm_globalize_decl_name): Don't strip storage mapping class. (rs6000_xcoff_asm_output_aligned_decl_common): Align is unsigned int. If align is 0 from TLS class, use the same rules as varasm.c If not common, switch to BSS section manually. If common, emit appropriate comm or lcomm directive. (rs6000_xcoff_encode_section_info): Add logic to append all storage mapping classes. (rs6000_asm_weaken_decl): Adjust for qualname symbols. * config/rs6000/xcoff.h (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use rs6000_xcoff_asm_output_aligned_decl_common. (ASM_OUTPUT_ALIGNED_DECL_LOCAL): Use rs6000_xcoff_asm_output_aligned_decl_common. (ASM_OUTPUT_TLS_COMMON): Use rs6000_xcoff_asm_output_aligned_decl_common. 2021-05-02 Jakub Jelinek PR target/100375 * config/nvptx/nvptx.c (nvptx_sese_pseudo): Use nullptr instead of 0 as first argument of pseudo_node_t constructors. 2021-05-02 Jakub Jelinek PR target/100336 * config/i386/t-i386 (TM_H): Add $(srcdir)/config/i386/i386-isa.def. 2021-05-01 Aldy Hernandez * value-range.cc (DEFINE_INT_RANGE_GC_STUBS): Remove. (gt_pch_nx (int_range<1> *&)): New. (gt_ggc_mx (int_range<1> *&)): New. * value-range.h (class irange): Add GTY support for the base class. 2021-05-01 Geng Qi * doc/options.texi (Negative): Change either or to both and. 2021-04-30 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add float_ml[as][q]_laneq builtin generator macros. * config/aarch64/aarch64-simd.md (mul_laneq3): Define. (aarch64_float_mla_laneq): Define. (aarch64_float_mls_laneq): Define. * config/aarch64/arm_neon.h (vmla_laneq_f32): Use RTL builtin instead of GCC vector extensions. (vmlaq_laneq_f32): Likewise. (vmls_laneq_f32): Likewise. (vmlsq_laneq_f32): Likewise. 2021-04-30 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add float_ml[as]_lane builtin generator macros. * config/aarch64/aarch64-simd.md (*aarch64_mul3_elt): Rename to... (mul_lane3): This, and re-order arguments. (aarch64_float_mla_lane): Define. (aarch64_float_mls_lane): Define. * config/aarch64/arm_neon.h (vmla_lane_f32): Use RTL builtin instead of GCC vector extensions. (vmlaq_lane_f32): Likewise. (vmls_lane_f32): Likewise. (vmlsq_lane_f32): Likewise. 2021-04-30 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add float_ml[as] builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_float_mla): Define. (aarch64_float_mls): Define. * config/aarch64/arm_neon.h (vmla_f32): Use RTL builtin instead of relying on GCC vector extensions. (vmla_f64): Likewise. (vmlaq_f32): Likewise. (vmlaq_f64): Likewise. (vmls_f32): Likewise. (vmls_f64): Likewise. (vmlsq_f32): Likewise. (vmlsq_f64): Likewise. * config/aarch64/iterators.md: Define VDQF_DF mode iterator. 2021-04-30 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add float_ml[as]_n_builtin generator macros. * config/aarch64/aarch64-simd.md (*aarch64_mul3_elt_from_dup): Rename to... (mul_n3): This, and re-order arguments. (aarch64_float_mla_n): Define. (aarch64_float_mls_n): Define. * config/aarch64/arm_neon.h (vmla_n_f32): Use RTL builtin instead of inline asm. (vmlaq_n_f32): Likewise. (vmls_n_f32): Likewise. (vmlsq_n_f32): Likewise. 2021-04-30 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add pmull[2] builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_pmullv8qi): Define. (aarch64_pmull_hiv16qi_insn): Define. (aarch64_pmull_hiv16qi): Define. * config/aarch64/arm_neon.h (vmull_high_p8): Use RTL builtin instead of inline asm. (vmull_p8): Likewise. 2021-04-30 Senthil Kumar Selvaraj * config/avr/avr.md: Adjust peepholes to match and generate parallels with clobber of REG_CC. (mov_insn): Rename to mov_insn_split. (*mov_insn): Rename to mov_insn. 2021-04-30 David Edelsohn * varasm.c (use_blocks_for_decl_p): Don't use section anchors for VAR_DECLs if -fdata-sections enabled. 2021-04-30 Michael Meissner PR bootstrap/100327 * config/rs6000/rs6000.c (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Define. (rs6000_libgcc_floating_mode_supported_p): New target hook. 2021-04-30 Aldy Hernandez * tree-ssa-threadbackward.c (class thread_jumps): Split out code from here... (class back_threader_registry): ...to here... (class back_threader_profitability): ...and here... (thread_jumps::thread_through_all_blocks): Remove argument. (back_threader_registry::back_threader_registry): New. (back_threader_registry::~back_threader_registry): New. (back_threader_registry::thread_through_all_blocks): New. (thread_jumps::profitable_jump_thread_path): Move from here... (back_threader_profitability::profitable_path_p): ...to here. (thread_jumps::find_taken_edge): New. (thread_jumps::convert_and_register_current_path): Move... (back_threader_registry::register_path): ...to here. (thread_jumps::register_jump_thread_path_if_profitable): Move... (thread_jumps::maybe_register_path): ...to here. (thread_jumps::handle_phi): Call find_taken_edge and maybe_register_path. (thread_jumps::handle_assignment): Same. (thread_jumps::fsm_find_control_statement_thread_paths): Remove tree argument to handle_phi and handle_assignment. (thread_jumps::find_jump_threads_backwards): Set m_name. Remove set of m_speed_p and m_max_threaded_paths. (pass_thread_jumps::execute): Remove second argument from find_jump_threads_backwards. (pass_early_thread_jumps::execute): Same. 2021-04-30 Aldy Hernandez * tree-ssa-dom.c (class dom_jump_threader_simplifier): New. (class dom_opt_dom_walker): Initialize some class variables. (pass_dominator::execute): Pass evrp_range_analyzer and dom_jump_threader_simplifier to dom_opt_dom_walker. Adjust for some functions moving into classes. (simplify_stmt_for_jump_threading): Adjust and move to... (jump_threader_simplifier::simplify): ...here. (dom_opt_dom_walker::before_dom_children): Adjust for m_evrp_range_analyzer. (dom_opt_dom_walker::after_dom_children): Remove x_vr_values hack. (test_for_singularity): Place in dom_opt_dom_walker class. (dom_opt_dom_walker::optimize_stmt): The argument evrp_range_analyzer is now a class field. * tree-ssa-threadbackward.c (class thread_jumps): Add m_registry. (thread_jumps::thread_through_all_blocks): New. (thread_jumps::convert_and_register_current_path): Use m_registry. (pass_thread_jumps::execute): Adjust for thread_through_all_blocks being in the threader class. (pass_early_thread_jumps::execute): Same. * tree-ssa-threadedge.c (threadedge_initialize_values): Move... (jump_threader::jump_threader): ...here. (threadedge_finalize_values): Move... (jump_threader::~jump_threader): ...here. (jump_threader::remove_jump_threads_including): New. (jump_threader::thread_through_all_blocks): New. (record_temporary_equivalences_from_phis): Move... (jump_threader::record_temporary_equivalences_from_phis): ...here. (record_temporary_equivalences_from_stmts_at_dest): Move... (jump_threader::record_temporary_equivalences_from_stmts_at_dest): Here... (simplify_control_stmt_condition_1): Move to jump_threader class. (simplify_control_stmt_condition): Move... (jump_threader::simplify_control_stmt_condition): ...here. (thread_around_empty_blocks): Move... (jump_threader::thread_around_empty_blocks): ...here. (thread_through_normal_block): Move... (jump_threader::thread_through_normal_block): ...here. (thread_across_edge): Move... (jump_threader::thread_across_edge): ...here. (thread_outgoing_edges): Move... (jump_threader::thread_outgoing_edges): ...here. * tree-ssa-threadedge.h: Move externally facing functings... (class jump_threader): ...here... (class jump_threader_simplifier): ...and here. * tree-ssa-threadupdate.c (struct redirection_data): Remove comment. (jump_thread_path_allocator::jump_thread_path_allocator): New. (jump_thread_path_allocator::~jump_thread_path_allocator): New. (jump_thread_path_allocator::allocate_thread_edge): New. (jump_thread_path_allocator::allocate_thread_path): New. (jump_thread_path_registry::jump_thread_path_registry): New. (jump_thread_path_registry::~jump_thread_path_registry): New. (jump_thread_path_registry::allocate_thread_edge): New. (jump_thread_path_registry::allocate_thread_path): New. (dump_jump_thread_path): Make extern. (debug (const vec &path)): New. (struct removed_edges): Move to tree-ssa-threadupdate.h. (struct thread_stats_d): Remove. (remove_ctrl_stmt_and_useless_edges): Make static. (lookup_redirection_data): Move... (jump_thread_path_registry::lookup_redirection_data): ...here. (ssa_redirect_edges): Make static. (thread_block_1): Move... (jump_thread_path_registry::thread_block_1): ...here. (thread_block): Move... (jump_thread_path_registry::thread_block): ...here. (thread_through_loop_header): Move... (jump_thread_path_registry::thread_through_loop_header): ...here. (mark_threaded_blocks): Move... (jump_thread_path_registry::mark_threaded_blocks): ...here. (debug_path): Move... (jump_thread_path_registry::debug_path): ...here. (debug_all_paths): Move... (jump_thread_path_registry::dump): ..here. (rewire_first_differing_edge): Move... (jump_thread_path_registry::rewire_first_differing_edge): ...here. (adjust_paths_after_duplication): Move... (jump_thread_path_registry::adjust_paths_after_duplication): ...here. (duplicate_thread_path): Move... (jump_thread_path_registry::duplicate_thread_path): ..here. (remove_jump_threads_including): Move... (jump_thread_path_registry::remove_jump_threads_including): ...here. (thread_through_all_blocks): Move to... (jump_thread_path_registry::thread_through_all_blocks): ...here. (delete_jump_thread_path): Remove. (register_jump_thread): Move... (jump_thread_path_registry::register_jump_thread): ...here. * tree-ssa-threadupdate.h: Move externally facing functions... (class jump_thread_path_allocator): ...here... (class jump_thread_path_registry): ...and here. (thread_through_all_blocks): Remove. (struct removed_edges): New. (register_jump_thread): Remove. (remove_jump_threads_including): Remove. (delete_jump_thread_path): Remove. (remove_ctrl_stmt_and_useless_edges): Remove. (free_dom_edge_info): New prototype. * tree-vrp.c: Remove x_vr_values hack. (class vrp_jump_threader_simplifier): New. (vrp_jump_threader_simplifier::simplify): New. (vrp_jump_threader::vrp_jump_threader): Adjust method signature. Remove m_dummy_cond. Instantiate m_simplifier and m_threader. (vrp_jump_threader::thread_through_all_blocks): New. (vrp_jump_threader::simplify_stmt): Remove. (vrp_jump_threader::after_dom_children): Do not set m_dummy_cond. Remove x_vr_values hack. (execute_vrp): Adjust for thread_through_all_blocks being in a class. 2021-04-30 Christophe Lyon * genflags.c (gen_insn): Print failed expansion string. 2021-04-30 H.J. Lu * expr.c (alignment_for_piecewise_move): Call mode_for_size without limit to MAX_FIXED_MODE_SIZE. 2021-04-30 H.J. Lu PR middle-end/90773 * builtins.c (builtin_memset_gen_str): Don't use return from simplify_gen_subreg. 2021-04-30 Uroš Bizjak PR target/98060 * config/i386/i386.md (*add3_carry_0r): New insn pattern. (*addsi3_carry_zext_0r): Ditto. (*sub3_carry_0): Ditto. (*subsi3_carry_zext_0r): Ditto. * config/i386/predicates.md (ix86_carry_flag_unset_operator): New predicate. * config/i386/i386.c (ix86_rtx_costs) : Also consider ix86_carry_flag_unset_operator to calculate the cost of adc/sbb insn. 2021-04-30 Roman Zhuykov PR rtl-optimization/100225 PR rtl-optimization/84878 * modulo-sched.c (sms_schedule): Use note_stores to skip loops where we have an instruction which touches (writes) any hard register from df->regular_block_artificial_uses set. Allow not-single-set instruction only right before basic block tail. 2021-04-30 Geng Qi * config/riscv/riscv.opt (march=,mabi=): Negative itself. 2021-04-30 LevyHsu * config/riscv/riscv.c (riscv_min_arithmetic_precision): New. * config/riscv/riscv.h (TARGET_MIN_ARITHMETIC_PRECISION): New. * config/riscv/riscv.md (addv4, uaddv4): New. (subv4, usubv4, mulv4, umulv4): New. 2021-04-29 Alexandre Oliva * config.gcc: Merged x86 and x86_64 cpu_type-setting cases. 2021-04-29 Alexandre Oliva * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Rename to... (ASM_OUTPUT_MAX_SKIP_ALIGN): ... this. Enclose in do/while(0). * config/i386/i386.c: Adjust. * config/i386/i386.md: Adjust. * config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Drop. * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise. (ASM_OUTPUT_MAX_SKIP_PAD): Likewise. 2021-04-29 Uroš Bizjak * config/i386/i386-expand.c (ix86_expand_int_compare): Swap operands of GTU and LEU comparison to emit carry flag comparison. * config/i386/i386.md (*add3_carry_0): Change insn predicate to allow more combine opportunities with memory operands. (*sub3_carry_0): Ditto. 2021-04-29 Richard Sandiford PR rtl-optimization/100303 * rtl-ssa/accesses.cc (function_info::make_use_available): Take a boolean that indicates whether the use will only be used in debug instructions. Treat it in the same way that existing cross-EBB debug references would be handled if so. (function_info::make_uses_available): Likewise. * rtl-ssa/functions.h (function_info::make_uses_available): Update prototype accordingly. (function_info::make_uses_available): Likewise. * fwprop.c (try_fwprop_subst): Update call accordingly. 2021-04-29 Jeff Law * config/nios2/nios2-protos.h (nios2_fpu_insn_enabled): Move outside of RTX_CODE guard. 2021-04-29 Uroš Bizjak Richard Biener PR target/100312 * config/i386/i386-builtin.def (IX86_BUILTIN_MASKLOADPD) (IX86_BUILTIN_MASKLOADPS, IX86_BUILTIN_MASKLOADPD256) (IX86_BUILTIN_MASKLOADPS256, IX86_BUILTIN_MASKLOADD) (IX86_BUILTIN_MASKLOADQ, IX86_BUILTIN_MASKLOADD256) (IX86_BUILTIN_MASKLOADQ256): Move from SPECIAL_ARGS to PURE_ARGS category. * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins): Handle PURE_ARGS category. * config/i386/i386-expand.c (ix86_expand_builtin): Ditto. 2021-04-29 Eric Botcazou * configure.ac: Check for the presence of sys/locking.h header and for whether _LK_LOCK is supported by _locking. * configure: Regenerate. * config.in: Likewise. * gcov-io.h: Define GCOV_LOCKED_WITH_LOCKING if HOST_HAS_LK_LOCK. * gcov-io.c (gcov_open): Add support for GCOV_LOCKED_WITH_LOCKING. * system.h: Include if HAVE_SYS_LOCKING_H. 2021-04-29 Uroš Bizjak * config/i386/predicates.md (fcmov_comparison_operator): Do not check for trivial FP comparison operator. : Allow CCGZmode. : Do not allow CCCmode. (ix86_comparison_operator) : Allow only CCmode. (ix86_carry_flag_operator): Match only LTU and UNLT code. Do not check for trivial FP comparison operator. Allow CCGZmode. 2021-04-29 Tom de Vries * omp-expand.c (expand_omp_simd): Add step_orig, and replace uses of fd->loop.step by either step or orig_step. 2021-04-29 Eric Botcazou * config/sparc/sparc.c (gen_load_pcrel_sym): Delete. (load_got_register): Do the PIC dance here. (sparc_legitimize_tls_address): Simplify. (sparc_emit_probe_stack_range): Likewise. (sparc32_initialize_trampoline): Likewise. (sparc64_initialize_trampoline): Likewise. * config/sparc/sparc.md (load_pcrel_sym): Add @ marker. (probe_stack_range): Likewise. (flush): Likewise. (tgd_hi22): Likewise. (tgd_lo10): Likewise. (tgd_add): Likewise. (tgd_call): Likewise. (tldm_hi22): Likewise. (tldm_lo10): Likewise. (tldm_add): Likewise. (tldm_call): Likewise. (tldo_hix22): Likewise. (tldo_lox10): Likewise. (tldo_add): Likewise. (tie_hi22): Likewise. (tie_lo10): Likewise. (tie_add): Likewise. (tle_hix22): Likewise. (tle_lox10): Likewise. (stack_protect_setsi): Rename to... (stack_protect_set32): ...this. (stack_protect_setdi): Rename to... (stack_protect_set64): ...this. (stack_protect_set): Adjust calls to above. (stack_protect_testsi): Rename to... (stack_protect_test32): ...this. (stack_protect_testdi): Rename to... (stack_protect_test64): ...this. (stack_protect_test): Adjust calls to above. 2021-04-29 H.J. Lu PR middle-end/90773 * builtins.c (builtin_memcpy_read_str): Add a dummy argument. (builtin_strncpy_read_str): Likewise. (builtin_memset_read_str): Add an argument for the previous RTL information and generate the new RTL from the previous RTL info. (builtin_memset_gen_str): Likewise. * builtins.h (builtin_strncpy_read_str): Update the prototype. (builtin_memset_read_str): Likewise. * expr.c (by_pieces_ninsns): If targetm.overlap_op_by_pieces_p() returns true, round up size and alignment to the widest integer mode for maximum size. (pieces_addr::adjust): Add a pointer to by_pieces_prev argument and pass it to m_constfn. (op_by_pieces_d): Add m_push and m_overlap_op_by_pieces. (op_by_pieces_d::op_by_pieces_d): Add a bool argument to initialize m_push. Initialize m_overlap_op_by_pieces with targetm.overlap_op_by_pieces_p (). (op_by_pieces_d::run): Pass the previous RTL information to pieces_addr::adjust and generate overlapping operations if m_overlap_op_by_pieces is true. (PUSHG_P): New. (move_by_pieces_d::move_by_pieces_d): Updated for op_by_pieces_d change. (store_by_pieces_d::store_by_pieces_d): Updated for op_by_pieces_d change. (can_store_by_pieces): Use by_pieces_constfn on constfun. (store_by_pieces): Use by_pieces_constfn on constfun. Updated for op_by_pieces_d change. (clear_by_pieces_1): Add a dummy argument. (clear_by_pieces): Updated for op_by_pieces_d change. (compare_by_pieces_d::compare_by_pieces_d): Likewise. (string_cst_read_str): Add a dummy argument. * expr.h (by_pieces_constfn): Add a dummy argument. (by_pieces_prev): New. * target.def (overlap_op_by_pieces_p): New target hook. * config/i386/i386.c (TARGET_OVERLAP_OP_BY_PIECES_P): New. * doc/tm.texi.in: Add TARGET_OVERLAP_OP_BY_PIECES_P. * doc/tm.texi: Regenerated. 2021-04-29 Richard Biener PR tree-optimization/100253 * tree-vect-stmts.c (vectorizable_load): Do not assume element alignment when DR_MISALIGNMENT is -1. (vectorizable_store): Likewise. 2021-04-29 Jakub Jelinek PR target/100302 * config/aarch64/aarch64.c (aarch64_add_offset_1_temporaries): Use absu_hwi instead of abs_hwi. 2021-04-29 Richard Biener PR middle-end/38474 * tree-ssa-structalias.c (add_graph_edge): Avoid direct forwarding when indirect forwarding through ESCAPED alread happens. 2021-04-29 Tom de Vries PR target/100232 * internal-fn.c (expand_GOMP_SIMT_ENTER_ALLOC) (expand_GOMP_SIMT_LAST_LANE, expand_GOMP_SIMT_ORDERED_PRED) (expand_GOMP_SIMT_VOTE_ANY, expand_GOMP_SIMT_XCHG_BFLY) (expand_GOMP_SIMT_XCHG_IDX): Ensure target is assigned to. 2021-04-29 Richard Biener PR tree-optimization/99912 * tree-ssa-dse.c (dse_dom_walker::m_need_cfg_cleanup): New. (dse_dom_walker::todo): Likewise. (dse_dom_walker::dse_optimize_stmt): Move VDEF check to the caller. (dse_dom_walker::before_dom_children): Remove trivially dead SSA defs and schedule CFG cleanup if we removed all PHIs in a block. (pass_dse::execute): Get TODO as computed by the DOM walker and return it. Wipe dominator info earlier. 2021-04-29 Richard Biener PR ipa/100308 * ipa-prop.c (ipcp_modif_dom_walker::before_dom_children): Track blocks to cleanup EH in new m_need_eh_cleanup. (ipcp_modif_dom_walker::cleanup_eh): New. (ipcp_transform_function): Release dominator info before doing EH cleanup. 2021-04-29 Martin Sebor PR middle-end/100250 * attribs.c (attr_access::array_as_string): Avoid dereferencing a pointer when it's null. 2021-04-29 Martin Sebor * Makefile.in (OBJS): Add ipa-free-lang-data.o. * ipa-free-lang-data.cc: New file. * tree.c: Move pass free_lang_data to file above. (build_array_type_1): Declare extern. * tree.h (build_array_type_1): Declare. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Modify comment to make consistent with updated RTL pattern. * config/aarch64/aarch64-simd.md (aarch64_qmovn): Implement using ss_truncate and us_truncate rather than unspecs. * config/aarch64/iterators.md: Remove redundant unspecs and iterator: UNSPEC_[SU]QXTN and SUQMOVN respectively. 2021-04-28 Jonathan Wright * config/aarch64/arm_acle.h (__attribute__): Make intrinsic attributes consistent with those defined in arm_neon.h. 2021-04-28 Jonathan Wright * config/aarch64/arm_fp16.h (__attribute__): Make intrinsic attributes consistent with those defined in arm_neon.h. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add float_trunc_rodd builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_float_trunc_rodd_df): Define. (aarch64_float_trunc_rodd_lo_v2sf): Define. (aarch64_float_trunc_rodd_hi_v4sf_le): Define. (aarch64_float_trunc_rodd_hi_v4sf_be): Define. (aarch64_float_trunc_rodd_hi_v4sf): Define. * config/aarch64/arm_neon.h (vcvtx_f32_f64): Use RTL builtin instead of inline asm. (vcvtx_high_f32_f64): Likewise. (vcvtxd_f32_f64): Likewise. * config/aarch64/iterators.md: Add FCVTXN unspec. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add tbx1 builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_tbx1): Define. * config/aarch64/arm_neon.h (vqtbx1_s8): USE RTL builtin instead of inline asm. (vqtbx1_u8): Likewise. (vqtbx1_p8): Likewise. (vqtbx1q_s8): Likewise. (vqtbx1q_u8): Likewise. (vqtbx1q_p8): Likewise. (vtbx2_s8): Likewise. (vtbx2_u8): Likewise. (vtbx2_p8): Likewise. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add tbl1 builtin generator macros. * config/aarch64/arm_neon.h (vqtbl1_p8): Use RTL builtin instead of inline asm. (vqtbl1_s8): Likewise. (vqtbl1_u8): Likewise. (vqtbl1q_p8): Likewise. (vqtbl1q_s8): Likewise. (vqtbl1q_u8): Likewise. (vtbl1_s8): Likewise. (vtbl1_u8): Likewise. (vtbl1_p8): Likewise. (vtbl2_s8): Likewise. (vtbl2_u8): Likewise. (vtbl2_p8): Likewise. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add polynomial ssri_n buitin generator macro. * config/aarch64/arm_neon.h (vsri_n_p8): Use RTL builtin instead of inline asm. (vsri_n_p16): Likewise. (vsri_n_p64): Likewise. (vsriq_n_p8): Likewise. (vsriq_n_p16): Likewise. (vsriq_n_p64): Likewise. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use VALLP mode iterator for polynomial ssli_n builtin generator macro. * config/aarch64/arm_neon.h (vsli_n_p8): Use RTL builtin instead of inline asm. (vsli_n_p16): Likewise. (vsliq_n_p8): Likewise. (vsliq_n_p16): Likewise. * config/aarch64/iterators.md: Define VALLP mode iterator. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use VDQV_L iterator to generate [su]adalp RTL builtins. * config/aarch64/aarch64-simd.md: Use VDQV_L iterator in [su]adalp RTL pattern. * config/aarch64/arm_neon.h (vpadal_s32): Use RTL builtin instead of inline asm. (vpadal_u32): Likewise. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]addlp builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_addlp): Define. * config/aarch64/arm_neon.h (vpaddl_s8): Use RTL builtin instead of inline asm. (vpaddl_s16): Likewise. (vpaddl_s32): Likewise. (vpaddl_u8): Likewise. (vpaddl_u16): Likewise. (vpaddl_u32): Likewise. (vpaddlq_s8): Likewise. (vpaddlq_s16): Likewise. (vpaddlq_s32): Likewise. (vpaddlq_u8): Likewise. (vpaddlq_u16): Likewise. (vpaddlq_u32): Liwewise. * config/aarch64/iterators.md: Define [SU]ADDLP unspecs with appropriate attributes. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Use VDQ_I iterator for aarch64_addp builtin macro generator. * config/aarch64/aarch64-simd.md: Use VDQ_I iterator in aarch64_addp RTL pattern. * config/aarch64/arm_neon.h (vpaddq_s8): Use RTL builtin instead of inline asm. (vpaddq_s16): Likewise. (vpaddq_s32): Likewise. (vpaddq_s64): Likewise. (vpaddq_u8): Likewise. (vpaddq_u16): Likewise. (vpaddq_u32): Likewise. (vpaddq_u64): Likewise. 2021-04-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add sq[r]dmulh_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_sqdmulh_n): Define. * config/aarch64/arm_neon.h (vqdmulh_n_s16): Use RTL builtin instead of inline asm. (vqdmulh_n_s32): Likewise. (vqdmulhq_n_s16): Likewise. (vqdmulhq_n_s32): Likewise. (vqrdmulh_n_s16): Likewise. (vqrdmulh_n_s32): Likewise. (vqrdmulhq_n_s16): Likewise. (vqrdmulhq_n_s32): Likewise. 2021-04-28 Tobias Burnus * doc/install.texi (--enable-offload-defaulted): Document. 2021-04-28 Senthil Kumar Selvaraj * config/avr/avr-dimode.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add new patterns to match output of the splitters. * config/avr/avr-fixed.md: Likewise. * config/avr/avr.c (cc_reg_rtx): New. (avr_parallel_insn_from_insns): Adjust insn count for removal of set of cc0. (avr_is_casesi_sequence): Likewise. (avr_casei_sequence_check_operands): Likewise. (avr_optimize_casesi): Likewise. Also insert new insns after jump_insn. (avr_pass_casesi::avr_rest_of_handle_casesi): Adjust for removal of set of cc0. (avr_init_expanders): Initialize cc_reg_rtx. (avr_regno_reg_class): Handle REG_CC. (cond_string): Remove usage of CC_OVERFLOW_UNUSABLE. (avr_notice_update_cc): Remove function. (ret_cond_branch): Remove usage of CC_OVERFLOW_UNUSABLE. (compare_condition): Adjust for PARALLEL with REG_CC clobber. (out_shift_with_cnt): Likewise. (ashlhi3_out): Likewise. (ashrhi3_out): Likewise. (lshrhi3_out): Likewise. (avr_class_max_nregs): Return single reg for REG_CC. (avr_compare_pattern): Check for REG_CC instead of cc0_rtx. (avr_reorg_remove_redundant_compare): Likewise. (avr_reorg):Adjust for PARALLEL with REG_CC clobber. (avr_hard_regno_nregs): Return single reg for REG_CC. (avr_hard_regno_mode_ok): Allow only CCmode for REG_CC. (avr_md_asm_adjust): Clobber REG_CC. (TARGET_HARD_REGNO_NREGS): Define. (TARGET_CLASS_MAX_NREGS): Define. (TARGET_MD_ASM_ADJUST): Define. * config/avr/avr.h (FIRST_PSEUDO_REGISTER): Adjust for REG_CC. (enum reg_class): Add CC_REG class. (NOTICE_UPDATE_CC): Remove. (CC_OVERFLOW_UNUSABLE): Remove. (CC_NO_CARRY): Remove. * config/avr/avr.md: Turn existing patterns into define_insn_and_split style patterns where the splitter adds a clobber of the condition code register. Drop "cc" attribute. Add new patterns to match output of the splitters. (sez): Remove unused pattern. 2021-04-28 Richard Earnshaw PR target/100311 * config/arm/arm.c (arm_hard_regno_mode_ok): Only allow VPR to be used in HImode. 2021-04-28 Richard Sandiford PR target/100305 * config/aarch64/constraints.md (Utq): Require the address to be valid for both the element mode and for V2DImode. 2021-04-28 Jakub Jelinek Tobias Burnus * configure.ac (OFFLOAD_DEFAULTED): AC_DEFINE if offload-defaulted. * gcc.c (process_command): New variable. (driver::maybe_putenv_OFFLOAD_TARGETS): If OFFLOAD_DEFAULTED, set it if -foffload is defaulted. * lto-wrapper.c (OFFLOAD_TARGET_DEFAULT_ENV): Define. (compile_offload_image): If OFFLOAD_DEFAULTED and OFFLOAD_TARGET_DEFAULT is in the environment, don't fail if corresponding mkoffload can't be found. (compile_images_for_offload_targets): Likewise. Free and clear offload_names if no valid offload is found. * config.in: Regenerate. * configure: Regenerate. 2021-04-28 Richard Biener PR tree-optimization/100292 * tree-vect-generic.c (expand_vector_condition): Do not fold the comparisons. 2021-04-27 David Edelsohn * config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS): New. * config/rs6000/aix64.opt (m64): New. (m32): New. 2021-04-27 Maciej W. Rozycki * config/vax/vax.c (print_operand_address, vax_address_cost_1) (index_term_p): Handle ASHIFT too. 2021-04-27 Maciej W. Rozycki * config/vax/builtins.md (jbbi): Remove operand #3. (sync_lock_test_and_set): Adjust accordingly. (sync_lock_release): Likewise. 2021-04-27 Maciej W. Rozycki * config/vax/vax-protos.h (adjacent_operands_p): Remove prototype. * config/vax/vax.c (adjacent_operands_p): Remove. 2021-04-27 Maciej W. Rozycki * ifcvt.c (dead_or_predicable) [!IFCVT_MODIFY_TESTS]: Fall through to the non-conditional execution case if getting the condition for conditional execution has failed. 2021-04-27 Richard Sandiford PR middle-end/100284 * gimple.c (gimple_could_trap_p_1): Remove VEC_COND_EXPR test. * tree-eh.c (operation_could_trap_p): Handle VEC_COND_EXPR rather than asserting on it. 2021-04-27 David Edelsohn * config/rs6000/rs6000.c (rs6000_aix_precompute_tls_p): Protect with TARGET_AIX_OS. 2021-04-27 David Edelsohn PR target/94177 * calls.c (precompute_register_parameters): Additionally test targetm.precompute_tls_p to pre-compute argument. * config/rs6000/aix.h (TARGET_PRECOMPUTE_TLS_P): Define. * config/rs6000/rs6000.c (rs6000_aix_precompute_tls_p): New. * target.def (precompute_tls_p): New. * doc/tm.texi.in (TARGET_PRECOMPUTE_TLS_P): Add hook documentation. * doc/tm.texi: Regenerated. 2021-04-27 Jakub Jelinek PR target/100200 * config/aarch64/aarch64.c (aarch64_print_operand): Cast -UINTVAL back to HOST_WIDE_INT. 2021-04-27 Bernd Edlinger PR target/100106 * simplify-rtx.c (simplify_context::simplify_subreg): Check the memory alignment for the outer mode. 2021-04-27 H.J. Lu PR middle-end/90773 * expr.c (op_by_pieces_d::get_usable_mode): New member function. (op_by_pieces_d::run): Cange a while loop to a do-while loop. 2021-04-27 Alex Coplan PR target/99977 * config/arm/arm.c (arm_split_compare_and_swap): Fix up codegen with negative immediates: ensure we expand cbranchsi4_scratch correctly and ensure we satisfy its constraints. * config/arm/sync.md (@atomic_compare_and_swap_1): Don't attempt to tie two output operands together with constraints; collapse two alternatives. (@atomic_compare_and_swap_1): Likewise. * config/arm/thumb1.md (cbranchsi4_neg_late): New. 2021-04-27 Jakub Jelinek PR target/100200 * config/aarch64/predicates.md (aarch64_sub_immediate, aarch64_plus_immediate): Use -UINTVAL instead of -INTVAL. * config/aarch64/aarch64.md (casesi, rotl3): Likewise. * config/aarch64/aarch64.c (aarch64_print_operand, aarch64_split_atomic_op, aarch64_expand_subvti): Likewise. 2021-04-27 Jakub Jelinek PR tree-optimization/100239 * tree-vect-generic.c (lower_vec_perm): Don't accept constant permutations with all indices from the first zero element as vec_shl. 2021-04-27 Jakub Jelinek PR rtl-optimization/100254 * cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION on last1 and last2 insns rather than BB_END (bb1) and BB_END (bb2) insns. 2021-04-27 Richard Biener PR tree-optimization/99912 * passes.def: Add comment about new TODO_remove_unused_locals. * tree-stdarg.c (pass_data_stdarg): Run TODO_remove_unused_locals at start. 2021-04-27 Richard Biener PR tree-optimization/99912 * passes.def (pass_all_optimizations): Add pass_dse before the first pass_dce, move the first pass_dse before the pass_dce following pass_pre. 2021-04-27 Jakub Jelinek PR tree-optimization/95527 * generic-match-head.c: Include tm.h. * gimple-match-head.c: Include tm.h. * match.pd (CLZ == INTEGER_CST): Don't use #ifdef CLZ_DEFINED_VALUE_AT_ZERO, only test CLZ_DEFINED_VALUE_AT_ZERO if clz == CFN_CLZ. Add missing val declaration. (CTZ cmp CST): New simplifications. 2021-04-27 Jakub Jelinek PR tree-optimization/96696 * expr.c (expand_expr_divmod): New function. (expand_expr_real_2) : Use it for truncations and divisions. Formatting fixes. : Optimize x / y * y as x - x % y if the latter is cheaper. 2021-04-27 Martin Jambor PR ipa/99951 * ipa-param-manipulation.c (ipa_param_adjustments::modify_call): If removing a call statement LHS SSA name, release it. 2021-04-27 Richard Earnshaw PR target/100236 * config/arm/arm.c (THUMB2_WORK_REGS): Check PIC_OFFSET_TABLE_REGNUM is valid before including it in the mask. 2021-04-27 Richard Sandiford PR target/100270 * config/aarch64/aarch64.c (aarch64_comp_type_attributes): Handle SVE attributes. 2021-04-27 Richard Biener PR tree-optimization/100051 * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Add disambiguator based on access size vs. decl size. 2021-04-27 Richard Biener PR tree-optimization/100278 * tree-ssa-pre.c (compute_avail): Give up when we cannot adjust TBAA beacuse of mismatching bases. 2021-04-27 Jakub Jelinek PR target/99405 * config/i386/i386.md (*3_mask, *3_mask_1): For any_rotate define_insn_split and following splitters, use SWI iterator instead of SWI48. 2021-04-27 Richard Biener PR tree-optimization/99776 * match.pd (bit_field_ref (ctor)): Relax element extract type compatibility checks. 2021-04-27 Cui,Lili * common/config/i386/i386-common.c (processor_names): Sync processor_names with processor_type. * config/i386/i386-options.c (processor_cost_table): Sync processor_cost_table with processor_type. 2021-04-26 Aldy Hernandez * value-range.cc (irange::irange_set_1bit_anti_range): Add assert. (irange::set): Call irange_set_1bit_anti_range for handling all 1-bit ranges. Fall through on ~[MIN,MAX]. 2021-04-26 Aldy Hernandez * value-range.cc (irange::legacy_num_pairs): Remove. (irange::invert): Change gcc_assert to gcc_checking_assert. * value-range.h (irange::num_pairs): Adjust for a cached num_pairs(). Also, rename all gcc_assert's to gcc_checking_assert's. 2021-04-26 Aldy Hernandez * value-range.cc (irange::operator=): Set m_kind. (irange::copy_to_legacy): Handle varying and undefined sources as a legacy copy since they can be easily copied. (irange::irange_set): Set m_kind. (irange::irange_set_anti_range): Same. (irange::set): Rename normalize_min_max to normalize_kind. (irange::verify_range): Adjust for multi-ranges having the m_kind field set. (irange::irange_union): Set m_kind. (irange::irange_intersect): Same. (irange::invert): Same. * value-range.h (irange::kind): Always return m_kind. (irange::varying_p): Rename to... (irange::varying_comptaible_p): ...this. (irange::undefined_p): Only look at m_kind. (irange::irange): Always set VR_UNDEFINED if applicable. (irange::set_undefined): Always set VR_UNDEFINED. (irange::set_varying): Always set m_kind to VR_VARYING. (irange::normalize_min_max): Rename to... (irange::normalize_kind): ...this. 2021-04-26 Aldy Hernandez * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info): Adjust for constant_p including varying_p. * tree-vrp.c (vrp_prop::finalize): Same. (determine_value_range): Same. * vr-values.c (vr_values::range_of_expr): Same. * value-range.cc (irange::symbolic_p): Do not check varying_p. (irange::constant_p): Same. 2021-04-26 Aldy Hernandez * value-range.cc (irange::legacy_lower_bound): Replace !undefined_p check with num_ranges > 0. (irange::legacy_upper_bound): Same. * value-range.h (irange::type): Same. (irange::lower_bound): Same. (irange::upper_bound): Same. 2021-04-26 Richard Biener PR tree-optimization/99956 * gimple-loop-interchange.cc (compute_access_stride): Try instantiating the access in a shallower loop nest if instantiating failed. (compute_access_strides): Pass adjustable loop_nest to compute_access_stride. 2021-04-26 Christophe Lyon * doc/sourcebuild.texi (arm_cmse_hw): Document. 2021-04-26 Kyrylo Tkachov * config/aarch64/iterators.md (vwcore): Handle V4BF, V8BF. 2021-04-26 Thomas Schwinge Nathan Sidwell Tom de Vries Julian Brown Kwok Cheung Yeung * omp-offload.c (oacc_validate_dims): Implement '-Wopenacc-parallelism'. * doc/invoke.texi (-Wopenacc-parallelism): Document. 2021-04-26 Richard Biener * tree-cfg.h (gimplify_build1): Remove. (gimplify_build2): Likewise. (gimplify_build3): Likewise. * tree-cfg.c (gimplify_build1): Move to tree-vect-generic.c. (gimplify_build2): Likewise. (gimplify_build3): Likewise. * tree-vect-generic.c (gimplify_build1): Move from tree-cfg.c. Modernize. (gimplify_build2): Likewise. (gimplify_build3): Likewise. (tree_vec_extract): Use resimplify with following SSA edges. (expand_vector_parallel): Avoid passing NULL size/bitpos to tree_vec_extract. * expr.c (store_constructor): Deal with zero-element CTORs. * match.pd (bit_field_ref ): Make sure to produce vector constants when possible. 2021-04-26 Richard Biener * tree-complex.c: Include gimple-fold.h. (expand_complex_addition): Use gimple_build. (expand_complex_multiplication_components): Likewise. (expand_complex_multiplication): Likewise. (expand_complex_div_straight): Likewise. (expand_complex_div_wide): Likewise. (expand_complex_division): Likewise. (expand_complex_conjugate): Likewise. (expand_complex_comparison): Likewise. 2021-04-26 Richard Biener * tree-ssa-phiopt.c (two_value_replacement): Remove use of legacy gimplify_buildN API. 2021-04-26 Richard Biener PR tree-optimization/99473 * tree-ssa-phiopt.c (cond_store_replacement): Handle all stores. 2021-04-26 Richard Biener * config/rs6000/rs6000-call.c (rs6000_gimple_fold_builtin): Use replace_call_with_value. 2021-04-26 Richard Biener * tree-ssa-propagate.h (valid_gimple_rhs_p): Remove. (update_gimple_call): Likewise. (update_call_from_tree): Likewise. * tree-ssa-propagate.c (valid_gimple_rhs_p): Remove. (valid_gimple_call_p): Likewise. (move_ssa_defining_stmt_for_defs): Likewise. (finish_update_gimple_call): Likewise. (update_gimple_call): Likewise. (update_call_from_tree): Likewise. (propagate_tree_value_into_stmt): Use replace_call_with_value. * gimple-fold.h (update_gimple_call): Declare. * gimple-fold.c (valid_gimple_rhs_p): Move here from tree-ssa-propagate.c. (update_gimple_call): Likewise. (valid_gimple_call_p): Likewise. (finish_update_gimple_call): Likewise, and simplify. (gimplify_and_update_call_from_tree): Implement update_call_from_tree functionality, avoid excessive push/pop_gimplify_context. (gimple_fold_builtin): Use only gimplify_and_update_call_from_tree. (gimple_fold_call): Likewise. * gimple-ssa-sprintf.c (try_substitute_return_value): Likewise. * tree-ssa-ccp.c (ccp_folder::fold_stmt): Likewise. (pass_fold_builtins::execute): Likewise. (optimize_stack_restore): Use replace_call_with_value. * tree-cfg.c (fold_loop_internal_call): Likewise. * tree-ssa-dce.c (maybe_optimize_arith_overflow): Use only gimplify_and_update_call_from_tree. * tree-ssa-strlen.c (handle_builtin_strlen): Likewise. (handle_builtin_strchr): Likewise. * tsan.c: Include gimple-fold.h instead of tree-ssa-propagate.h. 2021-04-26 Jakub Jelinek PR debug/100255 * vmsdbgout.c (ASM_OUTPUT_DEBUG_STRING, vmsdbgout_begin_block, vmsdbgout_end_block, lookup_filename, vmsdbgout_source_line): Remove register keywords. 2021-04-25 liuhongt PR target/98911 * config/i386/i386-builtin.def (BDESC): Change the icode of the following builtins to CODE_FOR_nothing. * config/i386/i386.c (ix86_gimple_fold_builtin): Fold IX86_BUILTIN_PCMPEQB128, IX86_BUILTIN_PCMPEQW128, IX86_BUILTIN_PCMPEQD128, IX86_BUILTIN_PCMPEQQ, IX86_BUILTIN_PCMPEQB256, IX86_BUILTIN_PCMPEQW256, IX86_BUILTIN_PCMPEQD256, IX86_BUILTIN_PCMPEQQ256, IX86_BUILTIN_PCMPGTB128, IX86_BUILTIN_PCMPGTW128, IX86_BUILTIN_PCMPGTD128, IX86_BUILTIN_PCMPGTQ, IX86_BUILTIN_PCMPGTB256, IX86_BUILTIN_PCMPGTW256, IX86_BUILTIN_PCMPGTD256, IX86_BUILTIN_PCMPGTQ256. * config/i386/sse.md (avx2_eq3): Deleted. (sse2_eq3): Ditto. (sse4_1_eqv2di3): Ditto. (sse2_gt3): Rename to .. (*sse2_gt3): .. this. 2021-04-24 Iain Sandoe Revert: 2021-04-24 Iain Sandoe PR target/100152 * config/darwin.c (darwin_binds_local_p): Assume that any public symbol might be interposed for PIC code. Update function header comment to reflect current Darwin capability. 2021-04-24 Iain Sandoe PR target/100152 * config/darwin.c (darwin_binds_local_p): Assume that any public symbol might be interposed for PIC code. Update function header comment to reflect current Darwin capability. 2021-04-24 Richard Sandiford * doc/sourcebuild.texi: Document no-opts and any-opts target selectors. 2021-04-23 YiFei Zhu * config/bpf/bpf.h (ASM_OUTPUT_ALIGNED_BSS): Use .type and .lcomm. 2021-04-23 YiFei Zhu * config/bpf/bpf.h (FUNCTION_BOUNDARY): Set to 64. 2021-04-23 Uroš Bizjak PR target/100041 * config/i386/i386-options.c (ix86_option_override_internal): Error out when -m96bit-long-double is used with 64bit targets. * config/i386/i386.md (*pushxf_rounded): Remove pattern. 2021-04-23 Martin Liska * lto-wrapper.c: Remove FIXME about usage of hardware_concurrency. The function is not on par with what we have now. 2021-04-23 Uroš Bizjak PR target/100182 * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2): Copy operand 3 to operand 4. Use sse_reg_operand as operand 3 predicate. (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): Ditto. (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto. (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto. (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Copy operand 1 to operand 0. (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): Ditto. (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto. (LDX_ATOMIC/LDX_ATOMIC FP store peephole2 with mem blockage): Ditto. 2021-04-23 Alex Coplan PR rtl-optimization/100230 * early-remat.c (early_remat::sort_candidates): Use delete[] instead of delete for array allocated with new[]. 2021-04-23 Richard Biener * genmatch.c (lower_cond): Remove VEC_COND_EXPR special-casing. (capture_info::capture_info): Likewise. (capture_info::walk_match): Likewise. (expr::gen_transform): Likewise. (dt_simplify::gen_1): Likewise. * gimple-match-head.c (maybe_resimplify_conditional_op): Remove VEC_COND_EXPR special-casing. (gimple_simplify): Likewise. * gimple.c (gimple_could_trap_p_1): Adjust. * tree-ssa-pre.c (compute_avail): Allow VEC_COND_EXPR to participate in PRE. 2021-04-23 Richard Biener * cfganal.c (connect_infinite_loops_to_exit): First call add_noreturn_fake_exit_edges. * ipa-sra.c (process_scan_results): Do not call the now redundant add_noreturn_fake_exit_edges. * predict.c (tree_estimate_probability): Likewise. (rebuild_frequencies): Likewise. * store-motion.c (one_store_motion_pass): Likewise. 2021-04-23 Richard Biener PR tree-optimization/100222 * predict.c (pass_profile::execute): Remove redundant call to mark_irreducible_loops. (report_predictor_hitrates): Likewise. 2021-04-23 Richard Biener * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Avoid valid_gimple_rhs_p by instead gimplifying to one. 2021-04-23 Richard Biener PR tree-optimization/99971 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Always use TBAA for loads. 2021-04-23 liuhongt PR target/100093 * config/i386/i386-options.c (ix86_option_override_internal): Clear MASK_AVX256_SPLIT_UNALIGNED_LOAD/STORE in x_target_flags when X86_TUNE_AVX256_UNALIGNED_LOAD/STORE_OPTIMAL is enabled by target attribute. 2021-04-23 David Edelsohn * config/rs6000/aix71.h (PREFERRED_DEBUGGING_TYPE): Change to DWARF2_DEBUG. * config/rs6000/aix72.h (PREFERRED_DEBUGGING_TYPE): Same. 2021-04-22 David Edelsohn * config.gcc (powerpc-ibm-aix6.*): Remove. * config/rs6000/aix61.h: Delete. 2021-04-22 Martin Liska PR testsuite/100159 PR testsuite/100192 * builtins.c (expand_builtin): Fix typos and missing comments. * dwarf2out.c (gen_subprogram_die): Likewise. (gen_struct_or_union_type_die): Likewise. 2021-04-22 Uroš Bizjak PR target/100119 * config/i386/i386-expand.c (ix86_expand_convert_uns_sidf_sse): Remove the sign with FE_DOWNWARD, where x - x = -0.0. 2021-04-21 Iain Sandoe * config/i386/darwin.h (TARGET_64BIT): Remove definition based on TARGET_ISA_64BIT. (TARGET_64BIT_P): Remove definition based on TARGET_ISA_64BIT_P(). 2021-04-21 Martin Liska Revert: 2021-04-21 Martin Liska * lto-wrapper.c (cpuset_popcount): Remove. (init_num_threads): Remove and use hardware_concurrency. 2021-04-21 Martin Liska PR jit/98615 * main.c (main): Call toplev::finalize in CHECKING_P mode. * ipa-modref.c (ipa_modref_c_finalize): summaries are NULL when incremental LTO linking happens. 2021-04-21 Martin Liska * lto-wrapper.c (run_gcc): When -flto=jobserver is used, but the makeserver cannot be detected, then use -flto=N fallback. 2021-04-21 Richard Sandiford * acinclude.m4 (gcc_AC_INITFINI_ARRAY): When cross-compiling, default to yes for aarch64-linux-gnu. * configure: Regenerate. 2021-04-21 Martin Liska * lto-wrapper.c (cpuset_popcount): Remove. (init_num_threads): Remove and use hardware_concurrency. 2021-04-21 Martin Liska * config/i386/i386.c: Remove superfluous || TARGET_MACHO which remains to be '(... || 0)' and clang complains about it. * dwarf2out.c (AT_vms_delta): Declare conditionally. (add_AT_vms_delta): Likewise. * tree.c (fld_simplified_type): Use rather more common pattern for disabling of something (#if 0). (get_tree_code_name): Likewise. (verify_type_variant): Likewise. 2021-04-21 Martin Liska * config/i386/i386-expand.c (decide_alignment): Use newly named macro TARGET_CPU_P. * config/i386/i386.c (ix86_decompose_address): Likewise. (ix86_address_cost): Likewise. (ix86_lea_outperforms): Likewise. (ix86_avoid_lea_for_addr): Likewise. (ix86_add_stmt_cost): Likewise. * config/i386/i386.h (TARGET_*): Remove. (TARGET_CPU_P): New macro. * config/i386/i386.md: Use newly named macro TARGET_CPU_P. * config/i386/x86-tune-sched-atom.c (do_reorder_for_imul): Likewise. (swap_top_of_ready_list): Likewise. (ix86_atom_sched_reorder): Likewise. * config/i386/x86-tune-sched-bd.c (ix86_bd_has_dispatch): Likewise. * config/i386/x86-tune-sched.c (ix86_adjust_cost): Likewise. 2021-04-21 Martin Liska * config/i386/i386-options.c (TARGET_EXPLICIT_NO_SAHF_P): Define. (SET_TARGET_NO_SAHF): Likewise. (TARGET_EXPLICIT_PREFETCH_SSE_P): Likewise. (SET_TARGET_PREFETCH_SSE): Likewise. (TARGET_EXPLICIT_NO_TUNE_P): Likewise. (SET_TARGET_NO_TUNE): Likewise. (TARGET_EXPLICIT_NO_80387_P): Likewise. (SET_TARGET_NO_80387): Likewise. (DEF_PTA): New. * config/i386/i386.h (TARGET_*): Remove. * opth-gen.awk: Generate new used macros. 2021-04-21 Martin Liska * config/i386/i386.h (PTA_*): Remove. (enum pta_flag): New. (DEF_PTA): Generate PTA_* values from i386-isa.def. * config/i386/i386-isa.def: New file. 2021-04-21 Alex Coplan PR target/99988 * config/aarch64/aarch64-bti-insert.c (aarch64_bti_j_insn_p): New. (rest_of_insert_bti): Avoid inserting duplicate bti j insns for jump table targets. 2021-04-21 H.J. Lu * config.gcc: Install mwaitintrin.h for i[34567]86-*-* and x86_64-*-* targets. * common/config/i386/i386-common.c (OPTION_MASK_ISA2_MWAIT_SET): New. (OPTION_MASK_ISA2_MWAIT_UNSET): Likewise. (ix86_handle_option): Handle -mmwait. * config/i386/i386-builtins.c (ix86_init_mmx_sse_builtins): Replace OPTION_MASK_ISA_SSE3 with OPTION_MASK_ISA2_MWAIT on __builtin_ia32_monitor and __builtin_ia32_mwait. * config/i386/i386-options.c (isa2_opts): Add -mmwait. (ix86_valid_target_attribute_inner_p): Likewise. (ix86_option_override_internal): Enable mwait/monitor instructions for -msse3. * config/i386/i386.h (TARGET_MWAIT): New. (TARGET_MWAIT_P): Likewise. * config/i386/i386.opt: Add -mmwait. * config/i386/mwaitintrin.h: New file. * config/i386/pmmintrin.h: Include . * config/i386/sse.md (sse3_mwait): Replace TARGET_SSE3 with TARGET_MWAIT. (@sse3_monitor_): Likewise. * config/i386/x86gprintrin.h: Include . * doc/extend.texi: Document mwait target attribute. * doc/invoke.texi: Document -mmwait. 2021-04-21 Martin Liska * config/i386/i386-options.c (DEF_ENUM): Remove it. * config/i386/i386-opts.h (DEF_ENUM): Likewise. * config/i386/stringop.def (DEF_ENUM): Likewise. 2021-04-21 Martin Liska * tree-cfg.c (gimple_verify_flow_info): Use qD instead of print_generic_expr. 2021-04-21 Jakub Jelinek PR rtl-optimization/100148 * cprop.c (constprop_register): Use next_nondebug_insn instead of NEXT_INSN. 2021-04-21 Martin Liska PR ipa/98815 * cgraphunit.c (cgraph_node::analyze): Remove duplicate free_dominance_info calls. 2021-04-21 Richard Biener * gimple-fold.c (maybe_fold_reference): Remove is_lhs parameter (and assume it to be false). (fold_gimple_assign): Adjust, remove all callers of maybe_fold_reference calling it with is_lhs true. (gimple_fold_call): Likewise. (fold_stmt_1): Likewise. 2021-04-21 Richard Biener * fold-const.c (pedantic_non_lvalue_loc): Remove. (fold_binary_loc): Adjust. (fold_ternary_loc): Likewise. 2021-04-21 Richard Sandiford PR middle-end/100130 * varasm.c (get_block_for_decl): Make sure that any use of the retain attribute matches the section's retain flag. (switch_to_section): Check for retain mismatches even when changing sections, but do not warn if the given decl is the section's named.decl. (output_object_block): Pass the first decl in the block (if any) to switch_to_section. 2021-04-20 H.J. Lu * config/i386/i386-c.c (ix86_target_macros_internal): Define __CRC32__ for -mcrc32. * config/i386/i386-options.c (ix86_option_override_internal): Enable crc32 instruction for -msse4.2. * config/i386/i386.md (sse4_2_crc32): Remove TARGET_SSE4_2 check. (sse4_2_crc32di): Likewise. * config/i386/ia32intrin.h: Use crc32 target option for CRC32 intrinsics. 2021-04-20 Segher Boessenkool PR target/100108 * config/rs6000/rs6000.c (rs6000_machine_from_flags): Do not consider OPTION_MASK_ISEL. 2021-04-20 Martin Liska * doc/invoke.texi: Fix typo. * params.opt: Likewise. 2021-04-20 Martin Liska * doc/invoke.texi: Document new param. 2021-04-19 Andrew MacLeod PR tree-optimization/100081 * gimple-range-cache.h (ranger_cache): Inherit from gori_compute rather than gori_compute_cache. * gimple-range-gori.cc (is_gimple_logical_p): Move to top of file. (range_def_chain::m_logical_depth): New member. (range_def_chain::range_def_chain): Initialize m_logical_depth. (range_def_chain::get_def_chain): Don't build defchains through more than LOGICAL_LIMIT logical expressions. * params.opt (param_ranger_logical_depth): New. 2021-04-19 Richard Earnshaw PR target/100067 * config/arm/arm.c (arm_configure_build_target): Do not strip extended FPU/SIMD feature bits from the target ISA when -mfpu is specified (partial revert of r11-8168). 2021-04-19 Thomas Schwinge * params.opt (-param=openacc-kernels=): Add. * omp-oacc-kernels-decompose.cc (pass_omp_oacc_kernels_decompose::gate): Use it. * doc/invoke.texi (-fopenacc-kernels=@var{mode}): Move... (--param): ... here, 'openacc-kernels'. 2021-04-19 Martin Liska PR c/100143 * gengtype.c (finish_root_table): Align function arguments in between declaration and definition. 2021-04-19 Eric Botcazou * config/i386/winnt.c (i386_pe_seh_cold_init): Properly deal with frames larger than the SEH maximum frame size. 2021-04-18 Segher Boessenkool PR rtl-optimization/99927 * combine.c (distribute_notes) [REG_UNUSED]: If the register already is dead, just drop it. 2021-04-17 Iain Buclaw PR d/99914 * config/i386/winnt-d.c (TARGET_D_TEMPLATES_ALWAYS_COMDAT): Define. * doc/tm.texi: Regenerate. * doc/tm.texi.in (D language and ABI): Add @hook for TARGET_D_TEMPLATES_ALWAYS_COMDAT. 2021-04-17 Iain Buclaw * config/darwin-d.c (darwin_d_handle_target_object_format): New function. (darwin_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/dragonfly-d.c (dragonfly_d_handle_target_object_format): New function. (dragonfly_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/freebsd-d.c (freebsd_d_handle_target_object_format): New function. (freebsd_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/glibc-d.c (glibc_d_handle_target_object_format): New function. (glibc_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/i386/i386-d.c (ix86_d_handle_target_object_format): New function. (ix86_d_register_target_info): Add ix86_d_handle_target_object_format as handler for objectFormat key. * config/i386/winnt-d.c (winnt_d_handle_target_object_format): New function. (winnt_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/netbsd-d.c (netbsd_d_handle_target_object_format): New function. (netbsd_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/openbsd-d.c (openbsd_d_handle_target_object_format): New function. (openbsd_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. * config/pa/pa-d.c (pa_d_handle_target_object_format): New function. (pa_d_register_target_info): Add pa_d_handle_target_object_format as handler for objectFormat key. * config/rs6000/rs6000-d.c (rs6000_d_handle_target_object_format): New function. (rs6000_d_register_target_info): Add rs6000_d_handle_target_object_format as handler for objectFormat key. * config/sol2-d.c (solaris_d_handle_target_object_format): New function. (solaris_d_register_target_info): New function. (TARGET_D_REGISTER_OS_TARGET_INFO): Define. 2021-04-16 Jakub Jelinek PR target/91710 * config/aarch64/aarch64.c (aarch64_function_arg_alignment): Change abi_break argument from bool * to unsigned *, store there the pre-GCC 9 alignment. (aarch64_layout_arg, aarch64_gimplify_va_arg_expr): Adjust callers. (aarch64_function_arg_regno_p): Likewise. Only emit -Wpsabi note if the old and new alignment after applying MIN/MAX to it is different. 2021-04-16 Tamar Christina PR target/100048 * config/aarch64/aarch64-sve.md (@aarch64_sve_trn1_conv): New. * config/aarch64/aarch64.c (aarch64_expand_sve_const_pred_trn): Use new TRN optab. * config/aarch64/iterators.md (UNSPEC_TRN1_CONV): New. 2021-04-16 Bill Schmidt * doc/extend.texi (PowerPC AltiVec/VSX Built-in Functions): Revise this section and its subsections. 2021-04-16 Jakub Jelinek PR target/100075 * config/aarch64/aarch64.md (*neg_asr_si2_extr, *extrsi5_insn_di): New define_insn patterns. 2021-04-16 Richard Sandiford PR rtl-optimization/98689 * reg-notes.def (UNTYPED_CALL): New note. * combine.c (distribute_notes): Handle it. * emit-rtl.c (try_split): Likewise. * rtlanal.c (rtx_properties::try_to_add_insn): Likewise. Assume that calls with the note implicitly set all return value registers. * builtins.c (expand_builtin_apply): Add a REG_UNTYPED_CALL to untyped_calls. 2021-04-16 Richard Sandiford PR rtl-optimization/99596 * rtlanal.c (rtx_properties::try_to_add_insn): Don't add global register accesses for const calls. Assume that pure functions can only read from global registers. Ignore cases in which the stack pointer has been marked global. 2021-04-16 Jakub Jelinek PR target/99767 * tree-vect-loop.c (vect_transform_loop): Don't remove just dead scalar .MASK_LOAD calls, but also dead .COND_* calls - replace them by their last argument. 2021-04-15 Martin Liska * doc/invoke.texi: Other params don't use it, remove it. 2021-04-15 Richard Biener * gimple-builder.h: Add deprecation note. 2021-04-15 Richard Sandiford PR c++/98852 * attribs.h (restrict_type_identity_attributes_to): Declare. * attribs.c (restrict_type_identity_attributes_to): New function. 2021-04-15 Richard Sandiford PR c/98852 * attribs.h (affects_type_identity_attributes): Declare. * attribs.c (remove_attributes_matching): New function. (affects_type_identity_attributes): Likewise. 2021-04-15 Jakub Jelinek PR target/100056 * config/aarch64/aarch64.md (*_3): Add combine splitters for *_ashl3 with ZERO_EXTEND, SIGN_EXTEND or AND. 2021-04-14 Richard Sandiford PR rtl-optimization/99929 * rtl.h (same_vector_encodings_p): New function. * cse.c (exp_equiv_p): Check that CONST_VECTORs have the same encoding. * cselib.c (rtx_equal_for_cselib_1): Likewise. * jump.c (rtx_renumbered_equal_p): Likewise. * lra-constraints.c (operands_match_p): Likewise. * reload.c (operands_match_p): Likewise. * rtl.c (rtx_equal_p_cb, rtx_equal_p): Likewise. 2021-04-14 Richard Sandiford * print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Print more information about variable-length CONST_VECTORs. 2021-04-14 Vladimir N. Makarov PR rtl-optimization/100066 * lra-constraints.c (split_reg): Check paradoxical_subreg_p for ordered modes when choosing splitting mode for hard reg. 2021-04-14 Richard Sandiford PR target/99246 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector_sel): New function. (aarch64_expand_sve_const_vector): Use it for nelts_per_pattern==2. 2021-04-14 Andreas Krebbel * config/s390/s390-builtins.def (O_M5, O_M12, ...): Add new macros for mask operand types. (s390_vec_permi_s64, s390_vec_permi_b64, s390_vec_permi_u64) (s390_vec_permi_dbl, s390_vpdi): Use the M5 type for the immediate operand. (s390_vec_msum_u128, s390_vmslg): Use the M12 type for the immediate operand. * config/s390/s390.c (s390_const_operand_ok): Check the new operand types and generate a list of valid values. 2021-04-14 Iain Buclaw * doc/tm.texi: Regenerate. * doc/tm.texi.in (D language and ABI): Add @hook for TARGET_D_REGISTER_OS_TARGET_INFO. 2021-04-14 Iain Buclaw * config/aarch64/aarch64-d.c (aarch64_d_handle_target_float_abi): New function. (aarch64_d_register_target_info): New function. * config/aarch64/aarch64-protos.h (aarch64_d_register_target_info): Declare. * config/aarch64/aarch64.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/arm/arm-d.c (arm_d_handle_target_float_abi): New function. (arm_d_register_target_info): New function. * config/arm/arm-protos.h (arm_d_register_target_info): Declare. * config/arm/arm.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/i386/i386-d.c (ix86_d_handle_target_float_abi): New function. (ix86_d_register_target_info): New function. * config/i386/i386-protos.h (ix86_d_register_target_info): Declare. * config/i386/i386.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/mips/mips-d.c (mips_d_handle_target_float_abi): New function. (mips_d_register_target_info): New function. * config/mips/mips-protos.h (mips_d_register_target_info): Declare. * config/mips/mips.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/pa/pa-d.c (pa_d_handle_target_float_abi): New function. (pa_d_register_target_info): New function. * config/pa/pa-protos.h (pa_d_register_target_info): Declare. * config/pa/pa.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/riscv/riscv-d.c (riscv_d_handle_target_float_abi): New function. (riscv_d_register_target_info): New function. * config/riscv/riscv-protos.h (riscv_d_register_target_info): Declare. * config/riscv/riscv.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/rs6000/rs6000-d.c (rs6000_d_handle_target_float_abi): New function. (rs6000_d_register_target_info): New function. * config/rs6000/rs6000-protos.h (rs6000_d_register_target_info): Declare. * config/rs6000/rs6000.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/s390/s390-d.c (s390_d_handle_target_float_abi): New function. (s390_d_register_target_info): New function. * config/s390/s390-protos.h (s390_d_register_target_info): Declare. * config/s390/s390.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * config/sparc/sparc-d.c (sparc_d_handle_target_float_abi): New function. (sparc_d_register_target_info): New function. * config/sparc/sparc-protos.h (sparc_d_register_target_info): Declare. * config/sparc/sparc.h (TARGET_D_REGISTER_CPU_TARGET_INFO): Define. * doc/tm.texi: Regenerate. * doc/tm.texi.in (D language and ABI): Add @hook for TARGET_D_REGISTER_CPU_TARGET_INFO. 2021-04-14 Iain Buclaw * config/i386/i386-d.c (ix86_d_has_stdcall_convention): New function. * config/i386/i386-protos.h (ix86_d_has_stdcall_convention): Declare. * config/i386/i386.h (TARGET_D_HAS_STDCALL_CONVENTION): Define. * doc/tm.texi: Regenerate. * doc/tm.texi.in (D language and ABI): Add @hook for TARGET_D_HAS_STDCALL_CONVENTION. 2021-04-14 Richard Biener * tree-cfg.c (verify_gimple_assign_ternary): Verify that VEC_COND_EXPRs have a gimple_val condition. * tree-ssa-propagate.c (valid_gimple_rhs_p): VEC_COND_EXPR can no longer have a GENERIC condition. 2021-04-14 Richard Earnshaw PR target/100067 * config/arm/arm.c (arm_configure_build_target): Strip isa_all_fpbits from the isa_delta when -mfpu has been used. (arm_options_perform_arch_sanity_checks): It's the architecture that lacks an FPU not the processor. 2021-04-13 Richard Biener PR tree-optimization/100053 * tree-ssa-sccvn.c (vn_nary_op_get_predicated_value): Do not use optimistic dominance queries for backedges to validate predicated values. (dominated_by_p_w_unex): Add parameter to ignore executable state on backedges. (rpo_elim::eliminate_avail): Adjust. 2021-04-13 Jakub Jelinek PR target/100028 * config/aarch64/aarch64.md (*aarch64_bfxil_extr, *aarch64_bfxilsi_extrdi): New define_insn patterns. 2021-04-13 Jakub Jelinek PR target/99648 * simplify-rtx.c (simplify_immed_subreg): For MODE_COMPOSITE_P outermode, return NULL if the result doesn't encode back to the original byte sequence. (simplify_gen_subreg): Don't create SUBREGs from constants to MODE_COMPOSITE_P outermode. 2021-04-12 Jakub Jelinek PR rtl-optimization/99905 * combine.c (expand_compound_operation): If pos + len > modewidth, perform the right shift by pos in inner_mode and then convert to mode, instead of trying to simplify a shift of rtx with inner_mode by pos as if it was a shift in mode. 2021-04-12 Jakub Jelinek PR debug/99830 * combine.c (simplify_and_const_int_1): Don't optimize varop away if it has side-effects. 2021-04-12 Martin Liska * doc/extend.texi: Escape @smallexample content. 2021-04-12 Stefan Schulze Frielinghaus * config/s390/s390.md ("*movdi_31", "*movdi_64"): Add alternative in order to load a DFP zero. 2021-04-12 Martin Liska * doc/extend.texi: Be more precise in documentation of symver attribute. 2021-04-12 Martin Liska PR sanitizer/99877 * gimplify.c (gimplify_expr): Right now, we unpoison all variables before a goto . We should not do it if we are in a omp context. 2021-04-12 Cui,Lili * common/config/i386/cpuinfo.h (get_intel_cpu): Handle rocketlake. * common/config/i386/i386-common.c (processor_names): Add rocketlake. (processor_alias_table): Add rocketlake. * common/config/i386/i386-cpuinfo.h (processor_subtypes): Add INTEL_COREI7_ROCKETLAKE. * config.gcc: Add -march=rocketlake. * config/i386/i386-c.c (ix86_target_macros_internal): Handle rocketlake. * config/i386/i386-options.c (m_ROCKETLAKE) : Define. (processor_cost_table): Add rocketlake cost. * config/i386/i386.h (ix86_size_cost) : Define TARGET_ROCKETLAKE. (processor_type) : Add PROCESSOR_ROCKETLAKE. (PTA_ROCKETLAKE): Ditto. * doc/extend.texi: Add rocketlake. * doc/invoke.texi: Add rocketlake. 2021-04-12 Cui,Lili * config/i386/i386.h (PTA_ALDERLAKE): Change alderlake ISA list. * config/i386/i386-options.c (m_CORE_AVX2): Add m_ALDERLAKE. * common/config/i386/cpuinfo.h (get_intel_cpu): Add AlderLake model. * doc/invoke.texi: Change alderlake ISA list. 2021-04-11 Hafiz Abid Qadeer PR middle-end/98088 * omp-expand.c (expand_oacc_collapse_init): Update condition in a gcc_assert. 2021-04-10 H.J. Lu PR target/99744 * config/i386/serializeintrin.h (_serialize): Defined as macro. 2021-04-10 Jakub Jelinek PR lto/99849 * expr.c (expand_expr_addr_expr_1): Test is_global_var rather than just TREE_STATIC on COMPOUND_LITERAL_EXPR_DECLs. 2021-04-10 Jakub Jelinek PR middle-end/99989 * gimple-ssa-warn-alloca.c (alloca_type_and_limit::alloca_type_and_limit): Initialize limit to 0 with integer precision unconditionally. 2021-04-10 Jakub Jelinek PR rtl-optimization/98601 * rtlanal.c (rtx_addr_can_trap_p_1): Allow in assert unknown size not just for BLKmode, but also for VOIDmode. For STRICT_ALIGNMENT unaligned_mems handle VOIDmode like BLKmode. 2021-04-10 Jan Hubicka PR lto/99857 * tree.c (free_lang_data_in_decl): Do not release body of declare_variant_alt. 2021-04-09 Richard Sandiford * config/aarch64/aarch64.c (aarch64_option_restore): If the architecture was specified explicitly and the tuning wasn't, tune for the architecture rather than the configured default CPU. 2021-04-09 Richard Sandiford * config/aarch64/aarch64.md (tlsdesc_small_sve_): Use X30 as the temporary register. 2021-04-09 Martin Liska * doc/extend.texi: Move non-target attributes on the top level. 2021-04-09 Martin Liska * doc/invoke.texi: Document minimum and maximum value of the argument for both supported compression algorithms. 2021-04-08 David Edelsohn * config/rs6000/rs6000.c (rs6000_xcoff_select_section): Select TLS BSS before TLS data. * config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .comm. 2021-04-08 Richard Sandiford * doc/sourcebuild.texi (stdint_types_mbig_endian): Document. 2021-04-08 Richard Sandiford * match.pd: Extend vec_cond folds to handle shifts. 2021-04-08 Maciej W. Rozycki * config/vax/vax.md: Fix comment for `*bit' pattern's peephole. 2021-04-08 Alex Coplan PR target/99647 * config/arm/iterators.md (MVE_vecs): New. (V_elem): Also handle V2DF. * config/arm/mve.md (*mve_mov): Rename to ... (*mve_vdup): ... this. Remove second alternative since vec_duplicate of const_int is not canonical RTL, and we don't want to match symbol_refs. (*mve_vec_duplicate): Delete (pattern is redundant). 2021-04-08 Xionghu Luo * fold-const.c (fold_single_bit_test): Fix typo. * print-rtl.c (print_rtx_insn_vec): Call print_rtl_single instead. 2021-04-07 Richard Sandiford PR tree-optimization/97513 * tree-vect-slp.c (vect_add_slp_permutation): New function, split out from... (vectorizable_slp_permutation): ...here. Detect cases in which all VEC_PERM_EXPRs are guaranteed to have the same stepped permute vector and only generate one permute vector for that case. Extend that case to handle variable-length vectors. 2021-04-07 Richard Sandiford PR tree-optimization/99873 * tree-vect-slp.c (vect_slp_prefer_store_lanes_p): New function. (vect_build_slp_instance): Don't split store groups that could use IFN_STORE_LANES. 2021-04-07 Jakub Jelinek PR target/99872 * varasm.c (output_constant_pool_contents): Don't strip name encoding from XSTR (desc->sym, 0) or from label before passing those to ASM_OUTPUT_DEF. 2021-04-07 Richard Biener PR tree-optimization/99954 * tree-loop-distribution.c: Include tree-affine.h. (generate_memcpy_builtin): Try using tree-affine to prove non-overlap. (loop_distribution::classify_builtin_ldst): Always classify as PKIND_MEMMOVE. 2021-04-07 Richard Biener PR tree-optimization/99947 * tree-vect-loop.c (vectorizable_induction): Pre-allocate steps vector to avoid pushing elements from the reallocated vector. 2021-04-07 Richard Biener * tree-ssa-sccvn.h (print_vn_reference_ops): Declare. * tree-ssa-pre.c (print_pre_expr): Factor out VN reference operand printing... * tree-ssa-sccvn.c (print_vn_reference_ops): ... into this new function. (debug_vn_reference_ops): New. 2021-04-07 Bin Cheng PR tree-optimization/98736 * tree-loop-distribution.c * (loop_distribution::bb_top_order_init): Compute RPO with programing order preserved by calling function rev_post_order_and_mark_dfs_back_seme. 2021-04-06 Vladimir N. Makarov PR target/99781 * lra-constraints.c (split_reg): Don't check paradoxical_subreg_p. * lra-lives.c (clear_sparseset_regnos, regnos_in_sparseset_p): New functions. (process_bb_lives): Don't update biggest mode of hard reg for implicit in multi-register group. Use the new functions for updating dead_set and unused_set by register notes. 2021-04-06 Xianmiao Qu * config/csky/csky_pipeline_ck802.md : Use insn reservation name instead of *. 2021-04-06 H.J. Lu * config/i386/x86-tune-costs.h (skylake_memcpy): Updated. (skylake_memset): Likewise. (skylake_cost): Change CLEAR_RATIO to 17. * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Replace m_CANNONLAKE, m_ICELAKE_CLIENT, m_ICELAKE_SERVER, m_TIGERLAKE and m_SAPPHIRERAPIDS with m_SKYLAKE and m_CORE_AVX512. 2021-04-06 Richard Biener PR tree-optimization/99880 * tree-vect-loop.c (maybe_set_vectorized_backedge_value): Only set vectorized defs of relevant PHIs. 2021-04-06 Richard Biener PR tree-optimization/99924 * tree-vect-slp.c (vect_bb_partition_graph_r): Do not mark nodes w/o scalar stmts as visited. 2021-04-06 Alex Coplan PR target/99748 * config/arm/arm.c (arm_libcall_uses_aapcs_base): Also use base PCS for [su]fix_optab. 2021-04-03 Iain Sandoe * config/darwin.c (machopic_legitimize_pic_address): Check that the current pic register is one of the hard reg set before setting liveness. 2021-04-03 Iain Sandoe * config/darwin.c (machopic_legitimize_pic_address): Fix whitespace, remove unused code. 2021-04-03 Jakub Jelinek PR tree-optimization/99882 * gimple-ssa-store-merging.c (bswap_view_convert): Handle val with pointer type. 2021-04-03 Jakub Jelinek PR rtl-optimization/99863 * dse.c (replace_read): Drop regs_live argument. Instead of regs_live, use store_insn->fixed_regs_live if non-NULL, otherwise punt if insns sequence clobbers or sets any hard registers. 2021-04-03 Jakub Jelinek PR testsuite/98125 * targhooks.h (default_print_patchable_function_entry_1): Declare. * targhooks.c (default_print_patchable_function_entry_1): New function, copied from default_print_patchable_function_entry with an added flags argument. (default_print_patchable_function_entry): Rewritten into a small wrapper around default_print_patchable_function_entry_1. * config/rs6000/rs6000.c (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Redefine. (rs6000_print_patchable_function_entry): New function. 2021-04-02 Eric Botcazou * doc/invoke.texi (fdelete-dead-exceptions): Minor tweak. 2021-04-01 Jason Merrill PR c++/98481 * common.opt: Document v15 and v16. 2021-04-01 Richard Biener PR tree-optimization/99863 * gimplify.c (gimplify_init_constructor): Recompute vector constructor flags. 2021-04-01 Jakub Jelinek * doc/extend.texi (symver attribute): Fix up syntax errors in the examples. 2021-04-01 Jakub Jelinek PR tree-optimization/96573 * gimple-ssa-store-merging.c (init_symbolic_number): Handle also pointer types. 2021-04-01 Richard Biener PR tree-optimization/99856 * tree-vect-patterns.c (vect_recog_over_widening_pattern): Promote precision to vector element precision. 2021-04-01 Martin Jambor PR tree-optimization/97009 * tree-sra.c (access_or_its_child_written): New function. (propagate_subaccesses_from_rhs): Use it instead of a simple grp_write test. 2021-03-31 Jan Hubicka PR ipa/98265 * cif-code.def (USES_COMDAT_LOCAL): Make CIF_FINAL_NORMAL. 2021-03-31 Pat Haugen PR target/99133 * config/rs6000/altivec.md (xxspltiw_v4si, xxspltiw_v4sf_inst, xxspltidp_v2df_inst, xxsplti32dx_v4si_inst, xxsplti32dx_v4sf_inst, xxblend_, xxpermx_inst, xxeval): Mark prefixed. * config/rs6000/mma.md (mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_, mma_): Likewise. * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Adjust test. * config/rs6000/rs6000.md (define_attr "maybe_prefixed"): New. (define_attr "prefixed"): Update initializer. 2021-03-31 Jakub Jelinek PR debug/99490 * dwarf2out.c (debug_ranges_dwo_section): New variable. (DW_RANGES_IDX_SKELETON): Define. (struct dw_ranges): Add begin_entry and end_entry members. (DEBUG_DWO_RNGLISTS_SECTION): Define. (add_ranges_num): Adjust r initializer for addition of *_entry members. (add_ranges_by_labels): For -gsplit-dwarf and force_direct, set idx to DW_RANGES_IDX_SKELETON. (use_distinct_base_address_for_range): New function. (index_rnglists): Don't set r->idx if it is equal to DW_RANGES_IDX_SKELETON. Initialize r->begin_entry and r->end_entry for -gsplit-dwarf if those will be needed by output_rnglists. (output_rnglists): Add DWO argument. If true, switch to debug_ranges_dwo_section rather than debug_ranges_section. Adjust l1/l2 label indexes. Only output the offset table when dwo is true and don't include in there the skeleton range entry if present. For -gsplit-dwarf, skip ranges that belong to the other rnglists section. Change return type from void to bool and return true if there are any range entries for the other section. For dwarf_split_debug_info use DW_RLE_startx_endx, DW_RLE_startx_length and DW_RLE_base_addressx entries instead of DW_RLE_start_end, DW_RLE_start_length and DW_RLE_base_address. Use use_distinct_base_address_for_range. (init_sections_and_labels): Initialize debug_ranges_dwo_section if -gsplit-dwarf and DWARF >= 5. Adjust ranges_section_label and range_base_label indexes. (dwarf2out_finish): Call index_rnglists earlier before finalizing .debug_addr. Never emit DW_AT_rnglists_base attribute. For -gsplit-dwarf and DWARF >= 5 call output_rnglists up to twice with different dwo arguments. (dwarf2out_c_finalize): Clear debug_ranges_dwo_section. 2021-03-31 Richard Sandiford PR tree-optimization/98268 * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Call recompute_tree_invariant_for_addr_expr after successfully folding a TARGET_MEM_REF that occurs inside an ADDR_EXPR. 2021-03-31 Richard Sandiford PR tree-optimization/99726 * tree-data-ref.c (create_intersect_range_checks_index): Bail out if there is more than one access function SCEV for the loop being versioned. 2021-03-31 Richard Sandiford PR rtl-optimization/97141 PR rtl-optimization/98726 * emit-rtl.c (valid_for_const_vector_p): Return true for CONST_POLY_INT_P. * rtx-vector-builder.h (rtx_vector_builder::step): Return a poly_wide_int instead of a wide_int. (rtx_vector_builder::apply_set): Take a poly_wide_int instead of a wide_int. * rtx-vector-builder.c (rtx_vector_builder::apply_set): Likewise. * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Return false for CONST_VECTORs that cannot be forced to memory. * config/aarch64/aarch64-simd.md (mov): If a CONST_VECTOR is too complex to force to memory, build it up from individual elements instead. 2021-03-31 Jan Hubicka PR lto/99447 * cgraph.c (cgraph_node::release_body): Fix overactive check. 2021-03-31 Christophe Lyon PR target/99786 * config/arm/vec-common.md (mul3): Disable on iwMMXT, expect for V4HI and V2SI. 2021-03-31 H.J. Lu * config/i386/i386-expand.c (expand_set_or_cpymem_via_rep): For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, don't convert QImode to SImode. (decide_alg): For TARGET_PREFER_KNOWN_REP_MOVSB_STOSB, use "rep movsb/stosb" only for known sizes. * config/i386/i386-options.c (processor_cost_table): Use Ice Lake cost for Cannon Lake, Ice Lake, Tiger Lake, Sapphire Rapids and Alder Lake. * config/i386/i386.h (TARGET_PREFER_KNOWN_REP_MOVSB_STOSB): New. * config/i386/x86-tune-costs.h (icelake_memcpy): New. (icelake_memset): Likewise. (icelake_cost): Likewise. * config/i386/x86-tune.def (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): New. 2021-03-31 Richard Sandiford PR target/98119 * config/aarch64/aarch64.c (aarch64_vectorize_preferred_vector_alignment): Query the size of the provided SVE vector; do not assume that all SVE vectors have the same size. 2021-03-31 Jan Hubicka PR lto/99447 * cgraph.c (cgraph_node::release_body): Remove all callers and references. * cgraphclones.c (cgraph_node::materialize_clone): Do not do it here. * cgraphunit.c (cgraph_node::expand): And here. 2021-03-31 Martin Liska * ipa-modref.c (analyze_ssa_name_flags): Fix coding style and one negated condition. 2021-03-31 Jakub Jelinek Richard Sandiford PR target/99813 * config/aarch64/aarch64.md (*add3_poly_1): Swap Uai and Uav constraints on operands[2] and similarly 0 and rk constraints on operands[1] corresponding to that. 2021-03-31 Jakub Jelinek PR bootstrap/98860 * configure.ac (HAVE_LD_BROKEN_PE_DWARF5): New AC_DEFINE if PECOFF linker doesn't support DWARF sections new in DWARF5. * config/i386/i386-options.c (ix86_option_override_internal): Default to dwarf_version 4 if HAVE_LD_BROKEN_PE_DWARF5 for TARGET_PECOFF targets. * config.in: Regenerated. * configure: Regenerated. 2021-03-30 Kyrylo Tkachov PR target/99820 * config/aarch64/aarch64.c (aarch64_analyze_loop_vinfo): Check for available issue_info before using it. 2021-03-30 Kyrylo Tkachov PR target/99822 * config/aarch64/aarch64.md (sub3_compare1_imm): Do not allow zero in operand 1. 2021-03-30 Xionghu Luo PR target/99718 * config/rs6000/altivec.md (altivec_lvsl_reg): Change to ... (altivec_lvsl_reg_): ... this. (altivec_lvsr_reg): Change to ... (altivec_lvsr_reg_): ... this. * config/rs6000/predicates.md (vec_set_index_operand): New. * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Enable 32bit variable vec_insert for all TARGET_VSX. * config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9): Enable 32bit variable vec_insert for p9 and above. (rs6000_expand_vector_set_var_p8): Rename to ... (rs6000_expand_vector_set_var_p7): ... this. (rs6000_expand_vector_set): Use TARGET_VSX and adjust assert position. * config/rs6000/vector.md (vec_set): Use vec_set_index_operand. * config/rs6000/vsx.md (xl_len_r): Use gen_altivec_lvsl_reg_di and gen_altivec_lvsr_reg_di. 2021-03-30 H.J. Lu PR target/99744 * config/i386/ia32intrin.h (__rdtsc): Defined as macro. (__rdtscp): Likewise. 2021-03-30 Tamar Christina PR tree-optimization/99825 * tree-vect-slp-patterns.c (vect_check_evenodd_blend): Reject non-mult 2 lanes. 2021-03-30 Richard Earnshaw PR target/99773 * config/arm/arm.c (arm_file_start): Fix emission of Tag_ABI_VFP_args attribute. 2021-03-30 Richard Biener PR tree-optimization/99824 * stor-layout.c (set_min_and_max_values_for_integral_type): Assert the precision is within the bounds of WIDE_INT_MAX_PRECISION. * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use the outermost component ref only to lower the access size and initialize that from the access type. 2021-03-30 Richard Sandiford PR target/98136 * config/aarch64/aarch64.md (mov): Pass multi-instruction CONST_INTs to aarch64_expand_mov_immediate when called after RA. 2021-03-30 Mihailo Stojanovic * config/aarch64/aarch64.md (_trunc2): Set the "arch" attribute to disambiguate between SIMD and FP variants of the instruction. 2021-03-29 Jan Hubicka * ipa-modref.c (merge_call_lhs_flags): Correct handling of deref. (analyze_ssa_name_flags): Fix typo in comment. 2021-03-29 Alex Coplan PR target/99216 * config/aarch64/aarch64-sve-builtins.cc (function_builder::add_function): Add placeholder_p argument, use placeholder decls if this is set. (function_builder::add_unique_function): Instead of conditionally adding direct overloads, unconditionally add either a direct overload or a placeholder. (function_builder::add_overloaded_function): Set placeholder_p if we're using C++ overloads. Use the obstack for string storage instead of relying on the tree nodes. (function_builder::add_overloaded_functions): Don't return early for m_direct_overloads: we need to add placeholders. * config/aarch64/aarch64-sve-builtins.h (function_builder::add_function): Add placeholder_p argument. 2021-03-29 Richard Biener PR tree-optimization/99807 * tree-vect-slp.c (vect_slp_analyze_node_operations_1): Move assert below VEC_PERM handling. 2021-03-29 Kyrylo Tkachov PR target/99037 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_): Use aarch64_simd_or_scalar_imm_zero to match zeroes. Remove pattern matching const_int 0. (move_lo_quad_internal_be_): Likewise. (move_lo_quad_): Update for the above. * config/aarch64/iterators.md (VQ_2E): Delete. 2021-03-29 Jakub Jelinek PR tree-optimization/99777 * fold-const.c (extract_muldiv_1): For conversions, punt on casts from types other than scalar integral types. 2021-03-28 David Edelsohn * config/rs6000/rs6000.c (rs6000_output_dwarf_dtprel): Do not add XCOFF TLS reloc decorations. 2021-03-28 Gerald Pfeifer * doc/analyzer.texi (Analyzer Internals): Update link to "A Memory Model for Static Analysis of C Programs". 2021-03-26 David Edelsohn * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Call function. * config/rs6000/rs6000-protos.h (rs6000_special_adjust_field_align): Declare. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align): New. (rs6000_special_round_type_align): Recursively check innermost first field. 2021-03-26 Jakub Jelinek PR debug/99334 * dwarf2out.h (struct dw_fde_node): Add rule18 member. * dwarf2cfi.c (dwarf2out_frame_debug_expr): When handling (set hfp sp) assignment with drap_reg active, queue reg save for hfp with offset 0 and flush queued reg saves. When handling a push with rule18, defer queueing reg save for hfp and just assert the offset is 0. (scan_trace): Assert that fde->rule18 is false. 2021-03-26 Vladimir Makarov PR target/99766 * ira-costs.c (record_reg_classes): Put case with CT_RELAXED_MEMORY adjacent to one with CT_MEMORY. * ira.c (ira_setup_alts): Ditto. * lra-constraints.c (process_alt_operands): Ditto. * recog.c (asm_operand_ok): Ditto. * reload.c (find_reloads): Ditto. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-protos.h (cpu_addrcost_table::post_modify_ld3_st3): New member variable. (cpu_addrcost_table::post_modify_ld4_st4): Likewise. * config/aarch64/aarch64.c (generic_addrcost_table): Update accordingly, using the same costs as for post_modify. (exynosm1_addrcost_table, xgene1_addrcost_table): Likewise. (thunderx2t99_addrcost_table, thunderx3t110_addrcost_table): (tsv110_addrcost_table, qdf24xx_addrcost_table): Likewise. (a64fx_addrcost_table): Likewise. (neoversev1_addrcost_table): New. (neoversev1_tunings): Use neoversev1_addrcost_table. (aarch64_address_cost): Use the new post_modify costs for CImode and XImode. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.opt (-param=aarch64-loop-vect-issue-rate-niters=): New parameter. * doc/invoke.texi: Document it. * config/aarch64/aarch64-protos.h (aarch64_base_vec_issue_info) (aarch64_scalar_vec_issue_info, aarch64_simd_vec_issue_info) (aarch64_advsimd_vec_issue_info, aarch64_sve_vec_issue_info) (aarch64_vec_issue_info): New structures. (cpu_vector_cost): Write comments above the variables rather than to the side. (cpu_vector_cost::issue_info): New member variable. * config/aarch64/aarch64.c: Include gimple-pretty-print.h and tree-ssa-loop-niter.h. (generic_vector_cost, a64fx_vector_cost, qdf24xx_vector_cost) (thunderx_vector_cost, tsv110_vector_cost, cortexa57_vector_cost) (exynosm1_vector_cost, xgene1_vector_cost, thunderx2t99_vector_cost) (thunderx3t110_vector_cost): Initialize issue_info to null. (neoversev1_scalar_issue_info, neoversev1_advsimd_issue_info) (neoversev1_sve_issue_info, neoversev1_vec_issue_info): New structures. (neoversev1_vector_cost): Use them. (aarch64_vec_op_count, aarch64_sve_op_count): New structures. (aarch64_vector_costs::saw_sve_only_op): New member variable. (aarch64_vector_costs::num_vector_iterations): Likewise. (aarch64_vector_costs::scalar_ops): Likewise. (aarch64_vector_costs::advsimd_ops): Likewise. (aarch64_vector_costs::sve_ops): Likewise. (aarch64_vector_costs::seen_loads): Likewise. (aarch64_simd_vec_costs_for_flags): New function. (aarch64_analyze_loop_vinfo): Initialize num_vector_iterations. Count the number of predicate operations required by SVE WHILE instructions. (aarch64_comparison_type, aarch64_multiply_add_p): New functions. (aarch64_sve_only_stmt_p, aarch64_in_loop_reduction_latency): Likewise. (aarch64_count_ops): Likewise. (aarch64_add_stmt_cost): Record whether see an SVE operation that cannot currently be implementing using Advanced SIMD. Record issue information about the scalar, Advanced SIMD and (where relevant) SVE versions of a loop. (aarch64_vec_op_count::dump): New function. (aarch64_sve_op_count::dump): Likewise. (aarch64_estimate_min_cycles_per_iter): Likewise. (aarch64_adjust_body_cost): If issue information is available, try to compare the issue rates of the various loop implementations and increase or decrease the vector body cost accordingly. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.c (aarch64_detect_vector_stmt_subtype): Assume a zero cost for induction phis. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.c (aarch64_embedded_comparison_type): New function. (aarch64_adjust_stmt_cost): Add the costs of embedded scalar and vector comparisons. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.c (aarch64_detect_scalar_stmt_subtype): New function. (aarch64_add_stmt_cost): Call it. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-tuning-flags.def (matched_vector_throughput): New tuning parameter. * config/aarch64/aarch64.c (neoversev1_tunings): Use it. (aarch64_estimated_sve_vq): New function. (aarch64_vector_costs::analyzed_vinfo): New member variable. (aarch64_vector_costs::is_loop): Likewise. (aarch64_vector_costs::unrolled_advsimd_niters): Likewise. (aarch64_vector_costs::unrolled_advsimd_stmts): Likewise. (aarch64_record_potential_advsimd_unrolling): New function. (aarch64_analyze_loop_vinfo, aarch64_analyze_bb_vinfo): Likewise. (aarch64_add_stmt_cost): Call aarch64_analyze_loop_vinfo or aarch64_analyze_bb_vinfo on the first use of a costs structure. Detect whether we're vectorizing a loop for SVE that might be completely unrolled if it used Advanced SIMD instead. (aarch64_adjust_body_cost_for_latency): New function. (aarch64_finish_cost): Call it. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.c (aarch64_vector_costs): New structure. (aarch64_init_cost): New function. (aarch64_add_stmt_cost): Use aarch64_vector_costs instead of the default unsigned[3]. (aarch64_finish_cost, aarch64_destroy_cost_data): New functions. (TARGET_VECTORIZE_INIT_COST): Override. (TARGET_VECTORIZE_FINISH_COST): Likewise. (TARGET_VECTORIZE_DESTROY_COST_DATA): Likewise. 2021-03-26 Richard Sandiford * config/aarch64/aarch64.c (neoversev1_advsimd_vector_cost) (neoversev1_sve_vector_cost): New cost structures. (neoversev1_vector_cost): Likewise. (neoversev1_tunings): Use them. Enable use_new_vector_costs. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-protos.h (sve_vec_cost::scatter_store_elt_cost): New member variable. * config/aarch64/aarch64.c (generic_sve_vector_cost): Update accordingly, taking the cost from the cost of a scalar_store. (a64fx_sve_vector_cost): Likewise. (aarch64_detect_vector_stmt_subtype): Detect scatter stores. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-protos.h (simd_vec_cost::store_elt_extra_cost): New member variable. * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update accordingly, using the vec_to_scalar cost for the new field. (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise. (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise. (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise. (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost) (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost) (thunderx3t110_advsimd_vector_cost): Likewise. (aarch64_detect_vector_stmt_subtype): Detect single-element stores. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-protos.h (simd_vec_cost::ld2_st2_permute_cost) (simd_vec_cost::ld3_st3_permute_cost): New member variables. (simd_vec_cost::ld4_st4_permute_cost): Likewise. * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update accordingly, using zero for the new costs. (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise. (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise. (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise. (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost) (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost) (thunderx3t110_advsimd_vector_cost): Likewise. (aarch64_ld234_st234_vectors): New function. (aarch64_adjust_stmt_cost): Likewise. (aarch64_add_stmt_cost): Call aarch64_adjust_stmt_cost if using the new vector costs. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-protos.h (sve_vec_cost): Turn into a derived class of simd_vec_cost. Add information about CLAST[AB] and FADDA instructions. * config/aarch64/aarch64.c (generic_sve_vector_cost): Update accordingly, using the vec_to_scalar costs for the new fields. (a64fx_sve_vector_cost): Likewise. (aarch64_reduc_type): New function. (aarch64_sve_in_loop_reduction_latency): Likewise. (aarch64_detect_vector_stmt_subtype): Take a vinfo parameter. Use aarch64_sve_in_loop_reduction_latency to handle SVE reductions that occur in the loop body. (aarch64_add_stmt_cost): Update call accordingly. 2021-03-26 Richard Sandiford * config/aarch64/aarch64-tuning-flags.def (use_new_vector_costs): New tuning flag. * config/aarch64/aarch64-protos.h (simd_vec_cost): Put comments above the fields rather than to the right. (simd_vec_cost::reduc_i8_cost): New member variable. (simd_vec_cost::reduc_i16_cost): Likewise. (simd_vec_cost::reduc_i32_cost): Likewise. (simd_vec_cost::reduc_i64_cost): Likewise. (simd_vec_cost::reduc_f16_cost): Likewise. (simd_vec_cost::reduc_f32_cost): Likewise. (simd_vec_cost::reduc_f64_cost): Likewise. * config/aarch64/aarch64.c (generic_advsimd_vector_cost): Update accordingly, using the vec_to_scalar_cost for the new fields. (generic_sve_vector_cost, a64fx_advsimd_vector_cost): Likewise. (a64fx_sve_vector_cost, qdf24xx_advsimd_vector_cost): Likewise. (thunderx_advsimd_vector_cost, tsv110_advsimd_vector_cost): Likewise. (cortexa57_advsimd_vector_cost, exynosm1_advsimd_vector_cost) (xgene1_advsimd_vector_cost, thunderx2t99_advsimd_vector_cost) (thunderx3t110_advsimd_vector_cost): Likewise. (aarch64_use_new_vector_costs_p): New function. (aarch64_simd_vec_costs): New function, split out from... (aarch64_builtin_vectorization_cost): ...here. (aarch64_is_reduction): New function. (aarch64_detect_vector_stmt_subtype): Likewise. (aarch64_add_stmt_cost): Call aarch64_detect_vector_stmt_subtype if using the new vector costs. 2021-03-26 Iain Buclaw PR ipa/99466 * tree-emutls.c (get_emutls_init_templ_addr): Mark initializer of weak TLS declarations as public. 2021-03-26 Iain Buclaw * config/aarch64/aarch64-d.c (IN_TARGET_CODE): Define. * config/arm/arm-d.c (IN_TARGET_CODE): Likewise. * config/i386/i386-d.c (IN_TARGET_CODE): Likewise. * config/mips/mips-d.c (IN_TARGET_CODE): Likewise. * config/pa/pa-d.c (IN_TARGET_CODE): Likewise. * config/riscv/riscv-d.c (IN_TARGET_CODE): Likewise. * config/rs6000/rs6000-d.c (IN_TARGET_CODE): Likewise. * config/s390/s390-d.c (IN_TARGET_CODE): Likewise. * config/sparc/sparc-d.c (IN_TARGET_CODE): Likewise. 2021-03-26 Iain Buclaw PR d/91595 * config.gcc (*-*-cygwin*): Add winnt-d.o (*-*-mingw*): Likewise. * config/i386/cygwin.h (EXTRA_TARGET_D_OS_VERSIONS): New macro. * config/i386/mingw32.h (EXTRA_TARGET_D_OS_VERSIONS): Likewise. * config/i386/t-cygming: Add winnt-d.o. * config/i386/winnt-d.c: New file. 2021-03-26 Iain Buclaw * config/freebsd-d.c: Include memmodel.h. 2021-03-26 Iain Buclaw PR d/99691 * config.gcc (*-*-openbsd*): Add openbsd-d.o. * config/t-openbsd: Add openbsd-d.o. * config/openbsd-d.c: New file. 2021-03-25 Stam Markianos-Wright PR tree-optimization/96974 * tree-vect-stmts.c (vect_get_vector_types_for_stmt): Replace assert with graceful exit. 2021-03-25 H.J. Lu Revert: 2021-03-25 H.J. Lu PR target/98209 PR target/99744 * config/i386/i386.c (ix86_can_inline_p): Don't check ISA for always_inline in system headers. 2021-03-25 Kewen Lin * tree-vect-loop.c (vect_model_reduction_cost): Init inside_cost. 2021-03-25 Jakub Jelinek PR c++/99565 * tree-core.h (enum operand_equal_flag): Add OEP_ADDRESS_OF_SAME_FIELD. * fold-const.c (operand_compare::operand_equal_p): Don't compare field offsets if OEP_ADDRESS_OF_SAME_FIELD. 2021-03-25 H.J. Lu PR target/98209 PR target/99744 * config/i386/i386.c (ix86_can_inline_p): Don't check ISA for always_inline in system headers. 2021-03-25 Richard Biener PR tree-optimization/99746 * tree-vect-slp-patterns.c (complex_pattern::build): Do not mark the scalar stmt as patterned. Instead set up required things manually. 2021-03-25 Xionghu Luo * config/rs6000/rs6000.c (power8_costs): Change l2 cache from 256 to 512. 2021-03-24 Martin Liska PR target/99753 * common/config/i386/i386-common.c (ARRAY_SIZE): Fix off-by-one error. * config/i386/i386-options.c (ix86_option_override_internal): Add run-time assert. 2021-03-24 Martin Jambor PR ipa/99122 * ipa-cp.c (initialize_node_lattices): Mark as bottom all parameters with unknown type. (ipacp_value_safe_for_type): New function. (propagate_vals_across_arith_jfunc): Verify that the constant type can be used for a type of the formal parameter. (propagate_vals_across_ancestor): Likewise. (propagate_scalar_across_jump_function): Likewise. Pass the type also to propagate_vals_across_ancestor. 2021-03-24 Christophe Lyon PR target/99727 * config/arm/mve.md (movmisalign_mve_store): Use Ux constraint. (movmisalign_mve_load): Likewise. 2021-03-24 Jakub Jelinek PR target/99724 * config/arm/vec-common.md (one_cmpl2, neg2, movmisalign): Disable expanders for TARGET_REALLY_IWMMXT. 2021-03-24 Alexandre Oliva * doc/sourcebuild.texi (sysconf): New effective target. 2021-03-24 Alexandre Oliva * config/i386/predicates.md (reg_or_const_vec_operand): New. * config/i386/sse.md (ssse3_pshufbv8qi3): Add an expander for the now *-prefixed insn_and_split, turn the splitter const vec into an input for the insn, making it an ignored immediate for non-split cases, and loaded into the scratch register otherwise. 2021-03-23 Vladimir N. Makarov PR target/99581 * config/aarch64/constraints.md (Utq, UOb, UOh, UOw, UOd, UOty): Use define_relaxed_memory_constraint for them. 2021-03-23 Iain Sandoe PR target/99733 * config/host-darwin.c (darwin_gt_pch_use_address): Add a colon to the diagnostic message. 2021-03-23 Ilya Leoshkevich * fwprop.c (fwprop_propagation::fwprop_propagation): Look at set_info's uses. (try_fwprop_subst_note): Use set_info instead of insn_info. (try_fwprop_subst_pattern): Likewise. (try_fwprop_subst_notes): Likewise. (try_fwprop_subst): Likewise. (forward_propagate_subreg): Likewise. (forward_propagate_and_simplify): Likewise. (forward_propagate_into): Likewise. * rtl-ssa/accesses.h (set_info::single_nondebug_use) New method. (set_info::single_nondebug_insn_use): Likewise. (set_info::single_phi_use): Likewise. * rtl-ssa/member-fns.inl (set_info::single_nondebug_use) New method. (set_info::single_nondebug_insn_use): Likewise. (set_info::single_phi_use): Likewise. 2021-03-23 Christophe Lyon * doc/sourcebuild.texi (arm_dsp_ok, arm_dsp): Document. 2021-03-23 Jakub Jelinek PR target/99540 * config/aarch64/aarch64.c (aarch64_add_offset): Tell expand_mult to perform an unsigned rather than a signed multiplication. 2021-03-23 H.J. Lu PR target/99704 * config/i386/cpuid.h (__cpuid): Add __volatile__. (__cpuid_count): Likewise. 2021-03-23 Richard Biener PR tree-optimization/99721 * tree-vect-slp.c (vect_slp_analyze_node_operations): Make sure we can schedule the node. 2021-03-23 Marcus Comstedt * config/riscv/riscv.c (riscv_subword): Take endianness into account when calculating the byte offset. 2021-03-23 Marcus Comstedt * config/riscv/predicates.md (subreg_lowpart_operator): New predicate * config/riscv/riscv.md (*addsi3_extended2, *subsi3_extended2) (*negsi2_extended2, *mulsi3_extended2, *si3_mask) (*si3_mask_1, *di3_mask, *di3_mask_1) (*si3_extend_mask, *si3_extend_mask_1): Use new predicate "subreg_lowpart_operator" 2021-03-23 Marcus Comstedt * config/riscv/riscv.c (riscv_swap_instruction): New function to byteswap an SImode rtx containing an instruction. (riscv_trampoline_init): Byteswap the generated instructions when needed. 2021-03-23 Marcus Comstedt * common/config/riscv/riscv-common.c (TARGET_DEFAULT_TARGET_FLAGS): Set default endianness. * config.gcc (riscv32be-*, riscv64be-*): Set TARGET_BIG_ENDIAN_DEFAULT to 1. * config/riscv/elf.h (LINK_SPEC): Change -melf* value depending on default endianness. * config/riscv/freebsd.h (LINK_SPEC): Likewise. * config/riscv/linux.h (LINK_SPEC): Likewise. * config/riscv/riscv.c (TARGET_DEFAULT_TARGET_FLAGS): Set default endianness. * config/riscv/riscv.h (DEFAULT_ENDIAN_SPEC): New macro. 2021-03-23 Marcus Comstedt * config/riscv/elf.h (LINK_SPEC): Pass linker endianness flag. * config/riscv/freebsd.h (LINK_SPEC): Likewise. * config/riscv/linux.h (LINK_SPEC): Likewise. * config/riscv/riscv.h (ASM_SPEC): Pass -mbig-endian and -mlittle-endian. (BYTES_BIG_ENDIAN): Handle big endian. (WORDS_BIG_ENDIAN): Define to BYTES_BIG_ENDIAN. * config/riscv/riscv.opt (-mbig-endian, -mlittle-endian): New options. * doc/invoke.texi (-mbig-endian, -mlittle-endian): Document. 2021-03-23 Stefan Schulze Frielinghaus * regcprop.c (find_oldest_value_reg): Ask target whether different mode is fine for replacement register. 2021-03-23 Aldy Hernandez PR tree-optimization/99296 * value-range.cc (irange::irange_set_1bit_anti_range): New. (irange::irange_set_anti_range): Call irange_set_1bit_anti_range * value-range.h (irange::irange_set_1bit_anti_range): New. 2021-03-22 Vladimir N. Makarov PR target/99581 * config/aarch64/constraints.md (UtQ): Use define_relaxed_memory_constraint for it. * doc/md.texi (define_relaxed_memory_constraint): Describe it. * genoutput.c (main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT. * genpreds.c (constraint_data): Add bitfield is_relaxed_memory. (have_relaxed_memory_constraints): New static var. (relaxed_memory_start, relaxed_memory_end): Ditto. (add_constraint): Add arg is_relaxed_memory. Check name for relaxed memory. Set up is_relaxed_memory in constraint_data and have_relaxed_memory_constraints. Adjust calls. (choose_enum_order): Process relaxed memory. (write_tm_preds_h): Ditto. (main): Process DEFINE_RELAXED_MEMORY_CONSTRAINT. * gensupport.c (process_rtx): Process DEFINE_RELAXED_MEMORY_CONSTRAINT. * ira-costs.c (record_reg_classes): Process CT_RELAXED_MEMORY. * ira-lives.c (single_reg_class): Use insn_extra_relaxed_memory_constraint. * ira.c (ira_setup_alts): CT_RELAXED_MEMORY. * lra-constraints.c (valid_address_p): Use insn_extra_relaxed_memory_constraint instead of other memory constraints. (process_alt_operands): Process CT_RELAXED_MEMORY. (curr_insn_transform): Use insn_extra_relaxed_memory_constraint. * recog.c (asm_operand_ok, preprocess_constraints): Process CT_RELAXED_MEMORY. * reload.c (find_reloads): Ditto. * rtl.def (DEFINE_RELAXED_MEMORY_CONSTRAINT): New. * stmt.c (parse_input_constraint): Use insn_extra_relaxed_memory_constraint. 2021-03-22 Segher Boessenkool PR target/97926 * ubsan.c (ubsan_instrument_float_cast): Don't test for unordered if there are no NaNs. 2021-03-22 Alex Coplan PR target/97252 * config/arm/arm-protos.h (neon_make_constant): Add generate argument to guard emitting insns, default to true. * config/arm/arm.c (arm_legitimate_constant_p_1): Reject CONST_VECTORs which neon_make_constant can't handle. (neon_vdup_constant): Add generate argument, avoid emitting insns if it's not set. (neon_make_constant): Plumb new generate argument through. * config/arm/constraints.md (Ui): New. Use it... * config/arm/mve.md (*mve_mov): ... here. * config/arm/vec-common.md (movv8hf): Use neon_make_constant to synthesize constants. 2021-03-22 Richard Biener * debug.h: Add deprecation warning. 2021-03-22 Richard Biener PR tree-optimization/99694 * tree-ssa-sccvn.c (visit_phi): Ignore edges with the PHI result. 2021-03-22 Kito Cheng PR target/99702 * config/riscv/riscv.c (riscv_expand_block_move): Get RTL value after type checking. 2021-03-22 Jakub Jelinek PR debug/99562 PR debug/66728 * dwarf2out.c (get_full_len): Use get_precision rather than min_precision. (add_const_value_attribute): Make sure add_AT_wide argument has precision prec rather than some very wide one. 2021-03-22 Kewen Lin * config/rs6000/rs6000.md (*rotldi3_insert_sf, *movcc_p9, floatsi2_lfiwax, floatsi2_lfiwax_mem, floatunssi2_lfiwzx, floatunssi2_lfiwzx_mem, *floatsidf2_internal, *floatunssidf2_internal, fix_truncsi2_stfiwx, fix_truncsi2_internal, fixuns_truncsi2_stfiwx, *round322_fprs, *roundu322_fprs, *fix_truncsi2_internal): Fix empty split condition. * config/rs6000/vsx.md (*vsx_le_undo_permute_, vsx_reduc__v2df, vsx_reduc__v4sf, *vsx_reduc__v2df_scalar, *vsx_reduc__v4sf_scalar): Likewise. 2021-03-22 Xionghu Luo PR target/98914 * config/rs6000/rs6000.c (rs6000_expand_vector_set_var_p9): Convert idx to DImode. (rs6000_expand_vector_set_var_p8): Likewise. 2021-03-21 Jakub Jelinek PR debug/99388 * dwarf2out.c (insert_float): Change return type from void to unsigned, handle GET_MODE_SIZE (mode) == 2 and return element size. (mem_loc_descriptor, loc_descriptor, add_const_value_attribute): Adjust callers. 2021-03-20 H.J. Lu PR target/99679 * config/i386/i386.c (construct_container): Check cfun != NULL before accessing silent_p. 2021-03-20 Ahamed Husni * asan.c: Fix typos in comments. 2021-03-20 Vladimir N. Makarov PR rtl-optimization/99680 * lra-constraints.c (skip_contraint_modifiers): Rename to skip_constraint_modifiers. (process_address_1): Check empty constraint before using CONSTRAINT_LEN. 2021-03-19 Pat Haugen * config/rs6000/rs6000.c (power10_cost): New. (rs6000_option_override_internal): Set Power10 costs. (rs6000_issue_rate): Set Power10 issue rate. * config/rs6000/power10.md: Rewrite for Power10. 2021-03-19 Vladimir N. Makarov PR target/99663 * lra-constraints.c (process_address_1): Don't use unknown constraint for address constraint. 2021-03-19 Iain Sandoe PR target/99661 * config.gcc (powerpc-*-darwin8): Delete the reference to the now removed darwin8.h. 2021-03-19 Olivier Hainque PR target/99660 * config/vxworksae.h (VX_CPU_PREFIX): Define. 2021-03-19 John David Anglin * config/pa/pa.c (import_milli): Use memcpy instead of strncpy. 2021-03-19 Tamar Christina PR tree-optimization/99656 * tree-vect-slp-patterns.c (linear_loads_p, complex_add_pattern::matches, is_eq_or_top, vect_validate_multiplication, complex_mul_pattern::matches, complex_fms_pattern::matches): Remove complex_perm_kinds_t. * tree-vectorizer.h: (complex_load_perm_t): Removed. (slp_tree_to_load_perm_map_t): Use complex_perm_kinds_t instead of complex_load_perm_t. 2021-03-19 H.J. Lu PR target/99652 * config/i386/i386-options.c (ix86_init_machine_status): Set silent_p to true. * config/i386/i386.c (init_cumulative_args): Set silent_p to false. (construct_container): Return early for return and argument errors if silent_p is true. * config/i386/i386.h (machine_function): Add silent_p. 2021-03-19 Jakub Jelinek PR target/99593 * config/arm/constraints.md (Ds): New constraint. * config/arm/vec-common.md (mve_vshlq_): Use w,Ds constraint instead of w,Dm. 2021-03-19 Andrew Stubbs * config/gcn/gcn.c (gcn_parse_amdgpu_hsa_kernel_attribute): Fix quotes in error message. 2021-03-19 Eric Botcazou PR middle-end/99641 * fold-const.c (native_encode_initializer) : For an array type, do the computation of the current position in sizetype. 2021-03-18 Vladimir N. Makarov PR target/99422 * lra-constraints.c (process_address_1): Use lookup_constraint only for a single constraint. 2021-03-18 Martin Sebor PR middle-end/99502 * gimple-array-bounds.cc (inbounds_vbase_memaccess_p): Rename... (inbounds_memaccess_p): ...to this. Check the ending offset of the accessed member. 2021-03-18 Andrew Stubbs * config/gcn/gcn.c (gcn_parse_amdgpu_hsa_kernel_attribute): Add %< and %> quote markers to error messages. (gcn_goacc_validate_dims): Likewise. (gcn_conditional_register_usage): Remove exclaimation mark from error message. (gcn_vectorize_vec_perm_const): Ensure perm is fully uninitialized. 2021-03-18 Jan Hubicka * config/i386/x86-tune-costs.h (struct processor_costs): Fix costs of integer divides1. 2021-03-18 Sinan Lin Kito Cheng * config/riscv/riscv.c (riscv_block_move_straight): Change type to unsigned HOST_WIDE_INT for parameter and local variable with HOST_WIDE_INT type. (riscv_adjust_block_mem): Ditto. (riscv_block_move_loop): Ditto. (riscv_expand_block_move): Ditto. 2021-03-18 Nick Clifton * config/v850/v850.c (construct_restore_jr): Increase static buffer size. (construct_save_jarl): Likewise. * config/v850/v850.h (DWARF2_DEBUGGING_INFO): Define. 2021-03-18 Kyrylo Tkachov * config/aarch64/aarch64.c (aarch64_adjust_generic_arch_tuning): Define. (aarch64_override_options_internal): Use it. (generic_tunings): Add AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS to tune_flags. 2021-03-17 Sandra Loosemore * config/nios2/nios2.c (nios2_custom_check_insns): Clean up error message format issues. (nios2_option_override): Likewise. (nios2_expand_fpu_builtin): Likewise. (nios2_init_custom_builtins): Adjust to avoid bogus strncpy truncation warning. (nios2_expand_custom_builtin): More error message format fixes. (nios2_expand_rdwrctl_builtin): Likewise. (nios2_expand_rdprs_builtin): Likewise. (nios2_expand_eni_builtin): Likewise. (nios2_expand_builtin): Likewise. (nios2_register_custom_code): Likewise. (nios2_valid_target_attribute_rec): Likewise. (nios2_add_insn_asm): Fix uninitialized variable warning. 2021-03-17 Jan Hubicka * config/i386/x86-tune-costs.h (struct processor_costs): Update costs of gather to match reality. * config/i386/x86-tune.def (X86_TUNE_USE_GATHER): Enable for znver3. 2021-03-17 Kyrylo Tkachov * config/aarch64/aarch64-builtins.c (aarch64_expand_rng_builtin): Use EQ to compare against CC_REG rather than NE. 2021-03-17 H.J. Lu PR target/99504 * config/i386/i386.c (ix86_force_load_from_GOT_p): Support inline assembly statements. (ix86_print_operand): Update 'P' handling for -fno-plt. 2021-03-17 Tamar Christina PR target/99542 * config/aarch64/aarch64.c (aarch64_simd_clone_compute_vecsize_and_simdlen): Remove unused var. 2021-03-16 Segher Boessenkool PR target/98092 * config/rs6000/predicates.md (branch_comparison_operator): Allow ordered and unordered for CCFPmode, if flag_finite_math_only. 2021-03-16 Jakub Jelinek PR target/99600 * config/i386/i386-expand.c (ix86_split_lea_for_addr): Emit a MULT rather than ASHIFT. * config/i386/i386.md (mult by 1248 into ashift): New splitter. 2021-03-16 Martin Liska PR target/99592 * optc-save-gen.awk: Add flag_ipa_ra to exceptions for cl_optimization_compare function. 2021-03-16 Ilya Leoshkevich * config/s390/s390.c (f_constraint_p): Treat "fv" constraints as "v". 2021-03-16 Jakub Jelinek PR target/99563 * config/i386/i386.h (struct machine_function): Add has_explicit_vzeroupper bitfield. * config/i386/i386-expand.c (ix86_expand_builtin): Set cfun->machine->has_explicit_vzeroupper when expanding IX86_BUILTIN_VZEROUPPER. * config/i386/i386-features.c (rest_of_handle_insert_vzeroupper): Do the mode switching only when TARGET_VZEROUPPER, expensive optimizations turned on and not optimizing for size. (pass_insert_vzeroupper::gate): Enable even when cfun->machine->has_explicit_vzeroupper is set. 2021-03-16 Jakub Jelinek PR target/99542 * config/aarch64/aarch64.c (aarch64_simd_clone_compute_vecsize_and_simdlen): If not a function definition, walk TYPE_ARG_TYPES list if non-NULL for argument types instead of DECL_ARGUMENTS. Ignore types for uniform arguments. 2021-03-15 Richard Biener PR tree-optimization/98834 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle missing subsetting by truncating the access size. 2021-03-15 Jan Hubicka * config/i386/i386-options.c (processor_cost_table): Add znver3_cost. * config/i386/x86-tune-costs.h (znver3_cost): New gobal variable; copy of znver2_cost. 2021-03-15 Martin Liska * spellcheck.c: Add missing comma in initialization. 2021-03-14 Uroš Bizjak * config/i386/sse.md (*vec_extract): Merge alternative 0 with alternative 2 and alternative 1 with alternative 3 using YW register constraint. (*vec_extract_zext): Merge alternatives using YW register constraint. (*vec_extractv16qi_zext): Ditto. (*vec_extractv4si): Merge alternatives 4 and 5 using Yw register constraint. (*ssse3_palignr_perm): Use Yw instead of v for alternative 3. 2021-03-13 Martin Sebor PR tree-optimization/99489 * builtins.c (gimple_call_alloc_size): Fail gracefully when argument is not a call statement. 2021-03-13 Jakub Jelinek PR tree-optimization/99544 * match.pd (X + (X << C) -> X * (1 + (1 << C))): Don't simplify if for vector types multiplication can't be done in type's mode. 2021-03-12 Eric Botcazou PR target/99422 * config/sparc/constraints.md (w): Rename to... (W): ... this and ditch previous implementation. * config/sparc/sparc.md (*movdi_insn_sp64): Replace W with m. (*movdf_insn_sp64): Likewise. (*mov_insn_sp64): Likewise. * config/sparc/sync.md (*atomic_compare_and_swap_1): Replace w with W. (atomic_compare_and_swap_leon3_1): Likewise. (*atomic_compare_and_swapdi_v8plus): Likewise. * config/sparc/sparc.c (memory_ok_for_ldd): Remove useless test on architecture and add missing address validity check during LRA. 2021-03-12 Tobias Burnus PR fortran/98858 * gimplify.c (omp_add_variable): Handle NULL_TREE as size occuring for assumed-size arrays in use_device_{ptr,addr}. 2021-03-12 Jakub Jelinek PR target/99321 * config/i386/constraints.md (YW): New internal constraint. * config/i386/sse.md (v_Yw): Add V4TI, V2TI, V1TI and TI cases. (*_3, *_uavg3, *abs2, *mul3_highpart): Use instead of v in constraints. (_psadbw): Use YW instead of v in constraints. (*avx2_pmaddwd, *sse2_pmaddwd, *v8hi3, *v16qi3, avx2_pmaddubsw256, ssse3_pmaddubsw128): Merge last two alternatives into one, use Yw instead of former x,v. (ashr3, 3): Use instead of x in constraints of the last alternative. (_packsswb, _packssdw, _packuswb, _packusdw, *_pmulhrsw3, _palignr, _pshufb3): Merge last two alternatives into one, use instead of former x,v. (avx2_interleave_highv32qi, vec_interleave_highv16qi): Use Yw instead of v in constraints. Add && to condition. (avx2_interleave_lowv32qi, vec_interleave_lowv16qi, avx2_interleave_highv16hi, vec_interleave_highv8hi, avx2_interleave_lowv16hi, vec_interleave_lowv8hi, avx2_pshuflw_1, sse2_pshuflw_1, avx2_pshufhw_1, sse2_pshufhw_1, avx2_v16qiv16hi2, sse4_1_v8qiv8hi2, *sse4_1_v8qiv8hi2_1, _3): Use Yw instead of v in constraints. * config/i386/mmx.md (Yv_Yw): New define_mode_attr. (*mmx_3, mmx_ashr3, mmx_3): Use instead of Yv in constraints. (*mmx_3, *mmx_mulv4hi3, *mmx_smulv4hi3_highpart, *mmx_umulv4hi3_highpart, *mmx_pmaddwd, *mmx_v4hi3, *mmx_v8qi3, mmx_packswb, mmx_packssdw, mmx_punpckhbw, mmx_punpcklbw, mmx_punpckhwd, mmx_punpcklwd, *mmx_uavgv8qi3, *mmx_uavgv4hi3, mmx_psadbw): Use Yw instead of Yv in constraints. (*mmx_pinsrw, *mmx_pinsrb, *mmx_pextrw, *mmx_pextrw_zext, *mmx_pextrb, *mmx_pextrb_zext): Use YW instead of Yv in constraints. (*mmx_eq3, mmx_gt3): Use x instead of Yv in constraints. (mmx_andnot3, *mmx_3): Split last alternative into two, one with just x, another isa avx512vl with v. 2021-03-12 Martin Liska * doc/invoke.texi: Add missing param documentation. 2021-03-11 David Malcolm PR analyzer/96374 * Makefile.in (ANALYZER_OBJS): Add analyzer/feasible-graph.o and analyzer/trimmed-graph.o. * doc/analyzer.texi (Analyzer Paths): Rewrite description of feasibility checking to reflect new implementation. * doc/invoke.texi (-fdump-analyzer-feasibility): Document new option. * shortest-paths.h (shortest_paths::get_shortest_distance): New. 2021-03-11 David Malcolm * digraph.cc (selftest::test_shortest_paths): Update shortest_paths init for new param. Add test of SPS_TO_GIVEN_TARGET. * shortest-paths.h (enum shortest_path_sense): New. (shortest_paths::shortest_paths): Add "sense" param. Update for renamings. Generalize to use "sense" param. (shortest_paths::get_shortest_path): Rename param. (shortest_paths::m_sense): New field. (shortest_paths::m_prev): Rename... (shortest_paths::m_best_edge): ...to this. (shortest_paths::get_shortest_path): Update for renamings. Conditionalize flipping of path on sense of traversal. 2021-03-11 David Malcolm * digraph.cc (selftest::test_shortest_paths): Add test coverage for paths from B and C. * shortest-paths.h (shortest_paths::shortest_paths): Handle unreachable nodes, rather than asserting. 2021-03-11 David Edelsohn PR target/99094 * config/rs6000/rs6000.c (rs6000_xcoff_file_start): Don't create xcoff_tbss_section_name. * config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .lcomm. * xcoffout.c (xcoff_tbss_section_name): Delete. * xcoffout.h (xcoff_tbss_section_name): Delete. 2021-03-11 Richard Biener PR tree-optimization/99523 * tree-cfg.c (dump_function_to_file): Dump SSA names w/o identifier to the decls section as well, not only those without a VAR_DECL. 2021-03-11 Jakub Jelinek PR ipa/99517 * ipa-icf-gimple.c (func_checker::compare_gimple_call): For internal function calls with lhs fail if the lhs don't have compatible types. 2021-03-11 Hans-Peter Nilsson * config/cris/cris.h (HARD_FRAME_POINTER_REGNUM): Define. Change FRAME_POINTER_REGNUM to correspond to a new faked register faked_fp, part of GENNONACR_REGS like faked_ap. (CRIS_FAKED_REGS_CONTENTS): New helper macro. (FIRST_PSEUDO_REGISTER, FIXED_REGISTERS, CALL_USED_REGISTERS): (REG_ALLOC_ORDER, REG_CLASS_CONTENTS, REGNO_OK_FOR_BASE_P) (ELIMINABLE_REGS, REGISTER_NAMES): Adjust accordingly. * config/cris/cris.md (CRIS_FP_REGNUM): Renumber to new faked register. (CRIS_REAL_FP_REGNUM): New constant. * config/cris/cris.c (cris_reg_saved_in_regsave_area): Check for HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM. (cris_initial_elimination_offset): Handle elimination changes to HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM and add one from FRAME_POINTER_REGNUM to HARD_FRAME_POINTER_REGNUM. (cris_expand_prologue, cris_expand_epilogue): Emit code for hard_frame_pointer_rtx instead of frame_pointer_rtx. 2021-03-10 David Edelsohn PR target/99492 * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Add check for DCmode. * config/rs6000/rs6000.c (rs6000_special_round_type_align): Same. 2021-03-10 Vladimir N. Makarov PR target/99422 * lra-constraints.c (process_address_1): Don't check unknown constraint, use X for empty constraint. 2021-03-10 Alex Coplan * config/aarch64/aarch64.c (aarch64_vfp_is_call_or_return_candidate): Fix typo in comment describing "is_ha" argument. 2021-03-10 John David Anglin * doc/sourcebuild.texi: Document LRA target selector. 2021-03-10 David Malcolm * doc/ux.texi: Add subsection contrasting interactive versus batch usage of GCC. 2021-03-10 Joel Hutton PR target/99102 * tree-vect-stmts.c (vectorizable_store): Fix scatter store mask check condition. (vectorizable_load): Fix gather load mask check condition. 2021-03-10 Richard Biener PR tree-optimization/99510 * tree.c (check_aligned_type): Check that the candidate has TYPE_USER_ALIGN set instead of matching with the original type. 2021-03-10 Eric Botcazou * config/sparc/sparc.c (sparc_regmode_natural_size): Return 4 for float and vector integer modes only if the mode is not larger. 2021-03-10 Hans-Peter Nilsson * config/cris/cris.h (DWARF_FRAME_REGISTERS): Define. 2021-03-09 Vladimir N. Makarov * ira.c (ira_setup_alts, ira_get_dup_out_num): Process digital constraints > 9. * ira-lives.c (single_reg_class): Ditto. 2021-03-09 Sebastian Huber * config.gcc (aarch64-*-rtems*): Include general rtems.h after the architecture-specific rtems.h. (aarch64-*-rtems*): Likewise. (arm*-*-rtems*): Likewise. (epiphany-*-rtems*): Likewise. (riscv*-*-rtems*): Likewise. 2021-03-09 Jakub Jelinek PR tree-optimization/99305 * tree-ssa-phiopt.c (conditional_replacement): Test integer_pow2p before integer_all_onesp instead of vice versa. 2021-03-09 Richard Earnshaw * common/config/arm/arm-common.c (arm_config_default): Change type of 'i' to unsigned. 2021-03-09 Vladimir N. Makarov PR target/99454 * lra-constraints.c (process_address_1): Process constraint 'g' separately and digital constraints containing more one digit. 2021-03-09 Nick Clifton * config/rx/rx.h (DBX_DEBUGGING_INFO): Define. (DWARF"_DEBUGGING_INFO): Define. 2021-03-09 Eric Botcazou PR c++/90448 * calls.c (initialize_argument_information): When the argument is passed by reference, do not make a copy in a thunk only if the argument is already in memory. Remove redundant test for the case of callee copy. 2021-03-09 Vladimir N. Makarov PR target/99454 * lra-constraints.c (process_address_1): Process 0..9 constraints in process_address_1. 2021-03-09 Andreas Krebbel * config/s390/s390.c (struct s390_processor processor_table): Binutils name string must not be empty. 2021-03-09 Claudiu Zissulescu * config/arc/arc.c (arc_attr_type): Remove function. 2021-03-09 Martin Liska PR target/99464 * config/i386/i386-options.c (ix86_option_override_internal): Set isa_flags for OPTS argument and not for the global global_options. 2021-03-09 Aaron Sawdey * config/rs6000/predicates.md (ds_form_mem_operand): Check in correct code. 2021-03-09 Aaron Sawdey PR target/99070 * config/rs6000/predicates.md (ds_form_mem_operand) New predicate. * config/rs6000/genfusion.pl (gen_ld_cmpi_p10) Use ds_form_mem_operand in ld/lwa patterns. * config/rs6000/fusion.md: Regenerate file. 2021-03-08 Martin Sebor PR middle-end/98266 * gimple-array-bounds.cc (inbounds_vbase_memaccess_p): New function. (array_bounds_checker::check_array_bounds): Call it. 2021-03-08 Martin Sebor PR middle-end/97631 * tree-ssa-strlen.c (maybe_warn_overflow): Test rawmem. (handle_builtin_stxncpy_strncat): Rename locals. Determine destination size from allocation calls. Issue a more appropriate kind of warning. (handle_builtin_memcpy): Pass true as rawmem to maybe_warn_overflow. (handle_builtin_memset): Same. 2021-03-08 Peter Bergner PR target/98959 * config/rs6000/rs6000.c (rs6000_emit_le_vsx_permute): Add an assert to ensure we do not have an Altivec style address. * config/rs6000/vsx.md (*vsx_le_perm_load_): Disable if passed an Altivec style address. (*vsx_le_perm_store_): Likewise. (splitters after *vsx_le_perm_store_): Likewise. (vsx_load_): Disable special expander if passed an Altivec style address. (vsx_store_): Likewise. 2021-03-08 Kyrylo Tkachov PR target/99437 * config/aarch64/predicates.md (aarch64_simd_shift_imm_vec_qi): Define. (aarch64_simd_shift_imm_vec_hi): Likewise. (aarch64_simd_shift_imm_vec_si): Likewise. (aarch64_simd_shift_imm_vec_di): Likewise. * config/aarch64/aarch64-simd.md (aarch64_shrn_insn_le): Use predicate from above. (aarch64_shrn_insn_be): Likewise. (aarch64_rshrn_insn_le): Likewise. (aarch64_rshrn_insn_be): Likewise. (aarch64_shrn2_insn_le): Likewise. (aarch64_shrn2_insn_be): Likewise. (aarch64_rshrn2_insn_le): Likewise. (aarch64_rshrn2_insn_be): Likewise. 2021-03-08 Vladimir N. Makarov PR target/99422 * lra-constraints.c (skip_contraint_modifiers): New function. (process_address_1): Use it before lookup_constraint call. 2021-03-08 Martin Liska PR target/99463 * config/i386/i386-options.c (ix86_option_override_internal): Enable UINTR and HRESET for -march that supports it. 2021-03-08 Ilya Leoshkevich * config/s390/s390.c (f_constraint_p): New function. (s390_md_asm_adjust): Implement TARGET_MD_ASM_ADJUST. (TARGET_MD_ASM_ADJUST): Likewise. 2021-03-08 Tobias Burnus PR fortran/97927 * tree-nested.c (convert_local_reference_stmt): Avoid calling lookup_field_for_decl for Fortran module (= namespace context). 2021-03-08 Andreas Krebbel * config/s390/s390.c (s390_expand_vec_compare): Implement <0 comparison with arithmetic right shift. (s390_expand_vcond): No need for a force_reg anymore. s390_vec_compare will do it. * config/s390/vector.md ("vec_cmp"): Accept also immediate operands. 2021-03-07 Jakub Jelinek PR target/99321 * config/i386/constraints.md (Yw): Use SSE_REGS if TARGET_SSE but TARGET_AVX512BW or TARGET_AVX512VL is not set. Adjust description and comment. * config/i386/sse.md (v_Yw): New define_mode_attr. (*3, *mul3, *avx2_3, *sse4_1_3): Use instead of v in constraints. * config/i386/mmx.md (mmx_pshufw_1, *vec_dupv4hi): Use Yw instead of xYw in constraints. 2021-03-06 Julian Brown * tree-pretty-print.c (dump_generic_node): Emit non-generic address space info for aggregates. 2021-03-06 Hans-Peter Nilsson * config/cris/cris.h (MAX_FIXED_MODE_SIZE): Don't define. 2021-03-05 Jakub Jelinek PR middle-end/99322 * tree-cfg.c (bb_to_omp_idx): New variable. (execute_build_cfg): Release the bb_to_omp_idx vector after cleanup_tree_cfg returns. (handle_abnormal_edges): Remove bb_to_omp_idx argument, adjust for bb_to_omp_idx being a vec instead of pointer to array of ints. (make_edges): Remove bb_to_omp_idx local variable, don't pass it to handle_abnormal_edges, adjust for bb_to_omp_idx being a vec instead of pointer to array of ints and don't free/release it at the end. (remove_bb): When removing a bb and placing forced label somewhere else, ensure it is put into the same OpenMP region during cfg pass if possible or to entry successor as fallback. Unregister bb from bb_to_omp_idx. 2021-03-05 Vladimir N. Makarov PR target/99378 * lra-constraints.c (process_address_1): Skip decomposing address for asm insn operand with unknown constraint. 2021-03-05 Martin Jambor PR ipa/98078 * cgraph.c (cgraph_edge::set_call_stmt): Do not update all corresponding speculative edges if we are about to resolve sepculation. Make edge direct (and so resolve speculations) before removing it from call_site_hash. (cgraph_edge::make_direct): Relax the initial assert to allow calling the function on speculative direct edges. 2021-03-05 Eric Botcazou PR rtl-optimization/99376 * rtlanal.c (nonzero_bits1) : If the number of low-order zero bits is too large, set the result to 0 directly. 2021-03-04 Jakub Jelinek PR middle-end/93235 * expmed.c (store_bit_field_using_insv): Return false of xop0 is a SUBREG and a SUBREG to op_mode can't be created. 2021-03-04 Alex Coplan PR target/99381 * config/aarch64/aarch64-sve-builtins.cc (function_resolver::require_vector_type): Handle error_mark_node. 2021-03-04 Ilya Leoshkevich * cfgexpand.c (expand_asm_loc): Pass new parameter. (expand_asm_stmt): Likewise. * config/arm/aarch-common-protos.h (arm_md_asm_adjust): Add new parameter. * config/arm/aarch-common.c (arm_md_asm_adjust): Likewise. * config/arm/arm.c (thumb1_md_asm_adjust): Likewise. * config/cris/cris.c (cris_md_asm_adjust): Likewise. * config/i386/i386.c (ix86_md_asm_adjust): Likewise. * config/mn10300/mn10300.c (mn10300_md_asm_adjust): Likewise. * config/nds32/nds32.c (nds32_md_asm_adjust): Likewise. * config/pdp11/pdp11.c (pdp11_md_asm_adjust): Likewise. * config/rs6000/rs6000.c (rs6000_md_asm_adjust): Likewise. * config/vax/vax.c (vax_md_asm_adjust): Likewise. * config/visium/visium.c (visium_md_asm_adjust): Likewise. * doc/tm.texi (md_asm_adjust): Likewise. * target.def (md_asm_adjust): Likewise. 2021-03-04 Richard Biener PR middle-end/97855 * tree-pretty-print.c: Poison pp_printf. (dump_decl_name): Avoid use of pp_printf. (dump_block_node): Likewise. (dump_generic_node): Likewise. 2021-03-04 Martin Sebor PR middle-end/96963 PR middle-end/94655 * builtins.c (handle_array_ref): New helper. (handle_mem_ref): New helper. (compute_objsize_r): Factor out ARRAY_REF and MEM_REF handling into new helper functions. Correct a workaround for vectorized assignments. 2021-03-03 Pat Haugen * config/rs6000/dfp.md (extendddtd2, trunctddd2, *cmp_internal1, floatditd2, ftrunc2, fixdi2, dfp_ddedpd_, dfp_denbcd_, dfp_dxex_, dfp_diex_, *dfp_sgnfcnc_, dfp_dscli_, dfp_dscri_): Update size attribute for Power10. * config/rs6000/mma.md (*movoo): Likewise. * config/rs6000/rs6000.md (define_attr "size"): Add 256. (define_mode_attr bits): Add DD/TD modes. * config/rs6000/sync.md (load_quadpti, store_quadpti, load_lockedpti, store_conditionalpti): Update size attribute for Power10. 2021-03-03 Rainer Orth PR bootstrap/92002 * config/sparc/t-sparc (tree-ssanames.o-warn): Don't error for -Wuninitialized, -Wmaybe-uninitialized. (wide-int.o-warn): Likewise. 2021-03-03 Richard Earnshaw * common/config/arm/arm-common.c: Include configargs.h. (arm_config_default): New function. (arm_target_mode): Renamed from arm_target_thumb_only. Handle processors that do not support Thumb. Take into account the --with-mode configuration setting for selecting the default. * config/arm/arm.h (OPTION_DEFAULT_SPECS): Remove entry for 'mode'. (TARGET_MODE_SPEC_FUNCTIONS): Update for function name change. 2021-03-03 Martin Liska PR gcov-profile/97461 * gcov-io.h (GCOV_PREALLOCATED_KVP): Remove. 2021-03-03 Eric Botcazou PR target/99234 * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target, point back the hard frame pointer to its default location when the frame is larger than SEH_MAX_FRAME_SIZE. 2021-03-03 Jakub Jelinek PR target/99321 * config/i386/predicates.md (logic_operator): New define_predicate. * config/i386/i386.md (mov + mem using comm arith peephole2): Punt if operands[1] is EXT_REX_SSE_REGNO_P, AVX512BW is not enabled and the inner mode is [QH]Imode. 2021-03-03 Jakub Jelinek PR debug/99090 * dwarf2out.c (dw_loc_list_struct): Add end_entry member. (new_loc_list): Clear end_entry. (output_loc_list): Only use DW_LLE_startx_length for -gsplit-dwarf if HAVE_AS_LEB128, otherwise use DW_LLE_startx_endx. Fix comment typo. (index_location_lists): For dwarf_version >= 5 without HAVE_AS_LEB128, initialize also end_entry. 2021-03-03 Jakub Jelinek PR target/99085 * cfgrtl.c (fixup_partitions): When changing some bbs from hot to cold partitions, if in non-layout mode after reorder_blocks also move affected blocks to ensure a single partition transition. 2021-03-03 Jason Merrill PR c++/96078 * cgraphunit.c (process_function_and_variable_attributes): Don't warn about flatten on an alias if the target also has it. * cgraph.h (symtab_node::get_alias_target_tree): New. 2021-03-02 David Edelsohn * config/rs6000/rs6000.md (tls_get_tpointer_internal): Prepend period to symbol name. (tls_get_addr_internal): Same. 2021-03-02 David Malcolm PR c/99323 * diagnostic-show-locus.c (selftest::test_one_liner_many_fixits_2): Fix accidental usage of column 0. 2021-03-02 Martin Sebor PR middle-end/99276 * builtins.c (warn_for_access): Remove stray warning text. 2021-03-02 Martin Sebor PR middle-end/99295 * doc/extend.texi (attribute malloc): Reword and clarify nonaliasing property. 2021-03-02 Jakub Jelinek PR debug/99319 * dwarf2out.c (output_macinfo_op): Use DW_MACRO_*_str* even with -gdwarf-5 -gstrict-dwarf. For -gsplit-dwarf -gdwarf-5 use DW_MACRO_*_strx instead of DW_MACRO_*_strp. Handle DW_MACRO_define_strx and DW_MACRO_undef_strx. (save_macinfo_strings): Use DW_MACRO_*_str* even with -gdwarf-5 -gstrict-dwarf. Handle DW_MACRO_define_strx and DW_MACRO_undef_strx. 2021-03-02 Andreas Krebbel * config/s390/s390-builtin-types.def (BT_FN_V4SF_V8HI_UINT): New builtin signature. (BT_FN_V8HI_V8HI_UINT): Likewise. (BT_FN_V8HI_V4SF_V4SF_UINT): Likewise. * config/s390/s390-builtins.def (B_NNPA): New macro definition. (s390_vclfnhs, s390_vclfnls, s390_vcrnfs, s390_vcfn, s390_vcnf): New builtin definitions. * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Bump vector extension version. * config/s390/s390.c (s390_expand_builtin): Check if builtins are available with current -march level. * config/s390/s390.md (UNSPEC_NNPA_VCLFNHS_V8HI) (UNSPEC_NNPA_VCLFNLS_V8HI, UNSPEC_NNPA_VCRNFS_V8HI) (UNSPEC_NNPA_VCFN_V8HI, UNSPEC_NNPA_VCNF_V8HI): New constants. * config/s390/vecintrin.h (vec_extend_to_fp32_hi): New macro. (vec_extend_to_fp32_lo): Likewise. (vec_round_from_fp32): Likewise. (vec_convert_to_fp16): Likewise. (vec_convert_from_fp16): Likewise. * config/s390/vx-builtins.md (vclfnhs_v8hi): New insn pattern. (vclfnls_v8hi): Likewise. (vcrnfs_v8hi): Likewise. (vcfn_v8hi): Likewise. (vcnf_v8hi): Likewise. 2021-03-02 Andreas Krebbel * common/config/s390/s390-common.c (processor_flags_table): New entry. * config.gcc: Enable arch14 for --with-arch and --with-tune. * config/s390/driver-native.c (s390_host_detect_local_cpu): Pick arch14 for unknown CPU models. * config/s390/s390-opts.h (enum processor_type): Add PROCESSOR_ARCH14. * config/s390/s390.c (s390_issue_rate): Add case for PROCESSOR_ARCH14. (s390_get_sched_attrmask): Likewise. (s390_get_unit_mask): Likewise. * config/s390/s390.h (enum processor_flags): Add PF_NNPA and PF_ARCH14. (TARGET_CPU_ARCH14, TARGET_CPU_ARCH14_P, TARGET_CPU_NNPA) (TARGET_CPU_NNPA_P, TARGET_ARCH14, TARGET_ARCH14_P, TARGET_NNPA) (TARGET_NNPA_P): New macro definitions. * config/s390/s390.md ("cpu_facility", "enabled"): Add arch14 and nnpa. * config/s390/s390.opt: Add PROCESSOR_ARCH14. 2021-03-02 Jakub Jelinek PR middle-end/95757 * tree-vrp.c (register_edge_assert_for): Remove superfluous ()s around condition. Call register_edge_assert_for_1 for == 0, != 0, == 1 and != 1 comparisons if name is lhs of a comparison. 2021-03-01 Iain Sandoe PR target/44107 PR target/48097 * config/darwin-protos.h (darwin_should_restore_cfa_state): New. * config/darwin.c (darwin_should_restore_cfa_state): New. * config/darwin.h (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New. * doc/tm.texi: Regenerated. * doc/tm.texi.in: Document TARGET_ASM_SHOULD_RESTORE_CFA_STATE. * dwarf2cfi.c (connect_traces): If the target requests, restore the CFA expression after a DW_CFA_restore. * target.def (TARGET_ASM_SHOULD_RESTORE_CFA_STATE): New hook. 2021-03-01 Martin Liska PR target/99313 * optc-save-gen.awk: Add 4 more exceptions. 2021-03-01 Nathan Sidwell PR c++/99294 * tree.h (TYPE_ALIGN_RAW): New accessor. (TYPE_ALIGN): Use it. 2021-03-01 Jan Hubicka PR ipa/98338 * ipa-fnsummary.c (compute_fn_summary): Fix sanity check. 2021-03-01 Eric Botcazou PR target/99234 * config/i386/i386.c (ix86_compute_frame_layout): For a SEH target, point the hard frame pointer to the SSE register save area instead of the general register save area. Perform only minimal adjustment for small frames if it is initially not correctly aligned. (ix86_expand_prologue): Remove early saves for a SEH target. * config/i386/winnt.c (struct seh_frame_state): Document constraint. 2021-02-28 Jakub Jelinek PR c/99304 * ipa.c (symbol_table::remove_unreachable_nodes): Fix a comment typo - referneced -> referenced. * tree.c (component_ref_size): Fix comment typo - refernce -> reference. * tree-ssa-alias.c (access_path_may_continue_p): Fix comment typo - traling -> trailing. (aliasing_component_refs_p): Fix comment typos - refernce -> reference and refernece -> reference and traling -> trailing. (nonoverlapping_refs_since_match_p): Fix comment typo - referneces -> references. * doc/invoke.texi (--param modref-max-bases): Fix a typo - referneces -> references. 2021-02-27 Iain Sandoe * config/host-darwin.c (darwin_gt_pch_use_address): Modify diagnostic message to avoid use of a contraction and format warning. 2021-02-27 Jakub Jelinek PR other/99288 * gcse.c (gcse_or_cprop_is_too_expensive): Use %wu instead of HOST_WIDE_INT_PRINT_UNSIGNED in warning format string. * ipa-devirt.c (ipa_odr_read_section): Use %wd instead of HOST_WIDE_INT_PRINT_DEC in inform format string. Fix comment typos. 2021-02-26 Richard Biener PR middle-end/99281 * expr.c (store_field): For calls with return-slot optimization and addressable return type expand the store directly. 2021-02-26 Richard Biener PR c/99275 * builtins.c (warn_string_no_nul): Fix diagnostic formatting. 2021-02-26 Peter Bergner PR target/99279 * config/rs6000/rs6000-call.c (rs6000_init_builtins): Replace assert with an "if" test. 2021-02-26 Aaron Sawdey * config.gcc: Add rs6000-pcrel-opt.o. * config/rs6000/rs6000-pcrel-opt.c: New file. * config/rs6000/pcrel-opt.md: New file. * config/rs6000/predicates.md: Add d_form_memory predicate. * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_PCREL_OPT. * config/rs6000/rs6000-passes.def: Add pass_pcrel_opt. * config/rs6000/rs6000-protos.h: Add reg_to_non_prefixed(), pcrel_opt_valid_mem_p(), output_pcrel_opt_reloc(), and make_pass_pcrel_opt(). * config/rs6000/rs6000.c (reg_to_non_prefixed): Make global. (rs6000_option_override_internal): Add pcrel-opt. (rs6000_delegitimize_address): Support pcrel-opt. (rs6000_opt_masks): Add pcrel-opt. (pcrel_opt_valid_mem_p): New function. (reg_to_non_prefixed): Make global. (rs6000_asm_output_opcode): Reset prepend_p_to_next_insn. (output_pcrel_opt_reloc): New function. * config/rs6000/rs6000.md (loads_extern_addr): New attr. (pcrel_extern_addr): Set loads_extern_addr. Add include for pcrel-opt.md. * config/rs6000/rs6000.opt: Add -mpcrel-opt. * config/rs6000/t-rs6000: Add rules for pcrel-opt.c and pcrel-opt.md. 2021-02-26 YunQiang Su PR target/98996 * config/mips/mips.c (mips_expand_ext_as_unaligned_load): If TARGET_64BIT and dest is SUBREG, we check the width, if it equal to SImode, we use SImode operation, just like what we are doing for REG one. 2021-02-26 Marek Polacek * builtins.c (warn_for_access): Fix typos. 2021-02-25 Iain Sandoe * config/aarch64/aarch64.md (_rol3): Add a '#' mark in front of the immediate quantity. (_rolsi3_uxtw): Likewise. 2021-02-25 Richard Earnshaw PR target/99271 * config/arm/thumb2.md (nonsecure_call_reg_thumb2_fpcxt): New pattern. (nonsecure_call_value_reg_thumb2_fpcxt): Likewise. (nonsecure_call_reg_thumb2): Restrict to using r4 for the callee address and disable when the FPCXT is not available. (nonsecure_call_value_reg_thumb2): Likewise. 2021-02-25 Nathan Sidwell PR c++/99166 * doc/invoke.texi (flang-info-module-cmi): Renamed option. 2021-02-25 Tamar Christina * tree-vect-slp.c (optimize_load_redistribution_1): Abort on NULL nodes. 2021-02-25 Richard Biener PR tree-optimization/99253 * tree-vect-loop.c (check_reduction_path): First compute code, then verify out-of-loop uses. 2021-02-25 Jakub Jelinek PR target/95798 * match.pd ((T)(A) + CST -> (T)(A + CST)): Add :s to convert. 2021-02-25 Jakub Jelinek PR tree-optimization/80635 * tree-vrp.c (vrp_simplify_cond_using_ranges): Also handle VIEW_CONVERT_EXPR if modes are the same, innerop is integral and has mode precision. 2021-02-25 Richard Biener * tree-vect-slp.c (optimize_load_redistribution_1): Delay load_map population. (vect_match_slp_patterns_2): Revert part of last change. (vect_analyze_slp): Do not interleave optimize_load_redistribution with pattern detection but do it afterwards. Dump the whole SLP graph after pattern recognition and load redistribution optimization finished. 2021-02-24 Jakub Jelinek PR fortran/99226 * omp-low.c (struct omp_context): Add teams_nested_p and nonteams_nested_p members. (scan_omp_target): Diagnose teams nested inside of target with other directives strictly nested inside of the same target. (check_omp_nesting_restrictions): Set ctx->teams_nested_p or ctx->nonteams_nested_p as needed. 2021-02-24 Vladimir N. Makarov PR inline-asm/99123 * lra-constraints.c (uses_hard_regs_p): Don't use decompose_mem_address. 2021-02-24 Hans-Peter Nilsson * config/cris/cris.c (cris_expand_prologue): Set current_function_static_stack_size, if flag_stack_usage_info. 2021-02-24 Pat Haugen * config/rs6000/rs6000.c (next_insn_prefixed_p): Rename. (rs6000_final_prescan_insn): Adjust. (rs6000_asm_output_opcode): Likewise. 2021-02-24 Martin Sebor PR middle-end/97172 * attribs.c (attr_access::free_lang_data): Clear attribute arg spec from function arguments. 2021-02-24 Tamar Christina PR tree-optimization/99220 * tree-vect-slp.c (optimize_load_redistribution_1): Remove node from cache when it's about to be deleted. 2021-02-24 Jakub Jelinek PR tree-optimization/99225 * fold-const.c (fold_binary_loc) : In (x & (1 << y)) != 0 to ((x >> y) & 1) != 0 simplifications use build_one_cst instead of build_int_cst (..., 1). Formatting fixes. 2021-02-24 Tamar Christina PR tree-optimization/99149 * tree-vect-slp-patterns.c (vect_detect_pair_op): Don't recreate the buffer. (vect_slp_reset_pattern): Remove. (complex_fma_pattern::matches): Remove call to vect_slp_reset_pattern. (complex_mul_pattern::build, complex_fma_pattern::build, complex_fms_pattern::build): Fix ref counts. * tree-vect-slp.c (vect_free_slp_tree): Undo SLP only pattern relevancy when node is being deleted. (vect_match_slp_patterns_2): Correct result of cache hit on patterns. (vect_schedule_slp): Invalidate SLP_TREE_REPRESENTATIVE of removed stores. * tree-vectorizer.c (vec_info::new_stmt_vec_info): Initialize value. 2021-02-24 Matthias Klose Revert: 2020-12-07 Matthias Klose * genextract.c (print_header): Undefine ENABLE_RTL_CHECKING and ENABLE_RTL_FLAG_CHECKING. 2021-02-24 Richard Biener PR c/99224 * builtins.c (fold_builtin_next_arg): Avoid NULL arg. 2021-02-23 Peter Bergner * config/rs6000/mma.md (mma_assemble_pair): Rename from this... (vsx_assemble_pair): ...to this. (*mma_assemble_pair): Rename from this... (*vsx_assemble_pair): ...to this. (mma_disassemble_pair): Rename from this... (vsx_disassemble_pair): ...to this. (*mma_disassemble_pair): Rename from this... (*vsx_disassemble_pair): ...to this. * config/rs6000/rs6000-builtin.def (BU_MMA_V2, BU_MMA_V3, BU_COMPAT): New macros. (mma_assemble_pair): Rename from this... (vsx_assemble_pair): ...to this. (mma_disassemble_pair): Rename from this... (vsx_disassemble_pair): ...to this. (mma_assemble_pair): New compatibility built-in. (mma_disassemble_pair): Likewise. * config/rs6000/rs6000-call.c (struct builtin_compatibility): New. (RS6000_BUILTIN_COMPAT): Define. (bdesc_compat): New. (mma_expand_builtin): Use VSX_BUILTIN_DISASSEMBLE_PAIR_INTERNAL. (rs6000_gimple_fold_mma_builtin): Use MMA_BUILTIN_DISASSEMBLE_PAIR and VSX_BUILTIN_ASSEMBLE_PAIR. (rs6000_init_builtins): Register compatibility built-ins. (mma_init_builtins): Use VSX_BUILTIN_ASSEMBLE_PAIR, VSX_BUILTIN_ASSEMBLE_PAIR_INTERNAL, VSX_BUILTIN_DISASSEMBLE_PAIR and VSX_BUILTIN_DISASSEMBLE_PAIR_INTERNAL. * doc/extend.texi (__builtin_mma_assemble_pair): Rename from this... (__builtin_vsx_assemble_pair): ...to this. (__builtin_mma_disassemble_pair): Rename from this... (__builtin_vsx_disassemble_pair): ...to this. 2021-02-23 Martin Liska PR sanitizer/99168 * ipa-icf.c (sem_variable::merge): Do not merge 2 variables with different alignment. That leads to an invalid red zone size allocated in runtime. 2021-02-23 Jakub Jelinek PR tree-optimization/99204 * fold-const.c (fold_read_from_constant_string): Check that tree_fits_uhwi_p (index) rather than just that index is INTEGER_CST. 2021-02-23 Segher Boessenkool Kewen Lin * config/rs6000/rs6000.md (*rotl3_insert_3): Renamed to... (rotl3_insert_3): ...this. (plus_ior_xor): New code_iterator. (define_split for GPR rl*imi): New splitter. * config/rs6000/vsx.md (vsx_init_v4si): Use gen_rotldi3_insert_3 for integer merging. 2021-02-22 Kyrylo Tkachov * config/aarch64/aarch64-tuning-flags.def (cse_sve_vl_constants): Define. * config/aarch64/aarch64.md (add3): Force CONST_POLY_INT immediates into a register when the above is enabled. * config/aarch64/aarch64.c (neoversev1_tunings): AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS. (aarch64_rtx_costs): Use AARCH64_EXTRA_TUNE_CSE_SVE_VL_CONSTANTS. 2021-02-22 Hans-Peter Nilsson * config/cris/cris.c (cris_print_operand) <'T'>: Change valid operand from is now an addi mult-value to shift-value. * config/cris/cris.md (*addi): Change expression of scaled operand from mult to ashift. * config/cris/cris.md (*addi_reload): New insn_and_split. 2021-02-22 John David Anglin PR target/85074 * config/pa/pa.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Define as hook_bool_const_tree_hwi_hwi_const_tree_true. (pa_asm_output_mi_thunk): Add support for nonzero vcall_offset. 2021-02-22 Andre Vieira PR rtl-optimization/98791 * ira-conflicts.c (process_regs_for_copy): Don't create allocno copies for unordered modes. 2021-02-22 Martin Liska * tree-inline.c (inline_forbidden_p): Set inline_forbidden_reason. 2021-02-22 Richard Biener * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Dump costed subgraph. 2021-02-22 Richard Biener PR tree-optimization/99165 * gimple-ssa-store-merging.c (pass_store_merging::process_store): Accumulate changed to ret. 2021-02-21 Uros Bizjak Revert: 2020-12-09 Uroš Bizjak * config/i386/i386.h (REG_ALLOC_ORDER): Remove 2021-02-20 Ilya Leoshkevich PR target/99134 * config/s390/vector.md (trunctf2_vr): New pattern. (trunctf2): Likewise. (trunctdtf2_vr): Likewise. (trunctdtf2): Likewise. (extendtf2_vr): Likewise. (extendtf2): Likewise. (extendtftd2_vr): Likewise. (extendtftd2): Likewise. 2021-02-20 Ilya Leoshkevich * config/s390/vector.md (*fprx2_to_tf): Rename to fprx2_to_tf, add memory alternative. (tf_to_fprx2): New pattern. 2021-02-19 Martin Sebor PR c/97172 * attribs.c (init_attr_rdwr_indices): Guard vblist use. (attr_access::free_lang_data): Remove a spurious test. 2021-02-19 Nathan Sidwell * doc/invoke.texi (flang-info-module-read): Document. 2021-02-19 Martin Liska PR translation/99167 * params.opt: Fix typo. 2021-02-19 Richard Biener PR middle-end/99122 * tree-inline.c (inline_forbidden_p): Do not inline functions with VLA arguments or return value. 2021-02-19 Jakub Jelinek PR target/98998 * config/arm/arm.md (*stack_protect_combined_set_insn, *stack_protect_combined_test_insn): If force_const_mem result is not valid general operand, force its address into the destination register first. 2021-02-19 Jakub Jelinek PR ipa/99034 * tree-cfg.c (gimple_merge_blocks): If bb a starts with eh landing pad or non-local label, put FORCED_LABELs from bb b after that label rather than before it. 2021-02-19 Andre Vieira PR target/98657 * config/aarch64/aarch64-sve.md (3): Use expand_vector_broadcast' to emit the vec_duplicate operand. 2021-02-18 Vladimir N. Makarov PR rtl-optimization/96264 * lra-remat.c (reg_overlap_for_remat_p): Check also output insn hard regs. 2021-02-18 H.J. Lu PR target/99113 * varasm.c (get_section): Replace SUPPORTS_SHF_GNU_RETAIN with looking up the retain attribute. (resolve_unique_section): Likewise. (get_variable_section): Likewise. (switch_to_section): Likewise. Warn when a symbol without the retain attribute and a symbol with the retain attribute are placed in the section with the same name, instead of the used attribute. * doc/extend.texi: Document the "retain" attribute. 2021-02-18 Nathan Sidwell PR c++/99023 * doc/invoke.texi (flang-info-include-translate): Document header lookup behaviour. 2021-02-18 Richard Biener PR middle-end/99122 * ipa-fnsummary.c (analyze_function_body): Set CIF_FUNCTION_NOT_INLINABLE for VLA parameter calls. * tree-inline.c (insert_init_debug_bind): Pass NULL for error_mark_node values. (force_value_to_type): Do not build V_C_Es for WITH_SIZE_EXPR values. (setup_one_parameter): Delay force_value_to_type until when it's needed. 2021-02-18 Hans-Peter Nilsson PR tree-optimization/99142 * match.pd (clz cmp 0): Gate replacement on single_use of clz result. 2021-02-18 Jakub Jelinek * wide-int-bitmask.h (wide_int_bitmask::wide_int_bitmask (), wide_int_bitmask::wide_int_bitmask (uint64_t), wide_int_bitmask::wide_int_bitmask (uint64_t, uint64_t), wide_int_bitmask::operator ~ () const, wide_int_bitmask::operator | (wide_int_bitmask) const, wide_int_bitmask::operator & (wide_int_bitmask) const): Use constexpr instead of inline. * config/i386/i386.h (PTA_3DNOW, PTA_3DNOW_A, PTA_64BIT, PTA_ABM, PTA_AES, PTA_AVX, PTA_BMI, PTA_CX16, PTA_F16C, PTA_FMA, PTA_FMA4, PTA_FSGSBASE, PTA_LWP, PTA_LZCNT, PTA_MMX, PTA_MOVBE, PTA_NO_SAHF, PTA_PCLMUL, PTA_POPCNT, PTA_PREFETCH_SSE, PTA_RDRND, PTA_SSE, PTA_SSE2, PTA_SSE3, PTA_SSE4_1, PTA_SSE4_2, PTA_SSE4A, PTA_SSSE3, PTA_TBM, PTA_XOP, PTA_AVX2, PTA_BMI2, PTA_RTM, PTA_HLE, PTA_PRFCHW, PTA_RDSEED, PTA_ADX, PTA_FXSR, PTA_XSAVE, PTA_XSAVEOPT, PTA_AVX512F, PTA_AVX512ER, PTA_AVX512PF, PTA_AVX512CD, PTA_NO_TUNE, PTA_SHA, PTA_PREFETCHWT1, PTA_CLFLUSHOPT, PTA_XSAVEC, PTA_XSAVES, PTA_AVX512DQ, PTA_AVX512BW, PTA_AVX512VL, PTA_AVX512IFMA, PTA_AVX512VBMI, PTA_CLWB, PTA_MWAITX, PTA_CLZERO, PTA_NO_80387, PTA_PKU, PTA_AVX5124VNNIW, PTA_AVX5124FMAPS, PTA_AVX512VPOPCNTDQ, PTA_SGX, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2, PTA_VPCLMULQDQ, PTA_AVX512BITALG, PTA_RDPID, PTA_PCONFIG, PTA_WBNOINVD, PTA_AVX512VP2INTERSECT, PTA_PTWRITE, PTA_AVX512BF16, PTA_WAITPKG, PTA_MOVDIRI, PTA_MOVDIR64B, PTA_ENQCMD, PTA_CLDEMOTE, PTA_SERIALIZE, PTA_TSXLDTRK, PTA_AMX_TILE, PTA_AMX_INT8, PTA_AMX_BF16, PTA_UINTR, PTA_HRESET, PTA_KL, PTA_WIDEKL, PTA_AVXVNNI, PTA_X86_64_BASELINE, PTA_X86_64_V2, PTA_X86_64_V3, PTA_X86_64_V4, PTA_CORE2, PTA_NEHALEM, PTA_WESTMERE, PTA_SANDYBRIDGE, PTA_IVYBRIDGE, PTA_HASWELL, PTA_BROADWELL, PTA_SKYLAKE, PTA_SKYLAKE_AVX512, PTA_CASCADELAKE, PTA_COOPERLAKE, PTA_CANNONLAKE, PTA_ICELAKE_CLIENT, PTA_ICELAKE_SERVER, PTA_TIGERLAKE, PTA_SAPPHIRERAPIDS, PTA_ALDERLAKE, PTA_KNL, PTA_BONNELL, PTA_SILVERMONT, PTA_GOLDMONT, PTA_GOLDMONT_PLUS, PTA_TREMONT, PTA_KNM): Use constexpr instead of const. 2021-02-18 Jakub Jelinek PR middle-end/99109 * gimple-array-bounds.cc (build_zero_elt_array_type): Rename to ... (build_printable_array_type): ... this. Add nelts argument. For overaligned eltype, use TYPE_MAIN_VARIANT (eltype) instead. If nelts, call build_array_type_nelts. (array_bounds_checker::check_mem_ref): Use build_printable_array_type instead of build_zero_elt_array_type and build_array_type_nelts. 2021-02-18 Jakub Jelinek PR target/99104 * config/i386/i386.c (distance_non_agu_define): Don't call extract_insn_cached here. (ix86_lea_outperforms): Save and restore recog_data around call to distance_non_agu_define and distance_agu_use. (ix86_ok_to_clobber_flags): Remove. (ix86_avoid_lea_for_add): Don't call ix86_ok_to_clobber_flags. (ix86_avoid_lea_for_addr): Likewise. Adjust function comment. * config/i386/i386.md (*lea): Change from define_insn_and_split into define_insn. Move the splitting to define_peephole2 and check there using peep2_regno_dead_p if FLAGS_REG is dead. 2021-02-17 Julian Brown * gimplify.c (gimplify_scan_omp_clauses): Handle ATTACH_DETACH for non-decls. 2021-02-17 Xi Ruoyao PR target/98491 * config/mips/mips.c (mips_symbol_insns): Do not use MSA_SUPPORTED_MODE_P if mode is MAX_MACHINE_MODE. 2021-02-16 Vladimir N. Makarov PR inline-asm/98096 * stmt.c (resolve_operand_name_1): Take inout operands into account for access to labels by names. * doc/extend.texi: Describe counting operands for accessing labels. 2021-02-16 Richard Biener PR tree-optimization/38474 * tree-ssa-structalias.c (variable_info::address_taken): New. (new_var_info): Initialize address_taken. (process_constraint): Set address_taken. (solve_constraints): Use the new address_taken flag rather than is_reg_var for sorting variables. (dump_constraint): Dump the variable number if the name is just NULL. 2021-02-16 Jakub Jelinek PR target/99100 * tree-vect-stmts.c (vectorizable_simd_clone_call): For num_calls != 1 multiply by 4096 and for inbranch by 8192. * config/i386/i386.c (ix86_simd_clone_usable): For TARGET_AVX512F, return 3, 2 or 1 for mangle letters 'b', 'c' or 'd'. 2021-02-15 Maya Rashish * config/aarch64/aarch64.c (aarch64_init_builtins): Call SUBTARGET_INIT_BUILTINS. 2021-02-15 Peter Bergner PR rtl-optimization/98872 * init-regs.c (initialize_uninitialized_regs): Skip initialization if CONST0_RTX is NULL. 2021-02-15 Richard Sandiford PR rtl-optimization/98863 * rtl-ssa/functions.h (function_info::bb_live_out_info): Delete. (function_info::build_info): Turn into a declaration, moving the definition to internals.h. (function_info::bb_walker): Declare. (function_info::create_reg_use): Likewise. (function_info::calculate_potential_phi_regs): Take a build_info parameter. (function_info::place_phis, function_info::create_ebbs): Declare. (function_info::calculate_ebb_live_in_for_debug): Likewise. (function_info::populate_backedge_phis): Delete. (function_info::start_block, function_info::end_block): Declare. (function_info::populate_phi_inputs): Delete. (function_info::m_potential_phi_regs): Move information to build_info. * rtl-ssa/internals.h: New file. (function_info::bb_phi_info): New class. (function_info::build_info): Moved from functions.h. Add a constructor and destructor. (function_info::build_info::ebb_use): Delete. (function_info::build_info::ebb_def): Likewise. (function_info::build_info::bb_live_out): Likewise. (function_info::build_info::tmp_ebb_live_in_for_debug): New variable. (function_info::build_info::potential_phi_regs): Likewise. (function_info::build_info::potential_phi_regs_for_debug): Likewise. (function_info::build_info::ebb_def_regs): Likewise. (function_info::build_info::bb_phis): Likewise. (function_info::build_info::bb_mem_live_out): Likewise. (function_info::build_info::bb_to_rpo): Likewise. (function_info::build_info::def_stack): Likewise. (function_info::build_info::old_def_stack_limit): Likewise. * rtl-ssa/internals.inl (function_info::build_info::record_reg_def): Remove the regno argument. Push the previous definition onto the definition stack where necessary. * rtl-ssa/accesses.cc: Include internals.h. * rtl-ssa/changes.cc: Likewise. * rtl-ssa/blocks.cc: Likewise. (function_info::build_info::build_info): Define. (function_info::build_info::~build_info): Likewise. (function_info::bb_walker): New class. (function_info::bb_walker::bb_walker): Define. (function_info::add_live_out_use): Convert a logarithmic-complexity test into a linear one. Allow the same definition to be passed multiple times. (function_info::calculate_potential_phi_regs): Moved from functions.cc. Take a build_info parameter and store the information there instead. (function_info::place_phis): New function. (function_info::add_entry_block_defs): Update call to record_reg_def. (function_info::calculate_ebb_live_in_for_debug): New function. (function_info::add_phi_nodes): Use bb_phis to decide which registers need phi nodes and initialize ebb_def_regs accordingly. Do not add degenerate phis here. (function_info::add_artificial_accesses): Use create_reg_use. Assert that all definitions are listed in the DF LR sets. Update call to record_reg_def. (function_info::record_block_live_out): Record live-out register values in the phis of successor blocks. Use the live-out set when processing the last block in an EBB, instead of always using the live-in sets of successor blocks. AND the live sets with the set of registers that have been defined in the EBB, rather than with all potential phi registers. Cope correctly with branches back to the start of the current EBB. (function_info::start_block): New function. (function_info::end_block): Likewise. (function_info::populate_phi_inputs): Likewise. (function_info::create_ebbs): Likewise. (function_info::process_all_blocks): Rewrite into a multi-phase process. * rtl-ssa/functions.cc: Include internals.h. (function_info::calculate_potential_phi_regs): Move to blocks.cc. (function_info::init_function_data): Remove caller. * rtl-ssa/insns.cc: Include internals.h (function_info::create_reg_use): New function. Lazily any degenerate phis needed by the linear RPO view. (function_info::record_use): Use create_reg_use. When processing debug uses, use potential_phi_regs and test it before checking whether the register is live on entry to the current EBB. Lazily calculate ebb_live_in_for_debug. (function_info::record_call_clobbers): Update call to record_reg_def. (function_info::record_def): Likewise. 2021-02-15 Martin Liska * toplev.c (init_asm_output): Free output of gen_command_line_string function. (process_options): Likewise. 2021-02-15 Martin Liska * params.opt: Add 2 missing Param keywords. 2021-02-15 Eric Botcazou * df-core.c (df_worklist_dataflow_doublequeue): Use proper cast. 2021-02-15 Jakub Jelinek PR tree-optimization/99079 * match.pd (A % (pow2pcst << N) -> A & ((pow2pcst << N) - 1)): Remove useless tree_nop_conversion_p (type, TREE_TYPE (@3)) check. Instead require both type and TREE_TYPE (@1) to be integral types and either type having smaller or equal precision, or TREE_TYPE (@1) being unsigned type, or type being signed type. If TREE_TYPE (@1) doesn't have wrapping overflow, perform the subtraction of one in unsigned type. 2021-02-14 Jan Hubicka Richard Biener PR ipa/97346 * ipa-reference.c (ipa_init): Only conditinally initialize reference_vars_to_consider. (propagate): Conditionally deninitialize reference_vars_to_consider. (ipa_reference_write_optimization_summary): Sanity check that reference_vars_to_consider is not allocated. 2021-02-13 Levy Hsu PR target/97417 * config/riscv/riscv-shorten-memrefs.c (pass_shorten_memrefs): Add extend parameter to get_si_mem_base_reg declaration. (get_si_mem_base_reg): Add extend parameter. Set it. (analyze): Pass extend arg to get_si_mem_base_reg. (transform): Likewise. Use it when rewriting mems. * config/riscv/riscv.c (riscv_legitimize_move): Check for subword loads and emit sign/zero extending load followed by subreg move. 2021-02-13 Jim Wilson PR target/97417 * config/riscv/riscv.c (riscv_compressed_lw_address_p): Drop early exit when !reload_completed. Only perform check for compressed reg if reload_completed. (riscv_rtx_costs): In MEM case, when optimizing for size and shorten memrefs, if not compressible, then increase cost. 2021-02-13 Jakub Jelinek PR rtl-optimization/98439 * recog.c (pass_split_before_regstack::gate): Enable even when pass_split_before_sched2 is enabled if -fselective-scheduling2 is on. 2021-02-13 Jakub Jelinek PR target/96166 * config/i386/mmx.md (*mmx_pshufd_1): Add a combine splitter for swap of V2SImode elements in memory into DImode memory rotate by 32. 2021-02-12 Martin Sebor * tree-pretty-print.c (print_generic_expr_to_str): Update comment. 2021-02-12 Richard Sandiford * rtl-ssa/accesses.cc (function_info::make_use_available): Use m_temp_obstack rather than m_obstack to allocate the temporary use. 2021-02-12 Richard Sandiford * df-problems.c (df_lr_bb_local_compute): Treat partial definitions as read-modify operations. 2021-02-12 Richard Biener PR middle-end/38474 * ipa-fnsummary.c (unmodified_parm_1): Only walk when fbi->aa_walk_budget is bigger than zero. Update fbi->aa_walk_budget. (param_change_prob): Likewise. * ipa-prop.c (detect_type_change_from_memory_writes): Properly account walk_aliased_vdefs. (parm_preserved_before_stmt_p): Canonicalize updates. (parm_ref_data_preserved_p): Likewise. (parm_ref_data_pass_through_p): Likewise. (determine_known_aggregate_parts): Account own alias queries. 2021-02-12 Martin Liska * opts-common.c (decode_cmdline_option): Release werror_arg. * opts.c (gen_producer_string): Release output of gen_command_line_string. 2021-02-12 Richard Biener PR tree-optimization/38474 * params.opt (-param=max-store-chains-to-track=): New param. (-param=max-stores-to-track=): Likewise. * doc/invoke.texi (max-store-chains-to-track): Document. (max-stores-to-track): Likewise. * gimple-ssa-store-merging.c (pass_store_merging::m_n_chains): New. (pass_store_merging::m_n_stores): Likewise. (pass_store_merging::terminate_and_process_chain): Update m_n_stores and m_n_chains. (pass_store_merging::process_store): Likewise. Terminate oldest chains if the number of stores or chains get too large. (imm_store_chain_info::terminate_and_process_chain): Dump chain length. 2021-02-11 Eric Botcazou * config/i386/winnt.c (i386_pe_seh_unwind_emit): When switching to the cold section, emit a nop before the directive if the previous active instruction can throw. 2021-02-11 Peter Bergner PR target/99041 * config/rs6000/predicates.md (mma_assemble_input_operand): Restrict memory addresses that are legal for quad word accesses. 2021-02-11 Andrea Corallo PR target/98931 * config/arm/thumb2.md (*doloop_end_internal): Generate alternative sequence to handle long range branches. 2021-02-11 Joel Hutton PR tree-optimization/98772 * optabs-tree.c (supportable_half_widening_operation): New function to check for supportable V8QI->V8HI widening patterns. * optabs-tree.h (supportable_half_widening_operation): New function. * tree-vect-stmts.c (vect_create_half_widening_stmts): New function to create promotion stmts for V8QI->V8HI widening patterns. (vectorizable_conversion): Add case for V8QI->V8HI. 2021-02-11 Richard Biener * sparseset.h (SPARSESET_ELT_BITS): Remove. (SPARSESET_ELT_TYPE): Use unsigned int. * fwprop.c: Do not include sparseset.h. 2021-02-10 Jakub Jelinek PR c++/99035 * varasm.c (declare_weak): For -fsyntax-only, allow even TREE_ASM_WRITTEN function decls. 2021-02-10 Jakub Jelinek PR target/99025 * config/i386/sse.md (fix_truncv2sfv2di2, v8qiv8hi2, v8qiv8si2, v4qiv4si2, v4hiv4si2, v8qiv8di2, v4qiv4di2, v2qiv2di2, v4hiv4di2, v2hiv2di2, v2siv2di2): Force operands[1] into REG before calling simplify_gen_subreg on it. 2021-02-10 Martin Liska * config/nvptx/nvptx.c (nvptx_option_override): Use flag_patchable_function_entry instead of the removed function_entry_patch_area_size. 2021-02-10 Martin Liska PR tree-optimization/99002 PR tree-optimization/99026 * gimple-if-to-switch.cc (if_chain::is_beneficial): Fix memory leak when adjacent cases are merged. * tree-switch-conversion.c (switch_decision_tree::analyze_switch_statement): Use release_clusters. (make_pass_lower_switch): Remove trailing whitespace. * tree-switch-conversion.h (release_clusters): New. 2021-02-10 Richard Biener PR rtl-optimization/99054 * cfgrtl.c (rtl-optimization/99054): Return an auto_vec. (fixup_partitions): Adjust. (rtl_verify_edges): Likewise. 2021-02-10 Jakub Jelinek PR middle-end/99007 * gimplify.c (gimplify_scan_omp_clauses): For MEM_REF on reductions, temporarily disable gimplify_ctxp->into_ssa around gimplify_expr calls. 2021-02-10 Richard Biener PR ipa/99029 * ipa-pure-const.c (propagate_malloc): Use an auto_vec<> for callees. 2021-02-10 Richard Biener PR tree-optimization/99024 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Only clear loop->aux if it is associated with the destroyed loop_vinfo. 2021-02-10 Martin Liska PR tree-optimization/99002 * gimple-if-to-switch.cc (find_conditions): Fix memory leak in the function. 2021-02-10 Martin Liska PR ipa/99003 * ipa-icf.c (sem_item::add_reference): Fix memory leak when a reference exists. 2021-02-10 Jakub Jelinek PR debug/98755 * dwarf2out.c (prune_unused_types_walk): Mark DW_TAG_variable DIEs at class scope for DWARF5+. 2021-02-09 Eric Botcazou PR rtl-optimization/96015 * reorg.c (skip_consecutive_labels): Minor comment tweaks. (relax_delay_slots): When deleting a jump to the next active instruction over a barrier, first delete the barrier if the jump is the only way to reach the target label. 2021-02-09 Andre Vieira * config/aarch64/aarch64-cost-tables.h: Add entries for vect.mul. * config/aarch64/aarch64.c (aarch64_rtx_mult_cost): Use vect.mul for vector multiplies and vect.alu for SSRA. * config/arm/aarch-common-protos.h (struct vector_cost_table): Define vect.mul cost field. * config/arm/aarch-cost-tables.h: Add entries for vect.mul. * config/arm/arm.c: Likewise. 2021-02-09 Richard Biener PR tree-optimization/98863 * tree-ssa-sccvn.h (vn_avail::next_undo): Add. * tree-ssa-sccvn.c (last_pushed_avail): New global. (rpo_elim::eliminate_push_avail): Chain pushed avails. (unwind_state::avail_top): Add. (do_unwind): Rewrite unwinding of avail entries. (do_rpo_vn): Initialize last_pushed_avail and avail_top of the undo state. 2021-02-09 Jakub Jelinek PR middle-end/99004 * calls.c (maybe_warn_rdwr_sizes): Change s0 and s1 type from const char * to char * and free those pointers after use. 2021-02-09 Richard Biener PR tree-optimization/99017 * tree-vect-slp.c (vect_bb_vectorization_profitable_p): Allow zero vector cost entries. 2021-02-08 Andre Vieira PR middle-end/98974 * tree-vect-stmts.c (vectorizable_condition): Remove shadow vec_num parameter in vectorizable_condition. 2021-02-08 Richard Biener PR lto/96591 * tree.c (walk_tree_1): Walk VECTOR_CST elements. 2021-02-08 Martin Liska PR lto/98971 * cfgexpand.c (pass_expand::execute): Parse per-function option flag_patchable_function_entry and use it. * common.opt: Remove function_entry_patch_area_size and function_entry_patch_area_start global variables. * opts.c (parse_and_check_patch_area): New function. (common_handle_option): Use it. * opts.h (parse_and_check_patch_area): New function. * toplev.c (process_options): Parse and use function_entry_patch_area_size. 2021-02-08 Martin Sebor * doc/extend.texi (attribute malloc): Correct typos. 2021-02-05 Nathan Sidwell PR driver/98943 * gcc.c (driver::maybe_run_linker): Check for input file accessibility if not linking. 2021-02-05 Richard Biener PR tree-optimization/98855 * tree-vectorizer.h (add_stmt_cost): New overload. * tree-vect-slp.c (li_cost_vec_cmp): New. (vect_bb_slp_scalar_cost): Cost individual loop regions separately. Account for the scalar instance root stmt. 2021-02-05 Tom de Vries PR debug/98656 * tree-switch-conversion.c (jump_table_cluster::emit): Add loc argument. (bit_test_cluster::emit): Reuse location_t for newly created gswitch statement. (switch_decision_tree::try_switch_expansion): Preserve location_t. * tree-switch-conversion.h: Change function signatures. 2021-02-05 Jakub Jelinek PR target/98957 * config/i386/i386-options.c (m_NONE, m_ALL): Define. * config/i386/x86-tune.def (X86_TUNE_BRANCH_PREDICTION_HINTS, X86_TUNE_PROMOTE_QI_REGS): Use m_NONE instead of 0U. (X86_TUNE_QIMODE_MATH): Use m_ALL instead of ~0U. 2021-02-05 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (get_high): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_get_high): Define. * config/aarch64/arm_neon.h (__GET_HIGH): Delete. (vget_high_f16): Reimplement using new builtin. (vget_high_f32): Likewise. (vget_high_f64): Likewise. (vget_high_p8): Likewise. (vget_high_p16): Likewise. (vget_high_p64): Likewise. (vget_high_s8): Likewise. (vget_high_s16): Likewise. (vget_high_s32): Likewise. (vget_high_s64): Likewise. (vget_high_u8): Likewise. (vget_high_u16): Likewise. (vget_high_u32): Likewise. (vget_high_u64): Likewise. 2021-02-05 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (get_low): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_get_low): Define. * config/aarch64/arm_neon.h (__GET_LOW): Delete. (vget_low_f16): Reimplement using new builtin. (vget_low_f32): Likewise. (vget_low_f64): Likewise. (vget_low_p8): Likewise. (vget_low_p16): Likewise. (vget_low_p64): Likewise. (vget_low_s8): Likewise. (vget_low_s16): Likewise. (vget_low_s32): Likewise. (vget_low_s64): Likewise. (vget_low_u8): Likewise. (vget_low_u16): Likewise. (vget_low_u32): Likewise. (vget_low_u64): Likewise. 2021-02-05 Kito Cheng * gcc.c (print_multilib_info): Check all required argument is provided by default arg. 2021-02-05 liuhongt PR target/98537 * config/i386/i386-expand.c (ix86_expand_sse_cmp): Don't generate integer mask comparison for 128/256-bits vector when op_true/op_false is NULL_RTX or CONSTM1_RTX/CONST0_RTX. Also delete redundant !maskcmp condition. (ix86_expand_int_vec_cmp): Ditto but no redundant deletion here. (ix86_expand_sse_movcc): Delete definition of maskcmp, add the condition directly to if (maskcmp), add extra check for cmpmode, it should be MODE_INT. (ix86_expand_fp_vec_cmp): Pass NULL to ix86_expand_sse_cmp's parameters op_true/op_false. (ix86_use_mask_cmp_p): New. 2021-02-05 liuhongt PR target/98172 * config/i386/x86-tune.def (X86_TUNE_AVX256_UNALIGNED_LOAD_OPTIMAL): Remove m_GENERIC from ~list. (X86_TUNE_AVX256_UNALIGNED_STORE_OPTIMAL): Ditto. 2021-02-04 David Malcolm PR c/97932 * diagnostic-show-locus.c (compatible_locations_p): Require locations in the same macro map to be either both from the macro definition, or both from the macro arguments. 2021-02-04 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mull_hi_lane[q] builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mull_hi_lane_insn): Define. (aarch64_mull_hi_lane): Define. (aarch64_mull_hi_laneq_insn): Define. (aarch64_mull_hi_laneq): Define. * config/aarch64/arm_neon.h (vmull_high_lane_s16): Use RTL builtin instead of inline asm. (vmull_high_lane_s32): Likewise. (vmull_high_lane_u16): Likewise. (vmull_high_lane_u32): Likewise. (vmull_high_laneq_s16): Likewise. (vmull_high_laneq_s32): Likewise. (vmull_high_laneq_u16): Likewise. (vmull_high_laneq_u32): Liekwise. 2021-02-04 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mull_hi_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mull_hi_n_insn): Define. (aarch64_mull_hi_n): Define. * config/aarch64/arm_neon.h (vmull_high_n_s16): Use RTL builtin instead of inline asm. (vmull_high_n_s32): Likewise. (vmull_high_n_u16): Likewise. (vmull_high_n_u32): Likewise. 2021-02-04 Richard Biener PR tree-optimization/98855 * tree-vect-loop.c (vectorizable_phi): Do not cost single-argument PHIs. * tree-vect-slp.c (vect_bb_slp_scalar_cost): Likewise. * tree-vect-stmts.c (vectorizable_bswap): Also perform costing for SLP operation. 2021-02-04 Martin Liska * doc/extend.texi: Mention -mprefer-vector-width in target attributes. 2021-02-03 Martin Sebor PR tree-optimization/98937 * tree-ssa-strlen.c (strlen_dom_walker::~strlen_dom_walker): Define. Flush pointer_query cache. 2021-02-03 Aaron Sawdey * config/rs6000/genfusion.pl (gen_2logical): Add missing fixes based on patch review. * config/rs6000/fusion.md: Regenerate file. 2021-02-03 Aaron Sawdey * config/rs6000/t-rs6000: Comment out auto generation of fusion.md for now. 2021-02-03 Andrew Stubbs * config/gcn/gcn-opts.h (enum processor_type): Add PROCESSOR_GFX908. * config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): Add gfx908. (output_file_start): Add gfx908. * config/gcn/gcn.opt (gpu_type): Add gfx908. * config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add march=gfx908. (MULTILIB_DIRNAMES): Add gfx908. * config/gcn/mkoffload.c (EF_AMDGPU_MACH_AMDGCN_GFX908): New define. (main): Recognize gfx908. * config/gcn/t-omp-device: Add gfx908. 2021-02-03 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_hi_lane[q] builtin macro generators. * config/aarch64/aarch64-simd.md (aarch64_mlsl_hi_lane_insn): Define. (aarch64_mlsl_hi_lane): Define. (aarch64_mlsl_hi_laneq_insn): Define. (aarch64_mlsl_hi_laneq): Define. * config/aarch64/arm_neon.h (vmlsl_high_lane_s16): Use RTL builtin instead of inline asm. (vmlsl_high_lane_s32): Likewise. (vmlsl_high_lane_u16): Likewise. (vmlsl_high_lane_u32): Likewise. (vmlsl_high_laneq_s16): Likewise. (vmlsl_high_laneq_s32): Likewise. (vmlsl_high_laneq_u16): Likewise. (vmlsl_high_laneq_u32): Likewise. (vmlal_high_laneq_u32): Likewise. 2021-02-03 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal_hi_lane[q] builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mlal_hi_lane_insn): Define. (aarch64_mlal_hi_lane): Define. (aarch64_mlal_hi_laneq_insn): Define. (aarch64_mlal_hi_laneq): Define. * config/aarch64/arm_neon.h (vmlal_high_lane_s16): Use RTL builtin instead of inline asm. (vmlal_high_lane_s32): Likewise. (vmlal_high_lane_u16): Likewise. (vmlal_high_lane_u32): Likewise. (vmlal_high_laneq_s16): Likewise. (vmlal_high_laneq_s32): Likewise. (vmlal_high_laneq_u16): Likewise. (vmlal_high_laneq_u32): Likewise. 2021-02-03 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_hi_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mlsl_hi_n_insn): Define. (aarch64_mlsl_hi_n): Define. * config/aarch64/arm_neon.h (vmlsl_high_n_s16): Use RTL builtin instead of inline asm. (vmlsl_high_n_s32): Likewise. (vmlsl_high_n_u16): Likewise. (vmlsl_high_n_u32): Likewise. 2021-02-03 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal_hi_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mlal_hi_n_insn): Define. (aarch64_mlal_hi_n): Define. * config/aarch64/arm_neon.h (vmlal_high_n_s16): Use RTL builtin instead of inline asm. (vmlal_high_n_s32): Likewise. (vmlal_high_n_u16): Likewise. (vmlal_high_n_u32): Likewise. 2021-02-03 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add RTL builtin generator macros. * config/aarch64/aarch64-simd.md (*aarch64_mlal_hi): Rename to... (aarch64_mlal_hi_insn): This. (aarch64_mlal_hi): Define. * config/aarch64/arm_neon.h (vmlal_high_s8): Use RTL builtin instead of inline asm. (vmlal_high_s16): Likewise. (vmlal_high_s32): Likewise. (vmlal_high_u8): Likewise. (vmlal_high_u16): Likewise. (vmlal_high_u32): Likewise. 2021-02-03 Ilya Leoshkevich * lra-spills.c (remove_pseudos): Call lra_update_insn_recog_data() after calling alter_subreg() on a (mem). 2021-02-03 Martin Liska PR lto/98912 * lto-streamer-out.c (produce_lto_section): Fill up missing padding. * lto-streamer.h (struct lto_section): Add _padding field. 2021-02-03 Richard Biener * lto-streamer.c (lto_get_section_name): Free temporary buffer. * tree-loop-distribution.c (loop_distribution::merge_dep_scc_partitions): Free edge data. 2021-02-03 Jakub Jelinek PR middle-end/97487 * ifcvt.c (noce_can_force_operand): New function. (noce_emit_move_insn): Use it. (noce_try_sign_mask): Likewise. Formatting fix. 2021-02-03 Jakub Jelinek PR middle-end/97971 * lra-constraints.c (process_alt_operands): For inline asm, don't call fatal_insn, but instead return false. 2021-02-03 Jakub Jelinek PR tree-optimization/98287 * config/i386/mmx.md (3): For shifts don't enable expander for V1DImode. 2021-02-03 Tamar Christina PR tree-optimization/98928 * tree-vect-loop.c (vect_analyze_loop_2): Change STMT_VINFO_SLP_VECT_ONLY to STMT_VINFO_SLP_VECT_ONLY_PATTERN. * tree-vect-slp-patterns.c (complex_pattern::build): Likewise. * tree-vectorizer.h (STMT_VINFO_SLP_VECT_ONLY_PATTERN): New. (class _stmt_vec_info): Add slp_vect_pattern_only_p. 2021-02-02 Richard Biener * gimple-loop-interchange.cc (prepare_data_references): Release vectors. * gimple-loop-jam.c (tree_loop_unroll_and_jam): Likewise. * tree-ssa-loop-im.c (hoist_memory_references): Likewise. * tree-vect-stmts.c (vectorizable_condition): Do not allocate vectors. (vectorizable_comparison): Likewise. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (ursqrte): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_ursqrte): New pattern. * config/aarch64/arm_neon.h (vrsqrte_u32): Reimplement using builtin. (vrsqrteq_u32): Likewise. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sqxtun2): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_sqxtun2_le): Define. (aarch64_sqxtun2_be): Likewise. (aarch64_sqxtun2): Likewise. * config/aarch64/arm_neon.h (vqmovun_high_s16): Reimplement using builtin. (vqmovun_high_s32): Likewise. (vqmovun_high_s64): Likewise. * config/aarch64/iterators.md (UNSPEC_SQXTUN2): Define. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (bfdot_lane, bfdot_laneq): Use AUTO_FP flags. (bfmlalb_lane, bfmlalt_lane, bfmlalb_lane_q, bfmlalt_lane_q): Use FP flags. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (fcmla_lane0, fcmla_lane90, fcmla_lane180, fcmla_lane270, fcmlaq_lane0, fcmlaq_lane90, fcmlaq_lane180, fcmlaq_lane270, scvtf, ucvtf, fcvtzs, fcvtzu, scvtfsi, scvtfdi, ucvtfsi, ucvtfdi, fcvtzshf, fcvtzuhf, fmlal_lane_low, fmlsl_lane_low, fmlal_laneq_low, fmlsl_laneq_low, fmlalq_lane_low, fmlslq_lane_low, fmlalq_laneq_low, fmlslq_laneq_low, fmlal_lane_high, fmlsl_lane_high, fmlal_laneq_high, fmlsl_laneq_high, fmlalq_lane_high, fmlslq_lane_high, fmlalq_laneq_high, fmlslq_laneq_high): Use FP flags. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-builtins.c (FLAG_LOAD): Define. * config/aarch64/aarch64-simd-builtins.def (ld1x2, ld2, ld3, ld4, ld2r, ld3r, ld4r, ld1, ld1x3, ld1x4): Use LOAD flags. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (combine, zip1, zip2, uzp1, uzp2, trn1, trn2, simd_bsl): Use AUTO_FP flags. 2021-02-02 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (clrsb, clz, ctz, popcount, vec_smult_lane_, vec_smlal_lane_, vec_smult_laneq_, vec_smlal_laneq_, vec_umult_lane_, vec_umlal_lane_, vec_umult_laneq_, vec_umlal_laneq_, ashl, sshl, ushl, srshl, urshl, sdot_lane, udot_lane, sdot_laneq, udot_laneq, usdot_lane, usdot_laneq, sudot_lane, sudot_laneq, ashr, ashr_simd, lshr, lshr_simd, srshr_n, urshr_n, ssra_n, usra_n, srsra_n, ursra_n, sshll_n, ushll_n, sshll2_n, ushll2_n, ssri_n, usri_n, ssli_n, ssli_n, usli_n, bswap, rbit, simd_bsl, eor3q, rax1q, xarq, bcaxq): Use NONE builtin flags. 2021-02-02 Jakub Jelinek PR tree-optimization/98848 * tree-vect-patterns.c (vect_recog_over_widening_pattern): Punt if STMT_VINFO_DEF_TYPE (last_stmt_info) is vect_reduction_def. 2021-02-02 Kito Cheng PR target/98743 * expr.c: Check mode before calling store_expr. 2021-02-02 Christophe Lyon * config/arm/iterators.md (supf): Remove VORNQ_S and VORNQ_U. (VORNQ): Remove. * config/arm/mve.md (mve_vornq_s): New entry for vorn instruction using expression ior. (mve_vornq_u): New expander. (mve_vornq_f): Use ior code instead of unspec. * config/arm/unspecs.md (VORNQ_S, VORNQ_U, VORNQ_F): Remove. 2021-02-02 Alexandre Oliva * tree-nested.c (convert_nonlocal_reference_op): Move current_function_decl restore after re-gimplification. (convert_local_reference_op): Likewise. 2021-02-01 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (rshrn, rshrn2): Define builtins. * config/aarch64/aarch64-simd.md (aarch64_rshrn_insn_le): Define. (aarch64_rshrn_insn_be): Likewise. (aarch64_rshrn): Likewise. (aarch64_rshrn2_insn_le): Likewise. (aarch64_rshrn2_insn_be): Likewise. (aarch64_rshrn2): Likewise. * config/aarch64/aarch64.md (unspec): Add UNSPEC_RSHRN. * config/aarch64/arm_neon.h (vrshrn_high_n_s16): Reimplement using builtin. (vrshrn_high_n_s32): Likewise. (vrshrn_high_n_s64): Likewise. (vrshrn_high_n_u16): Likewise. (vrshrn_high_n_u32): Likewise. (vrshrn_high_n_u64): Likewise. (vrshrn_n_s16): Likewise. (vrshrn_n_s32): Likewise. (vrshrn_n_s64): Likewise. (vrshrn_n_u16): Likewise. (vrshrn_n_u32): Likewise. (vrshrn_n_u64): Likewise. 2021-02-01 Sergei Trofimovich PR tree-optimization/98499 * ipa-modref.c (analyze_ssa_name_flags): treat RVO conservatively and assume all possible side-effects. 2021-02-01 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (vec_unpacks_hi, vec_unpacku_hi_): Define builtins. * config/aarch64/arm_neon.h (vmovl_high_s8): Reimplement using builtin. (vmovl_high_s16): Likewise. (vmovl_high_s32): Likewise. (vmovl_high_u8): Likewise. (vmovl_high_u16): Likewise. (vmovl_high_u32): Likewise. 2021-02-01 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sabdl, uabdl): Define builtins. * config/aarch64/aarch64-simd.md (aarch64_abdl): New pattern. * config/aarch64/aarch64.md (unspec): Define UNSPEC_SABDL, UNSPEC_UABDL. * config/aarch64/arm_neon.h (vabdl_s8): Reimplemet using builtin. (vabdl_s16): Likewise. (vabdl_s32): Likewise. (vabdl_u8): Likewise. (vabdl_u16): Likewise. (vabdl_u32): Likewise. * config/aarch64/iterators.md (ABDL): New int iterator. (sur): Handle UNSPEC_SABDL, UNSPEC_UABDL. 2021-02-01 Martin Sebor * tree.h (BLOCK_VARS): Add comment. (BLOCK_SUBBLOCKS): Same. (BLOCK_SUPERCONTEXT): Same. (BLOCK_ABSTRACT_ORIGIN): Same. (inlined_function_outer_scope_p): Same. 2021-02-01 Martin Sebor PR middle-end/97172 * attribs.c (attr_access::free_lang_data): Define new function. * attribs.h (attr_access::free_lang_data): Declare new function. 2021-02-01 Richard Biener * vec.h (auto_vec::auto_vec): Add memory stat parameters and pass them on. * bitmap.h (auto_bitmap::auto_bitmap): Likewise. 2021-02-01 Tamar Christina * config/aarch64/aarch64-simd.md (aarch64_mlal_n, aarch64_mlsl, aarch64_mlsl_n): Flip mult operands. 2021-02-01 Richard Biener PR rtl-optimization/98863 * config/i386/i386-features.c (convert_scalars_to_vector): Set DF_RD_PRUNE_DEAD_DEFS. 2021-01-31 Eric Botcazou * system.h (SIZE_MAX): Define if not already defined. 2021-01-30 Aaron Sawdey * config/rs6000/genfusion.pl (gen_2logical): New function to generate patterns for logical-logical fusion. * config/rs6000/fusion.md: Regenerated patterns. * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_P10_FUSION_2LOGICAL. * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable logical-logical fusion for p10. * config/rs6000/rs6000.opt: Add -mpower10-fusion-2logical. 2021-01-30 David Edelsohn * config/rs6000/rs6000.opt: Add periods to new AIX options. 2021-01-30 David Edelsohn * config/rs6000/rs6000.opt (mabi=vec-extabi): New. (mabi=vec-default): New. * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define __EXTABI__ for AIX Vector extended ABI. * config/rs6000/rs6000.c (rs6000_debug_reg_global): Print AIX Vector extabi info. (conditional_register_usage): If AIX vec_extabi enabled, vs20-vs31 are non-volatile. * doc/invoke.texi (PowerPC mabi): Add AIX vec-extabi and vec-default. 2021-01-30 Jakub Jelinek * config/i386/i386-features.c (remove_partial_avx_dependency): Clear DF_DEFER_INSN_RESCAN after calling df_process_deferred_rescans. 2021-01-29 Vladimir N. Makarov PR target/97701 * lra-constraints.c (in_class_p): Don't narrow class only for REG or MEM. 2021-01-29 Will Schmidt * config/rs6000/rs6000-call.c (rs6000_expand_binup_builtin): Add clauses for CODE_FOR_vsx_xvcvuxddp_scale and CODE_FOR_vsx_xvcvsxddp_scale to the parameter checking code. 2021-01-29 Andrew MacLeod PR tree-optimization/98866 * gimple-range-gori.h (gori_compute:set_range_invariant): New. * gimple-range-gori.cc (gori_map::set_range_invariant): New. (gori_map::m_maybe_invariant): Rename from all_outgoing. (gori_map::gori_map): Rename all_outgoing to m_maybe_invariant. (gori_map::is_export_p): Ditto. (gori_map::calculate_gori): Ditto. (gori_compute::set_range_invariant): New. * gimple-range.cc (gimple_ranger::range_of_stmt): Set range invariant for pointers evaluating to [1, +INF]. 2021-01-29 Richard Biener PR rtl-optimization/98863 * config/i386/i386-features.c (remove_partial_avx_dependency): Do not perform DF analysis. (pass_data_remove_partial_avx_dependency): Remove TODO_df_finish. 2021-01-29 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mull_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mull_n): Define. * config/aarch64/arm_neon.h (vmull_n_s16): Use RTL builtin instead of inline asm. (vmull_n_s32): Likewise. (vmull_n_u16): Likewise. (vmull_n_u32): Likewise. 2021-01-29 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sabdl2, uabdl2): Define builtins. * config/aarch64/aarch64-simd.md (aarch64_abdl2_3): Rename to... (aarch64_abdl2): ... This. (sadv16qi): Adjust use of above. * config/aarch64/arm_neon.h (vabdl_high_s8): Reimplement using builtin. (vabdl_high_s16): Likewise. (vabdl_high_s32): Likewise. (vabdl_high_u8): Likewise. (vabdl_high_u16): Likewise. (vabdl_high_u32): Likewise. 2021-01-29 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sabal2): Define builtin. (uabal2): Likewise. * config/aarch64/aarch64-simd.md (aarch64_abal2): New pattern. * config/aarch64/aarch64.md (unspec): Add UNSPEC_SABAL2 and UNSPEC_UABAL2. * config/aarch64/arm_neon.h (vabal_high_s8): Reimplement using builtin. (vabal_high_s16): Likewise. (vabal_high_s32): Likewise. (vabal_high_u8): Likewise. (vabal_high_u16): Likewise. (vabal_high_u32): Likewise. * config/aarch64/iterators.md (ABAL2): New mode iterator. (sur): Handle UNSPEC_SABAL2, UNSPEC_UABAL2. 2021-01-29 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sabal): Define builtin. (uabal): Likewise. * config/aarch64/aarch64-simd.md (aarch64_abal_4): Rename to... (aarch64_abal): ... This (sadv16qi): Adust use of the above. * config/aarch64/arm_neon.h (vabal_s8): Reimplement using builtin. (vabal_s16): Likewise. (vabal_s32): Likewise. (vabal_u8): Likewise. (vabal_u16): Likewise. (vabal_u32): Likewise. 2021-01-29 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (saddlv, uaddlv): Define builtins. * config/aarch64/aarch64-simd.md (aarch64_addlv): Define. * config/aarch64/arm_neon.h (vaddlv_s8): Reimplement using builtin. (vaddlv_s16): Likewise. (vaddlv_u8): Likewise. (vaddlv_u16): Likewise. (vaddlvq_s8): Likewise. (vaddlvq_s16): Likewise. (vaddlvq_s32): Likewise. (vaddlvq_u8): Likewise. (vaddlvq_u16): Likewise. (vaddlvq_u32): Likewise. (vaddlv_s32): Likewise. (vaddlv_u32): Likewise. * config/aarch64/iterators.md (VDQV_L): New mode iterator. (unspec): Add UNSPEC_SADDLV, UNSPEC_UADDLV. (Vwstype): New mode attribute. (Vwsuf): Likewise. (VWIDE_S): Likewise. (USADDLV): New int iterator. (su): Handle UNSPEC_SADDLV, UNSPEC_UADDLV. 2021-01-29 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_lane[q] builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_vec_mlsl_lane): Define. * config/aarch64/arm_neon.h (vmlsl_lane_s16): Use RTL builtin instead of inline asm. (vmlsl_lane_s32): Likewise. (vmlsl_lane_u16): Likewise. (vmlsl_lane_u32): Likewise. (vmlsl_laneq_s16): Likewise. (vmlsl_laneq_s32): Likewise. (vmlsl_laneq_u16): Likewise. (vmlsl_laneq_u32): Likewise. 2021-01-29 Richard Biener * doc/invoke.texi (--param max-gcse-memory): Document unit of size. * gcse.c (gcse_or_cprop_is_too_expensive): Adjust. * params.opt (--param max-gcse-memory): Adjust default and document unit of size. 2021-01-29 Richard Biener PR rtl-optimization/98863 * gcse.c (gcse_or_cprop_is_too_expensive): Use unsigned HOST_WIDE_INT for the memory estimate. 2021-01-29 Bin Cheng Richard Biener PR tree-optimization/97627 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions): Do not analyze fake edges. 2021-01-29 Richard Biener PR rtl-optimization/98144 * df.h (df_mir_bb_info): Add con_visited member. * df-problems.c (df_mir_alloc): Initialize con_visited, do not fully populate IN and OUT. (df_mir_reset): Likewise. (df_mir_confluence_0): Set con_visited. (df_mir_confluence_n): Properly handle implicitely fully populated IN and OUT as designated by con_visited and update con_visited accordingly. 2021-01-29 Jakub Jelinek PR target/98849 * config/arm/vec-common.md (mve_vshlq_, vashl3, vashr3, vlshr3): Add && !TARGET_REALLY_IWMMXT to conditions. 2021-01-29 Jakub Jelinek PR debug/98331 * cfgbuild.c (find_bb_boundaries): Reset debug_insn when seeing a BARRIER. 2021-01-28 Marek Polacek PR c++/94775 * stor-layout.c (finalize_type_size): If we reset TYPE_USER_ALIGN in the main variant, maybe reset it in its variants too. * tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match. (check_aligned_type): Check if TYPE_USER_ALIGN match. 2021-01-28 Christophe Lyon PR target/98730 * config/arm/arm.c (arm_rtx_costs_internal): Adjust cost of vector of constant zero for comparisons. 2021-01-28 Michael Meissner * config/rs6000/rs6000.c (rs6000_mangle_decl_assembler_name): Add support for mapping built-in function names for long double built-in functions if long double is IEEE 128-bit. 2021-01-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlsl_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mlsl_n): Define. * config/aarch64/arm_neon.h (vmlsl_n_s16): Use RTL builtin instead of inline asm. (vmlsl_n_s32): Likewise. (vmlsl_n_u16): Likewise. (vmlsl_n_u32): Likewise. 2021-01-28 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal_n builtin generator macros. * config/aarch64/aarch64-simd.md (aarch64_mlal_n): Define. * config/aarch64/arm_neon.h (vmlal_n_s16): Use RTL builtin instead of inline asm. (vmlal_n_s32): Likewise. (vmlal_n_u16): Likewise. (vmlal_n_u32): Likewise. 2021-01-28 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (shrn2): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_shrn2_insn_le): Define. (aarch64_shrn2_insn_be): Likewise. (aarch64_shrn2): Likewise. * config/aarch64/arm_neon.h (vshrn_high_n_s16): Reimlplement using builtins. (vshrn_high_n_s32): Likewise. (vshrn_high_n_s64): Likewise. (vshrn_high_n_u16): Likewise. (vshrn_high_n_u32): Likewise. (vshrn_high_n_u64): Likewise. 2021-01-28 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (shrn): Define builtin. * config/aarch64/aarch64-simd.md (aarch64_shrn_insn_le): Define. (aarch64_shrn_insn_be): Likewise. (aarch64_shrn): Likewise. * config/aarch64/arm_neon.h (vshrn_n_s16): Reimplement using builtins. (vshrn_n_s32): Likewise. (vshrn_n_s64): Likewise. (vshrn_n_u16): Likewise. (vshrn_n_u32): Likewise. (vshrn_n_u64): Likewise. * config/aarch64/iterators.md (vn_mode): New mode attribute. 2021-01-28 Richard Biener PR rtl-optimization/80960 * dse.c (check_mem_read_rtx): Call get_addr on the offsetted address. 2021-01-28 Xionghu Luo David Edelsohn PR target/98799 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Don't generate VIEW_CONVERT_EXPR for fcode ALTIVEC_BUILTIN_VEC_INSERT when -m32. * config/rs6000/rs6000-protos.h (rs6000_expand_vector_set_var): Delete. * config/rs6000/rs6000.c (rs6000_expand_vector_set): Remove the wrapper call rs6000_expand_vector_set_var for cleanup. Call rs6000_expand_vector_set_var_p9 and rs6000_expand_vector_set_var_p8 directly. (rs6000_expand_vector_set_var): Delete. (rs6000_expand_vector_set_var_p9): Make static. (rs6000_expand_vector_set_var_p8): Make static. 2021-01-28 Xing GUO * common/config/riscv/riscv-common.c (riscv_subset_list::parsing_subset_version): Fix -march option parsing when `p` extension exists. 2021-01-27 Vladimir N. Makarov PR rtl-optimization/97684 * ira.c (ira): Call ira_set_pseudo_classes before update_equiv_regs when it is necessary. 2021-01-27 Jakub Jelinek PR target/98853 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Use %w0, %w1 and %2 instead of %0, %1 and %2. 2021-01-27 Aaron Sawdey * config/rs6000/genfusion.pl: New script to generate define_insn_and_split patterns so combine can arrange fused instructions next to each other. * config/rs6000/fusion.md: New file, generated fused instruction patterns for combine. * config/rs6000/predicates.md (const_m1_to_1_operand): New predicate. (non_update_memory_operand): New predicate. * config/rs6000/rs6000-cpus.def: Add OPTION_MASK_P10_FUSION and OPTION_MASK_P10_FUSION_LD_CMPI to ISA_3_1_MASKS_SERVER and POWERPC_MASKS. * config/rs6000/rs6000-protos.h (address_is_non_pfx_d_or_x): Add prototype. * config/rs6000/rs6000.c (rs6000_option_override_internal): Automatically set OPTION_MASK_P10_FUSION and OPTION_MASK_P10_FUSION_LD_CMPI if target is power10. (rs600_opt_masks): Allow -mpower10-fusion in function attributes. (address_is_non_pfx_d_or_x): New function. * config/rs6000/rs6000.h: Add MASK_P10_FUSION. * config/rs6000/rs6000.md: Include fusion.md. * config/rs6000/rs6000.opt: Add -mpower10-fusion and -mpower10-fusion-ld-cmpi. * config/rs6000/t-rs6000: Add dependencies involving fusion.md. 2021-01-27 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add [su]mlal builtin generator macros. * config/aarch64/aarch64-simd.md (*aarch64_mlal): Rename to... (aarch64_mlal): This. * config/aarch64/arm_neon.h (vmlal_s8): Use RTL builtin instead of inline asm. (vmlal_s16): Likewise. (vmlal_s32): Likewise. (vmlal_u8): Likewise. (vmlal_u16): Likewise. (vmlal_u32): Likewise. 2021-01-27 Richard Biener PR tree-optimization/98854 * tree-vect-slp.c (vect_build_slp_tree_2): Also build PHIs from scalars when the number of CTORs matches the number of children. 2021-01-27 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add mls_n builtin generator macro. * config/aarch64/aarch64-simd.md (*aarch64_mls_elt_merge): Rename to... (aarch64_mls_n): This. * config/aarch64/arm_neon.h (vmls_n_s16): Use RTL builtin instead of asm. (vmls_n_s32): Likewise. (vmls_n_u16): Likewise. (vmls_n_u32): Likewise. (vmlsq_n_s16): Likewise. (vmlsq_n_s32): Likewise. (vmlsq_n_u16): Likewise. (vmlsq_n_u32): Likewise. 2021-01-27 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add mls builtin generator macro. * config/aarch64/arm_neon.h (vmls_s8): Use RTL builtin rather than asm. (vmls_s16): Likewise. (vmls_s32): Likewise. (vmls_u8): Likewise. (vmls_u16): Likewise. (vmls_u32): Likewise. (vmlsq_s8): Likewise. (vmlsq_s16): Likewise. (vmlsq_s32): Likewise. (vmlsq_u8): Likewise. (vmlsq_u16): Likewise. (vmlsq_u32): Likewise. 2021-01-27 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add mla_n builtin generator macro. * config/aarch64/aarch64-simd.md (*aarch64_mla_elt_merge): Rename to... (aarch64_mla_n): This. * config/aarch64/arm_neon.h (vmla_n_s16): Use RTL builtin instead of asm. (vmla_n_s32): Likewise. (vmla_n_u16): Likewise. (vmla_n_u32): Likewise. (vmlaq_n_s16): Likewise. (vmlaq_n_s32): Likewise. (vmlaq_n_u16): Likewise. (vmlaq_n_u32): Likewise. 2021-01-27 liuhongt PR target/98833 * config/i386/sse.md (sse2_gt3): Drop !TARGET_XOP in condition. (*sse2_eq3): Ditto. 2021-01-27 Jakub Jelinek * tree-pass.h (PROP_trees): Rename to ... (PROP_gimple): ... this. * cfgexpand.c (pass_data_expand): Replace PROP_trees with PROP_gimple. * passes.c (execute_function_dump, execute_function_todo, execute_one_ipa_transform_pass, execute_one_pass): Likewise. * varpool.c (ctor_for_folding): Likewise. 2021-01-27 Jakub Jelinek PR tree-optimization/97260 * varpool.c: Include tree-pass.h. (ctor_for_folding): In GENERIC return DECL_INITIAL for TREE_READONLY non-TREE_SIDE_EFFECTS automatic variables. 2021-01-26 Paul Fee * doc/cpp.texi (__cplusplus): Document value for -std=c++23 or -std=gnu++23. * doc/invoke.texi: Document -std=c++23 and -std=gnu++23. * dwarf2out.c (highest_c_language): Recognise C++20 and C++23. (gen_compile_unit_die): Recognise C++23. 2021-01-26 Jakub Jelinek PR bootstrap/98839 * dwarf2asm.c (dw2_assemble_integer): Cast DWARF2_ADDR_SIZE to int in comparison. 2021-01-26 Jakub Jelinek PR target/98681 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p): Use UINTVAL (shft_amnt) and UINTVAL (mask) instead of INTVAL (shft_amnt) and INTVAL (mask). Add && INTVAL (mask) > 0 condition. 2021-01-26 Richard Biener * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_WIDEN_{PLUS,MINUS}_{LO,HI}_EXPR. 2021-01-26 Richard Biener PR middle-end/98726 * tree.h (vector_cst_int_elt): Remove. * tree.c (vector_cst_int_elt): Use poly_wide_int for computations, make static. 2021-01-26 Andrew Stubbs * config/gcn/gcn.c (gcn_expand_reduc_scalar): Use move instructions for V64DFmode min/max reductions. 2021-01-26 Jakub Jelinek * dwarf2asm.c (dw2_assemble_integer): Handle size twice as large as DWARF2_ADDR_SIZE if x is not a scalar int by emitting it as two halves, one with x and the other with const0_rtx, ordered depending on endianity. 2021-01-26 Alexandre Oliva * gimplify.c (gimplify_decl_expr): Skip asan marking calls for temporaries not seen in binding block, and not about to be added as gimple variables. 2021-01-25 Martin Sebor PR c++/98646 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust warning text. 2021-01-25 Martin Liska * value-prof.c (get_nth_most_common_value): Use %s instead of %qs string. 2021-01-25 Jakub Jelinek PR debug/98811 * configure.ac (HAVE_AS_GDWARF_5_DEBUG_FLAG): Only define if readelf -wi is able to read the emitted .debug_info back. * configure: Regenerated. 2021-01-25 Martin Liska PR gcov-profile/98739 * common.opt: Add missing sign symbol. * value-prof.c (get_nth_most_common_value): Restore handling of PROFILE_REPRODUCIBILITY_PARALLEL_RUNS and PROFILE_REPRODUCIBILITY_MULTITHREADED. 2021-01-25 Richard Biener PR middle-end/98807 * tree.c (vector_element_bits): Always use precision of the element type for boolean vectors. 2021-01-25 Sebastian Huber * config/rtems.h (STARTFILE_SPEC): Remove qnolinkcmds. (ENDFILE_SPEC): Evaluate qnolinkcmds. 2021-01-25 Sebastian Huber * config/rtems.h (STARTFILE_SPEC): Remove nostdlib and nostartfiles handling since this is already done by LINK_COMMAND_SPEC. Evaluate qnolinkcmds. (ENDFILE_SPEC): Remove nostdlib and nostartfiles handling since this is already done by LINK_COMMAND_SPEC. (LIB_SPECS): Remove nostdlib and nodefaultlibs handling since this is already done by LINK_COMMAND_SPEC. Remove qnolinkcmds evaluation. 2021-01-25 Jakub Jelinek PR testsuite/98771 * fold-const-call.c (host_size_t_cst_p): Renamed to ... (size_t_cst_p): ... this. Check and store unsigned HOST_WIDE_INT value rather than host size_t. (fold_const_call): Change type of s2 from size_t to unsigned HOST_WIDE_INT. Use size_t_cst_p instead of host_size_t_cst_p. For strncmp calls, pass MIN (s2, SIZE_MAX) instead of s2 as last argument. 2021-01-25 Tamar Christina * config/arm/iterators.md (rotsplit1, rotsplit2, conj_op, fcmac1, VCMLA_OP, VCMUL_OP): New. * config/arm/mve.md (mve_vcmlaq): Support vec_dup 0. * config/arm/neon.md (cmul3): New. * config/arm/unspecs.md (UNSPEC_VCMLA_CONJ, UNSPEC_VCMLA180_CONJ, UNSPEC_VCMUL_CONJ): New. * config/arm/vec-common.md (cmul3, arm_vcmla, cml4): New. 2021-01-23 Jakub Jelinek PR testsuite/97301 * config/rs6000/mmintrin.h (__m64): Add __may_alias__ attribute. 2021-01-22 Jonathan Wright * config/aarch64/aarch64-simd-builtins.def: Add mla builtin generator macro. * config/aarch64/arm_neon.h (vmla_s8): Use RTL builtin rather than asm. (vmla_s16): Likewise. (vmla_s32): Likewise. (vmla_u8): Likewise. (vmla_u16): Likewise. (vmla_u32): Likewise. (vmlaq_s8): Likewise. (vmlaq_s16): Likewise. (vmlaq_s32): Likewise. (vmlaq_u8): Likewise. (vmlaq_u16): Likewise. (vmlaq_u32): Likewise. 2021-01-22 David Malcolm * doc/invoke.texi (GCC_EXTRA_DIAGNOSTIC_OUTPUT): Add @findex directive. 2021-01-22 Jakub Jelinek PR debug/98796 * dwarf2out.c (output_file_names): For -gdwarf-5, if there are no filenames to emit, still emit the required 0 index directory and filename entries that match DW_AT_comp_dir and DW_AT_name of the compilation unit. 2021-01-22 Marek Polacek PR c++/98545 * doc/invoke.texi: Update C++ ABI Version 15 description. 2021-01-22 Kyrylo Tkachov PR tree-optimization/98766 * tree-ssa-math-opts.c (convert_mult_to_fma): Use maybe_le when comparing against type size with param_avoid_fma_max_bits. 2021-01-22 Richard Biener PR middle-end/98793 * tree.c (vector_element_bits): Key single-bit bool vector on integer mode rather than not vector mode. 2021-01-22 Xionghu Luo PR target/98093 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Generate ARRAY_REF(VIEW_CONVERT_EXPR) for P8 and later platforms. * config/rs6000/rs6000.c (rs6000_expand_vector_set_var): Update to call different path for P8 and P9. (rs6000_expand_vector_set_var_p9): New function. (rs6000_expand_vector_set_var_p8): New function. 2021-01-22 Xionghu Luo PR target/79251 PR target/98065 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Ajdust variable index vec_insert from address dereference to ARRAY_REF(VIEW_CONVERT_EXPR) tree expression. * config/rs6000/rs6000-protos.h (rs6000_expand_vector_set_var): New declaration. * config/rs6000/rs6000.c (rs6000_expand_vector_set_var): New function. 2021-01-22 Martin Liska PR gcov-profile/98739 * profile.c (compute_value_histograms): Drop time profile for -fprofile-reproducible=multithreaded. 2021-01-22 Nathan Sidwell * gcc.c (process_command): Don't check OPT_SPECIAL_input_file existence here. 2021-01-22 Richard Biener PR middle-end/98773 * tree-data-ref.c (initalize_matrix_A): Revert previous change, retaining failing on HOST_WIDE_INT_MIN CHREC_RIGHT. 2021-01-22 Jakub Jelinek PR tree-optimization/90248 * match.pd (X cmp 0.0 ? 1.0 : -1.0 -> copysign(1, +-X), X cmp 0.0 ? -1.0 : +1.0 -> copysign(1, -+X)): Remove simplifications. (X * (X cmp 0.0 ? 1.0 : -1.0) -> +-abs(X), X * (X cmp 0.0 ? -1.0 : 1.0) -> +-abs(X)): New simplifications. 2021-01-22 Jakub Jelinek PR tree-optimization/98255 * tree-dfa.c (get_ref_base_and_extent): For ARRAY_REFs, sign extend index - low_bound from sizetype's precision rather than index precision. (get_addr_base_and_unit_offset_1): Likewise. * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Likewise. * gimple-fold.c (fold_const_aggregate_ref_1): Likewise. 2021-01-22 Richard Biener PR tree-optimization/98786 * tree-ssa-phiopt.c (factor_out_conditional_conversion): Avoid adding new uses of abnormals. Verify we deal with a conditional conversion. 2021-01-22 Prathamesh Kulkarni PR target/98636 * optc-save-gen.awk: Add arm_fp16_format to checked_options. 2021-01-22 liuhongt PR target/96891 PR target/98348 * config/i386/sse.md (VI_128_256): New mode iterator. (*avx_cmp3_1, *avx_cmp3_2, *avx_cmp3_3, *avx_cmp3_4, *avx2_eq3, *avx2_pcmp3_1, *avx2_pcmp3_2, *avx2_gt3): New define_insn_and_split to lower avx512 vector comparison to avx version when dest is vector. (*_cmp3,*_cmp3,*_ucmp3): define_insn_and_split for negating the comparison result. * config/i386/predicates.md (float_vector_all_ones_operand): New predicate. * config/i386/i386-expand.c (ix86_expand_sse_movcc): Use general NOT operator without UNSPEC_MASKOP. 2021-01-21 Vladimir N. Makarov PR rtl-optimization/98777 * lra-int.h (lra_pmode_pseudo): New extern. * lra.c (lra_pmode_pseudo): New global. (lra): Set it up. * lra-eliminations.c (eliminate_regs_in_insn): Use it. 2021-01-21 Ilya Leoshkevich * fwprop.c (fwprop_propagation::classify_result): Allow (subreg (mem)) simplifications. 2021-01-21 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_sqdmll): Split into... (aarch64_sqdmlal): ... This... (aarch64_sqdmlsl): ... And this. (aarch64_sqdmll_lane): Split into... (aarch64_sqdmlal_lane): ... This... (aarch64_sqdmlsl_lane): ... And this. (aarch64_sqdmll_laneq): Split into... (aarch64_sqdmlsl_laneq): ... This... (aarch64_sqdmlal_laneq): ... And this. (aarch64_sqdmll_n): Split into... (aarch64_sqdmlsl_n): ... This... (aarch64_sqdmlal_n): ... And this. (aarch64_sqdmll2_internal): Split into... (aarch64_sqdmlal2_internal): ... This... (aarch64_sqdmlsl2_internal): ... And this. 2021-01-21 Christophe Lyon * config/arm/arm_mve.h (__arm_vcmpneq_s8): Fix return type. 2021-01-21 Andrea Corallo PR target/96372 * doc/sourcebuild.texi (arm_thumb2_no_arm_v8_1_lob): Document. 2021-01-21 liuhongt PR rtl-optimization/98694 * regcprop.c (copy_value): If SRC had been assigned a mode narrower than the copy, we can't link DEST into the chain even they have same hard_regno_nregs(i.e. HImode/SImode in i386 backend). 2021-01-20 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_get_lane): Convert to define_insn_and_split. Split into simple move when moving bottom element. 2021-01-20 Segher Boessenkool * config/rs6000/rs6000.c (rs6000_emit_le_vsx_store): Change assert. Adjust comment. Simplify code. 2021-01-20 Jakub Jelinek PR debug/98765 * dwarf2out.c (reset_indirect_string): Also reset indirect strings with DW_FORM_line_strp form. (prune_unused_types_update_strings): Don't add into debug_str_hash indirect strings with DW_FORM_line_strp form. (adjust_name_comp_dir): New function. (dwarf2out_finish): Call it on CU DIEs after resetting debug_line_str_hash. 2021-01-20 Vladimir N. Makarov PR rtl-optimization/98722 * lra-eliminations.c (eliminate_regs_in_insn): Check that target has no 3-op add insn to transform insns containing two pluses. 2021-01-20 Richard Biener * hwint.h (add_hwi): New function. (mul_hwi): Likewise. * tree-data-ref.c (initialize_matrix_A): Properly translate tree constants and avoid HOST_WIDE_INT_MIN. (lambda_matrix_row_add): Avoid undefined integer overflow and return true on such overflow. (lambda_matrix_right_hermite): Handle overflow from lambda_matrix_row_add gracefully. Simplify previous fix. (analyze_subscript_affine_affine): Likewise. 2021-01-20 Eugene Rozenfeld PR tree-optimization/96674 * match.pd: New patterns: x < y || y == XXX_MIN --> x <= y - 1 x >= y && y != XXX_MIN --> x > y - 1 2021-01-20 Richard Sandiford PR tree-optimization/98535 * tree-vect-slp.c (duplicate_and_interleave): Use quick_grow_cleared. If the high and low permutes are the same, remove the high permutes from the working set and only continue with the low ones. 2021-01-20 Jakub Jelinek PR tree-optimization/98721 * builtins.c (access_ref::inform_access): Don't assume SSA_NAME_IDENTIFIER must be non-NULL. Print messages about object whenever allocfn is NULL, rather than only when DECL_P is true. Use %qE instead of %qD for that. Formatting fixes. 2021-01-20 Richard Biener PR tree-optimization/98758 * tree-data-ref.c (int_divides_p): Use lambda_int arguments. (lambda_matrix_right_hermite): Avoid undefinedness with signed integer abs and multiplication. (analyze_subscript_affine_affine): Use lambda_int. 2021-01-20 David Malcolm PR debug/98751 * dwarf2out.c (output_line_info): Rename static variable "generation", moving it out of the function to... (output_line_info_generation): New. (init_sections_and_labels): Likewise, renaming the variable to... (init_sections_and_labels_generation): New. (dwarf2out_c_finalize): Reset the new variables. 2021-01-19 Martin Sebor PR middle-end/98664 * tree-ssa-live.c (remove_unused_scope_block_p): Keep scopes for all functions, even if they're not declared artificial or inline. * tree.c (tree_inlined_location): Use macro expansion location only if scope traversal fails to expose one. 2021-01-19 Richard Sandiford PR rtl-optimization/92294 * alias.c (compare_base_symbol_refs): Take an extra parameter and add the distance between two symbols to it. Enshrine in comments that -1 means "either 0 or 1, but we can't tell which at compile time". (memrefs_conflict_p): Update call accordingly. (rtx_equal_for_memref_p): Likewise. Take the distance between symbols into account. 2021-01-19 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (sqshl, uqshl, sqrshl, uqrshl, sqadd, uqadd, sqsub, uqsub, suqadd, usqadd, sqmovn, uqmovn, sqxtn2, uqxtn2, sqabs, sqneg, sqdmlal, sqdmlsl, sqdmlal_lane, sqdmlsl_lane, sqdmlal_laneq, sqdmlsl_laneq, sqdmlal_n, sqdmlsl_n, sqdmlal2, sqdmlsl2, sqdmlal2_lane, sqdmlsl2_lane, sqdmlal2_laneq, sqdmlsl2_laneq, sqdmlal2_n, sqdmlsl2_n, sqdmull, sqdmull_lane, sqdmull_laneq, sqdmull_n, sqdmull2, sqdmull2_lane, sqdmull2_laneq, sqdmull2_n, sqdmulh, sqrdmulh, sqdmulh_lane, sqdmulh_laneq, sqrdmulh_lane, sqrdmulh_laneq, sqshrun_n, sqrshrun_n, sqshrn_n, uqshrn_n, sqrshrn_n, uqrshrn_n, sqshlu_n, sqshl_n, uqshl_n, sqrdmlah, sqrdmlsh, sqrdmlah_lane, sqrdmlsh_lane, sqrdmlah_laneq, sqrdmlsh_laneq, sqmovun): Use NONE flags. 2021-01-19 Richard Biener PR ipa/98330 * ipa-modref.c (analyze_stmt): Only record a summary for a direct call. 2021-01-19 Richard Biener PR middle-end/98638 * tree-ssanames.c (fini_ssanames): Zero SSA_NAME_DEF_STMT. 2021-01-19 Daniel Hellstrom * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add built-in define __FIX_LEON3FT_TN0018. 2021-01-19 Richard Biener PR ipa/97673 * tree-inline.c (tree_function_versioning): Set input_location to UNKNOWN_LOCATION throughout the function. 2021-01-19 Tobias Burnus PR fortran/98476 * omp-low.c (lower_omp_target): Handle nonpointer is_device_ptr. 2021-01-19 Martin Jambor PR ipa/98690 * ipa-sra.c (ssa_name_only_returned_p): New parameter fun. Check whether non-call exceptions allow removal of a statement. (isra_analyze_call): Pass the appropriate function to ssa_name_only_returned_p. 2021-01-19 Geng Qi * config/riscv/arch-canonicalize (longext_sort): New function for sorting 'multi-letter'. * config/riscv/multilib-generator: Adjusting the loop of 'alt' in 'alts'. The 'arch' may not be the first of 'alts'. (_expand_combination): Add underline for the 'ext' without '*'. This is because, a single-letter extension can always be treated well with a '_' prefix, but it cannot be separated out if it is appended to a multi-letter. 2021-01-18 Vladimir N. Makarov PR target/97847 * ira.c (ira): Skip abnormal critical edge splitting. 2021-01-18 Jakub Jelinek PR tree-optimization/98727 * tree-ssa-math-opts.c (match_arith_overflow): Fix up computation of second .MUL_OVERFLOW operand for signed multiplication with overflow checking if the second operand of multiplication is not constant. 2021-01-18 David Edelsohn * doc/invoke.texi (-gdwarf): TPF defaults to version 2 and AIX defaults to version 4. 2021-01-18 David Malcolm * attribs.h (fndecl_dealloc_argno): New decl. * builtins.c (call_dealloc_argno): Split out second half of function into... (fndecl_dealloc_argno): New. * doc/extend.texi (Common Function Attributes): Document the interaction between the analyzer and the malloc attribute. * doc/invoke.texi (Static Analyzer Options): Likewise. 2021-01-17 David Edelsohn * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Override dwarf_version to 4. * config/rs6000/aix72.h (SUBTARGET_OVERRIDE_OPTIONS): Same. 2021-01-17 Martin Jambor PR ipa/98222 * cgraph.c (clone_of_p): Check also former_clone_of as we climb the clone tree. 2021-01-17 Mark Wielaard * common.opt (gdwarf-): Init(5). * doc/invoke.texi (-gdwarf): Document default to 5. 2021-01-16 Kwok Cheung Yeung * builtin-types.def (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT): Rename to... (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR): ...this. Add extra argument. * gimplify.c (omp_default_clause): Ensure that event handle is firstprivate in a task region. (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_DETACH. (gimplify_adjust_omp_clauses): Likewise. * omp-builtins.def (BUILT_IN_GOMP_TASK): Change function type to BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT_PTR. * omp-expand.c (expand_task_call): Add GOMP_TASK_FLAG_DETACH to flags if detach clause specified. Add detach argument when generating call to GOMP_task. * omp-low.c (scan_sharing_clauses): Setup data environment for detach clause. (finish_taskreg_scan): Move field for variable containing the event handle to the front of the struct. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_DETACH. Fix ordering. * tree-nested.c (convert_nonlocal_omp_clauses): Handle OMP_CLAUSE_DETACH clause. (convert_local_omp_clauses): Handle OMP_CLAUSE_DETACH clause. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_DETACH. * tree.c (omp_clause_num_ops): Add entry for OMP_CLAUSE_DETACH. Fix ordering. (omp_clause_code_name): Add entry for OMP_CLAUSE_DETACH. Fix ordering. (walk_tree_1): Handle OMP_CLAUSE_DETACH. 2021-01-16 Sebastian Huber * config/nios2/t-rtems: Reset all MULTILIB_* variables. Shorten multilib directory names. Use MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS. Add -mhw-mul -mhw-mulx -mhw-div -mcustom-fpu-cfg=fph2 multilib. 2021-01-16 Sebastian Huber * config/nios2/nios2.c (NIOS2_FPU_CONFIG_NUM): Adjust value. (nios2_init_fpu_configs): Provide register values for new -mcustom-fpu-cfg=fph2 option variant. * doc/invoke.texi (-mcustom-fpu-cfg=fph2): Document new option variant. 2021-01-16 Sebastian Huber * config/nios2/nios2.c (nios2_custom_check_insns): Remove custom instruction warnings. 2021-01-16 Jakub Jelinek PR tree-optimization/96669 * match.pd ((CST << x) & 1 -> x == 0): New simplification. 2021-01-16 Jakub Jelinek PR tree-optimization/96271 * passes.def: Pass false argument to first two pass_cd_dce instances and true to last instance. Add comment that last instance rewrites no longer addressed locals. * tree-ssa-dce.c (pass_cd_dce): Add update_address_taken_p member and initialize it. (pass_cd_dce::set_pass_param): New method. (pass_cd_dce::execute): Return TODO_update_address_taken from last cd_dce instance. 2021-01-15 Carl Love * config/rs6000/altivec.h (vec_mulh, vec_div, vec_dive, vec_mod): New defines. * config/rs6000/altivec.md (VIlong): Move define to file vsx.md. * config/rs6000/rs6000-builtin.def (DIVES_V4SI, DIVES_V2DI, DIVEU_V4SI, DIVEU_V2DI, DIVS_V4SI, DIVS_V2DI, DIVU_V4SI, DIVU_V2DI, MODS_V2DI, MODS_V4SI, MODU_V2DI, MODU_V4SI, MULHS_V2DI, MULHS_V4SI, MULHU_V2DI, MULHU_V4SI, MULLD_V2DI): Add builtin define. (MULH, DIVE, MOD): Add new BU_P10_OVERLOAD_2 definitions. * config/rs6000/rs6000-call.c (VSX_BUILTIN_VEC_DIV, VSX_BUILTIN_VEC_DIVE, P10_BUILTIN_VEC_MOD, P10_BUILTIN_VEC_MULH): New overloaded definitions. (builtin_function_type) [P10V_BUILTIN_DIVEU_V4SI, P10V_BUILTIN_DIVEU_V2DI, P10V_BUILTIN_DIVU_V4SI, P10V_BUILTIN_DIVU_V2DI, P10V_BUILTIN_MODU_V2DI, P10V_BUILTIN_MODU_V4SI, P10V_BUILTIN_MULHU_V2DI, P10V_BUILTIN_MULHU_V4SI]: Add case statement for builtins. * config/rs6000/rs6000.md (bits): Add new attribute sizes V4SI, V2DI. * config/rs6000/vsx.md (VIlong): Moved from config/rs6000/altivec.md. (UNSPEC_VDIVES, UNSPEC_VDIVEU): New unspec definitions. (vsx_mul_v2di): Add if TARGET_POWER10 statement. (vsx_udiv_v2di): Add if TARGET_POWER10 statement. (dives_, diveu_, div3, uvdiv3, mods_, modu_, mulhs_, mulhu_, mulv2di3): Add define_insn, mode is VIlong. * doc/extend.texi (vec_mulh, vec_mul, vec_div, vec_dive, vec_mod): Add builtin descriptions. 2021-01-15 Eric Botcazou * final.c (final_start_function_1): Reset force_source_line. 2021-01-15 Jakub Jelinek PR tree-optimization/96669 * match.pd (((1 << A) & 1) != 0 -> A == 0, ((1 << A) & 1) == 0 -> A != 0): Generalize for 1s replaced by possibly different power of two constants and to right shift too. 2021-01-15 Jakub Jelinek PR tree-optimization/96681 * match.pd ((x < 0) ^ (y < 0) to (x ^ y) < 0): New simplification. ((x >= 0) ^ (y >= 0) to (x ^ y) < 0): Likewise. ((x < 0) ^ (y >= 0) to (x ^ y) >= 0): Likewise. ((x >= 0) ^ (y < 0) to (x ^ y) >= 0): Likewise. 2021-01-15 Alexandre Oliva * opts.c (gen_command_line_string): Exclude -dumpbase-ext. 2021-01-15 Tamar Christina * config/aarch64/aarch64-simd.md (cml4, cmul3): New. * config/aarch64/iterators.md (UNSPEC_FCMUL, UNSPEC_FCMUL180, UNSPEC_FCMLA_CONJ, UNSPEC_FCMLA180_CONJ, UNSPEC_CMLA_CONJ, UNSPEC_CMLA180_CONJ, UNSPEC_CMUL, UNSPEC_CMUL180, FCMLA_OP, FCMUL_OP, conj_op, rotsplit1, rotsplit2, fcmac1, sve_rot1, sve_rot2, SVE2_INT_CMLA_OP, SVE2_INT_CMUL_OP, SVE2_INT_CADD_OP): New. (rot): Add UNSPEC_FCMUL, UNSPEC_FCMUL180. (rot_op): Renamed to conj_op. * config/aarch64/aarch64-sve.md (cml4, cmul3): New. * config/aarch64/aarch64-sve2.md (cml4, cmul3): New. 2021-01-15 David Malcolm PR bootstrap/98696 * diagnostic.c (selftest::test_print_parseable_fixits_bytes_vs_display_columns): Escape the tempfile name when constructing the expected output. 2021-01-15 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (*aarch64_mlsl_hi): Rename to... (aarch64_mlsl_hi): ... This. (aarch64_mlsl_hi): Define. (*aarch64_mlslmlsl * config/i386/i386-c.c (ix86_target_macros): Use cpp_define_formatted for __SIZEOF_FLOAT80__ definition. 2021-01-15 Richard Sandiford PR target/88836 * config.gcc (aarch64*-*-*): Add aarch64-cc-fusion.o to extra_objs. * Makefile.in (RTL_SSA_H): New variable. * config/aarch64/t-aarch64 (aarch64-cc-fusion.o): New rule. * config/aarch64/aarch64-protos.h (make_pass_cc_fusion): Declare. * config/aarch64/aarch64-passes.def: Add pass_cc_fusion after pass_combine. * config/aarch64/aarch64-cc-fusion.cc: New file. 2021-01-15 Richard Sandiford * recog.h (insn_change_watermark::~insn_change_watermark): Avoid calling cancel_changes for changes that no longer exist. 2021-01-15 Richard Sandiford * rtl-ssa/functions.h (function_info::ref_defs): Rename to... (function_info::reg_defs): ...this. * rtl-ssa/member-fns.inl (function_info::ref_defs): Rename to... (function_info::reg_defs): ...this. 2021-01-15 Christophe Lyon PR target/71233 * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New. 2021-01-15 Christophe Lyon Revert: 2021-01-15 Christophe Lyon PR target/71233 * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New. 2021-01-15 Richard Biener PR tree-optimization/96376 * tree-vect-stmts.c (get_load_store_type): Disregard alignment for VMAT_INVARIANT. 2021-01-15 Martin Liska * doc/install.texi: Document that some tests need pytest module. * doc/sourcebuild.texi: Likewise. 2021-01-15 Christophe Lyon PR target/71233 * config/arm/arm_neon.h (vceqz_p64, vceqq_p64, vceqzq_p64): New. 2021-01-15 Christophe Lyon * config/arm/mve.md (mve_vshrq_n_s_imm): New entry. (mve_vshrq_n_u_imm): Likewise. * config/arm/neon.md (vashr3, vlshr3): Move to ... * config/arm/vec-common.md: ... here. 2021-01-15 Christophe Lyon * config/arm/mve.md (mve_vshlq_): Move to vec-commond.md. * config/arm/neon.md (vashl3): Delete. * config/arm/vec-common.md (mve_vshlq_): New. (vasl3): New expander. 2021-01-15 Richard Biener PR tree-optimization/98685 * tree-vect-slp.c (vect_schedule_slp_node): Refactor handling of vector extern defs. 2021-01-14 David Malcolm PR jit/98586 * diagnostic.c (diagnostic_kind_text): Break out this array from... (diagnostic_build_prefix): ...here. (fancy_abort): Detect when diagnostic_initialize has not yet been called and fall back to a minimal implementation of printing the ICE, rather than segfaulting in internal_error. 2021-01-14 David Malcolm * diagnostic.c (diagnostic_initialize): Eliminate parseable_fixits_p in favor of initializing extra_output_kind from GCC_EXTRA_DIAGNOSTIC_OUTPUT. (convert_column_unit): New function, split out from... (diagnostic_converted_column): ...this. (print_parseable_fixits): Add "column_unit" and "tabstop" params. Use them to call convert_column_unit on the column values. (diagnostic_report_diagnostic): Eliminate conditional on parseable_fixits_p in favor of a switch statement on extra_output_kind, passing the appropriate values to the new params of print_parseable_fixits. (selftest::test_print_parseable_fixits_none): Update for new params of print_parseable_fixits. (selftest::test_print_parseable_fixits_insert): Likewise. (selftest::test_print_parseable_fixits_remove): Likewise. (selftest::test_print_parseable_fixits_replace): Likewise. (selftest::test_print_parseable_fixits_bytes_vs_display_columns): New. (selftest::diagnostic_c_tests): Call it. * diagnostic.h (enum diagnostics_extra_output_kind): New. (diagnostic_context::parseable_fixits_p): Delete field in favor of... (diagnostic_context::extra_output_kind): ...this new field. * doc/invoke.texi (Environment Variables): Add GCC_EXTRA_DIAGNOSTIC_OUTPUT. * opts.c (common_handle_option): Update handling of OPT_fdiagnostics_parseable_fixits for change to diagnostic_context fields. 2021-01-14 Tamar Christina * tree-vect-slp-patterns.c (class complex_operations_pattern, complex_operations_pattern::matches, complex_operations_pattern::recognize, complex_operations_pattern::build): New. (slp_patterns): Use it. 2021-01-14 Tamar Christina * internal-fn.def (COMPLEX_FMS, COMPLEX_FMS_CONJ): New. * optabs.def (cmls_optab, cmls_conj_optab): New. * doc/md.texi: Document them. * tree-vect-slp-patterns.c (class complex_fms_pattern, complex_fms_pattern::matches, complex_fms_pattern::recognize, complex_fms_pattern::build): New. 2021-01-14 Tamar Christina * internal-fn.def (COMPLEX_FMA, COMPLEX_FMA_CONJ): New. * optabs.def (cmla_optab, cmla_conj_optab): New. * doc/md.texi: Document them. * tree-vect-slp-patterns.c (vect_match_call_p, class complex_fma_pattern, vect_slp_reset_pattern, complex_fma_pattern::matches, complex_fma_pattern::recognize, complex_fma_pattern::build): New. 2021-01-14 Tamar Christina * internal-fn.def (COMPLEX_MUL, COMPLEX_MUL_CONJ): New. * optabs.def (cmul_optab, cmul_conj_optab): New. * doc/md.texi: Document them. * tree-vect-slp-patterns.c (vect_match_call_complex_mla, vect_normalize_conj_loc, is_eq_or_top, vect_validate_multiplication, vect_build_combine_node, class complex_mul_pattern, complex_mul_pattern::matches, complex_mul_pattern::recognize, complex_mul_pattern::build): New. 2021-01-14 Tamar Christina * tree-vect-slp.c (optimize_load_redistribution_1): New. (optimize_load_redistribution, vect_is_slp_load_node): New. (vect_match_slp_patterns): Use it. 2021-01-14 Tamar Christina * tree-vect-slp-patterns.c (complex_add_pattern::build): Elide nodes. 2021-01-14 Thomas Schwinge * config/gcn/mkoffload.c (main): Create an offload image only in 64-bit configurations. 2021-01-14 H.J. Lu PR target/98667 * config/i386/i386-options.c (ix86_option_override_internal): Issue an error for -fcf-protection with CF_BRANCH when compiling for 32-bit non-TARGET_CMOV targets. 2021-01-14 Uroš Bizjak PR target/98671 * config/i386/i386-options.c (ix86_valid_target_attribute_inner_p): Remove declaration and initialization of shadow variable "ret". (ix86_option_override_internal): Remove delcaration of shadow variable "i". Redeclare shadowed variable to unsigned. * common/config/i386/i386-common.c (pta_size): Redeclare to unsigned. * config/i386/i386-builtins.c (get_builtin_code_for_version): Update for redeclaration. * config/i386/i386.h (pta_size): Ditto. 2021-01-14 Richard Biener PR tree-optimization/98674 * tree-data-ref.c (base_supports_access_fn_components_p): New. (initialize_data_dependence_relation): For two bases without possible access fns resort to type size equality when determining shape compatibility. 2021-01-14 Prathamesh Kulkarni PR target/66791 * config/arm/arm_neon.h: Replace calls to __builtin_vcge* by <=, >= operators in vcle and vcge intrinsics respectively. * config/arm/arm_neon_builtins.def: Remove entry for vcge and vcgeu. 2021-01-14 Uroš Bizjak PR target/98671 * config/i386/i386-options.c (ix86_function_specific_save): Remove redundant assignment to opts->x_ix86_branch_cost. * config/i386/i386.c (ix86_prefetch_sse): Rename from x86_prefetch_sse. Update all uses. * config/i386/i386.h: Update for rename. * config/i386/i386-options.h: Ditto. 2021-01-14 Jakub Jelinek PR target/98670 * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3, *sse4_1_zero_extendv4hiv4si2_3, *sse4_1_zero_extendv2siv2di2_3): Use Bm instead of m for non-avx. Add isa attribute. 2021-01-14 Jakub Jelinek PR tree-optimization/96688 * match.pd (~(X >> Y) -> ~X >> Y): New simplification if ~X can be simplified. 2021-01-14 Richard Sandiford * tree-vect-stmts.c (vect_model_load_cost): Account for unused IFN_LOAD_LANES results. 2021-01-14 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_xtl): Define. (aarch64_xtn): Likewise. * config/aarch64/aarch64-simd-builtins.def (sxtl, uxtl, xtn): Define builtins. * config/aarch64/arm_neon.h (vmovl_s8): Reimplement using builtin. (vmovl_s16): Likewise. (vmovl_s32): Likewise. (vmovl_u8): Likewise. (vmovl_u16): Likewise. (vmovl_u32): Likewise. (vmovn_s16): Likewise. (vmovn_s32): Likewise. (vmovn_s64): Likewise. (vmovn_u16): Likewise. (vmovn_u32): Likewise. (vmovn_u64): Likewise. 2021-01-14 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_qxtn2_le): Define. (aarch64_qxtn2_be): Likewise. (aarch64_qxtn2): Likewise. * config/aarch64/aarch64-simd-builtins.def (sqxtn2, uqxtn2): Define builtins. * config/aarch64/iterators.md (SAT_TRUNC): Define code_iterator. (su): Handle ss_truncate and us_truncate. * config/aarch64/arm_neon.h (vqmovn_high_s16): Reimplement using builtin. (vqmovn_high_s32): Likewise. (vqmovn_high_s64): Likewise. (vqmovn_high_u16): Likewise. (vqmovn_high_u32): Likewise. (vqmovn_high_u64): Likewise. 2021-01-14 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_xtn2_le): Define. (aarch64_xtn2_be): Likewise. (aarch64_xtn2): Likewise. * config/aarch64/aarch64-simd-builtins.def (xtn2): Define builtins. * config/aarch64/arm_neon.h (vmovn_high_s16): Reimplement using builtins. (vmovn_high_s32): Likewise. (vmovn_high_s64): Likewise. (vmovn_high_u16): Likewise. (vmovn_high_u32): Likewise. (vmovn_high_u64): Likewise. 2021-01-13 Stafford Horne * config/or1k/or1k.h (ASM_PREFERRED_EH_DATA_FORMAT): New macro. 2021-01-13 Stafford Horne * config/or1k/linux.h (TARGET_ASM_FILE_END): Define macro. 2021-01-13 Stafford Horne * config/or1k/or1k.h (TARGET_CPU_CPP_BUILTINS): Add builtin define for __or1k_hard_float__. 2021-01-13 Stafford Horne * config/or1k/or1k.h (NO_PROFILE_COUNTERS): Define as 1. (PROFILE_HOOK): Define to call _mcount. (FUNCTION_PROFILER): Change from abort to no-op. 2021-01-13 Jakub Jelinek PR tree-optimization/96691 * match.pd ((~X | C) ^ D -> (X | C) ^ (~D ^ C), (~X & C) ^ D -> (X & C) ^ (D ^ C)): New simplifications if (~D ^ C) or (D ^ C) can be simplified. 2021-01-13 Richard Biener PR tree-optimization/92645 * match.pd (BIT_FIELD_REF to conversion): Delay canonicalization until after vector lowering. 2021-01-13 Richard Sandiford * config/aarch64/aarch64-sve.md (fnma4): Extend from SVE_FULL_I to SVE_I. (@aarch64_pred_fnma, cond_fnma, *cond_fnma_2) (*cond_fnma_4, *cond_fnma_any): Likewise. 2021-01-13 Richard Sandiford * config/aarch64/aarch64-sve.md (fma4): Extend from SVE_FULL_I to SVE_I. (@aarch64_pred_fma, cond_fma, *cond_fma_2) (*cond_fma_4, *cond_fma_any): Likewise. 2021-01-13 Richard Biener PR tree-optimization/92645 * tree-vect-slp.c (vect_build_slp_tree_1): Relax supported BIT_FIELD_REF argument. (vect_build_slp_tree_2): Record the desired vector type on the external vector def. (vectorizable_slp_permutation): Handle required punning of existing vector defs. 2021-01-13 Richard Sandiford * rtl-ssa/accesses.h (def_lookup): Fix order of comparison results. 2021-01-13 Richard Sandiford * config/sh/sh.md (movsf_ie): Remove operands[2] test. 2021-01-13 Samuel Thibault * config.gcc [$target == *-*-gnu*]: Enable 'default_gnu_indirect_function'. 2021-01-13 Jakub Jelinek PR target/95905 * optabs.c (expand_vec_perm_const): Don't force v0 and v1 into registers before calling targetm.vectorize.vec_perm_const, only after that. * config/i386/i386-expand.c (ix86_vectorize_vec_perm_const): Handle two argument permutation when one operand is zero vector and only after that force operands into registers. * config/i386/sse.md (*avx2_zero_extendv16qiv16hi2_1): New define_insn_and_split pattern. (*avx512bw_zero_extendv32qiv32hi2_1): Likewise. (*avx512f_zero_extendv16hiv16si2_1): Likewise. (*avx2_zero_extendv8hiv8si2_1): Likewise. (*avx512f_zero_extendv8siv8di2_1): Likewise. (*avx2_zero_extendv4siv4di2_1): Likewise. * config/mips/mips.c (mips_vectorize_vec_perm_const): Force operands into registers. * config/arm/arm.c (arm_vectorize_vec_perm_const): Likewise. * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Likewise. * config/ia64/ia64.c (ia64_vectorize_vec_perm_const): Likewise. * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const): Likewise. * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const): Likewise. * config/gcn/gcn.c (gcn_vectorize_vec_perm_const): Likewise. Use std::swap. 2021-01-13 Martin Liska PR tree-optimization/98455 * gimple-if-to-switch.cc (condition_info::record_phi_mapping): Record also virtual PHIs. (pass_if_to_switch::execute): Return TODO_cleanup_cfg only conditionally. 2021-01-13 Jonathan Wakely * doc/invoke.texi (C++ Modules): Fix typos. 2021-01-13 Richard Biener PR tree-optimization/98640 * tree-ssa-sccvn.c (visit_nary_op): Do not try to handle plus or minus from a truncated operand to be sign-extended. 2021-01-13 Jakub Jelinek PR target/96938 * config/i386/i386.md (*btr_1, *btr_2): New define_insn_and_split patterns. (splitter after *btr_2): New splitter. 2021-01-13 Martin Liska PR ipa/98652 * cgraphunit.c (analyze_functions): Remove dead code. 2021-01-13 Qian Jianhua * config/aarch64/aarch64-cost-tables.h (a64fx_extra_costs): New. * config/aarch64/aarch64.c (a64fx_addrcost_table): New. (a64fx_regmove_cost, a64fx_vector_cost): New. (a64fx_tunings): Use the new added cost tables. 2021-01-13 Jakub Jelinek PR target/95905 * config/i386/predicates.md (pmovzx_parallel): New predicate. * config/i386/sse.md (*sse4_1_zero_extendv8qiv8hi2_3): New define_insn_and_split pattern. (*sse4_1_zero_extendv4hiv4si2_3): Likewise. (*sse4_1_zero_extendv2siv2di2_3): Likewise. 2021-01-13 Julian Brown * config/gcn/gcn.c (gcn_conditional_register_usage): Remove dead code to fix v0 register. 2021-01-13 Julian Brown * config/gcn/gcn.c (gcn_md_reorg): Fix case where EXEC reg is live on entry to a BB. 2021-01-13 Julian Brown * config/gcn/gcn-valu.md (recip2, recip2): Use unspec for reciprocal-approximation instructions. (div3): Use fused multiply-accumulate operations for reciprocal refinement and division result. * config/gcn/gcn.md (UNSPEC_RCP): New unspec constant. 2021-01-13 Julian Brown * config/gcn/gcn-valu.md (subdf): Rename to... (subdf3): This. 2021-01-12 Martin Liska * gcov.c (source_info::debug): Fix printf format for 32-bit hosts. 2021-01-12 Andrea Corallo * function-abi.h: Fix typo. 2021-01-12 Christophe Lyon PR target/97875 PR target/97875 * config/arm/arm.h (ARM_HAVE_NEON_V8QI_LDST): New macro. (ARM_HAVE_NEON_V16QI_LDST, ARM_HAVE_NEON_V4HI_LDST): Likewise. (ARM_HAVE_NEON_V8HI_LDST, ARM_HAVE_NEON_V2SI_LDST): Likewise. (ARM_HAVE_NEON_V4SI_LDST, ARM_HAVE_NEON_V4HF_LDST): Likewise. (ARM_HAVE_NEON_V8HF_LDST, ARM_HAVE_NEON_V4BF_LDST): Likewise. (ARM_HAVE_NEON_V8BF_LDST, ARM_HAVE_NEON_V2SF_LDST): Likewise. (ARM_HAVE_NEON_V4SF_LDST, ARM_HAVE_NEON_DI_LDST): Likewise. (ARM_HAVE_NEON_V2DI_LDST): Likewise. (ARM_HAVE_V8QI_LDST, ARM_HAVE_V16QI_LDST): Likewise. (ARM_HAVE_V4HI_LDST, ARM_HAVE_V8HI_LDST): Likewise. (ARM_HAVE_V2SI_LDST, ARM_HAVE_V4SI_LDST, ARM_HAVE_V4HF_LDST): Likewise. (ARM_HAVE_V8HF_LDST, ARM_HAVE_V4BF_LDST, ARM_HAVE_V8BF_LDST): Likewise. (ARM_HAVE_V2SF_LDST, ARM_HAVE_V4SF_LDST, ARM_HAVE_DI_LDST): Likewise. (ARM_HAVE_V2DI_LDST): Likewise. * config/arm/mve.md (*movmisalign_mve_store): New pattern. (*movmisalign_mve_load): New pattern. * config/arm/neon.md (movmisalign): Move to ... * config/arm/vec-common.md: ... here. 2021-01-12 Vladimir N. Makarov PR target/97969 * lra-eliminations.c (eliminate_regs_in_insn): Add transformation of pattern 'plus (plus (hard reg, const), pseudo)'. 2021-01-12 Richard Biener PR tree-optimization/98550 * tree-vect-slp.c (vect_record_max_nunits): Check whether the group size is a multiple of the vector element count. (vect_build_slp_tree_1): When we need to fail because the vector type choosen causes unrolling do so lazily without affecting matches only at the end to guide group splitting. 2021-01-12 Martin Liska PR c++/97284 * optc-save-gen.awk: Compare also n_target_save vars with strcmp. 2021-01-12 Martin Liska * gcov.c (source_info::debug): New. (print_usage): Add --debug (-D) option. (process_args): Likewise. (generate_results): Call src->debug after accumulate_line_counts. (read_graph_file): Properly assign id for EXIT_BLOCK. * profile.c (branch_prob): Dump function body before it is instrumented. 2021-01-12 Jakub Jelinek PR tree-optimization/98629 * tree-ssa-math-opts.c (arith_overflow_check_p): Don't update use_stmt unless returning non-zero. 2021-01-12 Jakub Jelinek PR tree-optimization/95731 * tree-ssa-reassoc.c (optimize_range_tests_cmp_bitwise): Also optimize x < 0 && y < 0 && z < 0 into (x | y | z) < 0 for signed x, y, z. (optimize_range_tests): Call optimize_range_tests_cmp_bitwise only after optimize_range_tests_var_bound. 2021-01-12 Jakub Jelinek * configure.ac: Ensure c/Make-lang.in comes first in @all_lang_makefrags@. * configure: Regenerated. 2021-01-12 liuhongt PR target/98612 * config/i386/i386-builtins.h (BUILTIN_DESC_SWAP_OPERANDS): Deleted. * config/i386/i386-expand.c (ix86_expand_sse_comi): Delete dead code. 2021-01-12 Alexandre Oliva * ssa-iterators.h (end_imm_use_stmt_traverse): Forward declare. (auto_end_imm_use_stmt_traverse): New struct. (FOR_EACH_IMM_USE_STMT): Use it. (BREAK_FROM_IMM_USE_STMT, RETURN_FROM_IMM_USE_STMT): Remove, along with uses... * gimple-ssa-strength-reduction.c: ... here, ... * graphite-scop-detection.c: ... here, ... * ipa-modref.c, ipa-pure-const.c, ipa-sra.c: ... here, ... * tree-predcom.c, tree-ssa-ccp.c: ... here, ... * tree-ssa-dce.c, tree-ssa-dse.c: ... here, ... * tree-ssa-loop-ivopts.c, tree-ssa-math-opts.c: ... here, ... * tree-ssa-phiprop.c, tree-ssa.c: ... here, ... * tree-vect-slp.c: ... and here, ... * doc/tree-ssa.texi: ... and the example here. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (sdiv_pow23): Extend from SVE_FULL_I to SVE_I. Generate an UNSPEC_PRED_X. (*sdiv_pow23): New pattern. (@cond_): Extend from SVE_FULL_I to SVE_I. Wrap the ASRD in an UNSPEC_PRED_X. (*cond__2): Likewise. Replace the UNSPEC_PRED_X predicate with a constant PTRUE, if it isn't already. (*cond__z): Replace with... (*cond__any): ...this new pattern. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (*cond_bic_2): Extend from SVE_FULL_I to SVE_I. (*cond_bic_any): Likewise. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (mul3_highpart) (@aarch64_pred_): Extend from SVE_FULL_I to SVE_I. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (abd_3): Extend from SVE_FULL_I to SVE_I. (*aarch64_cond_abd_2): Likewise. (*aarch64_cond_abd_any): Likewise. (@aarch64_pred_abd): Likewise. Use UNSPEC_PRED_X for the max and min but not for the minus. (*aarch64_cond_abd_3): New pattern. 2021-01-11 Richard Sandiford * config/aarch64/iterators.md (SVE_24I): New iterator. * config/aarch64/aarch64-sve.md (*aarch64_adr_shift): Extend from SVE_FULL_SDI to SVE_24I. Use containers rather than elements. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (@cond_) (*cond__2): Extend from SVE_FULL_I to SVE_I. (*cond__3): Likewise. (*cond__any): Likewise. (*cond__2_const): Likewise. (*cond__any_const): Likewise. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (3) (@aarch64_pred_) (*post_ra_3): Extend from SVE_FULL_I to SVE_I. 2021-01-11 Richard Sandiford * config/aarch64/aarch64-sve.md (3) (v3, @aarch64_pred_) (*post_ra_v3): Extend from SVE_FULL_I to SVE_I. 2021-01-11 Martin Liska PR jit/98615 * symtab-clones.h (clone_info::release): Release symtab::m_clones with ggc_delete as it's a GGC memory. 2021-01-11 Matthias Klose * Makefile.in (LINK_PROGRESS): Show the link target. 2021-01-11 Richard Biener PR tree-optimization/91403 * tree-vect-data-refs.c (vect_analyze_group_access_1): Cap single-element interleaving group size at 4096 elements. 2021-01-11 Richard Biener PR tree-optimization/98526 * tree-vect-loop.c (vect_model_reduction_cost): Remove costing of the actual reduction op for the regular case. (vectorizable_reduction): Cost the stmts vect_transform_reduction produces here. 2021-01-11 Andreas Krebbel * tree-ssa-forwprop.c (simplify_vector_constructor): For big-endian, use UNPACK[_FLOAT]_HI. 2021-01-11 Tamar Christina * tree-vect-slp-patterns.c (class complex_pattern, class complex_add_pattern): Add parameters to matches. (complex_add_pattern::build): Free memory. (complex_add_pattern::matches): Move validation end of match. (complex_add_pattern::recognize): Likewise. 2021-01-11 Tamar Christina * tree-vect-slp-patterns.c (linear_loads_p): Fix externals. 2021-01-11 Tamar Christina * tree-vect-slp-patterns.c (is_linear_load_p): Fix ambiguity. 2021-01-11 Jakub Jelinek PR tree-optimization/95867 * tree-ssa-math-opts.h: New header. * tree-ssa-math-opts.c: Include tree-ssa-math-opts.h. (powi_as_mults): No longer static. Use build_one_cst instead of build_real. Formatting fix. * tree-ssa-reassoc.c: Include tree-ssa-math-opts.h. (attempt_builtin_powi): Handle multiplication reassociation without powi_fndecl using powi_as_mults. (reassociate_bb): For integral types don't require -funsafe-math-optimizations to call attempt_builtin_powi. 2021-01-11 Jakub Jelinek PR tree-optimization/95852 * tree-ssa-math-opts.c (maybe_optimize_guarding_check): Change mul_stmts parameter type to vec &. Before cond_stmt allow in the bb any of the stmts in that vector, div_stmt and up to 3 cast stmts. (arith_cast_equal_p): New function. (arith_overflow_check_p): Add cast_stmt argument, handle signed multiply overflow checks. (match_arith_overflow): Adjust caller. Handle signed multiply overflow checks. 2021-01-11 Jakub Jelinek PR tree-optimization/95852 * tree-ssa-math-opts.c (maybe_optimize_guarding_check): New function. (uaddsub_overflow_check_p): Renamed to ... (arith_overflow_check_p): ... this. Handle also multiplication with overflow check. (match_uaddsub_overflow): Renamed to ... (match_arith_overflow): ... this. Add cfg_changed argument. Handle also multiplication with overflow check. Adjust function comment. (math_opts_dom_walker::after_dom_children): Adjust callers. Call match_arith_overflow also for MULT_EXPR. 2021-01-11 Kyrylo Tkachov * config/aarch64/arm_neon.h (vmovl_s8): Reimplement using __builtin_convertvector. (vmovl_s16): Likewise. (vmovl_s32): Likewise. (vmovl_u8): Likewise. (vmovl_u16): Likewise. (vmovl_u32): Likewise. (vmovn_s16): Likewise. (vmovn_s32): Likewise. (vmovn_s64): Likewise. (vmovn_u16): Likewise. (vmovn_u32): Likewise. (vmovn_u64): Likewise. 2021-01-11 Martin Liska * gimple-if-to-switch.cc (struct condition_info): Use auto_var. (if_chain::is_beneficial): Delete clusters (find_conditions): Make second argument of conditions_in_bbs a pointer so that we control over it's lifetime. (pass_if_to_switch::execute): Delete them. 2021-01-11 Kewen Lin * ira.c (move_unallocated_pseudos): Check other_reg and skip if it isn't set. 2021-01-09 Maciej W. Rozycki * config/vax/vax.md (cc): Remove mode attribute. (subst_, subst_f): Rename to... (subst_, subst_f): ... these respectively. (*cbranch4_): Update for `cc' removal. (*cbranch4_): Likewise. (*branch_, *branch__reversed): Likewise. 2021-01-09 Maciej W. Rozycki * config/vax/vax.md (subst_f): Add mode to operands and `const_double_zero'. 2021-01-09 Maciej W. Rozycki * config/pdp11/pdp11.md (PDPfp): New mode iterator. (fcc_cc, fcc_ccnz): Use it. Add mode to `const_double_zero' and operands. 2021-01-09 Maciej W. Rozycki * genemit.c (gen_exp) : Handle `const_double_zero' rtx. * read-rtl.c (rtx_reader::read_rtx_code): Handle machine mode with `const_double_zero'. * doc/rtl.texi (Constant Expression Types): Document it. 2021-01-09 Jakub Jelinek PR c++/98556 * tree-cfg.c (verify_gimple_assign_binary): Allow lhs of POINTER_DIFF_EXPR to be any integral type. 2021-01-09 Jakub Jelinek PR rtl-optimization/98603 * function.c (instantiate_virtual_regs_in_insn): For asm goto with impossible constraints, drop all SETs, CLOBBERs, drop PARALLEL if any, set ASM_OPERANDS mode to VOIDmode and change ASM_OPERANDS_OUTPUT_CONSTRAINT and ASM_OPERANDS_OUTPUT_IDX. 2021-01-09 Alexandre Oliva PR debug/97714 * final.c (notice_source_line): Narrow down the condition to skip a line-0 marker. 2021-01-08 Sergei Trofimovich * ipa-modref.c (merge_call_side_effects): Fix linebreak split by reordering two print calls. 2021-01-08 Ilya Leoshkevich * config/s390/vector.md (*tf_to_fprx2_0): Rename from "*mov_tf_to_fprx2_0" for consistency, fix constraint. (*tf_to_fprx2_1): Rename from "*mov_tf_to_fprx2_1" for consistency, fix constraint. 2021-01-08 Ilya Leoshkevich * config/s390/s390-c.c (s390_def_or_undef_macro): Accept callables instead of mask values. (struct target_flag_set_p): New predicate. (s390_cpu_cpp_builtins_internal): Define or undefine __LONG_DOUBLE_VX__ macro. 2021-01-08 H.J. Lu PR target/98482 * config/i386/i386.c (x86_function_profiler): Use R10 and R11 to call mcount in large model with PIC for NO_PROFILE_COUNTERS targets. 2021-01-08 Richard Biener * tree-ssa-sccvn.c (pass_fre::execute): Reset the SCEV hash table. 2021-01-08 Richard Biener * tree-vect-slp.c (scalar_stmts_to_slp_tree_map_t): Fix. (vect_build_slp_tree): On cache hit release the matched scalar stmts vector. * tree-vect-stmts.c (vectorizable_store): Properly free vec_oprnds before possibly gathering them again. 2021-01-08 Richard Biener PR tree-optimization/98544 * tree-vect-slp.c (vect_optimize_slp): Always materialize permutes at a permute node. 2021-01-08 H.J. Lu PR target/98482 * config/i386/i386.c (x86_function_profiler): Use R10 to call mcount in large model. Sorry for large model with PIC. 2021-01-08 Jakub Jelinek PR target/98585 * config/i386/i386.opt (ix86_cmodel, ix86_incoming_stack_boundary_arg, ix86_pmode, ix86_preferred_stack_boundary_arg, ix86_regparm, ix86_veclibabi_type): Remove x_ prefix, use TargetVariable instead of TargetSave and initialize for variables with enum types. (mfentry, mstack-protector-guard-reg=, mstack-protector-guard-offset=, mstack-protector-guard-symbol=): Add Save. * config/i386/i386-options.c (ix86_function_specific_save, ix86_function_specific_restore): Don't save or restore x_ix86_cmodel, x_ix86_incoming_stack_boundary_arg, x_ix86_pmode, x_ix86_preferred_stack_boundary_arg, x_ix86_regparm, x_ix86_veclibabi_type. 2021-01-08 Richard Sandiford * config/aarch64/aarch64-sve.md (*cnot): Extend from SVE_FULL_I to SVE_I. (*cond_cnot_2, *cond_cnot_any): Likewise. 2021-01-08 Richard Sandiford * config/aarch64/aarch64-sve.md (*cond_uxt_2): Extend from SVE_FULL_I to SVE_I. (*cond_uxt_any): Likewise. 2021-01-08 Kyrylo Tkachov * config/aarch64/iterators.md (Vwhalf): New iterator. * config/aarch64/aarch64-simd.md (aarch64_adalp_3): Rename to... (aarch64_adalp): ... This. Make more builtin-friendly. (sadv16qi): Adjust callsite of the above. * config/aarch64/aarch64-simd-builtins.def (sadalp, uadalp): New builtins. * config/aarch64/arm_neon.h (vpadal_s8): Reimplement using builtins. (vpadal_s16): Likewise. (vpadal_u8): Likewise. (vpadal_u16): Likewise. (vpadalq_s8): Likewise. (vpadalq_s16): Likewise. (vpadalq_s32): Likewise. (vpadalq_u8): Likewise. (vpadalq_u16): Likewise. (vpadalq_u32): Likewise. 2021-01-08 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_abd_3): Rename to... (aarch64_abd): ... This. (sadv16qi): Adjust callsite of the above. * config/aarch64/aarch64-simd-builtins.def (sabd, uabd): Define builtins. * config/aarch64/arm_neon.h (vabd_s8): Reimplement using builtin. (vabd_s16): Likewise. (vabd_s32): Likewise. (vabd_u8): Likewise. (vabd_u16): Likewise. (vabd_u32): Likewise. (vabdq_s8): Likewise. (vabdq_s16): Likewise. (vabdq_s32): Likewise. (vabdq_u8): Likewise. (vabdq_u16): Likewise. (vabdq_u32): Likewise. 2021-01-08 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (saba, uaba): Define builtins. * config/aarch64/arm_neon.h (vaba_s8): Implement using builtin. (vaba_s16): Likewise. (vaba_s32): Likewise. (vaba_u8): Likewise. (vaba_u16): Likewise. (vaba_u32): Likewise. (vabaq_s8): Likewise. (vabaq_s16): Likewise. (vabaq_s32): Likewise. (vabaq_u8): Likewise. (vabaq_u16): Likewise. (vabaq_u32): Likewise. 2021-01-08 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aba_3): Rename to... (aarch64_aba): ... This. Handle uaba as well. Change RTL pattern to match. 2021-01-08 Kito Cheng * common/config/riscv/riscv-common.c (riscv_current_subset_list): New. * config/riscv/riscv-c.c (riscv-subset.h): New. (INCLUDE_STRING): Define. (riscv_cpu_cpp_builtins): Add new style architecture extension test macros. * config/riscv/riscv-subset.h (riscv_subset_list::begin): New. (riscv_subset_list::end): New. (riscv_current_subset_list): New. 2021-01-08 Kito Cheng * common/config/riscv/riscv-common.c (RISCV_DONT_CARE_VERSION): Move to riscv-subset.h. (struct riscv_subset_t): Ditto. (class riscv_subset_list): Ditto. * config/riscv/riscv-subset.h (RISCV_DONT_CARE_VERSION): Move from riscv-common.c. (struct riscv_subset_t): Ditto. (class riscv_subset_list): Ditto. * config/riscv/t-riscv ($(common_out_file)): Add file dependency. 2021-01-07 Jakub Jelinek PR target/98567 * config/i386/i386.md (*bmi_blsi__cmp, *bmi_blsi__ccno): New define_insn patterns. 2021-01-07 Richard Sandiford * config/aarch64/aarch64-sve.md (@cond_) (*cond__2): Extend from SVE_FULL_I to SVE_I. (*cond__any): Likewise. 2021-01-07 Richard Sandiford PR tree-optimization/98560 * internal-fn.def (IFN_VCONDU, IFN_VCONDEQ): Use type vec_cond. * internal-fn.c (vec_cond_mask_direct): Get the data mode from argument 1. (vec_cond_direct): Likewise argument 2. (vec_condu_direct, vec_condeq_direct): Delete. (expand_vect_cond_optab_fn): Rename to... (expand_vec_cond_optab_fn): ...this, replacing old macro. (expand_vec_condu_optab_fn, expand_vec_condeq_optab_fn): Delete. (expand_vect_cond_mask_optab_fn): Rename to... (expand_vec_cond_mask_optab_fn): ...this, replacing old macro. (direct_vec_cond_mask_optab_supported_p): Treat the optab as a convert optab. (direct_vec_cond_optab_supported_p): Likewise. (direct_vec_condu_optab_supported_p): Delete. (direct_vec_condeq_optab_supported_p): Delete. * gimple-isel.cc: Include internal-fn.h. (gimple_expand_vec_cond_expr): Check that IFN_VCONDEQ is supported before using it. 2021-01-07 Richard Sandiford PR tree-optimization/98560 * gimple-isel.cc (gimple_expand_vec_cond_expr): If we fail to use IFN_VCOND{,U,EQ}, fall back on IFN_VCOND_MASK. 2021-01-07 Uroš Bizjak * config/i386/i386.md (insn): Merge from plusminus_insn, shift_insn, rotate_insn and optab code attributes. Update all uses to merged code attribute. * config/i386/sse.md: Update all uses to merged code attribute. * config/i386/mmx.md: Update all uses to merged code attribute. 2021-01-07 Jakub Jelinek PR tree-optimization/98568 * gimple-ssa-store-merging.c (bswap_view_convert): New function. (bswap_replace): Use it. 2021-01-06 Vladimir N. Makarov PR rtl-optimization/97978 * lra-int.h (lra_hard_reg_split_p): New external. * lra.c (lra_hard_reg_split_p): New global. (lra): Set up lra_hard_reg_split_p after splitting a hard reg. * lra-assigns.c (lra_assign): Don't check allocation correctness after hard reg splitting. 2021-01-06 Martin Sebor PR c++/98305 * builtins.c (new_delete_mismatch_p): New overload. (new_delete_mismatch_p (tree, tree)): Call it. 2021-01-06 Alexandre Oliva * Makefile.in (T_GLIMITS_H): New. (stmp-int-hdrs): Depend on it, use it. * config/t-vxworks (T_GLIMITS_H): Override it. (vxw-glimits.h): New. 2021-01-06 Richard Biener PR tree-optimization/98513 * value-range.cc (intersect_ranges): Compare the upper bounds for the expected relation. 2021-01-06 Gerald Pfeifer Revert: 2020-12-28 Gerald Pfeifer * doc/standards.texi (HSAIL): Remove section. 2021-01-05 Samuel Thibault * configure: Re-generate. 2021-01-05 Jakub Jelinek * doc/invoke.texi (-std=c++20): Adjust for the publication of ISO 14882:2020 standard. * doc/standards.texi: Likewise. 2021-01-05 Jakub Jelinek PR tree-optimization/94802 * expr.h (maybe_optimize_sub_cmp_0): Declare. * expr.c: Include tree-pretty-print.h and flags.h. (maybe_optimize_sub_cmp_0): New function. (do_store_flag): Use it. * cfgexpand.c (expand_gimple_cond): Likewise. 2021-01-05 Richard Sandiford * mux-utils.h (pointer_mux::m_ptr): Tweak description of contents. * rtlanal.c (simple_regno_set): Tweak description to clarify the RMW condition. 2021-01-05 Richard Biener PR tree-optimization/98516 * tree-vect-slp.c (vect_optimize_slp): Permute the incoming lanes when materializing on a VEC_PERM node. (vectorizable_slp_permutation): Dump the permute properly. 2021-01-05 Richard Biener * tree-vect-slp.c (vect_slp_region): Move debug counter to cover individual subgraphs. 2021-01-05 Richard Biener PR tree-optimization/98428 * tree-vect-slp.c (vect_build_slp_tree_1): Properly reject vector lane extracts for loop vectorization. 2021-01-05 Jakub Jelinek PR tree-optimization/98514 * tree-ssa-reassoc.c (bb_rank): Change type from long * to int64_t *. (operand_rank): Change type from hash_map to hash_map. (phi_rank): Change return type from long to int64_t. (loop_carried_phi): Change block_rank variable type from long to int64_t. (propagate_rank): Change return type, rank parameter type and op_rank variable type from long to int64_t. (find_operand_rank): Change return type from long to int64_t and change slot variable type from long * to int64_t *. (insert_operand_rank): Change rank parameter type from long to int64_t. (get_rank): Change return type and rank variable type from long to int64_t. Use PRId64 instead of ld to print the rank. (init_reassoc): Change rank variable type from long to int64_t and adjust correspondingly bb_rank and operand_rank initialization. 2021-01-05 Jakub Jelinek PR tree-optimization/96928 * tree-ssa-phiopt.c (xor_replacement): New function. (tree_ssa_phiopt_worker): Call it. 2021-01-05 Jakub Jelinek PR tree-optimization/96930 * match.pd ((A / (1 << B)) -> (A >> B)): If A is extended from narrower value which has the same type as 1 << B, perform the right shift on the narrower value followed by extension. 2021-01-05 Jakub Jelinek PR tree-optimization/96239 * gimple-ssa-store-merging.c (maybe_optimize_vector_constructor): New function. (get_status_for_store_merging): Don't return BB_INVALID for blocks with potential bswap optimizable CONSTRUCTORs. (pass_store_merging::execute): Optimize vector CONSTRUCTORs with bswap if possible. 2021-01-05 Richard Biener PR tree-optimization/98381 * tree.c (vector_element_bits): Properly compute bool vector element size. * tree-vect-loop.c (vectorizable_live_operation): Properly compute the last lane bit offset. 2021-01-05 Uroš Bizjak PR target/98522 * config/i386/sse.md (sse_cvtps2pi): Redefine as define_insn_and_split. Clear the top 64 bytes of the input XMM register. (sse_cvttps2pi): Ditto. 2021-01-05 Uroš Bizjak PR target/98521 * config/i386/xopintrin.h (_mm256_cmov_si256): New. 2021-01-05 H.J. Lu PR target/98495 * config/i386/xmmintrin.h (_mm_extract_pi16): Cast to unsigned short first. 2021-01-05 Claudiu Zissulescu * config/arc/arc.md (maddsidi4_split): Use ACC_REG_FIRST. (umaddsidi4_split): Likewise. 2021-01-05 liuhongt PR target/98461 * config/i386/sse.md (*sse2_pmovskb_zexthisi): New define_insn_and_split for zero_extend of subreg HI of pmovskb result. (*sse2_pmovskb_zexthisi): Add new combine splitters for zero_extend of not of subreg HI of pmovskb result. 2021-01-05 Richard Sandiford PR target/97269 * explow.c (convert_memory_address_addr_space_1): Handle UNSPECs nested in CONSTs. * config/aarch64/aarch64.c (aarch64_expand_mov_immediate): Use convert_memory_address to convert symbolic immediates to ptr_mode before forcing them to memory. 2021-01-05 Richard Sandiford PR rtl-optimization/97144 * recog.c (constrain_operands): Initialize matching_operand for each alternative, rather than only doing it once. 2021-01-05 Richard Sandiford PR rtl-optimization/98403 * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Explain why we don't remove call clobbers. (function_info::apply_changes_to_insn): Don't attempt to add call clobbers here. 2021-01-05 Richard Sandiford PR tree-optimization/98371 * tree-vect-loop.c (vect_reanalyze_as_main_loop): New function. (vect_analyze_loop): If an epilogue loop appears to be cheaper than the main loop, re-analyze it as a main loop before adopting it as a main loop. 2021-01-05 Rainer Orth PR c++/98316 * configure.ac (NETLIBS): Determine using AX_LIB_SOCKET_NSL. * aclocal.m4, configure: Regenerate. * Makefile.in (NETLIBS): Define. (BACKEND): Remove $(CODYLIB). 2021-01-05 Jakub Jelinek PR rtl-optimization/98334 * simplify-rtx.c (simplify_context::simplify_binary_operation_1): Optimize (X - 1) * Y + Y to X * Y or (X + 1) * Y - Y to X * Y. 2021-01-05 Bernd Edlinger * tree-inline.c (expand_call_inline): Restore input_location. Return result from recursive call. 2021-01-04 Richard Sandiford PR tree-optimization/95401 * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::load_store_cookie): Use bits rather than bytes for the alignment argument to IFN_MASK_LOAD and IFN_MASK_STORE. * gimple-fold.c (gimple_fold_mask_load_store_mem_ref): Likewise. * tree-vect-stmts.c (vectorizable_store): Likewise. (vectorizable_load): Likewise. 2021-01-04 Richard Biener PR tree-optimization/98308 * tree-vect-stmts.c (vectorizable_load): Set invariant mask SLP vectype. 2021-01-04 Jakub Jelinek PR tree-optimization/95771 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Handle types with precision smaller than int's precision and types with precision twice as large as long long. Formatting fixes. 2021-01-04 Richard Biener PR tree-optimization/98464 * tree-ssa-sccvn.c (vn_valueize_for_srt): Rename from ... (vn_valueize_wrapper): ... this. Temporarily adjust vn_context_bb. (process_bb): Adjust. 2021-01-04 Matthew Malcomson PR other/98437 * doc/invoke.texi (-fsanitize=address): Fix wording describing clash with -fsanitize=hwaddress. 2021-01-04 Richard Biener PR tree-optimization/98282 * tree-ssa-sccvn.c (vn_get_stmt_kind): Classify tcc_reference on invariants as VN_NARY. 2021-01-04 Richard Sandiford PR target/89057 * config/aarch64/aarch64-simd.md (aarch64_combine): Accept aarch64_simd_reg_or_zero for operand 2. Use the combinez patterns to handle zero operands. 2021-01-04 Richard Sandiford * config/aarch64/aarch64.c (offset_6bit_signed_scaled_p): New function. (offset_6bit_unsigned_scaled_p): Fix typo in comment. (aarch64_sve_prefetch_operand_p): Accept MUL VLs in the range [-32, 31]. 2021-01-04 Richard Biener PR tree-optimization/98393 * tree-vect-slp.c (vect_build_slp_tree): Properly zero matches when hitting the limit. 2021-01-04 Richard Biener PR tree-optimization/98291 * tree-vect-loop.c (vectorizable_reduction): Bypass associativity check for SLP reductions with VF 1. 2021-01-04 Jakub Jelinek PR tree-optimization/96782 * match.pd (x == ~x -> false, x != ~x -> true): New simplifications. 2021-01-04 Bernd Edlinger * collect-utils.c (collect_execute): Check dumppfx. * collect2.c (maybe_run_lto_and_relink, do_link): Pass atsuffix to collect_execute. (do_link): Add new parameter atsuffix. (main): Handle -dumpdir option. Skip one argument for -o, -isystem and -B options. * gcc.c (make_at_file): New helper function. (close_at_file): Use it. 2021-01-02 Iain Sandoe * config/darwin.h (MIN_LD64_NO_COAL_SECTS): Adjust. Amend handling for LD64_VERSION fallback defaults. 2021-01-02 Iain Sandoe * config.gcc: Compute default version information from the configured target. Likewise defaults for ld64. * config/darwin10.h: Removed. * config/darwin12.h: Removed. * config/darwin9.h: Removed. * config/rs6000/darwin8.h: Removed. 2021-01-02 Iain Sandoe * config/darwin9.h (ASM_OUTPUT_ALIGNED_COMMON): Delete. 2021-01-02 Iain Sandoe * config/darwin9.h (STACK_CHECK_STATIC_BUILTIN): Move from here.. * config/darwin.h (STACK_CHECK_STATIC_BUILTIN): .. to here. 2021-01-02 Iain Sandoe * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move from here... * config/darwin.h (LINK_GCC_C_SEQUENCE_SPEC): ... to here. 2021-01-02 Iain Sandoe * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Move the spec for the Darwin10 unwinder stub from here ... * config/darwin.h (LINK_COMMAND_SPEC_A): ... to here. 2021-01-02 Iain Sandoe * config/darwin.h (DSYMUTIL_SPEC): Default to DWARF (ASM_DEBUG_SPEC):Only define if the assembler supports stabs. (PREFERRED_DEBUGGING_TYPE): Default to DWARF. (DARWIN_PREFER_DWARF): Define. * config/darwin9.h (PREFERRED_DEBUGGING_TYPE): Remove. (DARWIN_PREFER_DWARF): Likewise (DSYMUTIL_SPEC): Likewise. (COLLECT_RUN_DSYMUTIL): Likewise. (ASM_DEBUG_SPEC): Likewise. (ASM_DEBUG_OPTION_SPEC): Likewise. 2021-01-02 Jan Hubicka * cfg.c (free_block): ggc_free bb. 2021-01-01 Jakub Jelinek * gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. 2021-01-01 Jakub Jelinek * ChangeLog-2020: Rotate ChangeLog. New file. Copyright (C) 2021 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.