2023-12-02 Richard Sandiford * attribs.cc (comp_type_attributes): Pass the full TREE_PURPOSE to lookup_attribute_spec, rather than just the name. (remove_attributes_matching): Likewise. 2023-12-02 Richard Sandiford * attribs.cc (find_same_attribute): New function. (decl_attributes, comp_type_attributes): Use it when looking up one list's attributes in another list. 2023-12-02 Richard Sandiford * Makefile.in (GTFILES): Add attribs.cc. * attribs.cc (gnu_namespace_cache): New variable. (get_gnu_namespace): New function. (lookup_attribute_spec): Use it instead of get_identifier ("gnu"). (get_attribute_namespace, attribs_cc_tests): Likewise. 2023-12-02 Richard Sandiford * attribs.h (scoped_attribute_specs): New structure. (register_scoped_attributes): Take a reference to a scoped_attribute_specs instead of separate namespace and array parameters. * plugin.h (register_scoped_attributes): Likewise. * attribs.cc (register_scoped_attributes): Likewise. (attribute_tables): Change into an array of scoped_attribute_specs pointers. Reduce to 1 element for frontends and 1 element for targets. (empty_attribute_table): Delete. (check_attribute_tables): Update for changes to attribute_tables. Use a hash_set to identify duplicates. (handle_ignored_attributes_option): Update for above changes. (init_attributes): Likewise. (excl_pair): Delete. (test_attribute_exclusions): Update for above changes. Don't enforce symmetry for standard attributes in the top-level namespace. * langhooks-def.h (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Likewise. (LANG_HOOKS_INITIALIZER): Update accordingly. (LANG_HOOKS_ATTRIBUTE_TABLE): Define to an empty constructor. * langhooks.h (lang_hooks::common_attribute_table): Delete. (lang_hooks::format_attribute_table): Likewise. (lang_hooks::attribute_table): Redefine to an array of scoped_attribute_specs pointers. * target-def.h (TARGET_GNU_ATTRIBUTES): New macro. * target.def (attribute_spec): Redefine to return an array of scoped_attribute_specs pointers. * tree-inline.cc (function_attribute_inlinable_p): Update accordingly. * doc/tm.texi: Regenerate. * config/aarch64/aarch64.cc (aarch64_attribute_table): Define using TARGET_GNU_ATTRIBUTES. * config/alpha/alpha.cc (vms_attribute_table): Likewise. * config/avr/avr.cc (avr_attribute_table): Likewise. * config/bfin/bfin.cc (bfin_attribute_table): Likewise. * config/bpf/bpf.cc (bpf_attribute_table): Likewise. * config/csky/csky.cc (csky_attribute_table): Likewise. * config/epiphany/epiphany.cc (epiphany_attribute_table): Likewise. * config/gcn/gcn.cc (gcn_attribute_table): Likewise. * config/h8300/h8300.cc (h8300_attribute_table): Likewise. * config/loongarch/loongarch.cc (loongarch_attribute_table): Likewise. * config/m32c/m32c.cc (m32c_attribute_table): Likewise. * config/m32r/m32r.cc (m32r_attribute_table): Likewise. * config/m68k/m68k.cc (m68k_attribute_table): Likewise. * config/mcore/mcore.cc (mcore_attribute_table): Likewise. * config/microblaze/microblaze.cc (microblaze_attribute_table): Likewise. * config/mips/mips.cc (mips_attribute_table): Likewise. * config/msp430/msp430.cc (msp430_attribute_table): Likewise. * config/nds32/nds32.cc (nds32_attribute_table): Likewise. * config/nvptx/nvptx.cc (nvptx_attribute_table): Likewise. * config/riscv/riscv.cc (riscv_attribute_table): Likewise. * config/rl78/rl78.cc (rl78_attribute_table): Likewise. * config/rx/rx.cc (rx_attribute_table): Likewise. * config/s390/s390.cc (s390_attribute_table): Likewise. * config/sh/sh.cc (sh_attribute_table): Likewise. * config/sparc/sparc.cc (sparc_attribute_table): Likewise. * config/stormy16/stormy16.cc (xstormy16_attribute_table): Likewise. * config/v850/v850.cc (v850_attribute_table): Likewise. * config/visium/visium.cc (visium_attribute_table): Likewise. * config/arc/arc.cc (arc_attribute_table): Likewise. Move further down file. * config/arm/arm.cc (arm_attribute_table): Update for above changes, using... (arm_gnu_attributes, arm_gnu_attribute_table): ...these new globals. * config/i386/i386-options.h (ix86_attribute_table): Delete. (ix86_gnu_attribute_table): Declare. * config/i386/i386-options.cc (ix86_attribute_table): Replace with... (ix86_gnu_attributes, ix86_gnu_attribute_table): ...these two globals. * config/i386/i386.cc (ix86_attribute_table): Define as an array of scoped_attribute_specs pointers. * config/ia64/ia64.cc (ia64_attribute_table): Update for above changes, using... (ia64_gnu_attributes, ia64_gnu_attribute_table): ...these new globals. * config/rs6000/rs6000.cc (rs6000_attribute_table): Update for above changes, using... (rs6000_gnu_attributes, rs6000_gnu_attribute_table): ...these new globals. 2023-12-02 Roger Sayle * config/riscv/riscv-vsetvl.cc (csetvl_info::parse_insn): Rename local variable from demand_flags to dflags, to avoid conflicting with (enumeration) type of the same name. 2023-12-02 Li Wei * config/loongarch/loongarch.cc (loongarch_is_odd_extraction): Supplementary function prototype. (loongarch_is_even_extraction): Adjust. (loongarch_try_expand_lsx_vshuf_const): Adjust. (loongarch_is_extraction_permutation): Adjust. (loongarch_expand_vec_perm_const_2): Adjust. 2023-12-02 Li Wei * config/loongarch/loongarch.md (v2di): Used to simplify the following templates. (popcount2): New. 2023-12-02 Li Wei * config/loongarch/loongarch.h (CTZ_DEFINED_VALUE_AT_ZERO): Add description. (CLZ_DEFINED_VALUE_AT_ZERO): Remove duplicate definition. 2023-12-02 Juzhe-Zhong PR target/112801 * config/riscv/vector.md: Add !TARGET_64BIT. 2023-12-02 Pan Li PR target/112743 * config/riscv/riscv.cc (riscv_legitimize_move): Take the exist (U *mode) and handle DFmode like DImode when EEW is 32bits for ZVE32F. 2023-12-01 Andrew MacLeod * gimple-range-fold.h (range_compatible_p): Relocate. * value-range.h (range_compatible_p): Here. * range-op-mixed.h (operand_equal::operand_check_p): Call range_compatible_p rather than comparing precision. (operand_not_equal::operand_check_p): Ditto. (operand_not_lt::operand_check_p): Ditto. (operand_not_le::operand_check_p): Ditto. (operand_not_gt::operand_check_p): Ditto. (operand_not_ge::operand_check_p): Ditto. (operand_plus::operand_check_p): Ditto. (operand_abs::operand_check_p): Ditto. (operand_minus::operand_check_p): Ditto. (operand_negate::operand_check_p): Ditto. (operand_mult::operand_check_p): Ditto. (operand_bitwise_not::operand_check_p): Ditto. (operand_bitwise_xor::operand_check_p): Ditto. (operand_bitwise_and::operand_check_p): Ditto. (operand_bitwise_or::operand_check_p): Ditto. (operand_min::operand_check_p): Ditto. (operand_max::operand_check_p): Ditto. * range-op.cc (operand_lshift::operand_check_p): Ditto. (operand_rshift::operand_check_p): Ditto. (operand_logical_and::operand_check_p): Ditto. (operand_logical_or::operand_check_p): Ditto. (operand_logical_not::operand_check_p): Ditto. 2023-12-01 Vladimir N. Makarov PR target/112445 * lra.h (lra): Add one more arg. * lra-int.h (lra_verbose, lra_dump_insns): New externals. (lra_dump_insns_if_possible): Ditto. * lra.cc (lra_dump_insns): Dump all insns. (lra_dump_insns_if_possible): Dump all insns for lra_verbose >= 7. (lra_verbose): New global. (lra): Add new arg. Setup lra_verbose from its value. * lra-assigns.cc (lra_split_hard_reg_for): Dump insns if rtl was changed. * lra-remat.cc (lra_remat): Dump insns if rtl was changed. * lra-constraints.cc (lra_inheritance): Dump insns. (lra_constraints, lra_undo_inheritance): Dump insns if rtl was changed. (remove_inheritance_pseudos): Use restore reg if it is set up. * ira.cc: (lra): Pass internal_flag_ira_verbose. 2023-12-01 Jakub Jelinek * doc/extend.texi (__builtin_addc, __builtin_addcl, __builtin_addcll, __builtin_subc, __builtin_subcl, __builtin_subcll, __builtin_stdc_bit_width, __builtin_stdc_count_ones, __builtin_stdc_count_zeros, __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero, __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero, __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones, __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones, __builtin_stdc_trailing_zeros, __builtin_nvptx_brev, __builtin_nvptx_brevll, __builtin_darn, __builtin_darn_raw, __builtin_ia32_vec_ext_v2di, __builtin_ia32_crc32qi, __builtin_ia32_crc32hi, __builtin_ia32_crc32si, __builtin_ia32_crc32di): Put {}s around return type with spaces in it. (__builtin_rx_mvfachi, __builtin_rx_mvfacmi): Remove superfluous whitespace. 2023-12-01 David Malcolm * diagnostic-core.h (emit_diagnostic_valist): New overload decl. * diagnostic-format-sarif.cc (sarif_builder::make_result_object): When we have metadata, call its maybe_add_sarif_properties vfunc. * diagnostic-metadata.h (class sarif_object): Forward decl. (diagnostic_metadata::~diagnostic_metadata): New. (diagnostic_metadata::maybe_add_sarif_properties): New vfunc. * diagnostic.cc (emit_diagnostic_valist): New overload. 2023-12-01 David Malcolm PR analyzer/103533 * doc/extend.texi: Remove stray reference to -fanalyzer-checker=taint. 2023-12-01 Juzhe-Zhong PR target/112431 * config/riscv/vector.md: Support highpart overlap for vx/vf. 2023-12-01 Juzhe-Zhong PR target/112431 * config/riscv/vector.md: Support highpart overlap for indexed load. 2023-12-01 Richard Biener * tree-vectorizer.h (vect_get_vec_defs): Re-order arguments. * tree-vect-stmts.cc (vect_get_vec_defs): Likewise. (vectorizable_condition): Update caller. (vectorizable_comparison_1): Likewise. (vectorizable_conversion): Specify the vector type to be used for invariant/external defs. * tree-vect-loop.cc (vect_transform_reduction): Update caller. 2023-12-01 Jakub Jelinek PR middle-end/112770 * gimple-lower-bitint.cc (gimple_lower_bitint): When adjusting lhs of middle _BitInt setter which ends bb, insert cast on the fallthru edge rather than after stmt. 2023-12-01 Jakub Jelinek PR middle-end/112771 * gimple-lower-bitint.cc (bitint_large_huge::handle_operand_addr): Use mp = 1 if it is zero. 2023-12-01 Jose E. Marchesi * config/bpf/bpf.cc (bpf_asm_named_section): New function. (TARGET_ASM_NAMED_SECTION): Set to bpf_asm_named_section. 2023-12-01 Di Zhao * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): New tuning option to avoid cross-loop FMA. * config/aarch64/aarch64.cc (aarch64_override_options_internal): Set param_avoid_fma_max_bits according to tuning option. * config/aarch64/tuning_models/ampere1.h (ampere1_tunings): Modify tunings related with FMA. * config/aarch64/tuning_models/ampere1a.h (ampere1a_tunings): Likewise. * config/aarch64/tuning_models/ampere1b.h (ampere1b_tunings): Likewise. 2023-12-01 Richard Sandiford * config/aarch64/aarch64-sve-builtins.h (function_expander::result_mode): New member function. * config/aarch64/aarch64-sve-builtins-base.cc (svld234_impl::expand): Use it. * config/aarch64/aarch64-sve-builtins.cc (function_expander::get_reg_target): Likewise. 2023-12-01 Jakub Jelinek * gimple-lower-bitint.cc (range_to_prec): Don't return -1 for signed types. (bitint_large_huge::lower_addsub_overflow): Fix up computation of prec2. (bitint_large_huge::lower_mul_overflow): Likewise. 2023-12-01 Jakub Jelinek * gimple-lower-bitint.cc (bitint_large_huge::finish_arith_overflow): When replacing use_stmt which is gsi_stmt (m_gsi), update m_gsi to the new statement. 2023-12-01 Jakub Jelinek PR middle-end/112750 * gimple-lower-bitint.cc (bitint_large_huge::lower_addsub_overflow): Use NE_EXPR rather than EQ_EXPR for g2 if !single_comparison and adjust probabilities. 2023-12-01 Xi Ruoyao * doc/install.texi: Deem srcdir == objdir broken, but objdir as a subdirectory of srcdir fine. 2023-12-01 Juergen Christ PR target/112753 * config/s390/s390.cc (s390_md_asm_adjust): Return after dealing with the outputs, if no further processing of long doubles is required. 2023-12-01 Jakub Jelinek PR target/112725 * config/s390/s390.cc (s390_invalid_arg_for_unprototyped_fn): Return NULL for __builtin_classify_type calls with vector arguments. 2023-12-01 Florian Weimer * doc/invoke.texi (Warning Options): Document -Wdeclaration-missing-parameter-type. 2023-12-01 Florian Weimer * doc/invoke.texi (Warning Options): Document changes. 2023-12-01 Florian Weimer * doc/invoke.texi (Warning Options): Document that -Wreturn-mismatch is a permerror in C99 and later. 2023-12-01 Florian Weimer PR c/91093 PR c/96284 * doc/invoke.texi (Warning Options): Document changes. 2023-12-01 Florian Weimer * doc/invoke.texi (Warning Options): Document changes. 2023-12-01 Florian Weimer * doc/invoke.texi (Warning Options): Document changes. 2023-12-01 Juzhe-Zhong PR target/112776 * config/riscv/riscv-vsetvl.cc (pre_vsetvl::pre_global_vsetvl_info): Fix ratio. 2023-11-30 Wilco Dijkstra PR target/111404 * config/aarch64/aarch64.cc (aarch64_split_compare_and_swap): For 128-bit store the loaded value and loop if needed. 2023-11-30 Wilco Dijkstra PR target/103100 * config/aarch64/aarch64.md (cpymemdi): Remove pattern condition. (setmemdi): Likewise. * config/aarch64/aarch64.cc (aarch64_expand_cpymem): Support strict-align. Cleanup condition for using MOPS. (aarch64_expand_setmem): Likewise. 2023-11-30 Richard Biener PR tree-optimization/112767 * tree-scalar-evolution.cc (final_value_replacement_loop): Propagate constants to immediate uses immediately. 2023-11-30 Richard Biener PR tree-optimization/112766 * gimple-predicate-analysis.cc (find_var_cmp_const): Support continuing the iteration and report every candidate. (uninit_analysis::overlap): Iterate over all flag var candidates. 2023-11-30 Juzhe-Zhong PR target/112431 * config/riscv/vector.md: Add widening overlap of vf2/vf4. 2023-11-30 Juzhe-Zhong PR target/112431 * config/riscv/vector.md: Remove earlyclobber for wx/wf instructions. 2023-11-30 Jakub Jelinek PR middle-end/112733 * wide-int.cc (wi::mul_internal): Don't allocate twice as much space for u, v and r as needed. (divmod_internal_2): Change return type from void to int, for n == 1 return 1, otherwise before writing b_dividend into b_remainder set n to MIN (n, m) and at the end return it. (wi::divmod_internal): Don't allocate 4 times as much space for b_quotient, b_remainder, b_dividend and b_divisor. Set n to result of divmod_internal_2. (wide_int_cc_tests): Add test for unsigned widest_int wi::multiple_of_p of 1 and -128. 2023-11-30 liuhongt * config/i386/sse.md (sdot_prodv64qi): New expander. (sseunpackmodelower): New mode attr. (sdot_prod): Emulate sdot_prodv*qi with sodt_prov*hi when TARGET_VNNIINT8 is not available. 2023-11-30 liuhongt * config/i386/sse.md: (reduc_plus_scal_): Use vec_extract_lo instead of subreg. (reduc__scal_): Ditto. (reduc__scal_): Ditto. (reduc__scal_): Ditto. (reduc__scal_): Ditto. 2023-11-30 Juzhe-Zhong PR target/112431 * config/riscv/vector.md: Add widenning overlap. 2023-11-30 Juzhe-Zhong * config/riscv/constraints.md (TARGET_VECTOR ? V_REGS : NO_REGS): Fix constraint. * config/riscv/riscv.md (no,W21,W42,W84,W41,W81,W82): Rename vconstraint into group_overlap. (no,yes): Ditto. (none,W21,W42,W84,W43,W86,W87): Ditto. * config/riscv/vector.md: Ditto. 2023-11-30 Juzhe-Zhong * config/riscv/vector.md: Support highpart overlap for vext.vf2 2023-11-29 Philipp Tomsich * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add ampere-1b * config/aarch64/aarch64-cost-tables.h: Add ampere1b_extra_costs * config/aarch64/aarch64-tune.md: Regenerate * config/aarch64/aarch64.cc: Include ampere1b tuning model * doc/invoke.texi: Document -mcpu=ampere1b * config/aarch64/tuning_models/ampere1b.h: New file. 2023-11-29 David Faust * config/bpf/bpf.h (ASM_COMMENT_START): Change from ';' to '#'. 2023-11-29 Jakub Jelinek PR target/112725 * config/rs6000/rs6000.cc (invalid_arg_for_unprototyped_fn): Return NULL for __builtin_classify_type calls with vector arguments. 2023-11-29 Andrew MacLeod PR tree-optimization/111922 * ipa-cp.cc (ipa_vr_operation_and_type_effects): Check the operands are valid before calling fold_range. 2023-11-29 Andrew MacLeod * range-op-mixed.h (operator_equal::operand_check_p): New. (operator_not_equal::operand_check_p): New. (operator_lt::operand_check_p): New. (operator_le::operand_check_p): New. (operator_gt::operand_check_p): New. (operator_ge::operand_check_p): New. (operator_plus::operand_check_p): New. (operator_abs::operand_check_p): New. (operator_minus::operand_check_p): New. (operator_negate::operand_check_p): New. (operator_mult::operand_check_p): New. (operator_bitwise_not::operand_check_p): New. (operator_bitwise_xor::operand_check_p): New. (operator_bitwise_and::operand_check_p): New. (operator_bitwise_or::operand_check_p): New. (operator_min::operand_check_p): New. (operator_max::operand_check_p): New. * range-op.cc (range_op_handler::fold_range): Check operand parameter types. (range_op_handler::op1_range): Ditto. (range_op_handler::op2_range): Ditto. (range_op_handler::operand_check_p): New. (range_operator::operand_check_p): New. (operator_lshift::operand_check_p): New. (operator_rshift::operand_check_p): New. (operator_logical_and::operand_check_p): New. (operator_logical_or::operand_check_p): New. (operator_logical_not::operand_check_p): New. * range-op.h (range_operator::operand_check_p): New. (range_op_handler::operand_check_p): New. 2023-11-29 Martin Jambor PR tree-optimization/112711 PR tree-optimization/112721 * tree-sra.cc (build_access_from_call_arg): New parameter CAN_BE_RETURNED, disqualify any candidate passed by reference if it is true. Adjust leading comment. (scan_function): Pass appropriate value to CAN_BE_RETURNED of build_access_from_call_arg. 2023-11-29 Thomas Schwinge * doc/sourcebuild.texi (Final Actions): Document 'only_for_offload_target' wrapper. 2023-11-29 Rainer Orth PR testsuite/112729 * doc/sourcebuild.texi (Effective-Target Keywords, Environment attributes): Document cfi. 2023-11-29 Richard Biener PR middle-end/110237 * internal-fn.cc (expand_partial_load_optab_fn): Clear MEM_EXPR and MEM_OFFSET. (expand_partial_store_optab_fn): Likewise. 2023-11-29 Jakub Jelinek PR middle-end/112733 * fold-const.cc (multiple_of_p): Pass SIGNED rather than UNSIGNED for wi::multiple_of_p on widest_int arguments. 2023-11-29 Juzhe-Zhong kito-cheng kito-cheng PR target/112431 * config/riscv/constraints.md (TARGET_VECTOR ? V_REGS : NO_REGS): New register filters. * config/riscv/riscv.md (no,W21,W42,W84,W41,W81,W82): Ditto. (no,yes): Ditto. * config/riscv/vector.md: Support highpart register overlap for vwcvt. 2023-11-29 xuli * config/riscv/riscv.cc (riscv_option_override): Eliminate warning. 2023-11-29 Jakub Jelinek PR bootstrap/111601 * fold-mem-offsets.cc (get_uses): Ignore DEBUG_INSN uses. Otherwise, punt if use is in a different basic block from INSN or appears before INSN in the same basic block. Formatting fixes. (get_single_def_in_bb): Formatting fixes. (fold_offsets_1, pass_fold_mem_offsets::execute): Comment formatting fixes. 2023-11-29 Xi Ruoyao * config/loongarch/simd.md (LSX_SCALAR_FRINT): New int iterator. (VLSX_FOR_FMODE): New mode attribute. (2): New expander, expanding to vreplvei.{w/d} + frint{rp/rz/rm/rne}.{s.d}. 2023-11-29 Xi Ruoyao * config/loongarch/loongarch.md (lrint_allow_inexact): Remove. (2): Check if == UNSPEC_FTINT instead of . 2023-11-29 Xi Ruoyao * config/loongarch/lsx.md (bitimm): Move to ... (UNSPEC_LSX_VROTR): Remove. (lsx_vrotr_): Remove. (lsx_vrotri_): Remove. * config/loongarch/lasx.md (UNSPEC_LASX_XVROTR): Remove. (lsx_vrotr_): Remove. (lsx_vrotri_): Remove. * config/loongarch/simd.md (bitimm): ... here. Expand it to cover LASX modes. (vrotr3): New define_insn. (vrotri3): New define_insn. * config/loongarch/loongarch-builtins.cc: (CODE_FOR_lsx_vrotr_b): Use standard pattern name. (CODE_FOR_lsx_vrotr_h): Likewise. (CODE_FOR_lsx_vrotr_w): Likewise. (CODE_FOR_lsx_vrotr_d): Likewise. (CODE_FOR_lasx_xvrotr_b): Likewise. (CODE_FOR_lasx_xvrotr_h): Likewise. (CODE_FOR_lasx_xvrotr_w): Likewise. (CODE_FOR_lasx_xvrotr_d): Likewise. (CODE_FOR_lsx_vrotri_b): Define to standard pattern name. (CODE_FOR_lsx_vrotri_h): Likewise. (CODE_FOR_lsx_vrotri_w): Likewise. (CODE_FOR_lsx_vrotri_d): Likewise. (CODE_FOR_lasx_xvrotri_b): Likewise. (CODE_FOR_lasx_xvrotri_h): Likewise. (CODE_FOR_lasx_xvrotri_w): Likewise. (CODE_FOR_lasx_xvrotri_d): Likewise. 2023-11-29 Xi Ruoyao * config/loongarch/simd.md (muh): New code attribute mapping any_extend to smul_highpart or umul_highpart. (mul3_highpart): New define_insn. * config/loongarch/lsx.md (UNSPEC_LSX_VMUH_S): Remove. (UNSPEC_LSX_VMUH_U): Remove. (lsx_vmuh_s_): Remove. (lsx_vmuh_u_): Remove. * config/loongarch/lasx.md (UNSPEC_LASX_XVMUH_S): Remove. (UNSPEC_LASX_XVMUH_U): Remove. (lasx_xvmuh_s_): Remove. (lasx_xvmuh_u_): Remove. * config/loongarch/loongarch-builtins.cc (CODE_FOR_lsx_vmuh_b): Redefine to standard pattern name. (CODE_FOR_lsx_vmuh_h): Likewise. (CODE_FOR_lsx_vmuh_w): Likewise. (CODE_FOR_lsx_vmuh_d): Likewise. (CODE_FOR_lsx_vmuh_bu): Likewise. (CODE_FOR_lsx_vmuh_hu): Likewise. (CODE_FOR_lsx_vmuh_wu): Likewise. (CODE_FOR_lsx_vmuh_du): Likewise. (CODE_FOR_lasx_xvmuh_b): Likewise. (CODE_FOR_lasx_xvmuh_h): Likewise. (CODE_FOR_lasx_xvmuh_w): Likewise. (CODE_FOR_lasx_xvmuh_d): Likewise. (CODE_FOR_lasx_xvmuh_bu): Likewise. (CODE_FOR_lasx_xvmuh_hu): Likewise. (CODE_FOR_lasx_xvmuh_wu): Likewise. (CODE_FOR_lasx_xvmuh_du): Likewise. 2023-11-29 Xi Ruoyao PR target/112578 * config/loongarch/lsx.md (UNSPEC_LSX_VFTINT_S, UNSPEC_LSX_VFTINTRNE, UNSPEC_LSX_VFTINTRP, UNSPEC_LSX_VFTINTRM, UNSPEC_LSX_VFRINTRNE_S, UNSPEC_LSX_VFRINTRNE_D, UNSPEC_LSX_VFRINTRZ_S, UNSPEC_LSX_VFRINTRZ_D, UNSPEC_LSX_VFRINTRP_S, UNSPEC_LSX_VFRINTRP_D, UNSPEC_LSX_VFRINTRM_S, UNSPEC_LSX_VFRINTRM_D): Remove. (ILSX, FLSX): Move into ... (VIMODE): Move into ... (FRINT_S, FRINT_D): Remove. (frint_pattern_s, frint_pattern_d, frint_suffix): Remove. (lsx_vfrint_, lsx_vftint_s__, lsx_vftintrne_w_s, lsx_vftintrne_l_d, lsx_vftintrp_w_s, lsx_vftintrp_l_d, lsx_vftintrm_w_s, lsx_vftintrm_l_d, lsx_vfrintrne_s, lsx_vfrintrne_d, lsx_vfrintrz_s, lsx_vfrintrz_d, lsx_vfrintrp_s, lsx_vfrintrp_d, lsx_vfrintrm_s, lsx_vfrintrm_d, v4sf2, v2df2, round2, fix_trunc2): Remove. * config/loongarch/lasx.md: Likewise. * config/loongarch/simd.md: New file. (ILSX, ILASX, FLSX, FLASX, VIMODE): ... here. (IVEC, FVEC): New mode iterators. (VIMODE): ... here. Extend it to work for all LSX/LASX vector modes. (x, wu, simd_isa, WVEC, vimode, simdfmt, simdifmt_for_f, elebits): New mode attributes. (UNSPEC_SIMD_FRINTRP, UNSPEC_SIMD_FRINTRZ, UNSPEC_SIMD_FRINT, UNSPEC_SIMD_FRINTRM, UNSPEC_SIMD_FRINTRNE): New unspecs. (SIMD_FRINT): New int iterator. (simd_frint_rounding, simd_frint_pattern): New int attributes. (_vfrint_): New define_insn template for frint instructions. (_vftint__): Likewise, but for ftint instructions. (2): New define_expand with flag_fp_int_builtin_inexact checked. (l2): Likewise. (ftrunc2): New define_expand. It does not require flag_fp_int_builtin_inexact. (fix_trunc2): New define_insn_and_split. It does not require flag_fp_int_builtin_inexact. (include): Add lsx.md and lasx.md. * config/loongarch/loongarch.md (include): Include simd.md, instead of including lsx.md and lasx.md directly. * config/loongarch/loongarch-builtins.cc (CODE_FOR_lsx_vftint_w_s, CODE_FOR_lsx_vftint_l_d, CODE_FOR_lasx_xvftint_w_s, CODE_FOR_lasx_xvftint_l_d): Remove. 2023-11-29 Alexandre Oliva * doc/extend.texi (hardbool): New type attribute. * doc/invoke.texi (-ftrivial-auto-var-init): Document representation vs values. 2023-11-29 Alexandre Oliva * expr.cc (emit_block_move_hints): Take ctz of len. Obey -finline-stringops. Use oriented or sized loop. (emit_block_move): Take ctz of len, and pass it on. (emit_block_move_via_sized_loop): New. (emit_block_move_via_oriented_loop): New. (emit_block_move_via_loop): Take incr. Move an incr-sized block per iteration. (emit_block_cmp_via_cmpmem): Take ctz of len. Obey -finline-stringops. (emit_block_cmp_via_loop): New. * expr.h (emit_block_move): Add ctz of len defaulting to zero. (emit_block_move_hints): Likewise. (emit_block_cmp_hints): Likewise. * builtins.cc (expand_builtin_memory_copy_args): Pass ctz of len to emit_block_move_hints. (try_store_by_multiple_pieces): Support starting with a loop. (expand_builtin_memcmp): Pass ctz of len to emit_block_cmp_hints. (expand_builtin): Allow inline expansion of memset, memcpy, memmove and memcmp if requested. * common.opt (finline-stringops): New. (ilsop_fn): New enum. * flag-types.h (enum ilsop_fn): New. * doc/invoke.texi (-finline-stringops): Add. 2023-11-29 Pan Li PR target/112743 * config/riscv/riscv-string.cc (expand_block_move): Add precondition check for exact_div. 2023-11-28 Roger Sayle * config/arc/arc.md: Make output template whitespace consistent. 2023-11-28 Jose E. Marchesi * varasm.cc (assemble_external_libcall): Refer in assert only ifdef ASM_OUTPUT_EXTERNAL. 2023-11-28 Andrew Pinski PR tree-optimization/112738 * match.pd (`(nop_convert)-(convert)a`): Reject when the outer type is boolean. 2023-11-28 Richard Biener PR middle-end/112732 * tree.cc (build_opaque_vector_type): Reset TYPE_ALIAS_SET of the newly built type. 2023-11-28 Uros Bizjak PR target/112494 * config/i386/i386.md (cmpstrnqi_1): Set FLAGS_REG to its previous value when operand 2 equals zero. (*cmpstrnqi_1): Ditto. (*cmpstrnqi_1 peephole2): Ditto. 2023-11-28 Cupertino Miranda Revert: 2023-11-28 Cupertino Miranda * config/bpf/bpf.cc (bpf_output_call): Report error in case the function call is for a builtin. (bpf_external_libcall): Added target hook to detect and report error when other external calls that are not builtins. 2023-11-28 Jose E. Marchesi PR target/109253 * varasm.cc (pending_libcall_symbols): New variable. (process_pending_assemble_externals): Process pending_libcall_symbols. (assemble_external_libcall): Defer emitting external libcall symbols to process_pending_assemble_externals. 2023-11-28 Cupertino Miranda * btfout.cc (btf_calc_num_vbytes): Fixed logic for enum64. (btf_asm_enum_const): Corrected logic for enum64 and smaller than 4 bytes values. 2023-11-28 Cupertino Miranda * config/bpf/bpf.cc (bpf_output_call): Report error in case the function call is for a builtin. (bpf_external_libcall): Added target hook to detect and report error when other external calls that are not builtins. 2023-11-28 Cupertino Miranda * config/bpf/bpf.cc (bpf_use_by_pieces_infrastructure_p): Added function to bypass default behaviour. * config/bpf/bpf.h (COMPARE_MAX_PIECES): Defined to 1024 bytes. 2023-11-28 Cupertino Miranda * config/bpf/core-builtins.cc (core_mark_as_access_index): Corrected check. 2023-11-28 Cupertino Miranda * config/bpf/core-builtins.cc (bpf_resolve_overloaded_core_builtin): Removed call. (execute_lower_bpf_core): Added all to remove_parser_plugin. 2023-11-28 Juzhe-Zhong PR target/112694 * config/riscv/riscv-v.cc (expand_vec_perm_const): Disallow poly size (1, 1) VLA SLP. 2023-11-28 Jakub Jelinek PR tree-optimization/112719 * match.pd (parity(X)^parity(Y) -> parity(X^Y)): Handle case of mismatched types. * gimple-match-exports.cc (build_call_internal): Add special-case for bit query ifns on large/huge BITINT_TYPE before bitint lowering. 2023-11-28 Jakub Jelinek PR tree-optimization/112719 * match.pd (popcount (X) + popcount (Y) -> POPCOUNT (X | Y)): Deal with argument types with different precisions. 2023-11-28 David Malcolm PR analyzer/109077 * Makefile.in (PLUGIN_HEADERS): Add analyzer headers. (install-plugin): Keep the directory structure for files in "analyzer". 2023-11-28 Juzhe-Zhong PR target/112713 * config/riscv/riscv-vsetvl.cc (pre_vsetvl::compute_lcm_local_properties): Fix regression. 2023-11-28 David Malcolm * diagnostic-show-locus.cc (layout::maybe_add_location_range): Don't print annotation lines for ranges when there's no column info. (selftest::test_one_liner_no_column): New. (selftest::test_diagnostic_show_locus_one_liner): Call it. 2023-11-28 David Malcolm * diagnostic.cc (diagnostic_get_location_text): Convert to... (diagnostic_context::get_location_text): ...this, and convert return type from char * to label_text. (diagnostic_build_prefix): Update for above change. (default_diagnostic_start_span_fn): Likewise. (selftest::assert_location_text): Likewise. * diagnostic.h (diagnostic_context::get_location_text): New decl. 2023-11-27 Andrew Pinski * config/aarch64/aarch64.cc (aarch64_if_then_else_costs): Handle csinv/csinc case of 1/-1. 2023-11-27 Prathamesh Kulkarni Richard Sandiford PR middle-end/111754 * fold-const.cc (fold_vec_perm_cst): Set result's encoding to sel's encoding, and set res_nelts_per_pattern to 2 if sel contains stepped sequence but input vectors do not. (test_nunits_min_2): New test Case 8. (test_nunits_min_4): New tests Case 8 and Case 9. 2023-11-27 Szabolcs Nagy * config/aarch64/aarch64.cc (aarch64_needs_frame_chain): Do not force frame chain for eh_return. 2023-11-27 Szabolcs Nagy * config/aarch64/aarch64-protos.h (aarch64_eh_return_handler_rtx): Remove. * config/aarch64/aarch64.cc (aarch64_return_address_signing_enabled): Sign return address even in functions with eh_return. (aarch64_expand_epilogue): Conditionally return with br or ret. (aarch64_eh_return_handler_rtx): Remove. * config/aarch64/aarch64.h (EH_RETURN_TAKEN_RTX): Define. (EH_RETURN_STACKADJ_RTX): Change to R5. (EH_RETURN_HANDLER_RTX): Change to R6. * df-scan.cc: Handle EH_RETURN_TAKEN_RTX. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Document EH_RETURN_TAKEN_RTX. * except.cc (expand_eh_return): Handle EH_RETURN_TAKEN_RTX. 2023-11-27 Thomas Schwinge * config.gcc (extra_gcc_objs): Don't set. * config/gcn/driver-gcn.cc: Remove. * config/gcn/gcn-hsa.h (ASM_SPEC, EXTRA_SPEC_FUNCTIONS): Remove 'last_arg' spec function. * config/gcn/t-gcn-hsa (driver-gcn.o): Remove. 2023-11-27 Thomas Schwinge PR target/112669 * config/gcn/gcn.opt (march=, mtune=): Tag as 'Negative' of themselves. 2023-11-27 Samuel Thibault * config/i386/gnu.h: Use PIE_SPEC, add static-pie case. * config/i386/gnu64.h: Use PIE_SPEC, add static-pie case. 2023-11-27 Samuel Thibault * config/i386/t-gnu64: New file. * config.gcc [x86_64-*-gnu*]: Add i386/t-gnu64 to tmake_file. 2023-11-27 Richard Sandiford PR target/106326 * config/aarch64/aarch64-sve-builtins.h (is_ptrue): Declare. * config/aarch64/aarch64-sve-builtins.cc (is_ptrue): New function. (gimple_folder::redirect_pred_x): Likewise. (gimple_folder::fold): Use it. 2023-11-27 Richard Sandiford * config/aarch64/aarch64-sve-builtins.h (vector_cst_all_same): Declare. * config/aarch64/aarch64-sve-builtins.cc (vector_cst_all_same): New function, a generalized replacement of... * config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::vect_all_same): ...this. (svlast_impl::fold): Update accordingly. 2023-11-27 Richard Biener PR tree-optimization/112653 * gimple-ssa.h (gimple_df): Add escaped_return solution. * tree-ssa.cc (init_tree_ssa): Reset it. (delete_tree_ssa): Likewise. * tree-ssa-structalias.cc (escaped_return_id): New. (find_func_aliases): Handle non-IPA return stmts by adding to ESCAPED_RETURN. (set_uids_in_ptset): Adjust HEAP escaping to also cover escapes through return. (init_base_vars): Initialize ESCAPED_RETURN. (compute_points_to_sets): Replace ESCAPED post-processing with recording the ESCAPED_RETURN solution. * tree-ssa-alias.cc (ref_may_alias_global_p_1): Check the ESCAPED_RETUNR solution. (dump_alias_info): Dump it. * cfgexpand.cc (update_alias_info_with_stack_vars): Update it. * ipa-icf.cc (sem_item_optimizer::fixup_points_to_sets): Likewise. * tree-inline.cc (expand_call_inline): Reset it. * tree-parloops.cc (parallelize_loops): Likewise. * tree-sra.cc (maybe_add_sra_candidate): Check it. 2023-11-27 Richard Biener Richard Sandiford PR tree-optimization/112661 * tree-vect-slp.cc (vect_get_and_check_slp_defs): Defer duplicate-and- interleave test to... (vect_build_slp_tree_2): ...here, once we have all the operands. Skip the test for uniform vectors. (vect_create_constant_vectors): Detect uniform vectors. Avoid redundant conversions in that case. Use gimple_build_vector_from_val to build the vector. 2023-11-27 Richard Sandiford * attribs.cc (excl_hash_traits): Delete. (test_attribute_exclusions): Use pair_hash and nofree_string_hash instead. 2023-11-27 Andrew Stubbs * config/gcn/gcn.cc (gcn_vectorize_vec_perm_const): Disallow TImode. 2023-11-27 Stefan Schulze Frielinghaus * config/s390/s390-builtin-types.def (BT_FN_UV8HI_UV8HI_UINT): Add missing builtin type. 2023-11-27 Stefan Schulze Frielinghaus * config/s390/s390-builtin-types.def: Remove types. * config/s390/s390-builtins.def (O_U64): Remove 64-bit literal support. Don't restrict s390_vec_rli and s390_verll[bhfg] to immediates. * config/s390/s390.cc (s390_const_operand_ok): Remove 64-bit literal support. 2023-11-27 Alex Coplan Iain Sandoe PR c++/60512 * doc/cpp.texi: Document __has_{feature,extension}. 2023-11-27 Richard Biener PR tree-optimization/112706 * match.pd (ptr + o ==/!=/- ptr + o'): New patterns. 2023-11-27 Stefan Schulze Frielinghaus * config/s390/s390-builtin-types.def: Add/remove types. * config/s390/s390-builtins.def (s390_vclfnhs,s390_vclfnls,s390_vcrnfs,s390_vcfn,s390_vcnf): Replace type V8HI with UV8HI. 2023-11-27 Stefan Schulze Frielinghaus * config/s390/s390-builtins.def (s390_vcefb,s390_vcdgb,s390_vcelfb,s390_vcdlgb,s390_vcfeb,s390_vcgdb, s390_vclfeb,s390_vclgdb): Remove flags for non-existing operands 2 and 3. 2023-11-27 Stefan Schulze Frielinghaus * config/s390/s390.md (*cmphi_ccu): For immediate operand 1 make use of constraint n instead of D and chop of high bits in the output template. 2023-11-27 Jakub Jelinek PR target/112300 * config.gcc (mips*-sde-elf*): Append to tm_defines rather than overwriting them. 2023-11-27 Juzhe-Zhong * config/riscv/autovec.md (mask_len_gather_load): Remove gather_scatter_valid_offset_mode_p. (mask_len_gather_load): Ditto. (mask_len_scatter_store): Ditto. (mask_len_scatter_store): Ditto. * config/riscv/predicates.md (const_1_or_8_operand): New predicate. (vector_gs_scale_operand_64): Remove. * config/riscv/riscv-protos.h (gather_scatter_valid_offset_mode_p): Remove. * config/riscv/riscv-v.cc (expand_gather_scatter): Refine code. (gather_scatter_valid_offset_mode_p): Remove. * config/riscv/vector-iterators.md: Fix iterator bugs. 2023-11-27 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_version_table): Set version to ratified 2.0. (riscv_subset_list::parse_std_ext): Allow RV64E. * config.gcc: Parse base ISA 'rv64e' and ABI 'lp64e'. * config/riscv/arch-canonicalize: Parse base ISA 'rv64e'. * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Define different macro per XLEN. Add handling for ABI_LP64E. * config/riscv/riscv-d.cc (riscv_d_handle_target_float_abi): Add handling for ABI_LP64E. * config/riscv/riscv-opts.h (enum riscv_abi_type): Add ABI_LP64E. * config/riscv/riscv.cc (riscv_option_override): Enhance error handling to support RV64E and LP64E. (riscv_conditional_register_usage): Change "RV32E" in a comment to "RV32E/RV64E". * config/riscv/riscv.h (UNITS_PER_FP_ARG): Add handling for ABI_LP64E. (STACK_BOUNDARY): Ditto. (ABI_STACK_BOUNDARY): Ditto. (MAX_ARGS_IN_REGISTERS): Ditto. (ABI_SPEC): Add support for "lp64e". * config/riscv/riscv.opt: Parse -mabi=lp64e as ABI_LP64E. * doc/invoke.texi: Add documentation of the LP64E ABI. 2023-11-27 Jose E. Marchesi * config/bpf/bpf-helpers.h: Remove. * config.gcc: Adapt accordingly. 2023-11-27 Guo Jie * config/loongarch/loongarch.cc (loongarch_split_plus_constant): avoid left shift of negative value -0x8000. 2023-11-27 Guo Jie * config/loongarch/loongarch.cc (enum loongarch_load_imm_method): Add new method. (loongarch_build_integer): Add relevant implementations for new method. (loongarch_move_integer): Ditto. 2023-11-26 Alexander Monakov * sort.cc: Use 'sorting networks' in comments. 2023-11-26 Juzhe-Zhong PR target/112599 * config/riscv/riscv-avlprop.cc (avl_can_be_propagated_p): Add slidedown. (vlmax_ta_p): Ditto. (pass_avlprop::get_vlmax_ta_preferred_avl): Ditto. 2023-11-26 Juzhe-Zhong * config/riscv/riscv-avlprop.cc (alv_can_be_propagated_p): Fix typo. (avl_can_be_propagated_p): Ditto. (vlmax_ta_p): Ditto. 2023-11-25 Gerald Pfeifer PR other/69374 * doc/install.texi (Downloading the source): Sort the list of front ends and add D, Go, and Modula-2. 2023-11-25 Gerald Pfeifer PR target/69374 * doc/install.texi (Specific) <*-*-freebsd*>: Remove older contents referencing GCC 4.x. 2023-11-25 Gerald Pfeifer * doc/standards.texi (Standards): Update ISO C++ reference. 2023-11-25 Jakub Jelinek PR target/111408 * config/i386/i386.md (*jcc_bt_mask, *jcc_bt_mask_1): Add (const_int 0) as expected second operand of bt_comparison_operator. 2023-11-25 Andrew Pinski Jakub Jelinek PR target/109977 * config/aarch64/aarch64-simd.md (aarch64_simd_stp): Use rather than % for alternative with r constraint on input operand. 2023-11-24 Tobias Burnus * doc/install.texi (amdgcn-*-amdhsa): Fix URL to ROCm; change 'in the future' to 'in LLVM 18'. 2023-11-24 John David Anglin * config/pa/pa.cc (pa_emit_move_sequence): Use INT14_OK_STRICT in a couple of places. 2023-11-24 Martin Jambor PR middle-end/109849 * tree-sra.cc (passed_by_ref_in_call): New. (sra_initialize): Allocate passed_by_ref_in_call. (sra_deinitialize): Free passed_by_ref_in_call. (create_access): Add decl pool candidates only if they are not already candidates. (build_access_from_expr_1): Bail out on ADDR_EXPRs. (build_access_from_call_arg): New function. (asm_visit_addr): Rename to scan_visit_addr, change the disqualification dump message. (scan_function): Check taken addresses for all non-call statements, including phi nodes. Process all call arguments, including the static chain, build_access_from_call_arg. (maybe_add_sra_candidate): Relax need_to_live_in_memory check to allow non-escaped local variables. (sort_and_splice_var_accesses): Disallow smaller-than-precision replacements for aggregates passed by reference to functions. (sra_modify_expr): Use a separate stmt iterator for adding satements before the processed statement and after it. (enum out_edge_check): New type. (abnormal_edge_after_stmt_p): New function. (sra_modify_call_arg): New function. (sra_modify_assign): Adjust calls to sra_modify_expr. (sra_modify_function_body): Likewise, use sra_modify_call_arg to process call arguments, including the static chain. 2023-11-24 Uros Bizjak PR target/112686 * config/i386/i386.cc (ix86_expand_split_stack_prologue): Load function address to a register for ix86_cmodel == CM_LARGE. 2023-11-24 Tobias Burnus * doc/invoke.texi (-Wopenmp): Add. * gimplify.cc (gimplify_omp_for): Add OPT_Wopenmp to warning_at. * omp-expand.cc (expand_omp_ordered_sink): Likewise. * omp-general.cc (omp_check_context_selector): Likewise. * omp-low.cc (scan_omp_for, check_omp_nesting_restrictions, lower_omp_ordered_clauses): Likewise. * omp-simd-clone.cc (simd_clone_clauses_extract): Likewise. 2023-11-24 Juzhe-Zhong PR target/112694 * config/riscv/riscv-v.cc (preferred_simd_mode): Allow poly_int (1,1) vectors. 2023-11-24 Alexander Monakov * config.in: Regenerate. * configure: Regenerate. * configure.ac: Delete manual checks for old Valgrind headers. * system.h (VALGRIND_MAKE_MEM_NOACCESS): Delete. (VALGRIND_MAKE_MEM_DEFINED): Delete. (VALGRIND_MAKE_MEM_UNDEFINED): Delete. (VALGRIND_MALLOCLIKE_BLOCK): Delete. (VALGRIND_FREELIKE_BLOCK): Delete. 2023-11-24 Jakub Jelinek PR target/112681 * config/i386/i386-expand.cc (ix86_expand_branch): Use ix86_expand_vector_logical_operator to expand vector XOR rather than gen_rtx_SET on gen_rtx_XOR. 2023-11-24 Alex Coplan * rtl-ssa/access-utils.h (filter_accesses): New. (remove_regno_access): New. (check_remove_regno_access): New. * rtl-ssa/accesses.cc (rtl_ssa::remove_note_accesses_base): Use new filter_accesses helper. 2023-11-24 Alex Coplan * rtl-ssa/accesses.cc (function_info::create_set): New. * rtl-ssa/accesses.h (access_info::is_temporary): New. * rtl-ssa/changes.cc (move_insn): Handle new (temporary) insns. (function_info::finalize_new_accesses): Handle new/temporary user-created accesses. (function_info::apply_changes_to_insn): Ensure m_is_temp flag on new insns gets cleared. (function_info::change_insns): Handle new/temporary insns. (function_info::create_insn): New. * rtl-ssa/changes.h (class insn_change): Make function_info a friend class. * rtl-ssa/functions.h (function_info): Declare new entry points: create_set, create_insn. Declare new change_alloc helper. * rtl-ssa/insns.cc (insn_info::print_full): Identify temporary insns in dump. * rtl-ssa/insns.h (insn_info): Add new m_is_temp flag and accompanying is_temporary accessor. * rtl-ssa/internals.inl (insn_info::insn_info): Initialize m_is_temp to false. * rtl-ssa/member-fns.inl (function_info::change_alloc): New. * rtl-ssa/movement.h (restrict_movement_for_defs_ignoring): Add handling for temporary defs. 2023-11-24 Jakub Jelinek PR tree-optimization/112673 * match.pd (bit_field_ref (vce @0) -> bit_field_ref @0): Only simplify if either @0 doesn't have scalar integral type or if it has mode precision. 2023-11-24 Jakub Jelinek PR middle-end/112679 * gimple-lower-bitint.cc (gimple_lower_bitint): Also stop first loop on floating point SSA_NAME set in FLOAT_EXPR assignment from BITINT_TYPE INTEGER_CST. Set has_large_huge for those if that BITINT_TYPE is large or huge. Set kind to such FLOAT_EXPR assignment rhs1 BITINT_TYPE's kind. 2023-11-24 Richard Biener PR tree-optimization/112677 * tree-vect-loop.cc (vectorizable_reduction): Use alloca to allocate vectype_op. 2023-11-24 Haochen Gui * expr.cc (by_pieces_ninsns): Include by pieces compare when do the adjustment for overlap operations. Replace mov_optab checks with gcc assertion. 2023-11-24 Jakub Jelinek PR middle-end/112668 * gimple-iterator.h (gsi_end, gsi_end_bb): New inline functions. * gimple-lower-bitint.cc (bitint_large_huge::handle_cast): After temporarily adding statements after m_init_gsi, update m_init_gsi such that later additions after it will be after the added statements. (bitint_large_huge::handle_load): Likewise. When splitting gsi_bb (m_init_gsi) basic block, update m_preheader_bb if needed and update saved m_gsi as well if needed. (bitint_large_huge::lower_mergeable_stmt, bitint_large_huge::lower_comparison_stmt, bitint_large_huge::lower_mul_overflow, bitint_large_huge::lower_bit_query): Use gsi_end_bb. 2023-11-24 Jakub Jelinek PR c++/112619 * tree.cc (try_catch_may_fallthru): If second operand of TRY_CATCH_EXPR is not a STATEMENT_LIST, handle it as if it was a STATEMENT_LIST containing a single statement. 2023-11-24 Richard Biener PR tree-optimization/112344 * tree-chrec.cc (chrec_apply): Only use an unsigned add when the overall increment doesn't fit the signed type. 2023-11-24 Juzhe-Zhong PR target/112599 * config/riscv/riscv-v.cc (shuffle_extract_and_slide1up_patterns): New function. (expand_vec_perm_const_1): Add new optimization. 2023-11-24 Juzhe-Zhong * config/riscv/riscv-v.cc (shuffle_bswap_pattern): Disable for NUNIT < 4. 2023-11-24 Haochen Jiang PR target/112643 * config/i386/driver-i386.cc (check_avx10_avx512_features): Renamed to ... (check_avx512_features): this and remove avx10 check. (host_detect_local_cpu): Never append -mno-avx10.1-{256,512} to avoid emitting warnings when building GCC with native arch. * config/i386/i386-builtin.def (BDESC): Add missing AVX512VL for 128/256 bit builtin for AVX512VP2INTERSECT. * config/i386/i386-options.cc (ix86_option_override_internal): Also check whether the AVX512 flags is set when trying to reset. * config/i386/i386.h (PTA_SKYLAKE_AVX512): Add missing PTA_EVEX512. (PTA_ZNVER4): Ditto. 2023-11-23 Georg-Johann Lay PR target/86776 * config/avr/avr.cc (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to speculation_safe_value_not_needed. 2023-11-23 Marek Polacek * common.opt (Whardened, fhardened): New options. * config.in: Regenerate. * config/bpf/bpf.cc: Include "opts.h". (bpf_option_override): If flag_stack_protector_set_by_fhardened_p, do not inform that -fstack-protector does not work. * config/i386/i386-options.cc (ix86_option_override_internal): When -fhardened, maybe enable -fcf-protection=full. * config/linux-protos.h (linux_fortify_source_default_level): Declare. * config/linux.cc (linux_fortify_source_default_level): New. * config/linux.h (TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL): Redefine. * configure: Regenerate. * configure.ac: Check if the linker supports '-z now' and '-z relro'. Check if -fhardened is supported on $target_os. * doc/invoke.texi: Document -fhardened and -Whardened. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_FORTIFY_SOURCE_DEFAULT_LEVEL): Add. * gcc.cc (driver_handle_option): Remember if any link options or -static were specified on the command line. (process_command): When -fhardened, maybe enable -pie and -Wl,-z,relro,-z,now. * opts.cc (flag_stack_protector_set_by_fhardened_p): New global. (finish_options): When -fhardened, enable -ftrivial-auto-var-init=zero and -fstack-protector-strong. (print_help_hardened): New. (print_help): Call it. * opts.h (flag_stack_protector_set_by_fhardened_p): Declare. * target.def (fortify_source_default_level): New target hook. * targhooks.cc (default_fortify_source_default_level): New. * targhooks.h (default_fortify_source_default_level): Declare. * toplev.cc (process_options): When -fhardened, enable -fstack-clash-protection. If flag_stack_protector_set_by_fhardened_p, do not warn that -fstack-protector not supported for this target. Don't enable -fhardened when !HAVE_FHARDENED_SUPPORT. 2023-11-23 Christophe Lyon * config/arm/arm-mve-builtins-functions.h (full_width_access::memory_vector_mode): Add default clause. 2023-11-23 Uros Bizjak PR target/112672 * config/i386/i386.md (parityhi2): Use temporary register in the call to gen_parityhi2_cmp. 2023-11-23 Uros Bizjak PR target/89316 * config/i386/i386.cc (ix86_expand_split_stack_prologue): Obtain scratch regno when flag_force_indirect_call is set. On 64-bit targets, call __morestack_large_model when flag_force_indirect_call is set and on 32-bit targets with -fpic, manually expand PIC sequence to call __morestack. Move the function address to an indirect call scratch register. 2023-11-23 Sebastian Huber PR tree-optimization/112678 * tree-profile.cc (tree_profiling): Do not use atomic operations for -fprofile-update=single. 2023-11-23 Juergen Christ * config/s390/s390-c.cc (s390_cpu_cpp_builtins): Define __GCC_ASM_FLAG_OUTPUTS__. * config/s390/s390.cc (s390_canonicalize_comparison): More UNSPEC_CC_TO_INT cases. (s390_md_asm_adjust): Implement flags output. * config/s390/s390.md (ccstore4): Allow mask operands. * doc/extend.texi: Document flags output. 2023-11-23 Juergen Christ * config/s390/s390.md: Split TImode loads. 2023-11-23 Juergen Christ * config/s390/vector.md: (*vec_extract) Fix. 2023-11-23 Di Zhao * tree-ssa-reassoc.cc (get_reassociation_width): check for loop dependent FMAs. (reassociate_bb): For 3 ops, refine the condition to call swap_ops_for_binary_stmt. 2023-11-23 Juzhe-Zhong * config/riscv/riscv-protos.h (emit_vec_extract): New function. * config/riscv/riscv-v.cc (emit_vec_extract): Ditto. * config/riscv/riscv.cc (riscv_legitimize_move): Refine codes. 2023-11-23 Juzhe-Zhong PR target/112599 PR target/112670 * config/riscv/riscv-avlprop.cc (alv_can_be_propagated_p): New function. (vlmax_ta_p): Disable vrgather AVL propagation. 2023-11-23 Jakub Jelinek PR middle-end/112336 * expr.cc (EXTEND_BITINT): Don't call reduce_to_bit_field_precision if modifier is EXPAND_INITIALIZER. 2023-11-23 Juzhe-Zhong * config/riscv/riscv-v.cc (emit_vlmax_gather_insn): Refine codes. (emit_vlmax_masked_gather_mu_insn): Ditto. (modulo_sel_indices): Ditto. (expand_vec_perm): Ditto. (shuffle_generic_patterns): Ditto. 2023-11-23 Jakub Jelinek * doc/extend.texi (__builtin_stdc_bit_ceil, __builtin_stdc_bit_floor, __builtin_stdc_bit_width, __builtin_stdc_count_ones, __builtin_stdc_count_zeros, __builtin_stdc_first_leading_one, __builtin_stdc_first_leading_zero, __builtin_stdc_first_trailing_one, __builtin_stdc_first_trailing_zero, __builtin_stdc_has_single_bit, __builtin_stdc_leading_ones, __builtin_stdc_leading_zeros, __builtin_stdc_trailing_ones, __builtin_stdc_trailing_zeros): Document. 2023-11-23 Richard Biener PR middle-end/32667 * doc/md.texi (cpymem): Document that exact overlap of source and destination needs to work. * doc/standards.texi (ffreestanding): Mention memcpy is required to handle the exact overlap case. 2023-11-23 Jakub Jelinek PR c++/110348 * doc/invoke.texi (-Wno-c++26-extensions): Document. 2023-11-23 Manolis Tsamis * ifcvt.cc (noce_convert_multiple_sets_1): Remove old code. 2023-11-23 Pan Li PR target/111720 * dse.cc (get_stored_val): Allow vector mode if read size is less than or equal to stored size. 2023-11-23 Costas Argyris * configure.ac: Handle new --enable-win32-utf8-manifest option. * config.host: allow win32 utf8 manifest to be disabled by user. * configure: Regenerate. 2023-11-22 John David Anglin PR target/112592 * config/pa/pa.h (MAX_FIXED_MODE_SIZE): Define. 2023-11-22 John David Anglin PR target/112617 * config/pa/predicates.md (integer_store_memory_operand): Return true for REG+D addresses when reload_in_progress is true. 2023-11-22 Richard Biener PR tree-optimization/112344 * tree-chrec.cc (chrec_apply): Perform the overall increment calculation and increment in an unsigned type. 2023-11-22 Andrew Stubbs * config/gcn/gcn-valu.md (*mov_4reg): Disparage AVGPR use when a reload is required. 2023-11-22 Vladimir N. Makarov PR rtl-optimization/112610 * ira-costs.cc: (find_costs_and_classes): Remove arg. Use ira_dump_file for printing. (print_allocno_costs, print_pseudo_costs): Ditto. (ira_costs): Adjust call of find_costs_and_classes. (ira_set_pseudo_classes): Set up and restore ira_dump_file. 2023-11-22 Juzhe-Zhong PR target/112598 * config/riscv/riscv-v.cc (shuffle_compress_patterns): Fix vcompress bug. 2023-11-22 Tamar Christina * config/aarch64/aarch64-simd.md (aarch64_uaddw__zip, aarch64_usubw__zip): Split into... (aarch64_uaddw_lo_zip, aarch64_uaddw_hi_zip, "aarch64_usubw_lo_zip, "aarch64_usubw_hi_zip): ... This. * config/aarch64/iterators.md (PERM_EXTEND, perm_index): Remove. (perm_hilo): Remove UNSPEC_ZIP1, UNSPEC_ZIP2. 2023-11-22 Christophe Lyon * config/arm/arm-mve-builtins.cc (function_resolver::infer_pointer_type): Remove spurious line. 2023-11-22 Xi Ruoyao * config/loongarch/lsx.md (vec_perm): Make the selector VIMODE. * config/loongarch/loongarch.cc (loongarch_expand_vec_perm): Use the mode of the selector (instead of the shuffled vector) for truncating it. Operate on subregs in the selector mode if the shuffled vector has a different mode (i. e. it's a floating-point vector). 2023-11-22 Hongyu Wang * config/i386/i386.md (push2_di): Adjust operand order for AT&T syntax. (pop2_di): Likewise. (push2p_di): Likewise. (pop2p_di): Likewise. 2023-11-22 Juzhe-Zhong PR target/112598 * config/riscv/riscv-v.cc (emit_vlmax_gather_insn): Adapt the priority. (shuffle_generic_patterns): Fix permutation indice bug. * config/riscv/vector-iterators.md: Fix VEI16 bug. 2023-11-22 liuhongt * config/i386/sse.md (cbranch4): Extend to Vector HI/QImode. 2023-11-22 Maciej W. Rozycki PR target/111815 * config/vax/vax.cc (index_term_p): Only accept the index scaler as the RHS operand to ASHIFT. 2023-11-22 Maciej W. Rozycki * config/riscv/predicates.md (order_operator): Remove predicate. * config/riscv/riscv.cc (riscv_rtx_costs): Update accordingly. * config/riscv/riscv.md (*branch, *movcc) (cstore4): Likewise. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv-protos.h (riscv_expand_float_scc): Add `invert_ptr' parameter. * config/riscv/riscv.cc (riscv_emit_float_compare): Add NE inversion handling. (riscv_expand_float_scc): Pass `invert_ptr' through to `riscv_emit_float_compare'. (riscv_expand_conditional_move): Pass `&invert' to `riscv_expand_float_scc'. * config/riscv/riscv.md (addcc): Likewise. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_emit_float_compare) : Handle separately. : Return operands supplied as is. (riscv_emit_binary): Call `riscv_emit_binary' directly rather than going through a temporary register for word-mode targets. (riscv_expand_conditional_branch): Canonicalize the comparison if not against constant zero. 2023-11-22 Maciej W. Rozycki * config/riscv/predicates.md (ne_operator): New predicate. * config/riscv/riscv.cc (riscv_insn_cost): Handle branches on a floating-point condition. * config/riscv/riscv.md (@cbranch4): Rename expander to... (@cbranch4): ... this. Only expand the RTX via `riscv_expand_conditional_branch' for `!signed_order_operator' operators, otherwise let it through. (*cbranch4, *cbranch4): New insns and splitters. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Don't bail out in floating-point conditions. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_float_scc): Suppress the use of SUBREG if the conditional-set target is word-mode. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.md (addcc): New expander. 2023-11-22 Maciej W. Rozycki * config/riscv/predicates.md (movcc_operand): New predicate. * config/riscv/riscv.cc (riscv_expand_conditional_move): Handle generic targets. * config/riscv/riscv.md (movcc): Likewise. * config/riscv/riscv.opt (mmovcc): New option. * doc/invoke.texi (Option Summary): Document it. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv-protos.h (riscv_emit_unary): New prototype. * config/riscv/riscv.cc (riscv_emit_unary): New function. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Unify conditional-move handling across all the relevant targets. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Also accept constants for T-Head data input operands. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Also accept constants for T-Head comparison operands. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Remove the check for operand 1 being constant 0 in the Ventana/Zicond case for equality comparisons. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Also invert the condition for GEU and LEU. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_insn_cost): New function. (riscv_max_noce_ifcvt_seq_cost): Likewise. (riscv_noce_conversion_profitable_p): Likewise. (TARGET_INSN_COST): New macro. (TARGET_MAX_NOCE_IFCVT_SEQ_COST): New macro. (TARGET_NOCE_CONVERSION_PROFITABLE_P): New macro. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Remove extraneous variable for EQ vs NE operation selection. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Use `nullptr' rather than 0 to initialize a pointer. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Use `mode0' and `mode1' for `GET_MODE (op0)' and `GET_MODE (op1)'. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_expand_conditional_move): Use `mode' for `GET_MODE (dest)' throughout. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.cc (riscv_emit_int_compare): Bail out if NEED_EQ_NE_P but the comparison is neither EQ nor NE. 2023-11-22 Maciej W. Rozycki * config/riscv/riscv.md (movcc): Move comment on SFB patterns over to... (*movcc): ... here. 2023-11-21 Robin Dapp PR middle-end/112406 * tree-vect-loop.cc (vectorize_fold_left_reduction): Allow reduction index != 1. (vect_transform_reduction): Handle reduction index != 1. 2023-11-21 Richard Sandiford * common.md (aligned_register_operand): New predicate. 2023-11-21 Richard Sandiford * ira-int.h (ira_allocno): Add a register_filters field. (ALLOCNO_REGISTER_FILTERS): New macro. (ALLOCNO_SET_REGISTER_FILTERS): Likewise. * ira-build.cc (ira_create_allocno): Initialize register_filters. (create_cap_allocno): Propagate register_filters. (propagate_allocno_info): Likewise. (propagate_some_info_from_allocno): Likewise. * ira-lives.cc (process_register_constraint_filters): New function. (process_bb_node_lives): Use it to record register filter information. * ira-color.cc (assign_hard_reg): Check register filters. (improve_allocation, fast_allocation): Likewise. 2023-11-21 Richard Sandiford * lra-constraints.cc (process_alt_operands): Check register filters. 2023-11-21 Richard Sandiford * recog.h (operand_alternative): Add a register_filters field. (alternative_register_filters): New function. * recog.cc (preprocess_constraints): Calculate the filters field. (constrain_operands): Check register filters. 2023-11-21 Richard Sandiford * rtl.def (DEFINE_REGISTER_CONSTRAINT): Add an optional filter operand. * doc/md.texi (define_register_constraint): Document it. * doc/tm.texi.in: Reference it in discussion about aligned registers. * doc/tm.texi: Regenerate. * gensupport.h (register_filters, get_register_filter_id): Declare. * gensupport.cc (register_filter_map, register_filters): New variables. (get_register_filter_id): New function. (process_define_register_constraint): Likewise. (process_rtx): Pass define_register_constraints to process_define_register_constraint. * genconfig.cc (main): Emit a definition of NUM_REGISTER_FILTERS. * genpreds.cc (constraint_data): Add a filter field. (add_constraint): Update accordingly. (process_define_register_constraint): Pass the filter operand. (write_init_reg_class_start_regs): New function. (write_get_register_filter): Likewise. (write_get_register_filter_id): Likewise. (write_tm_preds_h): Write a definition of target_constraints, plus helpers to test its contents. Write the get_register_filter* functions. (write_insn_preds_c): Write init_reg_class_start_regs. * reginfo.cc (init_reg_class_start_regs): Declare. (init_reg_sets): Call it. * target-globals.h (this_target_constraints): Declare. (target_globals): Add a constraints field. (restore_target_globals): Update accordingly. * target-globals.cc: Include tm_p.h. (default_target_globals): Initialize the constraints field. (save_target_globals): Handle the constraints field. (target_globals::~target_globals): Likewise. 2023-11-21 Richard Biener PR tree-optimization/112623 * tree-ssa-forwprop.cc (simplify_vector_constructor): Check the source mode of the insn for vector pack/unpacks. 2023-11-21 Richard Biener * tree-vect-loop.cc (vect_analyze_loop_2): Move check of VF against max_vf until VF is final. 2023-11-21 Juzhe-Zhong PR target/112598 * config/riscv/riscv.cc (riscv_const_insns): Disallow DI CONST_VECTOR on RV32. 2023-11-21 Tamar Christina * config/aarch64/aarch64.cc (aarch64_override_options): Rework warnings. 2023-11-21 Tamar Christina PR target/111370 * config/aarch64/aarch64-arches.def (armv9-a, armv9.1-a, armv9.2-a, armv9.3-a): Update to generic-armv9-a. * config/aarch64/aarch64-cores.def (generic-armv9-a): New. * config/aarch64/aarch64-tune.md: Regenerate. * config/aarch64/aarch64.cc: Include generic_armv9_a.h. * config/aarch64/tuning_models/generic_armv9_a.h: New file. 2023-11-21 Tamar Christina PR target/111370 * config/aarch64/aarch64-arches.def (armv8-9, armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a, armv8.5-a, armv8.6-a, armv8.7-a, armv8.8-a): Update to generic_armv8_a. * config/aarch64/aarch64-cores.def (generic-armv8-a): New. * config/aarch64/aarch64-tune.md: Regenerate. * config/aarch64/aarch64.cc: Include generic_armv8_a.h * config/aarch64/aarch64.h (TARGET_CPU_DEFAULT): Change to TARGET_CPU_generic_armv8_a. * config/aarch64/tuning_models/generic_armv8_a.h: New file. 2023-11-21 Tamar Christina PR target/111370 * config/aarch64/aarch64-cores.def: Add generic. * config/aarch64/aarch64-opts.h (enum aarch64_proc): Remove generic. * config/aarch64/aarch64-tune.md: Regenerate * config/aarch64/aarch64.cc (all_cores): Remove generic * config/aarch64/aarch64.h (enum target_cpus): Remove TARGET_CPU_generic. 2023-11-21 Tamar Christina PR target/111370 * config/aarch64/aarch64.cc (generic_addrcost_table, exynosm1_addrcost_table, xgene1_addrcost_table, thunderx2t99_addrcost_table, thunderx3t110_addrcost_table, tsv110_addrcost_table, qdf24xx_addrcost_table, a64fx_addrcost_table, neoversev1_addrcost_table, neoversen2_addrcost_table, neoversev2_addrcost_table, generic_regmove_cost, cortexa57_regmove_cost, cortexa53_regmove_cost, exynosm1_regmove_cost, thunderx_regmove_cost, xgene1_regmove_cost, qdf24xx_regmove_cost, thunderx2t99_regmove_cost, thunderx3t110_regmove_cost, tsv110_regmove_cost, a64fx_regmove_cost, neoversen2_regmove_cost, neoversev1_regmove_cost, neoversev2_regmove_cost, 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, ampere1_vector_cost, generic_branch_cost, generic_tunings, cortexa35_tunings, cortexa53_tunings, cortexa57_tunings, cortexa72_tunings, cortexa73_tunings, exynosm1_tunings, thunderxt88_tunings, thunderx_tunings, tsv110_tunings, xgene1_tunings, emag_tunings, qdf24xx_tunings, saphira_tunings, thunderx2t99_tunings, thunderx3t110_tunings, neoversen1_tunings, ampere1_tunings, ampere1a_tunings, neoversev1_vector_cost, neoversev1_tunings, neoverse512tvb_vector_cost, neoverse512tvb_tunings, neoversen2_vector_cost, neoversen2_tunings, neoversev2_vector_cost, neoversev2_tunings a64fx_tunings): Split into own files. * config/aarch64/tuning_models/a64fx.h: New file. * config/aarch64/tuning_models/ampere1.h: New file. * config/aarch64/tuning_models/ampere1a.h: New file. * config/aarch64/tuning_models/cortexa35.h: New file. * config/aarch64/tuning_models/cortexa53.h: New file. * config/aarch64/tuning_models/cortexa57.h: New file. * config/aarch64/tuning_models/cortexa72.h: New file. * config/aarch64/tuning_models/cortexa73.h: New file. * config/aarch64/tuning_models/emag.h: New file. * config/aarch64/tuning_models/exynosm1.h: New file. * config/aarch64/tuning_models/generic.h: New file. * config/aarch64/tuning_models/neoverse512tvb.h: New file. * config/aarch64/tuning_models/neoversen1.h: New file. * config/aarch64/tuning_models/neoversen2.h: New file. * config/aarch64/tuning_models/neoversev1.h: New file. * config/aarch64/tuning_models/neoversev2.h: New file. * config/aarch64/tuning_models/qdf24xx.h: New file. * config/aarch64/tuning_models/saphira.h: New file. * config/aarch64/tuning_models/thunderx.h: New file. * config/aarch64/tuning_models/thunderx2t99.h: New file. * config/aarch64/tuning_models/thunderx3t110.h: New file. * config/aarch64/tuning_models/thunderxt88.h: New file. * config/aarch64/tuning_models/tsv110.h: New file. * config/aarch64/tuning_models/xgene1.h: New file. 2023-11-21 Tamar Christina * config/aarch64/aarch64-simd.md (vec_unpack_lo__lo___zip): New. (aarch64_uaddw__zip): New. * config/aarch64/iterators.md (PERM_EXTEND, perm_index): New. (perm_hilo): Add UNSPEC_ZIP1, UNSPEC_ZIP2. 2023-11-21 Tamar Christina * config/aarch64/aarch64.cc (aarch64_adjust_stmt_cost): Guard mla. (aarch64_vector_costs::count_ops): Likewise. 2023-11-21 Sebastian Huber PR middle-end/112634 * tree-profile.cc (gen_assign_counter_update): Cast the unsigned result type of __atomic_add_fetch() to the signed counter type. (gen_counter_update): Fix formatting. 2023-11-21 Jakub Jelinek * tree-profile.cc (gen_counter_update, tree_profiling): Formatting fixes. 2023-11-21 Jakub Jelinek PR middle-end/112639 * builtins.cc (fold_builtin_bit_query): If arg0 has side-effects, arg1 is specified but cleared, call save_expr on arg0. 2023-11-21 Hongyu Wang * config/i386/i386-expand.h (gen_push): Add default bool parameter. (gen_pop): Likewise. * config/i386/i386-opts.h (enum apx_features): Add apx_ppx, add it to apx_all. * config/i386/i386.cc (ix86_emit_restore_reg_using_pop): Add ppx_p parameter for function declaration. (gen_push2): Add ppx_p parameter, emit push2p if ppx_p is true. (gen_push): Likewise. (ix86_emit_restore_reg_using_pop2): Likewise for pop2p. (ix86_emit_save_regs): Emit pushp/push2p under TARGET_APX_PPX. (ix86_emit_restore_reg_using_pop): Add ppx_p, emit popp insn and adjust cfi when ppx_p is ture. (ix86_emit_restore_reg_using_pop2): Add ppx_p and parse to its callee. (ix86_emit_restore_regs_using_pop2): Likewise. (ix86_expand_epilogue): Parse TARGET_APX_PPX to ix86_emit_restore_reg_using_pop. * config/i386/i386.h (TARGET_APX_PPX): New. * config/i386/i386.md (UNSPEC_APX_PPX): New unspec. (pushp_di): New define_insn. (popp_di): Likewise. (push2p_di): Likewise. (pop2p_di): Likewise. * config/i386/i386.opt: Add apx_ppx enum. 2023-11-21 Richard Biener PR tree-optimization/111970 * tree-vect-stmts.cc (vectorizable_load): Fix offset calculation for SLP gather load. (vectorizable_store): Likewise for SLP scatter store. 2023-11-21 Xi Ruoyao * config/loongarch/loongarch-def.h (stdint.h): Guard with #if to exclude it for target libraries. (loongarch_isa_base_features): Likewise. (loongarch_isa): Likewise. (loongarch_abi): Likewise. (loongarch_target): Likewise. (loongarch_cpu_default_isa): Likewise. 2023-11-21 liuhongt PR target/112325 * config/i386/i386-expand.cc (emit_reduc_half): Hanlde V8QImode. * config/i386/mmx.md (reduc__scal_): New expander. (reduc__scal_v4qi): Ditto. 2023-11-20 Marc Poulhiès * config/nvptx/nvptx.h (struct machine_function): Fix typo in variadic. * config/nvptx/nvptx.cc (nvptx_function_arg_advance): Adjust to use fixed name. (nvptx_declare_function_name): Likewise. (nvptx_call_args): Likewise. (nvptx_expand_call): Likewise. 2023-11-20 Sebastian Huber * tree-profile.cc (gen_counter_update): Use unshare_expr() for the counter expression in the second gimple_build_assign(). 2023-11-20 Jan Hubicka * cgraph.cc (add_detected_attribute_1): New function. (cgraph_node::add_detected_attribute): Likewise. * cgraph.h (cgraph_node::add_detected_attribute): Declare. * common.opt: Add -Wsuggest-attribute=returns_nonnull. * doc/invoke.texi: Document new flag. * gimple-range-fold.cc (fold_using_range::range_of_call): Use known reutrn value ranges. * ipa-prop.cc (struct ipa_return_value_summary): New type. (class ipa_return_value_sum_t): New type. (ipa_return_value_sum): New summary. (ipa_record_return_value_range): New function. (ipa_return_value_range): New function. * ipa-prop.h (ipa_return_value_range): Declare. (ipa_record_return_value_range): Declare. * ipa-pure-const.cc (warn_function_returns_nonnull): New funcion. * ipa-utils.h (warn_function_returns_nonnull): Declare. * symbol-summary.h: Fix comment. * tree-vrp.cc (execute_ranger_vrp): Record return values. 2023-11-20 Richard Biener PR tree-optimization/112618 * tree-vect-loop.cc (vect_transform_loop_stmt): For not relevant and unused .MASK_CALL make sure we remove the scalar stmt. 2023-11-20 Richard Biener PR tree-optimization/112281 * tree-loop-distribution.cc (loop_distribution::pg_add_dependence_edges): For = in the innermost common loop record a partition conflict. 2023-11-20 Richard Biener PR middle-end/112622 * convert.cc (convert_to_real_1): Use element_precision where a vector type might appear. Provide specific diagnostic for unexpected vector argument. 2023-11-20 Juzhe-Zhong PR target/112597 * config/riscv/vector-iterators.md: Remove VDEMOTE and VMDEMOTE. * config/riscv/vector.md: Fix slide1 intermediate mode bug. 2023-11-20 Robin Dapp * config/riscv/riscv-v.cc (gather_scatter_valid_offset_mode_p): Add check for XLEN == 32. * config/riscv/vector-iterators.md: Change VLS part of the demote iterator to 2x elements modes * config/riscv/vector.md: Adjust iterators and insn conditions. 2023-11-20 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vld1_impl, vld1q) (vst1_impl, vst1q): New. * config/arm/arm-mve-builtins-base.def (vld1q, vst1q): New. * config/arm/arm-mve-builtins-base.h (vld1q, vst1q): New. * config/arm/arm_mve.h (vld1q): Delete. (vst1q): Delete. (vld1q_s8): Delete. (vld1q_s32): Delete. (vld1q_s16): Delete. (vld1q_u8): Delete. (vld1q_u32): Delete. (vld1q_u16): Delete. (vld1q_f32): Delete. (vld1q_f16): Delete. (vst1q_f32): Delete. (vst1q_f16): Delete. (vst1q_s8): Delete. (vst1q_s32): Delete. (vst1q_s16): Delete. (vst1q_u8): Delete. (vst1q_u32): Delete. (vst1q_u16): Delete. (__arm_vld1q_s8): Delete. (__arm_vld1q_s32): Delete. (__arm_vld1q_s16): Delete. (__arm_vld1q_u8): Delete. (__arm_vld1q_u32): Delete. (__arm_vld1q_u16): Delete. (__arm_vst1q_s8): Delete. (__arm_vst1q_s32): Delete. (__arm_vst1q_s16): Delete. (__arm_vst1q_u8): Delete. (__arm_vst1q_u32): Delete. (__arm_vst1q_u16): Delete. (__arm_vld1q_f32): Delete. (__arm_vld1q_f16): Delete. (__arm_vst1q_f32): Delete. (__arm_vst1q_f16): Delete. (__arm_vld1q): Delete. (__arm_vst1q): Delete. * config/arm/mve.md (mve_vld1q_f): Rename into ... (@mve_vld1q_f): ... this. (mve_vld1q_): Rename into ... (@mve_vld1q_) ... this. (mve_vst1q_f): Rename into ... (@mve_vst1q_f): ... this. (mve_vst1q_): Rename into ... (@mve_vst1q_) ... this. 2023-11-20 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (load, store): New. * config/arm/arm-mve-builtins-shapes.h (load, store): New. 2023-11-20 Christophe Lyon * config/arm/arm-mve-builtins-functions.h (multi_vector_function) (full_width_access): New classes. * config/arm/arm-mve-builtins.cc (find_type_suffix_for_scalar_type, infer_pointer_type) (require_pointer_type, get_contiguous_base, add_mem_operand) (add_fixed_operand, use_contiguous_load_insn) (use_contiguous_store_insn): New. * config/arm/arm-mve-builtins.h (memory_vector_mode) (infer_pointer_type, require_pointer_type, get_contiguous_base) (add_mem_operand) (add_fixed_operand, use_contiguous_load_insn) (use_contiguous_store_insn): New. 2023-11-20 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (build_const_pointer): New. (parse_type): Add support for '_', 'al' and 'as'. * config/arm/arm-mve-builtins.h (function_instance): Add memory_scalar_type. (function_base): Likewise. 2023-11-20 Christophe Lyon * config/arm/arm-builtins.cc (arm_init_simd_builtin_types): Fix initialization of arm_simd_types[].eltype. * config/arm/arm-mve-builtins.def (DEF_MVE_TYPE): Fix scalar types. 2023-11-20 Jakub Jelinek * typeclass.h (enum type_class): Add vector_type_class. * builtins.cc (type_to_class): Return vector_type_class for VECTOR_TYPE. * doc/extend.texi (__builtin_classify_type): Mention bit-precise integer types and vector types. 2023-11-20 Robin Dapp PR middle-end/112406 * tree-vect-patterns.cc (vect_recog_mask_conversion_pattern): Convert masks for conditional operations as well. 2023-11-20 Jakub Jelinek PR tree-optimization/90693 * tree-ssa-math-opts.cc (match_single_bit_test): Mark POPCOUNT with result only used in equality comparison against 1 with direct optab support as .POPCOUNT call with 2 arguments. * internal-fn.h (expand_POPCOUNT): Declare. * internal-fn.def (DEF_INTERNAL_INT_EXT_FN): New macro, document it, undefine at the end. (POPCOUNT): Use it instead of DEF_INTERNAL_INT_FN. * internal-fn.cc (DEF_INTERNAL_INT_EXT_FN): Define to nothing before inclusion to define expanders. (expand_POPCOUNT): New function. 2023-11-20 Jakub Jelinek PR tree-optimization/90693 * tree-ssa-math-opts.cc (match_single_bit_test): New function. (math_opts_dom_walker::after_dom_children): Call it for EQ_EXPR and NE_EXPR assignments and GIMPLE_CONDs. 2023-11-20 Jakub Jelinek * internal-fn.def: Document missing DEF_INTERNAL* macros and make sure they are all undefined at the end. * internal-fn.cc (lookup_hilo_internal_fn, lookup_evenodd_internal_fn, widening_fn_p, get_len_internal_fn): Don't undef DEF_INTERNAL_*FN macros after inclusion of internal-fn.def. 2023-11-20 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Add avx10_set and version and detect avx10.1. (cpu_indicator_init): Handle avx10.1-512. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX10_1_256_SET): New. (OPTION_MASK_ISA2_AVX10_1_256_SET): Ditto. (OPTION_MASK_ISA2_AVX10_1_512_UNSET): Ditto. (OPTION_MASK_ISA2_AVX10_1_512_UNSET): Ditto. (OPTION_MASK_ISA2_AVX2_UNSET): Modify for AVX10.1. (ix86_handle_option): Handle -mavx10.1-256 and -mavx10.1-512. Add indicator for explicit no-avx512 and no-avx10.1 options. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVX10_1_256 and FEATURE_AVX10_1_512. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for AVX10_1_256 and AVX10_1_512. * config/i386/cpuid.h (bit_AVX10): New. (bit_AVX10_256): Ditto. (bit_AVX10_512): Ditto. * config/i386/driver-i386.cc (check_avx10_avx512_features): New. (host_detect_local_cpu): Do not append "-mno-" options under specific scenarios to avoid emitting a warning. * config/i386/i386-isa.def (EVEX512): Add DEF_PTA(EVEX512). (AVX10_1_256): Add DEF_PTA(AVX10_1_256). (AVX10_1_512): Add DEF_PTA(AVX10_1_512). * config/i386/i386-options.cc (isa2_opts): Add -mavx10.1-256 and -mavx10.1-512. (ix86_function_specific_save): Save explicit no indicator. (ix86_function_specific_restore): Restore explicit no indicator. (ix86_valid_target_attribute_inner_p): Handle avx10.1, avx10.1-256 and avx10.1-512. (ix86_valid_target_attribute_tree): Handle avx512 function attributes with avx10.1 command line option. (ix86_option_override_internal): Handle AVX10.1 options. * config/i386/i386.h: Add PTA_EVEX512 for AVX512 target machines. * config/i386/i386.opt: Add variable ix86_no_avx512_explicit and ix86_no_avx10_1_explicit, option -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/extend.texi: Document avx10.1, avx10.1-256 and avx10.1-512. * doc/invoke.texi: Document -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/sourcebuild.texi: Document target avx10.1, avx10.1-256 and avx10.1-512. 2023-11-20 liuhongt PR target/112325 * config/i386/sse.md (reduc__scal_): New expander. (REDUC_ANY_LOGIC_MODE): New iterator. (REDUC_PLUS_MODE): Extend to VxHI/SI/DImode. (REDUC_SSE_PLUS_MODE): Ditto. 2023-11-20 xuli PR target/112537 * config/riscv/riscv-opts.h (enum riscv_stringop_strategy_enum): Strategy enum. * config/riscv/riscv-string.cc (riscv_expand_block_move): Disabled based on options. (expand_block_move): Ditto. * config/riscv/riscv.opt: Add -mmemcpy-strategy=. 2023-11-20 Lulu Cheng * config/loongarch/gnu-user.h (MUSL_ABI_SPEC): Modify suffix. 2023-11-19 Juzhe-Zhong * config/riscv/riscv-v.cc (emit_vlmax_insn_lra): Optimize constant AVL. 2023-11-19 Philipp Tomsich * config/riscv/riscv-protos.h (extract_base_offset_in_addr): Prototype. * config/riscv/riscv.cc (riscv_fusion_pairs): New enum. (riscv_tune_param): Add fusible_ops field. (riscv_tune_param_rocket_tune_info): Initialize new field. (riscv_tune_param_sifive_7_tune_info): Likewise. (thead_c906_tune_info): Likewise. (generic_oo_tune_info): Likewise. (optimize_size_tune_info): Likewise. (riscv_macro_fusion_p): New function. (riscv_fusion_enabled_p): Likewise. (riscv_macro_fusion_pair_p): Likewise. (TARGET_SCHED_MACRO_FUSION_P): Define. (TARGET_SCHED_MACRO_FUSION_PAIR_P): Likewise. (extract_base_offset_in_addr): Moved into riscv.cc from... * config/riscv/thead.cc: Here. Co-authored-by: Raphael Zinsly Co-authored-by: Jeff Law 2023-11-19 Jeff Law * config/c6x/c6x.md (mvilc): Add mode to UNSPEC source. * config/mips/mips.md (rdhwr_synci_step_): Likewise. * config/riscv/riscv.md (riscv_frcsr, riscv_frflags): Likewise. * config/s390/s390.md (@split_stack_call): Likewise. (@split_stack_cond_call): Likewise. * config/sh/sh.md (sp_switch_1): Likewise. 2023-11-19 David Malcolm * diagnostic.h: Include "rich-location.h". * edit-context.h (class fixit_hint): New forward decl. * gcc-rich-location.h: Include "rich-location.h". * genmatch.cc: Likewise. * pretty-print.h: Likewise. 2023-11-19 David Malcolm * Makefile.in (CPPLIB_H): Add libcpp/include/rich-location.h. * coretypes.h (class rich_location): New forward decl. 2023-11-19 Juzhe-Zhong * config/riscv/riscv-v.cc (expand_tuple_move): Fix bug. 2023-11-19 David Malcolm PR analyzer/107573 * doc/invoke.texi: Add -Wanalyzer-undefined-behavior-strtok. 2023-11-18 Xi Ruoyao * config/loongarch/predicates.md (const_call_insn_operand): Remove buggy "HAVE_AS_SUPPORT_CALL36" conditions. Change "1" to "true" to make the coding style consistent. 2023-11-18 Xi Ruoyao * config/loongarch/genopts/isa-evolution.in: (lam-bh, lamcas): Add. * config/loongarch/loongarch-str.h: Regenerate. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch-cpucfg-map.h: Regenerate. * config/loongarch/loongarch-cpu.cc (ISA_BASE_LA64V110_FEATURES): Include OPTION_MASK_ISA_LAM_BH and OPTION_MASK_ISA_LAMCAS. * config/loongarch/sync.md (atomic_add): Use TARGET_LAM_BH instead of ISA_BASE_IS_LA64V110. Remove empty lines from assembly output. (atomic_exchange_short): Likewise. (atomic_exchange): Likewise. (atomic_fetch_add_short): Likewise. (atomic_fetch_add): Likewise. (atomic_cas_value_strong_amcas): Use TARGET_LAMCAS instead of ISA_BASE_IS_LA64V110. (atomic_compare_and_swap): Likewise. (atomic_compare_and_swap): Likewise. (atomic_compare_and_swap): Likewise. * config/loongarch/loongarch.cc (loongarch_asm_code_end): Dump status if -mlam-bh and -mlamcas if -fverbose-asm. 2023-11-18 Xi Ruoyao * config/loongarch/loongarch.cc (loongarch_print_operand): Don't print dbar 0x700 if TARGET_LD_SEQ_SA. * config/loongarch/sync.md (atomic_load): Likewise. 2023-11-18 Xi Ruoyao * config/loongarch/loongarch.md (DIV): New mode iterator. (3): Don't expand if TARGET_DIV32. (di3_fake): Disable if TARGET_DIV32. (*3): Allow SImode if TARGET_DIV32. (si3_extended): New insn if TARGET_DIV32. 2023-11-18 Xi Ruoyao * config/loongarch/loongarch-def.h: (loongarch_isa_base_features): Declare. Define it in ... * config/loongarch/loongarch-cpu.cc (loongarch_isa_base_features): ... here. (fill_native_cpu_config): If we know the base ISA of the CPU model from PRID, use it instead of la64 (v1.0). Check if all expected features of this base ISA is available, emit a warning if not. * config/loongarch/loongarch-opts.cc (config_target_isa): Enable the features implied by the base ISA if not -march=native. 2023-11-18 Xi Ruoyao * config/loongarch/genopts/isa-evolution.in: New data file. * config/loongarch/genopts/genstr.sh: Translate info in isa-evolution.in when generating loongarch-str.h, loongarch.opt, and loongarch-cpucfg-map.h. * config/loongarch/genopts/loongarch.opt.in (isa_evolution): New variable. * config/loongarch/t-loongarch: (loongarch-cpucfg-map.h): New rule. (loongarch-str.h): Depend on isa-evolution.in. (loongarch.opt): Depend on isa-evolution.in. (loongarch-cpu.o): Depend on loongarch-cpucfg-map.h. * config/loongarch/loongarch-str.h: Regenerate. * config/loongarch/loongarch-def.h (loongarch_isa): Add field for evolution features. Add helper function to enable features in this field. Probe native CPU capability and save the corresponding options into preset. * config/loongarch/loongarch-cpu.cc (fill_native_cpu_config): Probe native CPU capability and save the corresponding options into preset. (cache_cpucfg): Simplify with C++11-style for loop. (cpucfg_useful_idx, N_CPUCFG_WORDS): Move to ... * config/loongarch/loongarch.cc (loongarch_option_override_internal): Enable the ISA evolution feature options implied by -march and not explicitly disabled. (loongarch_asm_code_end): New function, print ISA information as comments in the assembly if -fverbose-asm. It makes easier to debug things like -march=native. (TARGET_ASM_CODE_END): Define. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch-cpucfg-map.h: Generate. (cpucfg_useful_idx, N_CPUCFG_WORDS) ... here. 2023-11-18 Xi Ruoyao * config/loongarch/genopts/loongarch-strings: (STR_ISA_BASE_LA64V110): Add. * config/loongarch/genopts/loongarch.opt.in: (ISA_BASE_LA64V110): Add. * config/loongarch/loongarch-def.c (loongarch_isa_base_strings): Initialize [ISA_BASE_LA64V110] to STR_ISA_BASE_LA64V110. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch-str.h: Regenerate. 2023-11-18 Sebastian Huber * doc/invoke.texi (-fprofile-update): Clarify default method. Document the atomic method behaviour. * tree-profile.cc (enum counter_update_method): New. (counter_update): Likewise. (gen_counter_update): Use counter_update_method. Split the atomic counter update in two 32-bit atomic operations if necessary. (tree_profiling): Select counter_update_method. 2023-11-18 Sebastian Huber * tree-profile.cc (gen_assign_counter_update): New. (gen_counter_update): Likewise. (gimple_gen_edge_profiler): Use gen_counter_update(). (gimple_gen_time_profiler): Likewise. 2023-11-18 Sebastian Huber * config/rtems.h (TARGET_HAVE_LIBATOMIC): Define. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_HAVE_LIBATOMIC): Add. * target.def (have_libatomic): New. 2023-11-18 Sebastian Huber Revert: 2023-11-18 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. 2023-11-18 Kito Cheng * config/riscv/riscv-target-attr.cc (riscv_target_attr_parser::parse_arch): Use char[] for std::unique_ptr to prevent mismatched new delete issue. (riscv_process_one_target_attr): Ditto. (riscv_process_target_attr): Ditto. 2023-11-18 Juzhe-Zhong * config/riscv/vector-iterators.md: Refactor iterators. 2023-11-18 Lulu Cheng * config/loongarch/sync.md (atomic_load): New template. 2023-11-18 Lulu Cheng * config/loongarch/loongarch-def.h: Add comments. * config/loongarch/loongarch-opts.h (ISA_BASE_IS_LA64V110): Define macro. * config/loongarch/loongarch.cc (loongarch_memmodel_needs_rel_acq_fence): Remove redundant code implementations. * config/loongarch/sync.md (d): Added QI, HI support. (atomic_add): New template. (atomic_exchange_short): Likewise. (atomic_cas_value_strong_amcas): Likewise.. (atomic_fetch_add_short): Likewise. 2023-11-18 Lulu Cheng * config.gcc: Support LA664. * config/loongarch/genopts/loongarch-strings: Likewise. * config/loongarch/genopts/loongarch.opt.in: Likewise. * config/loongarch/loongarch-cpu.cc (fill_native_cpu_config): Likewise. * config/loongarch/loongarch-def.c: Likewise. * config/loongarch/loongarch-def.h (N_ISA_BASE_TYPES): Likewise. (ISA_BASE_LA64V110): Define macro. (N_ARCH_TYPES): Update value. (N_TUNE_TYPES): Update value. (CPU_LA664): New macro. * config/loongarch/loongarch-opts.cc (isa_default_abi): Likewise. (isa_base_compat_p): Likewise. * config/loongarch/loongarch-opts.h (TARGET_64BIT): This parameter is enabled when la_target.isa.base is equal to ISA_BASE_LA64V100 or ISA_BASE_LA64V110. (TARGET_uARCH_LA664): Define macro. * config/loongarch/loongarch-str.h (STR_CPU_LA664): Likewise. * config/loongarch/loongarch.cc (loongarch_cpu_sched_reassociation_width): Add LA664 support. * config/loongarch/loongarch.opt: Regenerate. 2023-11-18 Lulu Cheng Xi Ruoyao * config.in: Regenerate. * config/loongarch/loongarch-opts.h (HAVE_AS_SUPPORT_CALL36): Define macro. * config/loongarch/loongarch.cc (loongarch_legitimize_call_address): If binutils supports call36, the function call is not split over expand. * config/loongarch/loongarch.md: Add call36 generation code. * config/loongarch/predicates.md: Likewise. * configure: Regenerate. * configure.ac: Check whether binutils supports call36. 2023-11-18 David Malcolm PR analyzer/106147 * Makefile.in (ANALYZER_OBJS): Add analyzer/infinite-loop.o. * doc/invoke.texi: Add -fdump-analyzer-infinite-loop and -Wanalyzer-infinite-loop. Add missing CWE link for -Wanalyzer-infinite-recursion. * timevar.def (TV_ANALYZER_INFINITE_LOOPS): New. 2023-11-17 Robin Dapp PR middle-end/112406 PR middle-end/112552 * tree-vect-loop.cc (vect_transform_reduction): Pass truth vectype for mask operand. 2023-11-17 Jakub Jelinek PR c++/107571 * gimplify.cc (expand_FALLTHROUGH_r): Use wi->removed_stmt after gsi_remove, change the way of passing fallthrough stmt at the end of sequence to expand_FALLTHROUGH. Diagnose IFN_FALLTHROUGH with GF_CALL_NOTHROW flag. (expand_FALLTHROUGH): Change loc into array of 2 location_t elts, don't test wi.callback_result, instead check whether first elt is not UNKNOWN_LOCATION and in that case pedwarn with the second location. * gimple-walk.cc (walk_gimple_seq_mod): Clear wi->removed_stmt after the flag has been used. * internal-fn.def (FALLTHROUGH): Mention in comment the special meaning of the TREE_NOTHROW/GF_CALL_NOTHROW flag on the calls. 2023-11-17 Jakub Jelinek PR tree-optimization/112566 PR tree-optimization/83171 * match.pd (ctz(ext(X)) -> ctz(X), popcount(zext(X)) -> popcount(X), parity(ext(X)) -> parity(X), ffs(ext(X)) -> ffs(X)): New simplifications. ( __builtin_ffs (X) == 0 -> X == 0): Use FFS rather than BUILT_IN_FFS BUILT_IN_FFSL BUILT_IN_FFSLL BUILT_IN_FFSIMAX. 2023-11-17 Jakub Jelinek PR tree-optimization/112374 * tree-vect-loop.cc (check_reduction_path): Perform the cond_fn_p special case only if op_use_stmt == use_stmt, use as_a rather than dyn_cast in that case. 2023-11-17 Richard Biener Revert: 2023-11-14 Richard Biener PR tree-optimization/112281 * tree-loop-distribution.cc (pg_add_dependence_edges): Preserve stmt order when the innermost loop has exact overlap. 2023-11-17 Georg-Johann Lay PR target/53372 * config/avr/avr.cc (avr_asm_named_section) [AVR_SECTION_PROGMEM]: Only return some .progmem*.data section if the user did not specify a section attribute. (avr_section_type_flags) [avr_progmem_p]: Unset SECTION_NOTYPE in returned section flags. 2023-11-17 Xi Ruoyao * config/loongarch/lsx.md (copysign3): Allow operand[2] to be an reg_or_vector_same_val_operand. If it's a const vector with same negative elements, expand the copysign with a bitset instruction. Otherwise, force it into an register. * config/loongarch/lasx.md (copysign3): Likewise. 2023-11-17 Haochen Gui PR target/111449 * config/rs6000/vsx.md (*vsx_le_mem_to_mem_mov_ti): New. 2023-11-17 Haochen Gui PR target/111449 * config/rs6000/altivec.md (cbranchv16qi4): New expand pattern. * config/rs6000/rs6000.cc (rs6000_generate_compare): Generate insn sequence for V16QImode equality compare. * config/rs6000/rs6000.h (MOVE_MAX_PIECES): Define. (STORE_MAX_PIECES): Define. 2023-11-17 Li Wei * config/loongarch/loongarch.h (CLZ_DEFINED_VALUE_AT_ZERO): Implement. (CTZ_DEFINED_VALUE_AT_ZERO): Same. 2023-11-17 Richard Biener * dwarf2out.cc (add_AT_die_ref): Assert we do not add a self-ref DW_AT_abstract_origin or DW_AT_specification. 2023-11-17 Jiahao Xu * config/loongarch/loongarch.cc (loongarch_builtin_vectorization_cost): Adjust. 2023-11-16 Andrew Pinski PR rtl-optimization/112483 * simplify-rtx.cc (simplify_binary_operation_1) : Call simplify_unary_operation for NEG instead of simplify_gen_unary. 2023-11-16 Edwin Lu PR target/111557 * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): update macro name 2023-11-16 Uros Bizjak PR target/78904 * config/i386/i386.md (*addqi_ext2_0): New define_insn_and_split pattern. (*subqi_ext2_0): Ditto. (*qi_ext2_0): Ditto. 2023-11-16 John David Anglin PR rtl-optimization/112415 * config/pa/pa.cc (pa_legitimate_address_p): Allow 14-bit displacements before reload. Simplify logic flow. Revise comments. * config/pa/pa.h (TARGET_ELF64): New define. (INT14_OK_STRICT): Update define and comment. * config/pa/pa64-linux.h (TARGET_ELF64): Define. * config/pa/predicates.md (base14_operand): Don't check alignment of short displacements. (integer_store_memory_operand): Don't return true when reload_in_progress is true. Remove INT_5_BITS check. (floating_point_store_memory_operand): Don't return true when reload_in_progress is true. Use INT14_OK_STRICT to check whether long displacements are always okay. 2023-11-16 Uros Bizjak PR target/112567 * config/i386/i386.md (*qi_ext_1_slp): Fix generation of invalid RTX in split pattern. 2023-11-16 David Malcolm * diagnostic.cc (diagnostic_context::set_option_hooks): Add "lang_mask" param. * diagnostic.h (diagnostic_context::option_enabled_p): Update for move of m_lang_mask. (diagnostic_context::set_option_hooks): Add "lang_mask" param. (diagnostic_context::get_lang_mask): New. (diagnostic_context::m_lang_mask): Move into m_option_callbacks, thus making private. * lto-wrapper.cc (main): Update for new lang_mask param of set_option_hooks. * toplev.cc (init_asm_output): Use get_lang_mask. (general_init): Move initialization of global_dc's lang_mask to new lang_mask param of set_option_hooks. 2023-11-16 Tamar Christina PR tree-optimization/111878 * tree-vect-loop-manip.cc (find_loop_location): Skip edges check if latch incorrect. 2023-11-16 Kito Cheng * config.gcc (riscv): Add riscv-target-attr.o. * config/riscv/riscv-protos.h (riscv_declare_function_size) New. (riscv_option_valid_attribute_p): New. (riscv_override_options_internal): New. (struct riscv_tune_info): New. (riscv_parse_tune): New. * config/riscv/riscv-target-attr.cc (class riscv_target_attr_parser): New. (struct riscv_attribute_info): New. (riscv_attributes): New. (riscv_target_attr_parser::parse_arch): New. (riscv_target_attr_parser::handle_arch): New. (riscv_target_attr_parser::handle_cpu): New. (riscv_target_attr_parser::handle_tune): New. (riscv_target_attr_parser::update_settings): New. (riscv_process_one_target_attr): New. (num_occurences_in_str): New. (riscv_process_target_attr): New. (riscv_option_valid_attribute_p): New. * config/riscv/riscv.cc: Include target-globals.h and riscv-subset.h. (struct riscv_tune_info): Move to riscv-protos.h. (get_tune_str): New. (riscv_parse_tune): New parameter null_p. (riscv_declare_function_size): New. (riscv_option_override): Build target_option_default_node and target_option_current_node. (riscv_save_restore_target_globals): New. (riscv_option_restore): New. (riscv_previous_fndecl): New. (riscv_set_current_function): Apply the target attribute. (TARGET_OPTION_RESTORE): Define. (TARGET_OPTION_VALID_ATTRIBUTE_P): Ditto. * config/riscv/riscv.h (SWITCHABLE_TARGET): Define to 1. (ASM_DECLARE_FUNCTION_SIZE) Define. * config/riscv/riscv.opt (mtune=): Add Save attribute. (mcpu=): Ditto. (mcmodel=): Ditto. * config/riscv/t-riscv: Add build rule for riscv-target-attr.o * doc/extend.texi: Add doc for target attribute. 2023-11-16 Kito Cheng PR target/112478 * config/riscv/riscv.cc (riscv_save_return_addr_reg_p): Check ra is ever lived. 2023-11-16 liuhongt PR target/112532 * config/i386/mmx.md (*vec_dup): Extend for V4HI and V2HI. 2023-11-16 Jakub Jelinek PR target/112526 * config/i386/i386.md (mov imm,%rax; mov %rdi,%rdx; mulx %rax -> mov imm,%rdx; mulx %rdi): Verify in define_peephole2 that operands[2] dies or is overwritten at the end of multiplication. 2023-11-16 Jakub Jelinek PR tree-optimization/112536 * tree-vect-slp.cc (arg0_map): New variable. (vect_get_operand_map): For IFN_CLZ or IFN_CTZ, return arg0_map. 2023-11-16 Juzhe-Zhong PR middle-end/112554 * tree-vect-loop.cc (vect_determine_partial_vectors_and_peeling): Clear SELECT_VL_P for non-partial vectorization. 2023-11-16 Hongyu Wang * config/i386/sse.md (vec_extract_hi_): Add noavx512vl alternative with attr addr gpr16 and "jm" constraint. (vec_extract_hi_): Likewise for SF vector modes. (@vec_extract_hi_): Likewise. (*vec_extractv2ti): Likewise. (vec_set_hi_): Likewise. * config/i386/mmx.md (@sse4_1_insertps_): Correct gpr16 attr for each alternative. 2023-11-15 Uros Bizjak PR target/78904 * config/i386/i386.md (*movstrictqi_ext_1): New insn pattern. (*addqi_ext_2_slp): New define_insn_and_split pattern. (*subqi_ext_2_slp): Ditto. (*qi_ext_2_slp): Ditto. 2023-11-15 Patrick O'Neill * common/config/riscv/riscv-common.cc (riscv_subset_list::parse_std_ext): Emit an error and skip to the next extension when a non-canonical ordering is detected. 2023-11-15 Bernhard Reutner-Fischer * gcc-rich-location.cc (maybe_range_label_for_tree_type_mismatch::get_text): Revert using the macro CAN_HAVE_LOCATION_P. 2023-11-15 Juzhe-Zhong PR target/112447 * config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): Insert local vsetvl info before LCM suggested one. Tested-by: Patrick O'Neill # pre-commit-CI #679 Co-developed-by: Vineet Gupta 2023-11-15 Vineet Gupta * config/riscv/riscv.cc (riscv_sign_extend_if_not_subreg_prom): New. * (riscv_extend_comparands): Call New function on operands. 2023-11-15 Uros Bizjak * config/i386/i386.md (*addqi_ext_1_slp): Add "&& " before "reload_completed" in split condition. (*subqi_ext_1_slp): Ditto. (*qi_ext_1_slp): Ditto. 2023-11-15 Uros Bizjak PR target/112540 * config/i386/i386.md (*addqi_ext_1_slp): Correct operand numbers in split pattern. Replace !Q constraint of operand 1 with !qm. Add insn constrain. (*subqi_ext_1_slp): Ditto. (*qi_ext_1_slp): Ditto. 2023-11-15 Thomas Schwinge * doc/extend.texi (Nvidia PTX Built-in Functions): Fix copy'n'paste-o in '__builtin_nvptx_brev' description. 2023-11-15 Roger Sayle Thomas Schwinge * config/nvptx/nvptx.md (UNSPEC_BITREV): Delete. (bitrev2): Represent using bitreverse. 2023-11-15 Andrew Stubbs Andrew Jenner * config/gcn/constraints.md: Add "a" AVGPR constraint. * config/gcn/gcn-valu.md (*mov): Add AVGPR alternatives. (*mov_4reg): Likewise. (@mov_sgprbase): Likewise. (gather_insn_1offset): Likewise. (gather_insn_1offset_ds): Likewise. (gather_insn_2offsets): Likewise. (scatter_expr): Likewise. (scatter_insn_1offset_ds): Likewise. (scatter_insn_2offsets): Likewise. * config/gcn/gcn.cc (MAX_NORMAL_AVGPR_COUNT): Define. (gcn_class_max_nregs): Handle AVGPR_REGS and ALL_VGPR_REGS. (gcn_hard_regno_mode_ok): Likewise. (gcn_regno_reg_class): Likewise. (gcn_spill_class): Allow spilling to AVGPRs on TARGET_CDNA1_PLUS. (gcn_sgpr_move_p): Handle AVGPRs. (gcn_secondary_reload): Reload AVGPRs via VGPRs. (gcn_conditional_register_usage): Handle AVGPRs. (gcn_vgpr_equivalent_register_operand): New function. (gcn_valid_move_p): Check for validity of AVGPR moves. (gcn_compute_frame_offsets): Handle AVGPRs. (gcn_memory_move_cost): Likewise. (gcn_register_move_cost): Likewise. (gcn_vmem_insn_p): Handle TYPE_VOP3P_MAI. (gcn_md_reorg): Handle AVGPRs. (gcn_hsa_declare_function_name): Likewise. (print_reg): Likewise. (gcn_dwarf_register_number): Likewise. * config/gcn/gcn.h (FIRST_AVGPR_REG): Define. (AVGPR_REGNO): Define. (LAST_AVGPR_REG): Define. (SOFT_ARG_REG): Update. (FRAME_POINTER_REGNUM): Update. (DWARF_LINK_REGISTER): Update. (FIRST_PSEUDO_REGISTER): Update. (AVGPR_REGNO_P): Define. (enum reg_class): Add AVGPR_REGS and ALL_VGPR_REGS. (REG_CLASS_CONTENTS): Add new register classes and add entries for AVGPRs to all classes. (REGISTER_NAMES): Add AVGPRs. * config/gcn/gcn.md (FIRST_AVGPR_REG, LAST_AVGPR_REG): Define. (AP_REGNUM, FP_REGNUM): Update. (define_attr "type"): Add vop3p_mai. (define_attr "unit"): Handle vop3p_mai. (define_attr "gcn_version"): Add "cdna2". (define_attr "enabled"): Handle cdna2. (*mov_insn): Add AVGPR alternatives. (*movti_insn): Likewise. * config/gcn/mkoffload.cc (isa_has_combined_avgprs): New. (process_asm): Process avgpr_count. * config/gcn/predicates.md (gcn_avgpr_register_operand): New. (gcn_avgpr_hard_register_operand): New. * doc/md.texi: Document the "a" constraint. 2023-11-15 Andrew Stubbs * config/gcn/gcn-valu.md (mov_sgprbase): Add @ modifier. (reload_in): Delete. (reload_out): Delete. * config/gcn/gcn.cc (CODE_FOR): Delete. (get_code_for_##PREFIX##vN##SUFFIX): Delete. (CODE_FOR_OP): Delete. (get_code_for_##PREFIX): Delete. (gcn_secondary_reload): Replace "get_code_for" with "code_for". 2023-11-15 Stefan Schulze Frielinghaus * config/s390/t-s390: Generate s390-gen-builtins.h without linemarkers. 2023-11-15 Richard Biener PR tree-optimization/112282 * tree-if-conv.cc (ifcvt_hoist_invariants): Only hoist from the loop header. 2023-11-15 Richard Biener * tree-vect-slp.cc (vect_slp_region): Also clear visited flag when we skipped an instance due to -fdbg-cnt. 2023-11-15 Xi Ruoyao * config/loongarch/loongarch.cc (loongarch_memmodel_needs_release_fence): Remove. (loongarch_cas_failure_memorder_needs_acquire): New static function. (loongarch_print_operand): Redefine 'G' for the barrier on CAS failure. * config/loongarch/sync.md (atomic_cas_value_strong): Remove the redundant barrier before the LL instruction, and emit an acquire barrier on failure if needed by failure_memorder. (atomic_cas_value_cmp_and_7_): Likewise. (atomic_cas_value_add_7_): Remove the unnecessary barrier before the LL instruction. (atomic_cas_value_sub_7_): Likewise. (atomic_cas_value_and_7_): Likewise. (atomic_cas_value_xor_7_): Likewise. (atomic_cas_value_or_7_): Likewise. (atomic_cas_value_nand_7_): Likewise. (atomic_cas_value_exchange_7_): Likewise. 2023-11-15 Juzhe-Zhong * config/riscv/riscv-v.cc (expand_vector_init_trailing_same_elem): New function. (expand_vec_init): Add trailing optimization. 2023-11-15 Pan Li * config/riscv/riscv-v.cc (rvv_builder::get_merge_scalar_mask): Add inner_mode mask arg for mask int mode. (get_repeating_sequence_dup_machine_mode): Add mask_bit_mode arg to get the good enough vector int mode on precision. (expand_vector_init_merge_repeating_sequence): Pass required args to above func. 2023-11-15 Juzhe-Zhong PR target/112535 * config/riscv/riscv.cc (riscv_legitimate_address_p): Disallow RVV modes base address. 2023-11-15 David Malcolm * json.cc (selftest::assert_print_eq): Add "loc" param and use ASSERT_STREQ_AT. (ASSERT_PRINT_EQ): New macro. (selftest::test_writing_objects): Use ASSERT_PRINT_EQ to capture source location of assertion. (selftest::test_writing_arrays): Likewise. (selftest::test_writing_float_numbers): Likewise. (selftest::test_writing_integer_numbers): Likewise. (selftest::test_writing_strings): Likewise. (selftest::test_writing_literals): Likewise. 2023-11-14 David Malcolm PR analyzer/103533 * doc/invoke.texi (Static Analyzer Options): Add the six -Wanalyzer-tainted-* warnings. Update documentation of each warning to reflect removed requirement to use -fanalyzer-checker=taint. Remove discussion of -fanalyzer-checker=taint. 2023-11-14 David Malcolm * diagnostic-format-json.cc (json_output_format::on_end_diagnostic): Update calls to m_context callbacks to use member functions; tighten up scopes. * diagnostic-format-sarif.cc (sarif_builder::make_result_object): Likewise. (sarif_builder::make_reporting_descriptor_object_for_warning): Likewise. * diagnostic.cc (diagnostic_context::initialize): Update for callbacks being moved into m_option_callbacks and being renamed. (diagnostic_context::set_option_hooks): New. (diagnostic_option_classifier::classify_diagnostic): Update call to global_dc->m_option_enabled to use option_enabled_p. (diagnostic_context::print_option_information): Update calls to m_context callbacks to use member functions; tighten up scopes. (diagnostic_context::diagnostic_enabled): Likewise. * diagnostic.h (diagnostic_option_enabled_cb): New typedef. (diagnostic_make_option_name_cb): New typedef. (diagnostic_make_option_url_cb): New typedef. (diagnostic_context::option_enabled_p): New. (diagnostic_context::make_option_name): New. (diagnostic_context::make_option_url): New. (diagnostic_context::set_option_hooks): New decl. (diagnostic_context::m_option_enabled): Rename to m_option_enabled_cb and move within m_option_callbacks, using typedef. (diagnostic_context::m_option_state): Move within m_option_callbacks. (diagnostic_context::m_option_name): Rename to m_make_option_name_cb and move within m_option_callbacks, using typedef. (diagnostic_context::m_get_option_url): Likewise, renaming to m_make_option_url_cb. * lto-wrapper.cc (print_lto_docs_link): Update call to m_context callback to use member function. (main): Use diagnostic_context::set_option_hooks. * opts-diagnostic.h (option_name): Make context param const. (get_option_url): Likewise. * opts.cc (option_name): Likewise. (get_option_url): Likewise. * toplev.cc (general_init): Use diagnostic_context::set_option_hooks. 2023-11-14 David Malcolm * selftest-diagnostic.cc (test_diagnostic_context::test_diagnostic_context): Use diagnostic_start_span. * tree-diagnostic-path.cc (struct event_range): Likewise. 2023-11-14 David Malcolm * diagnostic-show-locus.cc (diagnostic_context::show_locus): Update for renaming of text callbacks fields. * diagnostic.cc (diagnostic_context::initialize): Likewise. * diagnostic.h (class diagnostic_context): Add "friend" for accessors to m_text_callbacks. (diagnostic_context::m_text_callbacks): Make private, and add an "m_" prefix to field names. (diagnostic_starter): Convert from macro to inline function. (diagnostic_start_span): New. (diagnostic_finalizer): Convert from macro to inline function. 2023-11-14 David Malcolm * diagnostic.h (diagnostic_ready_p): Convert from macro to inline function. 2023-11-14 Uros Bizjak PR target/78904 * config/i386/i386.md (*addqi_ext_1_slp): New define_insn_and_split pattern. (*subqi_ext_1_slp): Ditto. (*qi_ext_1_slp): Ditto. 2023-11-14 Andrew Stubbs PR target/112481 * expr.cc (store_constructor): Use OPTAB_WIDEN for mask adjustment. 2023-11-14 David Malcolm * diagnostic-format-sarif.cc (sarif_builder::get_sarif_column): Use m_context's file_cache. (sarif_builder::maybe_make_artifact_content_object): Likewise. (sarif_builder::get_source_lines): Likewise. * diagnostic-show-locus.cc (exploc_with_display_col::exploc_with_display_col): Add file_cache param. (layout::m_file_cache): New field. (make_range): Add file_cache param. (selftest::test_layout_range_for_single_point): Create and use a temporary file_cache. (selftest::test_layout_range_for_single_line): Likewise. (selftest::test_layout_range_for_multiple_lines): Likewise. (layout::layout): Initialize m_file_cache from the context and use it. (layout::maybe_add_location_range): Use m_file_cache. (layout::calculate_x_offset_display): Likewise. (get_affected_range): Add file_cache param. (get_printed_columns): Likewise. (line_corrections::line_corrections): Likewwise. (line_corrections::m_file_cache): New field. (source_line::source_line): Add file_cache param. (line_corrections::add_hint): Use m_file_cache. (layout::print_trailing_fixits): Likewise. (layout::print_line): Likewise. (selftest::test_layout_x_offset_display_utf8): Create and use a temporary file_cache. (selftest::test_layout_x_offset_display_tab): Likewise. (selftest::test_diagnostic_show_locus_one_liner_utf8): Likewise. (selftest::test_add_location_if_nearby): Pass global_dc's file_cache to temp_source_file ctor. (selftest::test_overlapped_fixit_printing): Create and use a temporary file_cache. (selftest::test_overlapped_fixit_printing_utf8): Likewise. (selftest::test_overlapped_fixit_printing_2): Use dc's file_cache. * diagnostic.cc (diagnostic_context::initialize): Always create a file_cache. (diagnostic_context::initialize_input_context): Assume m_file_cache has already been created. (diagnostic_context::create_edit_context): Pass m_file_cache to edit_context. (convert_column_unit): Add file_cache param. (diagnostic_context::converted_column): Use context's file_cache. (print_parseable_fixits): Add file_cache param. (diagnostic_context::report_diagnostic): Use context's file_cache. (selftest::test_print_parseable_fixits_none): Create and use a temporary file_cache. (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): Likewise. * diagnostic.h (diagnostic_context::file_cache_init): Delete. (diagnostic_context::get_file_cache): Convert return type from pointer to reference. * edit-context.cc (edited_file::get_file_cache): New. (edited_file::m_edit_context): New. (edit_context::edit_context): Add file_cache param. (edit_context::get_or_insert_file): Pass this to edited_file's ctor. (edited_file::edited_file): Add edit_context param. (edited_file::print_content): Use get_file_cache. (edited_file::print_diff_hunk): Likewise. (edited_file::print_run_of_changed_lines): Likewise. (edited_file::get_or_insert_line): Likewise. (edited_file::get_num_lines): Likewise. (edited_line::edited_line): Pass in file_cache and use it. (selftest::test_get_content): Create and use a temporary file_cache. (selftest::test_applying_fixits_insert_before): Likewise. (selftest::test_applying_fixits_insert_after): Likewise. (selftest::test_applying_fixits_insert_after_at_line_end): Likewise. (selftest::test_applying_fixits_insert_after_failure): Likewise. (selftest::test_applying_fixits_insert_containing_newline): Likewise. (selftest::test_applying_fixits_growing_replace): Likewise. (selftest::test_applying_fixits_shrinking_replace): Likewise. (selftest::test_applying_fixits_replace_containing_newline): Likewise. (selftest::test_applying_fixits_remove): Likewise. (selftest::test_applying_fixits_multiple): Likewise. (selftest::test_applying_fixits_multiple_lines): Likewise. (selftest::test_applying_fixits_modernize_named_init): Likewise. (selftest::test_applying_fixits_modernize_named_init): Likewise. (selftest::test_applying_fixits_unreadable_file): Likewise. (selftest::test_applying_fixits_line_out_of_range): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. (selftest::test_applying_fixits_column_validation): Likewise. * edit-context.h (edit_context::edit_context): Add file_cache param. (edit_context::get_file_cache): New. (edit_context::m_file_cache): New. * final.cc: Include "diagnostic.h". (asm_show_source): Use global_dc's file_cache. * gcc-rich-location.cc (blank_line_before_p): Add file_cache param. (use_new_line): Likewise. (gcc_rich_location::add_fixit_insert_formatted): Use global dc's file_cache. * input.cc (diagnostic_file_cache_init): Delete. (diagnostic_context::file_cache_init): Delete. (diagnostics_file_cache_forcibly_evict_file): Delete. (file_cache::missing_trailing_newline_p): New. (file_cache::evicted_cache_tab_entry): Don't call diagnostic_file_cache_init. (location_get_source_line): Delete. (get_source_text_between): Add file_cache param. (get_source_file_content): Delete. (location_missing_trailing_newline): Delete. (location_compute_display_column): Add file_cache param. (dump_location_info): Create and use temporary file_cache. (get_substring_ranges_for_loc): Add file_cache param. (get_location_within_string): Likewise. (get_source_range_for_char): Likewise. (get_num_source_ranges_for_substring): Likewise. (selftest::test_reading_source_line): Create and use temporary file_cache. (selftest::lexer_test::m_file_cache): New field. (selftest::assert_char_at_range): Use test.m_file_cache. (selftest::assert_num_substring_ranges): Likewise. (selftest::assert_has_no_substring_ranges): Likewise. (selftest::test_lexer_string_locations_concatenation_2): Likewise. * input.h (class file_cache): New forward decl. (location_compute_display_column): Add file_cache param. (location_get_source_line): Delete. (get_source_text_between): Add file_cache param. (get_source_file_content): Delete. (location_missing_trailing_newline): Delete. (file_cache::missing_trailing_newline_p): New decl. (diagnostics_file_cache_forcibly_evict_file): Delete. * selftest.cc (named_temp_file::named_temp_file): Add file_cache param. (named_temp_file::~named_temp_file): Optionally evict the file from the given file_cache. (temp_source_file::temp_source_file): Add file_cache param. * selftest.h (class file_cache): New forward decl. (named_temp_file::named_temp_file): Add file_cache param. (named_temp_file::m_file_cache): New field. (temp_source_file::temp_source_file): Add file_cache param. * substring-locations.h (get_location_within_string): Add file_cache param. 2023-11-14 David Malcolm * diagnostic-format-json.cc: Use type-specific "set_*" functions of json::object to avoid naked new of json value subclasses. * diagnostic-format-sarif.cc: Likewise. * gcov.cc: Likewise. * json.cc (object::set_string): New. (object::set_integer): New. (object::set_float): New. (object::set_bool): New. (selftest::test_writing_objects): Use object::set_string. * json.h (object::set_string): New decl. (object::set_integer): New decl. (object::set_float): New decl. (object::set_bool): New decl. * optinfo-emit-json.cc: Use type-specific "set_*" functions of json::object to avoid naked new of json value subclasses. * timevar.cc: Likewise. * tree-diagnostic-path.cc: Likewise. 2023-11-14 Andrew MacLeod PR tree-optimization/112509 * tree-vrp.cc (find_case_label_range): Create range from case labels. 2023-11-14 Stefan Schulze Frielinghaus * config/s390/s390-builtin-types.def: Add/remove types. * config/s390/s390-builtins.def (s390_vec_scatter_element_flt): The type for the offset should be UV4SI instead of V4SF. 2023-11-14 Saurabh Jha PR target/112337 * config/arm/arm.cc (mve_vector_mem_operand): Add a REG_P check for INC and DEC operations. 2023-11-14 Richard Biener PR tree-optimization/111233 PR tree-optimization/111652 PR tree-optimization/111727 PR tree-optimization/111838 PR tree-optimization/112113 * tree-ssa-loop-split.cc (patch_loop_exit): Get the new guard code instead of the old guard stmt. (split_loop): Adjust. 2023-11-14 Richard Biener * tree-loop-distribution.cc (loop_distribution::data_dep_in_cycle_p): Consider all loops in the nest when looking for lambda_vector_zerop. 2023-11-14 Richard Biener PR tree-optimization/112281 * tree-loop-distribution.cc (pg_add_dependence_edges): Preserve stmt order when the innermost loop has exact overlap. 2023-11-14 Jakub Jelinek PR target/112523 PR ada/112514 * config/i386/i386.md (3_doubleword_lowpart): Move operands[1] aka low part of input rather than operands[3] aka high part of input to output if not the same register. 2023-11-14 Andreas Krebbel * config.gcc: Add s390-gen-builtins.h to target_gtfiles. * config/s390/s390-builtins.h (s390_builtin_types) (s390_builtin_fn_types, s390_builtin_decls): Add GTY marker. * config/s390/t-s390 (EXTRA_GTYPE_DEPS): Add s390-gen-builtins.h. Add build rule for s390-gen-builtins.h. 2023-11-14 Andreas Krebbel * config/s390/s390-c.cc (s390_fn_types_compatible): Add a check for error_mark_node. 2023-11-14 Jakub Jelinek PR c/111309 * builtins.def (BUILT_IN_CLZG, BUILT_IN_CTZG, BUILT_IN_CLRSBG, BUILT_IN_FFSG, BUILT_IN_PARITYG, BUILT_IN_POPCOUNTG): New builtins. * builtins.cc (fold_builtin_bit_query): New function. (fold_builtin_1): Use it for BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G. (fold_builtin_2): Use it for BUILT_IN_{CLZ,CTZ}G. * fold-const-call.cc: Fix comment typo on tm.h inclusion. (fold_const_call_ss): Handle CFN_BUILT_IN_{CLZ,CTZ,CLRSB,FFS,PARITY,POPCOUNT}G. (fold_const_call_sss): New function. (fold_const_call_1): Call it for 2 argument functions returning scalar when passed 2 INTEGER_CSTs. * genmatch.cc (cmp_operand): For function calls also compare number of arguments. (fns_cmp): New function. (dt_node::gen_kids): Sort fns and generic_fns. (dt_node::gen_kids_1): Handle fns with the same id but different number of arguments. * match.pd (CLZ simplifications): Drop checks for defined behavior at zero. Add variant of simplifications for IFN_CLZ with 2 arguments. (CTZ simplifications): Drop checks for defined behavior at zero, don't optimize precisions above MAX_FIXED_MODE_SIZE. Add variant of simplifications for IFN_CTZ with 2 arguments. (a != 0 ? CLZ(a) : CST -> .CLZ(a)): Use TREE_TYPE (@3) instead of type, add BITINT_TYPE handling, create 2 argument IFN_CLZ rather than one argument. Add variant for matching CLZ with 2 arguments. (a != 0 ? CTZ(a) : CST -> .CTZ(a)): Similarly. * gimple-lower-bitint.cc (bitint_large_huge::lower_bit_query): New method. (bitint_large_huge::lower_call): Use it for IFN_{CLZ,CTZ,CLRSB,FFS} and IFN_{PARITY,POPCOUNT} calls. * gimple-range-op.cc (cfn_clz::fold_range): Don't check CLZ_DEFINED_VALUE_AT_ZERO for m_gimple_call_internal_p, instead assume defined value at zero if the call has 2 arguments and use second argument value for that case. (cfn_ctz::fold_range): Similarly. (gimple_range_op_handler::maybe_builtin_call): Use op_cfn_clz_internal or op_cfn_ctz_internal only if internal fn call has 2 arguments and set m_op2 in that case. * tree-vect-patterns.cc (vect_recog_ctz_ffs_pattern, vect_recog_popcount_clz_ctz_ffs_pattern): For value defined at zero use second argument of calls if present, otherwise assume UB at zero, create 2 argument .CLZ/.CTZ calls if needed. * tree-vect-stmts.cc (vectorizable_call): Handle 2 argument .CLZ/.CTZ calls. * tree-ssa-loop-niter.cc (build_cltz_expr): Create 2 argument .CLZ/.CTZ calls if needed. * tree-ssa-forwprop.cc (simplify_count_trailing_zeroes): Create 2 argument .CTZ calls if needed. * tree-ssa-phiopt.cc (cond_removal_in_builtin_zero_pattern): Handle 2 argument .CLZ/.CTZ calls, handle BITINT_TYPE, create 2 argument .CLZ/.CTZ calls. * doc/extend.texi (__builtin_clzg, __builtin_ctzg, __builtin_clrsbg, __builtin_ffsg, __builtin_parityg, __builtin_popcountg): Document. 2023-11-14 Xi Ruoyao PR target/112330 * config/loongarch/genopts/loongarch.opt.in: Add -m[no]-pass-relax-to-as. Change the default of -m[no]-relax to account conditional branch relaxation support status. * config/loongarch/loongarch.opt: Regenerate. * configure.ac (gcc_cv_as_loongarch_cond_branch_relax): Check if the assembler supports conditional branch relaxation. * configure: Regenerate. * config.in: Regenerate. Note that there are some unrelated changes introduced by r14-5424 (which does not contain a config.in regeneration). * config/loongarch/loongarch-opts.h (HAVE_AS_COND_BRANCH_RELAXATION): Define to 0 if not defined. * config/loongarch/loongarch-driver.h (ASM_MRELAX_DEFAULT): Define. (ASM_MRELAX_SPEC): Define. (ASM_SPEC): Use ASM_MRELAX_SPEC instead of "%{mno-relax}". * config/loongarch/loongarch.cc: Take the setting of -m[no-]relax into account when determining the default of -mexplicit-relocs=. * doc/invoke.texi: Document -m[no-]relax and -m[no-]pass-mrelax-to-as for LoongArch. Update the default value of -mexplicit-relocs=. 2023-11-14 liuhongt PR tree-optimization/112496 * tree-vect-loop.cc (vectorizable_nonlinear_induction): Return false when !tree_nop_conversion_p (TREE_TYPE (vectype), TREE_TYPE (init_expr)). 2023-11-14 Xi Ruoyao * config/loongarch/sync.md (mem_thread_fence): Remove redundant check. (mem_thread_fence_1): Emit finer-grained DBAR hints for different memory models, instead of 0. 2023-11-14 Jakub Jelinek PR middle-end/112511 * tree.cc (type_contains_placeholder_1): Handle BITINT_TYPE like INTEGER_TYPE. 2023-11-14 Jakub Jelinek Hu, Lin1 PR target/112435 * config/i386/sse.md (avx512vl_shuf_32x4_1, avx512dq_shuf_64x2_1): Add alternative with just x instead of v constraints and xjm instead of vm and use vblendps as optimization only with that alternative. 2023-11-14 liuhongt PR tree-optimization/105735 PR tree-optimization/111972 * tree-scalar-evolution.cc (analyze_and_compute_bitop_with_inv_effect): Handle bitop with INTEGER_CST. 2023-11-13 Arsen Arsenović * configure: Regenerate. * aclocal.m4: Regenerate. * Makefile.in (LIBDEPS): Remove (potential) ./ prefix from LIBINTL_DEP. * doc/install.texi: Document new (notable) flags added by the optional gettext tree and by AM_GNU_GETTEXT. Document libintl/libc with gettext dependency. 2023-11-13 Uros Bizjak * config/i386/i386-expand.h (gen_pushfl): New prototype. (gen_popfl): Ditto. * config/i386/i386-expand.cc (ix86_expand_builtin) [case IX86_BUILTIN_READ_FLAGS]: Use gen_pushfl. [case IX86_BUILTIN_WRITE_FLAGS]: Use gen_popfl. * config/i386/i386.cc (gen_pushfl): New function. (gen_popfl): Ditto. * config/i386/i386.md (unspec): Add UNSPEC_PUSHFL and UNSPEC_POPFL. (@pushfl2): Rename from *pushfl2. Rewrite as unspec using UNSPEC_PUSHFL. (@popfl1): Rename from *popfl1. Rewrite as unspec using UNSPEC_POPFL. 2023-11-13 Uros Bizjak PR target/112494 * config/i386/i386.cc (ix86_cc_mode) [default]: Return CCmode. 2023-11-13 Robin Dapp * config/riscv/riscv-vsetvl.cc (source_equal_p): Use pointer equality for REG_EQUAL. 2023-11-13 Richard Biener PR tree-optimization/112495 * tree-data-ref.cc (runtime_alias_check_p): Reject checks between different address spaces. 2023-11-13 Richard Biener PR middle-end/112487 * tree-inline.cc (setup_one_parameter): When the parameter is unused only insert a debug bind when there's not a gross mismatch in value and declared parameter type. Do not assert there effectively isn't. 2023-11-13 Juzhe-Zhong * config/riscv/riscv-v.cc (rvv_builder::combine_sequence_use_merge_profitable_p): New function. (expand_vector_init_merge_combine_sequence): Ditto. (expand_vec_init): Adapt for new optimization. 2023-11-13 liuhongt * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate): Handle V4HF/V4BF and V2HF/V2BF. (ix86_expand_vector_init_one_nonzero): Ditto. (ix86_expand_vector_init_one_var): Ditto. (ix86_expand_vector_init_general): Ditto. (ix86_expand_vector_set_var): Ditto. (ix86_expand_vector_set): Ditto. (ix86_expand_vector_extract): Ditto. * config/i386/mmx.md (mmxdoublevecmode): Extend to V4HF/V4BF/V2HF/V2BF. (*mmx_pinsrw): Extend to V4FI_64, add a new alternative (&x, x, x), add a new define_split after the pattern. (*mmx_pextrw): New define_insn. (mmx_pshufw_1): Rename to .. (mmx_pshufw_1): .. this, extend to V4FI_64. (*mmx_pblendw64): Extend to V4FI_64. (*vec_dup): New define_insn. (vec_setv4hi): Rename to .. (vec_set): .. this, and extend to V4FI_64 (vec_extractv4hihi): Rename to .. (vec_extract): .. this, and extend to V4FI_64. (vec_init): New define_insn. (*pinsrw): Extend to V2FI_32, add a new alternative (&x, x, x), and add a new define_split after it. (*pextrw): New define_insn. (vec_setv2hi): Rename to .. (vec_set): .. this, extend to V2FI_32. (vec_extractv2hihi): Rename to .. (vec_extract): .. this, extend to V2FI_32. (*punpckwd): Extend to V2FI_32. (*pshufw_1): Rename to .. (*pshufw_1): .. this, extend to V2FI_32. (vec_initv2hihi): Rename to .. (vec_init): .. this, and extend to V2FI_32. (*vec_dup): New define_insn. * config/i386/sse.md (*vec_extract): Refine constraint from v to Yw. 2023-11-13 Roger Sayle * config/arc/arc.md (UNSPEC_ARC_CC_NEZ): New UNSPEC that represents the carry flag being set if the operand is non-zero. (adc_f): New define_insn representing adc with updated flags. (ashrdi3): New define_expand that only handles shifts by 1. (ashrdi3_cnt1): New pre-reload define_insn_and_split. (lshrdi3): New define_expand that only handles shifts by 1. (lshrdi3_cnt1): New pre-reload define_insn_and_split. (rrcsi2): New define_insn for rrc (SImode rotate right through carry). (rrcsi2_carry): Likewise for rrc.f, as above but updating flags. (rotldi3): New define_expand that only handles rotates by 1. (rotldi3_cnt1): New pre-reload define_insn_and_split. (rotrdi3): New define_expand that only handles rotates by 1. (rotrdi3_cnt1): New pre-reload define_insn_and_split. (lshrsi3_cnt1_carry): New define_insn for lsr.f. (ashrsi3_cnt1_carry): New define_insn for asr.f. (btst_0_carry): New define_insn for asr.f without result. 2023-11-13 Roger Sayle * config/arc/arc.cc (TARGET_FOLD_BUILTIN): Define to arc_fold_builtin. (arc_fold_builtin): New function. Convert ARC_BUILTIN_SWAP into a rotate. Evaluate ARC_BUILTIN_NORM and ARC_BUILTIN_NORMW of constant arguments. * config/arc/arc.md (UNSPEC_ARC_SWAP): Delete. (normw): Make output template/assembler whitespace consistent. (swap): Remove define_insn, only use of SWAP UNSPEC. * config/arc/builtins.def: Tweak indentation. (SWAP): Expand using rotlsi2_cnt16 instead of using swap. 2023-11-13 Roger Sayle * config/i386/i386.md (3_doubleword_lowpart): New define_insn_and_split to optimize register usage of doubleword right shifts followed by truncation. 2023-11-13 Jakub Jelinek * config/i386/constraints.md: Remove j constraint letter from list of unused letters. 2023-11-13 Xi Ruoyao PR rtl-optimization/112483 * simplify-rtx.cc (simplify_binary_operation_1) : Fix the simplification of (fcopysign x, NEGATIVE_CONST). 2023-11-13 Jakub Jelinek PR tree-optimization/111967 * gimple-range-cache.cc (block_range_cache::set_bb_range): Grow m_ssa_ranges to num_ssa_names rather than num_ssa_names + 1. (block_range_cache::dump): Iterate from 1 rather than 0. Don't use ssa_name (x) unless m_ssa_ranges[x] is non-NULL. Iterate to m_ssa_ranges.length () rather than num_ssa_names. 2023-11-13 Xi Ruoyao * config/loongarch/loongarch.md (LD_AT_LEAST_32_BIT): New mode iterator. (ST_ANY): New mode iterator. (define_peephole2): Use LD_AT_LEAST_32_BIT instead of GPR and ST_ANY instead of QHWD for applicable patterns. 2023-11-13 Xi Ruoyao PR target/112476 * config/loongarch/loongarch.cc (loongarch_expand_vec_cond_mask_expr): Call simplify_gen_subreg instead of gen_rtx_SUBREG. 2023-11-13 Pan Li * config/riscv/autovec.md: Add bridge mode to lrint and lround pattern. * config/riscv/riscv-protos.h (expand_vec_lrint): Add new arg bridge machine mode. (expand_vec_lround): Ditto. * config/riscv/riscv-v.cc (emit_vec_widden_cvt_f_f): New helper func impl to emit vfwcvt.f.f. (emit_vec_rounding_to_integer): Handle the HF to DI rounding with the bridge mode. (expand_vec_lrint): Reorder the args. (expand_vec_lround): Ditto. (expand_vec_lceil): Ditto. (expand_vec_lfloor): Ditto. * config/riscv/vector-iterators.md: Add vector HFmode and bridge mode for converting to DI. 2023-11-12 Jeff Law Revert: 2023-11-11 Jin Ma * haifa-sched.cc (use_or_clobber_starts_range_p): New. (prune_ready_list): USE or CLOBBER should delay execution if it starts a new live range. 2023-11-12 Uros Bizjak * config/i386/i386.md (*stack_protect_set_4s__di): Remove alternative 0. 2023-11-11 Eric Botcazou * ipa-cp.cc (print_ipcp_constant_value): Move to... (values_equal_for_ipcp_p): Deal with VAR_DECLs from the constant pool. * ipa-prop.cc (ipa_print_constant_value): ...here. Likewise. (ipa_print_node_jump_functions_for_edge): Call the function ipa_print_constant_value to print IPA_JF_CONST elements. 2023-11-11 Jin Ma * haifa-sched.cc (use_or_clobber_starts_range_p): New. (prune_ready_list): USE or CLOBBER should delay execution if it starts a new live range. 2023-11-11 Jakub Jelinek PR middle-end/112430 * tree-ssa-math-opts.cc (match_uaddc_usubc): Remove temp_stmts in the order they were pushed rather than in reverse order. Call release_defs after gsi_remove. 2023-11-11 Richard Sandiford * target.def (mode_switching.backprop): New hook. * doc/tm.texi.in (TARGET_MODE_BACKPROP): New @hook. * doc/tm.texi: Regenerate. * mode-switching.cc (struct bb_info): Add single_succ. (confluence_info): Add transp field. (single_succ_confluence_n, single_succ_transfer): New functions. (backprop_confluence_n, backprop_transfer): Likewise. (optimize_mode_switching): Use them. Push mode transitions onto a block's incoming edges, if the backprop hook requires it. 2023-11-11 Richard Sandiford * target.def (mode_switching.confluence): New hook. * doc/tm.texi (TARGET_MODE_CONFLUENCE): New @hook. * doc/tm.texi.in: Regenerate. * mode-switching.cc (confluence_info): New variable. (mode_confluence, forward_confluence_n, forward_transfer): New functions. (optimize_mode_switching): Use them to calculate mode_in when TARGET_MODE_CONFLUENCE is defined. 2023-11-11 Richard Sandiford * mode-switching.cc (commit_mode_sets): Use 1-based edge aux values. 2023-11-11 Richard Sandiford * target.def (mode_switching.after): Add a regs_live parameter. * doc/tm.texi: Regenerate. * config/epiphany/epiphany-protos.h (epiphany_mode_after): Update accordingly. * config/epiphany/epiphany.cc (epiphany_mode_needed): Likewise. (epiphany_mode_after): Likewise. * config/i386/i386.cc (ix86_mode_after): Likewise. * config/riscv/riscv.cc (riscv_mode_after): Likewise. * config/sh/sh.cc (sh_mode_after): Likewise. * mode-switching.cc (optimize_mode_switching): Likewise. 2023-11-11 Richard Sandiford * target.def (mode_switching.needed): Add a regs_live parameter. * doc/tm.texi: Regenerate. * config/epiphany/epiphany-protos.h (epiphany_mode_needed): Update accordingly. * config/epiphany/epiphany.cc (epiphany_mode_needed): Likewise. * config/epiphany/mode-switch-use.cc (insert_uses): Likewise. * config/i386/i386.cc (ix86_mode_needed): Likewise. * config/riscv/riscv.cc (riscv_mode_needed): Likewise. * config/sh/sh.cc (sh_mode_needed): Likewise. * mode-switching.cc (optimize_mode_switching): Likewise. (create_pre_exit): Likewise, using the DF simulate functions to calculate the required information. 2023-11-11 Richard Sandiford * target.def (mode_switching.eh_handler): New hook. * doc/tm.texi.in (TARGET_MODE_EH_HANDLER): New @hook. * doc/tm.texi: Regenerate. * mode-switching.cc (optimize_mode_switching): Use eh_handler to get the mode on entry to an exception handler. 2023-11-11 Richard Sandiford * mode-switching.cc (optimize_mode_switching): Mark the exit block as nontransparent if it requires a specific mode. Handle the entry and exit mode as sibling rather than nested concepts. Remove outdated comment. 2023-11-11 Richard Sandiford * mode-switching.cc (optimize_mode_switching): Initially compute transparency in a bit-per-block bitmap. 2023-11-11 Richard Sandiford * mode-switching.cc (seginfo): Add a prev_mode field. (new_seginfo): Take and initialize the prev_mode. (optimize_mode_switching): Update calls accordingly. Use the recorded modes during the emit phase, rather than computing one on the fly. 2023-11-11 Richard Sandiford * mode-switching.cc (add_seginfo): Replace head pointer with a pointer to the tail pointer. (optimize_mode_switching): Update calls accordingly. 2023-11-11 Richard Sandiford * mode-switching.cc (optimize_mode_switching): Call df_note_add_problem. 2023-11-11 Richard Sandiford * target.def: Tweak documentation of mode-switching hooks. * doc/tm.texi.in (OPTIMIZE_MODE_SWITCHING): Tweak documentation. (NUM_MODES_FOR_MODE_SWITCHING): Likewise. * doc/tm.texi: Regenerate. 2023-11-11 Martin Uecker PR c/110815 PR c/112428 * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes): remove warning for parameters declared with `static`. 2023-11-11 Joern Rennecke * doc/sourcebuild.texi (Scan the assembly output): Document change. 2023-11-10 Mao PR middle-end/110983 * doc/invoke.texi (Option Summary): Add -fpatchable-function-entry. 2023-11-10 Maciej W. Rozycki * config/riscv/riscv.md (length): Fix indentation for branch and jump length calculation expressions. 2023-11-10 Eric Botcazou * fold-const.cc (operand_compare::operand_equal_p) : Deal with nonempty constant CONSTRUCTORs. (operand_compare::hash_operand) : Hash DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET for FIELD_DECLs. 2023-11-10 Vladimir N. Makarov PR target/112337 * ira-costs.cc: (validate_autoinc_and_mem_addr_p): New function. (equiv_can_be_consumed_p): Use it. 2023-11-10 Richard Sandiford * read-rtl.cc (md_reader::read_mapping): Allow iterators to include other iterators. * doc/md.texi: Document the change. * config/aarch64/iterators.md (DREG2, VQ2, TX2, DX2, SX2): Include the iterator that is being duplicated, rather than reproducing it. (VSTRUCT_D): Redefine using VSTRUCT_[234]D. (VSTRUCT_Q): Likewise VSTRUCT_[234]Q. (VSTRUCT_2QD, VSTRUCT_3QD, VSTRUCT_4QD, VSTRUCT_QD): Redefine using the individual D and Q iterators. 2023-11-10 Uros Bizjak * config/i386/i386.md (stack_protect_set_1 peephole2): Explicitly check operand 2 for word_mode. (stack_protect_set_1 peephole2 #2): Ditto. (stack_protect_set_2 peephole2): Ditto. (stack_protect_set_3 peephole2): Ditto. (*stack_protect_set_4z__di): New insn patter. (*stack_protect_set_4s__di): Ditto. (stack_protect_set_4 peephole2): New peephole2 pattern to substitute stack protector scratch register clear with unrelated register initialization involving zero/sign-extend instruction. 2023-11-10 Uros Bizjak * config/i386/i386.md (shift): Use SAL insted of SLL for ashift insn mnemonic. 2023-11-10 Juzhe-Zhong PR tree-optimization/112438 * tree-vect-loop.cc (vectorizable_induction): Bugfix when LOOP_VINFO_USING_SELECT_VL_P. 2023-11-10 Juzhe-Zhong * config/riscv/riscv-protos.h (enum insn_type): New enum. * config/riscv/riscv-v.cc (rvv_builder::combine_sequence_use_slideup_profitable_p): New function. (expand_vector_init_slideup_combine_sequence): Ditto. (expand_vec_init): Add slideup combine optimization. 2023-11-10 Robin Dapp PR tree-optimization/112464 * tree-vect-loop.cc (vectorize_fold_left_reduction): Use vect_orig_stmt on scalar_dest_def_info. 2023-11-10 Jin Ma * config/riscv/riscv.cc (riscv_for_each_saved_reg): Place the interrupt operation before the XTheadMemPair. 2023-11-10 Richard Biener PR tree-optimization/110221 * tree-vect-slp.cc (vect_schedule_slp_node): When loop masking / len is applied make sure to not schedule intenal defs outside of the loop. 2023-11-10 Andrew Stubbs * expr.cc (store_constructor): Add "and" operation to uniform mask generation. 2023-11-10 Andrew Stubbs PR target/112308 * config/gcn/gcn-valu.md (add3): Fix B constraint and switch to the new format. (add3_dup): Likewise. (add3_vcc): Likewise. (add3_vcc_dup): Likewise. (add3_vcc_zext_dup): Likewise. (add3_vcc_zext_dup_exec): Likewise. (add3_vcc_zext_dup2): Likewise. (add3_vcc_zext_dup2_exec): Likewise. 2023-11-10 Richard Biener PR middle-end/112469 * match.pd (cond ? op a : b -> .COND_op (cond, a, b)): Add missing view_converts. 2023-11-10 Andrew Stubbs * config/gcn/gcn.cc (gcn_expand_reduc_scalar): Add clobber to DImode min/max instructions. 2023-11-10 Chenghui Pan * config/loongarch/lsx.md: Fix instruction name typo in lsx_vreplgr2vr_ template. 2023-11-10 Juzhe-Zhong * config/riscv/autovec.md (vec_init): Split patterns. 2023-11-10 Pan Li Revert: 2023-11-10 Pan Li * config/riscv/riscv-v.cc (expand_vector_init_trailing_same_elem): New fun impl to expand the insn when trailing same elements. (expand_vec_init): Try trailing same elements when vec_init. 2023-11-10 Pan Li * config/riscv/riscv-v.cc (expand_vector_init_trailing_same_elem): New fun impl to expand the insn when trailing same elements. (expand_vec_init): Try trailing same elements when vec_init. 2023-11-10 Juzhe-Zhong * config/riscv/autovec-opt.md (*cond_copysign): Remove. * config/riscv/autovec.md (cond_copysign): New pattern. 2023-11-10 Pan Li PR target/112432 * internal-fn.def (LRINT): Add FLOATN support. (LROUND): Ditto. (LLRINT): Ditto. (LLROUND): Ditto. 2023-11-10 Jeff Law * config/h8300/combiner.md (single bit sign_extract): Avoid recently added patterns for H8/SX. (single bit zero_extract): New patterns. 2023-11-10 liuhongt PR target/112443 * config/i386/sse.md (*avx2_pcmp3_4): Fix swap condition from LT to GT since there's not in the pattern. (*avx2_pcmp3_5): Ditto. 2023-11-10 Jose E. Marchesi * config/bpf/bpf.cc (bpf_print_register): Accept modifier code 'W' to force emitting register names using the wN form. * config/bpf/bpf.md (*mulsidi3_zeroextend): Force operands to always use wN written form in pseudo-C assembly syntax. 2023-11-09 David Malcolm * diagnostic-show-locus.cc (layout::m_line_table): New field. (compatible_locations_p): Convert to... (layout::compatible_locations_p): ...this, replacing uses of line_table global with m_line_table. (layout::layout): Convert "richloc" param from a pointer to a const reference. Initialize m_line_table member. (layout::maybe_add_location_range): Replace uses of line_table global with m_line_table. Pass the latter to linemap_client_expand_location_to_spelling_point. (layout::print_leading_fixits): Pass m_line_table to affects_line_p. (layout::print_trailing_fixits): Likewise. (gcc_rich_location::add_location_if_nearby): Update for change to layout ctor params. (diagnostic_show_locus): Convert to... (diagnostic_context::maybe_show_locus): ...this, converting richloc param from a pointer to a const reference. Make "loc" const. Split out printing part of function to... (diagnostic_context::show_locus): ...this. (selftest::test_offset_impl): Update for change to layout ctor params. (selftest::test_layout_x_offset_display_utf8): Likewise. (selftest::test_layout_x_offset_display_tab): Likewise. (selftest::test_tab_expansion): Likewise. * diagnostic.h (diagnostic_context::maybe_show_locus): New decl. (diagnostic_context::show_locus): New decl. (diagnostic_show_locus): Convert from a decl to an inline function. * gdbinit.in (break-on-diagnostic): Update from a breakpoint on diagnostic_show_locus to one on diagnostic_context::maybe_show_locus. * genmatch.cc (linemap_client_expand_location_to_spelling_point): Add "set" param and use it in place of line_table global. * input.cc (expand_location_1): Likewise. (expand_location): Update for new param of expand_location_1. (expand_location_to_spelling_point): Likewise. (linemap_client_expand_location_to_spelling_point): Add "set" param and use it in place of line_table global. * tree-diagnostic-path.cc (event_range::print): Pass line_table for new param of linemap_client_expand_location_to_spelling_point. 2023-11-09 Uros Bizjak * config/i386/i386.md (@stack_protect_set_1__): Use W mode iterator instead of SWI48. Output MOV instead of XOR for TARGET_USE_MOV0. (stack_protect_set_1 peephole2): Use integer modes with mode size <= word mode size for operand 3. (stack_protect_set_1 peephole2 #2): New peephole2 pattern to substitute stack protector scratch register clear with unrelated register initialization, originally in front of stack protector sequence. (*stack_protect_set_3__): New insn pattern. (stack_protect_set_1 peephole2): New peephole2 pattern to substitute stack protector scratch register clear with unrelated register initialization involving LEA instruction. 2023-11-09 Vladimir N. Makarov PR rtl-optimization/110215 * ira-lives.cc: (add_conflict_from_region_landing_pads): New function. (process_bb_node_lives): Use it. 2023-11-09 Alexandre Oliva * config/i386/i386.cc (symbolic_base_address_p, base_address_p): New, factored out from... (extract_base_offset_in_addr): ... here and extended to recognize REG+GOTOFF, as in gcc.target/i386/sse2-load-multi.c and sse2-store-multi.c with PIE enabled by default. 2023-11-09 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64-sve.md (cond_copysign): New. 2023-11-09 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64.md (copysign3): Handle copysign (x, -1). * config/aarch64/aarch64-simd.md (copysign3): Likewise. * config/aarch64/aarch64-sve.md (copysign3): Likewise. 2023-11-09 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64.md (3): Add SVE split case. * config/aarch64/aarch64-simd.md (ior3): Likewise. * config/aarch64/predicates.md(aarch64_orr_imm_sve_advsimd): New. 2023-11-09 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64.md (*mov_aarch64, *movsi_aarch64, *movdi_aarch64): Add new w -> Z case. * config/aarch64/iterators.md (Vbtype): Add QI and HI. 2023-11-09 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64-protos.h (aarch64_simd_special_constant_p, aarch64_maybe_generate_simd_constant): New. * config/aarch64/aarch64-simd.md (*aarch64_simd_mov, *aarch64_simd_mov): Add new coden for special constants. * config/aarch64/aarch64.cc (aarch64_extract_vec_duplicate_wide_int): Take optional mode. (aarch64_simd_special_constant_p, aarch64_maybe_generate_simd_constant): New. * config/aarch64/aarch64.md (*movdi_aarch64): Add new codegen for special constants. * config/aarch64/constraints.md (Dx): new. 2023-11-09 Tamar Christina PR tree-optimization/109154 * internal-fn.def (COPYSIGN): New. * match.pd (UNCOND_BINARY, COND_BINARY): Map IFN_COPYSIGN to IFN_COND_COPYSIGN. * optabs.def (cond_copysign_optab, cond_len_copysign_optab): New. 2023-11-09 Tamar Christina PR tree-optimization/109154 * match.pd: Add new neg+abs rule, remove inverse copysign rule. 2023-11-09 Tamar Christina PR tree-optimization/109154 * match.pd: expand existing copysign optimizations. 2023-11-09 Tatsuyuki Ishi PR driver/111605 * collect2.cc (main): Do not prepend target triple to -fuse-ld=lld,mold. 2023-11-09 Richard Biener PR tree-optimization/111133 * tree-vect-stmts.cc (vect_build_scatter_store_calls): Remove and refactor to ... (vect_build_one_scatter_store_call): ... this new function. (vectorizable_store): Use vect_check_scalar_mask to record the SLP node for the mask operand. Code generate scatters with builtin decls from the main scatter vectorization path and prepare that for SLP. * tree-vect-slp.cc (vect_get_operand_map): Do not look at the VDEF to decide between scatter or gather since that doesn't work for patterns. Use the LHS being an SSA_NAME or not instead. 2023-11-09 Pan Li * config/riscv/riscv.cc (riscv_frm_emit_after_bb_end): Only perform once emit when at least one succ edge is abnormal. 2023-11-09 Richard Biener * tree-vect-loop.cc (vect_verify_full_masking_avx512): Check we have integer mode masks as required by vect_get_loop_mask. 2023-11-09 Richard Biener PR tree-optimization/112444 * tree-ssa-sccvn.cc (visit_phi): Avoid using not visited defs as undefined vals. 2023-11-09 YunQiang Su * config/mips/mips.cc(mips_option_override): Set mips_abs to 2008, if mips_abs is default and mips_nan is 2008. 2023-11-09 Florian Weimer * doc/invoke.texi (Warning Options): Document -Wreturn-mismatch. Update -Wreturn-type documentation. 2023-11-09 Stefan Schulze Frielinghaus * config/s390/s390.md: Remove UNSPEC_VEC_ELTSWAP. * config/s390/vector.md (eltswapv16qi): New expander. (*eltswapv16qi): New insn and splitter. (eltswapv8hi): New insn and splitter. (eltswap): New insn and splitter for modes V_HW_4 as well as V_HW_2. * config/s390/vx-builtins.md (eltswap): Remove. (*eltswapv16qi): Remove. (*eltswap): Remove. (*eltswap_emu): Remove. 2023-11-09 Stefan Schulze Frielinghaus * config/s390/s390.cc (expand_perm_with_rot): Remove. (expand_perm_reverse_elements): New. (expand_perm_with_vster): Remove. (expand_perm_with_vstbrq): Remove. (vectorize_vec_perm_const_1): Replace removed functions with new one. 2023-11-09 Stefan Schulze Frielinghaus * config/s390/s390.cc (expand_perm_with_merge): Deal with cases where vmr{l,h} are still applicable if the operands are swapped. (expand_perm_with_vpdi): Likewise for vpdi. 2023-11-09 Stefan Schulze Frielinghaus * config/s390/s390.md (VX_CONV_INT): Remove iterator. (gf): Add float mappings. (TOINT, toint): New attribute. (*fixuns_trunc2_z13): Remove. (*fixuns_trunc2_z13): Add. (*fix_trunc2_bfp_z13): Remove. (*fix_trunc2_bfp_z13): Add. (*floatuns2_z13): Remove. (*floatuns2_z13): Add. * config/s390/vector.md (VX_VEC_CONV_INT): Remove iterator. (float2): Remove. (float2): Add. (floatuns2): Remove. (floatuns2): Add. (fix_trunc2): Remove. (fix_trunc2): Add. (fixuns_trunc2): Remove. (fixuns_trunc2): Add. 2023-11-09 Jakub Jelinek PR c/112339 * attribs.cc (attribute_ignored_p): Only return true for attr_namespace_ignored_p if as is NULL. (decl_attributes): Never add ignored attributes. 2023-11-09 Jin Ma * config/riscv/bitmanip.md: Avoid the conflict between zbb and xtheadmemidx in patterns. 2023-11-09 Richard Biener * tree-vect-stmts.cc (vectorizable_simd_clone_call): Record to the correct simd_clone_info. 2023-11-09 Juzhe-Zhong * config/riscv/riscv-vector-costs.cc (costs::preferred_new_lmul_p): Fix ICE. 2023-11-09 Alexandre Oliva * tree-cfg.cc (assign_discriminators): Handle debug stmts. 2023-11-08 Uros Bizjak PR target/82524 * config/i386/i386.md (*add_1_slp): Split insn only for unmatched operand 0. (*sub_1_slp): Ditto. (*_1_slp): Merge pattern from "*and_1_slp" and "*_1_slp" using any_logic code iterator. Split insn only for unmatched operand 0. (*neg1_slp): Split insn only for unmatched operand 0. (*one_cmpl_1_slp): Ditto. (*ashl3_1_slp): Ditto. (*_1_slp): Ditto. (*_1_slp): Ditto. (*addqi_ext_1): Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*qi_ext_2): Merge pattern from "*addqi_ext_2" and "*subqi_ext_2" using plusminus code iterator. Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*subqi_ext_1): Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*qi_ext_0): Merge pattern from "*andqi_ext_0" and and "*qi_ext_0" using any_logic code iterator. (*qi_ext_1): Merge pattern from "*andqi_ext_1" and "*qi_ext_1" using any_logic code iterator. Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*qi_ext_1_cc): Merge pattern from "*andqi_ext_1_cc" and "*xorqi_ext_1_cc" using any_logic code iterator. Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*qi_ext_2): Merge pattern from "*andqi_ext_2" and "*qi_ext_2" using any_logic code iterator. Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*qi_ext_3): Redefine as define_insn_and_split. Add alternative 1 and split insn after reload for unmatched operand 0. (*negqi_ext_1): Rename from "*negqi_ext_2". Add alternative 1 and split insn after reload for unmatched operand 0. (*one_cmplqi_ext_1): Ditto. (*ashlqi_ext_1): Ditto. (*qi_ext_1): Ditto. 2023-11-08 Richard Biener * tree-vect-stmts.cc (vectorizable_load): Adjust offset vector gathering for SLP of emulated gathers. 2023-11-08 Richard Biener * tree-vectorizer.h (vect_slp_child_index_for_operand): Add gatherscatter_p argument. * tree-vect-slp.cc (vect_slp_child_index_for_operand): Likewise. Pass it on. * tree-vect-stmts.cc (vect_check_store_rhs): Turn the rhs argument into an output, also output the SLP node associated with it. (vectorizable_simd_clone_call): Adjust. (vectorizable_store): Likewise. (vectorizable_load): Likewise. 2023-11-08 Richard Biener * tree-vect-stmts.cc (vectorizable_load): Use the correct vectorized mask operand. 2023-11-08 Lehua Ding * config/riscv/vector.md (*vsetvldi_no_side_effects_si_extend): New combine pattern. 2023-11-08 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc: Fix ICE. 2023-11-08 xuli * config/riscv/riscv-c.cc (riscv_check_builtin_call): Eliminate warning. 2023-11-08 Hongyu Wang PR target/112394 * config/i386/constraints.md (jc): New constraint that prohibits EGPR on -mno-avx. * config/i386/i386.md (*movdi_internal): Change r constraint corresponds to Yd. (*movti_internal): Likewise. 2023-11-08 Florian Weimer * doc/invoke.texi (Warning Options): Mention C diagnostics for -fpermissive. 2023-11-08 Juzhe-Zhong PR target/112092 * config/riscv/riscv-vector-builtins-bases.cc: Normalize the vsetvls. 2023-11-08 Haochen Jiang PR target/111907 * config/i386/i386.md (avx_noavx512vl): New definition for isa attribute. * config/i386/sse.md (*andnot3): Change isa attribute from avx_noavx512f to avx_noavx512vl. 2023-11-07 Pan Li * config/riscv/autovec.md: Remove the size check of lfloor. * config/riscv/riscv-v.cc (expand_vec_lfloor): Leverage emit_vec_rounding_to_integer for floor. 2023-11-07 Robin Dapp PR tree-optimization/112361 PR target/112359 PR middle-end/112406 * tree-if-conv.cc (convert_scalar_cond_reduction): Remember if loop was versioned and only then create COND_OPs. (predicate_scalar_phi): Do not create COND_OP when not vectorizing. * tree-vect-loop.cc (vect_expand_fold_left): Re-create VEC_COND_EXPR. (vectorize_fold_left_reduction): Pass mask to vect_expand_fold_left. 2023-11-07 Uros Bizjak * config/i386/predicates.md ("flags_reg_operand"): Make predicate special to avoid automatic mode checks. 2023-11-07 Martin Jambor * configure: Regenerate. 2023-11-07 Kwok Cheung Yeung * lto-cgraph.cc (enum LTO_symtab_tags): Add tag for indirect functions. (output_offload_tables): Write indirect functions. (input_offload_tables): read indirect functions. * lto-section-names.h (OFFLOAD_IND_FUNC_TABLE_SECTION_NAME): New. * omp-builtins.def (BUILT_IN_GOMP_TARGET_MAP_INDIRECT_PTR): New. * omp-offload.cc (offload_ind_funcs): New. (omp_discover_implicit_declare_target): Add functions marked with 'omp declare target indirect' to indirect functions list. (omp_finish_file): Add indirect functions to section for offload indirect functions. (execute_omp_device_lower): Redirect indirect calls on target by passing function pointer to BUILT_IN_GOMP_TARGET_MAP_INDIRECT_PTR. (pass_omp_device_lower::gate): Run pass_omp_device_lower if indirect functions are present on an accelerator device. * omp-offload.h (offload_ind_funcs): New. * tree-core.h (omp_clause_code): Add OMP_CLAUSE_INDIRECT. * tree.cc (omp_clause_num_ops): Add entry for OMP_CLAUSE_INDIRECT. (omp_clause_code_name): Likewise. * tree.h (OMP_CLAUSE_INDIRECT_EXPR): New. * config/gcn/mkoffload.cc (process_asm): Process offload_ind_funcs section. Count number of indirect functions. (process_obj): Emit number of indirect functions. * config/nvptx/mkoffload.cc (ind_func_ids, ind_funcs_tail): New. (process): Emit offload_ind_func_table in PTX code. Emit indirect function names and count in image. * config/nvptx/nvptx.cc (nvptx_record_offload_symbol): Mark indirect functions in PTX code with IND_FUNC_MAP. 2023-11-07 Tobias Burnus * doc/invoke.texi (-fopenmp, -fopenmp-simd): Adjust wording for attribute syntax supported also in C. 2023-11-07 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_print_operand): Add a %Z modifier for SVE registers. 2023-11-07 Joseph Myers * builtins.def (DEF_C2X_BUILTIN): Rename to DEF_C23_BUILTIN and use flag_isoc23 and function_c23_misc. * config/rl78/rl78.cc (rl78_option_override): Compare lang_hooks.name with "GNU C23" not "GNU C2X". * coretypes.h (function_c2x_misc): Rename to function_c23_misc. * doc/cpp.texi (@code{__has_attribute}): Refer to C23 instead of C2x. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * dwarf2out.cc (highest_c_language, gen_compile_unit_die): Compare against and return "GNU C23" language string instead of "GNU C2X". * ginclude/float.h: Refer to C23 instead of C2X in comments. * ginclude/stdint-gcc.h: Likewise. * glimits.h: Likewise. * tree.h: Likewise. 2023-11-07 Alexandre Oliva * doc/sourcebuild.texi (opt_mstrict_align): New target. 2023-11-07 Lehua Ding * config/riscv/autovec-opt.md (*cond_len_): New combine pattern. (*cond_len_): Ditto. (*cond_len_): Ditto. (*cond_len_extend): Ditto. (*cond_len_widen_reduc_plus_scal_): Ditto. 2023-11-07 Juzhe-Zhong PR target/112399 * config/riscv/riscv-avlprop.cc (pass_avlprop::get_vlmax_ta_preferred_avl): Enhance AVL propagation. * config/riscv/t-riscv: Add new include. 2023-11-07 Pan Li * config/riscv/autovec.md: Remove the size check of lceil.l * config/riscv/riscv-v.cc (expand_vec_lceil): Leverage emit_vec_rounding_to_integer for ceil. 2023-11-06 John David Anglin * config/pa/pa.cc (pa_asm_trampoline_template): Fix typo. 2023-11-06 John David Anglin * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 1. 2023-11-06 David Malcolm * diagnostic-show-locus.cc (class colorizer): Take just a pretty_printer rather than a diagnostic_context. (layout::layout): Make context param a const reference, and pretty_printer param non-optional. (layout::m_context): Drop field. (layout::m_options): New field. (layout::m_colorize_source_p): Drop field. (layout::m_show_labels_p): Drop field. (layout::m_show_line_numbers_p): Drop field. (layout::print_gap_in_line_numbering): Use m_options. (layout::calculate_line_spans): Likewise. (layout::calculate_linenum_width): Likewise. (layout::calculate_x_offset_display): Likewise. (layout::print_source_line): Likewise. (layout::start_annotation_line): Likewise. (layout::print_annotation_line): Likewise. (layout::print_line): Likewise. (gcc_rich_location::add_location_if_nearby): Update for changes to layout ctor. (diagnostic_show_locus): Likewise. (selftest::test_offset_impl): Likewise. (selftest::test_layout_x_offset_display_utf8): Likewise. (selftest::test_layout_x_offset_display_tab): Likewise. (selftest::test_tab_expansion): Likewise. * diagnostic.h (diagnostic_context::m_source_printing): Move declaration of struct outside diagnostic_context as... (struct diagnostic_source_printing_options)... this. 2023-11-06 David Malcolm * diagnostic.cc (diagnostic_context::push_diagnostics): Convert to... (diagnostic_option_classifier::push): ...this. (diagnostic_context::pop_diagnostics): Convert to... (diagnostic_option_classifier::pop): ...this. (diagnostic_context::initialize): Move code to... (diagnostic_option_classifier::init): ...this new function. (diagnostic_context::finish): Move code to... (diagnostic_option_classifier::fini): ...this new function. (diagnostic_context::classify_diagnostic): Convert to... (diagnostic_option_classifier::classify_diagnostic): ...this. (diagnostic_context::update_effective_level_from_pragmas): Convert to... (diagnostic_option_classifier::update_effective_level_from_pragmas): ...this. (diagnostic_context::diagnostic_enabled): Update for refactoring. * diagnostic.h (struct diagnostic_classification_change_t): Move into... (class diagnostic_option_classifier): ...this new class. (diagnostic_context::option_unspecified_p): Update for move of fields into m_option_classifier. (diagnostic_context::classify_diagnostic): Likewise. (diagnostic_context::push_diagnostics): Likewise. (diagnostic_context::pop_diagnostics): Likewise. (diagnostic_context::update_effective_level_from_pragmas): Delete. (diagnostic_context::m_classify_diagnostic): Move into class diagnostic_option_classifier. (diagnostic_context::m_option_classifier): Likewise. (diagnostic_context::m_classification_history): Likewise. (diagnostic_context::m_n_classification_history): Likewise. (diagnostic_context::m_push_list): Likewise. (diagnostic_context::m_n_push): Likewise. (diagnostic_context::m_option_classifier): New. 2023-11-06 David Malcolm * diagnostic.cc (diagnostic_context::set_urlifier): New. * diagnostic.h (diagnostic_context::set_urlifier): New decl. (diagnostic_context::m_urlifier): Make private. * gcc.cc (driver::global_initializations): Use set_urlifier rather than directly setting field. * toplev.cc (general_init): Likewise. 2023-11-06 David Malcolm * diagnostic.cc (diagnostic_context::check_max_errors): Replace uses of diagnostic_kind_count with simple field acesss. (diagnostic_context::report_diagnostic): Likewise. (diagnostic_text_output_format::~diagnostic_text_output_format): Replace use of diagnostic_kind_count with diagnostic_context::diagnostic_count. * diagnostic.h (diagnostic_kind_count): Delete. (errorcount): Replace use of diagnostic_kind_count with diagnostic_context::diagnostic_count. (warningcount): Likewise. (werrorcount): Likewise. (sorrycount): Likewise. 2023-11-06 Christophe Lyon * doc/sourcebuild.texi (Other attributes): Document thread_fence effective-target. 2023-11-06 Uros Bizjak * config/i386/constraints.md (Bc): Remove constraint. (Bn): Rewrite to use x86_extended_reg_mentioned_p predicate. * config/i386/i386.cc (ix86_memory_address_reg_class): Do not limit processing to TARGET_APX_EGPR. Exit early for NULL insn. Do not check recog_data.insn before calling extract_insn_cached. (ix86_insn_base_reg_class): Handle ADDR_GPR8. (ix86_regno_ok_for_insn_base_p): Ditto. (ix86_insn_index_reg_class): Ditto. * config/i386/i386.md (*cmpqi_ext_1_mem_rex64): Remove insn pattern and corresponding peephole2 pattern. (*cmpi_ext_1): Remove (m,Q) alternative. Change (QBc,Q) alternative to (QBn,Q). Add "addr" attribute. (*cmpqi_ext_3_mem_rex64): Remove insn pattern and corresponding peephole2 pattern. (*cmpi_ext_3): Remove (Q,m) alternative. Change (Q,QnBc) alternative to (Q,QnBn). Add "addr" attribute. (*extzvqi_mem_rex64): Remove insn pattern and corresponding peephole2 pattern. (*extzvqi): Remove (Q,m) alternative. Change (Q,QnBc) alternative to (Q,QnBn). Add "addr" attribute. (*insvqi_1_mem_rex64): Remove insn pattern and corresponding peephole2 pattern. (*insvqi_1): Remove (Q,m) alternative. Change (Q,QnBc) alternative to (Q,QnBn). Add "addr" attribute. (@insv_1): Ditto. (*addqi_ext_0): Remove (m,0,Q) alternative. Change (QBc,0,Q) alternative to (QBn,0,Q). Add "addr" attribute. (*subqi_ext_0): Ditto. (*andqi_ext_0): Ditto. (*qi_ext_0): Ditto. (*addqi_ext_1): Remove (Q,0,m) alternative. Change (Q,0,QnBc) alternative to (Q,0,QnBn). Add "addr" attribute. (*andqi_ext_1): Ditto. (*andqi_ext_1_cc): Ditto. (*qi_ext_1): Ditto. (*xorqi_ext_1_cc): Ditto. * config/i386/predicates.md (nonimm_x64constmem_operand): Remove predicate. (general_x64constmem_operand): Ditto. (norex_memory_operand): Ditto. 2023-11-06 Joseph Myers PR c/107954 * doc/cpp.texi (__STDC_VERSION__): Refer to -std=c23 and -std=gnu23 instead of -std=c2x and -std=gnu2x. * doc/extend.texi (Attribute Syntax): Refer to C23 and -std=c23 instead of C2x and -std=c2x. * doc/invoke.texi (-Wc11-c23-compat, -std=c23, -std=gnu23) (-std=iso9899:2024): Document, with -Wc11-c2x-compat, -std=c2x and -std=gnu2x as deprecated aliases. Update descriptions of C23. * doc/standards.texi (Standards): Describe C23 with C2X as an old name. 2023-11-06 Thomas Schwinge * config/nvptx/nvptx.h (MAKE_DECL_ONE_ONLY): Define. 2023-11-06 Richard Biener PR tree-optimization/112405 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Properly handle invariant and/or loop mask passing. 2023-11-06 Pan Li * config/riscv/autovec.md: Remove the size check of lround. * config/riscv/riscv-v.cc (expand_vec_lround): Leverage emit_vec_rounding_to_integer for round. 2023-11-06 Juzhe-Zhong * config/riscv/predicates.md: Adapt predicate. * config/riscv/riscv-protos.h (can_be_broadcasted_p): New function. * config/riscv/riscv-v.cc (can_be_broadcasted_p): Ditto. * config/riscv/vector.md (vec_duplicate): New pattern. (*vec_duplicate): Adapt vec_duplicate insn pattern. 2023-11-06 Richard Biener PR tree-optimization/111950 * tree-vect-loop-manip.cc (slpeel_duplicate_current_defs_from_edges): Remove. (find_guard_arg): Likewise. (slpeel_update_phi_nodes_for_guard2): Likewise. (slpeel_tree_duplicate_loop_to_edge_cfg): Remove calls to slpeel_duplicate_current_defs_from_edges, do not elide LC-PHIs for invariant values. (vect_do_peeling): Materialize PHI arguments for the edge around the epilog from the PHI defs of the main loop exit. 2023-11-06 Richard Biener PR tree-optimization/112404 * tree-vectorizer.h (get_mask_type_for_scalar_type): Declare overload with SLP node argument. * tree-vect-stmts.cc (get_mask_type_for_scalar_type): Implement it. (vect_check_scalar_mask): Use it. * tree-vect-slp.cc (vect_gather_slp_loads): Properly identify loads also for nodes with children, like .MASK_LOAD. * tree-vect-loop.cc (vect_analyze_loop_2): Look at the representative for load nodes and check whether it is a grouped access before looking for load-lanes support. 2023-11-06 Robin Dapp PR tree-optimization/111760 * config/riscv/autovec.md (vcond_mask_len_): Add expander. * config/riscv/riscv-protos.h (enum insn_type): Add. * config/riscv/riscv-v.cc (needs_fp_rounding): Add !pred_mov. * doc/md.texi: Add vcond_mask_len. * gimple-match-exports.cc (maybe_resimplify_conditional_op): Create VCOND_MASK_LEN when length masking. * gimple-match.h (gimple_match_op::gimple_match_op): Always initialize len and bias. * internal-fn.cc (vec_cond_mask_len_direct): Add. (direct_vec_cond_mask_len_optab_supported_p): Add. (internal_fn_len_index): Add VCOND_MASK_LEN. (internal_fn_mask_index): Ditto. * internal-fn.def (VCOND_MASK_LEN): New internal function. * match.pd: Combine unconditional unary, binary and ternary operations into the respective COND_LEN operations. * optabs.def (OPTAB_D): Add vcond_mask_len optab. 2023-11-06 Richard Sandiford * explow.cc (align_dynamic_address): Do nothing if the required alignment is a byte. 2023-11-06 Richard Sandiford * function.h (get_stack_dynamic_offset): Declare. * function.cc (get_stack_dynamic_offset): New function, split out from... (get_stack_dynamic_offset): ...here. * explow.cc (allocate_dynamic_stack_space): Handle calls made after virtual registers have been instantiated. 2023-11-06 liuhongt PR target/112393 * config/i386/i386-expand.cc (ix86_expand_vec_perm_vpermt2): Avoid generating RTL code when d->testing_p. 2023-11-06 Richard Biener PR tree-optimization/112369 * tree.cc (strip_float_extensions): Use element_precision. 2023-11-06 Richard Biener PR middle-end/112296 * doc/extend.texi (__builtin_constant_p): Clarify that side-effects are discarded. 2023-11-06 Kewen Lin PR target/111828 * config.in: Regenerate. * config/rs6000/rs6000.cc (rs6000_update_ipa_fn_target_info): Guard inline asm handling under !HAVE_AS_POWER10_HTM. * configure: Regenerate. * configure.ac: Detect assembler support for HTM insns at power10. 2023-11-06 xuli Pan Li * config/riscv/riscv-c.cc (riscv_resolve_overloaded_builtin): New function for the hook. (riscv_register_pragmas): Register the hook. * config/riscv/riscv-protos.h (resolve_overloaded_builtin): New decl. * config/riscv/riscv-vector-builtins-bases.cc: New function impl. * config/riscv/riscv-vector-builtins-shapes.cc (build_one): Register overloaded function. * config/riscv/riscv-vector-builtins.cc (struct non_overloaded_registered_function_hasher): New hash table. (function_builder::add_function): Add overloaded arg. (function_builder::add_unique_function): Map overloaded function to non-overloaded function. (function_builder::add_overloaded_function): New API impl. (registered_function::overloaded_hash): Calculate hash value. (has_vxrm_or_frm_p): New function impl. (non_overloaded_registered_function_hasher::hash): Ditto. (non_overloaded_registered_function_hasher::equal): Ditto. (handle_pragma_vector): Allocate space for hash table. (resolve_overloaded_builtin): New function impl. * config/riscv/riscv-vector-builtins.h (function_base::may_require_frm_p): Ditto. (function_base::may_require_vxrm_p): Ditto. 2023-11-06 Haochen Jiang PR target/111889 * config/i386/avx512bf16intrin.h: Push no-evex512 target. * config/i386/avx512bf16vlintrin.h: Ditto. * config/i386/avx512bitalgvlintrin.h: Ditto. * config/i386/avx512bwintrin.h: Ditto. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512fintrin.h: Ditto. * config/i386/avx512fp16intrin.h: Ditto. * config/i386/avx512fp16vlintrin.h: Ditto. * config/i386/avx512ifmavlintrin.h: Ditto. * config/i386/avx512vbmi2vlintrin.h: Ditto. * config/i386/avx512vbmivlintrin.h: Ditto. * config/i386/avx512vlbwintrin.h: Ditto. * config/i386/avx512vldqintrin.h: Ditto. * config/i386/avx512vlintrin.h: Ditto. * config/i386/avx512vnnivlintrin.h: Ditto. * config/i386/avx512vp2intersectvlintrin.h: Ditto. * config/i386/avx512vpopcntdqvlintrin.h: Ditto. 2023-11-06 Haochen Jiang * config/i386/avx512bf16vlintrin.h (_mm_avx512_castsi128_ps): New. (_mm256_avx512_castsi256_ps): Ditto. (_mm_avx512_slli_epi32): Ditto. (_mm256_avx512_slli_epi32): Ditto. (_mm_avx512_cvtepi16_epi32): Ditto. (_mm256_avx512_cvtepi16_epi32): Ditto. (__attribute__): Change intrin call. * config/i386/avx512bwintrin.h (_mm_avx512_set_epi32): New. (_mm_avx512_set_epi16): Ditto. (_mm_avx512_set_epi8): Ditto. (__attribute__): Change intrin call. * config/i386/avx512fp16intrin.h: Ditto. * config/i386/avx512fp16vlintrin.h (_mm_avx512_set1_ps): New. (_mm256_avx512_set1_ps): Ditto. (_mm_avx512_and_si128): Ditto. (_mm256_avx512_and_si256): Ditto. (__attribute__): Change intrin call. * config/i386/avx512vlbwintrin.h (_mm_avx512_set1_epi32): New. (_mm_avx512_set1_epi16): Ditto. (_mm_avx512_set1_epi8): Ditto. (_mm256_avx512_set_epi16): Ditto. (_mm256_avx512_set_epi8): Ditto. (_mm256_avx512_set1_epi16): Ditto. (_mm256_avx512_set1_epi32): Ditto. (_mm256_avx512_set1_epi8): Ditto. (_mm_avx512_max_epi16): Ditto. (_mm_avx512_min_epi16): Ditto. (_mm_avx512_max_epu16): Ditto. (_mm_avx512_min_epu16): Ditto. (_mm_avx512_max_epi8): Ditto. (_mm_avx512_min_epi8): Ditto. (_mm_avx512_max_epu8): Ditto. (_mm_avx512_min_epu8): Ditto. (_mm256_avx512_max_epi16): Ditto. (_mm256_avx512_min_epi16): Ditto. (_mm256_avx512_max_epu16): Ditto. (_mm256_avx512_min_epu16): Ditto. (_mm256_avx512_insertf128_ps): Ditto. (_mm256_avx512_extractf128_pd): Ditto. (_mm256_avx512_extracti128_si256): Ditto. (_MM256_AVX512_REDUCE_OPERATOR_BASIC_EPI16): Ditto. (_MM256_AVX512_REDUCE_OPERATOR_MAX_MIN_EP16): Ditto. (_MM256_AVX512_REDUCE_OPERATOR_BASIC_EPI8): Ditto. (_MM256_AVX512_REDUCE_OPERATOR_MAX_MIN_EP8): Ditto. (__attribute__): Change intrin call. 2023-11-06 Haochen Jiang * config/i386/avx512bf16vlintrin.h: Change intrin call. * config/i386/avx512fintrin.h (_mm_avx512_undefined_ps): New. (_mm_avx512_undefined_pd): Ditto. (__attribute__): Change intrin call. * config/i386/avx512vbmivlintrin.h: Ditto. * config/i386/avx512vlbwintrin.h: Ditto. * config/i386/avx512vldqintrin.h: Ditto. * config/i386/avx512vlintrin.h (_mm_avx512_undefined_si128): New. (_mm256_avx512_undefined_ps): Ditto. (_mm256_avx512_undefined_pd): Ditto. (_mm256_avx512_undefined_si256): Ditto. (__attribute__): Change intrin call. 2023-11-06 Haochen Jiang * config/i386/avx512bitalgvlintrin.h: Change intrin call. * config/i386/avx512dqintrin.h: Ditto. * config/i386/avx512fintrin.h: (_mm_avx512_setzero_ps): New. (_mm_avx512_setzero_pd): Ditto. (__attribute__): Change intrin call. * config/i386/avx512fp16intrin.h: Ditto. * config/i386/avx512fp16vlintrin.h: Ditto. * config/i386/avx512vbmi2vlintrin.h: Ditto. * config/i386/avx512vbmivlintrin.h: Ditto. * config/i386/avx512vlbwintrin.h: Ditto. * config/i386/avx512vldqintrin.h: Ditto. * config/i386/avx512vlintrin.h (_mm_avx512_setzero_si128): New. (_mm256_avx512_setzero_pd): Ditto. (_mm256_avx512_setzero_ps): Ditto. (_mm256_avx512_setzero_si256): Ditto. (__attribute__): Change intrin call. * config/i386/avx512vpopcntdqvlintrin.h: Ditto. * config/i386/gfniintrin.h: Ditto. 2023-11-05 Uros Bizjak * config/i386/i386.h (enum reg_class): Add LEGACY_INDEX_REGS. Rename LEGACY_REGS to LEGACY_GENERAL_REGS. (REG_CLASS_NAMES): Ditto. (REG_CLASS_CONTENTS): Ditto. * config/i386/constraints.md ("R"): Update for rename. 2023-11-05 Richard Sandiford * mode-switching.cc: Remove unused forward references. (seginfo): Remove bbnum. (new_seginfo): Remove associated argument. (optimize_mode_switching): Update calls accordingly. 2023-11-05 Richard Sandiford * read-rtl.cc (read_rtx_operand): Avoid spinning endlessly for invalid [...] operands. 2023-11-05 Richard Sandiford PR target/112105 * config/aarch64/aarch64.cc (aarch64_modes_compatible_p): New function, with the core logic extracted from... (aarch64_can_change_mode_class): ...here. Extend the previous rules to allow changes between partial SVE modes and other modes if the other mode is no bigger than an element, and if no other rule prevents it. Use the aarch64_modes_tieable_p handling of partial Advanced SIMD structure modes. (aarch64_modes_tieable_p): Use aarch64_modes_compatible_p. Allow all vector mode ties that it allows. 2023-11-05 Pan Li * config/riscv/autovec.md: Remove the size check of lrint. * config/riscv/riscv-v.cc (emit_vec_narrow_cvt_x_f): New help emit func impl. (emit_vec_widden_cvt_x_f): New help emit func impl. (emit_vec_rounding_to_integer): New func impl to emit the rounding from FP to integer. (expand_vec_lrint): Leverage emit_vec_rounding_to_integer. * config/riscv/vector.md: Take V_VLSF for vfncvt. 2023-11-05 Juzhe-Zhong * config/riscv/vector.md: Fix bug. 2023-11-04 Sergei Trofimovich PR bootstrap/112379 * gcc-urlifier.cc (get_url_suffix_for_quoted_text): Mark as ATTRIBUTE_UNUSED. 2023-11-04 Pan Li * config/riscv/vector-iterators.md: Remove HF modes. 2023-11-04 David Malcolm * diagnostic.cc: Include "pretty-print-urlifier.h". (diagnostic_context::initialize): Initialize m_urlifier. (diagnostic_context::finish): Clean up m_urlifier (diagnostic_report::diagnostic): m_urlifier to pp_format. * diagnostic.h (diagnostic_context::m_urlifier): New field. * gcc-urlifier.cc: New file. * gcc-urlifier.def: New file. * gcc-urlifier.h: New file. * gcc.cc: Include "gcc-urlifier.h". (driver::global_initializations): Initialize global_dc->m_urlifier. * pretty-print-urlifier.h: New file. * pretty-print.cc: Include "pretty-print-urlifier.h". (obstack_append_string): New. (urlify_quoted_string): New. (pp_format): Add "urlifier" param and use it to implement optional urlification of quoted text strings. (pp_output_formatted_text): Make buffer a const pointer. (selftest::pp_printf_with_urlifier): New. (selftest::test_urlification): New. (selftest::pretty_print_cc_tests): Call it. * pretty-print.h (class urlifier): New forward declaration. (pp_format): Add optional urlifier param. * selftest-run-tests.cc (selftest::run_tests): Call selftest::gcc_urlifier_cc_tests . * selftest.h (selftest::gcc_urlifier_cc_tests): New decl. * toplev.cc: Include "gcc-urlifier.h". (general_init): Initialize global_dc->m_urlifier. 2023-11-04 David Malcolm * Makefile.in (GCC_OBJS): Add gcc-urlifier.o. (OBJS): Likewise. 2023-11-04 David Malcolm * common.opt (fdiagnostics-text-art-charset=): Remove refererence to diagnostic-text-art.h. * coretypes.h (struct diagnostic_context): Replace forward decl with... (class diagnostic_context): ...this. * diagnostic-format-json.cc: Update for changes to diagnostic_context. * diagnostic-format-sarif.cc: Likewise. * diagnostic-show-locus.cc: Likewise. * diagnostic-text-art.h: Deleted file, moving content... (enum diagnostic_text_art_charset): ...to diagnostic.h, (DIAGNOSTICS_TEXT_ART_CHARSET_DEFAULT): ...deleting, (diagnostics_text_art_charset_init): ...deleting in favor of diagnostic_context::set_text_art_charset. * diagnostic.cc: Remove include of "diagnostic-text-art.h". (pedantic_warning_kind): Update for field renaming. (permissive_error_kind): Likewise. (permissive_error_option): Likewise. (diagnostic_initialize): Convert to... (diagnostic_context::initialize): ...this, updating for field renamings. (diagnostic_color_init): Convert to... (diagnostic_context::color_init): ...this. (diagnostic_urls_init): Convert to... (diagnostic_context::urls_init): ...this. (diagnostic_initialize_input_context): Convert to... (diagnostic_context::initialize_input_context): ...this. (diagnostic_finish): Convert to... (diagnostic_context::finish): ...this, updating for field renamings. (diagnostic_context::set_output_format): New. (diagnostic_context::set_client_data_hooks): New. (diagnostic_context::create_edit_context): New. (diagnostic_converted_column): Convert to... (diagnostic_context::converted_column): ...this. (diagnostic_get_location_text): Update for field renaming. (diagnostic_check_max_errors): Convert to... (diagnostic_context::check_max_errors): ...this, updating for field renamings. (diagnostic_action_after_output): Convert to... (diagnostic_context::action_after_output): ...this, updating for field renamings. (last_module_changed_p): Delete. (set_last_module): Delete. (includes_seen): Convert to... (diagnostic_context::includes_seen_p): ...this, updating for field renamings. (diagnostic_report_current_module): Convert to... (diagnostic_context::report_current_module): ...this, updating for field renamings, and replacing uses of last_module_changed_p and set_last_module to simple field accesses. (diagnostic_show_any_path): Convert to... (diagnostic_context::show_any_path): ...this. (diagnostic_classify_diagnostic): Convert to... (diagnostic_context::classify_diagnostic): ...this, updating for field renamings. (diagnostic_push_diagnostics): Convert to... (diagnostic_context::push_diagnostics): ...this, updating for field renamings. (diagnostic_pop_diagnostics): Convert to... (diagnostic_context::pop_diagnostics): ...this, updating for field renamings. (get_any_inlining_info): Convert to... (diagnostic_context::get_any_inlining_info): ...this, updating for field renamings. (update_effective_level_from_pragmas): Convert to... (diagnostic_context::update_effective_level_from_pragmas): ...this, updating for field renamings. (print_any_cwe): Convert to... (diagnostic_context::print_any_cwe): ...this. (print_any_rules): Convert to... (diagnostic_context::print_any_rules): ...this. (print_option_information): Convert to... (diagnostic_context::print_option_information): ...this, updating for field renamings. (diagnostic_enabled): Convert to... (diagnostic_context::diagnostic_enabled): ...this, updating for field renamings. (warning_enabled_at): Convert to... (diagnostic_context::warning_enabled_at): ...this. (diagnostic_report_diagnostic): Convert to... (diagnostic_context::report_diagnostic): ...this, updating for field renamings and conversions to member functions. (diagnostic_append_note): Update for field renaming. (diagnostic_impl): Use diagnostic_context::report_diagnostic directly. (diagnostic_n_impl): Likewise. (diagnostic_emit_diagram): Convert to... (diagnostic_context::emit_diagram): ...this, updating for field renamings. (error_recursion): Convert to... (diagnostic_context::error_recursion): ...this. (diagnostic_text_output_format::~diagnostic_text_output_format): Use accessor. (diagnostics_text_art_charset_init): Convert to... (diagnostic_context::set_text_art_charset): ...this. (assert_location_text): Update for field renamings. * diagnostic.h (enum diagnostic_text_art_charset): Move here from diagnostic-text-art.h. (struct diagnostic_context): Convert to... (class diagnostic_context): ...this. (diagnostic_context::ice_handler_callback_t): New typedef. (diagnostic_context::set_locations_callback_t): New typedef. (diagnostic_context::initialize): New decl. (diagnostic_context::color_init): New decl. (diagnostic_context::urls_init): New decl. (diagnostic_context::file_cache_init): New decl. (diagnostic_context::finish): New decl. (diagnostic_context::set_set_locations_callback): New. (diagnostic_context::initialize_input_context): New decl. (diagnostic_context::warning_enabled_at): New decl. (diagnostic_context::option_unspecified_p): New. (diagnostic_context::report_diagnostic): New decl. (diagnostic_context::report_current_module): New decl. (diagnostic_context::check_max_errors): New decl. (diagnostic_context::action_after_output): New decl. (diagnostic_context::classify_diagnostic): New decl. (diagnostic_context::push_diagnostics): New decl. (diagnostic_context::pop_diagnostics): New decl. (diagnostic_context::emit_diagram): New decl. (diagnostic_context::set_output_format): New decl. (diagnostic_context::set_text_art_charset): New decl. (diagnostic_context::set_client_data_hooks): New decl. (diagnostic_context::create_edit_context): New decl. (diagnostic_context::set_warning_as_error_requested): New. (diagnostic_context::set_report_bug): New. (diagnostic_context::set_extra_output_kind): New. (diagnostic_context::set_show_cwe): New. (diagnostic_context::set_show_rules): New. (diagnostic_context::set_path_format): New. (diagnostic_context::set_show_path_depths): New. (diagnostic_context::set_show_option_requested): New. (diagnostic_context::set_max_errors): New. (diagnostic_context::set_escape_format): New. (diagnostic_context::set_ice_handler_callback): New. (diagnostic_context::warning_as_error_requested_p): New. (diagnostic_context::show_path_depths_p): New. (diagnostic_context::get_path_format): New. (diagnostic_context::get_escape_format): New. (diagnostic_context::get_file_cache): New. (diagnostic_context::get_edit_context): New. (diagnostic_context::get_client_data_hooks): New. (diagnostic_context::get_diagram_theme): New. (diagnostic_context::converted_column): New decl. (diagnostic_context::diagnostic_count): New. (diagnostic_context::includes_seen_p): New decl. (diagnostic_context::print_any_cwe): New decl. (diagnostic_context::print_any_rules): New decl. (diagnostic_context::print_option_information): New decl. (diagnostic_context::show_any_path): New decl. (diagnostic_context::error_recursion): New decl. (diagnostic_context::diagnostic_enabled): New decl. (diagnostic_context::get_any_inlining_info): New decl. (diagnostic_context::update_effective_level_from_pragmas): New decl. (diagnostic_context::m_file_cache): Make private. (diagnostic_context::diagnostic_count): Rename to... (diagnostic_context::m_diagnostic_count): ...this and make private. (diagnostic_context::warning_as_error_requested): Rename to... (diagnostic_context::m_warning_as_error_requested): ...this and make private. (diagnostic_context::n_opts): Rename to... (diagnostic_context::m_n_opts): ...this and make private. (diagnostic_context::classify_diagnostic): Rename to... (diagnostic_context::m_classify_diagnostic): ...this and make private. (diagnostic_context::classification_history): Rename to... (diagnostic_context::m_classification_history): ...this and make private. (diagnostic_context::n_classification_history): Rename to... (diagnostic_context::m_n_classification_history): ...this and make private. (diagnostic_context::push_list): Rename to... (diagnostic_context::m_push_list): ...this and make private. (diagnostic_context::n_push): Rename to... (diagnostic_context::m_n_push): ...this and make private. (diagnostic_context::show_cwe): Rename to... (diagnostic_context::m_show_cwe): ...this and make private. (diagnostic_context::show_rules): Rename to... (diagnostic_context::m_show_rules): ...this and make private. (diagnostic_context::path_format): Rename to... (diagnostic_context::m_path_format): ...this and make private. (diagnostic_context::show_path_depths): Rename to... (diagnostic_context::m_show_path_depths): ...this and make private. (diagnostic_context::show_option_requested): Rename to... (diagnostic_context::m_show_option_requested): ...this and make private. (diagnostic_context::abort_on_error): Rename to... (diagnostic_context::m_abort_on_error): ...this. (diagnostic_context::show_column): Rename to... (diagnostic_context::m_show_column): ...this. (diagnostic_context::pedantic_errors): Rename to... (diagnostic_context::m_pedantic_errors): ...this. (diagnostic_context::permissive): Rename to... (diagnostic_context::m_permissive): ...this. (diagnostic_context::opt_permissive): Rename to... (diagnostic_context::m_opt_permissive): ...this. (diagnostic_context::fatal_errors): Rename to... (diagnostic_context::m_fatal_errors): ...this. (diagnostic_context::dc_inhibit_warnings): Rename to... (diagnostic_context::m_inhibit_warnings): ...this. (diagnostic_context::dc_warn_system_headers): Rename to... (diagnostic_context::m_warn_system_headers): ...this. (diagnostic_context::max_errors): Rename to... (diagnostic_context::m_max_errors): ...this and make private. (diagnostic_context::internal_error): Rename to... (diagnostic_context::m_internal_error): ...this. (diagnostic_context::option_enabled): Rename to... (diagnostic_context::m_option_enabled): ...this. (diagnostic_context::option_state): Rename to... (diagnostic_context::m_option_state): ...this. (diagnostic_context::option_name): Rename to... (diagnostic_context::m_option_name): ...this. (diagnostic_context::get_option_url): Rename to... (diagnostic_context::m_get_option_url): ...this. (diagnostic_context::print_path): Rename to... (diagnostic_context::m_print_path): ...this. (diagnostic_context::make_json_for_path): Rename to... (diagnostic_context::m_make_json_for_path): ...this. (diagnostic_context::x_data): Rename to... (diagnostic_context::m_client_aux_data): ...this. (diagnostic_context::last_location): Rename to... (diagnostic_context::m_last_location): ...this. (diagnostic_context::last_module): Rename to... (diagnostic_context::m_last_module): ...this and make private. (diagnostic_context::lock): Rename to... (diagnostic_context::m_lock): ...this and make private. (diagnostic_context::lang_mask): Rename to... (diagnostic_context::m_lang_mask): ...this. (diagnostic_context::inhibit_notes_p): Rename to... (diagnostic_context::m_inhibit_notes_p): ...this. (diagnostic_context::report_bug): Rename to... (diagnostic_context::m_report_bug): ...this and make private. (diagnostic_context::extra_output_kind): Rename to... (diagnostic_context::m_extra_output_kind): ...this and make private. (diagnostic_context::column_unit): Rename to... (diagnostic_context::m_column_unit): ...this and make private. (diagnostic_context::column_origin): Rename to... (diagnostic_context::m_column_origin): ...this and make private. (diagnostic_context::tabstop): Rename to... (diagnostic_context::m_tabstop): ...this and make private. (diagnostic_context::escape_format): Rename to... (diagnostic_context::m_escape_format): ...this and make private. (diagnostic_context::edit_context_ptr): Rename to... (diagnostic_context::m_edit_context_ptr): ...this and make private. (diagnostic_context::set_locations_cb): Rename to... (diagnostic_context::m_set_locations_cb): ...this and make private. (diagnostic_context::ice_handler_cb): Rename to... (diagnostic_context::m_ice_handler_cb): ...this and make private. (diagnostic_context::includes_seen): Rename to... (diagnostic_context::m_includes_seen): ...this and make private. (diagnostic_inhibit_notes): Update for field renaming. (diagnostic_context_auxiliary_data): Likewise. (diagnostic_abort_on_error): Convert from macro to inline function and update for field renaming. (diagnostic_kind_count): Convert from macro to inline function and use diagnostic_count accessor. (diagnostic_report_warnings_p): Update for field renaming. (diagnostic_initialize): Convert decl to inline function calling into diagnostic_context. (diagnostic_color_init): Likewise. (diagnostic_urls_init): Likewise. (diagnostic_urls_init): Likewise. (diagnostic_finish): Likewise. (diagnostic_report_current_module): Likewise. (diagnostic_show_any_path): Delete decl. (diagnostic_initialize_input_context): Convert decl to inline function calling into diagnostic_context. (diagnostic_classify_diagnostic): Likewise. (diagnostic_push_diagnostics): Likewise. (diagnostic_pop_diagnostics): Likewise. (diagnostic_report_diagnostic): Likewise. (diagnostic_action_after_output): Likewise. (diagnostic_check_max_errors): Likewise. (diagnostic_file_cache_fini): Delete decl. (diagnostic_converted_column): Delete decl. (warning_enabled_at): Convert decl to inline function calling into diagnostic_context. (option_unspecified_p): New. (diagnostic_emit_diagram): Delete decl. * gcc.cc: Remove include of "diagnostic-text-art.h". Update for changes to diagnostic_context. * input.cc (diagnostic_file_cache_init): Move implementation to... (diagnostic_context::file_cache_init): ...this new member function. (diagnostic_file_cache_fini): Delete. (diagnostics_file_cache_forcibly_evict_file): Update for m_file_cache becoming private. (location_get_source_line): Likewise. (get_source_file_content): Likewise. (location_missing_trailing_newline): Likewise. * input.h (diagnostics_file_cache_fini): Delete. * langhooks.cc: Update for changes to diagnostic_context. * lto-wrapper.cc: Likewise. * opts.cc: Remove include of "diagnostic-text-art.h". Update for changes to diagnostic_context. * selftest-diagnostic.cc: Update for changes to diagnostic_context. * toplev.cc: Likewise. * tree-diagnostic-path.cc: Likewise. * tree-diagnostic.cc: Likewise. 2023-11-03 Martin Uecker PR c/98541 * gimple-ssa-warn-access.cc (pass_waccess::maybe_check_access_sizes): For VLA bounds in parameters, only warn about null pointers with 'static'. 2023-11-03 Andre Vieira * tree-vect-stmts.cc (vectorizable_simd_clone_call): Allow unmasked calls to use masked simdclones. 2023-11-03 David Malcolm * diagnostic.cc (diagnostic_initialize): Update for consolidation of group-based fields. (diagnostic_report_diagnostic): Likewise. (diagnostic_context::begin_group): New, based on body of auto_diagnostic_group's ctor. (diagnostic_context::end_group): New, based on body of auto_diagnostic_group's dtor. (auto_diagnostic_group::auto_diagnostic_group): Convert to a call to begin_group. (auto_diagnostic_group::~auto_diagnostic_group): Convert to a call to end_group. * diagnostic.h (diagnostic_context::begin_group): New decl. (diagnostic_context::end_group): New decl. (diagnostic_context::diagnostic_group_nesting_depth): Rename to... (diagnostic_context::m_diagnostic_groups.m_nesting_depth): ...this. (diagnostic_context::diagnostic_group_emission_count): Rename to... (diagnostic_context::m_diagnostic_groups::m_emission_count): ...this. 2023-11-03 Andrew MacLeod PR tree-optimization/111766 * range-op.cc (operator_equal::fold_range): Check constants against the bitmask. (operator_not_equal::fold_range): Ditto. * value-range.h (irange_bitmask::member_p): New. 2023-11-03 Andrew MacLeod * value-range.cc (irange_bitmask::adjust_range): New. (irange::intersect_bitmask): Call adjust_range. * value-range.h (irange_bitmask::adjust_range): New prototype. 2023-11-03 Uros Bizjak * config/i386/i386.cc (ix86_memory_address_use_extended_reg_class_p): Rename to ... (ix86_memory_address_reg_class): ... this. Generalize address register class handling to allow multiple address register classes. Return maximal class for unrecognized instructions. Improve comments. (ix86_insn_base_reg_class): Rewrite to handle multiple address register classes. (ix86_regno_ok_for_insn_base_p): Ditto. (ix86_insn_index_reg_class): Ditto. * config/i386/i386.md: Rename "gpr32" attribute to "addr" and substitute its values with "0" -> "gpr16", "1" -> "*". (addr): New attribute to limit allowed address register set. (gpr32): Remove. * config/i386/mmx.md: Rename "gpr32" attribute to "addr" and substitute its values with "0" -> "gpr16", "1" -> "*". * config/i386/sse.md: Ditto. 2023-11-03 Richard Biener * tree-vect-loop.cc (vectorizable_live_operation): Simplify LC PHI replacement. 2023-11-03 Roger Sayle * config/arc/arc.md (addsi3): Fix GNU-style code formatting. (adddi3): Change define_expand to generate a *adddi3. (*adddi3): New define_insn_and_split to lower DImode additions during the split1 pass (after combine and before reload). (ashldi3): New define_expand to (only) generate *ashldi3_cnt1 for DImode left shifts by a single bit. (*ashldi3_cnt1): New define_insn_and_split to lower DImode left shifts by one bit to an *adddi3. 2023-11-03 Richard Sandiford * config/aarch64/aarch64.md (*cmov_uxtw_insn_insv): Remove can_create_pseudo_p condition. 2023-11-03 Juzhe-Zhong * tree-vect-slp.cc (vect_get_and_check_slp_defs): Support SLP for dummy mask -1. * tree-vect-stmts.cc (vectorizable_load): Ditto. 2023-11-03 Richard Biener PR tree-optimization/112366 * tree-vect-loop.cc (vectorizable_live_operation): Remove assert. 2023-11-03 Richard Biener PR tree-optimization/112310 * tree-ssa-pre.cc (do_hoist_insertion): Keep the union of expressions, validate dependences are contained within the hoistable set before hoisting. 2023-11-03 Pan Li * config/riscv/autovec.md (lrint2): Remove. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to SI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to DI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. * config/riscv/vector-iterators.md: Renew iterators for both the SI and DI. 2023-11-03 Juzhe-Zhong PR target/112326 * config/riscv/riscv-avlprop.cc (get_insn_vtype_mode): New function. (simplify_replace_vlmax_avl): Ditto. (pass_avlprop::execute): Add immediate AVL simplification. * config/riscv/riscv-protos.h (imm_avl_p): Rename. * config/riscv/riscv-v.cc (const_vlmax_p): Ditto. (imm_avl_p): Ditto. (emit_vlmax_insn): Adapt for new interface name. * config/riscv/vector.md (mode_idx): New attribute. 2023-11-03 Pan Li Revert: 2023-11-02 Pan Li * config/riscv/autovec.md (lrint2): Remove. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to SI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to DI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. * config/riscv/vector-iterators.md: Renew iterators for both the SI and DI. 2023-11-02 Edwin Lu * config/riscv/riscv.cc (riscv_sched_variable_issue): add disabled assert 2023-11-02 Jeff Law * config/h8300/combiner.md: Add new patterns for single bit sign extractions. 2023-11-02 Pan Li * config/riscv/autovec.md (lrint2): Remove. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to SI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. (lrint2): New pattern for cvt from FP to DI. (lround2): Ditto. (lceil2): Ditto. (lfloor2): Ditto. * config/riscv/vector-iterators.md: Renew iterators for both the SI and DI. 2023-11-02 Sam James * doc/passes.texi (Dead code elimination): Explicitly say 'lifetime' as this has become the standard term for what we're doing here. 2023-11-02 Juzhe-Zhong * config/riscv/riscv-avlprop.cc (pass_avlprop::get_vlmax_ta_preferred_avl): Don't allow non-real insn AVL propation. 2023-11-02 Robin Dapp PR middle-end/111401 * internal-fn.cc (internal_fn_else_index): New function. * internal-fn.h (internal_fn_else_index): Define. * tree-if-conv.cc (convert_scalar_cond_reduction): Emit COND_OP if supported. (predicate_scalar_phi): Add whitespace. * tree-vect-loop.cc (fold_left_reduction_fn): Add IFN_COND_OP. (neutral_op_for_reduction): Return -0 for PLUS. (check_reduction_path): Don't count else operand in COND_OP. (vect_is_simple_reduction): Ditto. (vect_create_epilog_for_reduction): Fix whitespace. (vectorize_fold_left_reduction): Add COND_OP handling. (vectorizable_reduction): Don't count else operand in COND_OP. (vect_transform_reduction): Add COND_OP handling. * tree-vectorizer.h (neutral_op_for_reduction): Add default parameter. 2023-11-02 Richard Biener PR tree-optimization/112320 * gimple-fold.h (rewrite_to_defined_overflow): New overload for in-place operation. * gimple-fold.cc (rewrite_to_defined_overflow): Add stmt iterator argument to worker, define separate API for in-place and not in-place operation. * tree-if-conv.cc (predicate_statements): Simplify. * tree-scalar-evolution.cc (final_value_replacement_loop): Likewise. * tree-ssa-ifcombine.cc (pass_tree_ifcombine::execute): Adjust. * tree-ssa-reassoc.cc (update_range_test): Likewise. 2023-11-02 Uros Bizjak * config/i386/i386.md: Move stack protector patterns above mov $0,%reg -> xor %reg,%reg peephole2 pattern. 2023-11-02 liuhongt * config/i386/mmx.md (cmlav4hf4): New expander. (cmla_conjv4hf4): Ditto. (cmulv4hf3): Ditto. (cmul_conjv4hf3): Ditto. 2023-11-02 Juzhe-Zhong * config/riscv/vector.md: Fix redundant codes in attributes. 2023-11-02 xuli * config/riscv/riscv-vector-builtins-bases.cc: Expand non-tuple intrinsics. * config/riscv/riscv-vector-builtins-functions.def (vcreate): Define non-tuple intrinsics. * config/riscv/riscv-vector-builtins-shapes.cc (struct vcreate_def): Ditto. * config/riscv/riscv-vector-builtins.cc: Add arg types. 2023-11-02 Pan Li * tree-vect-stmts.cc (vectorizable_internal_function): Add type size check for vectype_out doesn't participating for optab query. (vectorizable_call): Remove the type size check. 2023-11-02 Juzhe-Zhong PR target/112327 * config/riscv/vector.md: Add '0'. 2023-11-01 Roger Sayle PR target/110551 * config/i386/i386.md (*bmi2_umul3_1): Tidy condition as operands[2] with predicate register_operand must be !MEM_P. (peephole2): Optimize a mulx followed by a register-to-register move, to place result in the correct destination if possible. 2023-11-01 Patrick O'Neill * config/riscv/sync.md: Use riscv_subword_address function to calculate the address and shift in atomic_test_and_set. 2023-11-01 Vineet Gupta * config/riscv/riscv.cc (riscv_promote_function_mode): Fix mode returned for libcall case. 2023-11-01 Martin Uecker PR c/71219 * doc/invoke.texi: Document -Walloc-size option. 2023-11-01 Edwin Lu * genautomata.cc (write_automata): move endif 2023-11-01 Andre Vieira * omp-simd-clone.cc (simd_clone_adjust_return_type): Hoist out code to create return array and don't return new type. (simd_clone_adjust_argument_types): Hoist out code that creates ipa_param_body_adjustments and don't return them. (simd_clone_adjust): Call TARGET_SIMD_CLONE_ADJUST after return and argument types have been vectorized, create adjustments and return array after the hook. (expand_simd_clones): Call TARGET_SIMD_CLONE_ADJUST after return and argument types have been vectorized. 2023-11-01 Uros Bizjak PR target/112332 * config/i386/i386.md (stack_protexct_set_2 peephole2): Use general_gr_operand as operand 4 predicate. 2023-11-01 Uros Bizjak * config/i386/i386.md (stack_protect_set): Explicitly generate scratch register in word mode. (@stack_protect_set_1_): Rename to ... (@stack_protect_set_1__): ... this. Use SWI48 mode iterator to match scratch register. (stack_protexct_set_1 peephole2): Use PTR, W and SWI48 mode iterators to match peephole sequence. Use general_operand predicate for operand 4. Allow different operand 2 and operand 3 registers and use peep2_reg_dead_p to ensure new scratch register is dead before peephole seqeunce. Use peep2_reg_dead_p to ensure old scratch register is dead after peephole sequence. (*stack_protect_set_2_): Rename to ... (*stack_protect_set_2__si): .. this. (*stack_protect_set_3): Rename to ... (*stack_protect_set_2__di): ... this. Use PTR mode iterator to match stack protector memory move. Use earlyclobber for all alternatives of operand 1. (stack_protexct_set_2 peephole2): Use PTR, W and SWI48 mode iterators to match peephole sequence. Use general_operand predicate for operand 4. Allow different operand 2 and operand 3 registers and use peep2_reg_dead_p to ensure new scratch register is dead before peephole seqeunce. Use peep2_reg_dead_p to ensure old scratch register is dead after peephole sequence. 2023-11-01 xuli * config/riscv/riscv-vector-builtins-functions.def (vundefined): Add vundefine intrinsics for tuple types. * config/riscv/riscv-vector-builtins.cc: Ditto. * config/riscv/vector.md (@vundefined): Ditto. 2023-11-01 Juzhe-Zhong * tree-vect-slp.cc (vect_build_slp_tree_1): Fix whitespace. 2023-10-31 David Malcolm * Makefile.in (ANALYZER_OBJS): Add analyzer/record-layout.o. 2023-10-31 David Malcolm * input.cc (dump_location_info): Update for removal of MACRO_MAP_EXPANSION_POINT_LOCATION. * tree-diagnostic.cc (maybe_unwind_expanded_macro_loc): Likewise. 2023-10-31 David Malcolm * opts.cc (get_option_url): Update comment; the requirement to pass DOCUMENTATION_ROOT_URL's value via -D was removed in r10-8065-ge33a1eae25b8a8. 2023-10-31 David Malcolm * pretty-print.cc (pretty_printer::pretty_printer): Initialize m_skipping_null_url. (pp_begin_url): Handle URL being null. (pp_end_url): Likewise. (selftest::test_null_urls): New. (selftest::pretty_print_cc_tests): Call it. * pretty-print.h (pretty_printer::m_skipping_null_url): New. 2023-10-31 Juzhe-Zhong * tree-vect-slp.cc (vect_get_operand_map): Add MASK_LEN_GATHER_LOAD. (vect_build_slp_tree_1): Ditto. (vect_build_slp_tree_2): Ditto. 2023-10-31 Cupertino Miranda * config/bpf/bpf-passes.def (pass_lower_bpf_core): Added pass. * config/bpf/bpf-protos.h: Added prototype for new pass. * config/bpf/bpf.cc (bpf_delegitimize_address): New function. * config/bpf/bpf.md (mov_reloc_core): Prefixed name with '*'. * config/bpf/core-builtins.cc (cr_builtins) Added access_node to struct. (is_attr_preserve_access): Improved check. (core_field_info): Make use of root_for_core_field_info function. (process_field_expr): Adapted to new functions. (pack_type): Small improvement. (bpf_handle_plugin_finish_type): Adapted to GTY(()). (bpf_init_core_builtins): Changed to new function names. (construct_builtin_core_reloc): Improved implementation. (bpf_resolve_overloaded_core_builtin): Changed how __builtin_preserve_access_index is converted. (compute_field_expr): Corrected implementation. Added access_node argument. (bpf_core_get_index): Added valid argument. (root_for_core_field_info, pack_field_expr) (core_expr_with_field_expr_plus_base, make_core_safe_access_index) (replace_core_access_index_comp_expr, maybe_get_base_for_field_expr) (core_access_clean, core_is_access_index, core_mark_as_access_index) (make_gimple_core_safe_access_index, execute_lower_bpf_core) (make_pass_lower_bpf_core): Added functions. (pass_data_lower_bpf_core): New pass struct. (pass_lower_bpf_core): New gimple_opt_pass class. (pack_field_expr_for_preserve_field) (bpf_replace_core_move_operands): Removed function. (bpf_enum_value_kind): Added GTY(()). * config/bpf/core-builtins.h (bpf_field_info_kind, bpf_type_id_kind) (bpf_type_info_kind, bpf_enum_value_kind): New enum. * config/bpf/t-bpf: Added pass bpf-passes.def to PASSES_EXTRA. 2023-10-31 Neal Frager * config/microblaze/microblaze.cc: Fix mcpu version check. 2023-10-31 Patrick O'Neill * config/riscv/sync-rvwmo.md (atomic_load_rvwmo): Remove TARGET_ATOMIC constraint (atomic_store_rvwmo): Ditto. * config/riscv/sync-ztso.md (atomic_load_ztso): Ditto. (atomic_store_ztso): Ditto. * config/riscv/sync.md (atomic_load): Ditto. (atomic_store): Ditto. 2023-10-31 Christoph Müllner * config/riscv/riscv.cc (riscv_index_reg_class): Return GR_REGS for XTheadFMemIdx. (riscv_regno_ok_for_index_p): Add support for XTheadFMemIdx. * config/riscv/riscv.h (HARDFP_REG_P): New macro. * config/riscv/thead.cc (is_fmemidx_mode): New function. (th_memidx_classify_address_index): Add support for XTheadFMemIdx. (th_fmemidx_output_index): New function. (th_output_move): Add support for XTheadFMemIdx. * config/riscv/thead.md (TH_M_ANYF): New mode iterator. (TH_M_NOEXTF): Likewise. (*th_fmemidx_movsf_hardfloat): New INSN. (*th_fmemidx_movdf_hardfloat_rv64): Likewise. (*th_fmemidx_I_a): Likewise. (*th_fmemidx_I_c): Likewise. (*th_fmemidx_US_a): Likewise. (*th_fmemidx_US_c): Likewise. (*th_fmemidx_UZ_a): Likewise. (*th_fmemidx_UZ_c): Likewise. 2023-10-31 Christoph Müllner * config/riscv/constraints.md (th_m_mia): New constraint. (th_m_mib): Likewise. (th_m_mir): Likewise. (th_m_miu): Likewise. * config/riscv/riscv-protos.h (enum riscv_address_type): Add new address types ADDRESS_REG_REG, ADDRESS_REG_UREG, and ADDRESS_REG_WB and their documentation. (struct riscv_address_info): Add new field 'shift' and document the field usage for the new address types. (riscv_valid_base_register_p): New prototype. (th_memidx_legitimate_modify_p): Likewise. (th_memidx_legitimate_index_p): Likewise. (th_classify_address): Likewise. (th_output_move): Likewise. (th_print_operand_address): Likewise. * config/riscv/riscv.cc (riscv_index_reg_class): Return GR_REGS for XTheadMemIdx. (riscv_regno_ok_for_index_p): Add support for XTheadMemIdx. (riscv_classify_address): Call th_classify_address() on top. (riscv_output_move): Call th_output_move() on top. (riscv_print_operand_address): Call th_print_operand_address() on top. * config/riscv/riscv.h (HAVE_POST_MODIFY_DISP): New macro. (HAVE_PRE_MODIFY_DISP): Likewise. * config/riscv/riscv.md (zero_extendqi2): Disable for XTheadMemIdx. (*zero_extendqi2_internal): Convert to expand, create INSN with same name and disable it for XTheadMemIdx. (extendsidi2): Likewise. (*extendsidi2_internal): Disable for XTheadMemIdx. * config/riscv/thead.cc (valid_signed_immediate): New helper function. (th_memidx_classify_address_modify): New function. (th_memidx_legitimate_modify_p): Likewise. (th_memidx_output_modify): Likewise. (is_memidx_mode): Likewise. (th_memidx_classify_address_index): Likewise. (th_memidx_legitimate_index_p): Likewise. (th_memidx_output_index): Likewise. (th_classify_address): Likewise. (th_output_move): Likewise. (th_print_operand_address): Likewise. * config/riscv/thead.md (*th_memidx_operand): New splitter. (*th_memidx_zero_extendqi2): New INSN. (*th_memidx_extendsidi2): Likewise. (*th_memidx_zero_extendsidi2): Likewise. (*th_memidx_zero_extendhi2): Likewise. (*th_memidx_extend2): Likewise. (*th_memidx_bb_zero_extendsidi2): Likewise. (*th_memidx_bb_zero_extendhi2): Likewise. (*th_memidx_bb_extendhi2): Likewise. (*th_memidx_bb_extendqi2): Likewise. (TH_M_ANYI): New mode iterator. (TH_M_NOEXTI): Likewise. (*th_memidx_I_a): New combiner optimization. (*th_memidx_I_b): Likewise. (*th_memidx_I_c): Likewise. (*th_memidx_US_a): Likewise. (*th_memidx_US_b): Likewise. (*th_memidx_US_c): Likewise. (*th_memidx_UZ_a): Likewise. (*th_memidx_UZ_b): Likewise. (*th_memidx_UZ_c): Likewise. 2023-10-31 Carl Love * doc/extend.texi (__builtin_bcdsub_le, __builtin_bcdsub_ge): Add documentation for the builti-ins. 2023-10-31 Vladimir N. Makarov PR rtl-optimization/111971 * lra-constraints.cc: (process_alt_operands): Don't check start hard regs for regs originated from register variables. 2023-10-31 Robin Dapp * config/riscv/autovec.md (3): fmax/fmin expanders. (cond_): Ditto. (cond_len_): Ditto. (reduc_fmax_scal_): Ditto. (reduc_fmin_scal_): Ditto. * config/riscv/riscv-v.cc (needs_fp_rounding): Add fmin/fmax. * config/riscv/vector-iterators.md (fmin): New UNSPEC. (UNSPEC_VFMIN): Ditto. * config/riscv/vector.md (@pred_): Add UNSPEC insn patterns. (@pred__scalar): Ditto. 2023-10-31 Robin Dapp PR bootstrap/84402 PR target/111600 * Makefile.in: Handle split insn-emit.cc. * configure: Regenerate. * configure.ac: Add --with-insnemit-partitions. * genemit.cc (output_peephole2_scratches): Print to file instead of stdout. (print_code): Ditto. (gen_rtx_scratch): Ditto. (gen_exp): Ditto. (gen_emit_seq): Ditto. (emit_c_code): Ditto. (gen_insn): Ditto. (gen_expand): Ditto. (gen_split): Ditto. (output_add_clobbers): Ditto. (output_added_clobbers_hard_reg_p): Ditto. (print_overload_arguments): Ditto. (print_overload_test): Ditto. (handle_overloaded_code_for): Ditto. (handle_overloaded_gen): Ditto. (print_header): New function. (handle_arg): New function. (main): Split output into 10 files. * gensupport.cc (count_patterns): New function. * gensupport.h (count_patterns): Define. * read-md.cc (md_reader::print_md_ptr_loc): Add file argument. * read-md.h (class md_reader): Change definition. 2023-10-31 Alexandre Oliva PR tree-optimization/111943 * gimple-harden-control-flow.cc: Adjust copyright year. (rt_bb_visited): Add vfalse and vtrue data members. Zero-initialize them in the ctor. (rt_bb_visited::insert_exit_check_on_edge): Upon encountering abnormal edges, insert initializers for vfalse and vtrue on entry, and insert the check sequence guarded by a conditional in the dest block. 2023-10-31 Richard Biener PR tree-optimization/112305 * tree-scalar-evolution.h (expression_expensive): Adjust. * tree-scalar-evolution.cc (expression_expensive): Record when we see a COND_EXPR. (final_value_replacement_loop): When the replacement contains a COND_EXPR, rewrite it to defined overflow. * tree-ssa-loop-ivopts.cc (may_eliminate_iv): Adjust. 2023-10-31 Xi Ruoyao PR target/112299 * config/loongarch/loongarch-opts.h (HAVE_AS_TLS): Define to 0 if not defined yet. 2023-10-31 Lehua Ding * gimple-match.h (gimple_match_op::gimple_match_op): Add interfaces for more arguments. (gimple_match_op::set_op): Add interfaces for more arguments. * match.pd: Add support of combining cond_len_op + vec_cond 2023-10-31 Haochen Jiang * config/i386/avx512cdintrin.h (target): Push evex512 for avx512cd. * config/i386/avx512vlintrin.h (target): Split avx512cdvl part out from avx512vl. * config/i386/i386-builtin.def (BDESC): Do not check evex512 for builtins not needed. 2023-10-31 Lehua Ding * config/riscv/autovec.md (2): Change to define_expand. 2023-10-31 liuhongt PR target/112276 * config/i386/mmx.md (*mmx_pblendvb_v8qi_1): Change define_split to define_insn_and_split to handle immediate_operand for comparison. (*mmx_pblendvb_v8qi_2): Ditto. (*mmx_pblendvb__1): Ditto. (*mmx_pblendvb_v4qi_2): Ditto. (3): Remove define_split after it. (v8qi3): Ditto. (3): Ditto. (v2hi3): Ditto. 2023-10-31 Andrew Pinski * match.pd (`a == 1 ? b : a OP b`): New pattern. (`a == -1 ? b : a & b`): New pattern. 2023-10-31 Andrew Pinski * match.pd: (`a == 0 ? b : b + a`, `a == 0 ? b : b - a`): New patterns. 2023-10-31 Neal Frager * config/microblaze/microblaze.cc: Fix mcpu version check. 2023-10-30 Mayshao * common/config/i386/cpuinfo.h (get_zhaoxin_cpu): Recognize yongfeng. * common/config/i386/i386-common.cc: Add yongfeng. * common/config/i386/i386-cpuinfo.h (enum processor_subtypes): Add ZHAOXIN_FAM7H_YONGFENG. * config.gcc: Add yongfeng. * config/i386/driver-i386.cc (host_detect_local_cpu): Let -march=native recognize yongfeng processors. * config/i386/i386-c.cc (ix86_target_macros_internal): Add yongfeng. * config/i386/i386-options.cc (m_YONGFENG): New definition. (m_ZHAOXIN): Ditto. * config/i386/i386.h (enum processor_type): Add PROCESSOR_YONGFENG. * config/i386/i386.md: Add yongfeng. * config/i386/lujiazui.md: Fix typo. * config/i386/x86-tune-costs.h (struct processor_costs): Add yongfeng costs. * config/i386/x86-tune-sched.cc (ix86_issue_rate): Add yongfeng. (ix86_adjust_cost): Ditto. * config/i386/x86-tune.def (X86_TUNE_SCHEDULE): Replace m_LUJIAZUI with m_ZHAOXIN. (X86_TUNE_PARTIAL_REG_DEPENDENCY): Ditto. (X86_TUNE_SSE_PARTIAL_REG_DEPENDENCY): Ditto. (X86_TUNE_SSE_PARTIAL_REG_FP_CONVERTS_DEPENDENCY): Ditto. (X86_TUNE_SSE_PARTIAL_REG_CONVERTS_DEPENDENCY): Ditto. (X86_TUNE_MOVX): Ditto. (X86_TUNE_MEMORY_MISMATCH_STALL): Ditto. (X86_TUNE_FUSE_CMP_AND_BRANCH_32): Ditto. (X86_TUNE_FUSE_CMP_AND_BRANCH_64): Ditto. (X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS): Ditto. (X86_TUNE_FUSE_ALU_AND_BRANCH): Ditto. (X86_TUNE_ACCUMULATE_OUTGOING_ARGS): Ditto. (X86_TUNE_USE_LEAVE): Ditto. (X86_TUNE_PUSH_MEMORY): Ditto. (X86_TUNE_LCP_STALL): Ditto. (X86_TUNE_INTEGER_DFMODE_MOVES): Ditto. (X86_TUNE_OPT_AGU): Ditto. (X86_TUNE_PREFER_KNOWN_REP_MOVSB_STOSB): Ditto. (X86_TUNE_MISALIGNED_MOVE_STRING_PRO_EPILOGUES): Ditto. (X86_TUNE_USE_SAHF): Ditto. (X86_TUNE_USE_BT): Ditto. (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI): Ditto. (X86_TUNE_ONE_IF_CONV_INSN): Ditto. (X86_TUNE_AVOID_MFENCE): Ditto. (X86_TUNE_EXPAND_ABS): Ditto. (X86_TUNE_USE_SIMODE_FIOP): Ditto. (X86_TUNE_USE_FFREEP): Ditto. (X86_TUNE_EXT_80387_CONSTANTS): Ditto. (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL): Ditto. (X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Ditto. (X86_TUNE_SSE_TYPELESS_STORES): Ditto. (X86_TUNE_SSE_LOAD0_BY_PXOR): Ditto. (X86_TUNE_USE_GATHER_2PARTS): Add m_YONGFENG. (X86_TUNE_USE_GATHER_4PARTS): Ditto. (X86_TUNE_USE_GATHER_8PARTS): Ditto. (X86_TUNE_AVOID_128FMA_CHAINS): Ditto. * doc/extend.texi: Add details about yongfeng. * doc/invoke.texi: Ditto. * config/i386/yongfeng.md: New file to describe yongfeng processor. 2023-10-30 Martin Jambor PR ipa/111157 * ipa-prop.h (struct ipa_argagg_value): Newf flag killed. * ipa-modref.cc (ipcp_argagg_and_kill_overlap_p): New function. (update_signature): Mark any any IPA-CP aggregate constants at positions known to be killed as killed. Move check that there is clone_info after this pruning. * ipa-cp.cc (ipa_argagg_value_list::dump): Dump the killed flag. (ipa_argagg_value_list::push_adjusted_values): Clear the new flag. (push_agg_values_from_plats): Likewise. (ipa_push_agg_values_from_jfunc): Likewise. (estimate_local_effects): Likewise. (push_agg_values_for_index_from_edge): Likewise. * ipa-prop.cc (write_ipcp_transformation_info): Stream the killed flag. (read_ipcp_transformation_info): Likewise. (ipcp_get_aggregate_const): Update comment, assert that encountered record does not have killed flag set. (ipcp_transform_function): Prune all aggregate constants with killed set. 2023-10-30 Martin Jambor PR ipa/111157 * ipa-prop.h (ipcp_transformation): New member function template remove_argaggs_if. * ipa-sra.cc (zap_useless_ipcp_results): Use remove_argaggs_if to filter aggreagate constants. 2023-10-30 Roger Sayle PR middle-end/101955 * config/arc/arc.md (*extvsi_1_0): New define_insn_and_split to convert sign extract of the least significant bit into an AND $1 then a NEG when !TARGET_BARREL_SHIFTER. 2023-10-30 Roger Sayle * config/arc/arc.cc (arc_rtx_costs): Improve cost estimates. Provide reasonable values for SHIFTS and ROTATES by constant bit counts depending upon TARGET_BARREL_SHIFTER. (arc_insn_cost): Use insn attributes if the instruction is recognized. Avoid calling get_attr_length for type "multi", i.e. define_insn_and_split patterns without explicit type. Fall-back to set_rtx_cost for single_set and pattern_cost otherwise. * config/arc/arc.h (COSTS_N_BYTES): Define helper macro. (BRANCH_COST): Improve/correct definition. (LOGICAL_OP_NON_SHORT_CIRCUIT): Preserve previous behavior. 2023-10-30 Roger Sayle * config/arc/arc.cc (arc_split_ashl): Use lsl16 on TARGET_SWAP. (arc_split_ashr): Use swap and sign-extend on TARGET_SWAP. (arc_split_lshr): Use lsr16 on TARGET_SWAP. (arc_split_rotl): Use swap on TARGET_SWAP. (arc_split_rotr): Likewise. * config/arc/arc.md (ANY_ROTATE): New code iterator. (si2_cnt16): New define_insn for alternate form of swap instruction on TARGET_SWAP. (ashlsi2_cnt16): Rename from *ashlsi16_cnt16 and move earlier. (lshrsi2_cnt16): New define_insn for LSR16 instruction. (*ashlsi2_cnt16): See above. 2023-10-30 Richard Ball * config/arm/aout.h: Change to use the Lrtx label. * config/arm/arm.h (CASE_VECTOR_PC_RELATIVE): Remove arm targets from (!target_pure_code) condition. (ADDR_VEC_ALIGN): Add align for tables in rodata section. * config/arm/arm.cc (arm_output_casesi): Alter the function to include .Lrtx label and remove adr instructions. * config/arm/arm.md (arm_casesi_internal): Use force_reg to generate ldr instructions that would otherwise be out of range, and change rtl to accommodate force reg. Additionally remove unnecessary register temp. (casesi): Remove pure code check for Arm. * config/arm/elf.h (JUMP_TABLES_IN_TEXT_SECTION): Remove arm targets from JUMP_TABLES_IN_TEXT_SECTION definition. 2023-10-30 Jeevitha Palanisamy PR target/106907 * config/rs6000/rs6000.cc (altivec_expand_vec_perm_const): Change bitwise xor to an equality and fix comment indentation. 2023-10-30 Juzhe-Zhong * config/riscv/riscv-protos.h (sew64_scalar_helper): Fix bug. * config/riscv/riscv-v.cc (sew64_scalar_helper): Ditto. * config/riscv/vector.md: Ditto. 2023-10-30 liuhongt PR target/104610 * config/i386/i386-expand.cc (ix86_expand_branch): Handle 512-bit vector with vpcmpeq + kortest. * config/i386/i386.md (cbranchxi4): New expander. * config/i386/sse.md: (cbranch4): Extend to V16SImode and V8DImode. 2023-10-30 Haochen Gui PR target/111449 * expr.cc (qi_vector_mode_supported_p): Rename to... (by_pieces_mode_supported_p): ...this, and extends it to do the checking for both scalar and vector mode. (widest_fixed_size_mode_for_size): Call by_pieces_mode_supported_p to examine the mode. (op_by_pieces_d::smallest_fixed_size_mode_for_size): Likewise. 2023-10-29 Martin Uecker PR tree-optimization/109334 * tree-object-size.cc (parm_object_size): Allow size computation for implicit access attributes. 2023-10-29 Max Filippov * config/xtensa/xtensa.h (TARGET_SALT): Change HW version from 260000 (which corresponds to RF-2014.0) to 270000 (which corresponds to RG-2015.0, the release where salt/saltu opcodes were introduced). 2023-10-29 Pan Li * config/riscv/riscv-avlprop.cc (pass_avlprop::execute): Use reference type to prevent copying. 2023-10-27 Vladimir N. Makarov PR rtl-optimization/112107 * ira-costs.cc: (calculate_equiv_gains): Use NONDEBUG_INSN_P instead of INSN_P. 2023-10-27 Andrew Stubbs PR target/112088 * config/gcn/gcn.cc (gcn_expand_epilogue): Fix kernel epilogue register conflict. 2023-10-27 Andrew Stubbs * config/gcn/gcn-valu.md (vec_extract_nop): Mention "operands" in condition to silence the warnings. (vec_extract_nop): Likewise. * config/gcn/gcn.md (*movti_insn): Likewise. 2023-10-27 Richard Sandiford * recog.cc (insn_propagation::apply_to_pattern_1): Handle shared ASM_OPERANDS. 2023-10-27 Yangyu Chen * config/riscv/riscv.cc (rocket_tune_info): Fix int_div cost. (sifive_7_tune_info, thead_c906_tune_info): Likewise. 2023-10-27 Robin Dapp * config/riscv/autovec.md (rawmemchr): New expander. * config/riscv/riscv-protos.h (gen_no_side_effects_vsetvl_rtx): Define. (expand_rawmemchr): Define. * config/riscv/riscv-v.cc (force_vector_length_operand): Remove static. (expand_block_move): Move from here... * config/riscv/riscv-string.cc (expand_block_move): ...to here. (expand_rawmemchr): Add vectorized expander. * internal-fn.cc (expand_RAWMEMCHR): Fix typo. 2023-10-27 Vladimir N. Makarov * ira-costs.cc: (get_equiv_regno, calculate_equiv_gains): Process reg equivalence invariants. 2023-10-27 Uros Bizjak * config/i386/x86-tune.def (X86_TUNE_PARTIAL_MEMORY_READ_STALL): i386: Fiy typo in "partial_memory_read_stall" tune option. 2023-10-27 Victor Do Nascimento * config/aarch64/aarch64.cc (aarch64_print_operand): Add support for CONST_STRING. 2023-10-27 Roger Sayle PR target/110551 * config/i386/i386.md (mul3): Make operands 1 and 2 take "regiser_operand" and "nonimmediate_operand" respectively. (mulqihi3): Likewise. (*bmi2_umul3_1): Operand 2 needs to be register_operand matching the %d constraint. Use umul_highpart RTX to represent the highpart multiplication. (*umul3_1): Operand 2 should use regiser_operand predicate, and "a" rather than "0" as operands 0 and 2 have different modes. (define_split): For mul to mulx conversion, use the new umul_highpart RTX representation. (*mul3_1): Operand 1 should be register_operand and the constraint %a as operands 0 and 1 have different modes. (*mulqihi3_1): Operand 1 should be register_operand matching the constraint %0. (define_peephole2): Providing widening multiplication variants of the peephole2s that tweak highpart multiplication register allocation. 2023-10-27 Lewis Hyatt PR preprocessor/87299 * toplev.cc (no_backend): New static global. (finalize): Remove argument no_backend, which is now a static global. (process_options): Likewise. (do_compile): Likewise. (target_reinit): Don't do anything in preprocess-only mode. (toplev::main): Adapt to no_backend change. (toplev::finalize): Likewise. 2023-10-27 Andrew Pinski PR tree-optimization/101590 PR tree-optimization/94884 * match.pd (`(X BIT_OP Y) CMP X`): New pattern. 2023-10-27 liuhongt PR target/103861 * config/i386/i386-expand.cc (ix86_expand_sse_movcc): Handle V2HF/V2BF/V4HF/V4BFmode. * config/i386/i386.cc (ix86_get_mask_mode): Return QImode when data_mode is V4HF/V2HFmode. * config/i386/mmx.md (vec_cmpv4hfqi): New expander. (vcond_mask_v4hi): Ditto. (vcond_mask_qi): Ditto. (vec_cmpv2hfqi): Ditto. (vcond_mask_v2hi): Ditto. (mmx_plendvb_): Add 2 combine splitters after the patterns. (mmx_pblendvb_v8qi): Ditto. (v2hi3): Add a combine splitter after the pattern. (3): Ditto. (v8qi3): Ditto. (3): Ditto. * config/i386/sse.md (vcond): Merge this with .. (vcond): .. this into .. (vcond): .. this, and extend to V8BF/V16BF/V32BFmode. 2023-10-26 Juzhe-Zhong * config/riscv/riscv-opts.h (TARGET_MAX_LMUL): New macro. * config/riscv/riscv-v.cc (preferred_simd_mode): Adapt macro. (autovectorize_vector_modes): Ditto. (can_find_related_mode_p): Ditto. 2023-10-26 Juzhe-Zhong PR target/111318 PR target/111888 * config.gcc: Add AVL propagation pass. * config/riscv/riscv-passes.def (INSERT_PASS_AFTER): Ditto. * config/riscv/riscv-protos.h (make_pass_avlprop): Ditto. * config/riscv/t-riscv: Ditto. * config/riscv/riscv-avlprop.cc: New file. 2023-10-26 David Malcolm * doc/extend.texi (Common Function Attributes): Add null_terminated_string_arg. 2023-10-26 Andrew Pinski PR tree-optimization/111957 * match.pd (`a != C1 ? abs(a) : C2`): New pattern. 2023-10-26 Aldy Hernandez * range-op-float.cc (range_operator::fold_range): Delete unused variable. 2023-10-26 Aldy Hernandez * range-op-float.cc (range_operator::fold_range): Remove superfluous code. (range_operator::rv_fold): Remove unneeded arguments. (operator_plus::rv_fold): Same. (operator_minus::rv_fold): Same. (operator_mult::rv_fold): Same. (operator_div::rv_fold): Same. * range-op-mixed.h: Remove lb, ub, and maybe_nan arguments from rv_fold methods. * range-op.h: Same. 2023-10-26 Aldy Hernandez * range-op-float.cc (range_operator::fold_range): Pass frange argument to rv_fold. (range_operator::rv_fold): Add frange argument. (operator_plus::rv_fold): Same. (operator_minus::rv_fold): Same. (operator_mult::rv_fold): Same. (operator_div::rv_fold): Same. * range-op-mixed.h: Add frange argument to rv_fold methods. * range-op.h: Same. 2023-10-26 Richard Ball * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Add table output for different machine modes for arm. * config/arm/arm-protos.h (arm_output_casesi): New prototype. * config/arm/arm.h (CASE_VECTOR_PC_RELATIVE): Make arm use ASM_OUTPUT_ADDR_DIFF_ELT. (CASE_VECTOR_SHORTEN_MODE): Change table size calculation for TARGET_ARM. (LABEL_ALIGN_AFTER_BARRIER): Change to accommodate .p2align 2 for TARGET_ARM. * config/arm/arm.cc (arm_output_casesi): New function. * config/arm/arm.md (arm_casesi_internal): Change casesi expand and insn. for arm to use new function arm_output_casesi. 2023-10-26 Iain Sandoe * config/darwin.h (darwin_label_is_anonymous_local_objc_name): Make metadata names linker-visibile for GNU objective C. 2023-10-26 Vladimir N. Makarov * dwarf2out.cc (reg_loc_descriptor): Use lra_eliminate_regs when LRA is used. * ira-costs.cc: Include regset.h. (equiv_can_be_consumed_p, get_equiv_regno, calculate_equiv_gains): New functions. (find_costs_and_classes): Call calculate_equiv_gains and redefine mem_cost of pseudos with equivs when LRA is used. * var-tracking.cc: Include ira.h and lra.h. (vt_initialize): Use lra_eliminate_regs when LRA is used. 2023-10-26 Juzhe-Zhong * doc/md.texi: Adapt COND_LEN pseudo code. 2023-10-26 Roger Sayle Richard Biener PR rtl-optimization/91865 * combine.cc (make_compound_operation): Avoid creating a ZERO_EXTEND of a ZERO_EXTEND. 2023-10-26 Jiahao Xu * config/loongarch/lasx.md (vcond_mask_): Change to (vcond_mask_): this. * config/loongarch/lsx.md (vcond_mask_): Change to (vcond_mask_): this. 2023-10-26 Thomas Schwinge * ipa-icf.cc (sem_item::target_supports_symbol_aliases_p): 'gcc_checking_assert (TARGET_SUPPORTS_ALIASES);' before 'return true;'. * ipa-visibility.cc (function_and_variable_visibility): Change '#ifdef ASM_OUTPUT_DEF' to 'if (TARGET_SUPPORTS_ALIASES)'. * varasm.cc (output_constant_pool_contents) [#ifdef ASM_OUTPUT_DEF]: 'gcc_checking_assert (TARGET_SUPPORTS_ALIASES);'. (do_assemble_alias) [#ifdef ASM_OUTPUT_DEF]: 'if (!TARGET_SUPPORTS_ALIASES)', 'gcc_checking_assert (seen_error ());'. (assemble_alias): Change '#if !defined (ASM_OUTPUT_DEF)' to 'if (!TARGET_SUPPORTS_ALIASES)'. (default_asm_output_anchor): 'gcc_checking_assert (TARGET_SUPPORTS_ALIASES);'. 2023-10-26 Alexandre Oliva PR tree-optimization/111520 * gimple-harden-conditionals.cc (pass_harden_compares::execute): Set EH edge probability and EH block execution count. 2023-10-26 Alexandre Oliva * tree-eh.h (make_eh_edges): Rename to... (make_eh_edge): ... this. * tree-eh.cc: Likewise. Adjust all callers... * gimple-harden-conditionals.cc: ... here, ... * gimple-harden-control-flow.cc: ... here, ... * tree-cfg.cc: ... here, ... * tree-inline.cc: ... and here. 2023-10-25 Iain Sandoe * config/darwin.cc (darwin_override_options): Handle fPIE. 2023-10-25 Iain Sandoe * config.gcc: Use -E to to sed to indicate that we are using extended REs. 2023-10-25 Jason Merrill * tree-core.h (struct tree_base): Update address_space comment. 2023-10-25 Wilco Dijkstra * config/aarch64/aarch64.cc (aarch64_internal_mov_immediate) Add support for immediates using MOV/EOR bitmask. 2023-10-25 Uros Bizjak PR target/111698 * config/i386/x86-tune.def (X86_TUNE_PARTIAL_MEMORY_READ_STALL): New tune. * config/i386/i386.h (TARGET_PARTIAL_MEMORY_READ_STALL): New macro. * config/i386/i386.md: New peephole pattern to narrow test instructions with immediate operands that test memory locations for zero. 2023-10-25 Andrew MacLeod * value-range.cc (irange::union_append): New. (irange::union_): Call union_append when appropriate. * value-range.h (irange::union_append): New prototype. 2023-10-25 Chenghui Pan * config/loongarch/lasxintrin.h (__lasx_xvftintrnel_l_s): Fix comments. (__lasx_xvfrintrne_s): Ditto. (__lasx_xvfrintrne_d): Ditto. (__lasx_xvfrintrz_s): Ditto. (__lasx_xvfrintrz_d): Ditto. (__lasx_xvfrintrp_s): Ditto. (__lasx_xvfrintrp_d): Ditto. (__lasx_xvfrintrm_s): Ditto. (__lasx_xvfrintrm_d): Ditto. * config/loongarch/lsxintrin.h (__lsx_vftintrneh_l_s): Ditto. (__lsx_vfrintrne_s): Ditto. (__lsx_vfrintrne_d): Ditto. (__lsx_vfrintrz_s): Ditto. (__lsx_vfrintrz_d): Ditto. (__lsx_vfrintrp_s): Ditto. (__lsx_vfrintrp_d): Ditto. (__lsx_vfrintrm_s): Ditto. (__lsx_vfrintrm_d): Ditto. 2023-10-25 chenxiaolong * config/loongarch/loongarch.md (get_thread_pointer):Adds the instruction template corresponding to the __builtin_thread_pointer function. * doc/extend.texi:Add the __builtin_thread_pointer function support description to the documentation. 2023-10-25 Richard Sandiford * Makefile.in (OBJS): Add rtl-ssa/movement.o. * rtl-ssa/access-utils.h (accesses_include_nonfixed_hard_registers) (single_set_info): New functions. (remove_uses_of_def, accesses_reference_same_resource): Declare. (insn_clobbers_resources): Likewise. * rtl-ssa/accesses.cc (rtl_ssa::remove_uses_of_def): New function. (rtl_ssa::accesses_reference_same_resource): Likewise. (rtl_ssa::insn_clobbers_resources): Likewise. * rtl-ssa/movement.h (can_move_insn_p): Declare. * rtl-ssa/movement.cc: New file. 2023-10-25 Richard Sandiford * rtl-ssa/functions.h (function_info::remains_available_at_insn): New member function. * rtl-ssa/accesses.cc (function_info::remains_available_at_insn): Likewise. (function_info::make_use_available): Avoid false negatives for queries within an EBB. 2023-10-25 Richard Sandiford * rtl-ssa/changes.cc: Include sreal.h. (rtl_ssa::changes_are_worthwhile): When optimizing for speed, scale the cost of each instruction by its execution frequency. 2023-10-25 Richard Sandiford * rtl-ssa/access-utils.h (next_call_clobbers): New function. (is_single_dominating_def, remains_available_on_exit): Replace with... * rtl-ssa/functions.h (function_info::is_single_dominating_def) (function_info::remains_available_on_exit): ...these new member functions. (function_info::m_clobbered_by_calls): New member variable. * rtl-ssa/functions.cc (function_info::function_info): Explicitly initialize m_clobbered_by_calls. * rtl-ssa/insns.cc (function_info::record_call_clobbers): Update m_clobbered_by_calls for each call-clobber note. * rtl-ssa/member-fns.inl (function_info::is_single_dominating_def): New function. Check for call clobbers. * rtl-ssa/accesses.cc (function_info::remains_available_on_exit): Likewise. 2023-10-25 Richard Sandiford * rtl-ssa/internals.h (build_info::exit_block_dominator): New member variable. * rtl-ssa/blocks.cc (build_info::build_info): Initialize it. (bb_walker::bb_walker): Use it, moving the computation of the dominator to... (function_info::process_all_blocks): ...here. (function_info::place_phis): Add dominance frontiers for the exit block. 2023-10-25 Richard Sandiford * rtl-ssa/functions.h (function_info::process_uses_of_deleted_def): New member function. * rtl-ssa/changes.cc (function_info::process_uses_of_deleted_def): Likewise. (function_info::change_insns): Use it. 2023-10-25 Richard Sandiford * rtl-ssa/changes.cc (function_info::finalize_new_accesses): If a change describes a set of memory, ensure that that set is kept, regardless of the insn pattern. 2023-10-25 Richard Sandiford * rtl-ssa/changes.cc (function_info::apply_changes_to_insn): Remove call to add_reg_unused_notes and instead... (function_info::change_insns): ...use a separate loop here. 2023-10-25 Richard Sandiford * rtl-ssa/blocks.cc (function_info::add_artificial_accesses): Force global registers to be live on exit. Handle any block with zero successors like an exit block. 2023-10-25 Thomas Schwinge * omp-oacc-kernels-decompose.cc (omp_oacc_kernels_decompose_1): Handle 'OMP_CLAUSE_SELF' like 'OMP_CLAUSE_IF'. * omp-expand.cc (expand_omp_target): Handle 'OMP_CLAUSE_SELF' for 'GF_OMP_TARGET_KIND_OACC_DATA_KERNELS'. 2023-10-25 Thomas Schwinge * tree-core.h (omp_clause_code): Move 'OMP_CLAUSE_SELF' after 'OMP_CLAUSE_IF'. * tree-pretty-print.cc (dump_omp_clause): Adjust. * tree.cc (omp_clause_num_ops, omp_clause_code_name): Likewise. * tree.h: Likewise. 2023-10-25 Juzhe-Zhong * config/riscv/riscv-protos.h (has_vl_op): Export from riscv-vsetvl to riscv-v (tail_agnostic_p): Ditto. (validate_change_or_fail): Ditto. (nonvlmax_avl_type_p): Ditto. (vlmax_avl_p): Ditto. (get_sew): Ditto. (enum vlmul_type): Ditto. (count_regno_occurrences): Ditto. * config/riscv/riscv-v.cc (has_vl_op): Ditto. (get_default_ta): Ditto. (tail_agnostic_p): Ditto. (validate_change_or_fail): Ditto. (nonvlmax_avl_type_p): Ditto. (vlmax_avl_p): Ditto. (get_sew): Ditto. (enum vlmul_type): Ditto. (get_vlmul): Ditto. (count_regno_occurrences): Ditto. * config/riscv/riscv-vsetvl.cc (vlmax_avl_p): Ditto. (has_vl_op): Ditto. (get_sew): Ditto. (get_vlmul): Ditto. (get_default_ta): Ditto. (tail_agnostic_p): Ditto. (count_regno_occurrences): Ditto. (validate_change_or_fail): Ditto. 2023-10-25 Chung-Lin Tang * gimplify.cc (gimplify_scan_omp_clauses): Add OMP_CLAUSE_SELF case. (gimplify_adjust_omp_clauses): Likewise. * omp-expand.cc (expand_omp_target): Add OMP_CLAUSE_SELF expansion code, * omp-low.cc (scan_sharing_clauses): Add OMP_CLAUSE_SELF case. * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_SELF enum. * tree-nested.cc (convert_nonlocal_omp_clauses): Add OMP_CLAUSE_SELF case. (convert_local_omp_clauses): Likewise. * tree-pretty-print.cc (dump_omp_clause): Add OMP_CLAUSE_SELF case. * tree.cc (omp_clause_num_ops): Add OMP_CLAUSE_SELF entry. (omp_clause_code_name): Likewise. * tree.h (OMP_CLAUSE_SELF_EXPR): New macro. 2023-10-25 Juzhe-Zhong * config/riscv/riscv-protos.h (vlmax_avl_type_p): New function. * config/riscv/riscv-v.cc (vlmax_avl_type_p): Ditto. * config/riscv/riscv-vsetvl.cc (get_avl): Adapt function. * config/riscv/vector.md: Change avl_type into avl_type_idx. 2023-10-24 Richard Sandiford * recog.cc (constrain_operands): Remove UNARY_P handling. * reload.cc (find_reloads): Likewise. 2023-10-24 Jose E. Marchesi * gcov-io.h: Fix record length encoding in comment. 2023-10-24 Roger Sayle * config/i386/i386-features.cc (compute_convert_gain): Provide more accurate values (sizes) for inter-unit moves with -Os. 2023-10-24 Roger Sayle Claudiu Zissulescu * config/arc/arc-protos.h (output_shift): Rename to... (output_shift_loop): Tweak API to take an explicit rtx_code. (arc_split_ashl): Prototype new function here. (arc_split_ashr): Likewise. (arc_split_lshr): Likewise. (arc_split_rotl): Likewise. (arc_split_rotr): Likewise. * config/arc/arc.cc (output_shift): Delete local prototype. Rename. (output_shift_loop): New function replacing output_shift to output a zero overheap loop for SImode shifts and rotates on ARC targets without barrel shifter (i.e. no hardware support for these insns). (arc_split_ashl): New helper function to split *ashlsi3_nobs. (arc_split_ashr): New helper function to split *ashrsi3_nobs. (arc_split_lshr): New helper function to split *lshrsi3_nobs. (arc_split_rotl): New helper function to split *rotlsi3_nobs. (arc_split_rotr): New helper function to split *rotrsi3_nobs. (arc_print_operand): Correct whitespace. (arc_rtx_costs): Likewise. (hwloop_optimize): Likewise. * config/arc/arc.md (ANY_SHIFT_ROTATE): New define_code_iterator. (define_code_attr insn): New code attribute to map to pattern name. (si3): New expander unifying previous ashlsi3, ashrsi3 and lshrsi3 define_expands. Adds rotlsi3 and rotrsi3. (*si3_nobs): New define_insn_and_split that unifies the previous *ashlsi3_nobs, *ashrsi3_nobs and *lshrsi3_nobs. We now call arc_split_ in arc.cc to implement each split. (shift_si3): Delete define_insn, all shifts/rotates are now split. (shift_si3_loop): Rename to... (si3_loop): define_insn to handle loop implementations of SImode shifts and rotates, calling ouput_shift_loop for template. (rotrsi3): Rename to... (*rotrsi3_insn): define_insn for TARGET_BARREL_SHIFTER's ror. (*rotlsi3): New define_insn_and_split to transform left rotates into right rotates before reload. (rotlsi3_cnt1): New define_insn_and_split to implement a left rotate by one bit using an add.f followed by an adc. * config/arc/predicates.md (shiftr4_operator): Delete. 2023-10-24 Claudiu Zissulescu * config/arc/arc.md (mulsi3_700): Update pattern. (mulsi3_v2): Likewise. * config/arc/predicates.md (mpy_dest_reg_operand): Remove it. 2023-10-24 Andrew Pinski PR tree-optimization/104376 PR tree-optimization/101541 * tree-ssa-phiopt.cc (factor_out_conditional_operation): Allow nop conversions even if it is defined by a statement inside the conditional. 2023-10-24 Andrew Pinski PR tree-optimization/111913 * match.pd (`popcount(X&Y) + popcount(X|Y)`): Add the resulting type for popcount. 2023-10-24 Richard Sandiford * rtl-ssa/blocks.cc (function_info::create_degenerate_phi): Check whether the requested phi already exists. 2023-10-24 Richard Sandiford * rtl-ssa.h: Include cfgbuild.h. * rtl-ssa/movement.h (can_insert_after): Replace is_jump with the more comprehensive control_flow_insn_p. 2023-10-24 Richard Sandiford * rtl-ssa/changes.cc (function_info::perform_pending_updates): Check whether an insn has been replaced by a note. 2023-10-24 Richard Sandiford * rtl-ssa/member-fns.inl (first_any_insn_use): Handle null m_first_use. 2023-10-24 Richard Sandiford * config/i386/i386-expand.cc (ix86_split_mmx_punpck): Allow the destination to be wider than the sources. Take the mode from the first source. (ix86_expand_sse_extend): Pass the destination directly to ix86_split_mmx_punpck, rather than using a fresh register that is half the size. 2023-10-24 Richard Sandiford * config/i386/predicates.md (aeswidekl_operation): Protect REGNO check with REG_P. 2023-10-24 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_insn_cost): New function. (TARGET_INSN_COST): Define. 2023-10-24 Richard Sandiford * config/aarch64/atomics.md (aarch64_atomic_exchange): Require !TARGET_LSE. 2023-10-24 xuli PR target/111935 * config/riscv/riscv-vector-builtins-bases.cc: fix bug. 2023-10-24 Mark Harmstone * opts.cc (debug_type_names): Remove stabs and xcoff. (df_set_names): Adjust. 2023-10-24 Juzhe-Zhong PR target/111947 * config/riscv/riscv-vsetvl.cc (pre_vsetvl::compute_lcm_local_properties): Add REGNO check. 2023-10-23 Lewis Hyatt PR preprocessor/36887 * toplev.h (ident_hash_extra): Declare... * stringpool.cc (ident_hash_extra): ...this new global variable. (init_stringpool): Handle ident_hash_extra as well as ident_hash. (ggc_mark_stringpool): Likewise. (ggc_purge_stringpool): Likewise. (struct string_pool_data_extra): New struct. (spd2): New GC root variable. (gt_pch_save_stringpool): Use spd2 to handle ident_hash_extra, analogous to how spd is used to handle ident_hash. (gt_pch_restore_stringpool): Likewise. 2023-10-23 Robin Dapp PR tree-optimization/111794 * tree-vect-stmts.cc (vectorizable_assignment): Add same-precision exception for dest and source. 2023-10-23 Robin Dapp * config/riscv/autovec.md (popcount2): New expander. * config/riscv/riscv-protos.h (expand_popcount): Define. * config/riscv/riscv-v.cc (expand_popcount): Vectorize popcount with the WWG algorithm. 2023-10-23 Richard Biener PR tree-optimization/111916 * tree-sra.cc (sra_modify_assign): Do not lower all BIT_FIELD_REF reads that are sra_handled_bf_read_p. 2023-10-23 Richard Biener PR tree-optimization/111915 * tree-vect-slp.cc (vect_build_slp_tree_1): Check all accesses are either grouped or not. 2023-10-23 Richard Biener PR ipa/111914 * tree-inline.cc (setup_one_parameter): Move code emitting a dummy load when not optimizing ... (initialize_inlined_parameters): ... here to after when we remapped the parameter type. 2023-10-23 Oleg Endo PR target/111001 * config/sh/sh_treg_combine.cc (sh_treg_combine::record_set_of_reg): Skip over nop move insns. 2023-10-23 Tamar Christina PR tree-optimization/111860 * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): Drop .MEM nodes only. 2023-10-23 Andrew Pinski * match.pd (`(A - B) CMP 0 ? (A - B) : (B - A)`): New patterns. 2023-10-23 Andrew Pinski * convert.cc (convert_to_pointer_1): Return error_mark_node after an error. (convert_to_real_1): Likewise. (convert_to_integer_1): Likewise. (convert_to_complex_1): Likewise. 2023-10-23 Andrew Pinski PR c/111903 * convert.cc (convert_to_complex_1): Return error_mark_node if either convert was an error when converting from a scalar. 2023-10-23 Richard Biener PR tree-optimization/111917 * tree-ssa-loop-unswitch.cc (hoist_guard): Always insert new conditional after last stmt. 2023-10-23 Juzhe-Zhong PR target/111927 * config/riscv/riscv-vsetvl.cc: Fix bug. 2023-10-23 Pan Li * config/riscv/riscv-v.cc (emit_vec_cvt_x_f_rtz): Add insn type arg. (expand_vec_trunc): Take MA instead of MU for cvt_x_f_rtz. 2023-10-23 Xi Ruoyao * doc/invoke.texi (-mexplicit-relocs=style): Document. (-mexplicit-relocs): Document as an alias of -mexplicit-relocs=always. (-mno-explicit-relocs): Document as an alias of -mexplicit-relocs=none. (-mcmodel=extreme): Mention -mexplicit-relocs=always instead of -mexplicit-relocs. 2023-10-23 Xi Ruoyao * config/loongarch/predicates.md (symbolic_pcrel_operand): New predicate. * config/loongarch/loongarch.md (define_peephole2): Optimize la.local + ld/st to pcalau12i + ld/st if the address is only used once if -mexplicit-relocs=auto and -mcmodel=normal or medium. 2023-10-23 Xi Ruoyao * config/loongarch/loongarch.cc (loongarch_explicit_relocs_p): Return true for TLS symbol types if -mexplicit-relocs=auto. (loongarch_call_tls_get_addr): Replace TARGET_EXPLICIT_RELOCS with la_opt_explicit_relocs != EXPLICIT_RELOCS_NONE. (loongarch_legitimize_tls_address): Likewise. * config/loongarch/loongarch.md (@tls_low): Remove TARGET_EXPLICIT_RELOCS from insn condition. 2023-10-23 Xi Ruoyao * config/loongarch/loongarch-protos.h (loongarch_explicit_relocs_p): Declare new function. * config/loongarch/loongarch.cc (loongarch_explicit_relocs_p): Implement. (loongarch_symbol_insns): Call loongarch_explicit_relocs_p for SYMBOL_GOT_DISP, instead of using TARGET_EXPLICIT_RELOCS. (loongarch_split_symbol): Call loongarch_explicit_relocs_p for deciding if return early, instead of using TARGET_EXPLICIT_RELOCS. (loongarch_output_move): CAll loongarch_explicit_relocs_p instead of using TARGET_EXPLICIT_RELOCS. * config/loongarch/loongarch.md (*low): Remove TARGET_EXPLICIT_RELOCS from insn condition. (@ld_from_got): Likewise. * config/loongarch/predicates.md (move_operand): Call loongarch_explicit_relocs_p instead of using TARGET_EXPLICIT_RELOCS. 2023-10-23 Xi Ruoyao * config/loongarch/genopts/loongarch-strings: Add strings for -mexplicit-relocs={auto,none,always}. * config/loongarch/genopts/loongarch.opt.in: Add options for -mexplicit-relocs={auto,none,always}. * config/loongarch/loongarch-str.h: Regenerate. * config/loongarch/loongarch.opt: Regenerate. * config/loongarch/loongarch-def.h (EXPLICIT_RELOCS_AUTO): Define. (EXPLICIT_RELOCS_NONE): Define. (EXPLICIT_RELOCS_ALWAYS): Define. (N_EXPLICIT_RELOCS_TYPES): Define. * config/loongarch/loongarch.cc (loongarch_option_override_internal): Error out if the old-style -m[no-]explicit-relocs option is used with -mexplicit-relocs={auto,none,always} together. Map -mno-explicit-relocs to -mexplicit-relocs=none and -mexplicit-relocs to -mexplicit-relocs=always for backward compatibility. Set a proper default for -mexplicit-relocs= based on configure-time probed linker capability. Update a diagnostic message to mention -mexplicit-relocs=always instead of the old-style -mexplicit-relocs. (loongarch_handle_model_attribute): Update a diagnostic message to mention -mexplicit-relocs=always instead of the old-style -mexplicit-relocs. * config/loongarch/loongarch.h (TARGET_EXPLICIT_RELOCS): Define. 2023-10-23 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): Fix typo. (pre_vsetvl::pre_global_vsetvl_info): Ditto. 2023-10-23 Juzhe-Zhong * config/riscv/vector.md: Fix avl_type attribute of tuple mov. 2023-10-23 Kewen Lin PR tree-optimization/111784 * tree-vect-stmts.cc (vectorizable_store): Adjust costing way for adjacent vector stores, by costing them with the total number rather than costing them one by one. (vectorizable_load): Adjust costing way for adjacent vector loads, by costing them with the total number rather than costing them one by one. 2023-10-23 Haochen Jiang PR target/111753 * config/i386/i386.cc (ix86_standard_x87sse_constant_load_p): Do not split to xmm16+ when !TARGET_AVX512VL. 2023-10-23 Pan Li * config/riscv/riscv-protos.h (enum insn_type): Add new type values. * config/riscv/riscv-v.cc (emit_vec_cvt_x_f): Add undef merge operand handling. (expand_vec_ceil): Take MA instead of MU for tmp register. (expand_vec_floor): Ditto. (expand_vec_nearbyint): Ditto. (expand_vec_rint): Ditto. (expand_vec_round): Ditto. (expand_vec_roundeven): Ditto. 2023-10-23 Lulu Cheng * config/loongarch/loongarch.h (CLEAR_INSN_CACHE): New definition. 2023-10-23 Haochen Gui PR target/111449 * expr.cc (can_use_qi_vectors): New function to return true if we know how to implement OP using vectors of bytes. (qi_vector_mode_supported_p): New function to check if optabs exists for the mode and certain by pieces operations. (widest_fixed_size_mode_for_size): Replace the second argument with the type of by pieces operations. Call can_use_qi_vectors and qi_vector_mode_supported_p to do the check. Call scalar_mode_supported_p to check if the scalar mode is supported. (by_pieces_ninsns): Pass the type of by pieces operation to widest_fixed_size_mode_for_size. (class op_by_pieces_d): Remove m_qi_vector_mode. Add m_op to record the type of by pieces operations. (op_by_pieces_d::op_by_pieces_d): Change last argument to the type of by pieces operations, initialize m_op with it. Pass m_op to function widest_fixed_size_mode_for_size. (op_by_pieces_d::get_usable_mode): Pass m_op to function widest_fixed_size_mode_for_size. (op_by_pieces_d::smallest_fixed_size_mode_for_size): Call can_use_qi_vectors and qi_vector_mode_supported_p to do the check. (op_by_pieces_d::run): Pass m_op to function widest_fixed_size_mode_for_size. (move_by_pieces_d::move_by_pieces_d): Set m_op to MOVE_BY_PIECES. (store_by_pieces_d::store_by_pieces_d): Set m_op with the op. (can_store_by_pieces): Pass the type of by pieces operations to widest_fixed_size_mode_for_size. (clear_by_pieces): Initialize class store_by_pieces_d with CLEAR_BY_PIECES. (compare_by_pieces_d::compare_by_pieces_d): Set m_op to COMPARE_BY_PIECES. 2023-10-23 liuhongt PR tree-optimization/111820 PR tree-optimization/111833 * tree-vect-loop-manip.cc (vect_can_peel_nonlinear_iv_p): Give up vectorization for nonlinear iv vect_step_op_mul when step_expr is not exact_log2 and niters is greater than TYPE_PRECISION (TREE_TYPE (step_expr)). Also don't vectorize for nagative niters_skip which will be used by fully masked loop. (vect_can_advance_ivs_p): Pass whole phi_info to vect_can_peel_nonlinear_iv_p. * tree-vect-loop.cc (vect_peel_nonlinear_iv_init): Optimize init_expr * pow (step_expr, skipn) to init_expr << (log2 (step_expr) * skipn) when step_expr is exact_log2. 2023-10-23 liuhongt * config/i386/mmx.md (mmx_pinsrw): Remove. 2023-10-22 Andrew Pinski PR target/110986 * config/aarch64/aarch64.md (*cmov_insn_insv): New pattern. (*cmov_uxtw_insn_insv): Likewise. 2023-10-22 Francois-Xavier Coudert * doc/invoke.texi: Document the new -nodefaultrpaths option. * doc/install.texi: Document the new --with-darwin-extra-rpath option. 2023-10-22 Iain Sandoe * Makefile.in: set ENABLE_DARWIN_AT_RPATH in site.tmp. 2023-10-22 Iain Sandoe * configure.ac: Add --with-darwin-extra-rpath option. * config/darwin.h: Handle DARWIN_EXTRA_RPATH. * config.in: Regenerate. * configure: Regenerate. 2023-10-22 Iain Sandoe * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * config/darwin.h: Handle Darwin rpaths. * config/darwin.opt: Handle Darwin rpaths. * Makefile.in: Handle Darwin rpaths. 2023-10-22 Iain Sandoe * gcc.cc (RUNPATH_OPTION): New. (do_spec_1): Provide '%P' as a spec to insert rpaths for each compiler startfile path. 2023-10-22 Andrew Burgess Maxim Blinov Francois-Xavier Coudert Iain Sandoe * config.gcc: Default to heap trampolines on macOS 11 and above. * config/i386/darwin.h: Define X86_CUSTOM_FUNCTION_TEST. * config/i386/i386.h: Define X86_CUSTOM_FUNCTION_TEST. * config/i386/i386.cc: Use X86_CUSTOM_FUNCTION_TEST. 2023-10-22 Andrew Burgess Maxim Blinov Iain Sandoe Francois-Xavier Coudert * builtins.def (BUILT_IN_NESTED_PTR_CREATED): Define. (BUILT_IN_NESTED_PTR_DELETED): Ditto. * common.opt (ftrampoline-impl): Add option to control generation of trampoline instantiation (heap or stack). * coretypes.h: Define enum trampoline_impl. * tree-nested.cc (convert_tramp_reference_op): Don't bother calling __builtin_adjust_trampoline for heap trampolines. (finalize_nesting_tree_1): Emit calls to __builtin_nested_...{created,deleted} if we're generating with -ftrampoline-impl=heap. * tree.cc (build_common_builtin_nodes): Build __builtin_nested_...{created,deleted}. * doc/invoke.texi (-ftrampoline-impl): Document. 2023-10-22 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_subset_list::parse): Prohibit 'E' and 'H' combinations. 2023-10-22 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_version_table): Change version number of the 'Zfa' extension to 1.0. 2023-10-21 Pan Li PR target/111857 * config/riscv/riscv-opts.h (TARGET_VECTOR_VLS): Remove. * config/riscv/riscv-protos.h (vls_mode_valid_p): New func decl. * config/riscv/riscv-v.cc (autovectorize_vector_modes): Replace macro reference to func. (vls_mode_valid_p): New func impl for vls mode valid or not. * config/riscv/riscv-vector-switch.def (VLS_ENTRY): Replace macro reference to func. * config/riscv/vector-iterators.md: Ditto. 2023-10-20 Roger Sayle Uros Bizjak PR middle-end/101955 PR tree-optimization/106245 * config/i386/i386.md (*extv_1_0): New define_insn_and_split. 2023-10-20 David Edelsohn * gimple-harden-control-flow.cc: Include memmodel.h. 2023-10-20 David Edelsohn * gimple-harden-control-flow.cc: Include tm_p.h. 2023-10-20 Andre Vieira PR tree-optimization/111882 * tree-if-conv.cc (get_bitfield_rep): Return NULL_TREE for bitfields with non-constant offsets. 2023-10-20 Tamar Christina PR tree-optimization/111866 * tree-vect-loop-manip.cc (vect_do_peeling): Pass null as vinfo to vect_set_loop_condition during prolog peeling. 2023-10-20 Richard Biener PR tree-optimization/111445 * tree-scalar-evolution.cc (simple_iv_with_niters): Add missing check for a sign-conversion. 2023-10-20 Richard Biener PR tree-optimization/110243 PR tree-optimization/111336 * tree-ssa-loop-ivopts.cc (strip_offset_1): Rewrite operations with undefined behavior on overflow to unsigned arithmetic. 2023-10-20 Richard Biener PR tree-optimization/111891 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Fix assert. 2023-10-20 Andrew Stubbs * config.gcc: Allow --with-arch=gfx1030. * config/gcn/gcn-hsa.h (NO_XNACK): gfx1030 does not support xnack. (ASM_SPEC): gfx1030 needs -mattr=+wavefrontsize64 set. * config/gcn/gcn-opts.h (enum processor_type): Add PROCESSOR_GFX1030. (TARGET_GFX1030): New. (TARGET_RDNA2): New. * config/gcn/gcn-valu.md (@dpp_move): Disable for RDNA2. (addc3): Add RDNA2 syntax variant. (subc3): Likewise. (2_exec): Add RDNA2 alternatives. (vec_cmpdi): Likewise. (vec_cmpdi): Likewise. (vec_cmpdi_exec): Likewise. (vec_cmpdi_exec): Likewise. (vec_cmpdi_dup): Likewise. (vec_cmpdi_dup_exec): Likewise. (reduc__scal_): Disable for RDNA2. (*_dpp_shr_): Likewise. (*plus_carry_dpp_shr_): Likewise. (*plus_carry_in_dpp_shr_): Likewise. * config/gcn/gcn.cc (gcn_option_override): Recognise gfx1030. (gcn_global_address_p): RDNA2 only allows smaller offsets. (gcn_addr_space_legitimate_address_p): Likewise. (gcn_omp_device_kind_arch_isa): Recognise gfx1030. (gcn_expand_epilogue): Use VGPRs instead of SGPRs. (output_file_start): Configure gfx1030. * config/gcn/gcn.h (TARGET_CPU_CPP_BUILTINS): Add __RDNA2__; (ASSEMBLER_DIALECT): New. * config/gcn/gcn.md (rdna): New define_attr. (enabled): Use "rdna" attribute. (gcn_return): Remove s_dcache_wb. (addcsi3_scalar): Add RDNA2 syntax variant. (addcsi3_scalar_zero): Likewise. (addptrdi3): Likewise. (mulsi3): v_mul_lo_i32 should be v_mul_lo_u32 on all ISA. (*memory_barrier): Add RDNA2 syntax variant. (atomic_load): Add RDNA2 cache control variants, and disable scalar atomics for RDNA2. (atomic_store): Likewise. (atomic_exchange): Likewise. * config/gcn/gcn.opt (gpu_type): Add gfx1030. * config/gcn/mkoffload.cc (EF_AMDGPU_MACH_AMDGCN_GFX1030): New. (main): Recognise -march=gfx1030. * config/gcn/t-omp-device: Add gfx1030 isa. 2023-10-20 Richard Biener PR tree-optimization/111000 * stor-layout.h (element_precision): Move .. * tree.h (element_precision): .. here. * tree-ssa-loop-im.cc (movement_possibility_1): Restrict motion of shifts and rotates. 2023-10-20 Alexandre Oliva * tree-core.h (ECF_XTHROW): New macro. * tree.cc (set_call_expr): Add expected_throw attribute when ECF_XTHROW is set. (build_common_builtin_node): Add ECF_XTHROW to __cxa_end_cleanup and _Unwind_Resume or _Unwind_SjLj_Resume. * calls.cc (flags_from_decl_or_type): Check for expected_throw attribute to set ECF_XTHROW. * gimple.cc (gimple_build_call_from_tree): Propagate ECF_XTHROW from decl flags to gimple call... (gimple_call_flags): ... and back. * gimple.h (GF_CALL_XTHROW): New gf_mask flag. (gimple_call_set_expected_throw): New. (gimple_call_expected_throw_p): New. * Makefile.in (OBJS): Add gimple-harden-control-flow.o. * builtins.def (BUILT_IN___HARDCFR_CHECK): New. * common.opt (fharden-control-flow-redundancy): New. (-fhardcfr-check-returning-calls): New. (-fhardcfr-check-exceptions): New. (-fhardcfr-check-noreturn-calls=*): New. (Enum hardcfr_check_noreturn_calls): New. (fhardcfr-skip-leaf): New. * doc/invoke.texi: Document them. (hardcfr-max-blocks, hardcfr-max-inline-blocks): New params. * flag-types.h (enum hardcfr_noret): New. * gimple-harden-control-flow.cc: New. * params.opt (-param=hardcfr-max-blocks=): New. (-param=hradcfr-max-inline-blocks=): New. * passes.def (pass_harden_control_flow_redundancy): Add. * tree-pass.h (make_pass_harden_control_flow_redundancy): Declare. * doc/extend.texi: Document expected_throw attribute. 2023-10-20 Alex Coplan * rtl-ssa/changes.cc (function_info::change_insns): Ensure we call ::remove_insn on deleted insns. 2023-10-20 Richard Biener * doc/generic.texi ({L,R}ROTATE_EXPR): Document. 2023-10-20 Oleg Endo PR target/101177 * config/sh/sh.md (unnamed split pattern): Fix comparison of find_regno_note result. 2023-10-20 Richard Biener * tree-vect-loop.cc (update_epilogue_loop_vinfo): Rewrite both STMT_VINFO_GATHER_SCATTER_P and VMAT_GATHER_SCATTER stmt refs. 2023-10-20 Richard Biener * tree-vect-slp.cc (off_map, off_op0_map, off_arg2_map, off_arg3_arg2_map): New. (vect_get_operand_map): Get flag whether the stmt was recognized as gather or scatter and use the above accordingly. (vect_get_and_check_slp_defs): Adjust. (vect_build_slp_tree_2): Likewise. 2023-10-20 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pre_vsetvl::fuse_local_vsetvl_info): Rename variables. (pre_vsetvl::pre_global_vsetvl_info): Ditto. (pre_vsetvl::emit_vsetvl): Ditto. 2023-10-20 Tamar Christina Andre Vieira * tree-if-conv.cc (if_convertible_loop_p_1): Move check from here ... (get_loop_body_if_conv_order): ... to here. (if_convertible_loop_p): Remove single_exit check. (tree_if_conversion): Move single_exit check to if-conversion part and support multiple exits. 2023-10-20 Tamar Christina Andre Vieira * tree-vect-patterns.cc (vect_init_pattern_stmt): Copy STMT_VINFO_TYPE from original statement. (vect_recog_bitfield_ref_pattern): Support bitfields in gcond. 2023-10-20 Juzhe-Zhong PR target/111848 * config/riscv/riscv-selftests.cc (run_const_vector_selftests): Adapt selftest. * config/riscv/riscv-v.cc (expand_const_vector): Change it into vec_duplicate splitter. 2023-10-20 Lehua Ding PR target/111037 PR target/111234 PR target/111725 * config/riscv/riscv-vsetvl.cc (bitmap_union_of_preds_with_entry): New. (debug): Removed. (compute_reaching_defintion): New. (enum vsetvl_type): Moved. (vlmax_avl_p): Moved. (enum emit_type): Moved. (vlmul_to_str): Moved. (vlmax_avl_insn_p): Removed. (policy_to_str): Moved. (loop_basic_block_p): Removed. (valid_sew_p): Removed. (vsetvl_insn_p): Moved. (vsetvl_vtype_change_only_p): Removed. (after_or_same_p): Removed. (before_p): Removed. (anticipatable_occurrence_p): Removed. (available_occurrence_p): Removed. (insn_should_be_added_p): Removed. (get_all_sets): Moved. (get_same_bb_set): Moved. (gen_vsetvl_pat): Removed. (calculate_vlmul): Moved. (get_max_int_sew): New. (emit_vsetvl_insn): Removed. (get_max_float_sew): New. (eliminate_insn): Removed. (insert_vsetvl): Removed. (count_regno_occurrences): Moved. (get_vl_vtype_info): Removed. (enum def_type): Moved. (validate_change_or_fail): Moved. (change_insn): Removed. (get_all_real_uses): Moved. (get_forward_read_vl_insn): Removed. (get_backward_fault_first_load_insn): Removed. (change_vsetvl_insn): Removed. (avl_source_has_vsetvl_p): Removed. (source_equal_p): Moved. (calculate_sew): Removed. (same_equiv_note_p): Moved. (get_expr_id): New. (incompatible_avl_p): Removed. (get_regno): New. (different_sew_p): Removed. (get_bb_index): New. (different_lmul_p): Removed. (has_no_uses): Moved. (different_ratio_p): Removed. (different_tail_policy_p): Removed. (different_mask_policy_p): Removed. (possible_zero_avl_p): Removed. (enum demand_flags): New. (second_ratio_invalid_for_first_sew_p): Removed. (second_ratio_invalid_for_first_lmul_p): Removed. (enum class): New. (float_insn_valid_sew_p): Removed. (second_sew_less_than_first_sew_p): Removed. (first_sew_less_than_second_sew_p): Removed. (class vsetvl_info): New. (compare_lmul): Removed. (second_lmul_less_than_first_lmul_p): Removed. (second_ratio_less_than_first_ratio_p): Removed. (DEF_INCOMPATIBLE_COND): Removed. (greatest_sew): Removed. (first_sew): Removed. (second_sew): Removed. (first_vlmul): Removed. (second_vlmul): Removed. (first_ratio): Removed. (second_ratio): Removed. (vlmul_for_first_sew_second_ratio): Removed. (vlmul_for_greatest_sew_second_ratio): Removed. (ratio_for_second_sew_first_vlmul): Removed. (class vsetvl_block_info): New. (DEF_SEW_LMUL_FUSE_RULE): New. (always_unavailable): Removed. (avl_unavailable_p): Removed. (class demand_system): New. (sew_unavailable_p): Removed. (lmul_unavailable_p): Removed. (ge_sew_unavailable_p): Removed. (ge_sew_lmul_unavailable_p): Removed. (ge_sew_ratio_unavailable_p): Removed. (DEF_UNAVAILABLE_COND): Removed. (same_sew_lmul_demand_p): Removed. (propagate_avl_across_demands_p): Removed. (reg_available_p): Removed. (support_relaxed_compatible_p): Removed. (demands_can_be_fused_p): Removed. (earliest_pred_can_be_fused_p): Removed. (vsetvl_dominated_by_p): Removed. (avl_info::avl_info): Removed. (avl_info::single_source_equal_p): Removed. (avl_info::multiple_source_equal_p): Removed. (DEF_SEW_LMUL_RULE): New. (avl_info::operator=): Removed. (avl_info::operator==): Removed. (DEF_POLICY_RULE): New. (avl_info::operator!=): Removed. (avl_info::has_non_zero_avl): Removed. (vl_vtype_info::vl_vtype_info): Removed. (vl_vtype_info::operator==): Removed. (DEF_AVL_RULE): New. (vl_vtype_info::operator!=): Removed. (vl_vtype_info::same_avl_p): Removed. (vl_vtype_info::same_vtype_p): Removed. (vl_vtype_info::same_vlmax_p): Removed. (vector_insn_info::operator>=): Removed. (vector_insn_info::operator==): Removed. (class pre_vsetvl): New. (vector_insn_info::parse_insn): Removed. (vector_insn_info::compatible_p): Removed. (vector_insn_info::skip_avl_compatible_p): Removed. (vector_insn_info::compatible_avl_p): Removed. (vector_insn_info::compatible_vtype_p): Removed. (vector_insn_info::available_p): Removed. (vector_insn_info::fuse_avl): Removed. (vector_insn_info::fuse_sew_lmul): Removed. (vector_insn_info::fuse_tail_policy): Removed. (vector_insn_info::fuse_mask_policy): Removed. (vector_insn_info::local_merge): Removed. (vector_insn_info::global_merge): Removed. (vector_insn_info::get_avl_or_vl_reg): Removed. (vector_insn_info::update_fault_first_load_avl): Removed. (vector_insn_info::dump): Removed. (vector_infos_manager::vector_infos_manager): Removed. (vector_infos_manager::create_expr): Removed. (vector_infos_manager::get_expr_id): Removed. (vector_infos_manager::all_same_ratio_p): Removed. (vector_infos_manager::all_avail_in_compatible_p): Removed. (vector_infos_manager::all_same_avl_p): Removed. (vector_infos_manager::expr_set_num): Removed. (vector_infos_manager::release): Removed. (vector_infos_manager::create_bitmap_vectors): Removed. (vector_infos_manager::free_bitmap_vectors): Removed. (vector_infos_manager::dump): Removed. (class pass_vsetvl): Adjust. (pass_vsetvl::get_vector_info): Removed. (pass_vsetvl::get_block_info): Removed. (pass_vsetvl::update_vector_info): Removed. (pass_vsetvl::update_block_info): Removed. (pre_vsetvl::compute_avl_def_data): New. (pass_vsetvl::simple_vsetvl): Removed. (pass_vsetvl::compute_local_backward_infos): Removed. (pass_vsetvl::need_vsetvl): Removed. (pass_vsetvl::transfer_before): Removed. (pass_vsetvl::transfer_after): Removed. (pre_vsetvl::compute_vsetvl_def_data): New. (pass_vsetvl::emit_local_forward_vsetvls): Removed. (pass_vsetvl::prune_expressions): Removed. (pass_vsetvl::compute_local_properties): Removed. (pre_vsetvl::compute_lcm_local_properties): New. (pass_vsetvl::earliest_fusion): Removed. (pre_vsetvl::fuse_local_vsetvl_info): New. (pass_vsetvl::vsetvl_fusion): Removed. (pass_vsetvl::can_refine_vsetvl_p): Removed. (pre_vsetvl::earliest_fuse_vsetvl_info): New. (pass_vsetvl::refine_vsetvls): Removed. (pass_vsetvl::cleanup_vsetvls): Removed. (pass_vsetvl::commit_vsetvls): Removed. (pass_vsetvl::pre_vsetvl): Removed. (pass_vsetvl::get_vsetvl_at_end): Removed. (local_avl_compatible_p): Removed. (pass_vsetvl::local_eliminate_vsetvl_insn): Removed. (pre_vsetvl::pre_global_vsetvl_info): New. (get_first_vsetvl_before_rvv_insns): Removed. (pass_vsetvl::global_eliminate_vsetvl_insn): Removed. (pre_vsetvl::emit_vsetvl): New. (pass_vsetvl::ssa_post_optimization): Removed. (pre_vsetvl::cleaup): New. (pre_vsetvl::remove_avl_operand): New. (pass_vsetvl::df_post_optimization): Removed. (pre_vsetvl::remove_unused_dest_operand): New. (pass_vsetvl::init): Removed. (pass_vsetvl::done): Removed. (pass_vsetvl::compute_probabilities): Removed. (pass_vsetvl::lazy_vsetvl): Adjust. (pass_vsetvl::execute): Adjust. * config/riscv/riscv-vsetvl.def (DEF_INCOMPATIBLE_COND): Removed. (DEF_SEW_LMUL_RULE): New. (DEF_SEW_LMUL_FUSE_RULE): Removed. (DEF_POLICY_RULE): New. (DEF_UNAVAILABLE_COND): Removed (DEF_AVL_RULE): New demand type. (sew_lmul): New demand type. (ratio_only): New demand type. (sew_only): New demand type. (ge_sew): New demand type. (ratio_and_ge_sew): New demand type. (tail_mask_policy): New demand type. (tail_policy_only): New demand type. (mask_policy_only): New demand type. (ignore_policy): New demand type. (avl): New demand type. (non_zero_avl): New demand type. (ignore_avl): New demand type. * config/riscv/t-riscv: Removed riscv-vsetvl.h * config/riscv/riscv-vsetvl.h: Removed. 2023-10-20 Alexandre Oliva * tree-eh.cc (make_eh_edges): Return the new edge. * tree-eh.h (make_eh_edges): Likewise. 2023-10-19 Marek Polacek * doc/contrib.texi: Add entry for Patrick Palka. 2023-10-19 Andre Vieira * omp-simd-clone.cc (simd_clone_adjust_argument_types): Make function compatible with mask parameters in clone. * tree-vect-stmts.cc (vect_build_all_ones_mask): Allow vector boolean typed masks. (vectorizable_simd_clone_call): Enable the use of masked clones in fully masked loops. 2023-10-19 Andre Vieira PR tree-optimization/110485 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Disable partial vectors usage if a notinbranch simdclone has been selected. 2023-10-19 Andre Vieira * tree-vect-data-refs.cc (vect_get_smallest_scalar_type): Special case simd clone calls and only use types that are mapped to vectors. (simd_clone_call_p): New helper function. 2023-10-19 Andre Vieira * tree-parloops.cc (try_transform_to_exit_first_loop_alt): Accept poly NIT and ALT_BOUND. 2023-10-19 Andre Vieira * tree-parloops.cc (create_loop_fn): Copy specific target and optimization options to clone. 2023-10-19 Andre Vieira * omp-simd-clone.cc (simd_clone_subparts): Remove. (simd_clone_init_simd_arrays): Replace simd_clone_supbarts with TYPE_VECTOR_SUBPARTS. (ipa_simd_modify_function_body): Likewise. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Likewise. (simd_clone_subparts): Remove. 2023-10-19 Jason Merrill * ABOUT-GCC-NLS: Add usage guidance. 2023-10-19 Jason Merrill * diagnostic-core.h (permerror): Rename new overloads... (permerror_opt): To this. * diagnostic.cc: Likewise. 2023-10-19 Tamar Christina PR tree-optimization/111860 * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): Remove PHI nodes that dominate loop. 2023-10-19 Richard Biener PR tree-optimization/111131 * tree-vect-loop.cc (update_epilogue_loop_vinfo): Make sure to update all gather/scatter stmt DRs, not only those that eventually got VMAT_GATHER_SCATTER set. * tree-vect-slp.cc (_slp_oprnd_info::first_gs_info): Add. (vect_get_and_check_slp_defs): Handle gathers/scatters, adding the offset as SLP operand and comparing base and scale. (vect_build_slp_tree_1): Handle gathers. (vect_build_slp_tree_2): Likewise. 2023-10-19 Richard Biener * tree-vect-stmts.cc (vect_build_gather_load_calls): Rename to ... (vect_build_one_gather_load_call): ... this. Refactor, inline widening/narrowing support ... (vectorizable_load): ... here, do gather vectorization with builtin decls along other gather vectorization. 2023-10-19 Alex Coplan * config/aarch64/aarch64.md (load_pair_dw_tftf): Rename to ... (load_pair_dw_): ... this. (store_pair_dw_tftf): Rename to ... (store_pair_dw_): ... this. * config/aarch64/iterators.md (TX2): New. 2023-10-19 Alex Coplan * rtl-ssa/changes.cc (function_info::finalize_new_accesses): Add new parameter to give final insn position, infer use of mem if it isn't specified explicitly. (function_info::change_insns): Pass down final insn position to finalize_new_accesses. * rtl-ssa/functions.h: Add parameter to finalize_new_accesses. 2023-10-19 Alex Coplan * rtl-ssa/accesses.cc (function_info::reparent_use): New. * rtl-ssa/functions.h (function_info): Declare new member function reparent_use. 2023-10-19 Alex Coplan * rtl-ssa/access-utils.h (drop_memory_access): New. 2023-10-19 Alex Coplan * rtl-ssa/insns.cc (function_info::add_insn_after): Ensure we update the prev pointer on the following nondebug insn in the case that !insn->is_debug_insn () && next->is_debug_insn (). 2023-10-19 Haochen Jiang * config/i386/i386.h: Correct the ISA enabled for Arrow Lake. Also make Clearwater Forest depends on Sierra Forest. * config/i386/i386-options.cc: Revise the order of the macro definition to avoid confusion. * doc/extend.texi: Revise documentation. * doc/invoke.texi: Correct documentation. 2023-10-19 Andrew Stubbs * config.gcc (amdgcn): Switch default to --with-arch=gfx900. Implement support for --with-multilib-list. * config/gcn/t-gcn-hsa: Likewise. * doc/install.texi: Likewise. * doc/invoke.texi: Mark Fiji deprecated. 2023-10-19 Jiahao Xu * config/loongarch/loongarch.cc (loongarch_vector_costs): Inherit from vector_costs. Add a constructor. (loongarch_vector_costs::add_stmt_cost): Use adjust_cost_for_freq to adjust the cost for inner loops. (loongarch_vector_costs::count_operations): New function. (loongarch_vector_costs::determine_suggested_unroll_factor): Ditto. (loongarch_vector_costs::finish_cost): Ditto. (loongarch_builtin_vectorization_cost): Adjust. * config/loongarch/loongarch.opt (loongarch-vect-unroll-limit): New parameter. (loongarcg-vect-issue-info): Ditto. (mmemvec-cost): Delete. * config/loongarch/genopts/loongarch.opt.in (loongarch-vect-unroll-limit): Ditto. (loongarcg-vect-issue-info): Ditto. (mmemvec-cost): Delete. * doc/invoke.texi (loongarcg-vect-unroll-limit): Document new option. 2023-10-19 Jiahao Xu * config/loongarch/lasx.md (vec_widen_mult_even_v8si): New patterns. (vec_widen_add_hi_): Ditto. (vec_widen_add_lo_): Ditto. (vec_widen_sub_hi_): Ditto. (vec_widen_sub_lo_): Ditto. (vec_widen_mult_hi_): Ditto. (vec_widen_mult_lo_): Ditto. * config/loongarch/loongarch.md (u_bool): New iterator. * config/loongarch/loongarch-protos.h (loongarch_expand_vec_widen_hilo): New prototype. * config/loongarch/loongarch.cc (loongarch_expand_vec_interleave): New function. (loongarch_expand_vec_widen_hilo): New function. 2023-10-19 Jiahao Xu * config/loongarch/lasx.md (avg3_ceil): New patterns. (uavg3_ceil): Ditto. (avg3_floor): Ditto. (uavg3_floor): Ditto. (usadv32qi): Ditto. (ssadv32qi): Ditto. * config/loongarch/lsx.md (avg3_ceil): New patterns. (uavg3_ceil): Ditto. (avg3_floor): Ditto. (uavg3_floor): Ditto. (usadv16qi): Ditto. (ssadv16qi): Ditto. 2023-10-18 Andrew Pinski PR middle-end/111863 * expr.cc (do_store_flag): Don't over write arg0 when stripping off `& POW2`. 2023-10-18 Prathamesh Kulkarni PR tree-optimization/111648 * fold-const.cc (valid_mask_for_fold_vec_perm_cst_p): If a1 chooses base element from arg, ensure that it's a natural stepped sequence. (build_vec_cst_rand): New param natural_stepped and use it to construct a naturally stepped sequence. (test_nunits_min_2): Add new unit tests Case 6 and Case 7. 2023-10-18 Dimitar Dimitrov * config/pru/pru.cc (pru_insn_cost): New function. (TARGET_INSN_COST): Define for PRU. 2023-10-18 Andrew Carlotti * config/aarch64/aarch64.cc (aarch64_test_fractional_cost): Test <= instead of testing < twice. 2023-10-18 Jakub Jelinek PR bootstrap/111852 * cse.cc (cse_insn): Add workaround for GCC 4.8-4.9, instead of using rtx_def type for memory_extend_buf, use unsigned char arrayy with size of rtx_def and its alignment. 2023-10-18 Jason Merrill * doc/invoke.texi: Move -fpermissive to Warning Options. * diagnostic.cc (update_effective_level_from_pragmas): Remove redundant system header check. (diagnostic_report_diagnostic): Move down syshdr/-w check. (diagnostic_impl): Handle DK_PERMERROR with an option number. (permerror): Add new overloads. * diagnostic-core.h (permerror): Declare them. 2023-10-18 Tobias Burnus * gimplify.cc (gimplify_bind_expr): Remove "omp allocate" attribute to avoid that auxillary statement list reaches LTO. 2023-10-18 Jakub Jelinek PR tree-optimization/111845 * tree-ssa-math-opts.cc (match_uaddc_usubc): Remember temporary statements for the 4 operand addition or subtraction of 3 operands from 1 operand cases and remove them when successful. Look for nested additions even from rhs[2], not just rhs[1]. 2023-10-18 Tobias Burnus PR target/111093 * config/nvptx/nvptx.cc (nvptx_option_override): Issue fatal error instead of an assert ICE when no -march= has been specified. 2023-10-18 Iain Sandoe * config.in: Regenerate. * config/darwin.cc (darwin_file_start): Add assembler directives for the target OS version, where these are supported by the assembler. (darwin_override_options): Check for building >= macOS 10.14. * configure: Regenerate. * configure.ac: Check for assembler support of .build_version directives. 2023-10-18 Tamar Christina PR tree-optimization/109154 * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. (typedef struct ifcvt_arg_entry): New. (cmp_arg_entry): New. (gen_phi_arg_condition, gen_phi_nest_statement, predicate_scalar_phi): Use them. 2023-10-18 Tamar Christina PR tree-optimization/109154 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rewrite to new syntax. (*aarch64_simd_mov PR tree-optimization/109154 * tree-if-conv.cc (if_convertible_stmt_p): Allow any const IFN. 2023-10-18 Tamar Christina PR tree-optimization/109154 * match.pd: Add new cond_op rule. 2023-10-18 Xi Ruoyao * config/loongarch/loongarch.md (movfcc): Use fcmp.caf.s for zeroing a fcc. 2023-10-18 Richard Biener * tree-vect-stmts.cc (vectorizable_simd_clone_call): Relax check to again allow passing integer mode masks as traditional vectors. 2023-10-18 Tamar Christina * tree-loop-distribution.cc (copy_loop_before): Request no LCSSA. * tree-vect-loop-manip.cc (adjust_phi_and_debug_stmts): Add additional asserts. (slpeel_tree_duplicate_loop_to_edge_cfg): Keep LCSSA during peeling. (find_guard_arg): Look value up through explicit edge and original defs. (vect_do_peeling): Use it. (slpeel_update_phi_nodes_for_guard2): Take explicit exit edge. (slpeel_update_phi_nodes_for_lcssa, slpeel_update_phi_nodes_for_loops): Remove. * tree-vect-loop.cc (vect_create_epilog_for_reduction): Initialize phi. * tree-vectorizer.h (slpeel_tree_duplicate_loop_to_edge_cfg): Add optional param to turn off LCSSA mode. 2023-10-18 Tamar Christina * tree-if-conv.cc (tree_if_conversion): Record exits in aux. * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg): Use it. * tree-vect-loop.cc (vect_get_loop_niters): Determine main exit. (vec_init_loop_exit_info): Extend analysis when multiple exits. (vect_analyze_loop_form): Record conds and determine main cond. (vect_create_loop_vinfo): Extend bookkeeping of conds. (vect_analyze_loop): Release conds. * tree-vectorizer.h (LOOP_VINFO_LOOP_CONDS, LOOP_VINFO_LOOP_IV_COND): New. (struct vect_loop_form_info): Add conds, alt_loop_conds; (struct loop_vec_info): Add conds, loop_iv_cond. 2023-10-18 Tamar Christina * tree-loop-distribution.cc (copy_loop_before): Pass exit explicitly. (loop_distribution::distribute_loop): Bail out of not single exit. * tree-scalar-evolution.cc (get_loop_exit_condition): New. * tree-scalar-evolution.h (get_loop_exit_condition): New. * tree-vect-data-refs.cc (vect_enhance_data_refs_alignment): Pass exit explicitly. * tree-vect-loop-manip.cc (vect_set_loop_condition_partial_vectors, vect_set_loop_condition_partial_vectors_avx512, vect_set_loop_condition_normal, vect_set_loop_condition): Explicitly take exit. (slpeel_tree_duplicate_loop_to_edge_cfg): Explicitly take exit and return new peeled corresponding peeled exit. (slpeel_can_duplicate_loop_p): Explicitly take exit. (find_loop_location): Handle not knowing an explicit exit. (vect_update_ivs_after_vectorizer, vect_gen_vector_loop_niters_mult_vf, find_guard_arg, slpeel_update_phi_nodes_for_loops, slpeel_update_phi_nodes_for_guard2): Use new exits. (vect_do_peeling): Update bookkeeping to keep track of exits. * tree-vect-loop.cc (vect_get_loop_niters): Explicitly take exit to analyze. (vec_init_loop_exit_info): New. (_loop_vec_info::_loop_vec_info): Initialize vec_loop_iv, vec_epilogue_loop_iv, scalar_loop_iv. (vect_analyze_loop_form): Initialize exits. (vect_create_loop_vinfo): Set main exit. (vect_create_epilog_for_reduction, vectorizable_live_operation, vect_transform_loop): Use it. (scale_profile_for_vect_loop): Explicitly take exit to scale. * tree-vectorizer.cc (set_uid_loop_bbs): Initialize loop exit. * tree-vectorizer.h (LOOP_VINFO_IV_EXIT, LOOP_VINFO_EPILOGUE_IV_EXIT, LOOP_VINFO_SCALAR_IV_EXIT): New. (struct loop_vec_info): Add vec_loop_iv, vec_epilogue_loop_iv, scalar_loop_iv. (vect_set_loop_condition, slpeel_can_duplicate_loop_p, slpeel_tree_duplicate_loop_to_edge_cfg): Take explicit exits. (vec_init_loop_exit_info): New. (struct vect_loop_form_info): Add loop_exit. 2023-10-18 Tamar Christina * tree-vect-stmts.cc (vectorizable_comparison): Refactor, splitting body to ... (vectorizable_comparison_1): ...This. 2023-10-18 Juzhe-Zhong * config/riscv/riscv-v.cc (shuffle_consecutive_patterns): New function. (expand_vec_perm_const_1): Add consecutive pattern recognition. 2023-10-18 Haochen Jiang * common/config/i386/cpuinfo.h (get_intel_cpu): Add Panther Lake. * common/config/i386/i386-common.cc (processor_name): Ditto. (processor_alias_table): Ditto. * common/config/i386/i386-cpuinfo.h (enum processor_types): Add INTEL_PANTHERLAKE. * config.gcc: Add -march=pantherlake. * config/i386/driver-i386.cc (host_detect_local_cpu): Refactor the if clause. Handle pantherlake. * config/i386/i386-c.cc (ix86_target_macros_internal): Handle pantherlake. * config/i386/i386-options.cc (processor_cost_table): Ditto. (m_PANTHERLAKE): New. (m_CORE_HYBRID): Add pantherlake. * config/i386/i386.h (enum processor_type): Ditto. * doc/extend.texi: Ditto. * doc/invoke.texi: Ditto. 2023-10-18 Haochen Jiang * config/i386/i386-options.cc (m_CORE_HYBRID): New. * config/i386/x86-tune.def: Replace hybrid client tune to m_CORE_HYBRID. 2023-10-18 Haochen Jiang * common/config/i386/cpuinfo.h (get_intel_cpu): Handle Clearwater Forest. * common/config/i386/i386-common.cc (processor_name): Add Clearwater Forest. (processor_alias_table): Ditto. * common/config/i386/i386-cpuinfo.h (enum processor_types): Add INTEL_CLEARWATERFOREST. * config.gcc: Add -march=clearwaterforest. * config/i386/driver-i386.cc (host_detect_local_cpu): Handle clearwaterforest. * config/i386/i386-c.cc (ix86_target_macros_internal): Ditto. * config/i386/i386-options.cc (processor_cost_table): Ditto. (m_CLEARWATERFOREST): New. (m_CORE_ATOM): Add clearwaterforest. * config/i386/i386.h (enum processor_type): Ditto. * doc/extend.texi: Ditto. * doc/invoke.texi: Ditto. 2023-10-18 liuhongt * config/i386/mmx.md (fma4): New expander. (fms4): Ditto. (fnma4): Ditto. (fnms4): Ditto. (vec_fmaddsubv4hf4): Ditto. (vec_fmsubaddv4hf4): Ditto. 2023-10-18 Juzhe-Zhong PR target/111832 * config/riscv/riscv-vector-costs.cc (get_biggest_mode): New function. 2023-10-17 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_layout_frame): Don't make the position of the LR save slot dependent on stack clash protection unless shadow call stacks are enabled. 2023-10-17 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame): Add vectors that store the list saved GPRs, FPRs and predicate registers. * config/aarch64/aarch64.cc (aarch64_layout_frame): Initialize the lists of saved registers. Use them to choose push candidates. Invalidate pop candidates if we're not going to do a pop. (aarch64_next_callee_save): Delete. (aarch64_save_callee_saves): Take a list of registers, rather than a range. Make !skip_wb select only write-back candidates. (aarch64_expand_prologue): Update calls accordingly. (aarch64_restore_callee_saves): Take a list of registers, rather than a range. Always skip pop candidates. Also skip LR if shadow call stacks are enabled. (aarch64_expand_epilogue): Update calls accordingly. 2023-10-17 Richard Sandiford * cfgbuild.h (find_sub_basic_blocks): Declare. * cfgbuild.cc (update_profile_for_new_sub_basic_block): New function, split out from... (find_many_sub_basic_blocks): ...here. (find_sub_basic_blocks): New function. * function.cc (thread_prologue_and_epilogue_insns): Handle epilogues that contain jumps. 2023-10-17 Andrew Pinski PR tree-optimization/110817 * tree-ssanames.cc (ssa_name_has_boolean_range): Remove the check for boolean type as they don't have "[0,1]" range. 2023-10-17 Andrew Pinski PR tree-optimization/111432 * match.pd (`a & (x | CST)`): New pattern. 2023-10-17 Andre Vieira * tree-cfg.cc (move_sese_region_to_fn): Initialize profile_count for new basic block. 2023-10-17 Richard Biener PR tree-optimization/111846 * tree-vectorizer.h (_slp_tree::simd_clone_info): Add. (SLP_TREE_SIMD_CLONE_INFO): New. * tree-vect-slp.cc (_slp_tree::_slp_tree): Initialize SLP_TREE_SIMD_CLONE_INFO. (_slp_tree::~_slp_tree): Release it. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Use SLP_TREE_SIMD_CLONE_INFO or STMT_VINFO_SIMD_CLONE_INFO dependent on if we're doing SLP. 2023-10-17 Jakub Jelinek * wide-int-print.h (print_dec_buf_size): For length, divide number of bits by 3 and add 3 instead of division by 4 and adding 4. * wide-int-print.cc (print_decs): Remove superfluous ()s. Don't call print_hex, instead call print_decu on either negated value after printing - or on wi itself. (print_decu): Don't call print_hex, instead print even large numbers decimally. (pp_wide_int_large): Assume len from print_dec_buf_size is big enough even if it returns false. * pretty-print.h (pp_wide_int): Use print_dec_buf_size to check if pp_wide_int_large should be used. * tree-pretty-print.cc (dump_generic_node): Use print_hex_buf_size to compute needed buffer size. 2023-10-17 Richard Biener PR middle-end/111818 * tree-ssa.cc (maybe_optimize_var): When clearing DECL_NOT_GIMPLE_REG_P always rewrite into SSA. 2023-10-17 Richard Biener PR tree-optimization/111807 * tree-sra.cc (build_ref_for_model): Only call build_reconstructed_reference when the offsets are the same. 2023-10-17 Vineet Gupta PR target/111466 * expr.cc (expand_expr_real_2): Do not clear SUBREG_PROMOTED_VAR_P. 2023-10-17 Chenghui Pan * config/loongarch/loongarch.cc (loongarch_expand_vector_group_init): fix impl related to vec_initv32qiv16qi template to avoid ICE. 2023-10-17 Lulu Cheng Chenghua Xu * config/loongarch/loongarch.h (ASM_OUTPUT_ALIGN_WITH_NOP): Delete. 2023-10-17 Juzhe-Zhong * config/riscv/riscv-vector-costs.cc (max_number_of_live_regs): Fix big LMUL issue. (get_store_value): New function. 2023-10-16 Jeff Law * explow.cc (probe_stack_range): Handle case when expand_binop does not construct its result in the expected location. 2023-10-16 David Malcolm * diagnostic.cc (diagnostic_initialize): When LANG=C, update default for -fdiagnostics-text-art-charset from emoji to ascii. * doc/invoke.texi (fdiagnostics-text-art-charset): Document the above. 2023-10-16 David Malcolm * diagnostic.cc (diagnostic_initialize): Ensure context->extra_output_kind is initialized. 2023-10-16 Uros Bizjak * config/i386/i386.cc (ix86_can_inline_p): Handle CM_LARGE and CM_LARGE_PIC. (x86_elf_aligned_decl_common): Ditto. (x86_output_aligned_bss): Ditto. * config/i386/i386.opt: Update doc for -mlarge-data-threshold=. * doc/invoke.texi: Update doc for -mlarge-data-threshold=. 2023-10-16 Christoph Müllner * config/riscv/riscv-protos.h (emit_block_move): Remove redundant prototype. Improve comment. * config/riscv/riscv.cc (riscv_block_move_straight): Move from riscv.cc into riscv-string.cc. (riscv_adjust_block_mem, riscv_block_move_loop): Likewise. (riscv_expand_block_move): Likewise. * config/riscv/riscv-string.cc (riscv_block_move_straight): Add moved function. (riscv_adjust_block_mem, riscv_block_move_loop): Likewise. (riscv_expand_block_move): Likewise. 2023-10-16 Manolis Tsamis * Makefile.in: Add fold-mem-offsets.o. * passes.def: Schedule a new pass. * tree-pass.h (make_pass_fold_mem_offsets): Declare. * common.opt: New options. * doc/invoke.texi: Document new option. * fold-mem-offsets.cc: New file. 2023-10-16 Andrew Pinski PR tree-optimization/101541 * match.pd (A CMP 0 ? A : -A): Improve using bitwise_equal_p. 2023-10-16 Andrew Pinski PR tree-optimization/31531 * match.pd (~X op ~Y): Allow for an optional nop convert. (~X op C): Likewise. 2023-10-16 Roger Sayle * config/arc/arc.md (*ashlsi3_1): New pre-reload splitter to use bset dst,0,src to implement 1< * config/s390/vector.md (popcountv8hi2_vx): Sign extend each unsigned vector element. 2023-10-16 Juzhe-Zhong * config/riscv/riscv-vector-costs.cc (costs::preferred_new_lmul_p): Use VLS modes. 2023-10-16 Jiufu Guo * fold-const.cc (expr_not_equal_to): Replace get_global_range_query by get_range_query. * gimple-fold.cc (size_must_be_zero_p): Likewise. * gimple-range-fold.cc (fur_source::fur_source): Likewise. * gimple-ssa-warn-access.cc (check_nul_terminated_array): Likewise. * tree-dfa.cc (get_ref_base_and_extent): Likewise. 2023-10-16 liuhongt * config/i386/mmx.md (V2FI_32): New mode iterator (movd_v2hf_to_sse): Rename to .. (movd__to_sse): .. this. (movd_v2hf_to_sse_reg): Rename to .. (movd__to_sse_reg): .. this. (fix_trunc2): New expander. (fix_truncv2hfv2si2): Ditto. (float2): Ditto. (floatv2siv2hf2): Ditto. (extendv2hfv2sf2): Ditto. (truncv2sfv2hf2): Ditto. * config/i386/sse.md (*vec_concatv8hf_movss): Rename to .. (*vec_concat_movss): .. this. 2023-10-16 liuhongt * config/i386/i386-expand.cc (ix86_sse_copysign_to_positive): Handle HFmode. (ix86_expand_round_sse4): Ditto. * config/i386/i386.md (roundhf2): New expander. (lroundhf2): Ditto. (lrinthf2): Ditto. (lhf2): Ditto. * config/i386/mmx.md (sqrt2): Ditto. (btrunc2): Ditto. (nearbyint2): Ditto. (rint2): Ditto. (lrint2): Ditto. (floor2): Ditto. (lfloor2): Ditto. (ceil2): Ditto. (lceil2): Ditto. (round2): Ditto. (lround2): Ditto. * config/i386/sse.md (lrint2): Ditto. (lfloor2): Ditto. (lceil2): Ditto. (lround2): Ditto. (sse4_1_round): Extend to V8HF. (round2): Extend to V8HF/V16HF/V32HF. 2023-10-15 Tobias Burnus * doc/invoke.texi (-fopenacc, -fopenmp, -fopenmp-simd): Use @samp not @code; document more completely the supported Fortran sentinels. 2023-10-15 Roger Sayle * optabs.cc (expand_subword_shift): Call simplify_expand_binop instead of expand_binop. Optimize cases (i.e. avoid generating RTL) when CARRIES or INTO_INPUT is zero. Use one_cmpl_optab (i.e. NOT) instead of xor_optab with ~0 to calculate ~OP1. 2023-10-15 Jakub Jelinek PR tree-optimization/111800 * wide-int-print.h (print_dec_buf_size, print_decs_buf_size, print_decu_buf_size, print_hex_buf_size): New inline functions. * wide-int.cc (assert_deceq): Use print_dec_buf_size. (assert_hexeq): Use print_hex_buf_size. * wide-int-print.cc (print_decs): Use print_decs_buf_size. (print_decu): Use print_decu_buf_size. (print_hex): Use print_hex_buf_size. (pp_wide_int_large): Use print_dec_buf_size. * value-range.cc (irange_bitmask::dump): Use print_hex_buf_size. * value-range-pretty-print.cc (vrange_printer::print_irange_bitmasks): Likewise. * tree-ssa-loop-niter.cc (do_warn_aggressive_loop_optimizations): Use print_dec_buf_size. Use TYPE_SIGN macro in print_dec call argument. 2023-10-15 Stefan Schulze Frielinghaus * combine.cc (simplify_compare_const): Fix handling of unsigned constants. 2023-10-15 Juzhe-Zhong * config/riscv/vector-iterators.md: Fix vsingle incorrect attribute for RVVM2x2QI. 2023-10-14 Tobias Burnus * gimplify.cc (gimplify_bind_expr): Handle Fortran's 'omp allocate' for stack variables. 2023-10-14 Jakub Jelinek PR c/102989 * tree-core.h (struct tree_base): Remove int_length.offset member, change type of int_length.unextended and int_length.extended from unsigned char to unsigned short. * tree.h (TREE_INT_CST_OFFSET_NUNITS): Remove. (wi::extended_tree ::get_len): Don't use TREE_INT_CST_OFFSET_NUNITS, instead compute it at runtime from TREE_INT_CST_EXT_NUNITS and TREE_INT_CST_NUNITS. * tree.cc (wide_int_to_tree_1): Don't assert TREE_INT_CST_OFFSET_NUNITS value. (make_int_cst): Don't initialize TREE_INT_CST_OFFSET_NUNITS. * wide-int.h (WIDE_INT_MAX_ELTS): Change from 255 to 1024. (WIDEST_INT_MAX_ELTS): Change from 510 to 2048, adjust comment. (trailing_wide_int_storage): Change m_len type from unsigned char * to unsigned short *. (trailing_wide_int_storage::trailing_wide_int_storage): Change second argument from unsigned char * to unsigned short *. (trailing_wide_ints): Change m_max_len type from unsigned char to unsigned short. Change m_len element type from struct{unsigned char len;} to unsigned short. (trailing_wide_ints ::operator []): Remove .len from m_len accesses. * value-range-storage.h (irange_storage::lengths_address): Change return type from const unsigned char * to const unsigned short *. (irange_storage::write_lengths_address): Change return type from unsigned char * to unsigned short *. * value-range-storage.cc (irange_storage::write_lengths_address): Likewise. (irange_storage::lengths_address): Change return type from const unsigned char * to const unsigned short *. (write_wide_int): Change len argument type from unsigned char *& to unsigned short *&. (irange_storage::set_irange): Change len variable type from unsigned char * to unsigned short *. (read_wide_int): Change len argument type from unsigned char to unsigned short. Use trailing_wide_int_storage instead of trailing_wide_int_storage and trailing_wide_int instead of trailing_wide_int. (irange_storage::get_irange): Change len variable type from unsigned char * to unsigned short *. (irange_storage::size): Multiply n by sizeof (unsigned short) in len_size variable initialization. (irange_storage::dump): Change len variable type from unsigned char * to unsigned short *. 2023-10-14 Juzhe-Zhong * config/riscv/vector-iterators.md: Remove redundant iterators. 2023-10-13 Andrew MacLeod PR tree-optimization/111622 * value-relation.cc (equiv_oracle::add_partial_equiv): Do not register a partial equivalence if an operand has no uses. 2023-10-13 Richard Biener PR tree-optimization/111795 * tree-vect-stmts.cc (vectorizable_simd_clone_call): Handle integer mode mask arguments. 2023-10-13 Richard Biener * tree-vect-slp.cc (mask_call_maps): New. (vect_get_operand_map): Handle IFN_MASK_CALL. (vect_build_slp_tree_1): Likewise. * tree-vect-stmts.cc (vectorizable_simd_clone_call): Handle SLP. 2023-10-13 Richard Biener PR tree-optimization/111779 * tree-sra.cc (sra_handled_bf_read_p): New function. (build_access_from_expr_1): Handle some BIT_FIELD_REFs. (sra_modify_expr): Likewise. (make_fancy_name_1): Skip over BIT_FIELD_REF. 2023-10-13 Richard Biener PR tree-optimization/111773 * tree-ssa-dce.cc (mark_stmt_if_obviously_necessary): Do not elide noreturn calls that are reflected to the IL. 2023-10-13 Kito Cheng * config/riscv/riscv.cc (riscv_legitimize_poly_move): Bump max_power to 64. * config/riscv/riscv.h (MAX_POLY_VARIANT): New. 2023-10-13 Pan Li * config/riscv/autovec.md (lfloor2): New pattern for lfloor/lfloorf. * config/riscv/riscv-protos.h (enum insn_type): New enum value. (expand_vec_lfloor): New func decl for expanding lfloor. * config/riscv/riscv-v.cc (expand_vec_lfloor): New func impl for expanding lfloor. 2023-10-13 Pan Li * config/riscv/autovec.md (lceil2): New pattern] for lceil/lceilf. * config/riscv/riscv-protos.h (enum insn_type): New enum value. (expand_vec_lceil): New func decl for expanding lceil. * config/riscv/riscv-v.cc (expand_vec_lceil): New func impl for expanding lceil. 2023-10-12 Michael Meissner PR target/111778 * config/rs6000/rs6000.cc (can_be_built_by_li_lis_and_rldicl): Protect code from shifts that are undefined. (can_be_built_by_li_lis_and_rldicr): Likewise. (can_be_built_by_li_and_rldic): Protect code from shifts that undefined. Also replace uses of 1ULL with HOST_WIDE_INT_1U. 2023-10-12 Alex Coplan * reg-notes.def (NOALIAS): Correct comment. 2023-10-12 Jakub Jelinek PR bootstrap/111787 * tree.h (wi::int_traits ::needs_write_val_arg): New static data member. (int_traits >::needs_write_val_arg): Likewise. (wi::ints_for): Provide separate partial specializations for generic_wide_int > and INL_CONST_PRECISION or that and CONST_PRECISION, rather than using int_traits >::precision_type as the second template argument. * rtl.h (wi::int_traits ::needs_write_val_arg): New static data member. * double-int.h (wi::int_traits ::needs_write_val_arg): Likewise. 2023-10-12 Mary Bennett PR middle-end/111777 * doc/extend.texi: Change subsubsection to subsection for CORE-V built-ins. 2023-10-12 Tamar Christina * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Add undef. 2023-10-12 Jakub Jelinek * wide-int.h (widest_int_storage ::write_val): If l is small and there is space in u.val array, store a canary value at the end when checking. (widest_int_storage ::set_len): Check the canary hasn't been overwritten. 2023-10-12 Jakub Jelinek PR c/102989 * wide-int.h: Adjust file comment. (WIDE_INT_MAX_INL_ELTS): Define to former value of WIDE_INT_MAX_ELTS. (WIDE_INT_MAX_INL_PRECISION): Define. (WIDE_INT_MAX_ELTS): Change to 255. Assert that WIDE_INT_MAX_INL_ELTS is smaller than WIDE_INT_MAX_ELTS. (RWIDE_INT_MAX_ELTS, RWIDE_INT_MAX_PRECISION, WIDEST_INT_MAX_ELTS, WIDEST_INT_MAX_PRECISION): Define. (WI_BINARY_RESULT_VAR, WI_UNARY_RESULT_VAR): Change write_val callers to pass 0 as a new argument. (class widest_int_storage): Likewise. (widest_int, widest2_int): Change typedefs to use widest_int_storage rather than fixed_wide_int_storage. (enum wi::precision_type): Add INL_CONST_PRECISION enumerator. (struct binary_traits): Add partial specializations for INL_CONST_PRECISION. (generic_wide_int): Add needs_write_val_arg static data member. (int_traits): Likewise. (wide_int_storage): Replace val non-static data member with a union u of it and HOST_WIDE_INT *valp. Declare copy constructor, copy assignment operator and destructor. Add unsigned int argument to write_val. (wide_int_storage::wide_int_storage): Initialize precision to 0 in the default ctor. Remove unnecessary {}s around STATIC_ASSERTs. Assert in non-default ctor T's precision_type is not INL_CONST_PRECISION and allocate u.valp for large precision. Add copy constructor. (wide_int_storage::~wide_int_storage): New. (wide_int_storage::operator=): Add copy assignment operator. In assignment operator remove unnecessary {}s around STATIC_ASSERTs, assert ctor T's precision_type is not INL_CONST_PRECISION and if precision changes, deallocate and/or allocate u.valp. (wide_int_storage::get_val): Return u.valp rather than u.val for large precision. (wide_int_storage::write_val): Likewise. Add an unused unsigned int argument. (wide_int_storage::set_len): Use write_val instead of writing val directly. (wide_int_storage::from, wide_int_storage::from_array): Adjust write_val callers. (wide_int_storage::create): Allocate u.valp for large precisions. (wi::int_traits ::get_binary_precision): New. (fixed_wide_int_storage::fixed_wide_int_storage): Make default ctor defaulted. (fixed_wide_int_storage::write_val): Add unused unsigned int argument. (fixed_wide_int_storage::from, fixed_wide_int_storage::from_array): Adjust write_val callers. (wi::int_traits ::get_binary_precision): New. (WIDEST_INT): Define. (widest_int_storage): New template class. (wi::int_traits ): New. (trailing_wide_int_storage::write_val): Add unused unsigned int argument. (wi::get_binary_precision): Use wi::int_traits ::get_binary_precision rather than get_precision on get_binary_result. (wi::copy): Adjust write_val callers. Don't call set_len if needs_write_val_arg. (wi::bit_not): If result.needs_write_val_arg, call write_val again with upper bound estimate of len. (wi::sext, wi::zext, wi::set_bit): Likewise. (wi::bit_and, wi::bit_and_not, wi::bit_or, wi::bit_or_not, wi::bit_xor, wi::add, wi::sub, wi::mul, wi::mul_high, wi::div_trunc, wi::div_floor, wi::div_ceil, wi::div_round, wi::divmod_trunc, wi::mod_trunc, wi::mod_floor, wi::mod_ceil, wi::mod_round, wi::lshift, wi::lrshift, wi::arshift): Likewise. (wi::bswap, wi::bitreverse): Assert result.needs_write_val_arg is false. (gt_ggc_mx, gt_pch_nx): Remove generic template for all generic_wide_int, instead add functions and templates for each storage of generic_wide_int. Make functions for generic_wide_int and templates for generic_wide_int > deleted. (wi::mask, wi::shifted_mask): Adjust write_val calls. * wide-int.cc (zeros): Decrease array size to 1. (BLOCKS_NEEDED): Use CEIL. (canonize): Use HOST_WIDE_INT_M1. (wi::from_buffer): Pass 0 to write_val. (wi::to_mpz): Use CEIL. (wi::from_mpz): Likewise. Pass 0 to write_val. Use WIDE_INT_MAX_INL_ELTS instead of WIDE_INT_MAX_ELTS. (wi::mul_internal): Use WIDE_INT_MAX_INL_PRECISION instead of MAX_BITSIZE_MODE_ANY_INT in automatic array sizes, for prec above WIDE_INT_MAX_INL_PRECISION estimate precision from lengths of operands. Use XALLOCAVEC allocated buffers for prec above WIDE_INT_MAX_INL_PRECISION. (wi::divmod_internal): Likewise. (wi::lshift_large): For len > WIDE_INT_MAX_INL_ELTS estimate it from xlen and skip. (rshift_large_common): Remove xprecision argument, add len argument with len computed in caller. Don't return anything. (wi::lrshift_large, wi::arshift_large): Compute len here and pass it to rshift_large_common, for lengths above WIDE_INT_MAX_INL_ELTS using estimations from xlen if possible. (assert_deceq, assert_hexeq): For lengths above WIDE_INT_MAX_INL_ELTS use XALLOCAVEC allocated buffer. (test_printing): Use WIDE_INT_MAX_INL_PRECISION instead of WIDE_INT_MAX_PRECISION. * wide-int-print.h (WIDE_INT_PRINT_BUFFER_SIZE): Use WIDE_INT_MAX_INL_PRECISION instead of WIDE_INT_MAX_PRECISION. * wide-int-print.cc (print_decs, print_decu, print_hex): For lengths above WIDE_INT_MAX_INL_ELTS use XALLOCAVEC allocated buffer. * tree.h (wi::int_traits>): Change precision_type to INL_CONST_PRECISION for N == ADDR_MAX_PRECISION. (widest_extended_tree): Use WIDEST_INT_MAX_PRECISION instead of WIDE_INT_MAX_PRECISION. (wi::ints_for): Use int_traits >::precision_type instead of hard coded CONST_PRECISION. (widest2_int_cst): Use WIDEST_INT_MAX_PRECISION instead of WIDE_INT_MAX_PRECISION. (wi::extended_tree ::get_len): Use WIDEST_INT_MAX_PRECISION rather than WIDE_INT_MAX_PRECISION. (wi::ints_for::zero): Use wi::int_traits >::precision_type instead of wi::CONST_PRECISION. * tree.cc (build_replicated_int_cst): Formatting fix. Use WIDE_INT_MAX_INL_ELTS rather than WIDE_INT_MAX_ELTS. * print-tree.cc (print_node): Don't print TREE_UNAVAILABLE on INTEGER_CSTs, TREE_VECs or SSA_NAMEs. * double-int.h (wi::int_traits ::precision_type): Change to INL_CONST_PRECISION from CONST_PRECISION. * poly-int.h (struct poly_coeff_traits): Add partial specialization for wi::INL_CONST_PRECISION. * cfgloop.h (bound_wide_int): New typedef. (struct nb_iter_bound): Change bound type from widest_int to bound_wide_int. (struct loop): Change nb_iterations_upper_bound, nb_iterations_likely_upper_bound and nb_iterations_estimate type from widest_int to bound_wide_int. * cfgloop.cc (record_niter_bound): Return early if wi::min_precision of i_bound is too large for bound_wide_int. Adjustments for the widest_int to bound_wide_int type change in non-static data members. (get_estimated_loop_iterations, get_max_loop_iterations, get_likely_max_loop_iterations): Adjustments for the widest_int to bound_wide_int type change in non-static data members. * tree-vect-loop.cc (vect_transform_loop): Likewise. * tree-ssa-loop-niter.cc (do_warn_aggressive_loop_optimizations): Use XALLOCAVEC allocated buffer for i_bound len above WIDE_INT_MAX_INL_ELTS. (record_estimate): Return early if wi::min_precision of i_bound is too large for bound_wide_int. Adjustments for the widest_int to bound_wide_int type change in non-static data members. (wide_int_cmp): Use bound_wide_int instead of widest_int. (bound_index): Use bound_wide_int instead of widest_int. (discover_iteration_bound_by_body_walk): Likewise. Use widest_int::from to convert it to widest_int when passed to record_niter_bound. (maybe_lower_iteration_bound): Use widest_int::from to convert it to widest_int when passed to record_niter_bound. (estimate_numbers_of_iteration): Don't record upper bound if loop->nb_iterations has too large precision for bound_wide_int. (n_of_executions_at_most): Use widest_int::from. * tree-ssa-loop-ivcanon.cc (remove_redundant_iv_tests): Adjust for the widest_int to bound_wide_int changes. * match.pd (fold_sign_changed_comparison simplification): Use wide_int::from on wi::to_wide instead of wi::to_widest. * value-range.h (irange::maybe_resize): Avoid using memcpy on non-trivially copyable elements. * value-range.cc (irange_bitmask::dump): Use XALLOCAVEC allocated buffer for mask or value len above WIDE_INT_PRINT_BUFFER_SIZE. * fold-const.cc (fold_convert_const_int_from_int, fold_unary_loc): Use wide_int::from on wi::to_wide instead of wi::to_widest. * tree-ssa-ccp.cc (bit_value_binop): Zero extend r1max from width before calling wi::udiv_trunc. * lto-streamer-out.cc (output_cfg): Adjustments for the widest_int to bound_wide_int type change in non-static data members. * lto-streamer-in.cc (input_cfg): Likewise. (lto_input_tree_1): Use WIDE_INT_MAX_INL_ELTS rather than WIDE_INT_MAX_ELTS. For length above WIDE_INT_MAX_INL_ELTS use XALLOCAVEC allocated buffer. Formatting fix. * data-streamer-in.cc (streamer_read_wide_int, streamer_read_widest_int): Likewise. * tree-affine.cc (aff_combination_expand): Use placement new to construct name_expansion. (free_name_expansion): Destruct name_expansion. * gimple-ssa-strength-reduction.cc (struct slsr_cand_d): Change index type from widest_int to offset_int. (class incr_info_d): Change incr type from widest_int to offset_int. (alloc_cand_and_find_basis, backtrace_base_for_ref, restructure_reference, slsr_process_ref, create_mul_ssa_cand, create_mul_imm_cand, create_add_ssa_cand, create_add_imm_cand, slsr_process_add, cand_abs_increment, replace_mult_candidate, replace_unconditional_candidate, incr_vec_index, create_add_on_incoming_edge, create_phi_basis_1, replace_conditional_candidate, record_increment, record_phi_increments_1, phi_incr_cost_1, phi_incr_cost, lowest_cost_path, total_savings, ncd_with_phi, ncd_of_cand_and_phis, nearest_common_dominator_for_cands, insert_initializers, all_phi_incrs_profitable_1, replace_one_candidate, replace_profitable_candidates): Use offset_int rather than widest_int and wi::to_offset rather than wi::to_widest. * real.cc (real_to_integer): Use WIDE_INT_MAX_INL_ELTS rather than 2 * WIDE_INT_MAX_ELTS and for words above that use XALLOCAVEC allocated buffer. * tree-ssa-loop-ivopts.cc (niter_for_exit): Use placement new to construct tree_niter_desc and destruct it on failure. (free_tree_niter_desc): Destruct tree_niter_desc if value is non-NULL. * gengtype.cc (main): Remove widest_int handling. * graphite-isl-ast-to-gimple.cc (widest_int_from_isl_expr_int): Use WIDEST_INT_MAX_ELTS instead of WIDE_INT_MAX_ELTS. * gimple-ssa-warn-alloca.cc (pass_walloca::execute): Use WIDE_INT_MAX_INL_PRECISION instead of WIDE_INT_MAX_PRECISION and assert get_len () fits into it. * value-range-pretty-print.cc (vrange_printer::print_irange_bitmasks): For mask or value lengths above WIDE_INT_MAX_INL_ELTS use XALLOCAVEC allocated buffer. * gimple-ssa-sprintf.cc (adjust_range_for_overflow): Use wide_int::from on wi::to_wide instead of wi::to_widest. * omp-general.cc (score_wide_int): New typedef. (omp_context_compute_score): Use score_wide_int instead of widest_int and adjust for those changes. (struct omp_declare_variant_entry): Change score and score_in_declare_simd_clone non-static data member type from widest_int to score_wide_int. (omp_resolve_late_declare_variant, omp_resolve_declare_variant): Use score_wide_int instead of widest_int and adjust for those changes. (omp_lto_output_declare_variant_alt): Likewise. (omp_lto_input_declare_variant_alt): Likewise. * godump.cc (go_output_typedef): Assert get_len () is smaller than WIDE_INT_MAX_INL_ELTS. 2023-10-12 Pan Li * config/riscv/autovec.md (lround2): New pattern for lround/lroundf. * config/riscv/riscv-protos.h (enum insn_type): New enum value. (expand_vec_lround): New func decl for expanding lround. * config/riscv/riscv-v.cc (expand_vec_lround): New func impl for expanding lround. 2023-10-12 Jakub Jelinek * dwarf2out.h (wide_int_ptr): Remove. (dw_wide_int_ptr): New typedef. (struct dw_val_node): Change type of val_wide from wide_int_ptr to dw_wide_int_ptr. (struct dw_wide_int): New type. (dw_wide_int::elt): New method. (dw_wide_int::operator ==): Likewise. * dwarf2out.cc (get_full_len): Change argument type to const dw_wide_int & from const wide_int &. Use CEIL. Call get_precision method instead of calling wi::get_precision. (alloc_dw_wide_int): New function. (add_AT_wide): Change w argument type to const wide_int_ref & from const wide_int &. Use alloc_dw_wide_int. (mem_loc_descriptor, loc_descriptor): Use alloc_dw_wide_int. (insert_wide_int): Change val argument type to const wide_int_ref & from const wide_int &. (add_const_value_attribute): Pass rtx_mode_t temporary directly to add_AT_wide instead of using a temporary variable. 2023-10-12 Richard Biener PR tree-optimization/111764 * tree-vect-loop.cc (check_reduction_path): Remove the attempt to allow x + x via special-casing of assigns. 2023-10-12 Hu, Lin1 * common/config/i386/cpuinfo.h (get_available_features): Detect USER_MSR. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_USER_MSR_SET): New. (OPTION_MASK_ISA2_USER_MSR_UNSET): Ditto. (ix86_handle_option): Handle -musermsr. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_USER_MSR. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for usermsr. * config.gcc: Add usermsrintrin.h * config/i386/cpuid.h (bit_USER_MSR): New. * config/i386/i386-builtin-types.def: Add DEF_FUNCTION_TYPE (VOID, UINT64, UINT64). * config/i386/i386-builtins.cc (ix86_init_mmx_sse_builtins): Add __builtin_urdmsr and __builtin_uwrmsr. * config/i386/i386-builtins.h (ix86_builtins): Add IX86_BUILTIN_URDMSR and IX86_BUILTIN_UWRMSR. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __USER_MSR__. * config/i386/i386-expand.cc (ix86_expand_builtin): Handle new builtins. * config/i386/i386-isa.def (USER_MSR): Add DEF_PTA(USER_MSR). * config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p): Handle usermsr. * config/i386/i386.md (urdmsr): New define_insn. (uwrmsr): Ditto. * config/i386/i386.opt: Add option -musermsr. * config/i386/x86gprintrin.h: Include usermsrintrin.h * doc/extend.texi: Document usermsr. * doc/invoke.texi: Document -musermsr. * doc/sourcebuild.texi: Document target usermsr. * config/i386/usermsrintrin.h: New file. 2023-10-12 Yang Yujie * config.gcc: Add loongarch-driver.h to tm_files. * config/loongarch/loongarch.h: Do not include loongarch-driver.h. * config/loongarch/t-loongarch: Append loongarch-multilib.h to $(GTM_H) instead of $(TM_H) for building generator programs. 2023-10-12 Kewen Lin PR target/111367 * config/rs6000/rs6000.md (stack_protect_setsi): Support prefixed instruction emission and incorporate to stack_protect_set. (stack_protect_setdi): Rename to ... (stack_protect_set): ... this, adjust constraint. (stack_protect_testsi): Support prefixed instruction emission and incorporate to stack_protect_test. (stack_protect_testdi): Rename to ... (stack_protect_test): ... this, adjust constraint. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Consider generated VEC_PERM_EXPR stmt for VMAT_CONTIGUOUS_REVERSE in costing as vec_perm. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vect_model_store_cost): Remove. (vectorizable_store): Adjust the costing for the remaining memory access types VMAT_CONTIGUOUS{, _DOWN, _REVERSE}. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vect_model_store_cost): Assert it will never get VMAT_CONTIGUOUS_PERMUTE and remove VMAT_CONTIGUOUS_PERMUTE related handlings. (vectorizable_store): Adjust the cost handling on VMAT_CONTIGUOUS_PERMUTE without calling vect_model_store_cost. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vect_model_store_cost): Assert it will never get VMAT_LOAD_STORE_LANES. (vectorizable_store): Adjust the cost handling on VMAT_LOAD_STORE_LANES without calling vect_model_store_cost. Factor out new lambda function update_prologue_cost. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vect_model_store_cost): Assert it won't get VMAT_ELEMENTWISE and VMAT_STRIDED_SLP any more, and remove their related handlings. (vectorizable_store): Adjust the cost handling on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP without calling vect_model_store_cost. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Adjust costing on vectorizable_scan_store without calling vect_model_store_cost any more. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vect_model_store_cost): Assert it won't get VMAT_GATHER_SCATTER any more, remove VMAT_GATHER_SCATTER related handlings and the related parameter gs_info. (vect_build_scatter_store_calls): Add the handlings on costing with one more argument cost_vec. (vectorizable_store): Adjust the cost handling on VMAT_GATHER_SCATTER without calling vect_model_store_cost any more. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Move and duplicate the call to vect_model_store_cost down to some different transform paths according to the handlings of different vect_memory_access_types or some special handling need. 2023-10-12 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Ensure the generated vector store for some case of VMAT_ELEMENTWISE is supported. 2023-10-12 Mo, Zewei Hu Lin1 Hongyu Wang * config/i386/i386.cc (gen_push2): New function to emit push2 and adjust cfa offset. (ix86_pro_and_epilogue_can_use_push2_pop2): New function to determine whether push2/pop2 can be used. (ix86_compute_frame_layout): Adjust preferred stack boundary and stack alignment needed for push2/pop2. (ix86_emit_save_regs): Emit push2 when available. (ix86_emit_restore_reg_using_pop2): New function to emit pop2 and adjust cfa info. (ix86_emit_restore_regs_using_pop2): New function to loop through the saved regs and call above. (ix86_expand_epilogue): Call ix86_emit_restore_regs_using_pop2 when push2pop2 available. * config/i386/i386.md (push2_di): New pattern for push2. (pop2_di): Likewise for pop2. 2023-10-12 Pan Li * config/riscv/autovec.md (lrint2): Rename from. (lrint2): Rename to. * config/riscv/vector-iterators.md: Rename and remove TARGET_64BIT. 2023-10-11 Kito Cheng * config/riscv/riscv-opts.h (TARGET_MIN_VLEN_OPTS): New. 2023-10-11 Jeff Law * config/riscv/riscv.md (jump): Adjust sequence to use a "jump" pseudo op instead of a "call" pseudo op. 2023-10-11 Kito Cheng * config/riscv/riscv-subset.h (riscv_subset_list::parse_single_std_ext): New. (riscv_subset_list::parse_single_multiletter_ext): Ditto. (riscv_subset_list::clone): Ditto. (riscv_subset_list::parse_single_ext): Ditto. (riscv_subset_list::set_loc): Ditto. (riscv_set_arch_by_subset_list): Ditto. * common/config/riscv/riscv-common.cc (riscv_subset_list::parse_single_std_ext): New. (riscv_subset_list::parse_single_multiletter_ext): Ditto. (riscv_subset_list::clone): Ditto. (riscv_subset_list::parse_single_ext): Ditto. (riscv_subset_list::set_loc): Ditto. (riscv_set_arch_by_subset_list): Ditto. 2023-10-11 Kito Cheng * config/riscv/riscv.cc (riscv_convert_vector_bits): Get setting from argument rather than get setting from global setting. (riscv_override_options_internal): New, splited from riscv_override_options, also take a gcc_options argument. (riscv_option_override): Splited most part to riscv_override_options_internal. 2023-10-11 Kito Cheng * doc/options.texi (Mask): Document TARGET__P and TARGET__OPTS_P. (InverseMask): Ditto. * opth-gen.awk (Mask): Generate TARGET__P and TARGET__OPTS_P macro. (InverseMask): Ditto. 2023-10-11 Andrew Pinski PR tree-optimization/111282 * match.pd (`a & ~(a ^ b)`, `a & (a == b)`, `a & ((~a) ^ b)`): New patterns. 2023-10-11 Mary Bennett * common/config/riscv/riscv-common.cc: Add the XCValu extension. * config/riscv/constraints.md: Add builtins for the XCValu extension. * config/riscv/predicates.md (immediate_register_operand): Likewise. * config/riscv/corev.def: Likewise. * config/riscv/corev.md: Likewise. * config/riscv/riscv-builtins.cc (AVAIL): Likewise. (RISCV_ATYPE_UHI): Likewise. * config/riscv/riscv-ftypes.def: Likewise. * config/riscv/riscv.opt: Likewise. * config/riscv/riscv.cc (riscv_print_operand): Likewise. * doc/extend.texi: Add XCValu documentation. * doc/sourcebuild.texi: Likewise. 2023-10-11 Mary Bennett * common/config/riscv/riscv-common.cc: Add XCVmac. * config/riscv/riscv-ftypes.def: Add XCVmac builtins. * config/riscv/riscv-builtins.cc: Likewise. * config/riscv/riscv.md: Likewise. * config/riscv/riscv.opt: Likewise. * doc/extend.texi: Add XCVmac builtin documentation. * doc/sourcebuild.texi: Likewise. * config/riscv/corev.def: New file. * config/riscv/corev.md: New file. 2023-10-11 Juzhe-Zhong * config/riscv/autovec.md: Fix index bug. * config/riscv/riscv-protos.h (gather_scatter_valid_offset_mode_p): New function. * config/riscv/riscv-v.cc (expand_gather_scatter): Fix index bug. (gather_scatter_valid_offset_mode_p): New function. 2023-10-11 Pan Li * config/riscv/autovec.md (lrint2): New pattern for lrint/lintf. * config/riscv/riscv-protos.h (expand_vec_lrint): New func decl for expanding lint. * config/riscv/riscv-v.cc (emit_vec_cvt_x_f): New helper func impl for vfcvt.x.f.v. (expand_vec_lrint): New function impl for expanding lint. * config/riscv/vector-iterators.md: New mode attr and iterator. 2023-10-11 Richard Biener Jakub Jelinek PR tree-optimization/111519 * tree-ssa-strlen.cc (strlen_pass::count_nonzero_bytes): Add vuse argument and pass it through to recursive calls and count_nonzero_bytes_addr calls. Don't shadow the stmt argument, but change stmt for gimple_assign_single_p statements for which we don't immediately punt. (strlen_pass::count_nonzero_bytes_addr): Add vuse argument and pass it through to recursive calls and count_nonzero_bytes calls. Don't use get_strinfo if gimple_vuse (stmt) is different from vuse. Don't shadow the stmt argument. 2023-10-11 Roger Sayle PR middle-end/101955 PR tree-optimization/106245 * simplify-rtx.cc (simplify_relational_operation_1): Simplify the RTL (ne:SI (subreg:QI (ashift:SI x 7) 0) 0) to (and:SI x 1). 2023-10-11 liuhongt PR target/111745 * config/i386/mmx.md (divv4hf3): Refine predicate of operands[2] with register_operand. 2023-10-10 Andrew Waterman Philipp Tomsich Jeff Law * config/riscv/riscv.cc (struct machine_function): Track if a far-branch/jump is used within a function (and $ra needs to be saved). (riscv_print_operand): Implement 'N' (inverse integer branch). (riscv_far_jump_used_p): Implement. (riscv_save_return_addr_reg_p): New function. (riscv_save_reg_p): Use riscv_save_return_addr_reg_p. * config/riscv/riscv.h (FIXED_REGISTERS): Update $ra. (CALL_USED_REGISTERS): Update $ra. * config/riscv/riscv.md: Add new types "ret" and "jalr". (length attribute): Handle long conditional and unconditional branches. (conditional branch pattern): Handle case where jump can not reach the intended target. (indirect_jump, tablejump): Use new "jalr" type. (simple_return): Use new "ret" type. (simple_return_internal, eh_return_internal): Likewise. (gpr_restore_return, riscv_mret): Likewise. (riscv_uret, riscv_sret): Likewise. * config/riscv/generic.md (generic_branch): Also recognize jalr & ret types. * config/riscv/sifive-7.md (sifive_7_jump): Likewise. 2023-10-10 Andrew Pinski PR tree-optimization/111679 * match.pd (`a | ((~a) ^ b)`): New pattern. 2023-10-10 Juzhe-Zhong PR target/111751 * config/riscv/autovec.md: Add VLS BOOL modes. 2023-10-10 Richard Biener PR tree-optimization/111751 * fold-const.cc (fold_view_convert_expr): Up the buffer size to 128 bytes. * tree-ssa-sccvn.cc (visit_reference_op_load): Special case constants, giving up when re-interpretation to the target type fails. 2023-10-10 Richard Biener PR tree-optimization/111751 * tree-ssa-sccvn.cc (visit_reference_op_load): Exempt BLKmode result from the padding bits check. 2023-10-10 Claudiu Zissulescu * config/arc/arc.cc (arc_select_cc_mode): Match NEG code with the first operand. * config/arc/arc.md (addsi_compare): Make pattern canonical. (addsi_compare_2): Fix identation, constraint letters. (addsi_compare_3): Likewise. 2023-10-09 Eugene Rozenfeld * auto-profile.cc (afdo_calculate_branch_prob): Fix count comparisons * tree-vect-loop-manip.cc (vect_do_peeling): Guard against zero count when scaling loop profile 2023-10-09 Andrew MacLeod PR tree-optimization/111694 * gimple-range-cache.cc (ranger_cache::fill_block_cache): Adjust equivalence range. * value-relation.cc (adjust_equivalence_range): New. * value-relation.h (adjust_equivalence_range): New prototype. 2023-10-09 Andrew MacLeod * gimple-range-gori.cc (gori_compute::compute_operand1_range): Do not call get_identity_relation. (gori_compute::compute_operand2_range): Ditto. * value-relation.cc (get_identity_relation): Remove. * value-relation.h (get_identity_relation): Remove protyotype. 2023-10-09 Robin Dapp * config/riscv/riscv-cores.def (RISCV_TUNE): Add parameter. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Add generic_ooo. * config/riscv/riscv.cc (riscv_sched_adjust_cost): Implement scheduler hook. (TARGET_SCHED_ADJUST_COST): Define. * config/riscv/riscv.md (no,yes"): Include generic-ooo.md * config/riscv/riscv.opt: Add -madjust-lmul-cost. * config/riscv/generic-ooo.md: New file. * config/riscv/vector.md: Add vsetvl_pre. 2023-10-09 Juzhe-Zhong * config/riscv/riscv-opts.h (TARGET_VECTOR_MISALIGN_SUPPORTED): New macro. * config/riscv/riscv.cc (riscv_support_vector_misalignment): Depend on movmisalign pattern. * config/riscv/vector.md (movmisalign): New pattern. 2023-10-09 Xianmiao Qu * config/riscv/thead.cc (th_mempair_save_regs): Fix missing CFI directives for store-pair instruction. 2023-10-09 Richard Biener PR tree-optimization/111715 * alias.cc (reference_alias_ptr_type_1): When we have a type-punning ref at the base search for the access path part that's still semantically valid. 2023-10-09 Pan Li * config/riscv/riscv-v.cc (shuffle_bswap_pattern): New func impl for shuffle bswap. (expand_vec_perm_const_1): Add handling for shuffle bswap pattern. 2023-10-09 Roger Sayle * config/i386/i386-expand.cc (ix86_split_ashr): Split shifts by one into ashr[sd]i3_carry followed by rcr[sd]i2, if TARGET_USE_RCR or -Oz. (ix86_split_lshr): Likewise, split shifts by one bit into lshr[sd]i3_carry followed by rcr[sd]i2, if TARGET_USE_RCR or -Oz. * config/i386/i386.h (TARGET_USE_RCR): New backend macro. * config/i386/i386.md (rcrsi2): New define_insn for rcrl. (rcrdi2): New define_insn for rcrq. (3_carry): New define_insn for right shifts that set the carry flag from the least significant bit, modelled using UNSPEC_CC_NE. * config/i386/x86-tune.def (X86_TUNE_USE_RCR): New tuning parameter controlling use of rcr 1 vs. shrd, which is significantly faster on AMD processors. 2023-10-09 Haochen Jiang * config/i386/i386.opt: Allow -mno-evex512. 2023-10-09 Haochen Jiang Hu, Lin1 * config/i386/sse.md (V48H_AVX512VL): Add TARGET_EVEX512. (VFH): Ditto. (VF2H): Ditto. (VFH_AVX512VL): Ditto. (VHFBF): Ditto. (VHF_AVX512VL): Ditto. (VI2H_AVX512VL): Ditto. (VI2F_256_512): Ditto. (VF48_I1248): Remove unused iterator. (VF48H_AVX512VL): Add TARGET_EVEX512. (VF_AVX512): Remove unused iterator. (REDUC_PLUS_MODE): Add TARGET_EVEX512. (REDUC_SMINMAX_MODE): Ditto. (FMAMODEM): Ditto. (VFH_SF_AVX512VL): Ditto. (VEC_PERM_AVX2): Ditto. 2023-10-09 Haochen Jiang Hu, Lin1 * config/i386/sse.md (VI1_AVX512VL): Add TARGET_EVEX512. (VI8_FVL): Ditto. (VI1_AVX512F): Ditto. (VI1_AVX512VNNI): Ditto. (VI1_AVX512VL_F): Ditto. (VI12_VI48F_AVX512VL): Ditto. (*avx512f_permvar_truncv32hiv32qi_1): Ditto. (sdot_prod): Ditto. (VEC_PERM_AVX2): Ditto. (VPERMI2): Ditto. (VPERMI2I): Ditto. (vpmadd52v8di): Ditto. (usdot_prod): Ditto. (vpdpbusd_v16si): Ditto. (vpdpbusds_v16si): Ditto. (vpdpwssd_v16si): Ditto. (vpdpwssds_v16si): Ditto. (VI48_AVX512VP2VL): Ditto. (avx512vp2intersect_2intersectv16si): Ditto. (VF_AVX512BF16VL): Ditto. (VF1_AVX512_256): Ditto. 2023-10-09 Haochen Jiang * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate): Make sure there is EVEX512 enabled. (ix86_expand_vecop_qihi2): Refuse V32QI->V32HI when no EVEX512. * config/i386/i386.cc (ix86_hard_regno_mode_ok): Disable 64 bit mask when !TARGET_EVEX512. * config/i386/i386.md (avx512bw_512): New. (SWI1248_AVX512BWDQ_64): Add TARGET_EVEX512. (*zero_extendsidi2): Change isa to avx512bw_512. (kmov_isa): Ditto. (*anddi_1): Ditto. (*andn_1): Change isa to kmov_isa. (*_1): Ditto. (*notxor_1): Ditto. (*one_cmpl2_1): Ditto. (*one_cmplsi2_1_zext): Change isa to avx512bw_512. (*ashl3_1): Change isa to kmov_isa. (*lshr3_1): Ditto. * config/i386/sse.md (VI12HFBF_AVX512VL): Add TARGET_EVEX512. (VI1248_AVX512VLBW): Ditto. (VHFBF_AVX512VL): Ditto. (VI): Ditto. (VIHFBF): Ditto. (VI_AVX2): Ditto. (VI1_AVX512): Ditto. (VI12_256_512_AVX512VL): Ditto. (VI2_AVX2_AVX512BW): Ditto. (VI2_AVX512VNNIBW): Ditto. (VI2_AVX512VL): Ditto. (VI2HFBF_AVX512VL): Ditto. (VI8_AVX2_AVX512BW): Ditto. (VIMAX_AVX2_AVX512BW): Ditto. (VIMAX_AVX512VL): Ditto. (VI12_AVX2_AVX512BW): Ditto. (VI124_AVX2_24_AVX512F_1_AVX512BW): Ditto. (VI248_AVX512VL): Ditto. (VI248_AVX512VLBW): Ditto. (VI248_AVX2_8_AVX512F_24_AVX512BW): Ditto. (VI248_AVX512BW): Ditto. (VI248_AVX512BW_AVX512VL): Ditto. (VI248_512): Ditto. (VI124_256_AVX512F_AVX512BW): Ditto. (VI_AVX512BW): Ditto. (VIHFBF_AVX512BW): Ditto. (SWI1248_AVX512BWDQ): Ditto. (SWI1248_AVX512BW): Ditto. (SWI1248_AVX512BWDQ2): Ditto. (*knotsi_1_zext): Ditto. (define_split for zero_extend + not): Ditto. (kunpckdi): Ditto. (REDUC_SMINMAX_MODE): Ditto. (VEC_EXTRACT_MODE): Ditto. (*avx512bw_permvar_truncv16siv16hi_1): Ditto. (*avx512bw_permvar_truncv16siv16hi_1_hf): Ditto. (truncv32hiv32qi2): Ditto. (avx512bw_v32hiv32qi2): Ditto. (avx512bw_v32hiv32qi2_mask): Ditto. (avx512bw_v32hiv32qi2_mask_store): Ditto. (usadv64qi): Ditto. (VEC_PERM_AVX2): Ditto. (AVX512ZEXTMASK): Ditto. (SWI24_MASK): New. (vec_pack_trunc_): Change iterator to SWI24_MASK. (avx512bw_packsswb): Add TARGET_EVEX512. (avx512bw_packssdw): Ditto. (avx512bw_interleave_highv64qi): Ditto. (avx512bw_interleave_lowv64qi): Ditto. (avx512bw_pshuflwv32hi): Ditto. (avx512bw_pshufhwv32hi): Ditto. (vec_unpacks_lo_di): Ditto. (SWI48x_MASK): New. (vec_unpacks_hi_): Change iterator to SWI48x_MASK. (avx512bw_umulhrswv32hi3): Add TARGET_EVEX512. (VI1248_AVX512VL_AVX512BW): Ditto. (avx512bw_v32qiv32hi2): Ditto. (*avx512bw_zero_extendv32qiv32hi2_1): Ditto. (*avx512bw_zero_extendv32qiv32hi2_2): Ditto. (v32qiv32hi2): Ditto. (pbroadcast_evex_isa): Change isa attribute to avx512bw_512. (VPERMI2): Add TARGET_EVEX512. (VPERMI2I): Ditto. 2023-10-09 Haochen Jiang * config/i386/i386-expand.cc (ix86_expand_sse2_mulvxdi3): Add TARGET_EVEX512 for 512 bit usage. * config/i386/i386.cc (standard_sse_constant_opcode): Ditto. * config/i386/sse.md (VF1_VF2_AVX512DQ): Ditto. (VF1_128_256VL): Ditto. (VF2_AVX512VL): Ditto. (VI8_256_512): Ditto. (fixuns_trunc2): Ditto. (AVX512_VEC): Ditto. (AVX512_VEC_2): Ditto. (VI4F_BRCST32x2): Ditto. (VI8F_BRCST64x2): Ditto. 2023-10-09 Haochen Jiang * config/i386/i386-builtins.cc (ix86_vectorize_builtin_gather): Disable 512 bit gather when !TARGET_EVEX512. * config/i386/i386-expand.cc (ix86_valid_mask_cmp_mode): Add TARGET_EVEX512. (ix86_expand_int_sse_cmp): Ditto. (ix86_expand_vector_init_one_nonzero): Disable subroutine when !TARGET_EVEX512. (ix86_emit_swsqrtsf): Add TARGET_EVEX512. (ix86_vectorize_vec_perm_const): Disable subroutine when !TARGET_EVEX512. * config/i386/i386.cc (standard_sse_constant_p): Add TARGET_EVEX512. (standard_sse_constant_opcode): Ditto. (ix86_get_ssemov): Ditto. (ix86_legitimate_constant_p): Ditto. (ix86_vectorize_builtin_scatter): Diable 512 bit scatter when !TARGET_EVEX512. * config/i386/i386.md (avx512f_512): New. (movxi): Add TARGET_EVEX512. (*movxi_internal_avx512f): Ditto. (*movdi_internal): Change alternative 12 to ?Yv. Adjust mode for alternative 13. (*movsi_internal): Change alternative 8 to ?Yv. Adjust mode for alternative 9. (*movhi_internal): Change alternative 11 to *Yv. (*movdf_internal): Change alternative 12 to Yv. (*movsf_internal): Change alternative 5 to Yv. Adjust mode for alternative 5 and 6. (*mov_internal): Change alternative 4 to Yv. (define_split for convert SF to DF): Add TARGET_EVEX512. (extendbfsf2_1): Ditto. * config/i386/predicates.md (bcst_mem_operand): Disable predicate for 512 bit when !TARGET_EVEX512. * config/i386/sse.md (VMOVE): Add TARGET_EVEX512. (V48_AVX512VL): Ditto. (V48_256_512_AVX512VL): Ditto. (V48H_AVX512VL): Ditto. (VI12_AVX512VL): Ditto. (V): Ditto. (V_512): Ditto. (V_256_512): Ditto. (VF): Ditto. (VF1_VF2_AVX512DQ): Ditto. (VFH): Ditto. (VFB): Ditto. (VF1): Ditto. (VF1_AVX2): Ditto. (VF2): Ditto. (VF2H): Ditto. (VF2_512_256): Ditto. (VF2_512_256VL): Ditto. (VF_512): Ditto. (VFB_512): Ditto. (VI48_AVX512VL): Ditto. (VI1248_AVX512VLBW): Ditto. (VF_AVX512VL): Ditto. (VFH_AVX512VL): Ditto. (VF1_AVX512VL): Ditto. (VI): Ditto. (VIHFBF): Ditto. (VI_AVX2): Ditto. (VI8): Ditto. (VI8_AVX512VL): Ditto. (VI2_AVX512F): Ditto. (VI4_AVX512F): Ditto. (VI4_AVX512VL): Ditto. (VI48_AVX512F_AVX512VL): Ditto. (VI8_AVX2_AVX512F): Ditto. (VI8_AVX_AVX512F): Ditto. (V8FI): Ditto. (V16FI): Ditto. (VI124_AVX2_24_AVX512F_1_AVX512BW): Ditto. (VI248_AVX512VLBW): Ditto. (VI248_AVX2_8_AVX512F_24_AVX512BW): Ditto. (VI248_AVX512BW): Ditto. (VI248_AVX512BW_AVX512VL): Ditto. (VI48_AVX512F): Ditto. (VI48_AVX_AVX512F): Ditto. (VI12_AVX_AVX512F): Ditto. (VI148_512): Ditto. (VI124_256_AVX512F_AVX512BW): Ditto. (VI48_512): Ditto. (VI_AVX512BW): Ditto. (VIHFBF_AVX512BW): Ditto. (VI4F_256_512): Ditto. (VI48F_256_512): Ditto. (VI48F): Ditto. (VI12_VI48F_AVX512VL): Ditto. (V32_512): Ditto. (AVX512MODE2P): Ditto. (STORENT_MODE): Ditto. (REDUC_PLUS_MODE): Ditto. (REDUC_SMINMAX_MODE): Ditto. (*andnot3): Change isa attribute to avx512f_512. (*andnot3): Ditto. (3): Ditto. (tf3): Ditto. (FMAMODEM): Add TARGET_EVEX512. (FMAMODE_AVX512): Ditto. (VFH_SF_AVX512VL): Ditto. (avx512f_fix_notruncv16sfv16si): Ditto. (fix_truncv16sfv16si2): Ditto. (avx512f_cvtdq2pd512_2): Ditto. (avx512f_cvtpd2dq512): Ditto. (fix_truncv8dfv8si2): Ditto. (avx512f_cvtpd2ps512): Ditto. (vec_unpacks_lo_v16sf): Ditto. (vec_unpacks_hi_v16sf): Ditto. (vec_unpacks_float_hi_v16si): Ditto. (vec_unpacks_float_lo_v16si): Ditto. (vec_unpacku_float_hi_v16si): Ditto. (vec_unpacku_float_lo_v16si): Ditto. (vec_pack_sfix_trunc_v8df): Ditto. (avx512f_vec_pack_sfix_v8df): Ditto. (avx512f_unpckhps512): Ditto. (avx512f_unpcklps512): Ditto. (avx512f_movshdup512): Ditto. (avx512f_movsldup512): Ditto. (AVX512_VEC): Ditto. (AVX512_VEC_2): Ditto. (vec_extract_lo_v64qi): Ditto. (vec_extract_hi_v64qi): Ditto. (VEC_EXTRACT_MODE): Ditto. (avx512f_unpckhpd512): Ditto. (avx512f_movddup512): Ditto. (avx512f_unpcklpd512): Ditto. (*_vternlog_all): Ditto. (*_vpternlog_1): Ditto. (*_vpternlog_2): Ditto. (*_vpternlog_3): Ditto. (avx512f_shufps512_mask): Ditto. (avx512f_shufps512_1): Ditto. (avx512f_shufpd512_mask): Ditto. (avx512f_shufpd512_1): Ditto. (avx512f_interleave_highv8di): Ditto. (avx512f_interleave_lowv8di): Ditto. (vec_dupv2df): Ditto. (trunc2): Ditto. (*avx512f_2): Ditto. (*avx512f_vpermvar_truncv8div8si_1): Ditto. (avx512f_2_mask): Ditto. (avx512f_2_mask_store): Ditto. (truncv8div8qi2): Ditto. (avx512f_v8div16qi2): Ditto. (*avx512f_v8div16qi2_store_1): Ditto. (*avx512f_v8div16qi2_store_2): Ditto. (avx512f_v8div16qi2_mask): Ditto. (*avx512f_v8div16qi2_mask_1): Ditto. (*avx512f_v8div16qi2_mask_store_1): Ditto. (avx512f_v8div16qi2_mask_store_2): Ditto. (vec_widen_umult_even_v16si): Ditto. (*vec_widen_umult_even_v16si): Ditto. (vec_widen_smult_even_v16si): Ditto. (*vec_widen_smult_even_v16si): Ditto. (VEC_PERM_AVX2): Ditto. (one_cmpl2): Ditto. (one_cmpl2): Ditto. (*one_cmpl2_pternlog_false_dep): Ditto. (define_split to xor): Ditto. (*andnot3): Ditto. (define_split for ior): Ditto. (*iornot3): Ditto. (*xnor3): Ditto. (*3): Ditto. (avx512f_interleave_highv16si): Ditto. (avx512f_interleave_lowv16si): Ditto. (avx512f_pshufdv3_mask): Ditto. (avx512f_pshufd_1): Ditto. (*vec_extractv4ti): Ditto. (VEXTRACTI128_MODE): Ditto. (define_split to vec_extract): Ditto. (VI1248_AVX512VL_AVX512BW): Ditto. (avx512f_v16qiv16si2): Ditto. (v16qiv16si2): Ditto. (avx512f_v16hiv16si2): Ditto. (v16hiv16si2): Ditto. (avx512f_zero_extendv16hiv16si2_1): Ditto. (avx512f_v8qiv8di2): Ditto. (*avx512f_v8qiv8di2_1): Ditto. (*avx512f_v8qiv8di2_2): Ditto. (v8qiv8di2): Ditto. (avx512f_v8hiv8di2): Ditto. (v8hiv8di2): Ditto. (avx512f_v8siv8di2): Ditto. (*avx512f_zero_extendv8siv8di2_1): Ditto. (*avx512f_zero_extendv8siv8di2_2): Ditto. (v8siv8di2): Ditto. (avx512f_roundps512_sfix): Ditto. (vashrv8di3): Ditto. (vashrv16si3): Ditto. (pbroadcast_evex_isa): Change isa attribute to avx512f_512. (vec_dupv4sf): Add TARGET_EVEX512. (*vec_dupv4si): Ditto. (*vec_dupv2di): Ditto. (vec_dup): Change isa attribute to avx512f_512. (VPERMI2): Add TARGET_EVEX512. (VPERMI2I): Ditto. (VEC_INIT_MODE): Ditto. (VEC_INIT_HALF_MODE): Ditto. (avx512f_vcvtph2ps512): Ditto. (avx512f_vcvtps2ph512_mask_sae): Ditto. (avx512f_vcvtps2ph512): Ditto. (*avx512f_vcvtps2ph512): Ditto. (INT_BROADCAST_MODE): Ditto. 2023-10-09 Haochen Jiang * config/i386/i386-expand.cc (ix86_broadcast_from_constant): Disable zmm broadcast for !TARGET_EVEX512. * config/i386/i386-options.cc (ix86_option_override_internal): Do not use PVW_512 when no-evex512. (ix86_simd_clone_adjust): Add evex512 target into string. * config/i386/i386.cc (type_natural_mode): Report ABI warning when using zmm register w/o evex512. (ix86_return_in_memory): Do not allow zmm when !TARGET_EVEX512. (ix86_hard_regno_mode_ok): Ditto. (ix86_set_reg_reg_cost): Ditto. (ix86_rtx_costs): Ditto. (ix86_vector_mode_supported_p): Ditto. (ix86_preferred_simd_mode): Ditto. (ix86_get_mask_mode): Ditto. (ix86_simd_clone_compute_vecsize_and_simdlen): Disable 512 bit libmvec call when !TARGET_EVEX512. (ix86_simd_clone_usable): Ditto. * config/i386/i386.h (BIGGEST_ALIGNMENT): Disable 512 alignment when !TARGET_EVEX512 (MOVE_MAX): Do not use PVW_512 when !TARGET_EVEX512. (STORE_MAX_PIECES): Ditto. 2023-10-09 Haochen Jiang * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_EVEX512. 2023-10-09 Haochen Jiang * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_EVEX512. 2023-10-09 Haochen Jiang * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_EVEX512. 2023-10-09 Haochen Jiang * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_EVEX512. 2023-10-09 Haochen Jiang * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_EVEX512. * config/i386/i386-builtins.cc (ix86_init_mmx_sse_builtins): Ditto. 2023-10-09 Haochen Jiang Hu, Lin1 * config/i386/avx512fp16intrin.h: Add evex512 target for 512 bit intrins. 2023-10-09 Haochen Jiang * config.gcc: Add avx512bitalgvlintrin.h. * config/i386/avx5124fmapsintrin.h: Add evex512 target for 512 bit intrins. * config/i386/avx5124vnniwintrin.h: Ditto. * config/i386/avx512bf16intrin.h: Ditto. * config/i386/avx512bitalgintrin.h: Add evex512 target for 512 bit intrins. Split 128/256 bit intrins to avx512bitalgvlintrin.h. * config/i386/avx512erintrin.h: Add evex512 target for 512 bit intrins * config/i386/avx512ifmaintrin.h: Ditto * config/i386/avx512pfintrin.h: Ditto * config/i386/avx512vbmi2intrin.h: Ditto. * config/i386/avx512vbmiintrin.h: Ditto. * config/i386/avx512vnniintrin.h: Ditto. * config/i386/avx512vp2intersectintrin.h: Ditto. * config/i386/avx512vpopcntdqintrin.h: Ditto. * config/i386/gfniintrin.h: Ditto. * config/i386/immintrin.h: Add avx512bitalgvlintrin.h. * config/i386/vaesintrin.h: Add evex512 target for 512 bit intrins. * config/i386/vpclmulqdqintrin.h: Ditto. * config/i386/avx512bitalgvlintrin.h: New. 2023-10-09 Haochen Jiang * config/i386/avx512bwintrin.h: Add evex512 target for 512 bit intrins. 2023-10-09 Haochen Jiang * config/i386/avx512dqintrin.h: Add evex512 target for 512 bit intrins. 2023-10-09 Haochen Jiang * config/i386/avx512fintrin.h: Add evex512 target for 512 bit intrins. 2023-10-09 Haochen Jiang * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_EVEX512_SET): New. (OPTION_MASK_ISA2_EVEX512_UNSET): Ditto. (ix86_handle_option): Handle EVEX512. * config/i386/i386-c.cc (ix86_target_macros_internal): Handle EVEX512. Add __EVEX256__ when AVX512VL is set. * config/i386/i386-options.cc: (isa2_opts): Handle EVEX512. (ix86_valid_target_attribute_inner_p): Ditto. (ix86_option_override_internal): Set EVEX512 target if it is not explicitly set when AVX512 is enabled. Disable AVX512{PF,ER,4VNNIW,4FAMPS} for -mno-evex512. * config/i386/i386.opt: Add mevex512. Temporaily RejectNegative. 2023-10-09 Haochen Gui PR target/88558 * config/rs6000/rs6000.md (lrintdi2): Remove TARGET_FPRND from insn condition. (lrintsi2): New insn pattern for 32bit lrint. 2023-10-09 Haochen Gui PR target/88558 * config/rs6000/rs6000.cc (rs6000_hard_regno_mode_ok_uncached): Enable SImode on FP registers for P7. * config/rs6000/rs6000.md (*movsi_internal1): Add fmr for SImode move between FP registers. Set attribute isa of stfiwx to "*" and attribute of stxsiwx to "p7". 2023-10-09 Stefan Schulze Frielinghaus * config/s390/s390.md: Make use of new copysign RTL. 2023-10-09 Hongyu Wang * config/i386/sse.md (vec_concatv2di): Replace constraint "m" with "jm" for alternative 0 and 1 of operand 2. (sse4_1_3): Replace constraint "Bm" with "ja" for alternative 0 and 1 of operand2. 2023-10-08 David Malcolm PR analyzer/111155 * text-art/table.cc (table::maybe_set_cell_span): New. (table::add_other_table): New. * text-art/table.h (class table::cell_placement): Add class table as a friend. (table::add_rows): New. (table::add_row): Reimplement in terms of add_rows. (table::maybe_set_cell_span): New decl. (table::add_other_table): New decl. * text-art/types.h (operator+): New operator for rect + coord. 2023-10-08 David Malcolm * genmatch.cc (main): Update for "m_" prefix of some fields of line_maps. * input.cc (make_location): Update for removal of COMBINE_LOCATION_DATA. (dump_line_table_statistics): Update for "m_" prefix of some fields of line_maps. (location_with_discriminator): Update for removal of COMBINE_LOCATION_DATA. (line_table_test::line_table_test): Update for "m_" prefix of some fields of line_maps. * toplev.cc (general_init): Likewise. * tree.cc (set_block): Update for removal of COMBINE_LOCATION_DATA. (set_source_range): Likewise. 2023-10-08 David Malcolm * input.cc (make_location): Move implementation to line_maps::make_location. 2023-10-08 David Malcolm PR driver/111700 * input.cc (file_cache::add_file): Update leading comment to clarify that it can fail. (file_cache::lookup_or_add_file): Likewise. (file_cache::get_source_file_content): Gracefully handle lookup_or_add_file failing. 2023-10-08 liuhongt * config/i386/i386.cc (ix86_build_const_vector): Handle V2HF and V4HFmode. (ix86_build_signbit_mask): Ditto. * config/i386/mmx.md (mmxintvecmode): Ditto. (2): New define_expand. (*mmx_): New define_insn_and_split. (*mmx_nabs2): Ditto. (*mmx_andnot3): New define_insn. (3): Ditto. (copysign3): New define_expand. (xorsign3): Ditto. (signbit2): Ditto. 2023-10-08 liuhongt * config/i386/mmx.md (VHF_32_64): New mode iterator. (3): New define_expand, merged from .. (v4hf3): .. this and (v2hf3): .. this. (movd_v2hf_to_sse_reg): New define_expand, splitted from .. (movd_v2hf_to_sse): .. this. (3): New define_expand. 2023-10-08 Jiufu Guo * config/rs6000/rs6000.cc (can_be_built_by_li_and_rldic): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_and_rldic. 2023-10-08 Jiufu Guo * config/rs6000/rs6000.cc (can_be_built_by_li_lis_and_rldicl): New function. (can_be_built_by_li_lis_and_rldicr): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_lis_and_rldicr and can_be_built_by_li_lis_and_rldicl. 2023-10-08 Jiufu Guo * config/rs6000/rs6000.cc (can_be_rotated_to_negative_lis): New function. (can_be_built_by_li_and_rotldi): Rename to ... (can_be_built_by_li_lis_and_rotldi): ... this function. (rs6000_emit_set_long_const): Call can_be_built_by_li_lis_and_rotldi. 2023-10-08 Jiufu Guo * config/rs6000/rs6000.cc (can_be_built_by_li_and_rotldi): New function. (rs6000_emit_set_long_const): Call can_be_built_by_li_and_rotldi. 2023-10-08 Yanzhang Wang * config/riscv/linux.h: Pass the static-pie specific options to the linker. 2023-10-07 Saurabh Jha * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add support for cortex-x4 core. * config/aarch64/aarch64-tune.md: Regenerated. * doc/invoke.texi: Add command-line option for cortex-x4 core. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/constraints.md (jb): New constraint for vsib memory that does not allow gpr32. * config/i386/i386.md: (setcc__sse): Replace m to jm for avx alternative and set attr_gpr32 to 0. (movmsk_df): Split avx/noavx alternatives and replace "r" to "jr" for avx alternative. (_rcp2): Split avx/noavx alternatives and replace "m/Bm" to "jm/ja" for avx alternative, set its gpr32 attr to 0. (*rsqrtsf2_sse): Likewise. * config/i386/mmx.md (mmx_pmovmskb): Split alternative 1 to avx/noavx and assign jr/r constraint to dest. * config/i386/sse.md (_movmsk): Split avx/noavx alternatives and replace "r" to "jr" for avx alternative. (*_movmsk_ext): Likewise. (*_movmsk_lt): Likewise. (*_movmsk_ext_lt): Likewise. (*_movmsk_shift): Likewise. (*_movmsk_ext_shift): Likewise. (_pmovmskb): Likewise. (*_pmovmskb_zext): Likewise. (*sse2_pmovmskb_ext): Likewise. (*_pmovmskb_lt): Likewise. (*_pmovmskb_zext_lt): Likewise. (*sse2_pmovmskb_ext_lt): Likewise. (_rcp2): Split avx/noavx alternatives and replace "m/Bm" to "jm/ja" for avx alternative, set its attr_gpr32 to 0. (sse_vmrcpv4sf2): Likewise. (*sse_vmrcpv4sf2): Likewise. (rsqrt2): Likewise. (sse_vmrsqrtv4sf2): Likewise. (*sse_vmrsqrtv4sf2): Likewise. (avx_hv4df3): Likewise. (sse3_hsubv2df3): Likewise. (avx_hv8sf3): Likewise. (sse3_hv4sf3): Likewise. (_lddqu): Likewise. (avx_cmp3): Likewise. (avx_vmcmp3): Likewise. (*sse2_gt3): Likewise. (sse_ldmxcsr): Likewise. (sse_stmxcsr): Likewise. (avx_vtest): Replace m to jm for avx alternative and set attr_gpr32 to 0. (avx2_permv2ti): Likewise. (*avx_vperm2f128_full): Likewise. (*avx_vperm2f128_nozero): Likewise. (vec_set_lo_v32qi): Likewise. (_maskload): Likewise. (_maskstore: Likewise. (avx_cmp3): Likewise. (avx_vmcmp3): Likewise. (*_maskcmp3_comm): Likewise. (*avx2_gathersi): Replace Tv to jb and set attr_gpr32 to 0. (*avx2_gathersi_2): Likewise. (*avx2_gatherdi): Likewise. (*avx2_gatherdi_2): Likewise. (*avx2_gatherdi_3): Likewise. (*avx2_gatherdi_4): Likewise. (avx_vbroadcastf128_): Restrict non-egpr alternative to noavx512vl, set its constraint to jm and set attr_gpr32 to 0. (vec_set_lo_): Likewise. (vec_set_lo_): Likewise for SF/SI modes. (vec_set_hi_): Likewise. (vec_set_hi_): Likewise for SF/SI modes. (vec_set_hi_): Likewise. (vec_set_lo_): Likewise. (avx2_set_hi_v32qi): Likewise. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386.md (*movhi_internal): Split out non-gpr supported pextrw with mem constraint to avx/noavx alternatives, set jm and attr gpr32 0 to the noavx alternative. (*mov_internal): Likewise. * config/i386/mmx.md (mmx_pshufbv8qi3): Change "r/m/Bm" to "jr/jm/ja" and set_attr gpr32 0 for noavx alternative. (mmx_pshufbv4qi3): Likewise. (*mmx_pinsrd): Likewise. (*mmx_pinsrb): Likewise. (*pinsrb): Likewise. (mmx_pshufbv8qi3): Likewise. (mmx_pshufbv4qi3): Likewise. (@sse4_1_insertps_): Likewise. (*mmx_pextrw): Split altrenatives and map non-EGPR constraints, attr_gpr32 and attr_isa to noavx mnemonics. (*movv2qi_internal): Likewise. (*pextrw): Likewise. (*mmx_pextrb): Likewise. (*mmx_pextrb_zext): Likewise. (*pextrb): Likewise. (*pextrb_zext): Likewise. (vec_extractv2si_1): Likewise. (vec_extractv2si_1_zext): Likewise. * config/i386/sse.md: (vi128_h_r): New mode attr for pinsr{bw}/pextr{bw} with reg operand. (*abs2): Split altrenatives and %v in mnemonics, map non-EGPR constraints, gpr32 and isa attrs to noavx mnemonics. (*vec_extract): Likewise. (*vec_extract): Likewise for HFBF pattern. (*vec_extract_zext): Likewise. (*vec_extractv4si_1): Likewise. (*vec_extractv4si_zext): Likewise. (*vec_extractv2di_1): Likewise. (*vec_concatv2si_sse4_1): Likewise. (_pinsr): Likewise. (vec_concatv2di): Likewise. (*sse4_1_v2qiv2di2_1): Likewise. (ssse3_avx2>_pshufb3): Change "r/m/Bm" to "jr/jm/ja" and set_attr gpr32 0 for noavx alternative, split %v for avx/noavx alternatives if necessary. (*vec_concatv2sf_sse4_1): Likewise. (*sse4_1_extractps): Likewise. (vec_set_0): Likewise for VI4F_128. (*vec_setv4sf_sse4_1): Likewise. (@sse4_1_insertps): Likewise. (ssse3_pmaddubsw128): Likewise. (*_pmulhrsw3): Likewise. (_packusdw): Likewise. (_palignr): Likewise. (_movntdqa): Likewise. (_mpsadbw): Likewise. (*sse4_1_mulv2siv2di3): Likewise. (*_mul3): Likewise. (*sse4_1_3): Likewise. (*v8hi3): Likewise. (*v16qi3): Likewise. (*sse4_1_v8qiv8hi2_1): Likewise. (*sse4_1_zero_extendv8qiv8hi2_3): Likewise. (*sse4_1_zero_extendv8qiv8hi2_4): Likewise. (*sse4_1_v4qiv4si2_1): Likewise. (*sse4_1_v4hiv4si2_1): Likewise. (*sse4_1_zero_extendv4hiv4si2_3): Likewise. (*sse4_1_zero_extendv4hiv4si2_4): Likewise. (*sse4_1_v2hiv2di2_1): Likewise. (*sse4_1_v2siv2di2_1): Likewise. (*sse4_1_zero_extendv2siv2di2_3): Likewise. (*sse4_1_zero_extendv2siv2di2_4): Likewise. (aesdec): Likewise. (aesdeclast): Likewise. (aesenc): Likewise. (aesenclast): Likewise. (pclmulqdq): Likewise. (vgf2p8affineinvqb_): Likewise. (vgf2p8affineqb_): Likewise. (vgf2p8mulb_): Likewise. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386-protos.h (x86_evex_reg_mentioned_p): New prototype. * config/i386/i386.cc (x86_evex_reg_mentioned_p): New function. * config/i386/i386.md (sse4_1_round2): Set attr gpr32 0 and constraint jm to all non-evex alternatives, adjust alternative outputs if evex reg is mentioned. * config/i386/sse.md (_ptest): Set attr gpr32 0 and constraint jm/ja to all non-evex alternatives. (ptesttf2): Likewise. (_round): Likewise. (sse4_2_pcmpestri): Likewise. (sse4_2_pcmpestrm): Likewise. (sse4_2_pcmpestr_cconly): Likewise. (sse4_2_pcmpistr): Likewise. (sse4_2_pcmpistri): Likewise. (sse4_2_pcmpistrm): Likewise. (sse4_2_pcmpistr_cconly): Likewise. (aesimc): Likewise. (aeskeygenassist): Likewise. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/sse.md (avx2_phwv16hi3): Set attr gpr32 0 and constraint jm/ja to all mem alternatives. (ssse3_phwv8hi3): Likewise. (ssse3_phwv4hi3): Likewise. (avx2_phdv8si3): Likewise. (ssse3_phdv4si3): Likewise. (ssse3_phdv2si3): Likewise. (_psign3): Likewise. (ssse3_psign3): Likewise. (_blend_blendv_blendv_lt): Likewise. (*_blendv_not_ltint: Likewise. (_dp): Likewise. (_mpsadbw): Likewise. (_pblendvb): Likewise. (*_pblendvb_lt): Likewise. (sse4_1_pblend): Likewise. (*avx2_pblend): Likewise. (avx2_permv2ti): Likewise. (*avx_vperm2f128_nozero): Likewise. (*avx2_eq3): Likewise. (*sse4_1_eqv2di3): Likewise. (sse4_2_gtv2di3): Likewise. (avx2_gt3): Likewise. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386.md (): Set attr gpr32 0 and constraint jm. (_rex64): Likewise. (_rex64): Likewise. (64): Likewise. (fxsave64): Likewise. (fxstore64): Likewise. 2023-10-07 Hongyu Wang Kong Lingling Hongtao Liu * config/i386/i386.cc (ix86_get_ssemov): Check if egpr is used, adjust mnemonic for vmovduq/vmovdqa. * config/i386/sse.md (*_vinsert_0): Check if egpr is used, adjust mnemonic for vmovdqu/vmovdqa. (avx_vec_concat): Likewise, and separate alternative 0 to avx_noavx512f. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386.cc (map_egpr_constraints): New funciton to map common constraints to EGPR prohibited constraints. (ix86_md_asm_adjust): Calls map_egpr_constraints. * config/i386/i386.opt: Add option mapx-inline-asm-use-gpr32. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386-protos.h (ix86_insn_base_reg_class): New prototype. (ix86_regno_ok_for_insn_base_p): Likewise. (ix86_insn_index_reg_class): Likewise. * config/i386/i386.cc (ix86_memory_address_use_extended_reg_class_p): New helper function to scan the insn. (ix86_insn_base_reg_class): New function to choose BASE_REG_CLASS. (ix86_regno_ok_for_insn_base_p): Likewise for base regno. (ix86_insn_index_reg_class): Likewise for INDEX_REG_CLASS. * config/i386/i386.h (INSN_BASE_REG_CLASS): Define. (REGNO_OK_FOR_INSN_BASE_P): Likewise. (INSN_INDEX_REG_CLASS): Likewise. (enum reg_class): Add INDEX_GPR16. (GENERAL_GPR16_REGNO_P): Define. * config/i386/i386.md (gpr32): New attribute. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/constraints.md (jr): New register constraint that prohibits EGPR. (jR): Constraint that force usage of EGPR. (jm): New memory constraint that prohibits EGPR. (ja): Likewise for Bm constraint. (jb): Likewise for Tv constraint. (j<): New auto-dec memory constraint that prohibits EGPR. (j>): Likewise for ">" constraint. (jo): Likewise for "o" constraint. (jv): Likewise for "V" constraint. (jp): Likewise for "p" constraint. * config/i386/i386.h (enum reg_class): Add new reg class GENERAL_GPR16. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * config/i386/i386-protos.h (x86_extended_rex2reg_mentioned_p): New function prototype. * config/i386/i386.cc (regclass_map): Add mapping for 16 new general registers. (debugger64_register_map): Likewise. (ix86_conditional_register_usage): Clear REX2 register when APX disabled. (ix86_code_end): Add handling for REX2 reg. (print_reg): Likewise. (ix86_output_jmp_thunk_or_indirect): Likewise. (ix86_output_indirect_branch_via_reg): Likewise. (ix86_attr_length_vex_default): Likewise. (ix86_emit_save_regs): Adjust to allow saving r31. (ix86_register_priority): Set REX2 reg priority same as REX. (x86_extended_reg_mentioned_p): Add check for REX2 regs. (x86_extended_rex2reg_mentioned_p): New function. * config/i386/i386.h (CALL_USED_REGISTERS): Add new extended registers. (REG_ALLOC_ORDER): Likewise. (FIRST_REX2_INT_REG): Define. (LAST_REX2_INT_REG): Ditto. (GENERAL_REGS): Add 16 new registers. (INT_SSE_REGS): Likewise. (FLOAT_INT_REGS): Likewise. (FLOAT_INT_SSE_REGS): Likewise. (INT_MASK_REGS): Likewise. (ALL_REGS):Likewise. (REX2_INT_REG_P): Define. (REX2_INT_REGNO_P): Ditto. (GENERAL_REGNO_P): Add REX2_INT_REGNO_P. (REGNO_OK_FOR_INDEX_P): Ditto. (REG_OK_FOR_INDEX_NONSTRICT_P): Add new extended registers. * config/i386/i386.md: Add 16 new integer general registers. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * common/config/i386/cpuinfo.h (XSTATE_APX_F): New macro. (XCR_APX_F_ENABLED_MASK): Likewise. (get_available_features): Detect APX_F under * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_APX_F_SET): New. (OPTION_MASK_ISA2_APX_F_UNSET): Likewise. (ix86_handle_option): Handle -mapxf. * common/config/i386/i386-cpuinfo.h (FEATURE_APX_F): New. * common/config/i386/i386-isas.h: Add entry for APX_F. * config/i386/cpuid.h (bit_APX_F): New. * config/i386/i386.h (bit_APX_F): (TARGET_APX_EGPR, TARGET_APX_PUSH2POP2, TARGET_APX_NDD): New define. * config/i386/i386-opts.h (enum apx_features): New enum. * config/i386/i386-isa.def (APX_F): New DEF_PTA. * config/i386/i386-options.cc (ix86_function_specific_save): Save ix86_apx_features. (ix86_function_specific_restore): Restore it. (ix86_valid_target_attribute_inner_p): Add mapxf. (ix86_option_override_internal): Set ix86_apx_features for PTA and TARGET_APX_F. Also reports error when APX_F is set but not having TARGET_64BIT. * config/i386/i386.opt: (-mapxf): New ISA flag option. (-mapx=): New enumeration option. (apx_features): New enum type. (apx_none): New enum value. (apx_egpr): Likewise. (apx_push2pop2): Likewise. (apx_ndd): Likewise. (apx_all): Likewise. * doc/invoke.texi: Document mapxf. 2023-10-07 Hongyu Wang Kong Lingling Hongtao Liu * addresses.h (index_reg_class): New wrapper function like base_reg_class. * doc/tm.texi: Document INSN_INDEX_REG_CLASS. * doc/tm.texi.in: Ditto. * lra-constraints.cc (index_part_to_reg): Pass index_class. (process_address_1): Calls index_reg_class with curr_insn and replace INDEX_REG_CLASS with its return value index_cl. * reload.cc (find_reloads_address): Likewise. (find_reloads_address_1): Likewise. 2023-10-07 Kong Lingling Hongyu Wang Hongtao Liu * addresses.h (base_reg_class): Add insn argument and new macro INSN_BASE_REG_CLASS. (regno_ok_for_base_p_1): Add insn argument and new macro REGNO_OK_FOR_INSN_BASE_P. (regno_ok_for_base_p): Add insn argument and parse to ok_for_base_p_1. * doc/tm.texi: Document INSN_BASE_REG_CLASS and REGNO_OK_FOR_INSN_BASE_P. * doc/tm.texi.in: Ditto. * lra-constraints.cc (process_address_1): Pass insn to base_reg_class. (curr_insn_transform): Ditto. * reload.cc (find_reloads): Ditto. (find_reloads_address): Ditto. (find_reloads_address_1): Ditto. (find_reloads_subreg_address): Ditto. * reload1.cc (maybe_fix_stack_asms): Ditto. 2023-10-07 Jiufu Guo PR target/108338 * config/rs6000/rs6000.md (movsf_from_si): Update to generate mtvsrws for P9. 2023-10-07 Jiufu Guo PR target/108338 * config/rs6000/predicates.md (lowpart_subreg_operator): New define_predicate. * config/rs6000/rs6000.md (any_rshift): New code_iterator. (movsf_from_si2): Rename to ... (movsf_from_si2_): ... this. 2023-10-07 Pan Li PR target/111634 * config/riscv/riscv.cc (riscv_legitimize_address): Ensure object is a REG before extracting its' REGNO. 2023-10-06 Roger Sayle * config/i386/i386-expand.cc (ix86_split_ashl): Split shifts by one into add3_cc_overflow_1 followed by add3_carry. * config/i386/i386.md (@add3_cc_overflow_1): Renamed from "*add3_cc_overflow_1" to provide generator function. 2023-10-06 Roger Sayle Uros Bizjak * config/i386/i386.cc (ix86_avoid_lea_for_addr): Split LEAs used to perform left shifts into shorter instructions with -Oz. 2023-10-06 Vineet Gupta * config/riscv/riscv.md (mvconst_internal): Add !ira_in_progress. 2023-10-06 Sandra Loosemore * doc/extend.texi (Function Attributes): Mention standard attribute syntax. (Variable Attributes): Likewise. (Type Attributes): Likewise. (Attribute Syntax): Likewise. 2023-10-06 Andrew Stubbs * config/gcn/gcn-valu.md (*mov): Convert to compact syntax. (mov_exec): Likewise. (mov_sgprbase): Likewise. * config/gcn/gcn.md (*mov_insn): Likewise. (*movti_insn): Likewise. 2023-10-06 Andrew Stubbs * config/gcn/gcn.cc (print_operand): Adjust xcode type to fix warning. 2023-10-06 Andrew Pinski PR middle-end/111699 * match.pd ((c ? a : b) op d, (c ? a : b) op (c ? d : e), (v ? w : 0) ? a : b, c1 ? c2 ? a : b : b): Enable only for GIMPLE. 2023-10-06 Jakub Jelinek * ipa-prop.h (ipa_bits): Remove. (struct ipa_jump_func): Remove bits member. (struct ipcp_transformation): Remove bits member, adjust ctor and dtor. (ipa_get_ipa_bits_for_value): Remove. * ipa-prop.cc (struct ipa_bit_ggc_hash_traits): Remove. (ipa_bits_hash_table): Remove. (ipa_print_node_jump_functions_for_edge): Don't print bits. (ipa_get_ipa_bits_for_value): Remove. (ipa_set_jfunc_bits): Remove. (ipa_compute_jump_functions_for_edge): For pointers query pointer alignment before ipa_set_jfunc_vr and update_bitmask in there. For integral types, just rely on bitmask already being handled in value ranges. (ipa_check_create_edge_args): Don't create ipa_bits_hash_table. (ipcp_transformation_initialize): Neither here. (ipcp_transformation_t::duplicate): Don't copy bits vector. (ipa_write_jump_function): Don't stream bits here. (ipa_read_jump_function): Neither here. (useful_ipcp_transformation_info_p): Don't test bits vec. (write_ipcp_transformation_info): Don't stream bits here. (read_ipcp_transformation_info): Neither here. (ipcp_get_parm_bits): Get mask and value from m_vr rather than bits. (ipcp_update_bits): Remove. (ipcp_update_vr): For pointers, set_ptr_info_alignment from bitmask stored in value range. (ipcp_transform_function): Don't test bits vector, don't call ipcp_update_bits. * ipa-cp.cc (propagate_bits_across_jump_function): Don't use jfunc->bits, instead get mask and value from jfunc->m_vr. (ipcp_store_bits_results): Remove. (ipcp_store_vr_results): Incorporate parts of ipcp_store_bits_results here, merge the bitmasks with value range if both are supplied. (ipcp_driver): Don't call ipcp_store_bits_results. * ipa-sra.cc (zap_useless_ipcp_results): Remove *ts->bits clearing. 2023-10-06 Pan Li * config/riscv/autovec.md: Update comments. 2023-10-05 John David Anglin * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Delete. 2023-10-05 Andrew MacLeod * timevar.def (TV_TREE_FAST_VRP): New. * tree-pass.h (make_pass_fast_vrp): New prototype. * tree-vrp.cc (class fvrp_folder): New. (fvrp_folder::fvrp_folder): New. (fvrp_folder::~fvrp_folder): New. (fvrp_folder::value_of_expr): New. (fvrp_folder::value_on_edge): New. (fvrp_folder::value_of_stmt): New. (fvrp_folder::pre_fold_bb): New. (fvrp_folder::post_fold_bb): New. (fvrp_folder::pre_fold_stmt): New. (fvrp_folder::fold_stmt): New. (execute_fast_vrp): New. (pass_data_fast_vrp): New. (pass_vrp:execute): Check for fast VRP pass. (make_pass_fast_vrp): New. 2023-10-05 Andrew MacLeod * gimple-range.cc (dom_ranger::dom_ranger): New. (dom_ranger::~dom_ranger): New. (dom_ranger::range_of_expr): New. (dom_ranger::edge_range): New. (dom_ranger::range_on_edge): New. (dom_ranger::range_in_bb): New. (dom_ranger::range_of_stmt): New. (dom_ranger::maybe_push_edge): New. (dom_ranger::pre_bb): New. (dom_ranger::post_bb): New. * gimple-range.h (class dom_ranger): New. 2023-10-05 Andrew MacLeod * gimple-range-gori.cc (gori_stmt_info::gori_stmt_info): New. (gori_calc_operands): New. (gori_on_edge): New. (gori_name_helper): New. (gori_name_on_edge): New. * gimple-range-gori.h (gori_on_edge): New prototype. (gori_name_on_edge): New prototype. 2023-10-05 Sergei Trofimovich PR ipa/111283 PR gcov-profile/111559 * ipa-utils.cc (ipa_merge_profiles): Avoid producing uninitialized probabilities when merging counters with zero denominators. 2023-10-05 Uros Bizjak PR target/111657 * config/i386/i386-expand.cc (alg_usable_p): Reject libcall strategy for non-default address spaces. (decide_alg): Use loop strategy as a fallback strategy for non-default address spaces. 2023-10-05 Jakub Jelinek * sreal.cc (verify_aritmetics): Rename to ... (verify_arithmetics): ... this. (sreal_verify_arithmetics): Adjust caller. 2023-10-05 Martin Jambor Revert: 2023-10-03 Martin Jambor PR ipa/108007 * cgraph.h (cgraph_edge): Add a parameter to redirect_call_stmt_to_callee. * ipa-param-manipulation.h (ipa_param_adjustments): Add a parameter to modify_call. * cgraph.cc (cgraph_edge::redirect_call_stmt_to_callee): New parameter killed_ssas, pass it to padjs->modify_call. * ipa-param-manipulation.cc (purge_transitive_uses): New function. (ipa_param_adjustments::modify_call): New parameter killed_ssas. Instead of substituting uses, invoke purge_transitive_uses. If hash of killed SSAs has not been provided, create a temporary one and release SSAs that have been added to it. * tree-inline.cc (redirect_all_calls): Create id->killed_new_ssa_names earlier, pass it to edge redirection, adjust a comment. (copy_body): Release SSAs in id->killed_new_ssa_names. 2023-10-05 Juzhe-Zhong * config/riscv/autovec.md (@vec_series): Remove @. (vec_series): Ditto. * config/riscv/riscv-v.cc (expand_const_vector): Ditto. (shuffle_decompress_patterns): Ditto. 2023-10-05 Claudiu Zissulescu * config/arc/arc-passes.def: Remove arc_ifcvt pass. * config/arc/arc-protos.h (arc_ccfsm_branch_deleted_p): Remove. (arc_ccfsm_record_branch_deleted): Likewise. (arc_ccfsm_cond_exec_p): Likewise. (arc_ccfsm): Likewise. (arc_ccfsm_record_condition): Likewise. (make_pass_arc_ifcvt): Likewise. * config/arc/arc.cc (arc_ccfsm): Remove. (arc_ccfsm_current): Likewise. (ARC_CCFSM_BRANCH_DELETED_P): Likewise. (ARC_CCFSM_RECORD_BRANCH_DELETED): Likewise. (ARC_CCFSM_COND_EXEC_P): Likewise. (CCFSM_ISCOMPACT): Likewise. (CCFSM_DBR_ISCOMPACT): Likewise. (machine_function): Remove ccfsm related fields. (arc_ifcvt): Remove pass. (arc_print_operand): Remove `#` punct operand and other ccfsm related code. (arc_ccfsm_advance): Remove. (arc_ccfsm_at_label): Likewise. (arc_ccfsm_record_condition): Likewise. (arc_ccfsm_post_advance): Likewise. (arc_ccfsm_branch_deleted_p): Likewise. (arc_ccfsm_record_branch_deleted): Likewise. (arc_ccfsm_cond_exec_p): Likewise. (arc_get_ccfsm_cond): Likewise. (arc_final_prescan_insn): Remove ccfsm references. (arc_internal_label): Likewise. (arc_reorg): Likewise. (arc_output_libcall): Likewise. * config/arc/arc.md: Remove ccfsm references and update related instruction patterns. 2023-10-05 Claudiu Zissulescu * config/arc/arc.cc (arc_init): Remove '^' punct char. (arc_print_operand): Remove related code. * config/arc/arc.md: Update patterns which uses '%&'. 2023-10-05 Claudiu Zissulescu * config/arc/arc-protos.h (arc_clear_unalign): Remove. (arc_toggle_unalign): Likewise. * config/arc/arc.cc (machine_function) Remove unalign. (arc_init): Remove `&` punct character. (arc_print_operand): Remove `&` related functions. (arc_verify_short): Update function's number of parameters. (output_short_suffix): Update function. (arc_short_long): Likewise. (arc_clear_unalign): Remove. (arc_toggle_unalign): Likewise. * config/arc/arc.h (ASM_OUTPUT_CASE_END): Remove. (ASM_OUTPUT_ALIGN): Update. * config/arc/arc.md: Remove all `%&` references. * config/arc/arc.opt (mannotate-align): Ignore option. * doc/invoke.texi (mannotate-align): Update description. 2023-10-05 Richard Biener * tree-vect-slp.cc (vect_build_slp_tree_1): Do not ask for internal_fn_p (CFN_LAST). 2023-10-05 Richard Biener * tree-ssa-sccvn.cc (rpo_elim::eliminate_avail): Not visited value numbers are available itself. 2023-10-05 Richard Biener PR ipa/111643 * doc/extend.texi (attribute flatten): Clarify. 2023-10-04 Roger Sayle * config/arc/arc-protos.h (emit_shift): Delete prototype. (arc_pre_reload_split): New function prototype. * config/arc/arc.cc (emit_shift): Delete function. (arc_pre_reload_split): New predicate function, copied from i386, to schedule define_insn_and_split splitters to the split1 pass. * config/arc/arc.md (ashlsi3): Expand RTL template unconditionally. (ashrsi3): Likewise. (lshrsi3): Likewise. (shift_si3): Move after other shift patterns, and disable when operands[2] is one (which is handled by its own define_insn). Use shiftr4_operator, instead of shift4_operator, as this is no longer used for left shifts. (shift_si3_loop): Likewise. Additionally remove match_scratch. (*ashlsi3_nobs): New pre-reload define_insn_and_split. (*ashrsi3_nobs): Likewise. (*lshrsi3_nobs): Likewise. (rotrsi3_cnt1): Rename define_insn from *rotrsi3_cnt1. (add_shift): Rename define_insn from *add_shift. * config/arc/predicates.md (shiftl4_operator): Delete. (shift4_operator): Delete. 2023-10-04 Roger Sayle * config/arc/arc.md (ashlsi3_cnt1): Rename define_insn *ashlsi2_cnt1. Change type attribute to "unary", as this doesn't have operands[2]. Change length attribute to "*,4" to allow compact representation. (lshrsi3_cnt1): Rename define_insn from *lshrsi3_cnt1. Change insn type attribute to "unary", as this doesn't have operands[2]. (ashrsi3_cnt1): Rename define_insn from *ashrsi3_cnt1. Change insn type attribute to "unary", as this doesn't have operands[2]. 2023-10-04 Roger Sayle PR rtl-optimization/110701 * combine.cc (record_dead_and_set_regs_1): Split comment into pieces placed before the relevant clauses. When the SET_DEST is a partial_subreg_p, mark the bits outside of the updated portion of the destination as undefined. 2023-10-04 Kito Cheng PR bootstrap/111664 * opt-read.awk: Drop multidimensional arrays. * opth-gen.awk: Ditto. 2023-10-04 Xi Ruoyao * config/loongarch/loongarch.md (UNSPEC_FCOPYSIGN): Delete. (copysign3): Use copysign RTL instead of UNSPEC. 2023-10-04 Jakub Jelinek PR middle-end/111369 * match.pd (x == cstN ? cst4 : cst3): Use build_nonstandard_integer_type only if type1 is BOOLEAN_TYPE. Fix comment typo. Formatting fix. (a?~t:t -> (-(a))^t): Always convert to type rather than using build_nonstandard_integer_type. Perform negation only if type has precision > 1 and is not signed BOOLEAN_TYPE. 2023-10-04 Jakub Jelinek PR tree-optimization/111668 * match.pd (a ? CST1 : CST2): Handle the a ? -1 : 0 and a ? 0 : -1 cases before the powerof2cst cases and differentiate between 1-bit precision types, larger precision boolean types and other integral types. Fix comment pastos and formatting. 2023-10-03 Andrew MacLeod * tree-ssanames.cc (set_range_info): Use get_ptr_info for pointers rather than range_info_get_range. 2023-10-03 Martin Jambor * ipa-modref.h (modref_summary::dump): Make const. * ipa-modref.cc (modref_summary::dump): Likewise. (dump_lto_records): Dump to out instead of dump_file. 2023-10-03 Martin Jambor PR ipa/110378 * ipa-param-manipulation.cc (ipa_param_body_adjustments::mark_dead_statements): Verify that any return uses of PARAM will be removed. (ipa_param_body_adjustments::mark_clobbers_dead): Likewise. * ipa-sra.cc (isra_param_desc): New fields remove_only_when_retval_removed and split_only_when_retval_removed. (struct gensum_param_desc): Likewise. Fix comment long line. (ipa_sra_function_summaries::duplicate): Copy the new flags. (dump_gensum_param_descriptor): Dump the new flags. (dump_isra_param_descriptor): Likewise. (isra_track_scalar_value_uses): New parameter desc. Set its flag remove_only_when_retval_removed when encountering a simple return. (isra_track_scalar_param_local_uses): Replace parameter call_uses_p with desc. Pass it to isra_track_scalar_value_uses and set its call_uses. (ptr_parm_has_nonarg_uses): Accept parameter descriptor as a parameter. If there is a direct return use, mark any.. (create_parameter_descriptors): Pass the whole parameter descriptor to isra_track_scalar_param_local_uses and ptr_parm_has_nonarg_uses. (process_scan_results): Copy the new flags. (isra_write_node_summary): Stream the new flags. (isra_read_node_info): Likewise. (adjust_parameter_descriptions): Check that transformations requring return removal only happen when return value is removed. Restructure main loop. Adjust dump message. 2023-10-03 Martin Jambor PR ipa/108007 * cgraph.h (cgraph_edge): Add a parameter to redirect_call_stmt_to_callee. * ipa-param-manipulation.h (ipa_param_adjustments): Add a parameter to modify_call. * cgraph.cc (cgraph_edge::redirect_call_stmt_to_callee): New parameter killed_ssas, pass it to padjs->modify_call. * ipa-param-manipulation.cc (purge_transitive_uses): New function. (ipa_param_adjustments::modify_call): New parameter killed_ssas. Instead of substituting uses, invoke purge_transitive_uses. If hash of killed SSAs has not been provided, create a temporary one and release SSAs that have been added to it. * tree-inline.cc (redirect_all_calls): Create id->killed_new_ssa_names earlier, pass it to edge redirection, adjust a comment. (copy_body): Release SSAs in id->killed_new_ssa_names. 2023-10-03 Andrew MacLeod * passes.def (pass_vrp): Pass "final pass" flag as parameter. * tree-vrp.cc (vrp_pass_num): Remove. (pass_vrp::my_pass): Remove. (pass_vrp::pass_vrp): Add warn_p as a parameter. (pass_vrp::final_p): New. (pass_vrp::set_pass_param): Set final_p param. (pass_vrp::execute): Call execute_range_vrp with no conditions. (make_pass_vrp): Pass additional parameter. (make_pass_early_vrp): Ditto. 2023-10-03 Andrew MacLeod * tree-ssanames.cc (set_range_info): Return true only if the current value changes. 2023-10-03 David Malcolm * diagnostic.cc (diagnostic_set_info_translated): Update for "m_" prefixes to text_info fields. (diagnostic_report_diagnostic): Likewise. (verbatim): Use text_info ctor. (simple_diagnostic_path::add_event): Likewise. (simple_diagnostic_path::add_thread_event): Likewise. * dumpfile.cc (dump_pretty_printer::decode_format): Update for "m_" prefixes to text_info fields. (dump_context::dump_printf_va): Use text_info ctor. * graphviz.cc (graphviz_out::graphviz_out): Use text_info ctor. (graphviz_out::print): Likewise. * opt-problem.cc (opt_problem::opt_problem): Likewise. * pretty-print.cc (pp_format): Update for "m_" prefixes to text_info fields. (pp_printf): Use text_info ctor. (pp_verbatim): Likewise. (assert_pp_format_va): Likewise. * pretty-print.h (struct text_info): Add ctors. Add "m_" prefix to all fields. * text-art/styled-string.cc (styled_string::from_fmt_va): Use text_info ctor. * tree-diagnostic.cc (default_tree_printer): Update for "m_" prefixes to text_info fields. * tree-pretty-print.h (pp_ti_abstract_origin): Likewise. 2023-10-03 Roger Sayle * config/arc/arc.md (CC_ltu): New mode iterator for CC and CC_C. (scc_ltu_): New define_insn to handle LTU form of scc_insn. (*scc_insn): Don't split to a conditional move sequence for LTU. 2023-10-03 Andrea Corallo * config/aarch64/aarch64.md (@ccmp) (@ccmp_rev, *call_insn, *call_value_insn) (*mov_aarch64, load_pair_sw_) (load_pair_dw_) (store_pair_sw_) (store_pair_dw_, *extendsidi2_aarch64) (*zero_extendsidi2_aarch64, *load_pair_zero_extendsidi2_aarch64) (*extend2_aarch64) (*zero_extend2_aarch64) (*extendqihi2_aarch64, *zero_extendqihi2_aarch64) (*add3_aarch64, *addsi3_aarch64_uxtw, *add3_poly_1) (add3_compare0, *addsi3_compare0_uxtw) (*add3_compareC_cconly, add3_compareC) (*add3_compareV_cconly_imm, add3_compareV_imm) (*add3nr_compare0, subdi3, subv_imm) (*cmpv_insn, sub3_compare1_imm, neg2) (cmp, fcmp, fcmpe, *cmov_insn) (*cmovsi_insn_uxtw, 3, *si3_uxtw) (*and3_compare0, *andsi3_compare0_uxtw, one_cmpl2) (*_one_cmpl3, *and3nr_compare0) (*aarch64_ashl_sisd_or_int_3) (*aarch64_lshr_sisd_or_int_3) (*aarch64_ashr_sisd_or_int_3, *ror3_insn) (*si3_insn_uxtw, _trunc2) (2) (3) (3) (*aarch64_3_cssc, copysign3_insn): Update to new syntax. * config/aarch64/aarch64-sve2.md (@aarch64_scatter_stnt) (@aarch64_scatter_stnt_) (*aarch64_mul_unpredicated_) (@aarch64_pred_, *cond__2) (*cond__3, *cond__any) (*cond__z, @aarch64_pred_) (*cond__2, *cond__3) (*cond__any, @aarch64_sve_) (@aarch64_sve__lane_) (@aarch64_sve_add_mul_lane_) (@aarch64_sve_sub_mul_lane_, @aarch64_sve2_xar) (*aarch64_sve2_bcax, @aarch64_sve2_eor3) (*aarch64_sve2_nor, *aarch64_sve2_nand) (*aarch64_sve2_bsl, *aarch64_sve2_nbsl) (*aarch64_sve2_bsl1n, *aarch64_sve2_bsl2n) (*aarch64_sve2_sra, @aarch64_sve_add_) (*aarch64_sve2_aba, @aarch64_sve_add_) (@aarch64_sve_add__lane_) (@aarch64_sve_qadd_) (@aarch64_sve_qadd__lane_) (@aarch64_sve_sub_) (@aarch64_sve_sub__lane_) (@aarch64_sve_qsub_) (@aarch64_sve_qsub__lane_) (@aarch64_sve_, @aarch64__lane_) (@aarch64_pred_) (@aarch64_pred_, *cond__2) (*cond__z, @aarch64_sve_) (@aarch64__lane_, @aarch64_sve_) (@aarch64__lane_, @aarch64_pred_) (*cond__any_relaxed) (*cond__any_strict) (@aarch64_pred_, *cond_) (@aarch64_pred_, *cond_) (*cond__strict): Update to new syntax. * config/aarch64/aarch64-sve.md (*aarch64_sve_mov_ldr_str) (*aarch64_sve_mov_no_ldr_str, @aarch64_pred_mov) (*aarch64_sve_mov, aarch64_wrffr) (mask_scatter_store) (*mask_scatter_store_xtw_unpacked) (*mask_scatter_store_sxtw) (*mask_scatter_store_uxtw) (@aarch64_scatter_store_trunc) (@aarch64_scatter_store_trunc) (*aarch64_scatter_store_trunc_sxtw) (*aarch64_scatter_store_trunc_uxtw) (*vec_duplicate_reg, vec_shl_insert_) (vec_series, @extract__) (@aarch64_pred_, *cond__2) (*cond__any, @aarch64_pred_) (@aarch64_sve_revbhw_) (@cond_) (*2) (@aarch64_pred_sxt) (@aarch64_cond_sxt) (*cond_uxt_2, *cond_uxt_any, *cnot) (*cond_cnot_2, *cond_cnot_any) (@aarch64_pred_, *cond__2_relaxed) (*cond__2_strict, *cond__any_relaxed) (*cond__any_strict, @aarch64_pred_) (*cond__2, *cond__3) (*cond__any, add3, sub3) (@aarch64_pred_abd, *aarch64_cond_abd_2) (*aarch64_cond_abd_3, *aarch64_cond_abd_any) (@aarch64_sve_, @aarch64_pred_) (*cond__2, *cond__z) (@aarch64_pred_, *cond__2) (*cond__3, *cond__any, 3) (*cond_bic_2, *cond_bic_any) (@aarch64_pred_, *cond__2_const) (*cond__any_const, *cond__m) (*cond__z, *sdiv_pow23) (*cond__2, *cond__any) (@aarch64_pred_, *cond__2_relaxed) (*cond__2_strict, *cond__any_relaxed) (*cond__any_strict, @aarch64_pred_) (*cond__2_relaxed, *cond__2_strict) (*cond__2_const_relaxed) (*cond__2_const_strict) (*cond__3_relaxed, *cond__3_strict) (*cond__any_relaxed, *cond__any_strict) (*cond__any_const_relaxed) (*cond__any_const_strict) (@aarch64_pred_, *cond_add_2_const_relaxed) (*cond_add_2_const_strict) (*cond_add_any_const_relaxed) (*cond_add_any_const_strict, @aarch64_pred_) (*cond__2_relaxed, *cond__2_strict) (*cond__any_relaxed, *cond__any_strict) (@aarch64_pred_, *cond_sub_3_const_relaxed) (*cond_sub_3_const_strict, *cond_sub_const_relaxed) (*cond_sub_const_strict, *aarch64_pred_abd_relaxed) (*aarch64_pred_abd_strict) (*aarch64_cond_abd_2_relaxed) (*aarch64_cond_abd_2_strict) (*aarch64_cond_abd_3_relaxed) (*aarch64_cond_abd_3_strict) (*aarch64_cond_abd_any_relaxed) (*aarch64_cond_abd_any_strict, @aarch64_pred_) (@aarch64_pred_fma, *cond_fma_2, *cond_fma_4) (*cond_fma_any, @aarch64_pred_fnma) (*cond_fnma_2, *cond_fnma_4, *cond_fnma_any) (dot_prod, @aarch64_dot_prod_lane) (@dot_prod, @aarch64_dot_prod_lane) (@aarch64_sve_add_, @aarch64_pred_) (*cond__2_relaxed, *cond__2_strict) (*cond__4_relaxed, *cond__4_strict) (*cond__any_relaxed, *cond__any_strict) (@aarch64__lane_, @aarch64_pred_) (*cond__4_relaxed, *cond__4_strict) (*cond__any_relaxed, *cond__any_strict) (@aarch64__lane_, @aarch64_sve_tmad) (@aarch64_sve_vnx4sf) (@aarch64_sve__lanevnx4sf) (@aarch64_sve_, *vcond_mask_) (@aarch64_sel_dup, @aarch64_pred_cmp) (*cmp_cc, *cmp_ptest) (@aarch64_pred_fcm, @fold_extract__) (@aarch64_fold_extract_vector__) (@aarch64_sve_splice) (@aarch64_sve__nontrunc) (@aarch64_sve__trunc) (*cond__nontrunc_relaxed) (*cond__nontrunc_strict) (*cond__trunc) (@aarch64_sve__nonextend) (@aarch64_sve__extend) (*cond__nonextend_relaxed) (*cond__nonextend_strict) (*cond__extend) (@aarch64_sve__trunc) (*cond__trunc) (@aarch64_sve__trunc) (*cond__trunc) (@aarch64_sve__nontrunc) (*cond__nontrunc) (@aarch64_brk, *aarch64_sve__cntp): Update to new syntax. * config/aarch64/aarch64-simd.md (aarch64_simd_dup) (load_pair) (vec_store_pair, aarch64_simd_stp) (aarch64_simd_mov_from_low) (aarch64_simd_mov_from_high, and3) (ior3, aarch64_simd_ashr) (aarch64_simd_bsl_internal) (*aarch64_simd_bsl_alt) (aarch64_simd_bsldi_internal, aarch64_simd_bsldi_alt) (store_pair_lanes, *aarch64_combine_internal) (*aarch64_combine_internal_be, *aarch64_combinez) (*aarch64_combinez_be) (aarch64_cm, *aarch64_cmdi) (aarch64_cm, *aarch64_mov) (*aarch64_be_mov, *aarch64_be_movoi): Update to new syntax. 2023-10-03 Andrea Corallo * gensupport.cc (convert_syntax): Skip spaces before "cons:" in new compact pattern syntax. 2023-10-03 Richard Sandiford * gensupport.cc (convert_syntax): Updated to support unordered constraints in compact syntax. 2023-10-02 Michael Meissner * config/rs6000/rs6000.md (UNSPEC_COPYSIGN): Delete. (copysign3_fcpsg): Use copysign RTL instead of UNSPEC. (copysign3_hard): Likewise. (copysign3_soft): Likewise. * config/rs6000/vector.md (vector_copysign3): Use copysign RTL instead of UNSPEC. * config/rs6000/vsx.md (vsx_copysign3): Use copysign RTL instead of UNSPEC. 2023-10-02 David Malcolm * diagnostic-format-json.cc (toplevel_array): Remove global in favor of json_output_format::m_top_level_array. (cur_group): Likewise, for json_output_format::m_cur_group. (cur_children_array): Likewise, for json_output_format::m_cur_children_array. (class json_output_format): New. (json_begin_diagnostic): Remove, in favor of json_output_format::on_begin_diagnostic. (json_end_diagnostic): Convert to... (json_output_format::on_end_diagnostic): ...this. (json_begin_group): Remove, in favor of json_output_format::on_begin_group. (json_end_group): Remove, in favor of json_output_format::on_end_group. (json_flush_to_file): Remove, in favor of json_output_format::flush_to_file. (json_stderr_final_cb): Remove, in favor of json_output_format dtor. (json_output_base_file_name): Remove global. (class json_stderr_output_format): New. (json_file_final_cb): Remove. (class json_file_output_format): New. (json_emit_diagram): Remove. (diagnostic_output_format_init_json): Update. (diagnostic_output_format_init_json_file): Update. * diagnostic-format-sarif.cc (the_builder): Remove this global, moving to a field of the sarif_output_format. (sarif_builder::maybe_make_artifact_content_object): Use the context's m_file_cache. (get_source_lines): Convert to... (sarif_builder::get_source_lines): ...this, using context's m_file_cache. (sarif_begin_diagnostic): Remove, in favor of sarif_output_format::on_begin_diagnostic. (sarif_end_diagnostic): Remove, in favor of sarif_output_format::on_end_diagnostic. (sarif_begin_group): Remove, in favor of sarif_output_format::on_begin_group. (sarif_end_group): Remove, in favor of sarif_output_format::on_end_group. (sarif_flush_to_file): Delete. (sarif_stderr_final_cb): Delete. (sarif_output_base_file_name): Delete. (sarif_file_final_cb): Delete. (class sarif_output_format): New. (sarif_emit_diagram): Delete. (class sarif_stream_output_format): New. (class sarif_file_output_format): New. (diagnostic_output_format_init_sarif): Update. (diagnostic_output_format_init_sarif_stderr): Update. (diagnostic_output_format_init_sarif_file): Update. (diagnostic_output_format_init_sarif_stream): Update. * diagnostic-show-locus.cc (diagnostic_show_locus): Update. * diagnostic.cc (default_diagnostic_final_cb): Delete, moving to diagnostic_text_output_format's dtor. (diagnostic_initialize): Update, making a new instance of diagnostic_text_output_format. (diagnostic_finish): Delete m_output_format, rather than calling final_cb. (diagnostic_report_diagnostic): Assert that m_output_format is non-NULL. Replace call to begin_group_cb with call to m_output_format->on_begin_group. Replace call to diagnostic_starter with call to m_output_format->on_begin_diagnostic. Replace call to diagnostic_finalizer with call to m_output_format->on_end_diagnostic. (diagnostic_emit_diagram): Replace both optional call to m_diagrams.m_emission_cb and default implementation with call to m_output_format->on_diagram. Move default implementation to diagnostic_text_output_format::on_diagram. (auto_diagnostic_group::~auto_diagnostic_group): Replace call to end_group_cb with call to m_output_format->on_end_group. (diagnostic_text_output_format::~diagnostic_text_output_format): New, based on default_diagnostic_final_cb. (diagnostic_text_output_format::on_begin_diagnostic): New, based on code from diagnostic_report_diagnostic. (diagnostic_text_output_format::on_end_diagnostic): Likewise. (diagnostic_text_output_format::on_diagram): New, based on code from diagnostic_emit_diagram. * diagnostic.h (class diagnostic_output_format): New. (class diagnostic_text_output_format): New. (diagnostic_context::begin_diagnostic): Move to... (diagnostic_context::m_text_callbacks::begin_diagnostic): ...here. (diagnostic_context::start_span): Move to... (diagnostic_context::m_text_callbacks::start_span): ...here. (diagnostic_context::end_diagnostic): Move to... (diagnostic_context::m_text_callbacks::end_diagnostic): ...here. (diagnostic_context::begin_group_cb): Remove, in favor of m_output_format->on_begin_group. (diagnostic_context::end_group_cb): Remove, in favor of m_output_format->on_end_group. (diagnostic_context::final_cb): Remove, in favor of m_output_format's dtor. (diagnostic_context::m_output_format): New field. (diagnostic_context::m_diagrams.m_emission_cb): Remove, in favor of m_output_format->on_diagram. (diagnostic_starter): Update. (diagnostic_finalizer): Update. (diagnostic_output_format_init_sarif_stream): New. * input.cc (location_get_source_line): Move implementation apart from call to diagnostic_file_cache_init to... (file_cache::get_source_line): ...this new function... (location_get_source_line): ...and reintroduce, rewritten in terms of file_cache::get_source_line. (get_source_file_content): Likewise, refactor into... (file_cache::get_source_file_content): ...this new function. * input.h (file_cache::get_source_line): New decl. (file_cache::get_source_file_content): New decl. * selftest-diagnostic.cc (test_diagnostic_context::test_diagnostic_context): Update. * tree-diagnostic-path.cc (event_range::print): Update for change to diagnostic_context's start_span callback. 2023-10-02 David Malcolm * diagnostic-show-locus.cc: Update for reorganization of source-printing fields of diagnostic_context. * diagnostic.cc (diagnostic_set_caret_max_width): Likewise. (diagnostic_initialize): Likewise. * diagnostic.h (diagnostic_context::show_caret): Move to... (diagnostic_context::m_source_printing::enabled): ...here. (diagnostic_context::caret_max_width): Move to... (diagnostic_context::m_source_printing::max_width): ...here. (diagnostic_context::caret_chars): Move to... (diagnostic_context::m_source_printing::caret_chars): ...here. (diagnostic_context::colorize_source_p): Move to... (diagnostic_context::m_source_printing::colorize_source_p): ...here. (diagnostic_context::show_labels_p): Move to... (diagnostic_context::m_source_printing::show_labels_p): ...here. (diagnostic_context::show_line_numbers_p): Move to... (diagnostic_context::m_source_printing::show_line_numbers_p): ...here. (diagnostic_context::min_margin_width): Move to... (diagnostic_context::m_source_printing::min_margin_width): ...here. (diagnostic_context::show_ruler_p): Move to... (diagnostic_context::m_source_printing::show_ruler_p): ...here. (diagnostic_same_line): Update for above changes. * opts.cc (common_handle_option): Update for reorganization of source-printing fields of diagnostic_context. * selftest-diagnostic.cc (test_diagnostic_context::test_diagnostic_context): Likewise. * toplev.cc (general_init): Likewise. * tree-diagnostic-path.cc (struct event_range): Likewise. 2023-10-02 David Malcolm * diagnostic.cc (diagnostic_initialize): Initialize set_locations_cb to nullptr. 2023-10-02 Wilco Dijkstra PR target/111235 * config/arm/constraints.md: Remove Pf constraint. * config/arm/sync.md (arm_atomic_load): Add new pattern. (arm_atomic_load_acquire): Likewise. (arm_atomic_store): Likewise. (arm_atomic_store_release): Likewise. (atomic_load): Switch patterns to define_expand. (atomic_store): Likewise. (arm_atomic_loaddi2_ldrd): Remove predication. (arm_load_exclusive): Likewise. (arm_load_acquire_exclusive): Likewise. (arm_load_exclusivesi): Likewise. (arm_load_acquire_exclusivesi): Likewise. (arm_load_exclusivedi): Likewise. (arm_load_acquire_exclusivedi): Likewise. (arm_store_exclusive): Likewise. (arm_store_release_exclusivedi): Likewise. (arm_store_release_exclusive): Likewise. * config/arm/unspecs.md: Add VUNSPEC_LDR and VUNSPEC_STR. 2023-10-02 Tamar Christina Revert: 2023-10-02 Tamar Christina PR tree-optimization/109154 * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. (cmp_arg_entry): New. (predicate_scalar_phi): Use it. 2023-10-02 Tamar Christina * config/aarch64/aarch64-simd.md (xorsign3): Renamed to.. (@xorsign3): ...This. * config/aarch64/aarch64.md (xorsign3): Renamed to... (@xorsign3): ..This and emit vectors directly * config/aarch64/iterators.md (VCONQ): Add SF and DF. 2023-10-02 Tamar Christina * emit-rtl.cc (validate_subreg): Relax subreg rule. 2023-10-02 Tamar Christina PR tree-optimization/109154 * tree-if-conv.cc (INCLUDE_ALGORITHM): Remove. (cmp_arg_entry): New. (predicate_scalar_phi): Use it. 2023-10-02 Richard Sandiford PR bootstrap/111642 * rtl-tests.cc (const_poly_int_tests::run): Use a local poly_int64 typedef. * simplify-rtx.cc (simplify_const_poly_int_tests::run): Likewise. 2023-10-02 Joern Rennecke Juzhe-Zhong * config/riscv/riscv-protos.h (riscv_vector::expand_block_move): Declare. * config/riscv/riscv-v.cc (riscv_vector::expand_block_move): New function. * config/riscv/riscv.md (cpymemsi): Use riscv_vector::expand_block_move. Change to .. (cpymem) .. this. 2023-10-01 Stefan Schulze Frielinghaus * combine.cc (simplify_compare_const): Properly handle unsigned constants while narrowing comparison of memory and constants. 2023-10-01 Feng Wang * config/riscv/riscv-opts.h (MASK_ZICSR): Delete. (MASK_ZIFENCEI): Delete; (MASK_ZIHINTNTL): Ditto. (MASK_ZIHINTPAUSE): Ditto. (TARGET_ZICSR): Ditto. (TARGET_ZIFENCEI): Ditto. (TARGET_ZIHINTNTL): Ditto. (TARGET_ZIHINTPAUSE): Ditto. (MASK_ZAWRS): Ditto. (TARGET_ZAWRS): Ditto. (MASK_ZBA): Ditto. (MASK_ZBB): Ditto. (MASK_ZBC): Ditto. (MASK_ZBS): Ditto. (TARGET_ZBA): Ditto. (TARGET_ZBB): Ditto. (TARGET_ZBC): Ditto. (TARGET_ZBS): Ditto. (MASK_ZFINX): Ditto. (MASK_ZDINX): Ditto. (MASK_ZHINX): Ditto. (MASK_ZHINXMIN): Ditto. (TARGET_ZFINX): Ditto. (TARGET_ZDINX): Ditto. (TARGET_ZHINX): Ditto. (TARGET_ZHINXMIN): Ditto. (MASK_ZBKB): Ditto. (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. (MASK_ZTSO): Ditto. (TARGET_ZTSO): Ditto. (MASK_VECTOR_ELEN_32): Ditto. (MASK_VECTOR_ELEN_64): Ditto. (MASK_VECTOR_ELEN_FP_32): Ditto. (MASK_VECTOR_ELEN_FP_64): Ditto. (MASK_VECTOR_ELEN_FP_16): Ditto. (TARGET_VECTOR_ELEN_32): Ditto. (TARGET_VECTOR_ELEN_64): Ditto. (TARGET_VECTOR_ELEN_FP_32): Ditto. (TARGET_VECTOR_ELEN_FP_64): Ditto. (TARGET_VECTOR_ELEN_FP_16): Ditto. (MASK_ZVBB): Ditto. (MASK_ZVBC): Ditto. (TARGET_ZVBB): Ditto. (TARGET_ZVBC): Ditto. (MASK_ZVKG): Ditto. (MASK_ZVKNED): Ditto. (MASK_ZVKNHA): Ditto. (MASK_ZVKNHB): Ditto. (MASK_ZVKSED): Ditto. (MASK_ZVKSH): Ditto. (MASK_ZVKN): Ditto. (MASK_ZVKNC): Ditto. (MASK_ZVKNG): Ditto. (MASK_ZVKS): Ditto. (MASK_ZVKSC): Ditto. (MASK_ZVKSG): Ditto. (MASK_ZVKT): Ditto. (TARGET_ZVKG): Ditto. (TARGET_ZVKNED): Ditto. (TARGET_ZVKNHA): Ditto. (TARGET_ZVKNHB): Ditto. (TARGET_ZVKSED): Ditto. (TARGET_ZVKSH): Ditto. (TARGET_ZVKN): Ditto. (TARGET_ZVKNC): Ditto. (TARGET_ZVKNG): Ditto. (TARGET_ZVKS): Ditto. (TARGET_ZVKSC): Ditto. (TARGET_ZVKSG): Ditto. (TARGET_ZVKT): Ditto. (MASK_ZVL32B): Ditto. (MASK_ZVL64B): Ditto. (MASK_ZVL128B): Ditto. (MASK_ZVL256B): Ditto. (MASK_ZVL512B): Ditto. (MASK_ZVL1024B): Ditto. (MASK_ZVL2048B): Ditto. (MASK_ZVL4096B): Ditto. (MASK_ZVL8192B): Ditto. (MASK_ZVL16384B): Ditto. (MASK_ZVL32768B): Ditto. (MASK_ZVL65536B): Ditto. (TARGET_ZVL32B): Ditto. (TARGET_ZVL64B): Ditto. (TARGET_ZVL128B): Ditto. (TARGET_ZVL256B): Ditto. (TARGET_ZVL512B): Ditto. (TARGET_ZVL1024B): Ditto. (TARGET_ZVL2048B): Ditto. (TARGET_ZVL4096B): Ditto. (TARGET_ZVL8192B): Ditto. (TARGET_ZVL16384B): Ditto. (TARGET_ZVL32768B): Ditto. (TARGET_ZVL65536B): Ditto. (MASK_ZICBOZ): Ditto. (MASK_ZICBOM): Ditto. (MASK_ZICBOP): Ditto. (TARGET_ZICBOZ): Ditto. (TARGET_ZICBOM): Ditto. (TARGET_ZICBOP): Ditto. (MASK_ZICOND): Ditto. (TARGET_ZICOND): Ditto. (MASK_ZFA): Ditto. (TARGET_ZFA): Ditto. (MASK_ZFHMIN): Ditto. (MASK_ZFH): Ditto. (MASK_ZVFHMIN): Ditto. (MASK_ZVFH): Ditto. (TARGET_ZFHMIN): Ditto. (TARGET_ZFH): Ditto. (TARGET_ZVFHMIN): Ditto. (TARGET_ZVFH): Ditto. (MASK_ZMMUL): Ditto. (TARGET_ZMMUL): Ditto. (MASK_ZCA): Ditto. (MASK_ZCB): Ditto. (MASK_ZCE): Ditto. (MASK_ZCF): Ditto. (MASK_ZCD): Ditto. (MASK_ZCMP): Ditto. (MASK_ZCMT): Ditto. (TARGET_ZCA): Ditto. (TARGET_ZCB): Ditto. (TARGET_ZCE): Ditto. (TARGET_ZCF): Ditto. (TARGET_ZCD): Ditto. (TARGET_ZCMP): Ditto. (TARGET_ZCMT): Ditto. (MASK_SVINVAL): Ditto. (MASK_SVNAPOT): Ditto. (TARGET_SVINVAL): Ditto. (TARGET_SVNAPOT): Ditto. (MASK_XTHEADBA): Ditto. (MASK_XTHEADBB): Ditto. (MASK_XTHEADBS): Ditto. (MASK_XTHEADCMO): Ditto. (MASK_XTHEADCONDMOV): Ditto. (MASK_XTHEADFMEMIDX): Ditto. (MASK_XTHEADFMV): Ditto. (MASK_XTHEADINT): Ditto. (MASK_XTHEADMAC): Ditto. (MASK_XTHEADMEMIDX): Ditto. (MASK_XTHEADMEMPAIR): Ditto. (MASK_XTHEADSYNC): Ditto. (TARGET_XTHEADBA): Ditto. (TARGET_XTHEADBB): Ditto. (TARGET_XTHEADBS): Ditto. (TARGET_XTHEADCMO): Ditto. (TARGET_XTHEADCONDMOV): Ditto. (TARGET_XTHEADFMEMIDX): Ditto. (TARGET_XTHEADFMV): Ditto. (TARGET_XTHEADINT): Ditto. (TARGET_XTHEADMAC): Ditto. (TARGET_XTHEADMEMIDX): Ditto. (TARGET_XTHEADMEMPAIR): Ditto. (TARGET_XTHEADSYNC): Ditto. (MASK_XVENTANACONDOPS): Ditto. (TARGET_XVENTANACONDOPS): Ditto. * config/riscv/riscv.opt: Add new Mask defination. * doc/options.texi: Add explanation for this new usage. * opt-functions.awk: Add new function to find the index of target variable from extra_target_vars. * opt-read.awk: Add new function to store the Mask flags. * opth-gen.awk: Add new function to output the defination of Mask Macro and Target Macro. 2023-10-01 Joern Rennecke Juzhe-Zhong Juzhe-Zhong PR target/111566 * config/riscv/riscv-protos.h (riscv_vector::legitimize_move): Change second parameter to rtx *. * config/riscv/riscv-v.cc (risv_vector::legitimize_move): Likewise. * config/riscv/vector.md: Changed callers of riscv_vector::legitimize_move. (*mov_mem_to_mem): Remove. 2023-09-30 Jakub Jelinek PR target/111649 * config/riscv/riscv-vsetvl.cc (vector_infos_manager::vector_infos_manager): Replace safe_grow with safe_grow_cleared. 2023-09-30 Jakub Jelinek * gimple-match-head.cc (gimple_bitwise_inverted_equal_p): Fix a pasto in function comment. 2023-09-30 Jakub Jelinek PR middle-end/111625 PR middle-end/111637 * gimple-lower-bitint.cc (range_to_prec): Use prec or -prec if r.undefined_p (). (bitint_large_huge::handle_operand_addr): For uninitialized operands use limb_prec or -limb_prec precision. 2023-09-30 Jakub Jelinek * vec.h (quick_grow): Uncomment static_assert. 2023-09-30 Jivan Hakobyan * config/riscv/bitmanip.md (*_not_const): Added type attribute 2023-09-29 Xiao Zeng * config/riscv/riscv.cc (riscv_rtx_costs): Better handle costing SETs when the outer code is INSN. 2023-09-29 Jivan Hakobyan * config/riscv/bitmanip.md (*_not_const): New split pattern. 2023-09-29 Richard Sandiford * poly-int.h (poly_int_pod): Delete. (poly_coeff_traits::init_cast): New type. (poly_int_full, poly_int_hungry, poly_int_fullness): New structures. (poly_int): Replace constructors that take 1 and 2 coefficients with a general one that takes an arbitrary number of coefficients. Delegate initialization to two new private constructors, one of which uses the coefficients as-is and one of which adds an extra zero of the appropriate type (and precision, where applicable). (gt_ggc_mx, gt_pch_nx): Operate on poly_ints rather than poly_int_pods. * poly-int-types.h (poly_uint16_pod, poly_int64_pod, poly_uint64_pod) (poly_offset_int_pod, poly_wide_int_pod, poly_widest_int_pod): Delete. * gengtype.cc (main): Don't register poly_int64_pod. * calls.cc (initialize_argument_information): Use poly_int rather than poly_int_pod. (combine_pending_stack_adjustment_and_call): Likewise. * config/aarch64/aarch64.cc (pure_scalable_type_info): Likewise. * data-streamer.h (bp_unpack_poly_value): Likewise. * dwarf2cfi.cc (struct dw_trace_info): Likewise. (struct queued_reg_save): Likewise. * dwarf2out.h (struct dw_cfa_location): Likewise. * emit-rtl.h (struct incoming_args): Likewise. (struct rtl_data): Likewise. * expr.cc (get_bit_range): Likewise. (get_inner_reference): Likewise. * expr.h (get_bit_range): Likewise. * fold-const.cc (split_address_to_core_and_offset): Likewise. (ptr_difference_const): Likewise. * fold-const.h (ptr_difference_const): Likewise. * function.cc (try_fit_stack_local): Likewise. (instantiate_new_reg): Likewise. * function.h (struct expr_status): Likewise. (struct args_size): Likewise. * genmodes.cc (ZERO_COEFFS): Likewise. (mode_size_inline): Likewise. (mode_nunits_inline): Likewise. (emit_mode_precision): Likewise. (emit_mode_size): Likewise. (emit_mode_nunits): Likewise. * gimple-fold.cc (get_base_constructor): Likewise. * gimple-ssa-store-merging.cc (struct symbolic_number): Likewise. * inchash.h (class hash): Likewise. * ipa-modref-tree.cc (modref_access_node::dump): Likewise. * ipa-modref.cc (modref_access_analysis::merge_call_side_effects): Likewise. * ira-int.h (ira_spilled_reg_stack_slot): Likewise. * lra-eliminations.cc (self_elim_offsets): Likewise. * machmode.h (mode_size, mode_precision, mode_nunits): Likewise. * omp-low.cc (omplow_simd_context): Likewise. * pretty-print.cc (pp_wide_integer): Likewise. * pretty-print.h (pp_wide_integer): Likewise. * reload.cc (struct decomposition): Likewise. * reload.h (struct reload): Likewise. * reload1.cc (spill_stack_slot_width): Likewise. (struct elim_table): Likewise. (offsets_at): Likewise. (init_eliminable_invariants): Likewise. * rtl.h (union rtunion): Likewise. (poly_int_rtx_p): Likewise. (strip_offset): Likewise. (strip_offset_and_add): Likewise. * rtlanal.cc (strip_offset): Likewise. * tree-dfa.cc (get_ref_base_and_extent): Likewise. (get_addr_base_and_unit_offset_1): Likewise. (get_addr_base_and_unit_offset): Likewise. * tree-dfa.h (get_ref_base_and_extent): Likewise. (get_addr_base_and_unit_offset_1): Likewise. (get_addr_base_and_unit_offset): Likewise. * tree-ssa-loop-ivopts.cc (struct iv_use): Likewise. (strip_offset): Likewise. * tree-ssa-sccvn.h (struct vn_reference_op_struct): Likewise. * tree.cc (ptrdiff_tree_p): Likewise. * tree.h (poly_int_tree_p): Likewise. (ptrdiff_tree_p): Likewise. (get_inner_reference): Likewise. 2023-09-29 John David Anglin * config/pa/pa.md (memory_barrier): Revise comment. (memory_barrier_64, memory_barrier_32): Use ldcw,co on PA 2.0. * config/pa/pa.opt (coherent-ldcw): Change default to disabled. 2023-09-29 Jakub Jelinek * vec.h (quick_insert, ordered_remove, unordered_remove, block_remove, qsort, sort, stablesort, quick_grow): Guard std::is_trivially_{copyable,default_constructible} and vec_detail::is_trivially_copyable_or_pair static assertions with GCC_VERSION >= 5000. (vec_detail::is_trivially_copyable_or_pair): Guard definition with GCC_VERSION >= 5000. 2023-09-29 Manos Anagnostakis * config/aarch64/aarch64-opts.h (enum aarch64_ldp_policy): Removed. (enum aarch64_ldp_stp_policy): Merged enums aarch64_ldp_policy and aarch64_stp_policy to aarch64_ldp_stp_policy. (enum aarch64_stp_policy): Removed. * config/aarch64/aarch64-protos.h (struct tune_params): Removed aarch64_ldp_policy_model and aarch64_stp_policy_model enum types and left only the definitions to the aarch64-opts one. * config/aarch64/aarch64.cc (aarch64_parse_ldp_policy): Removed. (aarch64_parse_stp_policy): Removed. (aarch64_override_options_internal): Removed calls to parsing functions and added obvious direct assignments. (aarch64_mem_ok_with_ldpstp_policy_model): Improved code quality based on the new changes. * config/aarch64/aarch64.opt: Use single enum type aarch64_ldp_stp_policy for both ldp and stp options. 2023-09-29 Richard Biener PR tree-optimization/111583 * tree-loop-distribution.cc (find_single_drs): Ensure the load/store are always executed. 2023-09-29 Jakub Jelinek * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Use quick_grow_cleared method on unprom rather than quick_grow. 2023-09-29 Sergei Trofimovich PR middle-end/111505 * ggc-common.cc (ggc_zero_out_root_pointers, ggc_common_finalize): Add new helper. Use helper instead of memset() to wipe out pointers. 2023-09-29 Richard Sandiford * builtins.h (c_readstr): Take a fixed_size_mode rather than a scalar_int_mode. * builtins.cc (c_readstr): Likewise. Build a local array of bytes and use native_decode_rtx to get the rtx image. (builtin_memcpy_read_str): Simplify accordingly. (builtin_strncpy_read_str): Likewise. (builtin_memset_read_str): Likewise. (builtin_memset_gen_str): Likewise. * expr.cc (string_cst_read_str): Likewise. 2023-09-29 Jakub Jelinek * tree-ssa-loop-im.cc (tree_ssa_lim_initialize): Use quick_grow_cleared instead of quick_grow on vec members. * cfganal.cc (control_dependences::control_dependences): Likewise. * rtl-ssa/blocks.cc (function_info::build_info::build_info): Likewise. (function_info::place_phis): Use safe_grow_cleared instead of safe_grow on auto_vec vars. * tree-ssa-live.cc (compute_live_vars): Use quick_grow_cleared instead of quick_grow on vec var. 2023-09-28 Vladimir N. Makarov Revert: 2023-09-14 Vladimir N. Makarov * ira-costs.cc (find_costs_and_classes): Decrease memory cost by equiv savings. 2023-09-28 Wilco Dijkstra PR target/111121 * config/aarch64/aarch64.md (aarch64_movmemdi): Add new expander. (movmemdi): Call aarch64_expand_cpymem_mops for correct expansion. * config/aarch64/aarch64.cc (aarch64_expand_cpymem_mops): Add support for memmove. * config/aarch64/aarch64-protos.h (aarch64_expand_cpymem_mops): Add new function. 2023-09-28 Pan Li PR target/111506 * config/riscv/autovec.md (2): New pattern. * config/riscv/vector-iterators.md: New iterator. 2023-09-28 Vladimir N. Makarov * rtl.h (lra_in_progress): Change type to bool. (ira_in_progress): Add new extern. * ira.cc (ira_in_progress): New global. (pass_ira::execute): Set up ira_in_progress. * lra.cc: (lra_in_progress): Change type to bool and initialize. (lra): Use bool values for lra_in_progress. * lra-eliminations.cc (init_elim_table): Ditto. 2023-09-28 Richard Biener PR target/111600 * gimple-ssa-warn-access.cc (pass_waccess::check_dangling_stores): Use a heap allocated worklist for CFG traversal instead of recursion. 2023-09-28 Jakub Jelinek Jonathan Wakely * vec.h: Mention in file comment limited support for non-POD types in some operations. (vec_destruct): New function template. (release): Use it for non-trivially destructible T. (truncate): Likewise. (quick_push): Perform a placement new into slot instead of assignment. (pop): For non-trivially destructible T return void rather than T & and destruct the popped element. (quick_insert, ordered_remove): Note that they aren't suitable for non-trivially copyable types. Add static_asserts for that. (block_remove): Assert T is trivially copyable. (vec_detail::is_trivially_copyable_or_pair): New trait. (qsort, sort, stablesort): Assert T is trivially copyable or std::pair with both trivally copyable types. (quick_grow): Add assert T is trivially default constructible, for now commented out. (quick_grow_cleared): Don't call quick_grow, instead inline it by hand except for the new static_assert. (gt_ggc_mx): Assert T is trivially destructable. (auto_vec::operator=): Formatting fixes. (auto_vec::auto_vec): Likewise. (vec_safe_grow_cleared): Don't call vec_safe_grow, instead inline it manually and call quick_grow_cleared method rather than quick_grow. (safe_grow_cleared): Likewise. * edit-context.cc (class line_event): Move definition earlier. * tree-ssa-loop-im.cc (seq_entry::seq_entry): Make default ctor defaulted. * ipa-fnsummary.cc (evaluate_properties_for_edge): Use safe_grow_cleared instead of safe_grow followed by placement new constructing the elements. 2023-09-28 Richard Sandiford * dwarf2out.cc (mem_loc_descriptor): Remove unused variables. * tree-affine.cc (expr_to_aff_combination): Likewise. 2023-09-28 Richard Biener PR tree-optimization/111614 * tree-ssa-reassoc.cc (undistribute_bitref_for_vector): Properly convert the first vector when required. 2023-09-28 xuli PR target/111533 * config/riscv/riscv-v.cc (expand_const_vector): Fix bug. * config/riscv/riscv-vsetvl.cc (anticipatable_occurrence_p): Fix bug. 2023-09-27 Sandra Loosemore * gimple.cc (gimple_copy): Add case GIMPLE_OMP_STRUCTURED_BLOCK. 2023-09-27 Iain Sandoe PR target/111610 * configure: Regenerate. * configure.ac: Rename the missing dsymutil case to "DET_UNKNOWN". 2023-09-27 Manos Anagnostakis Philipp Tomsich Manolis Tsamis * config/aarch64/aarch64-opts.h (enum aarch64_ldp_policy): New enum type. (enum aarch64_stp_policy): New enum type. * config/aarch64/aarch64-protos.h (struct tune_params): Add appropriate enums for the policies. (aarch64_mem_ok_with_ldpstp_policy_model): New declaration. * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Remove superseded tuning options. * config/aarch64/aarch64.cc (aarch64_parse_ldp_policy): New function to parse ldp-policy parameter. (aarch64_parse_stp_policy): New function to parse stp-policy parameter. (aarch64_override_options_internal): Call parsing functions. (aarch64_mem_ok_with_ldpstp_policy_model): New function. (aarch64_operands_ok_for_ldpstp): Add call to aarch64_mem_ok_with_ldpstp_policy_model for parameter-value check and alignment check and remove superseded ones. (aarch64_operands_adjust_ok_for_ldpstp): Add call to aarch64_mem_ok_with_ldpstp_policy_model for parameter-value check and alignment check and remove superseded ones. * config/aarch64/aarch64.opt (aarch64-ldp-policy): New param. (aarch64-stp-policy): New param. * doc/invoke.texi: Document the parameters accordingly. 2023-09-27 Andre Vieira * tree-data-ref.cc (include calls.h): Add new include. (get_references_in_stmt): Correctly handle IFN_MASK_CALL. 2023-09-27 Richard Biener * match.pd (abs (copysign (x, y)) -> abs (x)): New pattern. 2023-09-27 Jakub Jelinek PR c++/105606 * system.h (BROKEN_VALUE_INITIALIZATION): Don't define. * vec.h (vec_default_construct): Remove BROKEN_VALUE_INITIALIZATION workaround. * function.cc (assign_parm_find_data_types): Likewise. 2023-09-27 Pan Li * config/riscv/autovec.md (roundeven2): New pattern. * config/riscv/riscv-protos.h (enum insn_flags): New enum type. (enum insn_type): Ditto. (expand_vec_roundeven): New func decl. * config/riscv/riscv-v.cc (expand_vec_roundeven): New func impl. 2023-09-27 Juzhe-Zhong PR target/111590 * dse.cc (find_shift_sequence): Check the mode with access_size exist on the target. 2023-09-27 Juzhe-Zhong * tree-if-conv.cc (is_cond_scalar_reduction): Fix comments. 2023-09-27 Pan Li * config/riscv/autovec.md (btrunc2): New pattern. * config/riscv/riscv-protos.h (expand_vec_trunc): New func decl. * config/riscv/riscv-v.cc (emit_vec_cvt_x_f_rtz): New func impl. (expand_vec_trunc): Ditto. 2023-09-26 Hans-Peter Nilsson PR target/107567 PR target/109166 * builtins.cc (expand_builtin) : Handle failure from expand_builtin_atomic_test_and_set. * optabs.cc (expand_atomic_test_and_set): When all attempts fail to generate atomic code through target support, return NULL instead of emitting non-atomic code. Also, for code handling targetm.atomic_test_and_set_trueval != 1, gcc_assert result from calling emit_store_flag_force instead of returning NULL. 2023-09-26 Andrew MacLeod PR tree-optimization/111599 * value-relation.cc (relation_oracle::valid_equivs): Ensure ssa_name is valid. 2023-09-26 Andrew Pinski PR tree-optimization/106164 PR tree-optimization/111456 * match.pd (`(A ==/!= B) & (A CMP C)`): Support an optional cast on the second A. (`(A ==/!= B) | (A CMP C)`): Likewise. 2023-09-26 Andrew Pinski PR tree-optimization/111469 * tree-ssa-phiopt.cc (minmax_replacement): Fix the assumption for the `non-diamond` handling cases of diamond code. 2023-09-26 Juzhe-Zhong * match.pd: Optimize COND_ADD reduction pattern. 2023-09-26 Juzhe-Zhong PR tree-optimization/111594 PR tree-optimization/110660 * match.pd: Optimize COND_LEN_ADD reduction. 2023-09-26 Pan Li * config/riscv/autovec.md (round2): New pattern. * config/riscv/riscv-protos.h (enum insn_flags): New enum type. (enum insn_type): Ditto. (expand_vec_round): New function decl. * config/riscv/riscv-v.cc (expand_vec_round): New function impl. 2023-09-26 Iain Sandoe * config/darwin.h (DARWIN_CC1_SPEC): Remove -dynamiclib. 2023-09-26 Tobias Burnus PR middle-end/111547 * doc/invoke.texi (-fopenmp): Mention C++11 [[omp::decl(...)]] syntax. (-fopenmp-simd): Likewise. Clarify 'loop' directive semantic. 2023-09-26 Pan Li * config/riscv/autovec.md (rint2): New pattern. * config/riscv/riscv-protos.h (expand_vec_rint): New function decl. * config/riscv/riscv-v.cc (expand_vec_rint): New function impl. 2023-09-26 Pan Li * config/riscv/autovec.md (nearbyint2): New pattern. * config/riscv/riscv-protos.h (enum insn_type): New enum. (expand_vec_nearbyint): New function decl. * config/riscv/riscv-v.cc (expand_vec_nearbyint): New func impl. 2023-09-26 Pan Li * config/riscv/riscv-v.cc (gen_ceil_const_fp): Remove. (get_fp_rounding_coefficient): Rename. (gen_floor_const_fp): Remove. (expand_vec_ceil): Take renamed func. (expand_vec_floor): Ditto. 2023-09-25 Vladimir N. Makarov PR middle-end/111497 * lra-constraints.cc (lra_constraints): Copy substituted equivalence. * lra.cc (lra): Change comment for calling unshare_all_rtl_again. 2023-09-25 Eric Botcazou * gimple-range-gori.cc (gori_compute::logical_combine): Add missing return statement in the varying case. 2023-09-25 Xi Ruoyao * doc/invoke.texi: Update -m[no-]explicit-relocs for r14-4160. 2023-09-25 Andrew Pinski PR tree-optimization/110386 * gimple-ssa-backprop.cc (strip_sign_op_1): Remove ABSU_EXPR. 2023-09-25 Juzhe-Zhong PR target/111548 * config/riscv/riscv-vsetvl.cc (earliest_pred_can_be_fused_p): Bugfix 2023-09-25 Kewen Lin PR target/111366 * config/rs6000/rs6000.cc (rs6000_update_ipa_fn_target_info): Skip empty inline asm. 2023-09-25 Kewen Lin PR target/111380 * config/rs6000/rs6000.cc (rs6000_can_inline_p): Adopt target_option_default_node when the callee has no option attributes, also simplify the existing code accordingly. 2023-09-25 Guo Jie * config/loongarch/lasx.md (lasx_vecinit_merge_): New pattern for vector construction. (vec_set_internal): Ditto. (lasx_xvinsgr2vr__internal): Ditto. (lasx_xvilvl__internal): Ditto. * config/loongarch/loongarch.cc (loongarch_expand_vector_init): Optimized the implementation of vector construction. (loongarch_expand_vector_init_same): New function. * config/loongarch/lsx.md (lsx_vilvl__internal): New pattern for vector construction. (lsx_vreplvei_mirror_): New pattern for vector construction. (vec_concatv2df): Ditto. (vec_concatv4sf): Ditto. 2023-09-24 Pan Li PR target/111546 * config/riscv/riscv-v.cc (expand_vector_init_merge_repeating_sequence): Bugfix 2023-09-24 Andrew Pinski PR tree-optimization/111543 * match.pd (`(X & ~Y) & Y`, `(X | ~Y) | Y`): New patterns. 2023-09-24 Juzhe-Zhong * config/riscv/autovec-opt.md: Extend VLS modes * config/riscv/vector-iterators.md: Ditto. 2023-09-23 Juzhe-Zhong * config/riscv/autovec-opt.md: Add VLS modes for conditional ABS/SQRT. 2023-09-23 Pan Li * config/riscv/autovec.md (floor2): New pattern. * config/riscv/riscv-protos.h (enum insn_flags): New enum type. (enum insn_type): Ditto. (expand_vec_floor): New function decl. * config/riscv/riscv-v.cc (gen_floor_const_fp): New function impl. (expand_vec_floor): Ditto. 2023-09-22 Pan Li * config/riscv/riscv-v.cc (expand_vec_float_cmp_mask): Refactor. (emit_vec_float_cmp_mask): Rename. (expand_vec_copysign): Ditto. (emit_vec_copysign): Ditto. (emit_vec_abs): New function impl. (emit_vec_cvt_x_f): Ditto. (emit_vec_cvt_f_x): Ditto. (expand_vec_ceil): Ditto. 2023-09-22 Juzhe-Zhong * config/riscv/vector-iterators.md: Extend VLS modes. 2023-09-22 Juzhe-Zhong * config/riscv/riscv-v.cc (gen_const_vector_dup): Use global expand function. * config/riscv/vector.md (@vec_duplicate): Remove @. (vec_duplicate): Ditto. 2023-09-22 Juzhe-Zhong * config/riscv/autovec.md: Add VLS conditional patterns. * config/riscv/riscv-protos.h (expand_cond_unop): Ditto. (expand_cond_binop): Ditto. (expand_cond_ternop): Ditto. * config/riscv/riscv-v.cc (expand_cond_unop): Ditto. (expand_cond_binop): Ditto. (expand_cond_ternop): Ditto. 2023-09-22 xuli PR target/111451 * config/riscv/riscv-v.cc (emit_vlmax_gather_insn): Optimization of vrgather.vv into vrgatherei16.vv. 2023-09-22 Lehua Ding * config/riscv/autovec-opt.md (*cond_widen_reduc_plus_scal_): New combine patterns. * config/riscv/riscv-protos.h (enum insn_type): New insn_type. 2023-09-22 Lehua Ding * config/riscv/riscv-protos.h (enum avl_type): New VLS avl_type. * config/riscv/riscv-v.cc (autovec_use_vlmax_p): Move comments. 2023-09-22 Pan Li * config/riscv/autovec.md (ceil2): New pattern. * config/riscv/riscv-protos.h (enum insn_flags): New enum type. (enum insn_type): Ditto. (expand_vec_ceil): New function decl. * config/riscv/riscv-v.cc (gen_ceil_const_fp): New function impl. (expand_vec_float_cmp_mask): Ditto. (expand_vec_copysign): Ditto. (expand_vec_ceil): Ditto. * config/riscv/vector.md: Add VLS mode support. 2023-09-21 Juzhe-Zhong * config/riscv/autovec.md: Extend VLS modes. 2023-09-21 Juzhe-Zhong * config/riscv/vector-iterators.md: Extend VLS modes. 2023-09-21 Lehua Ding Robin Dapp * config/riscv/riscv-v.cc (emit_vlmax_insn): Adjust comments. (emit_nonvlmax_insn): Adjust comments. (emit_vlmax_insn_lra): Adjust comments. 2023-09-21 Iain Buclaw * config.gcc (*linux*): Set rust target_objs, and target_has_targetrustm, * config/t-linux (linux-rust.o): New rule. * config/linux-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (i[34567]86-*-mingw* | x86_64-*-mingw*): Set rust_target_objs and target_has_targetrustm. * config/t-winnt (winnt-rust.o): New rule. * config/winnt-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-fuchsia): Set tmake_rule, rust_target_objs, and target_has_targetrustm. * config/fuchsia-rust.cc: New file. * config/t-fuchsia: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-vxworks*): Set rust_target_objs and target_has_targetrustm. * config/t-vxworks (vxworks-rust.o): New rule. * config/vxworks-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-dragonfly*): Set rust_target_objs and target_has_targetrustm. * config/t-dragonfly (dragonfly-rust.o): New rule. * config/dragonfly-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-solaris2*): Set rust_target_objs and target_has_targetrustm. * config/t-sol2 (sol2-rust.o): New rule. * config/sol2-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-openbsd*): Set rust_target_objs and target_has_targetrustm. * config/t-openbsd (openbsd-rust.o): New rule. * config/openbsd-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-netbsd*): Set rust_target_objs and target_has_targetrustm. * config/t-netbsd (netbsd-rust.o): New rule. * config/netbsd-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-freebsd*): Set rust_target_objs and target_has_targetrustm. * config/t-freebsd (freebsd-rust.o): New rule. * config/freebsd-rust.cc: New file. 2023-09-21 Iain Buclaw * config.gcc (*-*-darwin*): Set rust_target_objs and target_has_targetrustm. * config/t-darwin (darwin-rust.o): New rule. * config/darwin-rust.cc: New file. 2023-09-21 Iain Buclaw * config/i386/t-i386 (i386-rust.o): New rule. * config/i386/i386-rust.cc: New file. * config/i386/i386-rust.h: New file. 2023-09-21 Iain Buclaw * doc/tm.texi: Regenerate. * doc/tm.texi.in: Document TARGET_RUST_OS_INFO. 2023-09-21 Iain Buclaw * doc/tm.texi: Regenerate. * doc/tm.texi.in: Add @node for Rust language and ABI, and document TARGET_RUST_CPU_INFO. 2023-09-21 Iain Buclaw * Makefile.in (tm_rust_file_list, tm_rust_include_list, TM_RUST_H, RUST_TARGET_DEF, RUST_TARGET_H, RUST_TARGET_OBJS): New variables. (tm_rust.h, cs-tm_rust.h, default-rust.o, rust/rust-target-hooks-def.h, s-rust-target-hooks-def-h): New rules. (s-tm-texi): Also check timestamp on rust-target.def. (generated_files): Add TM_RUST_H and rust-target-hooks-def.h. (build/genhooks.o): Also depend on RUST_TARGET_DEF. * config.gcc (tm_rust_file, rust_target_objs, target_has_targetrustm): New variables. * configure: Regenerate. * configure.ac (tm_rust_file_list, tm_rust_include_list, rust_target_objs): Add substitutes. * doc/tm.texi: Regenerate. * doc/tm.texi.in (targetrustm): Document. (target_has_targetrustm): Document. * genhooks.cc: Include rust/rust-target.def. * config/default-rust.cc: New file. 2023-09-21 Juzhe-Zhong PR target/110751 * config/riscv/autovec.md: Enable scratch rtx in ELSE operand. * config/riscv/predicates.md (autovec_else_operand): New predicate. * config/riscv/riscv-v.cc (get_else_operand): New function. (expand_cond_len_unop): Adapt ELSE value. (expand_cond_len_binop): Ditto. (expand_cond_len_ternop): Ditto. * config/riscv/riscv.cc (riscv_preferred_else_value): New function. (TARGET_PREFERRED_ELSE_VALUE): New targethook. 2023-09-21 Juzhe-Zhong PR target/111486 * config/riscv/riscv.cc (riscv_legitimize_move): Fix bug. 2023-09-21 Jiufu Guo PR tree-optimization/111355 * match.pd ((X + C) / N): Update pattern. 2023-09-21 Jiufu Guo * match.pd ((t * 2) / 2): Update to use overflow_free_p. 2023-09-21 xuli PR target/111450 * config/riscv/constraints.md (c01): const_int 1. (c02): const_int 2. (c04): const_int 4. (c08): const_int 8. * config/riscv/predicates.md (vector_eew8_stride_operand): New predicate for stride operand. (vector_eew16_stride_operand): Ditto. (vector_eew32_stride_operand): Ditto. (vector_eew64_stride_operand): Ditto. * config/riscv/vector-iterators.md: New iterator for stride operand. * config/riscv/vector.md: Add stride = element width constraint. 2023-09-21 Lehua Ding * config/riscv/predicates.md (const_1_or_2_operand): Rename. (const_1_or_4_operand): Ditto. (vector_gs_scale_operand_16): Ditto. (vector_gs_scale_operand_32): Ditto. * config/riscv/vector-iterators.md: Adjust. 2023-09-21 Juzhe-Zhong * config/riscv/autovec.md: Extend VLS modes. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. 2023-09-20 Andrew MacLeod * gimple-range-cache.cc (ssa_cache::merge_range): Change meaning of the return value. (ssa_cache::dump): Don't print GLOBAL RANGE header. (ssa_lazy_cache::merge_range): Adjust return value meaning. (ranger_cache::dump): Print GLOBAL RANGE header. 2023-09-20 Aldy Hernandez * range-op-float.cc (foperator_unordered_ge::fold_range): Remove special casing. (foperator_unordered_gt::fold_range): Same. (foperator_unordered_lt::fold_range): Same. (foperator_unordered_le::fold_range): Same. 2023-09-20 Jakub Jelinek * builtins.h (type_to_class): Declare. * builtins.cc (type_to_class): No longer static. Return int rather than enum. * doc/extend.texi (__builtin_classify_type): Document. 2023-09-20 Juzhe-Zhong PR target/110751 * internal-fn.cc (expand_fn_using_insn): Support undefined rtx value. * optabs.cc (maybe_legitimize_operand): Ditto. (can_reuse_operands_p): Ditto. * optabs.h (enum expand_operand_type): Ditto. (create_undefined_input_operand): Ditto. 2023-09-20 Tobias Burnus * gimplify.cc (gimplify_bind_expr): Call GOMP_alloc/free for 'omp allocate' variables; move stack cleanup after other cleanup. (omp_notice_variable): Process original decl when decl of the value-expression for a 'omp allocate' variable is passed. * omp-low.cc (scan_omp_1_op): Handle 'omp allocate' variables 2023-09-20 Yanzhang Wang * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): support simplifying vector int not only scalar int. 2023-09-20 Juzhe-Zhong * config/riscv/vector-iterators.md: Extend VLS floating-point. 2023-09-20 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vector_insn_info::operator==): Fix bug. 2023-09-20 Iain Sandoe * config/darwin.h: (SUBTARGET_DRIVER_SELF_SPECS): Move handling of 'shared' into the same specs as 'dynamiclib'. (STARTFILE_SPEC): Handle 'shared'. 2023-09-20 Richard Biener PR tree-optimization/111489 * params.opt (-param uninit-max-chain-len=): Raise default to 8. 2023-09-20 Richard Biener PR tree-optimization/111489 * doc/invoke.texi (--param uninit-max-chain-len): Document. (--param uninit-max-num-chains): Likewise. * params.opt (-param=uninit-max-chain-len=): New. (-param=uninit-max-num-chains=): Likewise. * gimple-predicate-analysis.cc (MAX_NUM_CHAINS): Define to param_uninit_max_num_chains. (MAX_CHAIN_LEN): Define to param_uninit_max_chain_len. (uninit_analysis::init_use_preds): Avoid VLA. (uninit_analysis::init_from_phi_def): Likewise. (compute_control_dep_chain): Avoid using MAX_CHAIN_LEN in template parameter. 2023-09-20 Jakub Jelinek * match.pd ((x << c) >> c): Use MAX_FIXED_MODE_SIZE instead of GET_MODE_PRECISION of TImode or DImode depending on whether TImode is supported scalar mode. * gimple-lower-bitint.cc (bitint_precision_kind): Likewise. * expr.cc (expand_expr_real_1): Likewise. * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_stmt): Likewise. * ubsan.cc (ubsan_encode_value, ubsan_type_descriptor): Likewise. 2023-09-20 Lehua Ding * config/riscv/autovec-opt.md (*not): Move and rename. (*n): Ditto. (*vtrunc): Ditto. (*trunc): Ditto. (*narrow_): Ditto. (*narrow__scalar): Ditto. (*single_widen_mult): Ditto. (*single_widen_mul): Ditto. (*single_widen_mult): Ditto. (*single_widen_mul): Ditto. (*dual_widen_fma): Ditto. (*dual_widen_fma): Ditto. (*single_widen_fma): Ditto. (*single_widen_fma): Ditto. (*dual_fma): Ditto. (*single_fma): Ditto. (*dual_fnma): Ditto. (*dual_widen_fnma): Ditto. (*single_fnma): Ditto. (*single_widen_fnma): Ditto. (*dual_fms): Ditto. (*dual_widen_fms): Ditto. (*single_fms): Ditto. (*single_widen_fms): Ditto. (*dual_fnms): Ditto. (*dual_widen_fnms): Ditto. (*single_fnms): Ditto. (*single_widen_fnms): Ditto. 2023-09-20 Jakub Jelinek PR c++/111392 * attribs.cc (decl_attributes): Don't warn on omp::directive attribute on vars or function decls if -fopenmp or -fopenmp-simd. 2023-09-20 Lehua Ding PR target/111488 * config/riscv/autovec-opt.md: Add missed operand. 2023-09-20 Omar Sandoval PR debug/111409 * dwarf2out.cc (output_macinfo): Don't call optimize_macinfo_range if dwarf_split_debug_info. 2023-09-20 Juzhe-Zhong * config/riscv/riscv-v.cc (can_find_related_mode_p): New function. (vectorize_related_mode): Add VLS related modes. * config/riscv/vector-iterators.md: Extend VLS modes. 2023-09-20 Surya Kumari Jangala PR rtl-optimization/110071 * ira-color.cc (improve_allocation): Consider cost of callee save registers. 2023-09-20 mengqinggang Xi Ruoyao * configure: Regenerate. * configure.ac: Checking assembler for -mno-relax support. Disable relaxation when probing leb128 support. 2023-09-20 Lulu Cheng * config.in: Regenerate. * config/loongarch/genopts/loongarch.opt.in: Add compilation option mrelax. And set the initial value of explicit-relocs according to the detection status. * config/loongarch/gnu-user.h: When compiling with -mno-relax, pass the --no-relax option to the linker. * config/loongarch/loongarch-driver.h (ASM_SPEC): When compiling with -mno-relax, pass the -mno-relax option to the assembler. * config/loongarch/loongarch-opts.h (HAVE_AS_MRELAX_OPTION): Define macro. * config/loongarch/loongarch.opt: Regenerate. * configure: Regenerate. * configure.ac: Add detection of support for binutils relax function. 2023-09-19 Ben Boeckel * doc/invoke.texi: Document -fdeps-format=, -fdeps-file=, and -fdeps-target= flags. * gcc.cc: add defaults for -fdeps-target= and -fdeps-file= when only -fdeps-format= is specified. * json.h: Add a TODO item to refactor out to share with `libcpp/mkdeps.cc`. 2023-09-19 Ben Boeckel Jason Merrill * gcc.cc (join_spec_func): Add a spec function to join all arguments. 2023-09-19 Patrick O'Neill * config/riscv/riscv.cc (riscv_legitimize_const_move): Eliminate src_op_0 var to avoid rtl check error. 2023-09-19 Aldy Hernandez * range-op-float.cc (frelop_early_resolve): Clean-up and remove special casing. (operator_not_equal::fold_range): Handle VREL_EQ. (operator_lt::fold_range): Remove special casing for VREL_EQ. (operator_gt::fold_range): Same. (foperator_unordered_equal::fold_range): Same. 2023-09-19 Javier Martinez * doc/extend.texi: Document attributes hot, cold on C++ types. 2023-09-19 Pat Haugen * config/rs6000/rs6000.cc (rs6000_rtx_costs): Check whether the modulo instruction is disabled. * config/rs6000/rs6000.h (RS6000_DISABLE_SCALAR_MODULO): New. * config/rs6000/rs6000.md (mod3, *mod3): Check it. (define_expand umod3): New. (define_insn umod3): Rename to *umod3 and check if the modulo instruction is disabled. (umodti3, modti3): Check if the modulo instruction is disabled. 2023-09-19 Gaius Mulley * doc/gm2.texi (fdebug-builtins): Correct description. 2023-09-19 Jeff Law * config/iq2000/predicates.md (uns_arith_constant): New predicate. * config/iq2000/iq2000.md (rotrsi3): Use it. 2023-09-19 Aldy Hernandez * range-op-float.cc (operator_lt::op1_range): Remove known_isnan check. (operator_lt::op2_range): Same. (operator_le::op1_range): Same. (operator_le::op2_range): Same. (operator_gt::op1_range): Same. (operator_gt::op2_range): Same. (operator_ge::op1_range): Same. (operator_ge::op2_range): Same. (foperator_unordered_lt::op1_range): Same. (foperator_unordered_lt::op2_range): Same. (foperator_unordered_le::op1_range): Same. (foperator_unordered_le::op2_range): Same. (foperator_unordered_gt::op1_range): Same. (foperator_unordered_gt::op2_range): Same. (foperator_unordered_ge::op1_range): Same. (foperator_unordered_ge::op2_range): Same. 2023-09-19 Aldy Hernandez * value-range.h (frange::update_nan): New. 2023-09-19 Aldy Hernandez * range-op-float.cc (operator_not_equal::op2_range): New. * range-op-mixed.h: Add operator_not_equal::op2_range. 2023-09-19 Andrew MacLeod PR tree-optimization/110080 PR tree-optimization/110249 * tree-vrp.cc (remove_unreachable::final_p): New. (remove_unreachable::maybe_register): Rename from maybe_register_block and call early or final routine. (fully_replaceable): New. (remove_unreachable::handle_early): New. (remove_unreachable::remove_and_update_globals): Remove non-final processing. (rvrp_folder::rvrp_folder): Add final flag to constructor. (rvrp_folder::post_fold_bb): Remove unreachable registration. (rvrp_folder::pre_fold_stmt): Move unreachable processing to here. (execute_ranger_vrp): Adjust some call parameters. 2023-09-19 Richard Biener PR c/111468 * tree-pretty-print.h (op_symbol_code): Add defaulted flags argument. * tree-pretty-print.cc (op_symbol): Likewise. (op_symbol_code): Print TDF_GIMPLE variant if requested. * gimple-pretty-print.cc (dump_binary_rhs): Pass flags to op_symbol_code. (dump_gimple_cond): Likewise. 2023-09-19 Thomas Schwinge Pan Li * tree-streamer.h (bp_unpack_machine_mode): If 'ib->file_data->mode_table' not available, apply 1-to-1 mapping. 2023-09-19 Juzhe-Zhong * config/riscv/riscv.cc (riscv_can_change_mode_class): Block unordered VLA and VLS modes. 2023-09-19 Juzhe-Zhong * config/riscv/autovec.md: Extend VLS modes. * config/riscv/vector.md: Ditto. 2023-09-19 Richard Biener PR tree-optimization/111465 * tree-ssa-threadupdate.cc (fwd_jt_path_registry::thread_block_1): Cancel the path when a EDGE_NO_COPY_SRC_BLOCK became non-empty. 2023-09-19 Juzhe-Zhong * config/riscv/autovec.md: Extend VLS floating-point modes. * config/riscv/vector.md: Ditto. 2023-09-19 Jakub Jelinek * match.pd ((x << c) >> c): Don't call build_nonstandard_integer_type nor check type_has_mode_precision_p for width larger than [TD]Imode precision. (a ? CST1 : CST2): Don't use build_nonstandard_type, just convert to type. Use boolean_true_node instead of constant_boolean_node (true, boolean_type_node). Formatting fixes. 2023-09-19 Juzhe-Zhong * config/riscv/autovec.md: Add VLS modes. * config/riscv/vector.md: Ditto. 2023-09-19 Jakub Jelinek * tree.cc (build_bitint_type): Assert precision is not 0, or for signed types 1. (signed_or_unsigned_type_for): Return INTEGER_TYPE for signed variant of unsigned _BitInt(1). 2023-09-19 Lehua Ding * config/riscv/autovec-opt.md (*_fma): Removed old combine patterns. (*single_mult_plus): Ditto. (*double_mult_plus): Ditto. (*sign_zero_extend_fma): Ditto. (*zero_sign_extend_fma): Ditto. (*double_widen_fma): Ditto. (*single_widen_fma): Ditto. (*double_widen_fnma): Ditto. (*single_widen_fnma): Ditto. (*double_widen_fms): Ditto. (*single_widen_fms): Ditto. (*double_widen_fnms): Ditto. (*single_widen_fnms): Ditto. (*reduc_plus_scal_): Adjust name. (*widen_reduc_plus_scal_): Adjust name. (*dual_widen_fma): New combine pattern. (*dual_widen_fmasu): Ditto. (*dual_widen_fmaus): Ditto. (*dual_fma): Ditto. (*single_fma): Ditto. (*dual_fnma): Ditto. (*single_fnma): Ditto. (*dual_fms): Ditto. (*single_fms): Ditto. (*dual_fnms): Ditto. (*single_fnms): Ditto. * config/riscv/autovec.md (fma4): Reafctor fma pattern. (*fma): Removed. (fnma4): Reafctor. (*fnma): Removed. (*fma): Removed. (*fnma): Removed. (fms4): Reafctor. (*fms): Removed. (fnms4): Reafctor. (*fnms): Removed. * config/riscv/riscv-protos.h (prepare_ternary_operands): Adjust prototype. * config/riscv/riscv-v.cc (prepare_ternary_operands): Refactor. * config/riscv/vector.md (*pred_mul_plus_undef): New pattern. (*pred_mul_plus): Removed. (*pred_mul_plus_scalar): Removed. (*pred_mul_plus_extended_scalar): Removed. (*pred_minus_mul_undef): New pattern. (*pred_minus_mul): Removed. (*pred_minus_mul_scalar): Removed. (*pred_minus_mul_extended_scalar): Removed. (*pred_mul__undef): New pattern. (*pred_mul_): Removed. (*pred_mul__scalar): Removed. (*pred_mul_neg__undef): New pattern. (*pred_mul_neg_): Removed. (*pred_mul_neg__scalar): Removed. 2023-09-19 Tsukasa OI * config/riscv/riscv-vector-builtins.cc (builtin_decl, expand_builtin): Replace SVE with RVV. 2023-09-19 Tsukasa OI * config/riscv/t-riscv: Add dependencies for riscv-builtins.cc, riscv-cmo.def and riscv-scalar-crypto.def. 2023-09-18 Pan Li * config/riscv/autovec.md: Extend to vls mode. 2023-09-18 Pan Li * config/riscv/autovec.md: Bugfix. * config/riscv/riscv-protos.h (SCALAR_MOVE_MERGED_OP): New enum. 2023-09-18 Andrew Pinski PR tree-optimization/111442 * match.pd (zero_one_valued_p): Have the bit_and match not be recursive. 2023-09-18 Andrew Pinski PR tree-optimization/111435 * match.pd (zero_one_valued_p): Don't do recursion on converts. 2023-09-18 Iain Sandoe * config/darwin-protos.h (enum darwin_external_toolchain): New. * config/darwin.cc (DSYMUTIL_VERSION): New. (darwin_override_options): Choose the default debug DWARF version depending on the configured dsymutil version. 2023-09-18 Iain Sandoe * configure: Regenerate. * configure.ac: Handle explict disable of stdlib option, set defaults for Darwin. 2023-09-18 Andrew Pinski PR tree-optimization/111431 * match.pd (`(a == CST) & a`): New pattern. 2023-09-18 Juzhe-Zhong * config/riscv/riscv-selftests.cc (run_broadcast_selftests): Adapt selftests. * config/riscv/vector.md (@vec_duplicate): Remove. 2023-09-18 Wilco Dijkstra PR target/105928 * config/aarch64/aarch64.cc (aarch64_internal_mov_immediate) Add support for immediates using shifted ORR/BIC. (aarch64_split_dimode_const_store): Apply if we save one instruction. * config/aarch64/aarch64.md (_3): Make pattern global. 2023-09-18 Wilco Dijkstra * config/aarch64/aarch64-cores.def (neoverse-n1): Place before ares. (neoverse-v1): Place before zeus. (neoverse-v2): Place before demeter. * config/aarch64/aarch64-tune.md: Regenerate. 2023-09-18 Juzhe-Zhong * config/riscv/autovec.md: Add VLS modes. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. 2023-09-18 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vlmul_for_greatest_sew_second_ratio): New function. * config/riscv/riscv-vsetvl.def (DEF_SEW_LMUL_FUSE_RULE): Fix bug. 2023-09-18 Richard Biener PR tree-optimization/111294 * tree-ssa-threadbackward.cc (back_threader_profitability::m_name): Remove (back_threader::find_paths_to_names): Adjust. (back_threader::maybe_thread_block): Likewise. (back_threader_profitability::possibly_profitable_path_p): Remove code applying extra costs to copies PHIs. 2023-09-18 Juzhe-Zhong * config/riscv/autovec.md: Extend VLS modes. * config/riscv/vector.md: Ditto. 2023-09-18 Juzhe-Zhong * config/riscv/vector.md (mov): New pattern. (*mov_mem_to_mem): Ditto. (*mov): Ditto. (@mov_lra): Ditto. (*mov_lra): Ditto. (*mov_vls): Ditto. (movmisalign): Ditto. (@vec_duplicate): Ditto. * config/riscv/autovec-vls.md: Removed. 2023-09-18 Juzhe-Zhong PR target/111153 * config/riscv/autovec.md: Add VLS modes. 2023-09-18 Jason Merrill * doc/gty.texi: Add discussion of cache vs. deletable. 2023-09-18 Juzhe-Zhong * config/riscv/autovec-vls.md (3): Deleted. (copysign3): Ditto. (xorsign3): Ditto. (2): Ditto. * config/riscv/autovec.md: Extend VLS modes. 2023-09-18 Jiufu Guo PR middle-end/111303 * match.pd ((t * 2) / 2): Update pattern. 2023-09-17 Ajit Kumar Agarwal * config/rs6000/vsx.md (*vctzlsbb_zext_): New define_insn. 2023-09-16 Juzhe-Zhong PR target/111391 * config/riscv/autovec.md (@vec_extract): Remove @. (vec_extract): Ditto. * config/riscv/riscv-vsetvl.cc (emit_vsetvl_insn): Fix bug. (pass_vsetvl::local_eliminate_vsetvl_insn): Fix bug. * config/riscv/riscv.cc (riscv_legitimize_move): Expand VLS mode to scalar mode move. 2023-09-16 Tsukasa OI * config/riscv/crypto.md (riscv_sha256sig0_, riscv_sha256sig1_, riscv_sha256sum0_, riscv_sha256sum1_, riscv_sm3p0_, riscv_sm3p1_, riscv_sm4ed_, riscv_sm4ks_): Remove and replace with new insn/expansions. (SHA256_OP, SM3_OP, SM4_OP): New iterators. (sha256_op, sm3_op, sm4_op): New attributes for iteration. (*riscv__si): New raw instruction for RV32. (*riscv__si): Ditto. (*riscv__si): Ditto. (riscv__di_extended): New base instruction for RV64. (riscv__di_extended): Ditto. (riscv__di_extended): Ditto. (riscv__si): New common instruction expansion. (riscv__si): Ditto. (riscv__si): Ditto. * config/riscv/riscv-builtins.cc: Add availability "crypto_zknh", "crypto_zksh" and "crypto_zksed". Remove availability "crypto_zksh{32,64}" and "crypto_zksed{32,64}". * config/riscv/riscv-ftypes.def: Remove unused function type. * config/riscv/riscv-scalar-crypto.def: Make SHA-256, SM3 and SM4 intrinsics to operate on uint32_t. 2023-09-16 Tsukasa OI * config/riscv/riscv-builtins.cc (RISCV_ATYPE_UQI): New for uint8_t. (RISCV_ATYPE_UHI): New for uint16_t. (RISCV_ATYPE_QI, RISCV_ATYPE_HI, RISCV_ATYPE_SI, RISCV_ATYPE_DI): Removed as no longer used. (RISCV_ATYPE_UDI): New for uint64_t. * config/riscv/riscv-cmo.def: Make types unsigned for not working "zicbop_cbo_prefetchi" and working bit manipulation clmul builtin argument/return types. * config/riscv/riscv-ftypes.def: Make bit manipulation, round number and shift amount types unsigned. * config/riscv/riscv-scalar-crypto.def: Ditto. 2023-09-16 Pan Li * config/riscv/autovec-vls.md (xorsign3): New pattern. 2023-09-15 Fei Gao * config/riscv/predicates.md: Restrict predicate to allow 'reg' only. 2023-09-15 Andrew Pinski * match.pd (zero_one_valued_p): Match a cast from a zero_one_valued_p. Also match `a & zero_one_valued_p` too. 2023-09-15 Andrew Pinski PR tree-optimization/111414 * match.pd (`(1 >> X) != 0`): Check to see if the integer_onep was an integral type (not a vector type). 2023-09-15 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_phi): Always run phi analysis, and do it before loop analysis. 2023-09-15 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_phi): Fix indentation. 2023-09-15 Qing Zhao PR tree-optimization/111407 * tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the transform when one of the operands is subject to abnormal coalescing. 2023-09-15 Lehua Ding * config/riscv/riscv-protos.h (enum insn_flags): Change name. (enum insn_type): Ditto. * config/riscv/riscv-v.cc (get_mask_mode_from_insn_flags): Removed. (emit_vlmax_insn): Adjust. (emit_nonvlmax_insn): Adjust. (emit_vlmax_insn_lra): Adjust. 2023-09-15 Lehua Ding * config/riscv/autovec-opt.md: Adjust. * config/riscv/autovec.md: Ditto. * config/riscv/riscv-protos.h (enum class): Delete enum reduction_type. (expand_reduction): Adjust expand_reduction prototype. * config/riscv/riscv-v.cc (need_mask_operand_p): New helper function. (expand_reduction): Refactor expand_reduction. 2023-09-15 Richard Sandiford PR target/111411 * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp): Require the lower memory access to a mem-pair operand. 2023-09-15 Yang Yujie * config.gcc: Pass the default ABI via TM_MULTILIB_CONFIG. * config/loongarch/loongarch-driver.h: Invoke MLIB_SELF_SPECS before the driver canonicalization routines. * config/loongarch/loongarch.h: Move definitions of CC1_SPEC etc. to loongarch-driver.h * config/loongarch/t-linux: Move multilib-related definitions to t-multilib. * config/loongarch/t-multilib: New file. Inject library build options obtained from --with-multilib-list. * config/loongarch/t-loongarch: Same. 2023-09-15 Lehua Ding PR target/111381 * config/riscv/autovec-opt.md (*reduc_plus_scal_): New combine pattern. (*fold_left_widen_plus_): Ditto. (*mask_len_fold_left_widen_plus_): Ditto. * config/riscv/autovec.md (reduc_plus_scal_): Change from define_expand to define_insn_and_split. (fold_left_plus_): Ditto. (mask_len_fold_left_plus_): Ditto. * config/riscv/riscv-v.cc (expand_reduction): Support widen reduction. * config/riscv/vector-iterators.md (UNSPEC_WREDUC_SUM): Add new iterators and attrs. 2023-09-14 David Malcolm * diagnostic-event-id.h (diagnostic_thread_id_t): New typedef. * diagnostic-format-sarif.cc (class sarif_thread_flow): New. (sarif_thread_flow::sarif_thread_flow): New. (sarif_builder::make_code_flow_object): Reimplement, creating per-thread threadFlow objects, populating them with the relevant events. (sarif_builder::make_thread_flow_object): Delete, moving the code into sarif_builder::make_code_flow_object. (sarif_builder::make_thread_flow_location_object): Add "path_event_idx" param. Use it to set "executionOrder" property. * diagnostic-path.h (diagnostic_event::get_thread_id): New pure-virtual vfunc. (class diagnostic_thread): New. (diagnostic_path::num_threads): New pure-virtual vfunc. (diagnostic_path::get_thread): New pure-virtual vfunc. (diagnostic_path::multithreaded_p): New decl. (simple_diagnostic_event::simple_diagnostic_event): Add optional thread_id param. (simple_diagnostic_event::get_thread_id): New accessor. (simple_diagnostic_event::m_thread_id): New. (class simple_diagnostic_thread): New. (simple_diagnostic_path::simple_diagnostic_path): Move definition to diagnostic.cc. (simple_diagnostic_path::num_threads): New. (simple_diagnostic_path::get_thread): New. (simple_diagnostic_path::add_thread): New. (simple_diagnostic_path::add_thread_event): New. (simple_diagnostic_path::m_threads): New. * diagnostic-show-locus.cc (layout::layout): Add pretty_printer param for overriding the context's printer. (diagnostic_show_locus): Likwise. * diagnostic.cc (simple_diagnostic_path::simple_diagnostic_path): Move here from diagnostic-path.h. Add main thread. (simple_diagnostic_path::num_threads): New. (simple_diagnostic_path::get_thread): New. (simple_diagnostic_path::add_thread): New. (simple_diagnostic_path::add_thread_event): New. (simple_diagnostic_event::simple_diagnostic_event): Add thread_id param and use it to initialize m_thread_id. Reformat. * diagnostic.h: Add pretty_printer param for overriding the context's printer. * tree-diagnostic-path.cc: Add #define INCLUDE_VECTOR. (can_consolidate_events): Compare thread ids. (class per_thread_summary): New. (event_range::event_range): Add per_thread_summary arg. (event_range::print): Add "pp" param and use it rather than dc's printer. (event_range::m_thread_id): New field. (event_range::m_per_thread_summary): New field. (path_summary::multithreaded_p): New. (path_summary::get_events_for_thread_id): New. (path_summary::m_per_thread_summary): New field. (path_summary::m_thread_id_to_events): New field. (path_summary::get_or_create_events_for_thread_id): New. (path_summary::path_summary): Create per_thread_summary instances as needed and associate the event_range instances with them. (base_indent): Move here from print_path_summary_as_text. (per_frame_indent): Likewise. (class thread_event_printer): New, adapted from parts of print_path_summary_as_text. (print_path_summary_as_text): Make static. Reimplement to moving most of existing code to class thread_event_printer, capturing state as per-thread as appropriate. (default_tree_diagnostic_path_printer): Add missing 'break' on final case. 2023-09-14 David Malcolm * dwarf2cfi.cc (dwarf2cfi_cc_finalize): New. * dwarf2out.h (dwarf2cfi_cc_finalize): New decl. * ggc-common.cc (ggc_mark_roots): Multiply by rti->nelt when clearing the deletable gcc_root_tab_t. (ggc_common_finalize): New. * ggc.h (ggc_common_finalize): New decl. * toplev.cc (toplev::finalize): Call dwarf2cfi_cc_finalize and ggc_common_finalize. 2023-09-14 Max Filippov * config/xtensa/predicates.md (xtensa_cstoresi_operator): Add unsigned comparisons. * config/xtensa/xtensa.cc (xtensa_expand_scc): Add code generation of salt/saltu instructions. * config/xtensa/xtensa.h (TARGET_SALT): New macro. * config/xtensa/xtensa.md (salt, saltu): New instruction patterns. 2023-09-14 Vladimir N. Makarov * ira-costs.cc (find_costs_and_classes): Decrease memory cost by equiv savings. 2023-09-14 Lehua Ding * config/riscv/autovec.md: Change rtx code to unspec. * config/riscv/riscv-protos.h (expand_reduction): Change prototype. * config/riscv/riscv-v.cc (expand_reduction): Change prototype. * config/riscv/riscv-vector-builtins-bases.cc (class widen_reducop): Removed. (class widen_freducop): Removed. * config/riscv/vector-iterators.md (minu): Add reduc unspec, iterators, attrs. * config/riscv/vector.md (@pred_reduc_): Change name. (@pred_): New name. (@pred_widen_reduc_plus): Change name. (@pred_reduc_plus): Change name. (@pred_widen_reduc_plus): Change name. 2023-09-14 Lehua Ding * config/riscv/riscv-v.cc (expand_reduction): Adjust call. * config/riscv/riscv-vector-builtins-bases.cc: Adjust call. * config/riscv/vector-iterators.md: New iterators and attrs. * config/riscv/vector.md (@pred_reduc_): Removed. (@pred_reduc_): Removed. (@pred_reduc_): Removed. (@pred_reduc_): Removed. (@pred_reduc_): Added. (@pred_widen_reduc_plus): Removed. (@pred_widen_reduc_plus): Removed. (@pred_widen_reduc_plus): Added. (@pred_widen_reduc_plus): Removed. (@pred_reduc_): Removed. (@pred_reduc_): Removed. (@pred_reduc_): Removed. (@pred_reduc_plus): Removed. (@pred_reduc_plus): Removed. (@pred_reduc_plus): Added. (@pred_reduc_plus): Removed. (@pred_widen_reduc_plus): Removed. (@pred_widen_reduc_plus): Removed. (@pred_widen_reduc_plus): Added. 2023-09-14 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_vector_costs::analyze_loop_info): Move WHILELO handling to... (aarch64_vector_costs::finish_cost): ...here. Check whether the vectorizer has decided to use a predicated loop. 2023-09-14 Andrew Pinski PR tree-optimization/106164 * match.pd (`(X CMP1 CST1) AND/IOR (X CMP2 CST2)`): Expand to support constants that are off by one. 2023-09-14 Andrew Pinski * genmatch.cc (parser::parse_result): For an else clause of an if statement inside a switch, error out explictly. 2023-09-14 Juzhe-Zhong * config/riscv/autovec-opt.md: Add VLS mask modes. * config/riscv/autovec.md (@vcond_mask_): Remove @. (vcond_mask_): Add VLS mask modes. * config/riscv/vector.md: Ditto. 2023-09-14 Richard Biener PR tree-optimization/111294 * tree-ssa-forwprop.cc (pass_forwprop::execute): Track operands that eventually become dead and use simple_dce_from_worklist to remove their definitions if they did so. 2023-09-14 Richard Sandiford * config/aarch64/aarch64-sve.md (@aarch64_vec_duplicate_vq_le): Accept all nonimmediate_operands, but keep the existing constraints. If the instruction is split before RA, load invalid addresses into a temporary register. * config/aarch64/predicates.md (aarch64_sve_dup_ld1rq_operand): Delete. 2023-09-14 Juzhe-Zhong PR target/111395 * config/riscv/riscv-vsetvl.cc (avl_info::operator==): Fix ICE. (vector_insn_info::global_merge): Ditto. (vector_insn_info::get_avl_or_vl_reg): Ditto. 2023-09-14 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Format it. 2023-09-14 Lulu Cheng * config/loongarch/loongarch-def.c: Modify the default value of branch_cost. 2023-09-14 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (xtensa_expand_scc): Revert the changes from the last patch, as the work in the RTL expansion pass is too far to determine the physical registers. * config/xtensa/xtensa.md (*eqne_INT_MIN): Ditto. (eq_zero_NSA, eqne_zero, *eqne_zero_masked_bits): New patterns. 2023-09-14 Lulu Cheng PR target/111334 * config/loongarch/loongarch.md: Fix bug of 'di3_fake'. 2023-09-13 Juzhe-Zhong * config/riscv/autovec.md (vec_extract): Add VLS modes. (@vec_extract): Ditto. * config/riscv/vector.md: Ditto 2023-09-13 Andrew Pinski * match.pd (`X <= MAX(X, Y)`): Move before `MIN (X, C1) < C2` pattern. 2023-09-13 Andrew Pinski PR tree-optimization/111364 * match.pd (`MIN (X, Y) == X`): Extend to min/lt, min/ge, max/gt, max/le. 2023-09-13 Andrew Pinski PR tree-optimization/111345 * match.pd (`Y > (X % Y)`): Merge into ... (`(X % Y) < Y`): Pattern by adding `:c` on the comparison. 2023-09-13 Richard Biener PR tree-optimization/111387 * tree-vect-slp.cc (vect_get_and_check_slp_defs): Check EDGE_DFS_BACK when doing BB vectorization. (vect_slp_function): Use rev_post_order_and_mark_dfs_back_seme to compute RPO and mark backedges. 2023-09-13 Lehua Ding * config/riscv/autovec-opt.md (*cond_3_highpart): New combine pattern. * config/riscv/autovec.md (smul3_highpart): Mrege smul and umul. (3_highpart): Merged pattern. (umul3_highpart): Mrege smul and umul. * config/riscv/vector-iterators.md (umul): New iterators. (UNSPEC_VMULHU): New iterators. 2023-09-13 Lehua Ding * config/riscv/autovec-opt.md (*cond_vtrunc): New combine pattern. (*cond_trunc): Ditto. 2023-09-13 Lehua Ding * config/riscv/autovec-opt.md (*copysign_neg): Move. (*cond_copysign): New combine pattern. * config/riscv/riscv-v.cc (needs_fp_rounding): Extend. 2023-09-13 Richard Biener PR tree-optimization/111397 * tree-ssa-propagate.cc (may_propagate_copy): Change optional argument to specify whether the PHI destination doesn't flow in from an abnormal PHI. (propagate_value): Adjust. * tree-ssa-forwprop.cc (pass_forwprop::execute): Indicate abnormal PHI dest. * tree-ssa-sccvn.cc (eliminate_dom_walker::before_dom_children): Likewise. (process_bb): Likewise. 2023-09-13 Pan Li PR target/111362 * config/riscv/riscv.cc (riscv_emit_frm_mode_set): Bugfix. 2023-09-13 Jiufu Guo PR tree-optimization/111303 * match.pd ((X - N * M) / N): Add undefined_p checking. ((X + N * M) / N): Likewise. ((X + C) div_rshift N): Likewise. 2023-09-12 Juzhe-Zhong PR target/111337 * config/riscv/autovec.md (vcond_mask_): New pattern. 2023-09-12 Martin Jambor * dbgcnt.def (form_fma): New. * tree-ssa-math-opts.cc: Include dbgcnt.h. (convert_mult_to_fma): Bail out if the debug counter say so. 2023-09-12 Edwin Lu * config/riscv/autovec-opt.md: Update type * config/riscv/riscv.cc (riscv_sched_variable_issue): Enable assert 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_save_regs_above_locals_p): New function. (aarch64_layout_frame): Use it to decide whether locals should go above or below the saved registers. (aarch64_expand_prologue): Update stack layout comment. Emit a stack tie after the final adjustment. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::saved_regs_size) (aarch64_frame::below_hard_fp_saved_regs_size): Delete. * config/aarch64/aarch64.cc (aarch64_layout_frame): Update accordingly. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::sve_save_and_probe) (aarch64_frame::hard_fp_save_and_probe): New fields. * config/aarch64/aarch64.cc (aarch64_layout_frame): Initialize them. Rather than asserting that a leaf function saves LR, instead assert that a leaf function saves something. (aarch64_get_separate_components): Prevent the chosen probe registers from being individually shrink-wrapped. (aarch64_allocate_and_probe_stack_space): Remove workaround for probe registers that aren't at the bottom of the previous allocation. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_allocate_and_probe_stack_space): Always probe the residual allocation at offset 1024, asserting that that is in range. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_layout_frame): Ensure that the LR save slot is in the first 16 bytes of the register save area. Only form STP/LDP push/pop candidates if both registers are valid. (aarch64_allocate_and_probe_stack_space): Remove workaround for when LR was not in the first 16 bytes. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_allocate_and_probe_stack_space): Don't probe final allocations that are exactly 1KiB in size (after unprobed space above the final allocation has been deducted). 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_layout_frame): Tweak calculation of initial_adjust for frames in which all saves are SVE saves. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_layout_frame): Simplify the allocation of the top of the frame. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame): Add comment above reg_offset. * config/aarch64/aarch64.cc (aarch64_layout_frame): Walk offsets from the bottom of the frame, rather than the bottom of the saved register area. Measure reg_offset from the bottom of the frame rather than the bottom of the saved register area. (aarch64_save_callee_saves): Update accordingly. (aarch64_restore_callee_saves): Likewise. (aarch64_get_separate_components): Likewise. (aarch64_process_components): Likewise. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::frame_size): Tweak comment. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::hard_fp_offset): Rename to... (aarch64_frame::bytes_above_hard_fp): ...this. * config/aarch64/aarch64.cc (aarch64_layout_frame) (aarch64_expand_prologue): Update accordingly. (aarch64_initial_elimination_offset): Likewise. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::locals_offset): Rename to... (aarch64_frame::bytes_above_locals): ...this. * config/aarch64/aarch64.cc (aarch64_layout_frame) (aarch64_initial_elimination_offset): Update accordingly. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_expand_prologue): Move the calculation of chain_offset into the emit_frame_chain block. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::callee_offset): Delete. * config/aarch64/aarch64.cc (aarch64_layout_frame): Remove callee_offset handling. (aarch64_save_callee_saves): Replace the start_offset parameter with a bytes_below_sp parameter. (aarch64_restore_callee_saves): Likewise. (aarch64_expand_prologue): Update accordingly. (aarch64_expand_epilogue): Likewise. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::bytes_below_hard_fp): New field. * config/aarch64/aarch64.cc (aarch64_layout_frame): Initialize it. (aarch64_expand_epilogue): Use it instead of below_hard_fp_saved_regs_size. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.h (aarch64_frame::bytes_below_saved_regs): New field. * config/aarch64/aarch64.cc (aarch64_layout_frame): Initialize it, and use it instead of crtl->outgoing_args_size. (aarch64_get_separate_components): Use bytes_below_saved_regs instead of outgoing_args_size. (aarch64_process_components): Likewise. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_layout_frame): Explicitly allocate the frame in one go if there are no saved registers. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_expand_prologue): Use chain_offset rather than callee_offset. 2023-09-12 Richard Sandiford * config/aarch64/aarch64.cc (aarch64_save_callee_saves): Use a local shorthand for cfun->machine->frame. (aarch64_restore_callee_saves, aarch64_get_separate_components): (aarch64_process_components): Likewise. (aarch64_allocate_and_probe_stack_space): Likewise. (aarch64_expand_prologue, aarch64_expand_epilogue): Likewise. (aarch64_layout_frame): Use existing shorthand for one more case. 2023-09-12 Andrew Pinski PR tree-optimization/107881 * match.pd (`(a CMP1 b) ^ (a CMP2 b)`): New pattern. (`(a CMP1 b) == (a CMP2 b)`): New pattern. 2023-09-12 Pan Li * config/riscv/riscv-vector-costs.h (struct range): Removed. 2023-09-12 Juzhe-Zhong * config/riscv/riscv-vector-costs.cc (get_last_live_range): New function. (compute_nregs_for_mode): Ditto. (live_range_conflict_p): Ditto. (max_number_of_live_regs): Ditto. (compute_lmul): Ditto. (costs::prefer_new_lmul_p): Ditto. (costs::better_main_loop_than_p): Ditto. * config/riscv/riscv-vector-costs.h (struct stmt_point): New struct. (struct var_live_range): Ditto. (struct autovec_info): Ditto. * config/riscv/t-riscv: Update makefile for COST model. 2023-09-12 Jakub Jelinek * fold-const.cc (range_check_type): Handle BITINT_TYPE like OFFSET_TYPE. 2023-09-12 Jakub Jelinek PR middle-end/111338 * tree-ssa-sccvn.cc (struct vn_walk_cb_data): Add bufsize non-static data member. (vn_walk_cb_data::push_partial_def): Remove bufsize variable. (visit_nary_op): Avoid the BIT_AND_EXPR with constant rhs2 optimization if type's precision is too large for vn_walk_cb_data::bufsize. 2023-09-12 Gaius Mulley * doc/gm2.texi (Compiler options): Document new option -Wcase-enum. 2023-09-12 Thomas Schwinge * doc/sourcebuild.texi (stack_size): Update. 2023-09-12 Christoph Müllner * config/riscv/bitmanip.md (*_not): Export INSN name. (_not3): Likewise. * config/riscv/riscv-protos.h (riscv_expand_strcmp): New prototype. * config/riscv/riscv-string.cc (GEN_EMIT_HELPER3): New helper macros. (GEN_EMIT_HELPER2): Likewise. (emit_strcmp_scalar_compare_byte): New function. (emit_strcmp_scalar_compare_subword): Likewise. (emit_strcmp_scalar_compare_word): Likewise. (emit_strcmp_scalar_load_and_compare): Likewise. (emit_strcmp_scalar_call_to_libc): Likewise. (emit_strcmp_scalar_result_calculation_nonul): Likewise. (emit_strcmp_scalar_result_calculation): Likewise. (riscv_expand_strcmp_scalar): Likewise. (riscv_expand_strcmp): Likewise. * config/riscv/riscv.md (*slt_): Export INSN name. (@slt_3): Likewise. (cmpstrnsi): Invoke expansion function for str(n)cmp. (cmpstrsi): Likewise. * config/riscv/riscv.opt: Add new parameter '-mstring-compare-inline-limit'. * doc/invoke.texi: Document new parameter '-mstring-compare-inline-limit'. 2023-09-12 Christoph Müllner * config.gcc: Add new object riscv-string.o. riscv-string.cc. * config/riscv/riscv-protos.h (riscv_expand_strlen): New function. * config/riscv/riscv.md (strlen): New expand INSN. * config/riscv/riscv.opt: New flag 'minline-strlen'. * config/riscv/t-riscv: Add new object riscv-string.o. * config/riscv/thead.md (th_rev2): Export INSN name. (th_rev2): Likewise. (th_tstnbz2): New INSN. * doc/invoke.texi: Document '-minline-strlen'. * emit-rtl.cc (emit_likely_jump_insn): New helper function. (emit_unlikely_jump_insn): Likewise. * rtl.h (emit_likely_jump_insn): New prototype. (emit_unlikely_jump_insn): Likewise. * config/riscv/riscv-string.cc: New file. 2023-09-12 Thomas Schwinge * config/nvptx/nvptx.h (TARGET_USE_LOCAL_THUNK_ALIAS_P) (TARGET_SUPPORTS_ALIASES): Define. 2023-09-12 Thomas Schwinge * doc/sourcebuild.texi (check-function-bodies): Update. 2023-09-12 Tobias Burnus * gimplify.cc (gimplify_bind_expr): Check for insertion after variable cleanup. Convert 'omp allocate' var-decl attribute to GOMP_alloc/GOMP_free calls. 2023-09-12 xuli * config/riscv/riscv-vector-builtins-bases.cc: remove unused parameter e and replace NULL_RTX with gcc_unreachable. 2023-09-12 xuli * config/riscv/riscv-vector-builtins-bases.cc (class vcreate): New class. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vcreate): Add vcreate support. * config/riscv/riscv-vector-builtins-shapes.cc (struct vcreate_def): Ditto. (SHAPE): Ditto. * config/riscv/riscv-vector-builtins-shapes.h: Ditto. * config/riscv/riscv-vector-builtins.cc: Add args type. 2023-09-12 Fei Gao * config/riscv/riscv.cc (riscv_avoid_shrink_wrapping_separate): wrap the condition check in riscv_avoid_shrink_wrapping_separate. (riscv_avoid_multi_push):avoid multi push if shrink_wrapping_separate is active. (riscv_get_separate_components):call riscv_avoid_shrink_wrapping_separate 2023-09-12 Fei Gao * shrink-wrap.cc (try_shrink_wrapping_separate):call use_shrink_wrapping_separate. (use_shrink_wrapping_separate): wrap the condition check in use_shrink_wrapping_separate. * shrink-wrap.h (use_shrink_wrapping_separate): add to extern 2023-09-11 Andrew Pinski PR tree-optimization/111348 * match.pd (`(a CMP b) ? minmax : minmax`): Add :c on the cmp part of the pattern. 2023-09-11 Uros Bizjak PR target/111340 * config/i386/i386.cc (output_pic_addr_const): Handle CONST_WIDE_INT. Call output_addr_const for CASE_CONST_SCALAR_INT. 2023-09-11 Edwin Lu * config/riscv/thead.md: Update types 2023-09-11 Edwin Lu * config/riscv/riscv.md: Update types 2023-09-11 Edwin Lu * config/riscv/riscv.md: Add "zicond" type * config/riscv/zicond.md: Update types 2023-09-11 Edwin Lu * config/riscv/riscv.md: Add "pushpop" and "mvpair" types * config/riscv/zc.md: Update types 2023-09-11 Edwin Lu * config/riscv/autovec-opt.md: Update types * config/riscv/autovec.md: likewise 2023-09-11 Stefan Schulze Frielinghaus * config/s390/s390-builtins.def (s390_vec_signed_flt): Fix builtin flag. (s390_vec_unsigned_flt): Ditto. (s390_vec_revb_flt): Ditto. (s390_vec_reve_flt): Ditto. (s390_vclfnhs): Fix operand flags. (s390_vclfnls): Ditto. (s390_vcrnfs): Ditto. (s390_vcfn): Ditto. (s390_vcnf): Ditto. 2023-09-11 Stefan Schulze Frielinghaus * config/s390/s390-builtins.def (O_U64): New. (O1_U64): Ditto. (O2_U64): Ditto. (O3_U64): Ditto. (O4_U64): Ditto. (O_M12): Change bit position. (O_S2): Ditto. (O_S3): Ditto. (O_S4): Ditto. (O_S5): Ditto. (O_S8): Ditto. (O_S12): Ditto. (O_S16): Ditto. (O_S32): Ditto. (O_ELEM): Ditto. (O_LIT): Ditto. (OB_DEF_VAR): Add operand constraints. (B_DEF): Ditto. * config/s390/s390.cc (s390_const_operand_ok): Honour 64 bit operands. 2023-09-11 Andrew Pinski PR tree-optimization/111349 * match.pd (`(a CMP CST1) ? max : a`): Add :c on the cmp part of the pattern. 2023-09-11 Juzhe-Zhong PR target/111311 * config/riscv/riscv.opt: Set default as scalable vectorization. 2023-09-11 Juzhe-Zhong * config/riscv/riscv-protos.h (get_all_predecessors): Remove. (get_all_successors): Ditto. * config/riscv/riscv-v.cc (get_all_predecessors): Ditto. (get_all_successors): Ditto. 2023-09-11 Jakub Jelinek PR middle-end/111329 * pretty-print.h (pp_wide_int): Rewrite from macro into inline function. For printing values which don't fit into digit_buffer use out-of-line function. * wide-int-print.h (pp_wide_int_large): Declare. * wide-int-print.cc: Include pretty-print.h. (pp_wide_int_large): Define. 2023-09-11 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Use dominance analysis. (pass_vsetvl::init): Ditto. (pass_vsetvl::done): Ditto. 2023-09-11 Juzhe-Zhong PR target/111311 * config/riscv/autovec.md: Add VLS modes. * config/riscv/riscv-protos.h (cmp_lmul_le_one): New function. (cmp_lmul_gt_one): Ditto. * config/riscv/riscv-v.cc (cmp_lmul_le_one): Ditto. (cmp_lmul_gt_one): Ditto. * config/riscv/riscv.cc (riscv_print_operand): Add VLS modes. (riscv_vectorize_vec_perm_const): Ditto. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. 2023-09-11 Juzhe-Zhong * config/riscv/autovec-vls.md (*mov_vls): New pattern. * config/riscv/vector-iterators.md: New iterator 2023-09-11 Andrew Pinski PR tree-optimization/111346 * match.pd (`X CMP MINMAX`): Add `:c` on the cmp part of the pattern 2023-09-11 liuhongt PR target/111306 PR target/111335 * config/i386/sse.md (int_comm): New int_attr. (fma__): Remove % for Complex conjugate operations since they're not commutative. (fma___pair): Ditto. (___mask): Ditto. (cmul3): Ditto. 2023-09-10 Juzhe-Zhong * config/riscv/riscv-v.cc (shuffle_generic_patterns): Expand fixed-vlmax/vls vector permutation. 2023-09-10 Juzhe-Zhong * config/riscv/riscv-v.cc (shuffle_compress_patterns): Avoid unnecessary slideup. 2023-09-10 Andrew Pinski PR tree-optimization/111331 * match.pd (`(a CMP CST1) ? max : a`): Fix the LE/GE comparison to the correct value. * tree-ssa-phiopt.cc (minmax_replacement): Fix the LE/GE comparison for the `(a CMP CST1) ? max : a` optimization. 2023-09-10 Iain Sandoe * config/darwin.cc (darwin_function_section): Place unlikely executed global init code into the standard cold section. 2023-09-10 Juzhe-Zhong PR target/111311 * config/riscv/riscv-vsetvl.cc (pass_vsetvl::vsetvl_fusion): Add TDF_DETAILS. (pass_vsetvl::pre_vsetvl): Ditto. (pass_vsetvl::init): Ditto. (pass_vsetvl::lazy_vsetvl): Ditto. 2023-09-09 Lulu Cheng * config/loongarch/loongarch.md (mulsidi3_64bit): Field unsigned extension support. (muldi3_highpart): Modify template name. (mulsi3_highpart): Likewise. (mulsidi3_64bit): Field unsigned extension support. (muldi3_highpart): Modify muldi3_highpart to smuldi3_highpart. (mulsi3_highpart): Modify mulsi3_highpart to smulsi3_highpart. 2023-09-09 Xi Ruoyao * config/loongarch/loongarch.cc (loongarch_block_move_straight): Check precondition (delta must be a power of 2) and use popcount_hwi instead of a homebrew loop. 2023-09-09 Xi Ruoyao * config/loongarch/loongarch.h (LARCH_MAX_MOVE_PER_INSN): Define to the maximum amount of bytes able to be loaded or stored with one machine instruction. * config/loongarch/loongarch.cc (loongarch_mode_for_move_size): New static function. (loongarch_block_move_straight): Call loongarch_mode_for_move_size for machine_mode to be moved. (loongarch_expand_block_move): Use LARCH_MAX_MOVE_PER_INSN instead of UNITS_PER_WORD. 2023-09-09 Juzhe-Zhong * config/riscv/vector-iterators.md: Fix floating-point operations predicate. 2023-09-09 Lehua Ding * fold-const.cc (can_min_p): New function. (poly_int_binop): Try fold MIN_EXPR. 2023-09-08 Aldy Hernandez * range-op-float.cc (foperator_ltgt::fold_range): Do not special case VREL_EQ nor call frelop_early_resolve. 2023-09-08 Christoph Müllner * config/riscv/thead.md (*extend2_th_ext): Remove broken INSN. (*extendhi2_th_ext): New INSN. (*extendqi2_th_ext): New INSN. 2023-09-08 Christoph Müllner * config/riscv/thead.md: Use more appropriate mode attributes for extensions. 2023-09-08 Guo Jie * common/config/loongarch/loongarch-common.cc: (default_options loongarch_option_optimization_table): Default to -fsched-pressure. 2023-09-08 Yang Yujie * config.gcc: remove non-POSIX syntax "<<<". 2023-09-08 Christoph Müllner * config/riscv/bitmanip.md (*extend2_zbb): Rename postfix to _bitmanip. (*extend2_bitmanip): Renamed pattern. (*zero_extendhi2_zbb): Remove duplicated pattern. 2023-09-08 Juzhe-Zhong * config/riscv/riscv.cc (riscv_pass_in_vector_p): Only allow RVV type. 2023-09-08 Juzhe-Zhong * config/riscv/riscv.cc (riscv_hard_regno_nregs): Fix bug. 2023-09-07 liuhongt * config/i386/sse.md (_vpermt2var3): New define_insn. (VHFBF_AVX512VL): New mode iterator. (VI2HFBF_AVX512VL): New mode iterator. 2023-09-07 Aldy Hernandez * value-range.h (contains_zero_p): Return false for undefined ranges. * range-op-float.cc (operator_gt::op1_op2_relation): Adjust for contains_zero_p change above. (operator_ge::op1_op2_relation): Same. (operator_equal::op1_op2_relation): Same. (operator_not_equal::op1_op2_relation): Same. (operator_lt::op1_op2_relation): Same. (operator_le::op1_op2_relation): Same. (operator_ge::op1_op2_relation): Same. * range-op.cc (operator_equal::op1_op2_relation): Same. (operator_not_equal::op1_op2_relation): Same. (operator_lt::op1_op2_relation): Same. (operator_le::op1_op2_relation): Same. (operator_cast::op1_range): Same. (set_nonzero_range_from_mask): Same. (operator_bitwise_xor::op1_range): Same. (operator_addr_expr::fold_range): Same. (operator_addr_expr::op1_range): Same. 2023-09-07 Andrew MacLeod PR tree-optimization/110875 * gimple-range.cc (gimple_ranger::prefill_name): Only invoke cache-prefilling routine when the ssa-name has no global value. 2023-09-07 Vladimir N. Makarov PR target/111225 * lra-constraints.cc (goal_reuse_alt_p): New global flag. (process_alt_operands): Set up the flag. Clear flag for chosen alternative with special memory constraints. (process_alt_operands): Set up used insn alternative depending on the flag. 2023-09-07 Juzhe-Zhong * config/riscv/autovec-vls.md: Add VLS mask modes mov patterns. * config/riscv/riscv.md: Ditto. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. 2023-09-07 David Malcolm * diagnostic-core.h (error_meta): New decl. * diagnostic.cc (error_meta): New. 2023-09-07 Jakub Jelinek PR c/102989 * expr.cc (expand_expr_real_1): Don't call targetm.c.bitint_type_info inside gcc_assert, as later code relies on it filling info variable. * gimple-fold.cc (clear_padding_bitint_needs_padding_p, clear_padding_type): Likewise. * varasm.cc (output_constant): Likewise. * fold-const.cc (native_encode_int, native_interpret_int): Likewise. * stor-layout.cc (finish_bitfield_representative, layout_type): Likewise. * gimple-lower-bitint.cc (bitint_precision_kind): Likewise. 2023-09-07 Xi Ruoyao PR target/111252 * config/loongarch/loongarch-protos.h (loongarch_pre_reload_split): Declare new function. (loongarch_use_bstrins_for_ior_with_mask): Likewise. * config/loongarch/loongarch.cc (loongarch_pre_reload_split): Implement. (loongarch_use_bstrins_for_ior_with_mask): Likewise. * config/loongarch/predicates.md (ins_zero_bitmask_operand): New predicate. * config/loongarch/loongarch.md (bstrins__for_mask): New define_insn_and_split. (bstrins__for_ior_mask): Likewise. (define_peephole2): Further optimize code sequence produced by bstrins__for_ior_mask if possible. 2023-09-07 Richard Sandiford * lra-eliminations.cc (lra_eliminate_regs_1): Use simplify_gen_binary rather than gen_rtx_PLUS. 2023-09-07 Juzhe-Zhong PR target/111313 * config/riscv/riscv-vsetvl.cc (pass_vsetvl::cleanup_earliest_vsetvls): Remove. (pass_vsetvl::df_post_optimization): Remove incorrect function. 2023-09-07 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_flag_table): Parse 'XVentanaCondOps' extension. * config/riscv/riscv-opts.h (MASK_XVENTANACONDOPS): New. (TARGET_XVENTANACONDOPS): Ditto. (TARGET_ZICOND_LIKE): New to represent targets with conditional moves like 'Zicond'. It includes RV64 + 'XVentanaCondOps'. * config/riscv/riscv.cc (riscv_rtx_costs): Replace TARGET_ZICOND with TARGET_ZICOND_LIKE. (riscv_expand_conditional_move): Ditto. * config/riscv/riscv.md (movcc): Replace TARGET_ZICOND with TARGET_ZICOND_LIKE. * config/riscv/riscv.opt: Add new riscv_xventana_subext. * config/riscv/zicond.md: Modify description. (eqz_ventana): New to match corresponding czero instructions. (nez_ventana): Ditto. (*czero..): Emit a 'XVentanaCondOps' instruction if 'Zicond' is not available but 'XVentanaCondOps' + RV64 is. (*czero..): Ditto. (*czero.eqz..opt1): Ditto. (*czero.nez..opt2): Ditto. 2023-09-06 Ian Lance Taylor PR go/111310 * godump.cc (go_format_type): Handle BITINT_TYPE. 2023-09-06 Jakub Jelinek PR c/102989 * tree.cc (build_one_cst, build_minus_one_cst): Handle BITINT_TYPE like INTEGER_TYPE. 2023-09-06 Jakub Jelinek PR c/102989 * gimple-lower-bitint.cc (bitint_large_huge::if_then_else, bitint_large_huge::if_then_if_then_else): Use make_single_succ_edge rather than make_edge, initialize bb->count. 2023-09-06 Jakub Jelinek PR c/102989 * doc/libgcc.texi (Bit-precise integer arithmetic functions): Document general rules for _BitInt support library functions and document __mulbitint3 and __divmodbitint4. (Conversion functions): Document __fix{s,d,x,t}fbitint, __floatbitint{s,d,x,t,h,b}f, __bid_fix{s,d,t}dbitint and __bid_floatbitint{s,d,t}d. 2023-09-06 Jakub Jelinek PR c/102989 * glimits.h (BITINT_MAXWIDTH): Define if __BITINT_MAXWIDTH__ is predefined. 2023-09-06 Jakub Jelinek PR c/102989 * internal-fn.cc (expand_ubsan_result_store): Add LHS, MODE and DO_ERROR arguments. For non-mode precision BITINT_TYPE results check if all padding bits up to mode precision are zeros or sign bit copies and if not, jump to DO_ERROR. (expand_addsub_overflow, expand_neg_overflow, expand_mul_overflow): Adjust expand_ubsan_result_store callers. * ubsan.cc: Include target.h and langhooks.h. (ubsan_encode_value): Pass BITINT_TYPE values which fit into pointer size converted to pointer sized integer, pass BITINT_TYPE values which fit into TImode (if supported) or DImode as those integer types or otherwise for now punt (pass 0). (ubsan_type_descriptor): Handle BITINT_TYPE. For pstyle of UBSAN_PRINT_FORCE_INT use TK_Integer (0x0000) mode with a TImode/DImode precision rather than TK_Unknown used otherwise for large/huge BITINT_TYPEs. (instrument_si_overflow): Instrument BITINT_TYPE operations even when they don't have mode precision. * ubsan.h (enum ubsan_print_style): New enumerator. 2023-09-06 Jakub Jelinek PR c/102989 * config/i386/i386.cc (classify_argument): Handle BITINT_TYPE. (ix86_bitint_type_info): New function. (TARGET_C_BITINT_TYPE_INFO): Redefine. 2023-09-06 Jakub Jelinek PR c/102989 * Makefile.in (OBJS): Add gimple-lower-bitint.o. * passes.def: Add pass_lower_bitint after pass_lower_complex and pass_lower_bitint_O0 after pass_lower_complex_O0. * tree-pass.h (PROP_gimple_lbitint): Define. (make_pass_lower_bitint_O0, make_pass_lower_bitint): Declare. * gimple-lower-bitint.h: New file. * tree-ssa-live.h (struct _var_map): Add bitint member. (init_var_map): Adjust declaration. (region_contains_p): Handle map->bitint like map->outofssa_p. * tree-ssa-live.cc (init_var_map): Add BITINT argument, initialize map->bitint and set map->outofssa_p to false if it is non-NULL. * tree-ssa-coalesce.cc: Include gimple-lower-bitint.h. (build_ssa_conflict_graph): Call build_bitint_stmt_ssa_conflicts if map->bitint. (create_coalesce_list_for_region): For map->bitint ignore SSA_NAMEs not in that bitmap, and allow res without default def. (compute_optimized_partition_bases): In map->bitint mode try hard to coalesce any SSA_NAMEs with the same size. (coalesce_bitint): New function. (coalesce_ssa_name): In map->bitint mode, or map->bitmap into used_in_copies and call coalesce_bitint. * gimple-lower-bitint.cc: New file. 2023-09-06 Jakub Jelinek PR c/102989 * tree.def (BITINT_TYPE): New type. * tree.h (TREE_CHECK6, TREE_NOT_CHECK6): Define. (NUMERICAL_TYPE_CHECK, INTEGRAL_TYPE_P): Include BITINT_TYPE. (BITINT_TYPE_P): Define. (CONSTRUCTOR_BITFIELD_P): Return true even for BLKmode bit-fields if they have BITINT_TYPE type. (tree_check6, tree_not_check6): New inline functions. (any_integral_type_check): Include BITINT_TYPE. (build_bitint_type): Declare. * tree.cc (tree_code_size, wide_int_to_tree_1, cache_integer_cst, build_zero_cst, type_hash_canon_hash, type_cache_hasher::equal, type_hash_canon): Handle BITINT_TYPE. (bitint_type_cache): New variable. (build_bitint_type): New function. (signed_or_unsigned_type_for, verify_type_variant, verify_type): Handle BITINT_TYPE. (tree_cc_finalize): Free bitint_type_cache. * builtins.cc (type_to_class): Handle BITINT_TYPE. (fold_builtin_unordered_cmp): Handle BITINT_TYPE like INTEGER_TYPE. * cfgexpand.cc (expand_debug_expr): Punt on BLKmode BITINT_TYPE INTEGER_CSTs. * convert.cc (convert_to_pointer_1, convert_to_real_1, convert_to_complex_1): Handle BITINT_TYPE like INTEGER_TYPE. (convert_to_integer_1): Likewise. For BITINT_TYPE don't check GET_MODE_PRECISION (TYPE_MODE (type)). * doc/generic.texi (BITINT_TYPE): Document. * doc/tm.texi.in (TARGET_C_BITINT_TYPE_INFO): New. * doc/tm.texi: Regenerated. * dwarf2out.cc (base_type_die, is_base_type, modified_type_die, gen_type_die_with_usage): Handle BITINT_TYPE. (rtl_for_decl_init): Punt on BLKmode BITINT_TYPE INTEGER_CSTs or handle those which fit into shwi. * expr.cc (expand_expr_real_1): Define EXTEND_BITINT macro, reduce to bitfield precision reads from BITINT_TYPE vars, parameters or memory locations. Expand large/huge BITINT_TYPE INTEGER_CSTs into memory. * fold-const.cc (fold_convert_loc, make_range_step): Handle BITINT_TYPE. (extract_muldiv_1): For BITINT_TYPE use TYPE_PRECISION rather than GET_MODE_SIZE (SCALAR_INT_TYPE_MODE). (native_encode_int, native_interpret_int, native_interpret_expr): Handle BITINT_TYPE. * gimple-expr.cc (useless_type_conversion_p): Make BITINT_TYPE to some other integral type or vice versa conversions non-useless. * gimple-fold.cc (gimple_fold_builtin_memset): Punt for BITINT_TYPE. (clear_padding_unit): Mention in comment that _BitInt types don't need to fit either. (clear_padding_bitint_needs_padding_p): New function. (clear_padding_type_may_have_padding_p): Handle BITINT_TYPE. (clear_padding_type): Likewise. * internal-fn.cc (expand_mul_overflow): For unsigned non-mode precision operands force pos_neg? to 1. (expand_MULBITINT, expand_DIVMODBITINT, expand_FLOATTOBITINT, expand_BITINTTOFLOAT): New functions. * internal-fn.def (MULBITINT, DIVMODBITINT, FLOATTOBITINT, BITINTTOFLOAT): New internal functions. * internal-fn.h (expand_MULBITINT, expand_DIVMODBITINT, expand_FLOATTOBITINT, expand_BITINTTOFLOAT): Declare. * match.pd (non-equality compare simplifications from fold_binary): Punt if TYPE_MODE (arg1_type) is BLKmode. * pretty-print.h (pp_wide_int): Handle printing of large precision wide_ints which would buffer overflow digit_buffer. * stor-layout.cc (finish_bitfield_representative): For bit-fields with BITINT_TYPE, prefer representatives with precisions in multiple of limb precision. (layout_type): Handle BITINT_TYPE. Handle COMPLEX_TYPE with BLKmode element type and assert it is BITINT_TYPE. * target.def (bitint_type_info): New C target hook. * target.h (struct bitint_info): New type. * targhooks.cc (default_bitint_type_info): New function. * targhooks.h (default_bitint_type_info): Declare. * tree-pretty-print.cc (dump_generic_node): Handle BITINT_TYPE. Handle printing large wide_ints which would buffer overflow digit_buffer. * tree-ssa-sccvn.cc: Include target.h. (eliminate_dom_walker::eliminate_stmt): Punt for large/huge BITINT_TYPE. * tree-switch-conversion.cc (jump_table_cluster::emit): For more than 64-bit BITINT_TYPE subtract low bound from expression and cast to 64-bit integer type both the controlling expression and case labels. * typeclass.h (enum type_class): Add bitint_type_class enumerator. * varasm.cc (output_constant): Handle BITINT_TYPE INTEGER_CSTs. * vr-values.cc (check_for_binary_op_overflow): Use widest2_int rather than widest_int. (simplify_using_ranges::simplify_internal_call_using_ranges): Use unsigned_type_for rather than build_nonstandard_integer_type. 2023-09-06 Juzhe-Zhong PR target/111296 * config/riscv/riscv.cc (riscv_modes_tieable_p): Fix incorrect mode tieable for RVV modes. 2023-09-06 Juzhe-Zhong PR target/111295 * config/riscv/riscv-vsetvl.cc (insert_vsetvl): Bug fix. 2023-09-06 Juzhe-Zhong * config/riscv/riscv-vector-switch.def (VLS_ENTRY): Remove TARGET_64BIT 2023-09-06 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (xtensa_expand_scc): Add code for particular constants (only 0 and INT_MIN for now) for EQ/NE boolean evaluation in SImode. * config/xtensa/xtensa.md (*eqne_INT_MIN): Remove because its implementation has been integrated into the above. 2023-09-06 Lehua Ding PR target/111232 * config/riscv/autovec-opt.md (@pred_single_widen_mul): Delete. (*pred_widen_mulsu): Delete. (*pred_single_widen_mul): Delete. (*dual_widen_): Add new combine patterns. (*single_widen_sub): Ditto. (*single_widen_add): Ditto. (*single_widen_mult): Ditto. (*dual_widen_mulsu): Ditto. (*dual_widen_mulus): Ditto. (*dual_widen_): Ditto. (*single_widen_add): Ditto. (*single_widen_sub): Ditto. (*single_widen_mult): Ditto. * config/riscv/autovec.md (3): Change define_expand to define_insn_and_split. (2): Ditto. (abs2): Ditto. (smul3_highpart): Ditto. (umul3_highpart): Ditto. 2023-09-06 Lehua Ding * config/riscv/riscv-protos.h (riscv_declare_function_name): Add protos. (riscv_asm_output_alias): Ditto. (riscv_asm_output_external): Ditto. * config/riscv/riscv.cc (riscv_asm_output_variant_cc): Output .variant_cc directive for vector function. (riscv_declare_function_name): Ditto. (riscv_asm_output_alias): Ditto. (riscv_asm_output_external): Ditto. * config/riscv/riscv.h (ASM_DECLARE_FUNCTION_NAME): Implement ASM_DECLARE_FUNCTION_NAME. (ASM_OUTPUT_DEF_FROM_DECLS): Implement ASM_OUTPUT_DEF_FROM_DECLS. (ASM_OUTPUT_EXTERNAL): Implement ASM_OUTPUT_EXTERNAL. 2023-09-06 Lehua Ding * config/riscv/riscv-sr.cc (riscv_remove_unneeded_save_restore_calls): Pass riscv_cc. * config/riscv/riscv.cc (struct riscv_frame_info): Add new fileds. (riscv_frame_info::reset): Reset new fileds. (riscv_call_tls_get_addr): Pass riscv_cc. (riscv_function_arg): Return riscv_cc for call patterm. (get_riscv_cc): New function return riscv_cc from rtl call_insn. (riscv_insn_callee_abi): Implement TARGET_INSN_CALLEE_ABI. (riscv_save_reg_p): Add vector callee-saved check. (riscv_stack_align): Add vector save area comment. (riscv_compute_frame_info): Ditto. (riscv_restore_reg): Update for type change. (riscv_for_each_saved_v_reg): New function save vector registers. (riscv_first_stack_step): Handle funciton with vector callee-saved registers. (riscv_expand_prologue): Ditto. (riscv_expand_epilogue): Ditto. (riscv_output_mi_thunk): Pass riscv_cc. (TARGET_INSN_CALLEE_ABI): Implement TARGET_INSN_CALLEE_ABI. * config/riscv/riscv.h (get_riscv_cc): Export get_riscv_cc function. * config/riscv/riscv.md: Add CALLEE_CC operand for call pattern. 2023-09-06 Lehua Ding * config/riscv/riscv-protos.h (builtin_type_p): New function for checking vector type. * config/riscv/riscv-vector-builtins.cc (builtin_type_p): Ditto. * config/riscv/riscv.cc (struct riscv_arg_info): New fields. (riscv_init_cumulative_args): Setup variant_cc field. (riscv_vector_type_p): New function for checking vector type. (riscv_hard_regno_nregs): Hoist declare. (riscv_get_vector_arg): Subroutine of riscv_get_arg_info. (riscv_get_arg_info): Support vector cc. (riscv_function_arg_advance): Update cum. (riscv_pass_by_reference): Handle vector args. (riscv_v_abi): New function return vector abi. (riscv_return_value_is_vector_type_p): New function for check vector arguments. (riscv_arguments_is_vector_type_p): New function for check vector returns. (riscv_fntype_abi): Implement TARGET_FNTYPE_ABI. (TARGET_FNTYPE_ABI): Implement TARGET_FNTYPE_ABI. * config/riscv/riscv.h (GCC_RISCV_H): Define macros for vector abi. (MAX_ARGS_IN_VECTOR_REGISTERS): Ditto. (MAX_ARGS_IN_MASK_REGISTERS): Ditto. (V_ARG_FIRST): Ditto. (V_ARG_LAST): Ditto. (enum riscv_cc): Define all RISCV_CC variants. * config/riscv/riscv.opt: Add --param=riscv-vector-abi. 2023-09-06 Lehua Ding * config/riscv/autovec-opt.md (*cond_): Add sqrt + vcond_mask combine pattern. * config/riscv/autovec.md (2): Change define_expand to define_insn_and_split. 2023-09-06 Jason Merrill * common.opt: Update -fabi-version=19. 2023-09-06 Tsukasa OI * config/riscv/zicond.md: Add closing parent to a comment. 2023-09-06 Tsukasa OI * config/riscv/riscv.cc (riscv_expand_conditional_move): Force large constant cons/alt into a register. 2023-09-05 Christoph Müllner * config/riscv/riscv.cc (riscv_build_integer_1): Don't require one zero bit in the upper 32 bits for LI+RORI synthesis. 2023-09-05 Jeff Law * config/riscv/bitmanip.md (bswapsi2): Expose for TARGET_64BIT. 2023-09-05 Andrew Pinski PR tree-optimization/98710 * match.pd (`(x | c) & ~(y | c)`, `(x & c) | ~(y & c)`): New pattern. (`x & ~(y | x)`, `x | ~(y & x)`): New patterns. 2023-09-05 Andrew Pinski PR tree-optimization/103536 * match.pd (`(x | y) & (x & z)`, `(x & y) | (x | z)`): New patterns. 2023-09-05 Andrew Pinski PR tree-optimization/107137 * match.pd (`(nop_convert)-(convert)a`): New pattern. 2023-09-05 Andrew Pinski PR tree-optimization/96694 * match.pd (`~MAX(~X, Y)`, `~MIN(~X, Y)`): New patterns. 2023-09-05 Andrew Pinski PR tree-optimization/105832 * match.pd (`(1 >> X) != 0`): New pattern 2023-09-05 Edwin Lu * config/riscv/riscv.md: Update/Add types 2023-09-05 Edwin Lu * config/riscv/pic.md: Update types 2023-09-05 Christoph Müllner * config/riscv/riscv.cc (riscv_build_integer_1): Enable constant synthesis with rotate-right for XTheadBb. 2023-09-05 Vineet Gupta * config/riscv/zicond.md: Fix op2 pattern. 2023-09-05 Szabolcs Nagy * config/aarch64/aarch64.h (AARCH64_ISA_RCPC): Remove dup. 2023-09-05 Xi Ruoyao * config/loongarch/loongarch-opts.h (HAVE_AS_EXPLICIT_RELOCS): Define to 0 if not defined yet. 2023-09-05 Kito Cheng * config/riscv/linux.h (TARGET_ASM_FILE_END): Move ... * config/riscv/riscv.cc (TARGET_ASM_FILE_END): to here. 2023-09-05 Pan Li * config/riscv/autovec-vls.md (copysign3): New pattern. * config/riscv/vector.md: Extend iterator for VLS. 2023-09-05 Lulu Cheng * config.gcc: Export the header file lasxintrin.h. * config/loongarch/loongarch-builtins.cc (enum loongarch_builtin_type): Add Loongson ASX builtin functions support. (AVAIL_ALL): Ditto. (LASX_BUILTIN): Ditto. (LASX_NO_TARGET_BUILTIN): Ditto. (LASX_BUILTIN_TEST_BRANCH): Ditto. (CODE_FOR_lasx_xvsadd_b): Ditto. (CODE_FOR_lasx_xvsadd_h): Ditto. (CODE_FOR_lasx_xvsadd_w): Ditto. (CODE_FOR_lasx_xvsadd_d): Ditto. (CODE_FOR_lasx_xvsadd_bu): Ditto. (CODE_FOR_lasx_xvsadd_hu): Ditto. (CODE_FOR_lasx_xvsadd_wu): Ditto. (CODE_FOR_lasx_xvsadd_du): Ditto. (CODE_FOR_lasx_xvadd_b): Ditto. (CODE_FOR_lasx_xvadd_h): Ditto. (CODE_FOR_lasx_xvadd_w): Ditto. (CODE_FOR_lasx_xvadd_d): Ditto. (CODE_FOR_lasx_xvaddi_bu): Ditto. (CODE_FOR_lasx_xvaddi_hu): Ditto. (CODE_FOR_lasx_xvaddi_wu): Ditto. (CODE_FOR_lasx_xvaddi_du): Ditto. (CODE_FOR_lasx_xvand_v): Ditto. (CODE_FOR_lasx_xvandi_b): Ditto. (CODE_FOR_lasx_xvbitsel_v): Ditto. (CODE_FOR_lasx_xvseqi_b): Ditto. (CODE_FOR_lasx_xvseqi_h): Ditto. (CODE_FOR_lasx_xvseqi_w): Ditto. (CODE_FOR_lasx_xvseqi_d): Ditto. (CODE_FOR_lasx_xvslti_b): Ditto. (CODE_FOR_lasx_xvslti_h): Ditto. (CODE_FOR_lasx_xvslti_w): Ditto. (CODE_FOR_lasx_xvslti_d): Ditto. (CODE_FOR_lasx_xvslti_bu): Ditto. (CODE_FOR_lasx_xvslti_hu): Ditto. (CODE_FOR_lasx_xvslti_wu): Ditto. (CODE_FOR_lasx_xvslti_du): Ditto. (CODE_FOR_lasx_xvslei_b): Ditto. (CODE_FOR_lasx_xvslei_h): Ditto. (CODE_FOR_lasx_xvslei_w): Ditto. (CODE_FOR_lasx_xvslei_d): Ditto. (CODE_FOR_lasx_xvslei_bu): Ditto. (CODE_FOR_lasx_xvslei_hu): Ditto. (CODE_FOR_lasx_xvslei_wu): Ditto. (CODE_FOR_lasx_xvslei_du): Ditto. (CODE_FOR_lasx_xvdiv_b): Ditto. (CODE_FOR_lasx_xvdiv_h): Ditto. (CODE_FOR_lasx_xvdiv_w): Ditto. (CODE_FOR_lasx_xvdiv_d): Ditto. (CODE_FOR_lasx_xvdiv_bu): Ditto. (CODE_FOR_lasx_xvdiv_hu): Ditto. (CODE_FOR_lasx_xvdiv_wu): Ditto. (CODE_FOR_lasx_xvdiv_du): Ditto. (CODE_FOR_lasx_xvfadd_s): Ditto. (CODE_FOR_lasx_xvfadd_d): Ditto. (CODE_FOR_lasx_xvftintrz_w_s): Ditto. (CODE_FOR_lasx_xvftintrz_l_d): Ditto. (CODE_FOR_lasx_xvftintrz_wu_s): Ditto. (CODE_FOR_lasx_xvftintrz_lu_d): Ditto. (CODE_FOR_lasx_xvffint_s_w): Ditto. (CODE_FOR_lasx_xvffint_d_l): Ditto. (CODE_FOR_lasx_xvffint_s_wu): Ditto. (CODE_FOR_lasx_xvffint_d_lu): Ditto. (CODE_FOR_lasx_xvfsub_s): Ditto. (CODE_FOR_lasx_xvfsub_d): Ditto. (CODE_FOR_lasx_xvfmul_s): Ditto. (CODE_FOR_lasx_xvfmul_d): Ditto. (CODE_FOR_lasx_xvfdiv_s): Ditto. (CODE_FOR_lasx_xvfdiv_d): Ditto. (CODE_FOR_lasx_xvfmax_s): Ditto. (CODE_FOR_lasx_xvfmax_d): Ditto. (CODE_FOR_lasx_xvfmin_s): Ditto. (CODE_FOR_lasx_xvfmin_d): Ditto. (CODE_FOR_lasx_xvfsqrt_s): Ditto. (CODE_FOR_lasx_xvfsqrt_d): Ditto. (CODE_FOR_lasx_xvflogb_s): Ditto. (CODE_FOR_lasx_xvflogb_d): Ditto. (CODE_FOR_lasx_xvmax_b): Ditto. (CODE_FOR_lasx_xvmax_h): Ditto. (CODE_FOR_lasx_xvmax_w): Ditto. (CODE_FOR_lasx_xvmax_d): Ditto. (CODE_FOR_lasx_xvmaxi_b): Ditto. (CODE_FOR_lasx_xvmaxi_h): Ditto. (CODE_FOR_lasx_xvmaxi_w): Ditto. (CODE_FOR_lasx_xvmaxi_d): Ditto. (CODE_FOR_lasx_xvmax_bu): Ditto. (CODE_FOR_lasx_xvmax_hu): Ditto. (CODE_FOR_lasx_xvmax_wu): Ditto. (CODE_FOR_lasx_xvmax_du): Ditto. (CODE_FOR_lasx_xvmaxi_bu): Ditto. (CODE_FOR_lasx_xvmaxi_hu): Ditto. (CODE_FOR_lasx_xvmaxi_wu): Ditto. (CODE_FOR_lasx_xvmaxi_du): Ditto. (CODE_FOR_lasx_xvmin_b): Ditto. (CODE_FOR_lasx_xvmin_h): Ditto. (CODE_FOR_lasx_xvmin_w): Ditto. (CODE_FOR_lasx_xvmin_d): Ditto. (CODE_FOR_lasx_xvmini_b): Ditto. (CODE_FOR_lasx_xvmini_h): Ditto. (CODE_FOR_lasx_xvmini_w): Ditto. (CODE_FOR_lasx_xvmini_d): Ditto. (CODE_FOR_lasx_xvmin_bu): Ditto. (CODE_FOR_lasx_xvmin_hu): Ditto. (CODE_FOR_lasx_xvmin_wu): Ditto. (CODE_FOR_lasx_xvmin_du): Ditto. (CODE_FOR_lasx_xvmini_bu): Ditto. (CODE_FOR_lasx_xvmini_hu): Ditto. (CODE_FOR_lasx_xvmini_wu): Ditto. (CODE_FOR_lasx_xvmini_du): Ditto. (CODE_FOR_lasx_xvmod_b): Ditto. (CODE_FOR_lasx_xvmod_h): Ditto. (CODE_FOR_lasx_xvmod_w): Ditto. (CODE_FOR_lasx_xvmod_d): Ditto. (CODE_FOR_lasx_xvmod_bu): Ditto. (CODE_FOR_lasx_xvmod_hu): Ditto. (CODE_FOR_lasx_xvmod_wu): Ditto. (CODE_FOR_lasx_xvmod_du): Ditto. (CODE_FOR_lasx_xvmul_b): Ditto. (CODE_FOR_lasx_xvmul_h): Ditto. (CODE_FOR_lasx_xvmul_w): Ditto. (CODE_FOR_lasx_xvmul_d): Ditto. (CODE_FOR_lasx_xvclz_b): Ditto. (CODE_FOR_lasx_xvclz_h): Ditto. (CODE_FOR_lasx_xvclz_w): Ditto. (CODE_FOR_lasx_xvclz_d): Ditto. (CODE_FOR_lasx_xvnor_v): Ditto. (CODE_FOR_lasx_xvor_v): Ditto. (CODE_FOR_lasx_xvori_b): Ditto. (CODE_FOR_lasx_xvnori_b): Ditto. (CODE_FOR_lasx_xvpcnt_b): Ditto. (CODE_FOR_lasx_xvpcnt_h): Ditto. (CODE_FOR_lasx_xvpcnt_w): Ditto. (CODE_FOR_lasx_xvpcnt_d): Ditto. (CODE_FOR_lasx_xvxor_v): Ditto. (CODE_FOR_lasx_xvxori_b): Ditto. (CODE_FOR_lasx_xvsll_b): Ditto. (CODE_FOR_lasx_xvsll_h): Ditto. (CODE_FOR_lasx_xvsll_w): Ditto. (CODE_FOR_lasx_xvsll_d): Ditto. (CODE_FOR_lasx_xvslli_b): Ditto. (CODE_FOR_lasx_xvslli_h): Ditto. (CODE_FOR_lasx_xvslli_w): Ditto. (CODE_FOR_lasx_xvslli_d): Ditto. (CODE_FOR_lasx_xvsra_b): Ditto. (CODE_FOR_lasx_xvsra_h): Ditto. (CODE_FOR_lasx_xvsra_w): Ditto. (CODE_FOR_lasx_xvsra_d): Ditto. (CODE_FOR_lasx_xvsrai_b): Ditto. (CODE_FOR_lasx_xvsrai_h): Ditto. (CODE_FOR_lasx_xvsrai_w): Ditto. (CODE_FOR_lasx_xvsrai_d): Ditto. (CODE_FOR_lasx_xvsrl_b): Ditto. (CODE_FOR_lasx_xvsrl_h): Ditto. (CODE_FOR_lasx_xvsrl_w): Ditto. (CODE_FOR_lasx_xvsrl_d): Ditto. (CODE_FOR_lasx_xvsrli_b): Ditto. (CODE_FOR_lasx_xvsrli_h): Ditto. (CODE_FOR_lasx_xvsrli_w): Ditto. (CODE_FOR_lasx_xvsrli_d): Ditto. (CODE_FOR_lasx_xvsub_b): Ditto. (CODE_FOR_lasx_xvsub_h): Ditto. (CODE_FOR_lasx_xvsub_w): Ditto. (CODE_FOR_lasx_xvsub_d): Ditto. (CODE_FOR_lasx_xvsubi_bu): Ditto. (CODE_FOR_lasx_xvsubi_hu): Ditto. (CODE_FOR_lasx_xvsubi_wu): Ditto. (CODE_FOR_lasx_xvsubi_du): Ditto. (CODE_FOR_lasx_xvpackod_d): Ditto. (CODE_FOR_lasx_xvpackev_d): Ditto. (CODE_FOR_lasx_xvpickod_d): Ditto. (CODE_FOR_lasx_xvpickev_d): Ditto. (CODE_FOR_lasx_xvrepli_b): Ditto. (CODE_FOR_lasx_xvrepli_h): Ditto. (CODE_FOR_lasx_xvrepli_w): Ditto. (CODE_FOR_lasx_xvrepli_d): Ditto. (CODE_FOR_lasx_xvandn_v): Ditto. (CODE_FOR_lasx_xvorn_v): Ditto. (CODE_FOR_lasx_xvneg_b): Ditto. (CODE_FOR_lasx_xvneg_h): Ditto. (CODE_FOR_lasx_xvneg_w): Ditto. (CODE_FOR_lasx_xvneg_d): Ditto. (CODE_FOR_lasx_xvbsrl_v): Ditto. (CODE_FOR_lasx_xvbsll_v): Ditto. (CODE_FOR_lasx_xvfmadd_s): Ditto. (CODE_FOR_lasx_xvfmadd_d): Ditto. (CODE_FOR_lasx_xvfmsub_s): Ditto. (CODE_FOR_lasx_xvfmsub_d): Ditto. (CODE_FOR_lasx_xvfnmadd_s): Ditto. (CODE_FOR_lasx_xvfnmadd_d): Ditto. (CODE_FOR_lasx_xvfnmsub_s): Ditto. (CODE_FOR_lasx_xvfnmsub_d): Ditto. (CODE_FOR_lasx_xvpermi_q): Ditto. (CODE_FOR_lasx_xvpermi_d): Ditto. (CODE_FOR_lasx_xbnz_v): Ditto. (CODE_FOR_lasx_xbz_v): Ditto. (CODE_FOR_lasx_xvssub_b): Ditto. (CODE_FOR_lasx_xvssub_h): Ditto. (CODE_FOR_lasx_xvssub_w): Ditto. (CODE_FOR_lasx_xvssub_d): Ditto. (CODE_FOR_lasx_xvssub_bu): Ditto. (CODE_FOR_lasx_xvssub_hu): Ditto. (CODE_FOR_lasx_xvssub_wu): Ditto. (CODE_FOR_lasx_xvssub_du): Ditto. (CODE_FOR_lasx_xvabsd_b): Ditto. (CODE_FOR_lasx_xvabsd_h): Ditto. (CODE_FOR_lasx_xvabsd_w): Ditto. (CODE_FOR_lasx_xvabsd_d): Ditto. (CODE_FOR_lasx_xvabsd_bu): Ditto. (CODE_FOR_lasx_xvabsd_hu): Ditto. (CODE_FOR_lasx_xvabsd_wu): Ditto. (CODE_FOR_lasx_xvabsd_du): Ditto. (CODE_FOR_lasx_xvavg_b): Ditto. (CODE_FOR_lasx_xvavg_h): Ditto. (CODE_FOR_lasx_xvavg_w): Ditto. (CODE_FOR_lasx_xvavg_d): Ditto. (CODE_FOR_lasx_xvavg_bu): Ditto. (CODE_FOR_lasx_xvavg_hu): Ditto. (CODE_FOR_lasx_xvavg_wu): Ditto. (CODE_FOR_lasx_xvavg_du): Ditto. (CODE_FOR_lasx_xvavgr_b): Ditto. (CODE_FOR_lasx_xvavgr_h): Ditto. (CODE_FOR_lasx_xvavgr_w): Ditto. (CODE_FOR_lasx_xvavgr_d): Ditto. (CODE_FOR_lasx_xvavgr_bu): Ditto. (CODE_FOR_lasx_xvavgr_hu): Ditto. (CODE_FOR_lasx_xvavgr_wu): Ditto. (CODE_FOR_lasx_xvavgr_du): Ditto. (CODE_FOR_lasx_xvmuh_b): Ditto. (CODE_FOR_lasx_xvmuh_h): Ditto. (CODE_FOR_lasx_xvmuh_w): Ditto. (CODE_FOR_lasx_xvmuh_d): Ditto. (CODE_FOR_lasx_xvmuh_bu): Ditto. (CODE_FOR_lasx_xvmuh_hu): Ditto. (CODE_FOR_lasx_xvmuh_wu): Ditto. (CODE_FOR_lasx_xvmuh_du): Ditto. (CODE_FOR_lasx_xvssran_b_h): Ditto. (CODE_FOR_lasx_xvssran_h_w): Ditto. (CODE_FOR_lasx_xvssran_w_d): Ditto. (CODE_FOR_lasx_xvssran_bu_h): Ditto. (CODE_FOR_lasx_xvssran_hu_w): Ditto. (CODE_FOR_lasx_xvssran_wu_d): Ditto. (CODE_FOR_lasx_xvssrarn_b_h): Ditto. (CODE_FOR_lasx_xvssrarn_h_w): Ditto. (CODE_FOR_lasx_xvssrarn_w_d): Ditto. (CODE_FOR_lasx_xvssrarn_bu_h): Ditto. (CODE_FOR_lasx_xvssrarn_hu_w): Ditto. (CODE_FOR_lasx_xvssrarn_wu_d): Ditto. (CODE_FOR_lasx_xvssrln_bu_h): Ditto. (CODE_FOR_lasx_xvssrln_hu_w): Ditto. (CODE_FOR_lasx_xvssrln_wu_d): Ditto. (CODE_FOR_lasx_xvssrlrn_bu_h): Ditto. (CODE_FOR_lasx_xvssrlrn_hu_w): Ditto. (CODE_FOR_lasx_xvssrlrn_wu_d): Ditto. (CODE_FOR_lasx_xvftint_w_s): Ditto. (CODE_FOR_lasx_xvftint_l_d): Ditto. (CODE_FOR_lasx_xvftint_wu_s): Ditto. (CODE_FOR_lasx_xvftint_lu_d): Ditto. (CODE_FOR_lasx_xvsllwil_h_b): Ditto. (CODE_FOR_lasx_xvsllwil_w_h): Ditto. (CODE_FOR_lasx_xvsllwil_d_w): Ditto. (CODE_FOR_lasx_xvsllwil_hu_bu): Ditto. (CODE_FOR_lasx_xvsllwil_wu_hu): Ditto. (CODE_FOR_lasx_xvsllwil_du_wu): Ditto. (CODE_FOR_lasx_xvsat_b): Ditto. (CODE_FOR_lasx_xvsat_h): Ditto. (CODE_FOR_lasx_xvsat_w): Ditto. (CODE_FOR_lasx_xvsat_d): Ditto. (CODE_FOR_lasx_xvsat_bu): Ditto. (CODE_FOR_lasx_xvsat_hu): Ditto. (CODE_FOR_lasx_xvsat_wu): Ditto. (CODE_FOR_lasx_xvsat_du): Ditto. (loongarch_builtin_vectorized_function): Ditto. (loongarch_expand_builtin_insn): Ditto. (loongarch_expand_builtin): Ditto. * config/loongarch/loongarch-ftypes.def (1): Ditto. (2): Ditto. (3): Ditto. (4): Ditto. * config/loongarch/lasxintrin.h: New file. 2023-09-05 Lulu Cheng * config/loongarch/loongarch-modes.def (VECTOR_MODES): Add Loongson ASX instruction support. * config/loongarch/loongarch-protos.h (loongarch_split_256bit_move): Ditto. (loongarch_split_256bit_move_p): Ditto. (loongarch_expand_vector_group_init): Ditto. (loongarch_expand_vec_perm_1): Ditto. * config/loongarch/loongarch.cc (loongarch_symbol_insns): Ditto. (loongarch_valid_offset_p): Ditto. (loongarch_address_insns): Ditto. (loongarch_const_insns): Ditto. (loongarch_legitimize_move): Ditto. (loongarch_builtin_vectorization_cost): Ditto. (loongarch_split_move_p): Ditto. (loongarch_split_move): Ditto. (loongarch_output_move_index_float): Ditto. (loongarch_split_256bit_move_p): Ditto. (loongarch_split_256bit_move): Ditto. (loongarch_output_move): Ditto. (loongarch_print_operand_reloc): Ditto. (loongarch_print_operand): Ditto. (loongarch_hard_regno_mode_ok_uncached): Ditto. (loongarch_hard_regno_nregs): Ditto. (loongarch_class_max_nregs): Ditto. (loongarch_can_change_mode_class): Ditto. (loongarch_mode_ok_for_mov_fmt_p): Ditto. (loongarch_vector_mode_supported_p): Ditto. (loongarch_preferred_simd_mode): Ditto. (loongarch_autovectorize_vector_modes): Ditto. (loongarch_lsx_output_division): Ditto. (loongarch_expand_lsx_shuffle): Ditto. (loongarch_expand_vec_perm): Ditto. (loongarch_expand_vec_perm_interleave): Ditto. (loongarch_try_expand_lsx_vshuf_const): Ditto. (loongarch_expand_vec_perm_even_odd_1): Ditto. (loongarch_expand_vec_perm_even_odd): Ditto. (loongarch_expand_vec_perm_1): Ditto. (loongarch_expand_vec_perm_const_2): Ditto. (loongarch_is_quad_duplicate): Ditto. (loongarch_is_double_duplicate): Ditto. (loongarch_is_odd_extraction): Ditto. (loongarch_is_even_extraction): Ditto. (loongarch_is_extraction_permutation): Ditto. (loongarch_is_center_extraction): Ditto. (loongarch_is_reversing_permutation): Ditto. (loongarch_is_di_misalign_extract): Ditto. (loongarch_is_si_misalign_extract): Ditto. (loongarch_is_lasx_lowpart_interleave): Ditto. (loongarch_is_lasx_lowpart_interleave_2): Ditto. (COMPARE_SELECTOR): Ditto. (loongarch_is_lasx_lowpart_extract): Ditto. (loongarch_is_lasx_highpart_interleave): Ditto. (loongarch_is_lasx_highpart_interleave_2): Ditto. (loongarch_is_elem_duplicate): Ditto. (loongarch_is_op_reverse_perm): Ditto. (loongarch_is_single_op_perm): Ditto. (loongarch_is_divisible_perm): Ditto. (loongarch_is_triple_stride_extract): Ditto. (loongarch_vectorize_vec_perm_const): Ditto. (loongarch_cpu_sched_reassociation_width): Ditto. (loongarch_expand_vector_extract): Ditto. (emit_reduc_half): Ditto. (loongarch_expand_vec_unpack): Ditto. (loongarch_expand_vector_group_init): Ditto. (loongarch_expand_vector_init): Ditto. (loongarch_expand_lsx_cmp): Ditto. (loongarch_builtin_support_vector_misalignment): Ditto. * config/loongarch/loongarch.h (UNITS_PER_LASX_REG): Ditto. (BITS_PER_LASX_REG): Ditto. (STRUCTURE_SIZE_BOUNDARY): Ditto. (LASX_REG_FIRST): Ditto. (LASX_REG_LAST): Ditto. (LASX_REG_NUM): Ditto. (LASX_REG_P): Ditto. (LASX_REG_RTX_P): Ditto. (LASX_SUPPORTED_MODE_P): Ditto. * config/loongarch/loongarch.md: Ditto. * config/loongarch/lasx.md: New file. 2023-09-05 Lulu Cheng * config.gcc: Export the header file lsxintrin.h. * config/loongarch/loongarch-builtins.cc (LARCH_FTYPE_NAME4): Add builtin function support. (enum loongarch_builtin_type): Ditto. (AVAIL_ALL): Ditto. (LARCH_BUILTIN): Ditto. (LSX_BUILTIN): Ditto. (LSX_BUILTIN_TEST_BRANCH): Ditto. (LSX_NO_TARGET_BUILTIN): Ditto. (CODE_FOR_lsx_vsadd_b): Ditto. (CODE_FOR_lsx_vsadd_h): Ditto. (CODE_FOR_lsx_vsadd_w): Ditto. (CODE_FOR_lsx_vsadd_d): Ditto. (CODE_FOR_lsx_vsadd_bu): Ditto. (CODE_FOR_lsx_vsadd_hu): Ditto. (CODE_FOR_lsx_vsadd_wu): Ditto. (CODE_FOR_lsx_vsadd_du): Ditto. (CODE_FOR_lsx_vadd_b): Ditto. (CODE_FOR_lsx_vadd_h): Ditto. (CODE_FOR_lsx_vadd_w): Ditto. (CODE_FOR_lsx_vadd_d): Ditto. (CODE_FOR_lsx_vaddi_bu): Ditto. (CODE_FOR_lsx_vaddi_hu): Ditto. (CODE_FOR_lsx_vaddi_wu): Ditto. (CODE_FOR_lsx_vaddi_du): Ditto. (CODE_FOR_lsx_vand_v): Ditto. (CODE_FOR_lsx_vandi_b): Ditto. (CODE_FOR_lsx_bnz_v): Ditto. (CODE_FOR_lsx_bz_v): Ditto. (CODE_FOR_lsx_vbitsel_v): Ditto. (CODE_FOR_lsx_vseqi_b): Ditto. (CODE_FOR_lsx_vseqi_h): Ditto. (CODE_FOR_lsx_vseqi_w): Ditto. (CODE_FOR_lsx_vseqi_d): Ditto. (CODE_FOR_lsx_vslti_b): Ditto. (CODE_FOR_lsx_vslti_h): Ditto. (CODE_FOR_lsx_vslti_w): Ditto. (CODE_FOR_lsx_vslti_d): Ditto. (CODE_FOR_lsx_vslti_bu): Ditto. (CODE_FOR_lsx_vslti_hu): Ditto. (CODE_FOR_lsx_vslti_wu): Ditto. (CODE_FOR_lsx_vslti_du): Ditto. (CODE_FOR_lsx_vslei_b): Ditto. (CODE_FOR_lsx_vslei_h): Ditto. (CODE_FOR_lsx_vslei_w): Ditto. (CODE_FOR_lsx_vslei_d): Ditto. (CODE_FOR_lsx_vslei_bu): Ditto. (CODE_FOR_lsx_vslei_hu): Ditto. (CODE_FOR_lsx_vslei_wu): Ditto. (CODE_FOR_lsx_vslei_du): Ditto. (CODE_FOR_lsx_vdiv_b): Ditto. (CODE_FOR_lsx_vdiv_h): Ditto. (CODE_FOR_lsx_vdiv_w): Ditto. (CODE_FOR_lsx_vdiv_d): Ditto. (CODE_FOR_lsx_vdiv_bu): Ditto. (CODE_FOR_lsx_vdiv_hu): Ditto. (CODE_FOR_lsx_vdiv_wu): Ditto. (CODE_FOR_lsx_vdiv_du): Ditto. (CODE_FOR_lsx_vfadd_s): Ditto. (CODE_FOR_lsx_vfadd_d): Ditto. (CODE_FOR_lsx_vftintrz_w_s): Ditto. (CODE_FOR_lsx_vftintrz_l_d): Ditto. (CODE_FOR_lsx_vftintrz_wu_s): Ditto. (CODE_FOR_lsx_vftintrz_lu_d): Ditto. (CODE_FOR_lsx_vffint_s_w): Ditto. (CODE_FOR_lsx_vffint_d_l): Ditto. (CODE_FOR_lsx_vffint_s_wu): Ditto. (CODE_FOR_lsx_vffint_d_lu): Ditto. (CODE_FOR_lsx_vfsub_s): Ditto. (CODE_FOR_lsx_vfsub_d): Ditto. (CODE_FOR_lsx_vfmul_s): Ditto. (CODE_FOR_lsx_vfmul_d): Ditto. (CODE_FOR_lsx_vfdiv_s): Ditto. (CODE_FOR_lsx_vfdiv_d): Ditto. (CODE_FOR_lsx_vfmax_s): Ditto. (CODE_FOR_lsx_vfmax_d): Ditto. (CODE_FOR_lsx_vfmin_s): Ditto. (CODE_FOR_lsx_vfmin_d): Ditto. (CODE_FOR_lsx_vfsqrt_s): Ditto. (CODE_FOR_lsx_vfsqrt_d): Ditto. (CODE_FOR_lsx_vflogb_s): Ditto. (CODE_FOR_lsx_vflogb_d): Ditto. (CODE_FOR_lsx_vmax_b): Ditto. (CODE_FOR_lsx_vmax_h): Ditto. (CODE_FOR_lsx_vmax_w): Ditto. (CODE_FOR_lsx_vmax_d): Ditto. (CODE_FOR_lsx_vmaxi_b): Ditto. (CODE_FOR_lsx_vmaxi_h): Ditto. (CODE_FOR_lsx_vmaxi_w): Ditto. (CODE_FOR_lsx_vmaxi_d): Ditto. (CODE_FOR_lsx_vmax_bu): Ditto. (CODE_FOR_lsx_vmax_hu): Ditto. (CODE_FOR_lsx_vmax_wu): Ditto. (CODE_FOR_lsx_vmax_du): Ditto. (CODE_FOR_lsx_vmaxi_bu): Ditto. (CODE_FOR_lsx_vmaxi_hu): Ditto. (CODE_FOR_lsx_vmaxi_wu): Ditto. (CODE_FOR_lsx_vmaxi_du): Ditto. (CODE_FOR_lsx_vmin_b): Ditto. (CODE_FOR_lsx_vmin_h): Ditto. (CODE_FOR_lsx_vmin_w): Ditto. (CODE_FOR_lsx_vmin_d): Ditto. (CODE_FOR_lsx_vmini_b): Ditto. (CODE_FOR_lsx_vmini_h): Ditto. (CODE_FOR_lsx_vmini_w): Ditto. (CODE_FOR_lsx_vmini_d): Ditto. (CODE_FOR_lsx_vmin_bu): Ditto. (CODE_FOR_lsx_vmin_hu): Ditto. (CODE_FOR_lsx_vmin_wu): Ditto. (CODE_FOR_lsx_vmin_du): Ditto. (CODE_FOR_lsx_vmini_bu): Ditto. (CODE_FOR_lsx_vmini_hu): Ditto. (CODE_FOR_lsx_vmini_wu): Ditto. (CODE_FOR_lsx_vmini_du): Ditto. (CODE_FOR_lsx_vmod_b): Ditto. (CODE_FOR_lsx_vmod_h): Ditto. (CODE_FOR_lsx_vmod_w): Ditto. (CODE_FOR_lsx_vmod_d): Ditto. (CODE_FOR_lsx_vmod_bu): Ditto. (CODE_FOR_lsx_vmod_hu): Ditto. (CODE_FOR_lsx_vmod_wu): Ditto. (CODE_FOR_lsx_vmod_du): Ditto. (CODE_FOR_lsx_vmul_b): Ditto. (CODE_FOR_lsx_vmul_h): Ditto. (CODE_FOR_lsx_vmul_w): Ditto. (CODE_FOR_lsx_vmul_d): Ditto. (CODE_FOR_lsx_vclz_b): Ditto. (CODE_FOR_lsx_vclz_h): Ditto. (CODE_FOR_lsx_vclz_w): Ditto. (CODE_FOR_lsx_vclz_d): Ditto. (CODE_FOR_lsx_vnor_v): Ditto. (CODE_FOR_lsx_vor_v): Ditto. (CODE_FOR_lsx_vori_b): Ditto. (CODE_FOR_lsx_vnori_b): Ditto. (CODE_FOR_lsx_vpcnt_b): Ditto. (CODE_FOR_lsx_vpcnt_h): Ditto. (CODE_FOR_lsx_vpcnt_w): Ditto. (CODE_FOR_lsx_vpcnt_d): Ditto. (CODE_FOR_lsx_vxor_v): Ditto. (CODE_FOR_lsx_vxori_b): Ditto. (CODE_FOR_lsx_vsll_b): Ditto. (CODE_FOR_lsx_vsll_h): Ditto. (CODE_FOR_lsx_vsll_w): Ditto. (CODE_FOR_lsx_vsll_d): Ditto. (CODE_FOR_lsx_vslli_b): Ditto. (CODE_FOR_lsx_vslli_h): Ditto. (CODE_FOR_lsx_vslli_w): Ditto. (CODE_FOR_lsx_vslli_d): Ditto. (CODE_FOR_lsx_vsra_b): Ditto. (CODE_FOR_lsx_vsra_h): Ditto. (CODE_FOR_lsx_vsra_w): Ditto. (CODE_FOR_lsx_vsra_d): Ditto. (CODE_FOR_lsx_vsrai_b): Ditto. (CODE_FOR_lsx_vsrai_h): Ditto. (CODE_FOR_lsx_vsrai_w): Ditto. (CODE_FOR_lsx_vsrai_d): Ditto. (CODE_FOR_lsx_vsrl_b): Ditto. (CODE_FOR_lsx_vsrl_h): Ditto. (CODE_FOR_lsx_vsrl_w): Ditto. (CODE_FOR_lsx_vsrl_d): Ditto. (CODE_FOR_lsx_vsrli_b): Ditto. (CODE_FOR_lsx_vsrli_h): Ditto. (CODE_FOR_lsx_vsrli_w): Ditto. (CODE_FOR_lsx_vsrli_d): Ditto. (CODE_FOR_lsx_vsub_b): Ditto. (CODE_FOR_lsx_vsub_h): Ditto. (CODE_FOR_lsx_vsub_w): Ditto. (CODE_FOR_lsx_vsub_d): Ditto. (CODE_FOR_lsx_vsubi_bu): Ditto. (CODE_FOR_lsx_vsubi_hu): Ditto. (CODE_FOR_lsx_vsubi_wu): Ditto. (CODE_FOR_lsx_vsubi_du): Ditto. (CODE_FOR_lsx_vpackod_d): Ditto. (CODE_FOR_lsx_vpackev_d): Ditto. (CODE_FOR_lsx_vpickod_d): Ditto. (CODE_FOR_lsx_vpickev_d): Ditto. (CODE_FOR_lsx_vrepli_b): Ditto. (CODE_FOR_lsx_vrepli_h): Ditto. (CODE_FOR_lsx_vrepli_w): Ditto. (CODE_FOR_lsx_vrepli_d): Ditto. (CODE_FOR_lsx_vsat_b): Ditto. (CODE_FOR_lsx_vsat_h): Ditto. (CODE_FOR_lsx_vsat_w): Ditto. (CODE_FOR_lsx_vsat_d): Ditto. (CODE_FOR_lsx_vsat_bu): Ditto. (CODE_FOR_lsx_vsat_hu): Ditto. (CODE_FOR_lsx_vsat_wu): Ditto. (CODE_FOR_lsx_vsat_du): Ditto. (CODE_FOR_lsx_vavg_b): Ditto. (CODE_FOR_lsx_vavg_h): Ditto. (CODE_FOR_lsx_vavg_w): Ditto. (CODE_FOR_lsx_vavg_d): Ditto. (CODE_FOR_lsx_vavg_bu): Ditto. (CODE_FOR_lsx_vavg_hu): Ditto. (CODE_FOR_lsx_vavg_wu): Ditto. (CODE_FOR_lsx_vavg_du): Ditto. (CODE_FOR_lsx_vavgr_b): Ditto. (CODE_FOR_lsx_vavgr_h): Ditto. (CODE_FOR_lsx_vavgr_w): Ditto. (CODE_FOR_lsx_vavgr_d): Ditto. (CODE_FOR_lsx_vavgr_bu): Ditto. (CODE_FOR_lsx_vavgr_hu): Ditto. (CODE_FOR_lsx_vavgr_wu): Ditto. (CODE_FOR_lsx_vavgr_du): Ditto. (CODE_FOR_lsx_vssub_b): Ditto. (CODE_FOR_lsx_vssub_h): Ditto. (CODE_FOR_lsx_vssub_w): Ditto. (CODE_FOR_lsx_vssub_d): Ditto. (CODE_FOR_lsx_vssub_bu): Ditto. (CODE_FOR_lsx_vssub_hu): Ditto. (CODE_FOR_lsx_vssub_wu): Ditto. (CODE_FOR_lsx_vssub_du): Ditto. (CODE_FOR_lsx_vabsd_b): Ditto. (CODE_FOR_lsx_vabsd_h): Ditto. (CODE_FOR_lsx_vabsd_w): Ditto. (CODE_FOR_lsx_vabsd_d): Ditto. (CODE_FOR_lsx_vabsd_bu): Ditto. (CODE_FOR_lsx_vabsd_hu): Ditto. (CODE_FOR_lsx_vabsd_wu): Ditto. (CODE_FOR_lsx_vabsd_du): Ditto. (CODE_FOR_lsx_vftint_w_s): Ditto. (CODE_FOR_lsx_vftint_l_d): Ditto. (CODE_FOR_lsx_vftint_wu_s): Ditto. (CODE_FOR_lsx_vftint_lu_d): Ditto. (CODE_FOR_lsx_vandn_v): Ditto. (CODE_FOR_lsx_vorn_v): Ditto. (CODE_FOR_lsx_vneg_b): Ditto. (CODE_FOR_lsx_vneg_h): Ditto. (CODE_FOR_lsx_vneg_w): Ditto. (CODE_FOR_lsx_vneg_d): Ditto. (CODE_FOR_lsx_vshuf4i_d): Ditto. (CODE_FOR_lsx_vbsrl_v): Ditto. (CODE_FOR_lsx_vbsll_v): Ditto. (CODE_FOR_lsx_vfmadd_s): Ditto. (CODE_FOR_lsx_vfmadd_d): Ditto. (CODE_FOR_lsx_vfmsub_s): Ditto. (CODE_FOR_lsx_vfmsub_d): Ditto. (CODE_FOR_lsx_vfnmadd_s): Ditto. (CODE_FOR_lsx_vfnmadd_d): Ditto. (CODE_FOR_lsx_vfnmsub_s): Ditto. (CODE_FOR_lsx_vfnmsub_d): Ditto. (CODE_FOR_lsx_vmuh_b): Ditto. (CODE_FOR_lsx_vmuh_h): Ditto. (CODE_FOR_lsx_vmuh_w): Ditto. (CODE_FOR_lsx_vmuh_d): Ditto. (CODE_FOR_lsx_vmuh_bu): Ditto. (CODE_FOR_lsx_vmuh_hu): Ditto. (CODE_FOR_lsx_vmuh_wu): Ditto. (CODE_FOR_lsx_vmuh_du): Ditto. (CODE_FOR_lsx_vsllwil_h_b): Ditto. (CODE_FOR_lsx_vsllwil_w_h): Ditto. (CODE_FOR_lsx_vsllwil_d_w): Ditto. (CODE_FOR_lsx_vsllwil_hu_bu): Ditto. (CODE_FOR_lsx_vsllwil_wu_hu): Ditto. (CODE_FOR_lsx_vsllwil_du_wu): Ditto. (CODE_FOR_lsx_vssran_b_h): Ditto. (CODE_FOR_lsx_vssran_h_w): Ditto. (CODE_FOR_lsx_vssran_w_d): Ditto. (CODE_FOR_lsx_vssran_bu_h): Ditto. (CODE_FOR_lsx_vssran_hu_w): Ditto. (CODE_FOR_lsx_vssran_wu_d): Ditto. (CODE_FOR_lsx_vssrarn_b_h): Ditto. (CODE_FOR_lsx_vssrarn_h_w): Ditto. (CODE_FOR_lsx_vssrarn_w_d): Ditto. (CODE_FOR_lsx_vssrarn_bu_h): Ditto. (CODE_FOR_lsx_vssrarn_hu_w): Ditto. (CODE_FOR_lsx_vssrarn_wu_d): Ditto. (CODE_FOR_lsx_vssrln_bu_h): Ditto. (CODE_FOR_lsx_vssrln_hu_w): Ditto. (CODE_FOR_lsx_vssrln_wu_d): Ditto. (CODE_FOR_lsx_vssrlrn_bu_h): Ditto. (CODE_FOR_lsx_vssrlrn_hu_w): Ditto. (CODE_FOR_lsx_vssrlrn_wu_d): Ditto. (loongarch_builtin_vector_type): Ditto. (loongarch_build_cvpointer_type): Ditto. (LARCH_ATYPE_CVPOINTER): Ditto. (LARCH_ATYPE_BOOLEAN): Ditto. (LARCH_ATYPE_V2SF): Ditto. (LARCH_ATYPE_V2HI): Ditto. (LARCH_ATYPE_V2SI): Ditto. (LARCH_ATYPE_V4QI): Ditto. (LARCH_ATYPE_V4HI): Ditto. (LARCH_ATYPE_V8QI): Ditto. (LARCH_ATYPE_V2DI): Ditto. (LARCH_ATYPE_V4SI): Ditto. (LARCH_ATYPE_V8HI): Ditto. (LARCH_ATYPE_V16QI): Ditto. (LARCH_ATYPE_V2DF): Ditto. (LARCH_ATYPE_V4SF): Ditto. (LARCH_ATYPE_V4DI): Ditto. (LARCH_ATYPE_V8SI): Ditto. (LARCH_ATYPE_V16HI): Ditto. (LARCH_ATYPE_V32QI): Ditto. (LARCH_ATYPE_V4DF): Ditto. (LARCH_ATYPE_V8SF): Ditto. (LARCH_ATYPE_UV2DI): Ditto. (LARCH_ATYPE_UV4SI): Ditto. (LARCH_ATYPE_UV8HI): Ditto. (LARCH_ATYPE_UV16QI): Ditto. (LARCH_ATYPE_UV4DI): Ditto. (LARCH_ATYPE_UV8SI): Ditto. (LARCH_ATYPE_UV16HI): Ditto. (LARCH_ATYPE_UV32QI): Ditto. (LARCH_ATYPE_UV2SI): Ditto. (LARCH_ATYPE_UV4HI): Ditto. (LARCH_ATYPE_UV8QI): Ditto. (loongarch_builtin_vectorized_function): Ditto. (LARCH_GET_BUILTIN): Ditto. (loongarch_expand_builtin_insn): Ditto. (loongarch_expand_builtin_lsx_test_branch): Ditto. (loongarch_expand_builtin): Ditto. * config/loongarch/loongarch-ftypes.def (1): Ditto. (2): Ditto. (3): Ditto. (4): Ditto. * config/loongarch/lsxintrin.h: New file. 2023-09-05 Lulu Cheng * config/loongarch/constraints.md (M): Add Loongson LSX base instruction support. (N): Ditto. (O): Ditto. (P): Ditto. (R): Ditto. (S): Ditto. (YG): Ditto. (YA): Ditto. (YB): Ditto. (Yb): Ditto. (Yh): Ditto. (Yw): Ditto. (YI): Ditto. (YC): Ditto. (YZ): Ditto. (Unv5): Ditto. (Uuv5): Ditto. (Usv5): Ditto. (Uuv6): Ditto. (Urv8): Ditto. * config/loongarch/genopts/loongarch.opt.in: Ditto. * config/loongarch/loongarch-builtins.cc (loongarch_gen_const_int_vector): Ditto. * config/loongarch/loongarch-modes.def (VECTOR_MODES): Ditto. (VECTOR_MODE): Ditto. (INT_MODE): Ditto. * config/loongarch/loongarch-protos.h (loongarch_split_move_insn_p): Ditto. (loongarch_split_move_insn): Ditto. (loongarch_split_128bit_move): Ditto. (loongarch_split_128bit_move_p): Ditto. (loongarch_split_lsx_copy_d): Ditto. (loongarch_split_lsx_insert_d): Ditto. (loongarch_split_lsx_fill_d): Ditto. (loongarch_expand_vec_cmp): Ditto. (loongarch_const_vector_same_val_p): Ditto. (loongarch_const_vector_same_bytes_p): Ditto. (loongarch_const_vector_same_int_p): Ditto. (loongarch_const_vector_shuffle_set_p): Ditto. (loongarch_const_vector_bitimm_set_p): Ditto. (loongarch_const_vector_bitimm_clr_p): Ditto. (loongarch_lsx_vec_parallel_const_half): Ditto. (loongarch_gen_const_int_vector): Ditto. (loongarch_lsx_output_division): Ditto. (loongarch_expand_vector_init): Ditto. (loongarch_expand_vec_unpack): Ditto. (loongarch_expand_vec_perm): Ditto. (loongarch_expand_vector_extract): Ditto. (loongarch_expand_vector_reduc): Ditto. (loongarch_ldst_scaled_shift): Ditto. (loongarch_expand_vec_cond_expr): Ditto. (loongarch_expand_vec_cond_mask_expr): Ditto. (loongarch_builtin_vectorized_function): Ditto. (loongarch_gen_const_int_vector_shuffle): Ditto. (loongarch_build_signbit_mask): Ditto. * config/loongarch/loongarch.cc (loongarch_pass_aggregate_num_fpr): Ditto. (loongarch_setup_incoming_varargs): Ditto. (loongarch_emit_move): Ditto. (loongarch_const_vector_bitimm_set_p): Ditto. (loongarch_const_vector_bitimm_clr_p): Ditto. (loongarch_const_vector_same_val_p): Ditto. (loongarch_const_vector_same_bytes_p): Ditto. (loongarch_const_vector_same_int_p): Ditto. (loongarch_const_vector_shuffle_set_p): Ditto. (loongarch_symbol_insns): Ditto. (loongarch_cannot_force_const_mem): Ditto. (loongarch_valid_offset_p): Ditto. (loongarch_valid_index_p): Ditto. (loongarch_classify_address): Ditto. (loongarch_address_insns): Ditto. (loongarch_ldst_scaled_shift): Ditto. (loongarch_const_insns): Ditto. (loongarch_split_move_insn_p): Ditto. (loongarch_subword_at_byte): Ditto. (loongarch_legitimize_move): Ditto. (loongarch_builtin_vectorization_cost): Ditto. (loongarch_split_move_p): Ditto. (loongarch_split_move): Ditto. (loongarch_split_move_insn): Ditto. (loongarch_output_move_index_float): Ditto. (loongarch_split_128bit_move_p): Ditto. (loongarch_split_128bit_move): Ditto. (loongarch_split_lsx_copy_d): Ditto. (loongarch_split_lsx_insert_d): Ditto. (loongarch_split_lsx_fill_d): Ditto. (loongarch_output_move): Ditto. (loongarch_extend_comparands): Ditto. (loongarch_print_operand_reloc): Ditto. (loongarch_print_operand): Ditto. (loongarch_hard_regno_mode_ok_uncached): Ditto. (loongarch_hard_regno_call_part_clobbered): Ditto. (loongarch_hard_regno_nregs): Ditto. (loongarch_class_max_nregs): Ditto. (loongarch_can_change_mode_class): Ditto. (loongarch_mode_ok_for_mov_fmt_p): Ditto. (loongarch_secondary_reload): Ditto. (loongarch_vector_mode_supported_p): Ditto. (loongarch_preferred_simd_mode): Ditto. (loongarch_autovectorize_vector_modes): Ditto. (loongarch_lsx_output_division): Ditto. (loongarch_option_override_internal): Ditto. (loongarch_hard_regno_caller_save_mode): Ditto. (MAX_VECT_LEN): Ditto. (loongarch_spill_class): Ditto. (struct expand_vec_perm_d): Ditto. (loongarch_promote_function_mode): Ditto. (loongarch_expand_vselect): Ditto. (loongarch_starting_frame_offset): Ditto. (loongarch_expand_vselect_vconcat): Ditto. (TARGET_ASM_ALIGNED_DI_OP): Ditto. (TARGET_OPTION_OVERRIDE): Ditto. (TARGET_LEGITIMIZE_ADDRESS): Ditto. (TARGET_ASM_SELECT_RTX_SECTION): Ditto. (TARGET_ASM_FUNCTION_RODATA_SECTION): Ditto. (loongarch_expand_lsx_shuffle): Ditto. (TARGET_SCHED_INIT): Ditto. (TARGET_SCHED_REORDER): Ditto. (TARGET_SCHED_REORDER2): Ditto. (TARGET_SCHED_VARIABLE_ISSUE): Ditto. (TARGET_SCHED_ADJUST_COST): Ditto. (TARGET_SCHED_ISSUE_RATE): Ditto. (TARGET_SCHED_FIRST_CYCLE_MULTIPASS_DFA_LOOKAHEAD): Ditto. (TARGET_FUNCTION_OK_FOR_SIBCALL): Ditto. (TARGET_VALID_POINTER_MODE): Ditto. (TARGET_REGISTER_MOVE_COST): Ditto. (TARGET_MEMORY_MOVE_COST): Ditto. (TARGET_RTX_COSTS): Ditto. (TARGET_ADDRESS_COST): Ditto. (TARGET_IN_SMALL_DATA_P): Ditto. (TARGET_PREFERRED_RELOAD_CLASS): Ditto. (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Ditto. (TARGET_EXPAND_BUILTIN_VA_START): Ditto. (loongarch_expand_vec_perm): Ditto. (TARGET_PROMOTE_FUNCTION_MODE): Ditto. (TARGET_RETURN_IN_MEMORY): Ditto. (TARGET_FUNCTION_VALUE): Ditto. (TARGET_LIBCALL_VALUE): Ditto. (loongarch_try_expand_lsx_vshuf_const): Ditto. (TARGET_ASM_OUTPUT_MI_THUNK): Ditto. (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Ditto. (TARGET_PRINT_OPERAND): Ditto. (TARGET_PRINT_OPERAND_ADDRESS): Ditto. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Ditto. (TARGET_SETUP_INCOMING_VARARGS): Ditto. (TARGET_STRICT_ARGUMENT_NAMING): Ditto. (TARGET_MUST_PASS_IN_STACK): Ditto. (TARGET_PASS_BY_REFERENCE): Ditto. (TARGET_ARG_PARTIAL_BYTES): Ditto. (TARGET_FUNCTION_ARG): Ditto. (TARGET_FUNCTION_ARG_ADVANCE): Ditto. (TARGET_FUNCTION_ARG_BOUNDARY): Ditto. (TARGET_SCALAR_MODE_SUPPORTED_P): Ditto. (TARGET_INIT_BUILTINS): Ditto. (loongarch_expand_vec_perm_const_1): Ditto. (loongarch_expand_vec_perm_const_2): Ditto. (loongarch_vectorize_vec_perm_const): Ditto. (loongarch_cpu_sched_reassociation_width): Ditto. (loongarch_sched_reassociation_width): Ditto. (loongarch_expand_vector_extract): Ditto. (emit_reduc_half): Ditto. (loongarch_expand_vector_reduc): Ditto. (loongarch_expand_vec_unpack): Ditto. (loongarch_lsx_vec_parallel_const_half): Ditto. (loongarch_constant_elt_p): Ditto. (loongarch_gen_const_int_vector_shuffle): Ditto. (loongarch_expand_vector_init): Ditto. (loongarch_expand_lsx_cmp): Ditto. (loongarch_expand_vec_cond_expr): Ditto. (loongarch_expand_vec_cond_mask_expr): Ditto. (loongarch_expand_vec_cmp): Ditto. (loongarch_case_values_threshold): Ditto. (loongarch_build_const_vector): Ditto. (loongarch_build_signbit_mask): Ditto. (loongarch_builtin_support_vector_misalignment): Ditto. (TARGET_ASM_ALIGNED_HI_OP): Ditto. (TARGET_ASM_ALIGNED_SI_OP): Ditto. (TARGET_VECTORIZE_BUILTIN_VECTORIZATION_COST): Ditto. (TARGET_VECTOR_MODE_SUPPORTED_P): Ditto. (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Ditto. (TARGET_VECTORIZE_AUTOVECTORIZE_VECTOR_MODES): Ditto. (TARGET_VECTORIZE_VEC_PERM_CONST): Ditto. (TARGET_SCHED_REASSOCIATION_WIDTH): Ditto. (TARGET_CASE_VALUES_THRESHOLD): Ditto. (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Ditto. (TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT): Ditto. * config/loongarch/loongarch.h (TARGET_SUPPORTS_WIDE_INT): Ditto. (UNITS_PER_LSX_REG): Ditto. (BITS_PER_LSX_REG): Ditto. (BIGGEST_ALIGNMENT): Ditto. (LSX_REG_FIRST): Ditto. (LSX_REG_LAST): Ditto. (LSX_REG_NUM): Ditto. (LSX_REG_P): Ditto. (LSX_REG_RTX_P): Ditto. (IMM13_OPERAND): Ditto. (LSX_SUPPORTED_MODE_P): Ditto. * config/loongarch/loongarch.md (unknown,add,sub,not,nor,and,or,xor): Ditto. (unknown,add,sub,not,nor,and,or,xor,simd_add): Ditto. (unknown,none,QI,HI,SI,DI,TI,SF,DF,TF,FCC): Ditto. (mode" ): Ditto. (DF): Ditto. (SF): Ditto. (sf): Ditto. (DI): Ditto. (SI): Ditto. * config/loongarch/loongarch.opt: Ditto. * config/loongarch/predicates.md (const_lsx_branch_operand): Ditto. (const_uimm3_operand): Ditto. (const_8_to_11_operand): Ditto. (const_12_to_15_operand): Ditto. (const_uimm4_operand): Ditto. (const_uimm6_operand): Ditto. (const_uimm7_operand): Ditto. (const_uimm8_operand): Ditto. (const_imm5_operand): Ditto. (const_imm10_operand): Ditto. (const_imm13_operand): Ditto. (reg_imm10_operand): Ditto. (aq8b_operand): Ditto. (aq8h_operand): Ditto. (aq8w_operand): Ditto. (aq8d_operand): Ditto. (aq10b_operand): Ditto. (aq10h_operand): Ditto. (aq10w_operand): Ditto. (aq10d_operand): Ditto. (aq12b_operand): Ditto. (aq12h_operand): Ditto. (aq12w_operand): Ditto. (aq12d_operand): Ditto. (const_m1_operand): Ditto. (reg_or_m1_operand): Ditto. (const_exp_2_operand): Ditto. (const_exp_4_operand): Ditto. (const_exp_8_operand): Ditto. (const_exp_16_operand): Ditto. (const_exp_32_operand): Ditto. (const_0_or_1_operand): Ditto. (const_0_to_3_operand): Ditto. (const_0_to_7_operand): Ditto. (const_2_or_3_operand): Ditto. (const_4_to_7_operand): Ditto. (const_8_to_15_operand): Ditto. (const_16_to_31_operand): Ditto. (qi_mask_operand): Ditto. (hi_mask_operand): Ditto. (si_mask_operand): Ditto. (d_operand): Ditto. (db4_operand): Ditto. (db7_operand): Ditto. (db8_operand): Ditto. (ib3_operand): Ditto. (sb4_operand): Ditto. (sb5_operand): Ditto. (sb8_operand): Ditto. (sd8_operand): Ditto. (ub4_operand): Ditto. (ub8_operand): Ditto. (uh4_operand): Ditto. (uw4_operand): Ditto. (uw5_operand): Ditto. (uw6_operand): Ditto. (uw8_operand): Ditto. (addiur2_operand): Ditto. (addiusp_operand): Ditto. (andi16_operand): Ditto. (movep_src_register): Ditto. (movep_src_operand): Ditto. (fcc_reload_operand): Ditto. (muldiv_target_operand): Ditto. (const_vector_same_val_operand): Ditto. (const_vector_same_simm5_operand): Ditto. (const_vector_same_uimm5_operand): Ditto. (const_vector_same_ximm5_operand): Ditto. (const_vector_same_uimm6_operand): Ditto. (par_const_vector_shf_set_operand): Ditto. (reg_or_vector_same_val_operand): Ditto. (reg_or_vector_same_simm5_operand): Ditto. (reg_or_vector_same_uimm5_operand): Ditto. (reg_or_vector_same_ximm5_operand): Ditto. (reg_or_vector_same_uimm6_operand): Ditto. * doc/md.texi: Ditto. * config/loongarch/lsx.md: New file. 2023-09-05 Juzhe-Zhong * config/riscv/riscv-protos.h (lookup_vector_type_attribute): Export global. (get_all_predecessors): New function. (get_all_successors): Ditto. * config/riscv/riscv-v.cc (get_all_predecessors): Ditto. (get_all_successors): Ditto. * config/riscv/riscv-vector-builtins.cc (sizeless_type_p): Export global. * config/riscv/riscv-vsetvl.cc (get_all_predecessors): Remove it. 2023-09-05 Claudiu Zissulescu * config/arc/arc-protos.h (arc_output_addsi): Remove declaration. (split_addsi): Likewise. * config/arc/arc.cc (arc_print_operand): Add/repurpose 's', 'S', 'N', 'x', and 'J' code letters. (arc_output_addsi): Make it static. (split_addsi): Remove it. * config/arc/arc.h (UNSIGNED_INT*): New defines. (SINNED_INT*): Likewise. * config/arc/arc.md (type): Add add, sub, bxor types. (tst_movb): Change code letter from 's' to 'x'. (andsi3_i): Likewise. (addsi3_mixed): Refurbish the pattern. (call_i): Change code letter from 'S' to 'J'. * config/arc/arc700.md: Add newly introduced types. * config/arc/arcHS.md: Likewsie. * config/arc/arcHS4x.md: Likewise. * config/arc/constraints.md (Cca, CL2, Csp, C2a): Remove it. (CM4): Update description. (CP4, C6u, C6n, CIs, C4p): New constraint. 2023-09-05 Claudiu Zissulescu * common/config/arc/arc-common.cc (arc_option_optimization_table): Remove mbbit_peephole. * config/arc/arc.md (UNSPEC_ARC_DIRECT): Remove. (store_direct): Likewise. (BBIT peephole2): Likewise. * config/arc/arc.opt (mbbit-peephole): Ignore option. * doc/invoke.texi (mbbit-peephole): Update document. 2023-09-05 Jakub Jelinek * tree-ssa-tail-merge.cc (replace_block_by): Fix a comment typo: avreage -> average. 2023-09-05 Yang Yujie * config/loongarch/loongarch.h (CC1_SPEC): Mark normalized options passed from driver to gnat1 as explicit for multilib. 2023-09-05 Yang Yujie * config.gcc: add loongarch*-elf target. * config/loongarch/elf.h: New file. Link against newlib by default. 2023-09-05 Yang Yujie * config.gcc: use -mstrict-align for building libraries if --with-strict-align-lib is given. * doc/install.texi: likewise. 2023-09-05 Yang Yujie * config/loongarch/loongarch-c.cc: Export macros "__loongarch_{arch,tune}" in the preprocessor. 2023-09-05 Yang Yujie * config.gcc: Make --with-abi= obsolete, decide the default ABI with target triplet. Allow specifying multilib library build options with --with-multilib-list and --with-multilib-default. * config/loongarch/t-linux: Likewise. * config/loongarch/genopts/loongarch-strings: Likewise. * config/loongarch/loongarch-str.h: Likewise. * doc/install.texi: Likewise. * config/loongarch/genopts/loongarch.opt.in: Introduce -m[no-]l[a]sx options. Only process -m*-float and -m[no-]l[a]sx in the GCC driver. * config/loongarch/loongarch.opt: Likewise. * config/loongarch/la464.md: Likewise. * config/loongarch/loongarch-c.cc: Likewise. * config/loongarch/loongarch-cpu.cc: Likewise. * config/loongarch/loongarch-cpu.h: Likewise. * config/loongarch/loongarch-def.c: Likewise. * config/loongarch/loongarch-def.h: Likewise. * config/loongarch/loongarch-driver.cc: Likewise. * config/loongarch/loongarch-driver.h: Likewise. * config/loongarch/loongarch-opts.cc: Likewise. * config/loongarch/loongarch-opts.h: Likewise. * config/loongarch/loongarch.cc: Likewise. * doc/invoke.texi: Likewise. 2023-09-05 liuhongt * config/i386/sse.md: (V8BFH_128): Renamed to .. (VHFBF_128): .. this. (V16BFH_256): Renamed to .. (VHFBF_256): .. this. (avx512f_mov): Extend to V_128. (vcvtnee2ps_): Changed to VHFBF_128. (vcvtneo2ps_): Ditto. (vcvtnee2ps_): Changed to VHFBF_256. (vcvtneo2ps_): Ditto. * config/i386/i386-expand.cc (expand_vec_perm_blend): Canonicalize vec_merge. 2023-09-05 Juzhe-Zhong * config/riscv/riscv-opts.h (enum riscv_autovec_lmul_enum): Fix Dynamic status. * config/riscv/riscv-v.cc (preferred_simd_mode): Ditto. (autovectorize_vector_modes): Ditto. (vectorize_related_mode): Ditto. 2023-09-04 Iain Sandoe * config/rs6000/darwin.h (LIB_SPEC): Include libSystemStubs for all 32b Darwin PowerPC cases. 2023-09-04 Iain Sandoe * config/darwin-sections.def (static_init_section): Add the __TEXT,__StaticInit section. * config/darwin.cc (darwin_function_section): Use the static init section for global initializers, to match other platform toolchains. 2023-09-04 Iain Sandoe * config/darwin-sections.def (darwin_exception_section): Move to the __TEXT segment. * config/darwin.cc (darwin_emit_except_table_label): Align before the exception table label. * config/darwin.h (ASM_PREFERRED_EH_DATA_FORMAT): Use indirect PC- relative 4byte relocs. 2023-09-04 Iain Sandoe * config/darwin.cc (dump_machopic_symref_flags): New. (debug_machopic_symref_flags): New. 2023-09-04 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4_t): Add FP16 intrinsic def. (vfloat16mf2_t): Ditto. (vfloat16m1_t): Ditto. (vfloat16m2_t): Ditto. (vfloat16m4_t): Ditto. (vfloat16m8_t): Ditto. 2023-09-04 Jiufu Guo PR tree-optimization/108757 * match.pd ((X - N * M) / N): New pattern. ((X + N * M) / N): New pattern. ((X + C) div_rshift N): New pattern. 2023-09-04 Guo Jie * config/loongarch/loongarch.md: Support 'G' -> 'k' in movsf_hardfloat and movdf_hardfloat. 2023-09-04 Lulu Cheng * config/loongarch/loongarch.cc (loongarch_extend_comparands): In unsigned QImode test, check for sign extended subreg and/or constant operands, and do a sign extension in that case. * config/loongarch/loongarch.md (TARGET_64BIT): Define template cbranchqi4. 2023-09-04 Lulu Cheng * config/loongarch/loongarch.md: Allows fixed-point values to be loaded from memory into floating-point registers. 2023-09-03 Pan Li * config/riscv/autovec-vls.md (3): New pattern for fmax/fmin * config/riscv/vector.md: Add VLS modes to vfmax/vfmin. 2023-09-02 Mikael Morin * tree-diagnostic.cc (tree_diagnostics_defaults): Delete allocated pointer before overwriting it. 2023-09-02 chenxiaolong * config/loongarch/loongarch-builtins.cc (loongarch_init_builtins): Associate the __float128 type to float128_type_node so that it can be recognized by the compiler. * config/loongarch/loongarch-c.cc (loongarch_cpu_cpp_builtins): Add the flag "FLOAT128_TYPE" to gcc and associate a function with the suffix "q" to "f128". * doc/extend.texi:Added support for 128-bit floating-point functions on the LoongArch architecture. 2023-09-01 Jakub Jelinek PR c++/111069 * common.opt (fabi-version=): Document version 19. * doc/invoke.texi (-fabi-version=): Likewise. 2023-09-01 Lehua Ding * config/riscv/autovec-opt.md (*cond_): New combine pattern. (*cond_): Ditto. (*cond_): Ditto. (*cond_): Ditto. (*cond_): Ditto. (*cond_2): Ditto. * config/riscv/autovec.md (2): Adjust. (2): Adjust. (2): Adjust. (2): Adjust. (2): Adjust. (2): Adjust. * config/riscv/riscv-v.cc (needs_fp_rounding): Add INT->FP extend. 2023-09-01 Lehua Ding * config/riscv/autovec-opt.md (*cond_extend): New combine pattern. (*cond_trunc): Ditto. * config/riscv/autovec.md: Adjust. * config/riscv/riscv-v.cc (needs_fp_rounding): Add FP extend. 2023-09-01 Lehua Ding * config/riscv/autovec-opt.md (*cond_): New combine pattern. (*cond_): Ditto. (*cond_): Ditto. (*cond_trunc): Ditto. * config/riscv/autovec.md (2): Adjust. (2): Ditto. 2023-09-01 Lehua Ding * config/riscv/autovec.md: Adjust. * config/riscv/riscv-protos.h (expand_cond_len_unop): Ditto. (expand_cond_len_binop): Ditto. * config/riscv/riscv-v.cc (needs_fp_rounding): Ditto. (expand_cond_len_op): Ditto. (expand_cond_len_unop): Ditto. (expand_cond_len_binop): Ditto. (expand_cond_len_ternop): Ditto. 2023-09-01 Juzhe-Zhong * config/riscv/riscv-v.cc (autovectorize_vector_modes): Enable VECT_COMPARE_COSTS by default. 2023-09-01 Robin Dapp * config/riscv/autovec.md (vec_extractqi): New expander. 2023-09-01 Juzhe-Zhong * config/riscv/riscv-opts.h (enum riscv_autovec_lmul_enum): Add dynamic enum. * config/riscv/riscv.opt: Add dynamic compile option. 2023-09-01 Pan Li * config/riscv/autovec-vls.md (3): New pattern for vls floating-point autovec. * config/riscv/vector-iterators.md: New iterator for floating-point V and VLS. * config/riscv/vector.md: Add VLS to floating-point binop. 2023-09-01 Andrew Pinski PR tree-optimization/19832 * match.pd: Add pattern to optimize `(a != b) ? a OP b : c`. 2023-09-01 Lulu Cheng Guo Jie PR target/110484 * config/loongarch/loongarch.cc (loongarch_emit_stack_tie): Use the frame_pointer_needed to determine whether to use the $fp register. 2023-08-31 Andrew Pinski PR tree-optimization/110915 * match.pd (min_value, max_value): Extend to vector constants. 2023-08-31 Francois-Xavier Coudert * config.in: Regenerate. * config/darwin-c.cc: Change spelling to macOS. * config/darwin-driver.cc: Likewise. * config/darwin.h: Likewise. * configure.ac: Likewise. * doc/contrib.texi: Likewise. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * doc/plugins.texi: Likewise. * doc/tm.texi: Regenerate. * doc/tm.texi.in: Change spelling to macOS. * plugin.cc: Likewise. 2023-08-31 Pan Li * config/riscv/autovec-opt.md: Add FRM_REGNUM to vfnmadd/vfnmacc. * config/riscv/autovec.md: Ditto. 2023-08-31 Pan Li * config/riscv/autovec-opt.md: Add FRM_REGNUM to vfnmsac/vfnmsub * config/riscv/autovec.md: Ditto. 2023-08-31 Richard Sandiford * config/aarch64/aarch64.md (untyped_call): Emit a call_value rather than a call. List each possible destination register in the call pattern. 2023-08-31 Pan Li * config/riscv/autovec-opt.md: Add FRM_REGNUM to vfmsac/vfmsub * config/riscv/autovec.md: Ditto. 2023-08-31 Pan Li Ju-Zhe Zhong * config/riscv/autovec-opt.md: Add FRM_REGNUM to vfmadd/vfmacc. * config/riscv/autovec.md: Ditto. * config/riscv/vector-iterators.md: Add UNSPEC_VFFMA. 2023-08-31 Palmer Dabbelt * config/riscv/autovec.md (shifts): Use vector_scalar_shift_operand. * config/riscv/predicates.md (vector_scalar_shift_operand): New predicate. 2023-08-31 Juzhe-Zhong * config.gcc: Add vector cost model framework for RVV. * config/riscv/riscv.cc (riscv_vectorize_create_costs): Ditto. (TARGET_VECTORIZE_CREATE_COSTS): Ditto. * config/riscv/t-riscv: Ditto. * config/riscv/riscv-vector-costs.cc: New file. * config/riscv/riscv-vector-costs.h: New file. 2023-08-31 Jeevitha Palanisamy PR target/110411 * config/rs6000/mma.md (define_insn_and_split movoo): Disallow AltiVec address operands. (define_insn_and_split movxo): Likewise. * config/rs6000/predicates.md (vsx_quad_dform_memory_operand): Remove redundant mode size check. 2023-08-31 Lehua Ding * config/riscv/riscv-protos.h (IS_AGNOSTIC): Move to here. * config/riscv/riscv-v.cc (gen_no_side_effects_vsetvl_rtx): Change to default policy. * config/riscv/riscv-vector-builtins-bases.cc: Change to default policy. * config/riscv/riscv-vsetvl.h (IS_AGNOSTIC): Delete. * config/riscv/riscv.cc (riscv_print_operand): Use IS_AGNOSTIC to test. 2023-08-31 Lehua Ding * config/riscv/autovec-opt.md: Adjust. * config/riscv/autovec-vls.md: Ditto. * config/riscv/autovec.md: Ditto. * config/riscv/riscv-protos.h (enum insn_type): Add insn_type. (enum insn_flags): Add insn flags. (emit_vlmax_insn): Adjust. (emit_vlmax_fp_insn): Delete. (emit_vlmax_ternary_insn): Delete. (emit_vlmax_fp_ternary_insn): Delete. (emit_nonvlmax_insn): Adjust. (emit_vlmax_slide_insn): Delete. (emit_nonvlmax_slide_tu_insn): Delete. (emit_vlmax_merge_insn): Delete. (emit_vlmax_cmp_insn): Delete. (emit_vlmax_cmp_mu_insn): Delete. (emit_vlmax_masked_mu_insn): Delete. (emit_scalar_move_insn): Delete. (emit_nonvlmax_integer_move_insn): Delete. (emit_vlmax_insn_lra): Add. * config/riscv/riscv-v.cc (get_mask_mode_from_insn_flags): New. (emit_vlmax_insn): Adjust. (emit_nonvlmax_insn): Adjust. (emit_vlmax_insn_lra): Add. (emit_vlmax_fp_insn): Delete. (emit_vlmax_ternary_insn): Delete. (emit_vlmax_fp_ternary_insn): Delete. (emit_vlmax_slide_insn): Delete. (emit_nonvlmax_slide_tu_insn): Delete. (emit_nonvlmax_slide_insn): Delete. (emit_vlmax_merge_insn): Delete. (emit_vlmax_cmp_insn): Delete. (emit_vlmax_cmp_mu_insn): Delete. (emit_vlmax_masked_insn): Delete. (emit_nonvlmax_masked_insn): Delete. (emit_vlmax_masked_store_insn): Delete. (emit_nonvlmax_masked_store_insn): Delete. (emit_vlmax_masked_mu_insn): Delete. (emit_vlmax_masked_fp_mu_insn): Delete. (emit_nonvlmax_tu_insn): Delete. (emit_nonvlmax_fp_tu_insn): Delete. (emit_nonvlmax_tumu_insn): Delete. (emit_nonvlmax_fp_tumu_insn): Delete. (emit_scalar_move_insn): Delete. (emit_cpop_insn): Delete. (emit_vlmax_integer_move_insn): Delete. (emit_nonvlmax_integer_move_insn): Delete. (emit_vlmax_gather_insn): Delete. (emit_vlmax_masked_gather_mu_insn): Delete. (emit_vlmax_compress_insn): Delete. (emit_nonvlmax_compress_insn): Delete. (emit_vlmax_reduction_insn): Delete. (emit_vlmax_fp_reduction_insn): Delete. (emit_nonvlmax_fp_reduction_insn): Delete. (expand_vec_series): Adjust. (expand_const_vector): Adjust. (legitimize_move): Adjust. (sew64_scalar_helper): Adjust. (expand_tuple_move): Adjust. (expand_vector_init_insert_elems): Adjust. (expand_vector_init_merge_repeating_sequence): Adjust. (expand_vec_cmp): Adjust. (expand_vec_cmp_float): Adjust. (expand_vec_perm): Adjust. (shuffle_merge_patterns): Adjust. (shuffle_compress_patterns): Adjust. (shuffle_decompress_patterns): Adjust. (expand_load_store): Adjust. (expand_cond_len_op): Adjust. (expand_cond_len_unop): Adjust. (expand_cond_len_binop): Adjust. (expand_gather_scatter): Adjust. (expand_cond_len_ternop): Adjust. (expand_reduction): Adjust. (expand_lanes_load_store): Adjust. (expand_fold_extract_last): Adjust. * config/riscv/riscv.cc (vector_zero_call_used_regs): Adjust. * config/riscv/vector.md: Adjust. 2023-08-31 Haochen Gui PR target/96762 * config/rs6000/rs6000-string.cc (expand_block_move): Call vector load/store with length only on 64-bit Power10. 2023-08-31 Claudiu Zissulescu * config/arc/arc.cc (arc_split_mov_const): Use LSL16 only when SWAP option is enabled. * config/arc/arc.md (ashlsi2_cnt16): Likewise. 2023-08-31 Stamatis Markianos-Wright * config/arm/arm-mve-builtins-base.cc (vcaddq_rot90, vcaddq_rot270): Use common insn for signed and unsigned front-end definitions. * config/arm/arm_mve_builtins.def (vcaddq_rot90_m_u, vcaddq_rot270_m_u): Make common. (vcaddq_rot90_m_s, vcaddq_rot270_m_s): Remove. * config/arm/iterators.md (mve_insn): Merge signed and unsigned defs. (isu): Likewise. (rot): Likewise. (mve_rot): Likewise. (supf): Likewise. (VxCADDQ_M): Likewise. * config/arm/unspecs.md (unspec): Likewise. * config/arm/mve.md: Fix minor typo. 2023-08-31 liuhongt * config/i386/sse.md (_blendm): Merge VF_AVX512HFBFVL into VI12HFBF_AVX512VL. (VF_AVX512HFBF16): Renamed to VHFBF. (VF_AVX512FP16VL): Renamed to VHF_AVX512VL. (VF_AVX512FP16): Removed. (div3): Adjust VF_AVX512FP16VL to VHF_AVX512VL. (avx512fp16_rcp2): Ditto. (rsqrt2): Ditto. (_rsqrt2): Ditto. (vcond): Ditto. (vcond): Ditto. (_fmaddc__mask1): Ditto. (_fmaddc__maskz): Ditto. (_fcmaddc__mask1): Ditto. (_fcmaddc__maskz): Ditto. (cmla4): Ditto. (fma__fadd_fmul): Ditto. (fma__fadd_fcmul): Ditto. (fma___fma_zero): Ditto. (fma__fmaddc_bcst): Ditto. (fma__fcmaddc_bcst): Ditto. (___mask): Ditto. (cmul3): Ditto. (__): Ditto. (vec_unpacks_lo_): Ditto. (vec_unpacks_hi_): Ditto. (vec_unpack_fix_trunc_lo_): Ditto. (vec_unpack_fix_trunc_lo_): Ditto. (*vec_extract_0): Ditto. (*_cmp3): Extend to V48H_AVX512VL. 2023-08-31 Lehua Ding PR target/111234 * config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Remove condition. 2023-08-31 Jiufu Guo * range-op-mixed.h (operator_plus::overflow_free_p): New declare. (operator_minus::overflow_free_p): New declare. (operator_mult::overflow_free_p): New declare. * range-op.cc (range_op_handler::overflow_free_p): New function. (range_operator::overflow_free_p): New default function. (operator_plus::overflow_free_p): New function. (operator_minus::overflow_free_p): New function. (operator_mult::overflow_free_p): New function. * range-op.h (range_op_handler::overflow_free_p): New declare. (range_operator::overflow_free_p): New declare. * value-range.cc (irange::nonnegative_p): New function. (irange::nonpositive_p): New function. * value-range.h (irange::nonnegative_p): New declare. (irange::nonpositive_p): New declare. 2023-08-30 Dimitar Dimitrov PR target/106562 * config/pru/predicates.md (const_0_operand): New predicate. (pru_cstore_comparison_operator): Ditto. * config/pru/pru.md (cstore4): New pattern. (cstoredi4): Ditto. 2023-08-30 Richard Biener PR tree-optimization/111228 * match.pd ((vec_perm (vec_perm ..) @5 ..) -> (vec_perm @x @5 ..)): New simplifications. 2023-08-30 Juzhe-Zhong * config/riscv/autovec.md (movmisalign): Delete. 2023-08-30 Die Li Fei Gao * config/riscv/peephole.md: New pattern. * config/riscv/predicates.md (a0a1_reg_operand): New predicate. (zcmp_mv_sreg_operand): New predicate. * config/riscv/riscv.md: New predicate. * config/riscv/zc.md (*mva01s): New pattern. (*mvsa01): New pattern. 2023-08-30 Fei Gao * config/riscv/riscv.cc (riscv_zcmp_can_use_popretz): true if popretz can be used (riscv_gen_multi_pop_insn): interface to generate cm.pop[ret][z] (riscv_expand_epilogue): expand cm.pop[ret][z] in epilogue * config/riscv/riscv.md: define A0_REGNUM * config/riscv/zc.md (@gpr_multi_popretz_up_to_ra_): md for popretz ra (@gpr_multi_popretz_up_to_s0_): md for popretz ra, s0 (@gpr_multi_popretz_up_to_s1_): likewise (@gpr_multi_popretz_up_to_s2_): likewise (@gpr_multi_popretz_up_to_s3_): likewise (@gpr_multi_popretz_up_to_s4_): likewise (@gpr_multi_popretz_up_to_s5_): likewise (@gpr_multi_popretz_up_to_s6_): likewise (@gpr_multi_popretz_up_to_s7_): likewise (@gpr_multi_popretz_up_to_s8_): likewise (@gpr_multi_popretz_up_to_s9_): likewise (@gpr_multi_popretz_up_to_s11_): likewise 2023-08-30 Fei Gao * config/riscv/iterators.md (slot0_offset): slot 0 offset in stack GPRs area in bytes (slot1_offset): slot 1 offset in stack GPRs area in bytes (slot2_offset): likewise (slot3_offset): likewise (slot4_offset): likewise (slot5_offset): likewise (slot6_offset): likewise (slot7_offset): likewise (slot8_offset): likewise (slot9_offset): likewise (slot10_offset): likewise (slot11_offset): likewise (slot12_offset): likewise * config/riscv/predicates.md (stack_push_up_to_ra_operand): predicates of stack adjust pushing ra (stack_push_up_to_s0_operand): predicates of stack adjust pushing ra, s0 (stack_push_up_to_s1_operand): likewise (stack_push_up_to_s2_operand): likewise (stack_push_up_to_s3_operand): likewise (stack_push_up_to_s4_operand): likewise (stack_push_up_to_s5_operand): likewise (stack_push_up_to_s6_operand): likewise (stack_push_up_to_s7_operand): likewise (stack_push_up_to_s8_operand): likewise (stack_push_up_to_s9_operand): likewise (stack_push_up_to_s11_operand): likewise (stack_pop_up_to_ra_operand): predicates of stack adjust poping ra (stack_pop_up_to_s0_operand): predicates of stack adjust poping ra, s0 (stack_pop_up_to_s1_operand): likewise (stack_pop_up_to_s2_operand): likewise (stack_pop_up_to_s3_operand): likewise (stack_pop_up_to_s4_operand): likewise (stack_pop_up_to_s5_operand): likewise (stack_pop_up_to_s6_operand): likewise (stack_pop_up_to_s7_operand): likewise (stack_pop_up_to_s8_operand): likewise (stack_pop_up_to_s9_operand): likewise (stack_pop_up_to_s11_operand): likewise * config/riscv/riscv-protos.h (riscv_zcmp_valid_stack_adj_bytes_p):declaration * config/riscv/riscv.cc (struct riscv_frame_info): comment change (riscv_avoid_multi_push): helper function of riscv_use_multi_push (riscv_use_multi_push): true if multi push is used (riscv_multi_push_sregs_count): num of sregs in multi-push (riscv_multi_push_regs_count): num of regs in multi-push (riscv_16bytes_align): align to 16 bytes (riscv_stack_align): moved to a better place (riscv_save_libcall_count): no functional change (riscv_compute_frame_info): add zcmp frame info (riscv_for_each_saved_reg): save or restore fprs in specified slot for zcmp (riscv_adjust_multi_push_cfi_prologue): adjust cfi for cm.push (riscv_gen_multi_push_pop_insn): gen function for multi push and pop (get_multi_push_fpr_mask): get mask for the fprs pushed by cm.push (riscv_expand_prologue): allocate stack by cm.push (riscv_adjust_multi_pop_cfi_epilogue): adjust cfi for cm.pop[ret] (riscv_expand_epilogue): allocate stack by cm.pop[ret] (zcmp_base_adj): calculate stack adjustment base size (zcmp_additional_adj): calculate stack adjustment additional size (riscv_zcmp_valid_stack_adj_bytes_p): check if stack adjustment valid * config/riscv/riscv.h (RETURN_ADDR_MASK): mask of ra (S0_MASK): likewise (S1_MASK): likewise (S2_MASK): likewise (S3_MASK): likewise (S4_MASK): likewise (S5_MASK): likewise (S6_MASK): likewise (S7_MASK): likewise (S8_MASK): likewise (S9_MASK): likewise (S10_MASK): likewise (S11_MASK): likewise (MULTI_PUSH_GPR_MASK): GPR_MASK that cm.push can cover at most (ZCMP_MAX_SPIMM): max spimm value (ZCMP_SP_INC_STEP): zcmp sp increment step (ZCMP_INVALID_S0S10_SREGS_COUNTS): num of s0-s10 (ZCMP_S0S11_SREGS_COUNTS): num of s0-s11 (ZCMP_MAX_GRP_SLOTS): max slots of pushing and poping in zcmp (CALLEE_SAVED_FREG_NUMBER): get x of fsx(fs0 ~ fs11) * config/riscv/riscv.md: include zc.md * config/riscv/zc.md: New file. machine description for zcmp 2023-08-30 Jakub Jelinek PR tree-optimization/110914 * tree-ssa-strlen.cc (strlen_pass::handle_builtin_memcpy): Don't call adjust_last_stmt unless len is known constant. 2023-08-30 Jakub Jelinek PR tree-optimization/111015 * gimple-ssa-store-merging.cc (imm_store_chain_info::output_merged_store): Use wi::mask and wide_int_to_tree instead of unsigned HOST_WIDE_INT shift and build_int_cst to build BIT_AND_EXPR mask. 2023-08-30 Juzhe-Zhong * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Add MASK_LEN_ variant. (call_may_clobber_ref_p_1): Ditto. * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Ditto. (get_alias_ptr_type_for_ptr_address): Ditto. 2023-08-30 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vector_insn_info::get_avl_or_vl_reg): Fix bug. 2023-08-30 Juzhe-Zhong * config/riscv/autovec-vls.md (movmisalign): New pattern. * config/riscv/riscv.cc (riscv_support_vector_misalignment): Support VLS misalign. 2023-08-29 Philipp Tomsich * config/riscv/zicond.md: New splitters to rewrite single bit sign extension as the condition to a czero in the desired form. 2023-08-29 David Malcolm PR analyzer/99860 * doc/invoke.texi: Add -Wanalyzer-overlapping-buffers. 2023-08-29 David Malcolm PR analyzer/99860 * Makefile.in (ANALYZER_OBJS): Add analyzer/ranges.o. 2023-08-29 Jin Ma * config/riscv/riscv.cc (riscv_float_const_rtx_index_for_fli): zvfh can generate zfa extended instruction fli.h, just like zfh. 2023-08-29 Edwin Lu Vineet Gupta * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Generate __riscv_unaligned_avoid with value 1 or __riscv_unaligned_slow with value 1 or __riscv_unaligned_fast with value 1 * config/riscv/riscv.cc (riscv_option_override): Define riscv_user_wants_strict_align. Set riscv_user_wants_strict_align to TARGET_STRICT_ALIGN * config/riscv/riscv.h: Declare riscv_user_wants_strict_align 2023-08-29 Edwin Lu * config/riscv/autovec-vls.md: Update types * config/riscv/riscv.md: Add vector placeholder type * config/riscv/vector.md: Update types 2023-08-29 Carl Love * config/rs6000/dfp.md (UNSPEC_DQUAN): New unspec. (dfp_dqua_, dfp_dquai_): New define_insn. * config/rs6000/rs6000-builtins.def (__builtin_dfp_dqua, __builtin_dfp_dquai, __builtin_dfp_dquaq, __builtin_dfp_dquaqi): New buit-in definitions. * config/rs6000/rs6000-overload.def (__builtin_dfp_quantize): New overloaded definition. * doc/extend.texi: Add documentation for __builtin_dfp_quantize. 2023-08-29 Pan Li Ju-Zhe Zhong * config/riscv/riscv.cc (riscv_legitimize_poly_move): New declaration. (riscv_legitimize_const_move): Handle ref plus const poly. 2023-08-29 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_implied_info): Add implications from unprivileged extensions. (riscv_ext_version_table): Add stub support for all unprivileged extensions supported by Binutils as well as 'Zce', 'Zcmp', 'Zcmt'. 2023-08-29 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_version_table): Add stub support for all vendor extensions supported by Binutils. 2023-08-29 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_implied_info): Add implications from privileged extensions. (riscv_ext_version_table): Add stub support for all privileged extensions supported by Binutils. 2023-08-29 Lehua Ding * config/riscv/autovec.md: Adjust * config/riscv/riscv-protos.h (RVV_VUNDEF): Clean. (get_vlmax_rtx): Exported. * config/riscv/riscv-v.cc (emit_nonvlmax_fp_ternary_tu_insn): Deleted. (emit_vlmax_masked_gather_mu_insn): Adjust. (get_vlmax_rtx): New func. (expand_load_store): Adjust. (expand_cond_len_unop): Call expand_cond_len_op. (expand_cond_len_op): New subroutine. (expand_cond_len_binop): Call expand_cond_len_op. (expand_cond_len_ternop): Call expand_cond_len_op. (expand_lanes_load_store): Adjust. 2023-08-29 Jakub Jelinek PR middle-end/79173 PR middle-end/111209 * tree-ssa-math-opts.cc (match_uaddc_usubc): Match also just 2 limb uaddc/usubc with 0 carry-in on lower limb and ignored carry-out on higher limb. Don't match it though if it could be matched later on 4 argument addition/subtraction. 2023-08-29 Andrew Pinski PR tree-optimization/111147 * match.pd (`(x | y) & (~x ^ y)`) Use bitwise_inverted_equal_p instead of matching bit_not. 2023-08-29 Christophe Lyon * config/arm/arm-mve-builtins.cc (type_suffixes): Add missing initializer. 2023-08-29 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vector_insn_info::get_avl_or_vl_reg): New function. (pass_vsetvl::compute_local_properties): Fix bug. (pass_vsetvl::commit_vsetvls): Ditto. * config/riscv/riscv-vsetvl.h: New function. 2023-08-29 Lehua Ding PR target/110943 * config/riscv/predicates.md (vector_const_int_or_double_0_operand): New predicate. * config/riscv/riscv-vector-builtins.cc (function_expander::function_expander): force_reg mem target operand. * config/riscv/vector.md (@pred_mov): Wrapper. (*pred_mov): Remove imm -> reg pattern. (*pred_broadcast_imm): Add imm -> reg pattern. 2023-08-29 Lulu Cheng * common/config/loongarch/loongarch-common.cc: Enable '-free' on O2 and above. * doc/invoke.texi: Modify the description information of the '-free' compilation option and add the LoongArch description. 2023-08-28 Tsukasa OI * doc/extend.texi: Fix the description of __builtin_riscv_pause. 2023-08-28 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_version_table): Implement the 'Zihintpause' extension, version 2.0. (riscv_ext_flag_table) Add 'Zihintpause' handling. * config/riscv/riscv-builtins.cc: Remove availability predicate "always" and add "hint_pause". (riscv_builtins) : Add "pause" extension. * config/riscv/riscv-opts.h (MASK_ZIHINTPAUSE, TARGET_ZIHINTPAUSE): New. * config/riscv/riscv.md (riscv_pause): Adjust output based on TARGET_ZIHINTPAUSE. 2023-08-28 Andrew Pinski * match.pd (`(X & ~Y) | (~X & Y)`): Use bitwise_inverted_equal_p instead of specifically checking for ~X. 2023-08-28 Andrew Pinski PR tree-optimization/111146 * match.pd (`(x | y) & ~x`, `(x & y) | ~x`): Remove redundant pattern. 2023-08-28 Andrew Pinski * tree-ssa-phiopt.cc (gimple_simplify_phiopt): Add dump information when resimplify returns true. (match_simplify_replacement): Print only if accepted the match-and-simplify result rather than the full sequence. 2023-08-28 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::earliest_fusion): Skip never probability. (pass_vsetvl::compute_probabilities): Fix unitialized probability. 2023-08-28 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::earliest_fusion): Fix bug. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vmullbq_poly) (vmulltq_poly): New. * config/arm/arm-mve-builtins-base.def (vmullbq_poly) (vmulltq_poly): New. * config/arm/arm-mve-builtins-base.h (vmullbq_poly) (vmulltq_poly): New. * config/arm/arm_mve.h (vmulltq_poly): Remove. (vmullbq_poly): Remove. (vmullbq_poly_m): Remove. (vmulltq_poly_m): Remove. (vmullbq_poly_x): Remove. (vmulltq_poly_x): Remove. (vmulltq_poly_p8): Remove. (vmullbq_poly_p8): Remove. (vmulltq_poly_p16): Remove. (vmullbq_poly_p16): Remove. (vmullbq_poly_m_p8): Remove. (vmullbq_poly_m_p16): Remove. (vmulltq_poly_m_p8): Remove. (vmulltq_poly_m_p16): Remove. (vmullbq_poly_x_p8): Remove. (vmullbq_poly_x_p16): Remove. (vmulltq_poly_x_p8): Remove. (vmulltq_poly_x_p16): Remove. (__arm_vmulltq_poly_p8): Remove. (__arm_vmullbq_poly_p8): Remove. (__arm_vmulltq_poly_p16): Remove. (__arm_vmullbq_poly_p16): Remove. (__arm_vmullbq_poly_m_p8): Remove. (__arm_vmullbq_poly_m_p16): Remove. (__arm_vmulltq_poly_m_p8): Remove. (__arm_vmulltq_poly_m_p16): Remove. (__arm_vmullbq_poly_x_p8): Remove. (__arm_vmullbq_poly_x_p16): Remove. (__arm_vmulltq_poly_x_p8): Remove. (__arm_vmulltq_poly_x_p16): Remove. (__arm_vmulltq_poly): Remove. (__arm_vmullbq_poly): Remove. (__arm_vmullbq_poly_m): Remove. (__arm_vmulltq_poly_m): Remove. (__arm_vmullbq_poly_x): Remove. (__arm_vmulltq_poly_x): Remove. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-functions.h (class unspec_mve_function_exact_insn_vmull_poly): New. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (binary_widen_poly): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen_poly): New. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Add support for 'U' and 'p' format specifiers. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins.cc (type_suffixes): Handle poly_p field.. (TYPES_poly_8_16): New. (poly_8_16): New. * config/arm/arm-mve-builtins.def (p8): New type suffix. (p16): Likewise. * config/arm/arm-mve-builtins.h (enum type_class_index): Add TYPE_poly. (struct type_suffix_info): Add poly_p field. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vmullbq_int, vmulltq_int): New. * config/arm/arm-mve-builtins-base.def (vmullbq_int, vmulltq_int): New. * config/arm/arm-mve-builtins-base.h (vmullbq_int, vmulltq_int): New. * config/arm/arm_mve.h (vmulltq_int): Remove. (vmullbq_int): Remove. (vmullbq_int_m): Remove. (vmulltq_int_m): Remove. (vmullbq_int_x): Remove. (vmulltq_int_x): Remove. (vmulltq_int_u8): Remove. (vmullbq_int_u8): Remove. (vmulltq_int_s8): Remove. (vmullbq_int_s8): Remove. (vmulltq_int_u16): Remove. (vmullbq_int_u16): Remove. (vmulltq_int_s16): Remove. (vmullbq_int_s16): Remove. (vmulltq_int_u32): Remove. (vmullbq_int_u32): Remove. (vmulltq_int_s32): Remove. (vmullbq_int_s32): Remove. (vmullbq_int_m_s8): Remove. (vmullbq_int_m_s32): Remove. (vmullbq_int_m_s16): Remove. (vmullbq_int_m_u8): Remove. (vmullbq_int_m_u32): Remove. (vmullbq_int_m_u16): Remove. (vmulltq_int_m_s8): Remove. (vmulltq_int_m_s32): Remove. (vmulltq_int_m_s16): Remove. (vmulltq_int_m_u8): Remove. (vmulltq_int_m_u32): Remove. (vmulltq_int_m_u16): Remove. (vmullbq_int_x_s8): Remove. (vmullbq_int_x_s16): Remove. (vmullbq_int_x_s32): Remove. (vmullbq_int_x_u8): Remove. (vmullbq_int_x_u16): Remove. (vmullbq_int_x_u32): Remove. (vmulltq_int_x_s8): Remove. (vmulltq_int_x_s16): Remove. (vmulltq_int_x_s32): Remove. (vmulltq_int_x_u8): Remove. (vmulltq_int_x_u16): Remove. (vmulltq_int_x_u32): Remove. (__arm_vmulltq_int_u8): Remove. (__arm_vmullbq_int_u8): Remove. (__arm_vmulltq_int_s8): Remove. (__arm_vmullbq_int_s8): Remove. (__arm_vmulltq_int_u16): Remove. (__arm_vmullbq_int_u16): Remove. (__arm_vmulltq_int_s16): Remove. (__arm_vmullbq_int_s16): Remove. (__arm_vmulltq_int_u32): Remove. (__arm_vmullbq_int_u32): Remove. (__arm_vmulltq_int_s32): Remove. (__arm_vmullbq_int_s32): Remove. (__arm_vmullbq_int_m_s8): Remove. (__arm_vmullbq_int_m_s32): Remove. (__arm_vmullbq_int_m_s16): Remove. (__arm_vmullbq_int_m_u8): Remove. (__arm_vmullbq_int_m_u32): Remove. (__arm_vmullbq_int_m_u16): Remove. (__arm_vmulltq_int_m_s8): Remove. (__arm_vmulltq_int_m_s32): Remove. (__arm_vmulltq_int_m_s16): Remove. (__arm_vmulltq_int_m_u8): Remove. (__arm_vmulltq_int_m_u32): Remove. (__arm_vmulltq_int_m_u16): Remove. (__arm_vmullbq_int_x_s8): Remove. (__arm_vmullbq_int_x_s16): Remove. (__arm_vmullbq_int_x_s32): Remove. (__arm_vmullbq_int_x_u8): Remove. (__arm_vmullbq_int_x_u16): Remove. (__arm_vmullbq_int_x_u32): Remove. (__arm_vmulltq_int_x_s8): Remove. (__arm_vmulltq_int_x_s16): Remove. (__arm_vmulltq_int_x_s32): Remove. (__arm_vmulltq_int_x_u8): Remove. (__arm_vmulltq_int_x_u16): Remove. (__arm_vmulltq_int_x_u32): Remove. (__arm_vmulltq_int): Remove. (__arm_vmullbq_int): Remove. (__arm_vmullbq_int_m): Remove. (__arm_vmulltq_int_m): Remove. (__arm_vmullbq_int_x): Remove. (__arm_vmulltq_int_x): Remove. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (binary_widen): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen): New. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-functions.h (class unspec_mve_function_exact_insn_vmull): New. 2023-08-28 Christophe Lyon * config/arm/iterators.md (mve_insn): Add vmullb, vmullt. (isu): Add VMULLBQ_INT_S, VMULLBQ_INT_U, VMULLTQ_INT_S, VMULLTQ_INT_U. (supf): Add VMULLBQ_POLY_P, VMULLTQ_POLY_P, VMULLBQ_POLY_M_P, VMULLTQ_POLY_M_P. (VMULLBQ_INT, VMULLTQ_INT, VMULLBQ_INT_M, VMULLTQ_INT_M): Delete. (VMULLxQ_INT, VMULLxQ_POLY, VMULLxQ_INT_M, VMULLxQ_POLY_M): New. * config/arm/mve.md (mve_vmullbq_int_) (mve_vmulltq_int_): Merge into ... (@mve_q_int_) ... this. (mve_vmulltq_poly_p, mve_vmullbq_poly_p): Merge into ... (@mve_q_poly_): ... this. (mve_vmullbq_int_m_, mve_vmulltq_int_m_): Merge into ... (@mve_q_int_m_): ... this. (mve_vmullbq_poly_m_p, mve_vmulltq_poly_m_p): Merge into ... (@mve_q_poly_m_): ... this. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (parse_element_type): Remove dead check. 2023-08-28 Christophe Lyon * config/arm/arm-mve-builtins-shapes.cc (binary_acca_int32): Fix loop bound. (binary_acca_int64): Likewise. 2023-08-28 Aldy Hernandez * range-op-float.cc (fold_range): Handle relations. 2023-08-28 Lulu Cheng * config/loongarch/loongarch.cc (loongarch_expand_conditional_move): Optimize the function implementation. 2023-08-28 liuhongt PR target/111119 * config/i386/sse.md (V48_AVX2): Rename to .. (V48_128_256): .. this. (ssefltmodesuffix): Extend to V4SF/V8SF/V2DF/V4DF. (_maskload): Change V48_AVX2 to V48_128_256, also generate vmaskmov{ps,pd} for integral modes when TARGET_AVX2 is not available. (_maskstore): Ditto. (maskload): Change V48_AVX2 to V48_128_256. (maskstore): Ditto. 2023-08-28 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vsetvl_vtype_change_only_p): New function. (after_or_same_p): Ditto. (find_reg_killed_by): Delete. (has_vsetvl_killed_avl_p): Ditto. (anticipatable_occurrence_p): Refactor. (any_set_in_bb_p): Delete. (count_regno_occurrences): Ditto. (backward_propagate_worthwhile_p): Ditto. (demands_can_be_fused_p): Ditto. (earliest_pred_can_be_fused_p): New function. (vsetvl_dominated_by_p): Ditto. (vector_insn_info::parse_insn): Refactor. (vector_insn_info::merge): Refactor. (vector_insn_info::dump): Refactor. (vector_infos_manager::vector_infos_manager): Refactor. (vector_infos_manager::all_empty_predecessor_p): Delete. (vector_infos_manager::all_same_avl_p): Ditto. (vector_infos_manager::create_bitmap_vectors): Refactor. (vector_infos_manager::free_bitmap_vectors): Refactor. (vector_infos_manager::dump): Refactor. (pass_vsetvl::update_block_info): New function. (enum fusion_type): Ditto. (pass_vsetvl::get_backward_fusion_type): Delete. (pass_vsetvl::hard_empty_block_p): Ditto. (pass_vsetvl::backward_demand_fusion): Ditto. (pass_vsetvl::forward_demand_fusion): Ditto. (pass_vsetvl::demand_fusion): Ditto. (pass_vsetvl::cleanup_illegal_dirty_blocks): Ditto. (pass_vsetvl::compute_local_properties): Ditto. (pass_vsetvl::earliest_fusion): New function. (pass_vsetvl::vsetvl_fusion): Ditto. (pass_vsetvl::commit_vsetvls): Refactor. (get_first_vsetvl_before_rvv_insns): Ditto. (pass_vsetvl::global_eliminate_vsetvl_insn): Ditto. (pass_vsetvl::cleanup_earliest_vsetvls): New function. (pass_vsetvl::df_post_optimization): Refactor. (pass_vsetvl::lazy_vsetvl): Ditto. * config/riscv/riscv-vsetvl.h: Ditto. 2023-08-26 Juzhe-Zhong * config/riscv/autovec.md (len_fold_extract_last_): New pattern. * config/riscv/riscv-protos.h (enum insn_type): New enum. (expand_fold_extract_last): New function. * config/riscv/riscv-v.cc (emit_nonvlmax_slide_insn): Ditto. (emit_cpop_insn): Ditto. (emit_nonvlmax_compress_insn): Ditto. (expand_fold_extract_last): Ditto. * config/riscv/vector.md: Fix vcpop.m ratio demand. 2023-08-25 Edwin Lu * config/riscv/sync-rvwmo.md: updated types to "multi" or "atomic" based on number of assembly lines generated * config/riscv/sync-ztso.md: likewise * config/riscv/sync.md: likewise 2023-08-25 Jin Ma * common/config/riscv/riscv-common.cc: Add zfa extension version, which depends on the F extension. * config/riscv/constraints.md (zfli): Constrain the floating point number that the instructions FLI.H/S/D can load. * config/riscv/iterators.md (ceil): New. * config/riscv/riscv-opts.h (MASK_ZFA): New. (TARGET_ZFA): New. * config/riscv/riscv-protos.h (riscv_float_const_rtx_index_for_fli): New. * config/riscv/riscv.cc (riscv_float_const_rtx_index_for_fli): New. (riscv_cannot_force_const_mem): If instruction FLI.H/S/D can be used, memory is not applicable. (riscv_const_insns): Likewise. (riscv_legitimize_const_move): Likewise. (riscv_split_64bit_move_p): If instruction FLI.H/S/D can be used, no split is required. (riscv_split_doubleword_move): Likewise. (riscv_output_move): Output the mov instructions in zfa extension. (riscv_print_operand): Output the floating-point value of the FLI.H/S/D immediate in assembly. (riscv_secondary_memory_needed): Likewise. * config/riscv/riscv.md (fminm3): New. (fmaxm3): New. (movsidf2_low_rv32): New. (movsidf2_high_rv32): New. (movdfsisi3_rv32): New. (f_quiet4_zfa): New. * config/riscv/riscv.opt: New. 2023-08-25 Sandra Loosemore * omp-api.h: New. * omp-general.cc (omp_runtime_api_procname): New. (omp_runtime_api_call): Moved here from omp-low.cc, and make non-static. * omp-general.h: Include omp-api.h. * omp-low.cc (omp_runtime_api_call): Delete this copy. 2023-08-25 Sandra Loosemore * doc/generic.texi (OpenMP): Document OMP_STRUCTURED_BLOCK. * doc/gimple.texi (GIMPLE instruction set): Add GIMPLE_OMP_STRUCTURED_BLOCK. (GIMPLE_OMP_STRUCTURED_BLOCK): New subsection. * gimple-low.cc (lower_stmt): Error on GIMPLE_OMP_STRUCTURED_BLOCK. * gimple-pretty-print.cc (dump_gimple_omp_block): Handle GIMPLE_OMP_STRUCTURED_BLOCK. (pp_gimple_stmt_1): Likewise. * gimple-walk.cc (walk_gimple_stmt): Likewise. * gimple.cc (gimple_build_omp_structured_block): New. * gimple.def (GIMPLE_OMP_STRUCTURED_BLOCK): New. * gimple.h (gimple_build_omp_structured_block): Declare. (gimple_has_substatements): Handle GIMPLE_OMP_STRUCTURED_BLOCK. (CASE_GIMPLE_OMP): Likewise. * gimplify.cc (is_gimple_stmt): Handle OMP_STRUCTURED_BLOCK. (gimplify_expr): Likewise. * omp-expand.cc (GIMPLE_OMP_STRUCTURED_BLOCK): Error on GIMPLE_OMP_STRUCTURED_BLOCK. * omp-low.cc (scan_omp_1_stmt): Handle GIMPLE_OMP_STRUCTURED_BLOCK. (lower_omp_1): Likewise. (diagnose_sb_1): Likewise. (diagnose_sb_2): Likewise. * tree-inline.cc (remap_gimple_stmt): Handle GIMPLE_OMP_STRUCTURED_BLOCK. (estimate_num_insns): Likewise. * tree-nested.cc (convert_nonlocal_reference_stmt): Likewise. (convert_local_reference_stmt): Likewise. (convert_gimple_call): Likewise. * tree-pretty-print.cc (dump_generic_node): Handle OMP_STRUCTURED_BLOCK. * tree.def (OMP_STRUCTURED_BLOCK): New. * tree.h (OMP_STRUCTURED_BLOCK_BODY): New. 2023-08-25 Vineet Gupta * config/riscv/riscv.cc (riscv_rtx_costs): Adjust const_int cost. Add some comments about different constants handling. 2023-08-25 Andrew Pinski * match.pd (`a ? one_zero : one_zero`): Move below detection of minmax. 2023-08-25 Andrew Pinski * match.pd (`a | C -> C`): New pattern. 2023-08-25 Uros Bizjak * caller-save.cc (new_saved_hard_reg): Rename TRUE/FALSE to true/false. (setup_save_areas): Ditto. * gcc.cc (set_collect_gcc_options): Ditto. (driver::build_multilib_strings): Ditto. (print_multilib_info): Ditto. * genautomata.cc (gen_cpu_unit): Ditto. (gen_query_cpu_unit): Ditto. (gen_bypass): Ditto. (gen_excl_set): Ditto. (gen_presence_absence_set): Ditto. (gen_presence_set): Ditto. (gen_final_presence_set): Ditto. (gen_absence_set): Ditto. (gen_final_absence_set): Ditto. (gen_automaton): Ditto. (gen_regexp_repeat): Ditto. (gen_regexp_allof): Ditto. (gen_regexp_oneof): Ditto. (gen_regexp_sequence): Ditto. (process_decls): Ditto. (reserv_sets_are_intersected): Ditto. (initiate_excl_sets): Ditto. (form_reserv_sets_list): Ditto. (check_presence_pattern_sets): Ditto. (check_absence_pattern_sets): Ditto. (check_regexp_units_distribution): Ditto. (check_unit_distributions_to_automata): Ditto. (create_ainsns): Ditto. (output_insn_code_cases): Ditto. (output_internal_dead_lock_func): Ditto. (form_important_insn_automata_lists): Ditto. * gengtype-state.cc (read_state_files_list): Ditto. * gengtype.cc (main): Ditto. * gimple-array-bounds.cc (array_bounds_checker::check_array_bounds): Ditto. * gimple.cc (gimple_build_call_from_tree): Ditto. (preprocess_case_label_vec_for_gimple): Ditto. * gimplify.cc (gimplify_call_expr): Ditto. * ordered-hash-map-tests.cc (test_map_of_int_to_strings): Ditto. 2023-08-25 Richard Biener PR tree-optimization/111137 * tree-vect-data-refs.cc (vect_slp_analyze_load_dependences): Properly handle grouped stores from other SLP instances. 2023-08-25 Richard Biener * tree-vect-data-refs.cc (vect_slp_analyze_store_dependences): Split out from vect_slp_analyze_node_dependences, remove dead code. (vect_slp_analyze_load_dependences): Split out from vect_slp_analyze_node_dependences, adjust comments. Process queued stores before any disambiguation. (vect_slp_analyze_node_dependences): Remove. (vect_slp_analyze_instance_dependence): Adjust. 2023-08-25 Aldy Hernandez * range-op-float.cc (frelop_early_resolve): Rewrite for better NAN handling. (operator_not_equal::fold_range): Adjust for relations. (operator_lt::fold_range): Same. (operator_gt::fold_range): Same. (foperator_unordered_equal::fold_range): Same. (foperator_unordered_lt::fold_range): Same. (foperator_unordered_le::fold_range): Same. (foperator_unordered_gt::fold_range): Same. (foperator_unordered_ge::fold_range): Same. 2023-08-25 Richard Biener PR tree-optimization/111136 * tree-vect-loop.cc (vect_dissolve_slp_only_groups): For stores force STMT_VINFO_STRIDED_P and also duplicate that to all elements. 2023-08-25 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::compute_local_properties): Add early continue. 2023-08-25 liuhongt * config/i386/sse.md (vec_set): Removed. (V_128H): Merge into .. (V_128): .. this. (V_256H): Merge into .. (V_256): .. this. (V_512): Add V32HF, V32BF. (*ssse3_palignr_perm): Adjust mode iterator from V_128H to V_128. (vcond): Removed (vcondu): Removed. (avx_vbroadcastf128_): Refator from V_256H to V_256. 2023-08-25 Hongyu Wang PR target/111127 * config/i386/sse.md (avx512f_cvtne2ps2bf16__maskz): Adjust paramter order. 2023-08-24 Uros Bizjak PR target/94866 * config/i386/sse.md (*sse2_movq128__1): New insn pattern. 2023-08-24 David Malcolm PR analyzer/105899 * doc/invoke.texi (Static Analyzer Options): Add "strcat" to the list of functions known to the analyzer. 2023-08-24 Richard Biener PR tree-optimization/111123 * tree-ssa-ccp.cc (pass_fold_builtins::execute): Do not remove indirect clobbers here ... * tree-outof-ssa.cc (rewrite_out_of_ssa): ... but here. (remove_indirect_clobbers): New function. 2023-08-24 Jan Hubicka * cfg.h (struct control_flow_graph): New field full_profile. * auto-profile.cc (afdo_annotate_cfg): Set full_profile to true. * cfg.cc (init_flow): Set full_profile to false. * graphite.cc (graphite_transform_loops): Set full_profile to false. * lto-streamer-in.cc (input_cfg): Initialize full_profile flag. * predict.cc (pass_profile::execute): Set full_profile to true. * symtab-thunks.cc (expand_thunk): Set full_profile to true. * tree-cfg.cc (gimple_verify_flow_info): Verify that profile is full if full_profile is set. * tree-inline.cc (initialize_cfun): Initialize full_profile. (expand_call_inline): Combine full_profile. 2023-08-24 Richard Biener * tree-vect-slp.cc (vect_build_slp_tree_1): Rename load_p to ldst_p, fix mistakes and rely on STMT_VINFO_DATA_REF. 2023-08-24 Jan Hubicka * gimple-harden-conditionals.cc (insert_check_and_trap): Set count of newly build trap bb. 2023-08-24 Juzhe-Zhong * config/riscv/riscv.cc (riscv_preferred_else_value): Remove it since it forbid COND_LEN_FMS/COND_LEN_FNMS STMT fold. (TARGET_PREFERRED_ELSE_VALUE): Ditto. 2023-08-24 Robin Dapp * common/config/riscv/riscv-common.cc: Add -fsched-pressure. * config/riscv/riscv.cc (riscv_option_override): Set sched pressure algorithm. 2023-08-24 Robin Dapp * config/riscv/riscv.cc (riscv_print_operand): Allow vk operand. 2023-08-24 Richard Biener PR tree-optimization/111125 * tree-vect-slp.cc (vect_slp_function): Split at novector loop entry, do not push blocks in novector loops. 2023-08-24 Richard Sandiford * doc/extend.texi: Document the C [[__extension__ ...]] construct. 2023-08-24 Juzhe-Zhong * genmatch.cc (decision_tree::gen): Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold. * gimple-match-exports.cc (gimple_simplify): Ditto. (gimple_resimplify6): New function. (gimple_resimplify7): New function. (gimple_match_op::resimplify): Support COND_LEN_FNMA/COND_LEN_FMS/COND_LEN_FNMS gimple fold. (convert_conditional_op): Ditto. (build_call_internal): Ditto. (try_conditional_simplification): Ditto. (gimple_extract): Ditto. * gimple-match.h (gimple_match_cond::gimple_match_cond): Ditto. * internal-fn.cc (CASE): Ditto. 2023-08-24 Richard Biener PR tree-optimization/111115 * tree-vectorizer.h (vect_slp_child_index_for_operand): New. * tree-vect-data-refs.cc (can_group_stmts_p): Also group .MASK_STORE. * tree-vect-slp.cc (arg3_arg2_map): New. (vect_get_operand_map): Handle IFN_MASK_STORE. (vect_slp_child_index_for_operand): New function. (vect_build_slp_tree_1): Handle statements with no LHS, masked store ifns. (vect_remove_slp_scalar_calls): Likewise. * tree-vect-stmts.cc (vect_check_store_rhs): Lookup the SLP child corresponding to the ifn value index. (vectorizable_store): Likewise for the mask index. Support masked stores. (vectorizable_load): Lookup the SLP child corresponding to the ifn mask index. 2023-08-24 Richard Biener PR tree-optimization/111125 * tree-vect-slp.cc (vectorizable_bb_reduc_epilogue): Account for the remain_defs processing. 2023-08-24 Richard Sandiford * config/aarch64/aarch64.cc: Include ssa.h. (aarch64_multiply_add_p): Require the second operand of an Advanced SIMD subtraction to be a multiplication. Assume that such an operation won't be fused if the second operand is used multiple times and if the first operand is also a multiplication. 2023-08-24 Juzhe-Zhong * tree-vect-loop.cc (vectorizable_reduction): Apply LEN_FOLD_EXTRACT_LAST. * tree-vect-stmts.cc (vectorizable_condition): Ditto. 2023-08-24 Richard Biener PR tree-optimization/111128 * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Emit external shift operand inline if we promoted it with another pattern stmt. 2023-08-24 Pan Li * config/riscv/autovec.md: Fix typo. 2023-08-24 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class binop_frm): Removed. (class reverse_binop_frm): Ditto. (class widen_binop_frm): Ditto. (class vfmacc_frm): Ditto. (class vfnmacc_frm): Ditto. (class vfmsac_frm): Ditto. (class vfnmsac_frm): Ditto. (class vfmadd_frm): Ditto. (class vfnmadd_frm): Ditto. (class vfmsub_frm): Ditto. (class vfnmsub_frm): Ditto. (class vfwmacc_frm): Ditto. (class vfwnmacc_frm): Ditto. (class vfwmsac_frm): Ditto. (class vfwnmsac_frm): Ditto. (class unop_frm): Ditto. (class vfrec7_frm): Ditto. (class binop): Add frm_op_type template arg. (class unop): Ditto. (class widen_binop): Ditto. (class widen_binop_fp): Ditto. (class reverse_binop): Ditto. (class vfmacc): Ditto. (class vfnmsac): Ditto. (class vfmadd): Ditto. (class vfnmsub): Ditto. (class vfnmacc): Ditto. (class vfmsac): Ditto. (class vfnmadd): Ditto. (class vfmsub): Ditto. (class vfwmacc): Ditto. (class vfwnmacc): Ditto. (class vfwmsac): Ditto. (class vfwnmsac): Ditto. (class float_misc): Ditto. 2023-08-24 Andrew Pinski PR tree-optimization/111109 * match.pd (ior(cond,cond), ior(vec_cond,vec_cond)): Add check to make sure cmp and icmp are inverse. 2023-08-24 Andrew Pinski PR tree-optimization/95929 * match.pd (convert?(-a)): New pattern for 1bit integer types. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Add avx10_set and version and detect avx10.1. (cpu_indicator_init): Handle avx10.1-512. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX10_512BIT_SET): New. (OPTION_MASK_ISA2_AVX10_1_SET): Ditto. (OPTION_MASK_ISA2_AVX10_512BIT_UNSET): Ditto. (OPTION_MASK_ISA2_AVX10_1_UNSET): Ditto. (OPTION_MASK_ISA2_AVX2_UNSET): Modify for AVX10_1. (ix86_handle_option): Handle -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVX10_512BIT, FEATURE_AVX10_1 and FEATURE_AVX10_512BIT. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for AVX10_512BIT, AVX10_1 and AVX10_1_512. * config/i386/constraints.md (Yk): Add AVX10_1. (Yv): Ditto. (k): Ditto. * config/i386/cpuid.h (bit_AVX10): New. (bit_AVX10_256): Ditto. (bit_AVX10_512): Ditto. * config/i386/i386-c.cc (ix86_target_macros_internal): Define AVX10_512BIT and AVX10_1. * config/i386/i386-isa.def (AVX10_512BIT): Add DEF_PTA(AVX10_512BIT). (AVX10_1): Add DEF_PTA(AVX10_1). * config/i386/i386-options.cc (isa2_opts): Add -mavx10.1. (ix86_valid_target_attribute_inner_p): Handle avx10-512bit, avx10.1 and avx10.1-512. (ix86_option_override_internal): Enable AVX512{F,VL,BW,DQ,CD,BF16, FP16,VBMI,VBMI2,VNNI,IFMA,BITALG,VPOPCNTDQ} features for avx10.1-512. (ix86_valid_target_attribute_inner_p): Handle AVX10_1. * config/i386/i386.cc (ix86_get_ssemov): Add AVX10_1. (ix86_conditional_register_usage): Ditto. (ix86_hard_regno_mode_ok): Ditto. (ix86_rtx_costs): Ditto. * config/i386/i386.h (VALID_MASK_AVX10_MODE): New macro. * config/i386/i386.opt: Add option -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/extend.texi: Document avx10.1, avx10.1-256 and avx10.1-512. * doc/invoke.texi: Document -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/sourcebuild.texi: Document target avx10.1, avx10.1-256 and avx10.1-512. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * common/config/i386/i386-common.cc (ix86_check_avx10): New function to check isa_flags and isa_flags_explicit to emit warning when AVX10 is enabled by "-m" option. (ix86_check_avx512): New function to check isa_flags and isa_flags_explicit to emit warning when AVX512 is enabled by "-m" option. (ix86_handle_option): Do not change the flags when warning is emitted. * config/i386/driver-i386.cc (host_detect_local_cpu): Do not append -mno-avx10.1 for -march=native. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * common/config/i386/i386-common.cc (ix86_check_avx10_vector_width): New function to check isa_flags to emit a warning when there is a conflict in AVX10 options for vector width. (ix86_handle_option): Add check for avx10.1-256 and avx10.1-512. * config/i386/driver-i386.cc (host_detect_local_cpu): Do not append -mno-avx10-max-512bit for -march=native. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/i386-builtins.cc (def_builtin): Handle AVX10_1. * config/i386/i386-expand.cc (ix86_check_builtin_isa_match): Ditto. (ix86_expand_sse2_mulvxdi3): Add TARGET_AVX10_1. * config/i386/i386.md: Add new isa attribute avx10_1_or_avx512dq and avx10_1_or_avx512vl. * config/i386/sse.md: (VF2_AVX512VLDQ_AVX10_1): New. (VF1_128_256VLDQ_AVX10_1): Ditto. (VI8_AVX512VLDQ_AVX10_1): Ditto. (_andnot3): Add TARGET_AVX10_1 and change isa attr from avx512dq to avx10_1_or_avx512dq. (*andnot3): Add TARGET_AVX10_1 and change isa attr from avx512vl to avx10_1_or_avx512vl. (fix_trunc2): Change iterator to VF2_AVX512VLDQ_AVX10_1. Remove target check. (fix_notrunc2): Ditto. (ufix_notrunc2): Ditto. (fix_trunc2): Change iterator to VF1_128_256VLDQ_AVX10_1. Remove target check. (avx512dq_fix_truncv2sfv2di2): Add TARGET_AVX10_1. (fix_truncv2sfv2di2): Ditto. (cond_mul): Change iterator to VI8_AVX10_1_AVX512DQVL. Remove target check. (avx512dq_mul3): Ditto. (*avx512dq_mul3): Ditto. (VI4F_BRCST32x2): Add TARGET_AVX512DQ and TARGET_AVX10_1. (avx512dq_broadcast): Remove target check. (VI8F_BRCST64x2): Add TARGET_AVX512DQ and TARGET_AVX10_1. (avx512dq_broadcast_1): Remove target check. * config/i386/subst.md (mask_mode512bit_condition): Add TARGET_AVX10_1. (mask_avx512vl_condition): Ditto. (mask): Ditto. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/i386.cc (standard_sse_constant_opcode): Add TARGET_AVX10_1. * config/i386/sse.md: (VI48_AVX512VL_AVX10_1): New. (VI48_AVX512VLDQ_AVX10_1): Ditto. (VF2_AVX512VL): Remove. (VI8_256_512VLDQ_AVX10_1): Rename from VI8_256_512. Add TARGET_AVX10_1. (*3): Change isa attribute to avx10_1_or_avx512dq. Add TARGET_AVX10_1. (3): Add TARGET_AVX10_1. Change isa attr to avx10_1_or_avx512vl. (avx512dq_cvtps2qq): Change iterator to VI8_256_512VLDQ_AVX10_1. Remove target check. (avx512dq_cvtps2qqv2di): Add TARGET_AVX10_1. (avx512dq_cvtps2uqq): Change iterator to VI8_256_512VLDQ_AVX10_1. Remove target check. (avx512dq_cvtps2uqqv2di): Add TARGET_AVX10_1. (float2): Change iterator to VF2_AVX512VLDQ_AVX10_1. Remove target check. (float2): Change iterator to VF1_128_256VLDQ_AVX10_1. Remove target check. (floatv4div4sf2): Add TARGET_AVX10_1. (avx512dq_floatv2div2sf2): Ditto. (*avx512dq_floatv2div2sf2): Ditto. (floatv2div2sf2): Ditto. (floatv2div2sf2_mask): Ditto. (*floatv2div2sf2_mask): Ditto. (*floatv2div2sf2_mask_1): Ditto. (_cvt2mask): Change iterator to VI48_AVX512VLDQ_AVX10_1. Remove target check. (_cvtmask2): Ditto. (*_cvtmask2): Change iterator to VI48_AVX512VL_AVX10_1. Remove target check. Change when constraint is enabled. 2023-08-24 Haochen Jiang Revert: 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/sse.md (VF_AVX512VLDQ_AVX10_1): New. (VFH_AVX512VLDQ_AVX10_1): Ditto. (VF1_AVX512VLDQ_AVX10_1): Ditto. (reducep): Change iterator to VFH_AVX512VLDQ_AVX10_1. Remove target check. (vec_pack_float_): Change iterator to VI8_AVX512VLDQ_AVX10_1. Remove target check. (vec_unpack_fix_trunc_lo_): Change iterator to VF1_AVX512VLDQ_AVX10_1. Remove target check. (vec_unpack_fix_trunc_hi_): Ditto. (VI48F_256_DQVL_AVX10_1): Rename from VI48F_256_DQ. (avx512vl_vextractf128): Change iterator to VI48F_256_DQVL_AVX10_1. Remove target check. (vec_extract_hi__mask): Add TARGET_AVX10_1. (vec_extract_hi_): Ditto. (avx512vl_vinsert): Ditto. (vec_set_lo_): Ditto. (vec_set_hi_): Ditto. (avx512dq_rangep): Change iterator to VF_AVX512VLDQ_AVX10_1. Remove target check. (avx512dq_fpclass): Change iterator to VFH_AVX512VLDQ_AVX10_1. Remove target check. * config/i386/subst.md (mask_avx512dq_condition): Add TARGET_AVX10_1. (mask_scalar_merge): Ditto. 2023-08-24 Haochen Jiang Revert: 2023-08-18 Haochen Jiang PR target/111051 * config/i386/avx512vldqintrin.h: Push AVX2 when AVX2 is disabled. 2023-08-24 Richard Biener PR debug/111080 * dwarf2out.cc (prune_unused_types_walk): Handle DW_TAG_restrict_type, DW_TAG_shared_type, DW_TAG_atomic_type, DW_TAG_immutable_type, DW_TAG_coarray_type, DW_TAG_unspecified_type and DW_TAG_dynamic_type as to only output them when referenced. 2023-08-24 liuhongt * config/i386/i386.cc (ix86_invalid_conversion): Adjust GCC V13 to GCC 13.1. 2023-08-24 liuhongt * common/config/i386/i386-common.cc (processor_names): Add new member graniterapids-s and arrowlake-s. * config/i386/i386-options.cc (processor_alias_table): Update table with PROCESSOR_ARROWLAKE_S and PROCESSOR_GRANITERAPIDS_D. (m_GRANITERAPID_D): New macro. (m_ARROWLAKE_S): Ditto. (m_CORE_AVX512): Add m_GRANITERAPIDS_D. (processor_cost_table): Add icelake_cost for PROCESSOR_GRANITERAPIDS_D and alderlake_cost for PROCESSOR_ARROWLAKE_S. * config/i386/x86-tune.def: Hanlde m_ARROWLAKE_S same as m_ARROWLAKE. * config/i386/i386.h (enum processor_type): Add new member PROCESSOR_GRANITERAPIDS_D and PROCESSOR_ARROWLAKE_S. * config/i386/i386-c.cc (ix86_target_macros_internal): Handle PROCESSOR_GRANITERAPIDS_D and PROCESSOR_ARROWLAKE_S 2023-08-23 Jivan Hakobyan * lra-eliminations.cc (eliminate_regs_in_insn): Use equivalences to to help simplify code further. 2023-08-23 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_phi): Tweak output. * gimple-range-phi.cc (phi_group::phi_group): Remove unused members. Initialize using a range instead of value and edge. (phi_group::calculate_using_modifier): Use initializer value and process for relations after trying for iteration convergence. (phi_group::refine_using_relation): Use initializer range. (phi_group::dump): Rework the dump output. (phi_analyzer::process_phi): Allow multiple constant initilizers. Dump groups immediately as created. (phi_analyzer::dump): Tweak output. * gimple-range-phi.h (phi_group::phi_group): Adjust prototype. (phi_group::initial_value): Delete. (phi_group::refine_using_relation): Adjust prototype. (phi_group::m_initial_value): Delete. (phi_group::m_initial_edge): Delete. (phi_group::m_vr): Use int_range_max. * tree-vrp.cc (execute_ranger_vrp): Don't dump phi groups. 2023-08-23 Andrew MacLeod * gimple-range-phi.cc (phi_analyzer::operator[]): Return NULL if no group was created. (phi_analyzer::process_phi): Do not create groups of one phi node. 2023-08-23 Richard Earnshaw * target.def (gen_ccmp_first, gen_ccmp_next): Use rtx_code for CODE, CMP_CODE and BIT_CODE arguments. * config/aarch64/aarch64.cc (aarch64_gen_ccmp_first): Likewise. (aarch64_gen_ccmp_next): Likewise. * doc/tm.texi: Regenerated. 2023-08-23 Richard Earnshaw * coretypes.h (rtx_code): Add forward declaration. * rtl.h (rtx_code): Make compatible with forward declaration. 2023-08-23 Uros Bizjak PR target/111010 * config/i386/i386.md (*concat3_3): Merge pattern from *concatditi3_3 and *concatsidi3_3 using DWIH mode iterator. Disable (=&r,m,m) alternative for 32-bit targets. (*concat3_3): Disable (=&r,m,m) alternative for 32-bit targets. 2023-08-23 Zhangjin Liao * config/riscv/bitmanip.md (*disi2_sext): Add a more appropriate type attribute. 2023-08-23 Lehua Ding * config/riscv/autovec-opt.md (*cond_abs): New combine pattern. (*copysign_neg): Ditto. * config/riscv/autovec.md (@vcond_mask_): Adjust. (2): Ditto. (cond_): New. (cond_len_): Ditto. * config/riscv/riscv-protos.h (enum insn_type): New. (expand_cond_len_unop): New helper func. * config/riscv/riscv-v.cc (shuffle_merge_patterns): Adjust. (expand_cond_len_unop): New helper func. 2023-08-23 Jan Hubicka * tree-ssa-loop-ch.cc (enum ch_decision): Fix comment. (should_duplicate_loop_header_p): Fix return value for static exits. (ch_base::copy_headers): Improve handling of ch_possible_zero_cost. 2023-08-23 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Move the handlings on VMAT_GATHER_SCATTER in the final loop nest to its own loop, and update the final nest accordingly. 2023-08-23 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Move the handlings on VMAT_LOAD_STORE_LANES in the final loop nest to its own loop, and update the final nest accordingly. 2023-08-23 Kewen Lin * tree-vect-stmts.cc (vectorizable_store): Remove vec oprnds, adjust vec result_chain, vec_oprnd with auto_vec, and adjust gvec_oprnds with auto_delete_vec. 2023-08-23 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Fix potential ICE. 2023-08-23 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (ge_sew_ratio_unavailable_p): Fix fuse rule bug. * config/riscv/riscv-vsetvl.def (DEF_SEW_LMUL_FUSE_RULE): Ditto. 2023-08-23 Juzhe-Zhong * config/riscv/vector.md: Add attribute. 2023-08-22 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (change_insn): Clang format. (vector_infos_manager::all_same_ratio_p): Ditto. (vector_infos_manager::all_same_avl_p): Ditto. (pass_vsetvl::refine_vsetvls): Ditto. (pass_vsetvl::cleanup_vsetvls): Ditto. (pass_vsetvl::commit_vsetvls): Ditto. (pass_vsetvl::local_eliminate_vsetvl_insn): Ditto. (pass_vsetvl::global_eliminate_vsetvl_insn): Ditto. (pass_vsetvl::compute_probabilities): Ditto. 2023-08-22 Juzhe-Zhong * config/riscv/t-riscv: Add riscv-vsetvl.def 2023-08-22 Vineet Gupta * config/riscv/riscv.opt: Add --param names riscv-autovec-preference and riscv-autovec-lmul 2023-08-22 Raphael Moreira Zinsly * config/riscv/t-linux: Add MULTIARCH_DIRNAME. 2023-08-22 Tobias Burnus * tree-core.h (enum omp_clause_defaultmap_kind): Add OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL. * gimplify.cc (gimplify_scan_omp_clauses): Handle it. * tree-pretty-print.cc (dump_omp_clause): Likewise. 2023-08-22 Jakub Jelinek PR c++/106652 * doc/extend.texi (_Float): Drop obsolete sentence that the types aren't supported in C++. 2023-08-22 Juzhe-Zhong * doc/md.texi: Add LEN_FOLD_EXTRACT_LAST pattern. * internal-fn.cc (fold_len_extract_direct): Ditto. (expand_fold_len_extract_optab_fn): Ditto. (direct_fold_len_extract_optab_supported_p): Ditto. * internal-fn.def (LEN_FOLD_EXTRACT_LAST): Ditto. * optabs.def (OPTAB_D): Ditto. 2023-08-22 Richard Biener * tree-vect-stmts.cc (vectorizable_store): Do not bump DR_GROUP_STORE_COUNT here. Remove early out. (vect_transform_stmt): Only call vectorizable_store on the last element of an interleaving chain. 2023-08-22 Richard Biener PR tree-optimization/94864 PR tree-optimization/94865 PR tree-optimization/93080 * match.pd (bit_insert @0 (BIT_FIELD_REF @1 ..) ..): New pattern for vector insertion from vector extraction. 2023-08-22 Juzhe-Zhong Kewen.Lin * tree-vect-loop.cc (vect_verify_loop_lens): Add exists check. (vectorizable_live_operation): Add live vectorization for length loop control. 2023-08-22 David Malcolm PR analyzer/105899 * doc/invoke.texi: Remove -Wanalyzer-unterminated-string. 2023-08-22 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (vfwredusum_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwredusum_frm): New intrinsic function def. 2023-08-21 David Faust * config/bpf/bpf.md (neg): Second operand must be a register. 2023-08-21 Edwin Lu * config/riscv/bitmanip.md: Added bitmanip type to insns that are missing types. 2023-08-21 Jeff Law * config/riscv/sync-ztso.md (atomic_load_ztso): Avoid extraenous newline. 2023-08-21 Francois-Xavier Coudert * config/aarch64/falkor-tag-collision-avoidance.cc (dump_insn_list): Fix format specifier. 2023-08-21 Aldy Hernandez * value-range.cc (frange::union_nans): Return false if nothing changed. (range_tests_floats): New test. 2023-08-21 Prathamesh Kulkarni PR tree-optimization/111048 * fold-const.cc (valid_mask_for_fold_vec_perm_cst_p): Set arg_npatterns correctly. (fold_vec_perm_cst): Remove workaround and again call valid_mask_fold_vec_perm_cst_p for both VLS and VLA vectors. (test_fold_vec_perm_cst::test_nunits_min_4): Add test-case. 2023-08-21 Richard Biener PR tree-optimization/111082 * tree-vect-slp.cc (vectorize_slp_instance_root_stmt): Only pun operations that can overflow. 2023-08-21 Juzhe-Zhong * lcm.cc (compute_antinout_edge): Export as global use. (compute_earliest): Ditto. (compute_rev_insert_delete): Ditto. * lcm.h (compute_antinout_edge): Ditto. (compute_earliest): Ditto. 2023-08-21 Richard Biener PR tree-optimization/111070 * tree-ssa-ifcombine.cc (ifcombine_ifandif): Check we have an SSA name before checking SSA_NAME_OCCURS_IN_ABNORMAL_PHI. 2023-08-21 Andrew Pinski PR tree-optimization/111002 * match.pd (view_convert(vec_cond(a,b,c))): New pattern. 2023-08-21 liuhongt * common/config/i386/cpuinfo.h (get_intel_cpu): Detect Alderlake-N. * common/config/i386/i386-common.cc (alias_table): Support -march=gracemont as an alias of -march=alderlake. 2023-08-20 Uros Bizjak * config/i386/i386-expand.cc (ix86_expand_sse_extend): Use ops[1] instead of src in the call to ix86_expand_sse_cmp. * config/i386/sse.md (v8qiv8hi2): Do not force operands[1] to a register. (v4hiv4si2): Ditto. (v2siv2di2): Ditto. 2023-08-20 Andrew Pinski PR tree-optimization/111006 PR tree-optimization/110986 * match.pd: (op(vec_cond(a,b,c))): Handle convert for op. 2023-08-20 Eric Gallager PR target/90835 * Makefile.in: improve error message when /usr/include is missing 2023-08-19 Tobias Burnus PR middle-end/111017 * omp-expand.cc (expand_omp_for_init_vars): Pass after=true to expand_omp_build_cond for 'factor != 0' condition, resulting in pre-r12-5295-g47de0b56ee455e code for the gimple insert. 2023-08-19 Guo Jie Lulu Cheng * config/loongarch/t-loongarch: Add loongarch-driver.h into TM_H. Add loongarch-def.h and loongarch-tune.h into OPTIONS_H_EXTRA. 2023-08-18 Uros Bizjak PR target/111023 * config/i386/i386-expand.cc (ix86_split_mmx_punpck): Also handle V2QImode. (ix86_expand_sse_extend): New function. * config/i386/i386-protos.h (ix86_expand_sse_extend): New prototype. * config/i386/mmx.md (v4qiv4hi2): Enable for TARGET_SSE2. Expand through ix86_expand_sse_extend for !TARGET_SSE4_1. (v2hiv2si2): Ditto. (v2qiv2hi2): Ditto. * config/i386/sse.md (v8qiv8hi2): Ditto. (v4hiv4si2): Ditto. (v2siv2di2): Ditto. 2023-08-18 Aldy Hernandez PR ipa/110753 * value-range.cc (irange::union_bitmask): Return FALSE if updated bitmask is semantically equivalent to the original mask. (irange::intersect_bitmask): Same. (irange::get_bitmask): Add comment. 2023-08-18 Richard Biener PR tree-optimization/111019 * tree-ssa-loop-im.cc (gather_mem_refs_stmt): When canonicalizing also scrap base and offset in case the ref is indirect. 2023-08-18 Jose E. Marchesi * config/bpf/bpf.opt (mframe-limit): Set default to 32767. 2023-08-18 Kewen Lin PR bootstrap/111021 * Makefile.in (TM_P_H): Add $(TREE_H) as dependence. 2023-08-18 Kewen Lin * tree-vect-stmts.cc (vect_build_scatter_store_calls): New, factor out from ... (vectorizable_store): ... here. 2023-08-18 Richard Biener PR tree-optimization/111048 * fold-const.cc (fold_vec_perm_cst): Check for non-VLA vectors first. 2023-08-18 Haochen Jiang PR target/111051 * config/i386/avx512vldqintrin.h: Push AVX2 when AVX2 is disabled. 2023-08-18 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Move the handlings on VMAT_GATHER_SCATTER in the final loop nest to its own loop, and update the final nest accordingly. 2023-08-18 Andrew Pinski * doc/md.texi (Standard patterns): Document cond_neg, cond_one_cmpl, cond_len_neg and cond_len_one_cmpl. 2023-08-18 Lehua Ding * config/riscv/iterators.md (TARGET_HARD_FLOAT || TARGET_ZFINX): New. * config/riscv/pic.md (*local_pic_load): Change ANYF. (*local_pic_load): To ANYLSF. (*local_pic_load_32d): Ditto. (*local_pic_load_32d): Ditto. (*local_pic_store): Ditto. (*local_pic_store): Ditto. (*local_pic_store_32d): Ditto. (*local_pic_store_32d): Ditto. 2023-08-18 Lehua Ding Ju-Zhe Zhong * config/riscv/predicates.md (vector_const_0_operand): New. * config/riscv/vector.md (*pred_broadcast_zero): Ditto. 2023-08-18 Lehua Ding * config/riscv/riscv-vsetvl.cc (pass_vsetvl::backward_demand_fusion): Forbidden. 2023-08-17 Andrew MacLeod PR tree-optimization/111009 * range-op.cc (operator_addr_expr::op1_range): Be more restrictive. 2023-08-17 Vladimir N. Makarov * lra-spills.cc (assign_stack_slot_num_and_sort_pseudos): Moving slots_num initialization from here ... (lra_spill): ... to here before the 1st call of assign_stack_slot_num_and_sort_pseudos. Add the 2nd call after fp->sp elimination. 2023-08-17 Jose E. Marchesi PR c/106537 * doc/invoke.texi (Option Summary): Mention -Wcompare-distinct-pointer-types under `Warning Options'. (Warning Options): Document -Wcompare-distinct-pointer-types. 2023-08-17 Jan-Benedict Glaw * recog.cc (memory_address_addr_space_p): Mark possibly unused argument as unused. 2023-08-17 Richard Biener PR tree-optimization/111039 * tree-ssa-ifcombine.cc (ifcombine_ifandif): Check for SSA_NAME_OCCURS_IN_ABNORMAL_PHI. 2023-08-17 Alex Coplan * doc/rtl.texi: Fix up sample code for RTL-SSA insn changes. 2023-08-17 Jose E. Marchesi PR target/111046 * config/bpf/bpf.cc (bpf_attribute_table): Add entry for the `naked' function attribute. (bpf_warn_func_return): New function. (TARGET_WARN_FUNC_RETURN): Define. (bpf_expand_prologue): Add preventive comment. (bpf_expand_epilogue): Likewise. * doc/extend.texi (BPF Function Attributes): Document the `naked' function attribute. 2023-08-17 Richard Biener * tree-vect-slp.cc (vect_slp_check_for_roots): Use !needs_fold_left_reduction_p to decide whether we can handle the reduction with association. (vectorize_slp_instance_root_stmt): For TYPE_OVERFLOW_UNDEFINED reductions perform all arithmetic in an unsigned type. 2023-08-17 Rainer Orth * configure.ac (gcc_cv_ld64_version): Allow for dyld in ld -v output. * configure: Regenerate. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (widen_freducop): Add frm_opt_type template arg. (vfwredosum_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwredosum_frm): New intrinsic function def. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (vfredosum_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfredosum_frm): New intrinsic function def. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class freducop): Add frm_op_type template arg. (vfredusum_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfredusum_frm): New intrinsic function def. * config/riscv/riscv-vector-builtins-shapes.cc (struct reduc_alu_frm_def): New class for frm shape. (SHAPE): New declaration. * config/riscv/riscv-vector-builtins-shapes.h: Ditto. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfncvt_f): Add frm_op_type template arg. (vfncvt_f_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfncvt_f_frm): New intrinsic function def. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (vfncvt_xu_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfncvt_xu_frm): New intrinsic function def. 2023-08-17 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfncvt_x): Add frm_op_type template arg. (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfncvt_x_frm): New intrinsic function def. * config/riscv/riscv-vector-builtins-shapes.cc (struct narrow_alu_frm_def): New shape function for frm. (SHAPE): New declaration. * config/riscv/riscv-vector-builtins-shapes.h: Ditto. 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/sse.md (VF_AVX512VLDQ_AVX10_1): New. (VFH_AVX512VLDQ_AVX10_1): Ditto. (VF1_AVX512VLDQ_AVX10_1): Ditto. (reducep): Change iterator to VFH_AVX512VLDQ_AVX10_1. Remove target check. (vec_pack_float_): Change iterator to VI8_AVX512VLDQ_AVX10_1. Remove target check. (vec_unpack_fix_trunc_lo_): Change iterator to VF1_AVX512VLDQ_AVX10_1. Remove target check. (vec_unpack_fix_trunc_hi_): Ditto. (VI48F_256_DQVL_AVX10_1): Rename from VI48F_256_DQ. (avx512vl_vextractf128): Change iterator to VI48F_256_DQVL_AVX10_1. Remove target check. (vec_extract_hi__mask): Add TARGET_AVX10_1. (vec_extract_hi_): Ditto. (avx512vl_vinsert): Ditto. (vec_set_lo_): Ditto. (vec_set_hi_): Ditto. (avx512dq_rangep): Change iterator to VF_AVX512VLDQ_AVX10_1. Remove target check. (avx512dq_fpclass): Change iterator to VFH_AVX512VLDQ_AVX10_1. Remove target check. * config/i386/subst.md (mask_avx512dq_condition): Add TARGET_AVX10_1. (mask_scalar_merge): Ditto. 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/i386.cc (standard_sse_constant_opcode): Add TARGET_AVX10_1. * config/i386/sse.md: (VI48_AVX512VL_AVX10_1): New. (VI48_AVX512VLDQ_AVX10_1): Ditto. (VF2_AVX512VL): Remove. (VI8_256_512VLDQ_AVX10_1): Rename from VI8_256_512. Add TARGET_AVX10_1. (*3): Change isa attribute to avx10_1_or_avx512dq. Add TARGET_AVX10_1. (3): Add TARGET_AVX10_1. Change isa attr to avx10_1_or_avx512vl. (avx512dq_cvtps2qq): Change iterator to VI8_256_512VLDQ_AVX10_1. Remove target check. (avx512dq_cvtps2qqv2di): Add TARGET_AVX10_1. (avx512dq_cvtps2uqq): Change iterator to VI8_256_512VLDQ_AVX10_1. Remove target check. (avx512dq_cvtps2uqqv2di): Add TARGET_AVX10_1. (float2): Change iterator to VF2_AVX512VLDQ_AVX10_1. Remove target check. (float2): Change iterator to VF1_128_256VLDQ_AVX10_1. Remove target check. (floatv4div4sf2): Add TARGET_AVX10_1. (avx512dq_floatv2div2sf2): Ditto. (*avx512dq_floatv2div2sf2): Ditto. (floatv2div2sf2): Ditto. (floatv2div2sf2_mask): Ditto. (*floatv2div2sf2_mask): Ditto. (*floatv2div2sf2_mask_1): Ditto. (_cvt2mask): Change iterator to VI48_AVX512VLDQ_AVX10_1. Remove target check. (_cvtmask2): Ditto. (*_cvtmask2): Change iterator to VI48_AVX512VL_AVX10_1. Remove target check. Change when constraint is enabled. 2023-08-17 Juzhe-Zhong PR target/111037 * config/riscv/riscv-vsetvl.cc (float_insn_valid_sew_p): New function. (second_sew_less_than_first_sew_p): Fix bug. (first_sew_less_than_second_sew_p): Ditto. 2023-08-17 Haochen Jiang * config/i386/avx512vldqintrin.h: Remove target attribute. * config/i386/i386-builtin.def (BDESC): Add OPTION_MASK_ISA2_AVX10_1. * config/i386/i386-builtins.cc (def_builtin): Handle AVX10_1. * config/i386/i386-expand.cc (ix86_check_builtin_isa_match): Ditto. (ix86_expand_sse2_mulvxdi3): Add TARGET_AVX10_1. * config/i386/i386.md: Add new isa attribute avx10_1_or_avx512dq and avx10_1_or_avx512vl. * config/i386/sse.md: (VF2_AVX512VLDQ_AVX10_1): New. (VF1_128_256VLDQ_AVX10_1): Ditto. (VI8_AVX512VLDQ_AVX10_1): Ditto. (_andnot3): Add TARGET_AVX10_1 and change isa attr from avx512dq to avx10_1_or_avx512dq. (*andnot3): Add TARGET_AVX10_1 and change isa attr from avx512vl to avx10_1_or_avx512vl. (fix_trunc2): Change iterator to VF2_AVX512VLDQ_AVX10_1. Remove target check. (fix_notrunc2): Ditto. (ufix_notrunc2): Ditto. (fix_trunc2): Change iterator to VF1_128_256VLDQ_AVX10_1. Remove target check. (avx512dq_fix_truncv2sfv2di2): Add TARGET_AVX10_1. (fix_truncv2sfv2di2): Ditto. (cond_mul): Change iterator to VI8_AVX10_1_AVX512DQVL. Remove target check. (avx512dq_mul3): Ditto. (*avx512dq_mul3): Ditto. (VI4F_BRCST32x2): Add TARGET_AVX512DQ and TARGET_AVX10_1. (avx512dq_broadcast): Remove target check. (VI8F_BRCST64x2): Add TARGET_AVX512DQ and TARGET_AVX10_1. (avx512dq_broadcast_1): Remove target check. * config/i386/subst.md (mask_mode512bit_condition): Add TARGET_AVX10_1. (mask_avx512vl_condition): Ditto. (mask): Ditto. 2023-08-17 Haochen Jiang * common/config/i386/i386-common.cc (ix86_check_avx10_vector_width): New function to check isa_flags to emit a warning when there is a conflict in AVX10 options for vector width. (ix86_handle_option): Add check for avx10.1-256 and avx10.1-512. * config/i386/driver-i386.cc (host_detect_local_cpu): Do not append -mno-avx10-max-512bit for -march=native. 2023-08-17 Haochen Jiang * common/config/i386/i386-common.cc (ix86_check_avx10): New function to check isa_flags and isa_flags_explicit to emit warning when AVX10 is enabled by "-m" option. (ix86_check_avx512): New function to check isa_flags and isa_flags_explicit to emit warning when AVX512 is enabled by "-m" option. (ix86_handle_option): Do not change the flags when warning is emitted. * config/i386/driver-i386.cc (host_detect_local_cpu): Do not append -mno-avx10.1 for -march=native. 2023-08-17 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Add avx10_set and version and detect avx10.1. (cpu_indicator_init): Handle avx10.1-512. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVX10_512BIT_SET): New. (OPTION_MASK_ISA2_AVX10_1_SET): Ditto. (OPTION_MASK_ISA2_AVX10_512BIT_UNSET): Ditto. (OPTION_MASK_ISA2_AVX10_1_UNSET): Ditto. (OPTION_MASK_ISA2_AVX2_UNSET): Modify for AVX10_1. (ix86_handle_option): Handle -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVX10_512BIT, FEATURE_AVX10_1 and FEATURE_AVX10_512BIT. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for AVX10_512BIT, AVX10_1 and AVX10_1_512. * config/i386/constraints.md (Yk): Add AVX10_1. (Yv): Ditto. (k): Ditto. * config/i386/cpuid.h (bit_AVX10): New. (bit_AVX10_256): Ditto. (bit_AVX10_512): Ditto. * config/i386/i386-c.cc (ix86_target_macros_internal): Define AVX10_512BIT and AVX10_1. * config/i386/i386-isa.def (AVX10_512BIT): Add DEF_PTA(AVX10_512BIT). (AVX10_1): Add DEF_PTA(AVX10_1). * config/i386/i386-options.cc (isa2_opts): Add -mavx10.1. (ix86_valid_target_attribute_inner_p): Handle avx10-512bit, avx10.1 and avx10.1-512. (ix86_option_override_internal): Enable AVX512{F,VL,BW,DQ,CD,BF16, FP16,VBMI,VBMI2,VNNI,IFMA,BITALG,VPOPCNTDQ} features for avx10.1-512. (ix86_valid_target_attribute_inner_p): Handle AVX10_1. * config/i386/i386.cc (ix86_get_ssemov): Add AVX10_1. (ix86_conditional_register_usage): Ditto. (ix86_hard_regno_mode_ok): Ditto. (ix86_rtx_costs): Ditto. * config/i386/i386.h (VALID_MASK_AVX10_MODE): New macro. * config/i386/i386.opt: Add option -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/extend.texi: Document avx10.1, avx10.1-256 and avx10.1-512. * doc/invoke.texi: Document -mavx10.1, -mavx10.1-256 and -mavx10.1-512. * doc/sourcebuild.texi: Document target avx10.1, avx10.1-256 and avx10.1-512. 2023-08-17 Sergei Trofimovich * flag-types.h (vrp_mode): Remove unused. 2023-08-17 Yanzhang Wang * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): Use CONSTM1_RTX. 2023-08-17 Andrew Pinski * internal-fn.def (COND_NOT): New internal function. * match.pd (UNCOND_UNARY, COND_UNARY): Add bit_not/not to the lists. (`vec (a ? -1 : 0) ^ b`): New pattern to convert into conditional not. * optabs.def (cond_one_cmpl): New optab. (cond_len_one_cmpl): Likewise. 2023-08-16 Surya Kumari Jangala PR rtl-optimization/110254 * ira-color.cc (improve_allocation): Update array allocated_hard_reg_p. 2023-08-16 Vladimir N. Makarov * lra-int.h (lra_update_fp2sp_elimination): Change the prototype. * lra-eliminations.cc (spill_pseudos): Record spilled pseudos. (lra_update_fp2sp_elimination): Ditto. (update_reg_eliminate): Adjust spill_pseudos call. * lra-spills.cc (lra_spill): Assign stack slots to pseudos spilled in lra_update_fp2sp_elimination. 2023-08-16 Richard Ball * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Cortex-A720 CPU. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Document Cortex-A720 CPU. 2023-08-16 Robin Dapp * config/riscv/autovec.md (avg3_floor): Implement expander. (avg3_ceil): Ditto. * config/riscv/vector-iterators.md (ashiftrt): New iterator. (ASHIFTRT): Ditto. 2023-08-16 Robin Dapp * internal-fn.cc (vec_extract_direct): Change type argument numbers. (expand_vec_extract_optab_fn): Call convert_optab_fn. (direct_vec_extract_optab_supported_p): Use convert_optab_supported_p. 2023-08-16 Prathamesh Kulkarni Richard Sandiford * fold-const.cc (INCLUDE_ALGORITHM): Add Include. (valid_mask_for_fold_vec_perm_cst_p): New function. (fold_vec_perm_cst): Likewise. (fold_vec_perm): Adjust assert and call fold_vec_perm_cst. (test_fold_vec_perm_cst): New namespace. (test_fold_vec_perm_cst::build_vec_cst_rand): New function. (test_fold_vec_perm_cst::validate_res): Likewise. (test_fold_vec_perm_cst::validate_res_vls): Likewise. (test_fold_vec_perm_cst::builder_push_elems): Likewise. (test_fold_vec_perm_cst::test_vnx4si_v4si): Likewise. (test_fold_vec_perm_cst::test_v4si_vnx4si): Likewise. (test_fold_vec_perm_cst::test_all_nunits): Likewise. (test_fold_vec_perm_cst::test_nunits_min_2): Likewise. (test_fold_vec_perm_cst::test_nunits_min_4): Likewise. (test_fold_vec_perm_cst::test_nunits_min_8): Likewise. (test_fold_vec_perm_cst::test_nunits_max_4): Likewise. (test_fold_vec_perm_cst::is_simple_vla_size): Likewise. (test_fold_vec_perm_cst::test): Likewise. (fold_const_cc_tests): Call test_fold_vec_perm_cst::test. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwcvt_xu_frm): New intrinsic function def. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc: Use explicit argument. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwcvt_x_frm): New intrinsic function def. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfcvt_f_frm): New intrinsic function def. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfcvt_xu_frm): New intrinsic function def.. 2023-08-16 Haochen Gui PR target/110429 * config/rs6000/vsx.md (*vsx_extract__store_p9): Skip vector extract when the element is 7 on BE while 8 on LE for byte or 3 on BE while 4 on LE for halfword. 2023-08-16 Haochen Gui PR target/106769 * config/rs6000/vsx.md (expand vsx_extract_): Set it only for V8HI and V16QI. (vsx_extract_v4si): New expand for V4SI extraction. (vsx_extract_v4si_w1): New insn pattern for V4SI extraction on word 1 from BE order. (*mfvsrwz): New insn pattern for mfvsrwz. (*vsx_extract__di_p9): Assert that it won't be generated on word 1 from BE order. (*vsx_extract_si): Remove. (*vsx_extract_v4si_w023): New insn and split pattern on word 0, 2, 3 from BE order. 2023-08-16 Juzhe-Zhong * config/riscv/autovec.md (vec_mask_len_load_lanes): New pattern. (vec_mask_len_store_lanes): Ditto. * config/riscv/riscv-protos.h (expand_lanes_load_store): New function. * config/riscv/riscv-v.cc (get_mask_mode): Add tuple mask mode. (expand_lanes_load_store): New function. * config/riscv/vector-iterators.md: New iterator. 2023-08-16 Juzhe-Zhong * internal-fn.cc (internal_load_fn_p): Apply MASK_LEN_{LOAD_LANES,STORE_LANES} into vectorizer. (internal_store_fn_p): Ditto. (internal_fn_len_index): Ditto. (internal_fn_mask_index): Ditto. (internal_fn_stored_value_index): Ditto. * tree-vect-data-refs.cc (vect_store_lanes_supported): Ditto. (vect_load_lanes_supported): Ditto. * tree-vect-loop.cc: Ditto. * tree-vect-slp.cc (vect_slp_prefer_store_lanes_p): Ditto. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Ditto. (get_group_load_store_type): Ditto. (vectorizable_store): Ditto. (vectorizable_load): Ditto. * tree-vectorizer.h (vect_store_lanes_supported): Ditto. (vect_load_lanes_supported): Ditto. 2023-08-16 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (enum frm_op_type): New type for frm. (BASE): New declaration. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfcvt_x_frm): New intrinsic function def. 2023-08-16 liuhongt * config/i386/i386-builtins.cc (ix86_vectorize_builtin_gather): Adjust for use_gather_8parts. * config/i386/i386-options.cc (parse_mtune_ctrl_str): Set/Clear tune features use_{gather,scatter}_{2parts, 4parts, 8parts} for -mtune-crtl={,^}{use_gather,use_scatter}. * config/i386/i386.cc (ix86_vectorize_builtin_scatter): Adjust for use_scatter_8parts * config/i386/i386.h (TARGET_USE_GATHER): Rename to .. (TARGET_USE_GATHER_8PARTS): .. this. (TARGET_USE_SCATTER): Rename to .. (TARGET_USE_SCATTER_8PARTS): .. this. * config/i386/x86-tune.def (X86_TUNE_USE_GATHER): Rename to (X86_TUNE_USE_GATHER_8PARTS): .. this. (X86_TUNE_USE_SCATTER): Rename to (X86_TUNE_USE_SCATTER_8PARTS): .. this. * config/i386/i386.opt: Add new options mgather, mscatter. 2023-08-16 liuhongt * config/i386/i386-options.cc (m_GDS): New macro. * config/i386/x86-tune.def (X86_TUNE_USE_GATHER_2PARTS): Don't enable for m_GDS. (X86_TUNE_USE_GATHER_4PARTS): Ditto. (X86_TUNE_USE_GATHER): Ditto. 2023-08-16 liuhongt * config/i386/i386.md (movdf_internal): Generate vmovapd instead of vmovsd when moving DFmode between SSE_REGS. (movhi_internal): Generate vmovdqa instead of vmovsh when moving HImode between SSE_REGS. (mov_internal): Use vmovaps instead of vmovsh when moving HF/BFmode between SSE_REGS. 2023-08-15 David Faust * config/bpf/bpf.md (extendsisi2): Delete useless define_insn. 2023-08-15 David Faust PR target/111029 * config/bpf/bpf.cc (bpf_print_register): Print 'w' registers for any mode 32-bits or smaller, not just SImode. 2023-08-15 Martin Jambor PR ipa/68930 PR ipa/92497 * ipa-prop.h (ipcp_get_aggregate_const): Declare. * ipa-prop.cc (ipcp_get_aggregate_const): New function. (ipcp_transform_function): Do not deallocate transformation info. * tree-ssa-sccvn.cc: Include alloc-pool.h, symbol-summary.h and ipa-prop.h. (vn_reference_lookup_2): When hitting default-def vuse, query IPA-CP transformation info for any known constants. 2023-08-15 Chung-Lin Tang Thomas Schwinge * gimplify.cc (oacc_region_type_name): New function. (oacc_default_clause): If no 'default' clause appears on this compute construct, see if one appears on a lexically containing 'data' construct. (gimplify_scan_omp_clauses): Upon OMP_CLAUSE_DEFAULT case, set ctx->oacc_default_clause_ctx to current context. 2023-08-15 Juzhe-Zhong PR target/110989 * config/riscv/predicates.md: Fix predicate. 2023-08-15 Richard Biener * tree-vect-slp.cc (vect_analyze_slp_instance): Remove slp_inst_kind_ctor handling. (vect_analyze_slp): Simplify. (vect_build_slp_instance): Dump when we analyze a CTOR. (vect_slp_check_for_constructors): Rename to ... (vect_slp_check_for_roots): ... this. Register a slp_root for CONSTRUCTORs instead of shoving them to the set of grouped stores. (vect_slp_analyze_bb_1): Adjust. 2023-08-15 Richard Biener * tree-vectorizer.h (_slp_instance::remain_stmts): Change to ... (_slp_instance::remain_defs): ... this. (SLP_INSTANCE_REMAIN_STMTS): Rename to ... (SLP_INSTANCE_REMAIN_DEFS): ... this. (slp_root::remain): New. (slp_root::slp_root): Adjust. * tree-vect-slp.cc (vect_free_slp_instance): Adjust. (vect_build_slp_instance): Get extra remain parameter, adjust former handling of a cut off stmt. (vect_analyze_slp_instance): Adjust. (vect_analyze_slp): Likewise. (_bb_vec_info::~_bb_vec_info): Likewise. (vectorizable_bb_reduc_epilogue): Dump something if we fail. (vect_slp_check_for_constructors): Handle non-internal defs as remain defs of a reduction. (vectorize_slp_instance_root_stmt): Adjust. 2023-08-15 Richard Biener * tree-ssa-loop-ivcanon.cc: Include tree-vectorizer.h (canonicalize_loop_induction_variables): Use find_loop_location. 2023-08-15 Hans-Peter Nilsson PR bootstrap/111021 * config/cris/cris-protos.h: Revert recent change. * config/cris/cris.cc (cris_legitimate_address_p): Remove code_helper unused parameter. (cris_legitimate_address_p_hook): New wrapper function. (TARGET_LEGITIMATE_ADDRESS_P): Change to cris_legitimate_address_p_hook. 2023-08-15 Richard Biener PR tree-optimization/110963 * tree-ssa-pre.cc (do_pre_regular_insertion): Also insert a PHI node when the expression is available on all edges and we insert at most one copy from a constant. 2023-08-15 Richard Biener PR tree-optimization/110991 * tree-ssa-loop-ivcanon.cc (constant_after_peeling): Handle VIEW_CONVERT_EXPR , handle more simple IV-like SSA cycles that will end up constant. 2023-08-15 Kewen Lin PR bootstrap/111021 * Makefile.in (RECOG_H): Add $(TREE_H) as dependence. 2023-08-15 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Move the handlings on VMAT_LOAD_STORE_LANES in the final loop nest to its own loop, and update the final nest accordingly. 2023-08-15 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Remove some useless checks on VMAT_INVARIANT. 2023-08-15 Pan Li * mode-switching.cc (create_pre_exit): Add SET insn check. 2023-08-15 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfrec7_frm): New class for frm. (vfrec7_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfrec7_frm): New intrinsic function definition. * config/riscv/vector-iterators.md (VFMISC): Remove VFREC7. (misc_op): Ditto. (float_insn_type): Ditto. (VFMISC_FRM): New int iterator. (misc_frm_op): New op for frm. (float_frm_insn_type): New type for frm. * config/riscv/vector.md (@pred_): New pattern for misc frm. 2023-08-14 Vladimir N. Makarov * lra-constraints.cc (curr_insn_transform): Process output stack pointer reloads before emitting reload insns. 2023-08-14 benjamin priour PR analyzer/110543 * doc/invoke.texi: Add documentation of fanalyzer-show-events-in-system-headers 2023-08-14 Jan Hubicka PR gcov-profile/110988 * tree-cfg.cc (fold_loop_internal_call): Avoid division by zero. 2023-08-14 Jiawei * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Enable compressed builtins when ZC* extensions enabled. * config/riscv/riscv-shorten-memrefs.cc: Enable shorten_memrefs pass when ZC* extensions enabled. * config/riscv/riscv.cc (riscv_compressed_reg_p): Enable compressible registers when ZC* extensions enabled. (riscv_rtx_costs): Allow adjusting rtx costs when ZC* extensions enabled. (riscv_address_cost): Allow adjusting address cost when ZC* extensions enabled. (riscv_first_stack_step): Allow compression of the register saves without adding extra instructions. * config/riscv/riscv.h (FUNCTION_BOUNDARY): Adjusts function boundary to 16 bits when ZC* extensions enabled. 2023-08-14 Jiawei * common/config/riscv/riscv-common.cc (riscv_subset_list::parse): New extensions. * config/riscv/riscv-opts.h (MASK_ZCA): New mask. (MASK_ZCB): Ditto. (MASK_ZCE): Ditto. (MASK_ZCF): Ditto. (MASK_ZCD): Ditto. (MASK_ZCMP): Ditto. (MASK_ZCMT): Ditto. (TARGET_ZCA): New target. (TARGET_ZCB): Ditto. (TARGET_ZCE): Ditto. (TARGET_ZCF): Ditto. (TARGET_ZCD): Ditto. (TARGET_ZCMP): Ditto. (TARGET_ZCMT): Ditto. * config/riscv/riscv.opt: New target variable. 2023-08-14 Juzhe-Zhong Revert: 2023-05-17 Jin Ma * genrecog.cc (print_nonbool_test): Fix type error of switch (SUBREG_BYTE (op))'. 2023-08-14 Richard Biener * tree-cfg.cc (print_loop_info): Dump to 'file', not 'dump_file'. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class unop_frm): New class for frm. (vfsqrt_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfsqrt_frm): New intrinsic function definition. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfwnmsac_frm): New class for frm. (vfwnmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwnmsac_frm): New intrinsic function definition. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfwmsac_frm): New class for frm. (vfwmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwmsac_frm): New intrinsic function definition. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfwnmacc_frm): New class for frm. (vfwnmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwnmacc_frm): New intrinsic function definition. 2023-08-14 Cui, Lili * common/config/i386/cpuinfo.h (get_intel_cpu): Add model value 0xba to Raptorlake. 2023-08-14 Hans-Peter Nilsson * config/mmix/predicates.md (mmix_address_operand): Use lra_in_progress, not reload_in_progress. 2023-08-14 Hans-Peter Nilsson * config/mmix/mmix.cc: Re-enable LRA. 2023-08-14 Hans-Peter Nilsson * config/mmix/predicates.md (frame_pointer_operand): Handle FP+offset when lra_in_progress. 2023-08-14 Hans-Peter Nilsson * config/mmix/mmix.cc: Disable LRA for MMIX. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfwmacc_frm): New class for vfwmacc frm. (vfwmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwmacc_frm): Function definition for vfwmacc. * config/riscv/riscv-vector-builtins.cc (function_expander::use_widen_ternop_insn): Add frm support. 2023-08-14 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmsub_frm): New class for vfnmsub frm. (vfnmsub_frm): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmsub_frm): New function declaration. 2023-08-14 Vladimir N. Makarov * lra-constraints.cc (curr_insn_transform): Set done_p up and check it on true after processing output stack pointer reload. 2023-08-12 Jakub Jelinek * Makefile.in (USER_H): Add stdckdint.h. * ginclude/stdckdint.h: New file. 2023-08-12 Juzhe-Zhong PR target/110994 * config/riscv/riscv-opts.h (TARGET_VECTOR_VLS): Add TARGET_VETOR. 2023-08-12 Patrick Palka * tree-pretty-print.cc (dump_generic_node) : Delimit output with braces. 2023-08-12 Juzhe-Zhong PR target/110985 * config/riscv/riscv-v.cc (expand_vec_series): Refactor the expander. 2023-08-12 Juzhe-Zhong * config/riscv/autovec.md: Add VLS CONST_VECTOR. * config/riscv/riscv.cc (riscv_const_insns): Ditto. * config/riscv/vector.md: Ditto. 2023-08-11 David Malcolm PR analyzer/105899 * doc/analyzer.texi (__analyzer_get_strlen): New. * doc/invoke.texi: Add -Wanalyzer-unterminated-string. 2023-08-11 Jeff Law * config/rx/rx.md (subdi3): Fix test for borrow. 2023-08-11 Juzhe-Zhong PR middle-end/110989 * tree-vect-stmts.cc (vectorizable_store): Replace iv_type with sizetype. (vectorizable_load): Ditto. 2023-08-11 Jose E. Marchesi * config/bpf/bpf.md (allocate_stack): Define. * config/bpf/bpf.h (FIRST_PSEUDO_REGISTER): Make room for fake stack pointer register. (FIXED_REGISTERS): Adjust accordingly. (CALL_USED_REGISTERS): Likewise. (REG_CLASS_CONTENTS): Likewise. (REGISTER_NAMES): Likewise. * config/bpf/bpf.cc (bpf_compute_frame_layout): Do not reserve space for callee-saved registers. (bpf_expand_prologue): Do not save callee-saved registers in xbpf. (bpf_expand_epilogue): Do not restore callee-saved registers in xbpf. 2023-08-11 Jose E. Marchesi * config/bpf/bpf.cc (bpf_function_arg_advance): Do not complain about too many arguments if function is always inlined. 2023-08-11 Patrick Palka * tree-pretty-print.cc (dump_generic_node) : Don't call component_ref_field_offset if the RHS isn't a decl. 2023-08-11 John David Anglin PR bootstrap/110646 * gensupport.cc(class conlist): Use strtol instead of std::stoi. 2023-08-11 Vladimir N. Makarov * lra-constraints.cc (goal_alt_out_sp_reload_p): New flag. (process_alt_operands): Set the flag. (curr_insn_transform): Modify stack pointer offsets if output stack pointer reload is generated. 2023-08-11 Joseph Myers * configure: Regenerate. 2023-08-11 Richard Biener PR tree-optimization/110979 * tree-vect-loop.cc (vectorizable_reduction): For FOLD_LEFT_REDUCTION without target support make sure we don't need to honor signed zeros and sign dependent rounding. 2023-08-11 Richard Biener * tree-vect-slp.cc (vect_slp_region): Provide opt-info for all SLP subgraph entries. Dump the used vector size based on the SLP subgraph entry root vector type. 2023-08-11 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmsub_frm): New class for vfmsub frm. (vfmsub_frm): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmsub_frm): New function declaration. 2023-08-11 Juzhe-Zhong * doc/md.texi: Add vec_mask_len_{load_lanes,store_lanes} patterns. * internal-fn.cc (expand_partial_load_optab_fn): Ditto. (expand_partial_store_optab_fn): Ditto. * internal-fn.def (MASK_LEN_LOAD_LANES): Ditto. (MASK_LEN_STORE_LANES): Ditto. * optabs.def (OPTAB_CD): Ditto. 2023-08-11 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmadd_frm): New class for vfnmadd frm. (vfnmadd_frm): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmadd_frm): New function declaration. 2023-08-11 Drew Ross Jakub Jelinek PR tree-optimization/109938 * match.pd (((x ^ y) & z) | x -> (z & y) | x): New simplification. 2023-08-11 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmadd_frm): New class for vfmadd frm. (vfmadd_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmadd_frm): New function definition. 2023-08-11 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmsac_frm): New class for vfnmsac frm. (vfnmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmsac_frm): New function definition. 2023-08-11 Jakub Jelinek * doc/extend.texi (Typeof): Document typeof_unqual and __typeof_unqual__. 2023-08-11 Andrew Pinski PR tree-optimization/110954 * generic-match-head.cc (bitwise_inverted_equal_p): Add wascmp argument and set it accordingly. * gimple-match-head.cc (bitwise_inverted_equal_p): Add wascmp argument to the macro. (gimple_bitwise_inverted_equal_p): Add wascmp argument and set it accordingly. * match.pd (`a & ~a`, `a ^| ~a`): Update call to bitwise_inverted_equal_p and handle wascmp case. (`(~x | y) & x`, `(~x | y) & x`, `a?~t:t`): Update call to bitwise_inverted_equal_p and check to see if was !wascmp or if precision was 1. 2023-08-11 Martin Uecker PR c/84510 * doc/invoke.texi: Update. 2023-08-11 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmsac_frm): New class for vfmsac frm. (vfmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmsac_frm): New function definition 2023-08-10 Jan Hubicka PR middle-end/110923 * tree-ssa-loop-split.cc (split_loop): Watch for division by zero. 2023-08-10 Patrick O'Neill * common/config/riscv/riscv-common.cc: Add Ztso and mark Ztso as dependent on 'a' extension. * config/riscv/riscv-opts.h (MASK_ZTSO): New mask. (TARGET_ZTSO): New target. * config/riscv/riscv.cc (riscv_memmodel_needs_amo_acquire): Add Ztso case. (riscv_memmodel_needs_amo_release): Add Ztso case. (riscv_print_operand): Add Ztso case for LR/SC annotations. * config/riscv/riscv.md: Import sync-rvwmo.md and sync-ztso.md. * config/riscv/riscv.opt: Add Ztso target variable. * config/riscv/sync.md (mem_thread_fence_1): Expand to RVWMO or Ztso specific insn. (atomic_load): Expand to RVWMO or Ztso specific insn. (atomic_store): Expand to RVWMO or Ztso specific insn. * config/riscv/sync-rvwmo.md: New file. Seperate out RVWMO specific load/store/fence mappings. * config/riscv/sync-ztso.md: New file. Seperate out Ztso specific load/store/fence mappings. 2023-08-10 Jan Hubicka * cfgloopmanip.cc (duplicate_loop_body_to_header_edge): Special case loops with 0 iteration count. 2023-08-10 Jan Hubicka * tree-ssa-threadupdate.cc (ssa_fix_duplicate_block_edges): Fix profile update. 2023-08-10 Jan Hubicka * profile-count.cc (profile_count::differs_from_p): Fix overflow and handling of undefined values. 2023-08-10 Jakub Jelinek PR c/102989 * tree-ssa-phiopt.cc (single_non_singleton_phi_for_edges): Never return virtual phis and return NULL if there is a virtual phi where the arguments from E0 and E1 edges aren't equal. 2023-08-10 Richard Biener * internal-fn.def (VCOND, VCONDU, VCONDEQ, VCOND_MASK, VEC_SET, VEC_EXTRACT): Make ECF_CONST | ECF_NOTHROW. 2023-08-10 Juzhe-Zhong PR target/110962 * config/riscv/autovec.md (vec_duplicate): New pattern. 2023-08-10 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmacc_frm): New class for vfnmacc. (vfnmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmacc_frm): New function definition. 2023-08-10 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmacc_frm): New class for vfmacc frm. (vfmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmacc_frm): New function definition. 2023-08-10 Juzhe-Zhong PR target/110964 * config/riscv/riscv-v.cc (expand_cond_len_ternop): Add integer ternary. 2023-08-10 Richard Biener * tree-vectorizer.h (vectorizable_live_operation): Remove gimple_stmt_iterator * argument. * tree-vect-loop.cc (vectorizable_live_operation): Likewise. Adjust plumbing around vect_get_loop_mask. (vect_analyze_loop_operations): Adjust. * tree-vect-slp.cc (vect_slp_analyze_node_operations_1): Likewise. (vect_bb_slp_mark_live_stmts): Likewise. (vect_schedule_slp_node): Likewise. * tree-vect-stmts.cc (can_vectorize_live_stmts): Likewise. Remove gimple_stmt_iterator * argument. (vect_transform_stmt): Adjust. 2023-08-10 Juzhe-Zhong * config/riscv/vector-iterators.md: Add missing modes. 2023-08-10 Jakub Jelinek PR c/102989 * lto-streamer-in.cc (lto_input_tree_1): Assert TYPE_PRECISION is up to WIDE_INT_MAX_PRECISION rather than MAX_BITSIZE_MODE_ANY_INT. 2023-08-10 Jakub Jelinek PR c/102989 * expr.cc (expand_expr_real_1) : Add an early return for EXPAND_WRITE or EXPAND_MEMORY modifiers to avoid testing it multiple times. 2023-08-10 liuhongt PR target/110832 * config/i386/mmx.md: (movq__to_sse): Also do not sanitize upper part of V4HFmode register with -fno-trapping-math. (v4hf3): Enable for ix86_partial_vec_fp_math. (v2hf3): Ditto. (divv2hf3): Ditto. (movd_v2hf_to_sse): Do not sanitize upper part of V2HFmode register with -fno-trapping-math. 2023-08-10 Pan Li Kito Cheng * config/riscv/riscv-protos.h (enum floating_point_rounding_mode): Add NONE, DYN_EXIT and DYN_CALL. (get_frm_mode): New declaration. * config/riscv/riscv-v.cc (get_frm_mode): New function to get frm mode. * config/riscv/riscv-vector-builtins.cc (function_expander::use_ternop_insn): Take care of frm reg. * config/riscv/riscv.cc (riscv_static_frm_mode_p): Migrate to FRM_XXX. (riscv_emit_frm_mode_set): Ditto. (riscv_emit_mode_set): Ditto. (riscv_frm_adjust_mode_after_call): Ditto. (riscv_frm_mode_needed): Ditto. (riscv_frm_mode_after): Ditto. (riscv_mode_entry): Ditto. (riscv_mode_exit): Ditto. * config/riscv/riscv.h (NUM_MODES_FOR_MODE_SWITCHING): Ditto. * config/riscv/vector.md (rne,rtz,rdn,rup,rmm,dyn,dyn_exit,dyn_call,none): Removed (symbol_ref): * config/riscv/vector.md: Set frm_mode attr explicitly. 2023-08-09 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (anticipatable_occurrence_p): Fix incorrect anticipate info. 2023-08-09 Tsukasa OI * common/config/riscv/riscv-common.cc (riscv_ext_version_table): Remove 'Zve32d' from the version list. 2023-08-09 Jin Ma * config/riscv/riscv.cc (riscv_sched_variable_issue): New function. (TARGET_SCHED_VARIABLE_ISSUE): New macro. Co-authored-by: Philipp Tomsich Co-authored-by: Jeff Law 2023-08-09 Jivan Hakobyan * config/riscv/riscv.cc (riscv_legitimize_address): Handle folding. (mem_shadd_or_shadd_rtx_p): New function. 2023-08-09 Andrew Pinski PR tree-optimization/110937 PR tree-optimization/100798 * match.pd (`a ? ~b : b`): Handle this case. 2023-08-09 Uros Bizjak * config/i386/i386.opt (mpartial-vector-fp-math): Add dot. 2023-08-09 Richard Ball * config/aarch64/aarch64-cores.def (AARCH64_CORE): Add Cortex-A520 CPU. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Document Cortex-A520 CPU. 2023-08-09 Carl Love * config/rs6000/rs6000-builtins.def (vcmpneb, vcmpneh, vcmpnew): Move definitions to Altivec stanza. * config/rs6000/altivec.md (vcmpneb, vcmpneh, vcmpnew): New define_expand. 2023-08-09 Juzhe-Zhong PR target/110950 * config/riscv/riscv-v.cc (expand_const_vector): Add NPATTERNS = 1 stepped vector support. 2023-08-09 liuhongt * common/config/i386/cpuinfo.h (get_available_features): Rename local variable subleaf_level to max_subleaf_level. 2023-08-09 Richard Biener PR rtl-optimization/110587 * lra-assigns.cc (find_hard_regno_for_1): Re-order checks. 2023-08-09 Kewen Lin PR tree-optimization/110248 * config/rs6000/rs6000.cc (rs6000_legitimate_address_p): Check if the given code is for ifn LEN_{LOAD,STORE}, if yes then make it not legitimate when outer code is PLUS. 2023-08-09 Kewen Lin PR tree-optimization/110248 * recog.cc (memory_address_addr_space_p): Add one more argument ch of type code_helper and pass it to targetm.addr_space.legitimate_address_p instead of ERROR_MARK. (offsettable_address_addr_space_p): Update one function pointer with one more argument of type code_helper as its assignees memory_address_addr_space_p and strict_memory_address_addr_space_p have been adjusted, and adjust some call sites with ERROR_MARK. * recog.h (tree.h): New include header file for tree_code ERROR_MARK. (memory_address_addr_space_p): Adjust with one more unnamed argument of type code_helper with default ERROR_MARK. (strict_memory_address_addr_space_p): Likewise. * reload.cc (strict_memory_address_addr_space_p): Add one unnamed argument of type code_helper. * tree-ssa-address.cc (valid_mem_ref_p): Add one more argument ch of type code_helper and pass it to memory_address_addr_space_p. * tree-ssa-address.h (valid_mem_ref_p): Adjust the declaration with one more unnamed argument of type code_helper with default value ERROR_MARK. * tree-ssa-loop-ivopts.cc (get_address_cost): Use ERROR_MARK as code by default, change it with ifn code for USE_PTR_ADDRESS type use, and pass it to all valid_mem_ref_p calls. 2023-08-09 Kewen Lin PR tree-optimization/110248 * coretypes.h (class code_helper): Add forward declaration. * doc/tm.texi: Regenerate. * lra-constraints.cc (valid_address_p): Call target hook targetm.addr_space.legitimate_address_p with an extra parameter ERROR_MARK as its prototype changes. * recog.cc (memory_address_addr_space_p): Likewise. * reload.cc (strict_memory_address_addr_space_p): Likewise. * target.def (legitimate_address_p, addr_space.legitimate_address_p): Extend with one more argument of type code_helper, update the documentation accordingly. * targhooks.cc (default_legitimate_address_p): Adjust for the new code_helper argument. (default_addr_space_legitimate_address_p): Likewise. * targhooks.h (default_legitimate_address_p): Likewise. (default_addr_space_legitimate_address_p): Likewise. * config/aarch64/aarch64.cc (aarch64_legitimate_address_hook_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/alpha/alpha.cc (alpha_legitimate_address_p): Likewise. * config/arc/arc.cc (arc_legitimate_address_p): Likewise. * config/arm/arm-protos.h (arm_legitimate_address_p): Likewise. (tree.h): New include for tree_code ERROR_MARK. * config/arm/arm.cc (arm_legitimate_address_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/avr/avr.cc (avr_addr_space_legitimate_address_p): Likewise. * config/bfin/bfin.cc (bfin_legitimate_address_p): Likewise. * config/bpf/bpf.cc (bpf_legitimate_address_p): Likewise. * config/c6x/c6x.cc (c6x_legitimate_address_p): Likewise. * config/cris/cris-protos.h (cris_legitimate_address_p): Likewise. (tree.h): New include for tree_code ERROR_MARK. * config/cris/cris.cc (cris_legitimate_address_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/csky/csky.cc (csky_legitimate_address_p): Likewise. * config/epiphany/epiphany.cc (epiphany_legitimate_address_p): Likewise. * config/frv/frv.cc (frv_legitimate_address_p): Likewise. * config/ft32/ft32.cc (ft32_addr_space_legitimate_address_p): Likewise. * config/gcn/gcn.cc (gcn_addr_space_legitimate_address_p): Likewise. * config/h8300/h8300.cc (h8300_legitimate_address_p): Likewise. * config/i386/i386.cc (ix86_legitimate_address_p): Likewise. * config/ia64/ia64.cc (ia64_legitimate_address_p): Likewise. * config/iq2000/iq2000.cc (iq2000_legitimate_address_p): Likewise. * config/lm32/lm32.cc (lm32_legitimate_address_p): Likewise. * config/loongarch/loongarch.cc (loongarch_legitimate_address_p): Likewise. * config/m32c/m32c.cc (m32c_legitimate_address_p): Likewise. (m32c_addr_space_legitimate_address_p): Likewise. * config/m32r/m32r.cc (m32r_legitimate_address_p): Likewise. * config/m68k/m68k.cc (m68k_legitimate_address_p): Likewise. * config/mcore/mcore.cc (mcore_legitimate_address_p): Likewise. * config/microblaze/microblaze-protos.h (tree.h): New include for tree_code ERROR_MARK. (microblaze_legitimate_address_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/microblaze/microblaze.cc (microblaze_legitimate_address_p): Likewise. * config/mips/mips.cc (mips_legitimate_address_p): Likewise. * config/mmix/mmix.cc (mmix_legitimate_address_p): Likewise. * config/mn10300/mn10300.cc (mn10300_legitimate_address_p): Likewise. * config/moxie/moxie.cc (moxie_legitimate_address_p): Likewise. * config/msp430/msp430.cc (msp430_legitimate_address_p): Likewise. (msp430_addr_space_legitimate_address_p): Adjust with extra code_helper argument with default ERROR_MARK and adjust the call to function msp430_legitimate_address_p. * config/nds32/nds32.cc (nds32_legitimate_address_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/nios2/nios2.cc (nios2_legitimate_address_p): Likewise. * config/nvptx/nvptx.cc (nvptx_legitimate_address_p): Likewise. * config/or1k/or1k.cc (or1k_legitimate_address_p): Likewise. * config/pa/pa.cc (pa_legitimate_address_p): Likewise. * config/pdp11/pdp11.cc (pdp11_legitimate_address_p): Likewise. * config/pru/pru.cc (pru_addr_space_legitimate_address_p): Likewise. * config/riscv/riscv.cc (riscv_legitimate_address_p): Likewise. * config/rl78/rl78-protos.h (rl78_as_legitimate_address): Likewise. (tree.h): New include for tree_code ERROR_MARK. * config/rl78/rl78.cc (rl78_as_legitimate_address): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/rs6000/rs6000.cc (rs6000_legitimate_address_p): Likewise. (rs6000_debug_legitimate_address_p): Adjust with extra code_helper argument and adjust the call to function rs6000_legitimate_address_p. * config/rx/rx.cc (rx_is_legitimate_address): Adjust with extra unnamed code_helper argument with default ERROR_MARK. * config/s390/s390.cc (s390_legitimate_address_p): Likewise. * config/sh/sh.cc (sh_legitimate_address_p): Likewise. * config/sparc/sparc.cc (sparc_legitimate_address_p): Likewise. * config/v850/v850.cc (v850_legitimate_address_p): Likewise. * config/vax/vax.cc (vax_legitimate_address_p): Likewise. * config/visium/visium.cc (visium_legitimate_address_p): Likewise. * config/xtensa/xtensa.cc (xtensa_legitimate_address_p): Likewise. * config/stormy16/stormy16-protos.h (xstormy16_legitimate_address_p): Likewise. (tree.h): New include for tree_code ERROR_MARK. * config/stormy16/stormy16.cc (xstormy16_legitimate_address_p): Adjust with extra unnamed code_helper argument with default ERROR_MARK. 2023-08-09 liuhongt * common/config/i386/cpuinfo.h (get_available_features): Check EAX for valid subleaf before use CPUID. 2023-08-08 Jeff Law * config/riscv/riscv.cc (riscv_expand_conditional_move): Use word_mode for the temporary when canonicalizing the condition. 2023-08-08 Cupertino Miranda * config/bpf/core-builtins.cc: Cleaned include headers. (struct cr_builtins): Added GTY. (cr_builtins_ref): Created. (builtins_data) Changed to GC root. (allocate_builtin_data): Changed. Included gt-core-builtins.h. * config/bpf/coreout.cc: (bpf_core_extra) Added GTY. (bpf_core_extra_ref): Created. (bpf_comment_info): Changed to GC root. (bpf_core_reloc_add, output_btfext_header, btf_ext_init): Changed. 2023-08-08 Uros Bizjak PR target/110832 * config/i386/i386.opt (mpartial-vector-fp-math): New option. * config/i386/mmx.md (movq__to_sse): Do not sanitize upper part of V2SFmode register with -fno-trapping-math. (v2sf3): Enable for ix86_partial_vec_fp_math. (divv2sf3): Ditto. (v2sf3): Ditto. (sqrtv2sf2): Ditto. (*mmx_haddv2sf3_low): Ditto. (*mmx_hsubv2sf3_low): Ditto. (vec_addsubv2sf3): Ditto. (vec_cmpv2sfv2si): Ditto. (vcondv2sf): Ditto. (fmav2sf4): Ditto. (fmsv2sf4): Ditto. (fnmav2sf4): Ditto. (fnmsv2sf4): Ditto. (fix_truncv2sfv2si2): Ditto. (fixuns_truncv2sfv2si2): Ditto. (floatv2siv2sf2): Ditto. (floatunsv2siv2sf2): Ditto. (nearbyintv2sf2): Ditto. (rintv2sf2): Ditto. (lrintv2sfv2si2): Ditto. (ceilv2sf2): Ditto. (lceilv2sfv2si2): Ditto. (floorv2sf2): Ditto. (lfloorv2sfv2si2): Ditto. (btruncv2sf2): Ditto. (roundv2sf2): Ditto. (lroundv2sfv2si2): Ditto. * doc/invoke.texi (x86 Options): Document -mpartial-vector-fp-math option. 2023-08-08 Andrew Pinski PR tree-optimization/103281 PR tree-optimization/28794 * vr-values.cc (simplify_using_ranges::simplify_cond_using_ranges_1): Split out majority to ... (simplify_using_ranges::simplify_compare_using_ranges_1): Here. (simplify_using_ranges::simplify_casted_cond): Rename to ... (simplify_using_ranges::simplify_casted_compare): This and change arguments to take op0 and op1. (simplify_using_ranges::simplify_compare_assign_using_ranges_1): New method. (simplify_using_ranges::simplify): For tcc_comparison assignments call simplify_compare_assign_using_ranges_1. * vr-values.h (simplify_using_ranges): Add new methods, simplify_compare_using_ranges_1 and simplify_compare_assign_using_ranges_1. Rename simplify_casted_cond and simplify_casted_compare and update argument types. 2023-08-08 Andrzej Turko * genmatch.cc: Log line numbers indirectly. 2023-08-08 Andrzej Turko * genmatch.cc: Make sinfo map ordered. * Makefile.in: Require the ordered map header for genmatch.o. 2023-08-08 Andrzej Turko * ordered-hash-map.h: Add get_or_insert. * ordered-hash-map-tests.cc: Use get_or_insert in tests. 2023-08-08 Juzhe-Zhong * config/riscv/autovec.md (cond_): New pattern. (cond_len_): Ditto. (cond_fma): Ditto. (cond_len_fma): Ditto. (cond_fnma): Ditto. (cond_len_fnma): Ditto. (cond_fms): Ditto. (cond_len_fms): Ditto. (cond_fnms): Ditto. (cond_len_fnms): Ditto. * config/riscv/riscv-protos.h (riscv_get_v_regno_alignment): Export global. (enum insn_type): Add new enum type. (prepare_ternary_operands): New function. * config/riscv/riscv-v.cc (emit_vlmax_masked_fp_mu_insn): Ditto. (emit_nonvlmax_tumu_insn): Ditto. (emit_nonvlmax_fp_tumu_insn): Ditto. (expand_cond_len_binop): Add condtional operations. (expand_cond_len_ternop): Ditto. (prepare_ternary_operands): New function. * config/riscv/riscv.cc (riscv_memmodel_needs_amo_release): Export riscv_get_v_regno_alignment as global scope. * config/riscv/vector.md: Fix ternary bugs. 2023-08-08 Richard Biener PR tree-optimization/49955 * tree-vectorizer.h (_slp_instance::remain_stmts): New. (SLP_INSTANCE_REMAIN_STMTS): Likewise. * tree-vect-slp.cc (vect_free_slp_instance): Release SLP_INSTANCE_REMAIN_STMTS. (vect_build_slp_instance): Make the number of lanes of a BB reduction even. (vectorize_slp_instance_root_stmt): Handle unvectorized defs of a BB reduction. 2023-08-08 Ju-Zhe Zhong * internal-fn.cc (get_len_internal_fn): New function. (DEF_INTERNAL_COND_FN): Ditto. (DEF_INTERNAL_SIGNED_COND_FN): Ditto. * internal-fn.h (get_len_internal_fn): Ditto. * tree-vect-stmts.cc (vectorizable_call): Add CALL auto-vectorization. 2023-08-08 Richard Biener PR tree-optimization/110924 * tree-ssa-live.h (virtual_operand_live): Update comment. * tree-ssa-live.cc (virtual_operand_live::get_live_in): Remove optimization, look at each predecessor. * tree-ssa-sink.cc (pass_sink_code::execute): Mark backedges. 2023-08-08 yulong * config/riscv/riscv-v.cc (slide1_sew64_helper): Modify. 2023-08-08 Juzhe-Zhong * config/riscv/autovec-vls.md (2): Add VLS neg. * config/riscv/vector.md: Ditto. 2023-08-08 Juzhe-Zhong * config/riscv/autovec.md: Add VLS shift. 2023-08-07 Juzhe-Zhong * config/riscv/autovec-vls.md (3): Add VLS modes. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. 2023-08-07 Jonathan Wakely * config/i386/i386.cc (ix86_invalid_conversion): Fix grammar. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 John Ericson * configure: Regenerate. 2023-08-07 Alan Modra * configure: Regenerate. 2023-08-07 Alexander von Gluck IV * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 Nick Alcock * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-07 H.J. Lu * configure: Regenerate. 2023-08-07 Jeff Law * config/riscv/riscv.cc (riscv_expand_conditional_move): Allow VOIDmode operands to conditional before canonicalization. 2023-08-07 Manolis Tsamis * regcprop.cc (maybe_copy_reg_attrs): Remove unnecessary function. (find_oldest_value_reg): Inline stack_pointer_rtx check. (copyprop_hardreg_forward_1): Inline stack_pointer_rtx check. 2023-08-07 Martin Jambor PR ipa/110378 * ipa-param-manipulation.h (class ipa_param_body_adjustments): New members get_ddef_if_exists_and_is_used and mark_clobbers_dead. * ipa-sra.cc (isra_track_scalar_value_uses): Ignore clobbers. (ptr_parm_has_nonarg_uses): Likewise. * ipa-param-manipulation.cc (ipa_param_body_adjustments::get_ddef_if_exists_and_is_used): New. (ipa_param_body_adjustments::mark_dead_statements): Move initial checks to get_ddef_if_exists_and_is_used. (ipa_param_body_adjustments::mark_clobbers_dead): New. (ipa_param_body_adjustments::common_initialization): Call mark_clobbers_dead when splitting. 2023-08-07 Raphael Zinsly * config/riscv/riscv.cc (riscv_expand_int_scc): Add invert_ptr as an argument and pass it to riscv_emit_int_order_test. (riscv_expand_conditional_move): Handle cases where the condition is not EQ/NE or the second argument to the conditional is not (const_int 0). * config/riscv/riscv-protos.h (riscv_expand_int_scc): Update prototype. Co-authored-by: Jeff Law 2023-08-07 Andrew Pinski PR tree-optimization/109959 * match.pd (`(a > 1) ? 0 : (cast)a`, `(a <= 1) & (cast)a`): New patterns. 2023-08-07 Richard Biener * tree-ssa-sink.cc (pass_sink_code::execute): Do not calculate post-dominators. Calculate RPO on the inverted graph and process blocks in that order. 2023-08-07 liuhongt PR target/110926 * config/i386/i386-protos.h (vpternlog_redundant_operand_mask): Adjust parameter type. * config/i386/i386.cc (vpternlog_redundant_operand_mask): Use INTVAL instead of XINT, also adjust parameter type from rtx* to rtx since the function only needs operands[4] in vpternlog pattern. (substitute_vpternlog_operands): Pass operands[4] instead of operands to vpternlog_redundant_operand_mask. * config/i386/sse.md: Ditto. 2023-08-07 Richard Biener * tree-vect-slp.cc (vect_slp_region): Save/restore vect_location around dumping code. 2023-08-07 liuhongt PR target/110762 * config/i386/mmx.md (3): Changed from define_insn to define_expand and break into .. (v4hf3): .. this. (divv4hf3): .. this. (v2hf3): .. this. (divv2hf3): .. this. (movd_v2hf_to_sse): New define_expand. (movq__to_sse): Extend to V4HFmode. (mmxdoublevecmode): Ditto. (V2FI_V4HF): New mode iterator. * config/i386/sse.md (*vec_concatv4sf): Extend to hanlde V8HF by using mode iterator V4SF_V8HF, renamed to .. (*vec_concat): .. this. (*vec_concatv4sf_0): Extend to handle V8HF by using mode iterator V4SF_V8HF, renamed to .. (*vec_concat_0): .. this. (*vec_concatv8hf_movss): New define_insn. (V4SF_V8HF): New mode iterator. 2023-08-07 Juzhe-Zhong * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Add op vectype. 2023-08-07 Jan Beulich * config/i386/mmx.md (*mmx_pinsrd): Drop "prefix_data16". (*mmx_pinsrb): Likewise. (*mmx_pextrb): Likewise. (*mmx_pextrb_zext): Likewise. (mmx_pshufbv8qi3): Likewise. (mmx_pshufbv4qi3): Likewise. (mmx_pswapdv2si2): Likewise. (*pinsrb): Likewise. (*pextrb): Likewise. (*pextrb_zext): Likewise. * config/i386/sse.md (*sse4_1_mulv2siv2di3): Likewise. (*sse2_eq3): Likewise. (*sse2_gt3): Likewise. (_pinsr): Likewise. (*vec_extract): Likewise. (*vec_extract_zext): Likewise. (*vec_extractv16qi_zext): Likewise. (ssse3_phwv8hi3): Likewise. (ssse3_pmaddubsw128): Likewise. (*_pmulhrsw3): Likewise. (_pshufb3): Likewise. (_psign3): Likewise. (_palignr): Likewise. (*abs2): Likewise. (sse4_2_pcmpestr): Likewise. (sse4_2_pcmpestri): Likewise. (sse4_2_pcmpestrm): Likewise. (sse4_2_pcmpestr_cconly): Likewise. (sse4_2_pcmpistr): Likewise. (sse4_2_pcmpistri): Likewise. (sse4_2_pcmpistrm): Likewise. (sse4_2_pcmpistr_cconly): Likewise. (vgf2p8affineinvqb_): Likewise. (vgf2p8affineqb_): Likewise. (vgf2p8mulb_): Likewise. (*v8hi3 [smaxmin]): Drop "prefix_data16" and "prefix_extra". (*v16qi3 [umaxmin]): Likewise. 2023-08-07 Jan Beulich * config/i386/i386.md (sse4_1_round2): Make "length_immediate" uniformly 1. * config/i386/mmx.md (mmx_pblendvb_v8qi): Likewise. (mmx_pblendvb_): Likewise. 2023-08-07 Jan Beulich * config/i386/sse.md (__): Add "prefix" attribute. (avx512fp16_sh_v8hf): Likewise. 2023-08-07 Jan Beulich * config/i386/sse.md (xop_phaddbw): Add "prefix", "prefix_extra", and "mode" attributes. (xop_phaddbd): Likewise. (xop_phaddbq): Likewise. (xop_phaddwd): Likewise. (xop_phaddwq): Likewise. (xop_phadddq): Likewise. (xop_phsubbw): Likewise. (xop_phsubwd): Likewise. (xop_phsubdq): Likewise. (xop_rotl3): Add "prefix" and "prefix_extra" attributes. (xop_rotr3): Likewise. (xop_frcz2): Likewise. (*xop_vmfrcz2): Likewise. (xop_vrotl3): Add "prefix" attribute. Change "prefix_extra" to 1. (xop_sha3): Likewise. (xop_shl3): Likewise. 2023-08-07 Jan Beulich * config/i386/sse.md (*_eq3_1): Drop "prefix_extra". (avx512dq_vextract64x2_1_mask): Likewise. (*avx512dq_vextract64x2_1): Likewise. (avx512f_vextract32x4_1_mask): Likewise. (*avx512f_vextract32x4_1): Likewise. (vec_extract_lo__mask [AVX512 forms]): Likewise. (vec_extract_lo_ [AVX512 forms]): Likewise. (vec_extract_hi__mask [AVX512 forms]): Likewise. (vec_extract_hi_ [AVX512 forms]): Likewise. (@vec_extract_lo_ [AVX512 forms]): Likewise. (@vec_extract_hi_ [AVX512 forms]): Likewise. (vec_extract_lo_v64qi): Likewise. (vec_extract_hi_v64qi): Likewise. (*vec_widen_umult_even_v16si): Likewise. (*vec_widen_smult_even_v16si): Likewise. (*avx512f_3): Likewise. (*vec_extractv4ti): Likewise. (avx512bw_v32qiv32hi2): Likewise. (avx512dq_broadcast_1): Likewise. Add "length_immediate". 2023-08-07 Jan Beulich * config/i386/i386.md (@rdrand): Add "prefix_0f". Drop "prefix_extra". (@rdseed): Likewise. * config/i386/mmx.md (3 [smaxmin and umaxmin cases]): Adjust "prefix_extra". * config/i386/sse.md (@vec_set_0): Likewise. (*sse4_1_3): Likewise. (*avx2_eq3): Likewise. (avx2_gt3): Likewise. (_pinsr): Likewise. (*vec_extract): Likewise. (_movntdqa): Likewise. 2023-08-07 Jan Beulich * config/i386/i386.md (rdbase): Add "prefix_0f" and "prefix_rep". Drop "prefix_extra". (wrbase): Likewise. (ptwrite): Likewise. 2023-08-07 Jan Beulich * config/i386/i386.md (isa): Move up. (length_immediate): Handle "fma4". (prefix): Handle "ssemuladd". * config/i386/sse.md (*fma_fmadd_): Add "prefix" attribute. (fma_fmadd_): Likewise. (_fmadd__mask): Likewise. (_fmadd__mask3): Likewise. (fma_fmsub_): Likewise. (_fmsub__mask): Likewise. (_fmsub__mask3): Likewise. (*fma_fnmadd_): Likewise. (fma_fnmadd_): Likewise. (_fnmadd__mask): Likewise. (_fnmadd__mask3): Likewise. (fma_fnmsub_): Likewise. (_fnmsub__mask): Likewise. (_fnmsub__mask3): Likewise. (fma_fmaddsub_): Likewise. (_fmaddsub__mask): Likewise. (_fmaddsub__mask3): Likewise. (fma_fmsubadd_): Likewise. (_fmsubadd__mask): Likewise. (_fmsubadd__mask3): Likewise. (*fmai_fmadd_): Likewise. (*fmai_fmsub_): Likewise. (*fmai_fnmadd_): Likewise. (*fmai_fnmsub_): Likewise. (avx512f_vmfmadd__mask): Likewise. (avx512f_vmfmadd__mask3): Likewise. (avx512f_vmfmadd__maskz_1): Likewise. (*avx512f_vmfmsub__mask): Likewise. (avx512f_vmfmsub__mask3): Likewise. (*avx512f_vmfmsub__maskz_1): Likewise. (avx512f_vmfnmadd__mask): Likewise. (avx512f_vmfnmadd__mask3): Likewise. (avx512f_vmfnmadd__maskz_1): Likewise. (*avx512f_vmfnmsub__mask): Likewise. (*avx512f_vmfnmsub__mask3): Likewise. (*avx512f_vmfnmsub__maskz_1): Likewise. (*fma4i_vmfmadd_): Likewise. (*fma4i_vmfmsub_): Likewise. (*fma4i_vmfnmadd_): Likewise. (*fma4i_vmfnmsub_): Likewise. (fma__): Likewise. (___mask): Likewise. (avx512fp16_fma_sh_v8hf): Likewise. (avx512fp16_sh_v8hf_mask): Likewise. (xop_p): Likewise. (xop_pdql): Likewise. (xop_pdqh): Likewise. (xop_pwd): Likewise. (xop_pwd): Likewise. (fma___pair): Likewise. Add "mode" attribute. 2023-08-07 Jan Beulich * config/i386/i386.md (length_immediate): Handle "sse4arg". (prefix): Likewise. (*xop_pcmov_): Add "mode" attribute. * config/i386/mmx.md (*xop_maskcmp3): Drop "prefix_data16", "prefix_rep", "prefix_extra", and "length_immediate" attributes. (*xop_maskcmp_uns3): Likewise. Switch "type" to "sse4arg". (*xop_pcmov_): Add "mode" attribute. * config/i386/sse.md (xop_pcmov_): Add "mode" attribute. (xop_maskcmp3): Drop "prefix_data16", "prefix_rep", "prefix_extra", and "length_immediate" attributes. (xop_maskcmp_uns3): Likewise. Switch "type" to "sse4arg". (xop_maskcmp_uns23): Drop "prefix_data16", "prefix_extra", and "length_immediate" attributes. Switch "type" to "sse4arg". (xop_pcom_tf3): Likewise. (xop_vpermil23): Drop "length_immediate" attribute. 2023-08-07 Jan Beulich * config/i386/i386.md (prefix_extra): Correct comment. Fold cases yielding 2 into ones yielding 1. 2023-08-07 Jan Hubicka PR tree-optimization/106293 * tree-vect-loop-manip.cc (vect_loop_versioning): Fix profile update. * tree-vect-loop.cc (vect_transform_loop): Likewise. 2023-08-07 Andrew Pinski PR tree-optimization/96695 * match.pd (min_value, max_value): Extend to pointer types too. 2023-08-06 Jan Hubicka * config/i386/cpuid.h (__get_cpuid_count, __get_cpuid_max): Add __builtin_expect that CPU likely supports cpuid. 2023-08-06 Jan Hubicka * tree-loop-distribution.cc (loop_distribution::execute): Disable distribution for loops with estimated iterations 0. 2023-08-06 Jan Hubicka * tree-vect-loop-manip.cc (vect_do_peeling): Fix profile update of peeled epilogues. 2023-08-04 Xiao Zeng * config/riscv/riscv.cc (riscv_expand_conditional_move): Recognize more Zicond patterns. Fix whitespace typo. (riscv_rtx_costs): Remove accidental code duplication. Co-authored-by: Jeff Law 2023-08-04 Yan Simonaytes PR target/110202 * config/i386/i386-protos.h (vpternlog_redundant_operand_mask): Declare. (substitute_vpternlog_operands): Declare. * config/i386/i386.cc (vpternlog_redundant_operand_mask): New helper. (substitute_vpternlog_operands): New function. Use them... * config/i386/sse.md: ... here in new VPTERNLOG define_splits. 2023-08-04 Roger Sayle * expmed.cc (extract_bit_field_1): Document that an UNSIGNEDP value of -1 is equivalent to don't care. (extract_integral_bit_field): Indicate that we don't require the most significant word to be zero extended, if we're about to sign extend it. (extract_fixed_bit_field_1): Document that an UNSIGNEDP value of -1 is equivalent to don't care. Don't clear the most significant bits with AND mask when UNSIGNEDP is -1. 2023-08-04 Roger Sayle * config/i386/sse.md (define_split): Convert highpart:DF extract from V2DFmode register into a sse2_storehpd instruction. (define_split): Likewise, convert lowpart:DF extract from V2DF register into a sse2_storelpd instruction. 2023-08-04 Qing Zhao * doc/invoke.texi (-Wflex-array-member-not-at-end): Document new option. 2023-08-04 Vladimir N. Makarov * lra-lives.cc (process_bb_lives): Check input insn pattern hard regs against early clobber hard regs. 2023-08-04 Tamar Christina * doc/extend.texi: Document it. 2023-08-04 Tamar Christina PR target/106346 * config/aarch64/aarch64-simd.md (vec_widen_shiftl_lo_, vec_widen_shiftl_hi_): Remove. (aarch64_shll_internal): Renamed to... (aarch64_shll): .. This. (aarch64_shll2_internal): Renamed to... (aarch64_shll2): .. This. (aarch64_shll_n, aarch64_shll2_n): Re-use new optabs. * config/aarch64/constraints.md (D2, DL): New. * config/aarch64/predicates.md (aarch64_simd_shll_imm_vec): New. 2023-08-04 Tamar Christina * gensupport.cc (conlist): Support length 0 attribute. 2023-08-04 Tamar Christina * config/aarch64/aarch64.cc (aarch64_bool_compound_p): New. (aarch64_adjust_stmt_cost, aarch64_vector_costs::count_ops): Use it. 2023-08-04 Tamar Christina * config/aarch64/aarch64.cc (aarch64_multiply_add_p): Update handling of constants. (aarch64_adjust_stmt_cost): Use it. (aarch64_vector_costs::count_ops): Likewise. (aarch64_vector_costs::add_stmt_cost): Pass vinfo to aarch64_adjust_stmt_cost. 2023-08-04 Richard Biener PR tree-optimization/110838 * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Fix right-shift value sanitizing. Properly emit external def mangling in the preheader rather than in the pattern def sequence where it will fail vectorizing. 2023-08-04 Matthew Malcomson PR middle-end/110316 PR middle-end/9903 * timevar.cc (NANOSEC_PER_SEC, TICKS_TO_NANOSEC, CLOCKS_TO_NANOSEC, nanosec_to_floating_sec, percent_of): New. (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Remove these macros. (timer::validate_phases): Use integral arithmetic to check validity. (timer::print_row, timer::print): Convert from integral nanoseconds to floating point seconds before printing. (timer::all_zero): Change limit to nanosec count instead of fractional count of seconds. (make_json_for_timevar_time_def): Convert from integral nanoseconds to floating point seconds before recording. * timevar.h (struct timevar_time_def): Update all measurements to use uint64_t nanoseconds rather than seconds stored in a double. 2023-08-04 Richard Biener PR tree-optimization/110838 * match.pd (([rl]shift @0 out-of-bounds) -> zero): Restrict the arithmetic right-shift case to non-negative operands. 2023-08-04 Pan Li Revert: 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmacc_frm): New class for vfmacc frm. (vfmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmacc_frm): New function definition. * config/riscv/riscv-vector-builtins.cc (function_expander::use_ternop_insn): Add frm operand support. * config/riscv/vector.md: Add vfmuladd to frm_mode. 2023-08-04 Pan Li Revert: 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmacc_frm): New class for vfnmacc. (vfnmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmacc_frm): New function definition. 2023-08-04 Pan Li Revert: 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmsac_frm): New class for vfmsac frm. (vfmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmsac_frm): New function definition. 2023-08-04 Pan Li Revert: 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmsac_frm): New class for vfnmsac frm. (vfnmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmsac_frm): New function definition. 2023-08-04 Georg-Johann Lay * config/avr/avr-mcus.def (avr64dd14, avr64dd20, avr64dd28, avr64dd32) (avr64ea28, avr64ea32, avr64ea48, attiny424, attiny426, attiny427) (attiny824, attiny826, attiny827, attiny1624, attiny1626, attiny1627) (attiny3224, attiny3226, attiny3227, avr16dd14, avr16dd20, avr16dd28) (avr16dd32, avr32dd14, avr32dd20, avr32dd28, avr32dd32) (attiny102, attiny104): New devices. * doc/avr-mmcu.texi: Regenerate. 2023-08-04 Georg-Johann Lay * config/avr/avr-mcus.def (avr128d*, avr64d*): Fix their FLASH_SIZE and PM_OFFSET entries. 2023-08-04 Andrew Pinski PR tree-optimization/110874 * gimple-match-head.cc (gimple_bit_not_with_nop): New declaration. (gimple_maybe_cmp): Likewise. (gimple_bitwise_inverted_equal_p): Rewrite to use gimple_bit_not_with_nop and gimple_maybe_cmp instead of being recursive. * match.pd (bit_not_with_nop): New match pattern. (maybe_cmp): Likewise. 2023-08-04 Drew Ross PR middle-end/101955 * match.pd ((signed x << c) >> c): New canonicalization. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmsac_frm): New class for vfnmsac frm. (vfnmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmsac_frm): New function definition. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmsac_frm): New class for vfmsac frm. (vfmsac_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmsac_frm): New function definition. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfnmacc_frm): New class for vfnmacc. (vfnmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfnmacc_frm): New function definition. 2023-08-04 Hao Liu PR target/110625 * config/aarch64/aarch64.cc (aarch64_force_single_cycle): check STMT_VINFO_REDUC_DEF to avoid failures in info_for_reduction. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class vfmacc_frm): New class for vfmacc frm. (vfmacc_frm_obj): New declaration. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h: Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfmacc_frm): New function definition. * config/riscv/riscv-vector-builtins.cc (function_expander::use_ternop_insn): Add frm operand support. * config/riscv/vector.md: Add vfmuladd to frm_mode. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (vfwmul_frm_obj): New declaration. (vfwmul_frm): Ditto. * config/riscv/riscv-vector-builtins-bases.h: (vfwmul_frm): Ditto. * config/riscv/riscv-vector-builtins-functions.def (vfwmul_frm): New function definition. * config/riscv/vector.md: (frm_mode) Add vfwmul to frm_mode. 2023-08-04 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (binop_frm): New declaration. (reverse_binop_frm): Likewise. (BASE): Likewise. * config/riscv/riscv-vector-builtins-bases.h: (vfdiv_frm): New extern declaration. (vfrdiv_frm): Likewise. * config/riscv/riscv-vector-builtins-functions.def (vfdiv_frm): New function definition. (vfrdiv_frm): Likewise. * config/riscv/vector.md: Add vfdiv to frm_mode. 2023-08-03 Jan Hubicka * tree-cfg.cc (print_loop_info): Print entry count. 2023-08-03 Jan Hubicka * tree-ssa-loop-split.cc (split_loop): Update estimated iteration counts. 2023-08-03 Jan Hubicka PR bootstrap/110857 * cfgloopmanip.cc (scale_loop_profile): (Un)initialize unadjusted_exit_count. 2023-08-03 Aldy Hernandez * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Read global value/mask. 2023-08-03 Xiao Zeng * config/riscv/riscv.cc (riscv_expand_conditional_move): Recognize various Zicond patterns. * config/riscv/riscv.md (movcc): Allow TARGET_ZICOND. Use sfb_alu_operand for both arms of the conditional move. Co-authored-by: Jeff Law 2023-08-03 Cupertino Miranda PR target/107844 PR target/107479 PR target/107480 PR target/107481 * config.gcc: Added core-builtins.cc and .o files. * config/bpf/bpf-passes.def: Removed file. * config/bpf/bpf-protos.h (bpf_add_core_reloc, bpf_replace_core_move_operands): New prototypes. * config/bpf/bpf.cc (enum bpf_builtins, is_attr_preserve_access, maybe_make_core_relo, bpf_core_field_info, bpf_core_compute, bpf_core_get_index, bpf_core_new_decl, bpf_core_walk, bpf_is_valid_preserve_field_info_arg, is_attr_preserve_access, handle_attr_preserve, pass_data_bpf_core_attr, pass_bpf_core_attr): Removed. (def_builtin, bpf_expand_builtin, bpf_resolve_overloaded_builtin): Changed. * config/bpf/bpf.md (define_expand mov): Changed. (mov_reloc_core): Added. * config/bpf/core-builtins.cc (struct cr_builtin, enum cr_decision struct cr_local, struct cr_final, struct core_builtin_helpers, enum bpf_plugin_states): Added types. (builtins_data, core_builtin_helpers, core_builtin_type_defs): Added variables. (allocate_builtin_data, get_builtin-data, search_builtin_data, remove_parser_plugin, compare_same_kind, compare_same_ptr_expr, compare_same_ptr_type, is_attr_preserve_access, core_field_info, bpf_core_get_index, compute_field_expr, pack_field_expr_for_access_index, pack_field_expr_for_preserve_field, process_field_expr, pack_enum_value, process_enum_value, pack_type, process_type, bpf_require_core_support, make_core_relo, read_kind, kind_access_index, kind_preserve_field_info, kind_enum_value, kind_type_id, kind_preserve_type_info, get_core_builtin_fndecl_for_type, bpf_handle_plugin_finish_type, bpf_init_core_builtins, construct_builtin_core_reloc, bpf_resolve_overloaded_core_builtin, bpf_expand_core_builtin, bpf_add_core_reloc, bpf_replace_core_move_operands): Added functions. * config/bpf/core-builtins.h (enum bpf_builtins): Added. (bpf_init_core_builtins, bpf_expand_core_builtin, bpf_resolve_overloaded_core_builtin): Added functions. * config/bpf/coreout.cc (struct bpf_core_extra): Added. (bpf_core_reloc_add, output_asm_btfext_core_reloc): Changed. * config/bpf/coreout.h (bpf_core_reloc_add) Changed prototype. * config/bpf/t-bpf: Added core-builtins.o. * doc/extend.texi: Added documentation for new BPF builtins. 2023-08-03 Andrew MacLeod * gimple-range-fold.cc (fold_using_range::range_of_range_op): Add ranges to the call to relation_fold_and_or. (fold_using_range::relation_fold_and_or): Add op1 and op2 ranges. (fur_source::register_outgoing_edges): Add op1 and op2 ranges. * gimple-range-fold.h (relation_fold_and_or): Adjust params. * gimple-range-gori.cc (gori_compute::compute_operand_range): Add a varying op1 and op2 to call. * range-op-float.cc (range_operator::op1_op2_relation): New dafaults. (operator_equal::op1_op2_relation): New float version. (operator_not_equal::op1_op2_relation): Ditto. (operator_lt::op1_op2_relation): Ditto. (operator_le::op1_op2_relation): Ditto. (operator_gt::op1_op2_relation): Ditto. (operator_ge::op1_op2_relation) Ditto. * range-op-mixed.h (operator_equal::op1_op2_relation): New float prototype. (operator_not_equal::op1_op2_relation): Ditto. (operator_lt::op1_op2_relation): Ditto. (operator_le::op1_op2_relation): Ditto. (operator_gt::op1_op2_relation): Ditto. (operator_ge::op1_op2_relation): Ditto. * range-op.cc (range_op_handler::op1_op2_relation): Dispatch new variations. (range_operator::op1_op2_relation): Add extra params. (operator_equal::op1_op2_relation): Ditto. (operator_not_equal::op1_op2_relation): Ditto. (operator_lt::op1_op2_relation): Ditto. (operator_le::op1_op2_relation): Ditto. (operator_gt::op1_op2_relation): Ditto. (operator_ge::op1_op2_relation): Ditto. * range-op.h (range_operator): New prototypes. (range_op_handler): Ditto. 2023-08-03 Andrew MacLeod * gimple-range-gori.cc (gori_compute::compute_operand1_range): Use identity relation. (gori_compute::compute_operand2_range): Ditto. * value-relation.cc (get_identity_relation): New. * value-relation.h (get_identity_relation): New prototype. 2023-08-03 Andrew MacLeod * value-range.h (Value_Range::set_varying): Set the type. (Value_Range::set_zero): Ditto. (Value_Range::set_nonzero): Ditto. 2023-08-03 Jeff Law * config/riscv/riscv.cc (riscv_rtx_costs): Remove errant hunk from recent commit. 2023-08-03 Pan Li * config/riscv/riscv-vector-builtins-bases.cc: Add vfsub. 2023-08-03 Richard Sandiford * poly-int.h (can_div_trunc_p): Succeed for more boundary conditions. 2023-08-03 Richard Biener PR tree-optimization/110838 * tree-vect-patterns.cc (vect_recog_over_widening_pattern): Adjust the shift operand of RSHIFT_EXPRs. 2023-08-03 Richard Biener PR tree-optimization/110702 * tree-ssa-loop-ivopts.cc (rewrite_use_address): When we created a NULL pointer based access rewrite that to a LEA. 2023-08-03 Richard Biener * tree-ssa-sink.cc: Include tree-ssa-live.h. (pass_sink_code::execute): Instantiate virtual_operand_live and pass it down. (sink_code_in_bb): Pass down virtual_operand_live. (statement_sink_location): Get virtual_operand_live and verify we are not sinking loads across stores by looking up the live virtual operand at the sink location. 2023-08-03 Richard Biener * tree-ssa-live.h (class virtual_operand_live): New. * tree-ssa-live.cc (virtual_operand_live::init): New. (virtual_operand_live::get_live_in): Likewise. (virtual_operand_live::get_live_out): Likewise. 2023-08-03 Richard Biener * passes.def: Exchange loop splitting and final value replacement passes. 2023-08-03 Stefan Schulze Frielinghaus * config/s390/s390.cc (expand_perm_as_a_vlbr_vstbr_candidate): New function which handles bswap patterns for vec_perm_const. (vectorize_vec_perm_const_1): Call new function. * config/s390/vector.md (*bswap): Fix operands in output template. (*vstbr): New insn. 2023-08-03 Alexandre Oliva * config/vxworks-smp.opt: New. Introduce -msmp. * config.gcc: Enable it on powerpc* vxworks prior to 7r*. * config/rs6000/vxworks.h (STARTFILE_PREFIX_SPEC): Choose lib_smp when -msmp is present in the command line. * doc/invoke.texi: Document it. 2023-08-03 Yanzhang Wang * config/riscv/riscv.cc (riscv_save_reg_p): Save ra for leaf when enabling -mno-omit-leaf-frame-pointer (riscv_option_override): Override omit-frame-pointer. (riscv_frame_pointer_required): Save s0 for non-leaf function (TARGET_FRAME_POINTER_REQUIRED): Override defination * config/riscv/riscv.opt: Add option support. 2023-08-03 Roger Sayle PR target/110792 * config/i386/i386.md (ti3): For rotations by 64 bits place operand in a register before gen_64ti2_doubleword. (di3): Likewise, for rotations by 32 bits, place operand in a register before gen_32di2_doubleword. (32di2_doubleword): Constrain operand to be in register. (64ti2_doubleword): Likewise. 2023-08-03 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (vfmul_frm_obj): New declaration. (Base): Likewise. * config/riscv/riscv-vector-builtins-bases.h: Likewise. * config/riscv/riscv-vector-builtins-functions.def (vfmul_frm): New function definition. * config/riscv/vector.md: Add vfmul to frm_mode. 2023-08-03 Andrew Pinski * match.pd (`~X & X`): Check that the types match. (`~x | x`, `~x ^ x`): Likewise. 2023-08-03 Pan Li * config/riscv/riscv-vector-builtins-bases.h: Remove redudant declaration. 2023-08-03 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (BASE): Add vfwsub frm. * config/riscv/riscv-vector-builtins-bases.h: Add declaration. * config/riscv/riscv-vector-builtins-functions.def (vfwsub_frm): Add vfwsub function definitions. 2023-08-02 Stefan Schulze Frielinghaus PR rtl-optimization/110867 * combine.cc (simplify_compare_const): Try the optimization only in case the constant fits into the comparison mode. 2023-08-02 Jeff Law * config/riscv/zicond.md: Remove incorrect zicond patterns and renumber/rename them. (zero.nez..opt2): Fix output string. 2023-08-02 Richard Biener * tree-phinodes.h (add_phi_node_to_bb): Remove. * tree-phinodes.cc (add_phi_node_to_bb): Make static. 2023-08-02 Jan Beulich * config/i386/sse.md (vec_dupv2df): Fold the middle two of the alternatives. 2023-08-02 Richard Biener PR tree-optimization/92335 * tree-ssa-sink.cc (select_best_block): Before loop optimizations avoid sinking unconditional loads/stores in innermost loops to conditional executed places. 2023-08-02 Andrew Pinski * gimple-match-head.cc (gimple_bitwise_inverted_equal_p): Valueize the comparison operands before comparing them. 2023-08-02 Andrew Pinski * match.pd (`~X & X`, `~X | X`): Move over to use bitwise_inverted_equal_p, removing :c as bitwise_inverted_equal_p handles that already. Remove range test simplifications to true/false as they are now handled by these patterns. 2023-08-02 Andrew Pinski * tree-ssa-phiopt.cc (match_simplify_replacement): Mark's cond statement's lhs and rhs to check if trivial dead. Rename inserted_exprs to exprs_maybe_dce; also move it so bitmap is not allocated if not needed. 2023-08-02 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class widen_binop_frm): New class for binop frm. (BASE): Add vfwadd_frm. * config/riscv/riscv-vector-builtins-bases.h: New declaration. * config/riscv/riscv-vector-builtins-functions.def (vfwadd_frm): New function definition. * config/riscv/riscv-vector-builtins-shapes.cc (BASE_NAME_MAX_LEN): New macro. (struct alu_frm_def): Leverage new base class. (struct build_frm_base): New build base for frm. (struct widen_alu_frm_def): New struct for widen alu frm. (SHAPE): Add widen_alu_frm shape. * config/riscv/riscv-vector-builtins-shapes.h: New declaration. * config/riscv/vector.md (frm_mode): Add vfwalu type. 2023-08-02 Jan Hubicka * cfgloop.h (loop_count_in): Declare. * cfgloopanal.cc (expected_loop_iterations_by_profile): Use count_in. (loop_count_in): Move here from ... * cfgloopmanip.cc (loop_count_in): ... here. (scale_loop_profile): Improve dumping; cast iteration bound to sreal. 2023-08-02 Jan Hubicka * cfg.cc (scale_strictly_dominated_blocks): New function. * cfg.h (scale_strictly_dominated_blocks): Declare. * tree-cfg.cc (fold_loop_internal_call): Fixup CFG profile. 2023-08-02 Richard Biener PR rtl-optimization/110587 * lra-spills.cc (return_regno_p): Remove. (regno_in_use_p): Likewise. (lra_final_code_change): Do not remove noop moves between hard registers. 2023-08-02 liuhongt PR target/81904 * config/i386/sse.md (vec_fmaddsub4): Extend to vector HFmode, use mode iterator VFH instead. (vec_fmsubadd4): Ditto. (fma_fmaddsub_): Remove scalar mode from iterator, use VFH_AVX512VL instead. (fma_fmsubadd_): Ditto. 2023-08-02 liuhongt * config/i386/sse.md (*avx2_lddqu_inserti_to_bcasti): New pre_reload define_insn_and_split. 2023-08-02 Xiao Zeng * config/riscv/riscv.cc (riscv_rtx_costs): Add costing for using Zicond to implement some conditional moves. 2023-08-02 Jeff Law * config/riscv/zicond.md: Use the X iterator instead of ANYI on the comparison input operands. 2023-08-02 Xiao Zeng * config/riscv/riscv.cc (riscv_rtx_costs, case IF_THEN_ELSE): Add Zicond costing. (case SET): For INSNs that just set a REG, take the cost from the SET_SRC. Co-authored-by: Jeff Law 2023-08-02 Hu, Lin1 * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AMX_INT8_SET): Change OPTION_MASK_ISA2_AMX_TILE to OPTION_MASK_ISA2_AMX_TILE_SET. (OPTION_MASK_ISA2_AMX_BF16_SET): Ditto (OPTION_MASK_ISA2_AMX_FP16_SET): Ditto (OPTION_MASK_ISA2_AMX_COMPLEX_SET): Ditto (OPTION_MASK_ISA_ABM_SET): Change OPTION_MASK_ISA_POPCNT to OPTION_MASK_ISA_POPCNT_SET. 2023-08-01 Andreas Krebbel * config/s390/s390.cc (s390_encode_section_info): Assume external symbols without explicit alignment to be unaligned if -munaligned-symbols has been specified. * config/s390/s390.opt (-munaligned-symbols): New option. 2023-08-01 Richard Ball * gimple-fold.cc (fold_ctor_reference): Add support for poly_int. 2023-08-01 Georg-Johann Lay PR target/110220 * config/avr/avr.cc (avr_optimize_casesi): Set JUMP_LABEL and LABEL_NUSES of new conditional branch instruction. 2023-08-01 Jan Hubicka * tree-vect-loop-manip.cc (vect_do_peeling): Fix profile update after constant prologue peeling. 2023-08-01 Christophe Lyon * doc/sourcebuild.texi (arm_v8_1m_main_cde_mve_fp): Fix spelling. 2023-08-01 Pan Li Juzhe-Zhong * config/riscv/riscv.cc (DYNAMIC_FRM_RTL): New macro. (STATIC_FRM_P): Ditto. (struct mode_switching_info): New struct for mode switching. (struct machine_function): Add new field mode switching. (riscv_emit_frm_mode_set): Add DYN_CALL emit. (riscv_frm_adjust_mode_after_call): New function for call mode. (riscv_frm_emit_after_call_in_bb_end): New function for emit insn when call as the end of bb. (riscv_frm_mode_needed): New function for frm mode needed. (frm_unknown_dynamic_p): Remove call check. (riscv_mode_needed): Extrac function for frm. (riscv_frm_mode_after): Add DYN_CALL after. (riscv_mode_entry): Remove backup rtl initialization. * config/riscv/vector.md (frm_mode): Add dyn_call. (fsrmsi_restore_exit): Rename to _volatile. (fsrmsi_restore_volatile): Likewise. 2023-08-01 Pan Li * config/riscv/riscv-vector-builtins-bases.cc (class reverse_binop_frm): Add new template for reversed frm. (vfsub_frm_obj): New obj. (vfrsub_frm_obj): Likewise. * config/riscv/riscv-vector-builtins-bases.h: (vfsub_frm): New declaration. (vfrsub_frm): Likewise. * config/riscv/riscv-vector-builtins-functions.def (vfsub_frm): New function define. (vfrsub_frm): Likewise. 2023-08-01 Andrew Pinski PR tree-optimization/93044 * match.pd (nested int casts): A truncation (to the same size or smaller) can always remove the inner cast. 2023-07-31 Hamza Mahfooz PR c/65213 * doc/invoke.texi (-Wmissing-variable-declarations): Document new option. 2023-07-31 Andrew Pinski PR tree-optimization/106164 * match.pd (`a != b & a <= b`, `a != b & a >= b`, `a == b | a < b`, `a == b | a > b`): Handle these cases too. 2023-07-31 Andrew Pinski PR tree-optimization/106164 * match.pd: Extend the `(X CMP1 CST1) AND/IOR (X CMP2 CST2)` patterns to support `(X CMP1 Y) AND/IOR (X CMP2 Y)`. 2023-07-31 Andrew Pinski PR tree-optimization/100864 * generic-match-head.cc (bitwise_inverted_equal_p): New function. * gimple-match-head.cc (bitwise_inverted_equal_p): New macro. (gimple_bitwise_inverted_equal_p): New function. * match.pd ((~x | y) & x): Use bitwise_inverted_equal_p instead of direct matching bit_not. 2023-07-31 Costas Argyris PR driver/77576 * gcc-ar.cc (main): Expand argv and use temporary response file to call ar if any expansions were made. 2023-07-31 Andrew MacLeod PR tree-optimization/110582 * gimple-range-fold.cc (fur_list::get_operand): Do not use the range vector for non-ssa names. 2023-07-31 David Malcolm PR analyzer/109361 * diagnostic-client-data-hooks.h (class sarif_object): New forward decl. (diagnostic_client_data_hooks::add_sarif_invocation_properties): New vfunc. * diagnostic-format-sarif.cc: Include "diagnostic-format-sarif.h". (class sarif_invocation): Inherit from sarif_object rather than json::object. (class sarif_result): Likewise. (class sarif_ice_notification): Likewise. (sarif_object::get_or_create_properties): New. (sarif_invocation::prepare_to_flush): Add "context" param. Use it to call the context's add_sarif_invocation_properties hook. (sarif_builder::flush_to_file): Pass m_context to sarif_invocation::prepare_to_flush. * diagnostic-format-sarif.h: New header. * doc/invoke.texi (Developer Options): Clarify that -ftime-report writes to stderr. Document that if SARIF diagnostic output is requested then any timing information is written in JSON form as part of the SARIF output, rather than to stderr. * timevar.cc: Include "json.h". (timer::named_items::m_hash_map): Split out type into... (timer::named_items::hash_map_t): ...this new typedef. (timer::named_items::make_json): New function. (timevar_diff): New function. (make_json_for_timevar_time_def): New function. (timer::timevar_def::make_json): New function. (timer::make_json): New function. * timevar.h (class json::value): New forward decl. (timer::make_json): New decl. (timer::timevar_def::make_json): New decl. * tree-diagnostic-client-data-hooks.cc: Include "diagnostic-format-sarif.h" and "timevar.h". (compiler_data_hooks::add_sarif_invocation_properties): New vfunc implementation. 2023-07-31 Stefan Schulze Frielinghaus * combine.cc (simplify_compare_const): Narrow comparison of memory and constant. (try_combine): Adapt new function signature. (simplify_comparison): Adapt new function signature. 2023-07-31 Kito Cheng * config/riscv/riscv-v.cc (expand_vec_series): Drop unused variable. (expand_vector_init_insert_elems): Ditto. 2023-07-31 Hao Liu PR target/110625 * config/aarch64/aarch64.cc (count_ops): Only '* count' for single_defuse_cycle while counting reduction_latency. 2023-07-31 Ju-Zhe Zhong * internal-fn.def (DEF_INTERNAL_COND_FN): New macro. (DEF_INTERNAL_SIGNED_COND_FN): Ditto. (COND_ADD): Remove. (COND_SUB): Ditto. (COND_MUL): Ditto. (COND_DIV): Ditto. (COND_MOD): Ditto. (COND_RDIV): Ditto. (COND_MIN): Ditto. (COND_MAX): Ditto. (COND_FMIN): Ditto. (COND_FMAX): Ditto. (COND_AND): Ditto. (COND_IOR): Ditto. (COND_XOR): Ditto. (COND_SHL): Ditto. (COND_SHR): Ditto. (COND_FMA): Ditto. (COND_FMS): Ditto. (COND_FNMA): Ditto. (COND_FNMS): Ditto. (COND_NEG): Ditto. (COND_LEN_ADD): Ditto. (COND_LEN_SUB): Ditto. (COND_LEN_MUL): Ditto. (COND_LEN_DIV): Ditto. (COND_LEN_MOD): Ditto. (COND_LEN_RDIV): Ditto. (COND_LEN_MIN): Ditto. (COND_LEN_MAX): Ditto. (COND_LEN_FMIN): Ditto. (COND_LEN_FMAX): Ditto. (COND_LEN_AND): Ditto. (COND_LEN_IOR): Ditto. (COND_LEN_XOR): Ditto. (COND_LEN_SHL): Ditto. (COND_LEN_SHR): Ditto. (COND_LEN_FMA): Ditto. (COND_LEN_FMS): Ditto. (COND_LEN_FNMA): Ditto. (COND_LEN_FNMS): Ditto. (COND_LEN_NEG): Ditto. (ADD): New macro define. (SUB): Ditto. (MUL): Ditto. (DIV): Ditto. (MOD): Ditto. (RDIV): Ditto. (MIN): Ditto. (MAX): Ditto. (FMIN): Ditto. (FMAX): Ditto. (AND): Ditto. (IOR): Ditto. (XOR): Ditto. (SHL): Ditto. (SHR): Ditto. (FMA): Ditto. (FMS): Ditto. (FNMA): Ditto. (FNMS): Ditto. (NEG): Ditto. 2023-07-31 Roger Sayle PR target/110843 * config/i386/i386-features.cc (compute_convert_gain): Check TARGET_AVX512VL (not TARGET_AVX512F) when considering V2DImode and V4SImode rotates in STV. (general_scalar_chain::convert_rotate): Likewise. 2023-07-31 Kito Cheng * config/riscv/autovec.md (abs2): Remove `.require ()`. * config/riscv/riscv-protos.h (get_mask_mode): Update return type. * config/riscv/riscv-v.cc (rvv_builder::rvv_builder): Remove `.require ()`. (emit_vlmax_insn): Ditto. (emit_vlmax_fp_insn): Ditto. (emit_vlmax_ternary_insn): Ditto. (emit_vlmax_fp_ternary_insn): Ditto. (emit_nonvlmax_fp_ternary_tu_insn): Ditto. (emit_nonvlmax_insn): Ditto. (emit_vlmax_slide_insn): Ditto. (emit_nonvlmax_slide_tu_insn): Ditto. (emit_vlmax_merge_insn): Ditto. (emit_vlmax_masked_insn): Ditto. (emit_nonvlmax_masked_insn): Ditto. (emit_vlmax_masked_store_insn): Ditto. (emit_nonvlmax_masked_store_insn): Ditto. (emit_vlmax_masked_mu_insn): Ditto. (emit_nonvlmax_tu_insn): Ditto. (emit_nonvlmax_fp_tu_insn): Ditto. (emit_scalar_move_insn): Ditto. (emit_vlmax_compress_insn): Ditto. (emit_vlmax_reduction_insn): Ditto. (emit_vlmax_fp_reduction_insn): Ditto. (emit_nonvlmax_fp_reduction_insn): Ditto. (expand_vec_series): Ditto. (expand_vector_init_merge_repeating_sequence): Ditto. (expand_vec_perm): Ditto. (shuffle_merge_patterns): Ditto. (shuffle_compress_patterns): Ditto. (shuffle_decompress_patterns): Ditto. (expand_reduction): Ditto. (get_mask_mode): Update return type. * config/riscv/riscv.cc (riscv_get_mask_mode): Check vector type is valid, and use new get_mask_mode interface. 2023-07-31 Pan Li * config/riscv/riscv-vector-builtins-shapes.cc (struct alu_frm_def): Move rm suffix before mask. 2023-07-31 Juzhe-Zhong * config/riscv/autovec-vls.md (@vec_duplicate): New pattern. * config/riscv/riscv-v.cc (autovectorize_vector_modes): Add VLS autovec support. 2023-07-29 Roger Sayle PR target/110790 * config/i386/i386.md (extv): Use QImode for offsets. (extzv): Likewise. (insv): Likewise. (*testqi_ext_3): Likewise. (*btr_2): Likewise. (define_split): Likewise. (*btsq_imm): Likewise. (*btrq_imm): Likewise. (*btcq_imm): Likewise. (define_peephole2 x3): Likewise. (*bt): Likewise (*bt_mask): New define_insn_and_split. (*jcc_bt): Use QImode for offsets. (*jcc_bt_1): Delete obsolete pattern. (*jcc_bt_mask): Use QImode offsets. (*jcc_bt_mask_1): Likewise. (define_split): Likewise. (*bt_setcqi): Likewise. (*bt_setncqi): Likewise. (*bt_setnc): Likewise. (*bt_setncqi_2): Likewise. (*bt_setc_mask): New define_insn_and_split. (bmi2_bzhi_3): Use QImode offsets. (*bmi2_bzhi_3): Likewise. (*bmi2_bzhi_3_1): Likewise. (*bmi2_bzhi_3_1_ccz): Likewise. (@tbm_bextri_): Likewise. 2023-07-29 Jan Hubicka * profile-count.cc (profile_probability::sqrt): New member function. (profile_probability::pow): Likewise. * profile-count.h: (profile_probability::sqrt): Declare (profile_probability::pow): Likewise. * tree-vect-loop-manip.cc (vect_loop_versioning): Fix profile update. 2023-07-28 Andrew MacLeod * gimple-range-cache.cc (ssa_cache::merge_range): New. (ssa_lazy_cache::merge_range): New. * gimple-range-cache.h (class ssa_cache): Adjust protoypes. (class ssa_lazy_cache): Ditto. * gimple-range.cc (assume_query::calculate_op): Use merge_range. 2023-07-28 Andrew MacLeod * tree-ssa-propagate.cc (substitute_and_fold_engine::value_on_edge): Move from value-query.cc. (substitute_and_fold_engine::value_of_stmt): Ditto. (substitute_and_fold_engine::range_of_expr): New. * tree-ssa-propagate.h (substitute_and_fold_engine): Inherit from range_query. New prototypes. * value-query.cc (value_query::value_on_edge): Relocate. (value_query::value_of_stmt): Ditto. * value-query.h (class value_query): Remove. (class range_query): Remove base class. Adjust prototypes. 2023-07-28 Andrew MacLeod PR tree-optimization/110205 * gimple-range-cache.h (ranger_cache::m_estimate): Delete. * range-op-mixed.h (operator_bitwise_xor::op1_op2_relation_effect): Add final override. * range-op.cc (operator_lshift): Add missing final overrides. (operator_rshift): Ditto. 2023-07-28 Jose E. Marchesi * config/bpf/bpf.cc (bpf_option_override): Disable tail-call optimizations in BPF target. 2023-07-28 Honza * cfgloopmanip.cc (loop_count_in): Break out from ... (loop_exit_for_scaling): Break out from ... (update_loop_exit_probability_scale_dom_bbs): Break out from ...; add more sanity check and debug info. (scale_loop_profile): ... here. (create_empty_loop_on_edge): Fix whitespac. * cfgloopmanip.h (update_loop_exit_probability_scale_dom_bbs): Declare. * loop-unroll.cc (unroll_loop_constant_iterations): Use update_loop_exit_probability_scale_dom_bbs. * tree-ssa-loop-manip.cc (update_exit_probability_after_unrolling): Remove. (tree_transform_and_unroll_loop): Use update_loop_exit_probability_scale_dom_bbs. * tree-ssa-loop-split.cc (split_loop): Use update_loop_exit_probability_scale_dom_bbs. 2023-07-28 Jan Hubicka PR middle-end/77689 * tree-ssa-loop-split.cc: Include value-query.h. (split_at_bb_p): Analyze cases where EQ/NE can be turned into LT/LE/GT/GE; return updated guard code. (split_loop): Use guard code. 2023-07-28 Roger Sayle Richard Biener PR middle-end/28071 PR rtl-optimization/110587 * expr.cc (emit_group_load_1): Simplify logic for calling force_reg on ORIG_SRC, to avoid making a copy if the source is already in a pseudo register. 2023-07-28 Jan Hubicka PR middle-end/106923 * tree-ssa-loop-split.cc (connect_loops): Change probability of the test preconditioning second loop to very_likely. (fix_loop_bb_probability): Handle correctly case where on of the arms of the conditional is empty. (split_loop): Fold the test guarding first condition to see if it is constant true; Set correct entry block probabilities of the split loops; determine correct loop eixt probabilities. 2023-07-28 xuli * config/riscv/riscv-vector-builtins-bases.cc: remove rounding mode of vsadd[u] and vssub[u]. * config/riscv/vector.md: Ditto. 2023-07-28 Jan Hubicka * tree-ssa-loop-split.cc (split_loop): Also support NE driven loops when IV test is not overflowing. 2023-07-28 liuhongt PR target/110788 * config/i386/sse.md (avx512cd_maskb_vec_dup): Add UNSPEC_MASKOP. (avx512cd_maskw_vec_dup): Ditto. 2023-07-27 David Faust PR target/110782 PR target/110784 * config/bpf/bpf.opt (msmov): New option. * config/bpf/bpf.cc (bpf_option_override): Handle it here. * config/bpf/bpf.md (*extendsidi2): New. (extendhidi2): New. (extendqidi2): New. (extendsisi2): New. (extendhisi2): New. (extendqisi2): New. * doc/invoke.texi (Option Summary): Add -msmov eBPF option. (eBPF Options): Add -m[no-]smov. Document that -mcpu=v4 also enables -msmov. 2023-07-27 David Faust * doc/invoke.texi (Option Summary): Remove -mkernel eBPF option. Add -mbswap and -msdiv eBPF options. (eBPF Options): Remove -mkernel. Add -mno-{jmpext, jmp32, alu32, v3-atomics, bswap, sdiv}. Document that -mcpu=v4 also enables -msdiv. 2023-07-27 David Faust * config/bpf/bpf.md (add3): Use %w2 instead of %w1 in pseudo-C dialect output template. (sub3): Likewise. 2023-07-27 Jan Hubicka * tree-vect-loop.cc (optimize_mask_stores): Make store likely. 2023-07-27 Jan Hubicka * cfgloop.h (single_dom_exit): Declare. * cfgloopmanip.h (update_exit_probability_after_unrolling): Declare. * cfgrtl.cc (struct cfg_hooks): Fix comment. * loop-unroll.cc (unroll_loop_constant_iterations): Update exit edge. * tree-ssa-loop-ivopts.h (single_dom_exit): Do not declare it here. * tree-ssa-loop-manip.cc (update_exit_probability_after_unrolling): Break out from ... (tree_transform_and_unroll_loop): ... here; 2023-07-27 Jan Hubicka * cfgloopmanip.cc (scale_dominated_blocks_in_loop): Move here from tree-ssa-loop-manip.cc and avoid recursion. (scale_loop_profile): Use scale_dominated_blocks_in_loop. (duplicate_loop_body_to_header_edge): Add DLTHE_FLAG_FLAT_PROFILE flag. * cfgloopmanip.h (DLTHE_FLAG_FLAT_PROFILE): Define. (scale_dominated_blocks_in_loop): Declare. * predict.cc (dump_prediction): Do not ICE on uninitialized probability. (change_edge_frequency): Remove. * predict.h (change_edge_frequency): Remove. * tree-ssa-loop-manip.cc (scale_dominated_blocks_in_loop): Move to cfgloopmanip.cc. (niter_for_unrolled_loop): Remove. (tree_transform_and_unroll_loop): Fix profile update. 2023-07-27 Jan Hubicka * tree-ssa-loop-im.cc (execute_sm_if_changed): Turn cap probability to guessed; fix count of new_bb. 2023-07-27 Jan Hubicka * profile-count.h (profile_count::apply_probability): Fix handling of uninitialized probabilities, optimize scaling by probability 1. 2023-07-27 Richard Biener PR tree-optimization/91838 * gimple-match-head.cc: Include attribs.h and asan.h. * generic-match-head.cc: Likewise. * match.pd (([rl]shift @0 out-of-bounds) -> zero): New pattern. 2023-07-27 Juzhe-Zhong * config/riscv/riscv-modes.def (VECTOR_BOOL_MODE): Add VLS modes. (ADJUST_ALIGNMENT): Ditto. (ADJUST_PRECISION): Ditto. (VLS_MODES): Ditto. (VECTOR_MODE_WITH_PREFIX): Ditto. * config/riscv/riscv-opts.h (TARGET_VECTOR_VLS): New macro. * config/riscv/riscv-protos.h (riscv_v_ext_vls_mode_p): New function. * config/riscv/riscv-v.cc (INCLUDE_ALGORITHM): Add include. (legitimize_move): Enable basic VLS modes support. (get_vlmul): Ditto. (get_ratio): Ditto. (get_vector_mode): Ditto. * config/riscv/riscv-vector-switch.def (VLS_ENTRY): Add vls modes. * config/riscv/riscv.cc (riscv_v_ext_vls_mode_p): New function. (VLS_ENTRY): New macro. (riscv_v_ext_mode_p): Add vls modes. (riscv_get_v_regno_alignment): New function. (riscv_print_operand): Add vls modes. (riscv_hard_regno_nregs): Ditto. (riscv_hard_regno_mode_ok): Ditto. (riscv_regmode_natural_size): Ditto. (riscv_vectorize_preferred_vector_alignment): Ditto. * config/riscv/riscv.md: Ditto. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md: Ditto. * config/riscv/autovec-vls.md: New file. 2023-07-27 Pan Li * config/riscv/riscv_vector.h (enum RVV_CSR): Removed. (vread_csr): Ditto. (vwrite_csr): Ditto. 2023-07-27 demin.han * config/riscv/autovec.md: Delete which_alternative use in split 2023-07-27 Richard Biener * tree-ssa-sink.cc (sink_code_in_bb): Remove recursion, instead use a worklist ... (pass_sink_code::execute): ... in the caller. 2023-07-27 Kewen Lin Richard Biener PR tree-optimization/110776 * tree-vect-stmts.cc (vectorizable_load): Always cost VMAT_ELEMENTWISE as scalar load. 2023-07-26 Xiao Zeng * config/riscv/riscv.md: Include zicond.md * config/riscv/zicond.md: New file. 2023-07-26 Xiao Zeng * common/config/riscv/riscv-common.cc: New extension. * config/riscv/riscv-opts.h (MASK_ZICOND): New mask. (TARGET_ZICOND): New target. 2023-07-26 Carl Love * config/rs6000/rs6000-c.cc (find_instance): Add new parameter that specifies the number of built-in arguments to check. (altivec_resolve_overloaded_builtin): Update calls to find_instance to pass the number of built-in arguments to be checked. 2023-07-26 David Faust * config/bpf/bpf.opt (mv3-atomics): New option. * config/bpf/bpf.cc (bpf_option_override): Handle it here. * config/bpf/bpf.h (enum_reg_class): Add R0 class. (REG_CLASS_NAMES): Likewise. (REG_CLASS_CONTENTS): Likewise. (REGNO_REG_CLASS): Handle R0. * config/bpf/bpf.md (UNSPEC_XADD): Rename to UNSPEC_AADD. (UNSPEC_AAND): New unspec. (UNSPEC_AOR): Likewise. (UNSPEC_AXOR): Likewise. (UNSPEC_AFADD): Likewise. (UNSPEC_AFAND): Likewise. (UNSPEC_AFOR): Likewise. (UNSPEC_AFXOR): Likewise. (UNSPEC_AXCHG): Likewise. (UNSPEC_ACMPX): Likewise. (atomic_add): Use UNSPEC_AADD and atomic type attribute. Move to... * config/bpf/atomic.md: ...Here. New file. * config/bpf/constraints.md (t): New constraint for R0. * doc/invoke.texi (eBPF Options): Document -mv3-atomics. 2023-07-26 Matthew Malcomson * tree-vect-stmts.cc (get_group_load_store_type): Reformat comment. 2023-07-26 Carl Love * config/rs6000/rs6000-builtins.def: Rename __builtin_altivec_vreplace_un_uv2di as __builtin_altivec_vreplace_un_udi __builtin_altivec_vreplace_un_uv4si as __builtin_altivec_vreplace_un_usi __builtin_altivec_vreplace_un_v2df as __builtin_altivec_vreplace_un_df __builtin_altivec_vreplace_un_v2di as __builtin_altivec_vreplace_un_di __builtin_altivec_vreplace_un_v4sf as __builtin_altivec_vreplace_un_sf __builtin_altivec_vreplace_un_v4si as __builtin_altivec_vreplace_un_si. Rename VREPLACE_UN_UV2DI as VREPLACE_UN_UDI, VREPLACE_UN_UV4SI as VREPLACE_UN_USI, VREPLACE_UN_V2DF as VREPLACE_UN_DF, VREPLACE_UN_V2DI as VREPLACE_UN_DI, VREPLACE_UN_V4SF as VREPLACE_UN_SF, VREPLACE_UN_V4SI as VREPLACE_UN_SI. Rename vreplace_un_v2di as vreplace_un_di, vreplace_un_v4si as vreplace_un_si, vreplace_un_v2df as vreplace_un_df, vreplace_un_v2di as vreplace_un_di, vreplace_un_v4sf as vreplace_un_sf, vreplace_un_v4si as vreplace_un_si. * config/rs6000/rs6000-c.cc (find_instance): Add case RS6000_OVLD_VEC_REPLACE_UN. * config/rs6000/rs6000-overload.def (__builtin_vec_replace_un): Fix first argument type. Rename VREPLACE_UN_UV4SI as VREPLACE_UN_USI, VREPLACE_UN_V4SI as VREPLACE_UN_SI, VREPLACE_UN_UV2DI as VREPLACE_UN_UDI, VREPLACE_UN_V2DI as VREPLACE_UN_DI, VREPLACE_UN_V4SF as VREPLACE_UN_SF, VREPLACE_UN_V2DF as VREPLACE_UN_DF. * config/rs6000/vsx.md (REPLACE_ELT): Rename the mode_iterator REPLACE_ELT_V for vector modes. (REPLACE_ELT): New scalar mode iterator. (REPLACE_ELT_char): Add scalar attributes. (vreplace_un_): Change iterator and mode attribute. 2023-07-26 David Malcolm PR analyzer/104940 * Makefile.in (ANALYZER_OBJS): Add analyzer/symbol.o. 2023-07-26 Richard Biener PR tree-optimization/106081 * tree-vect-slp.cc (vect_optimize_slp_pass::start_choosing_layouts): Assign layout -1 to splats. 2023-07-26 Aldy Hernandez * range-op-mixed.h (class operator_cast): Add update_bitmask. * range-op.cc (operator_cast::update_bitmask): New. (operator_cast::fold_range): Call update_bitmask. 2023-07-26 Li Xu * config/riscv/riscv-vector-builtins.def (vfloat16mf4x2_t): Change scalar type to float16, eliminate warning. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/vector-iterators.md: add RVVM4x2DF in iterator V4T. * config/riscv/vector.md: add tuple mode in attr sew. 2023-07-26 Uros Bizjak PR target/110762 * config/i386/i386.md (plusminusmult): New code iterator. * config/i386/mmx.md (mmxdoublevecmode): New mode attribute. (movq__to_sse): New expander. (v2sf3): Macroize expander from addv2sf3, subv2sf3 and mulv2sf3 using plusminusmult code iterator. Rewrite as a wrapper around V4SFmode operation. (mmx_addv2sf3): Change operand 1 and operand 2 predicates to nonimmediate_operand. (*mmx_addv2sf3): Remove SSE alternatives. Change operand 1 and operand 2 predicates to nonimmediate_operand. (mmx_subv2sf3): Change operand 2 predicate to nonimmediate_operand. (mmx_subrv2sf3): Change operand 1 predicate to nonimmediate_operand. (*mmx_subv2sf3): Remove SSE alternatives. Change operand 1 and operand 2 predicates to nonimmediate_operand. (mmx_mulv2sf3): Change operand 1 and operand 2 predicates to nonimmediate_operand. (*mmx_mulv2sf3): Remove SSE alternatives. Change operand 1 and operand 2 predicates to nonimmediate_operand. (divv2sf3): Rewrite as a wrapper around V4SFmode operation. (v2sf3): Ditto. (mmx_v2sf3): Change operand 1 and operand 2 predicates to nonimmediate_operand. (*mmx_v2sf3): Remove SSE alternatives. Change operand 1 and operand 2 predicates to nonimmediate_operand. (mmx_ieee_v2sf3): Ditto. (sqrtv2sf2): Rewrite as a wrapper around V4SFmode operation. (*mmx_haddv2sf3_low): Ditto. (*mmx_hsubv2sf3_low): Ditto. (vec_addsubv2sf3): Ditto. (*mmx_maskcmpv2sf3_comm): Remove. (*mmx_maskcmpv2sf3): Remove. (vec_cmpv2sfv2si): Rewrite as a wrapper around V4SFmode operation. (vcondv2sf): Ditto. (fmav2sf4): Ditto. (fmsv2sf4): Ditto. (fnmav2sf4): Ditto. (fnmsv2sf4): Ditto. (fix_truncv2sfv2si2): Ditto. (fixuns_truncv2sfv2si2): Ditto. (mmx_fix_truncv2sfv2si2): Remove SSE alternatives. Change operand 1 predicate to nonimmediate_operand. (floatv2siv2sf2): Rewrite as a wrapper around V4SFmode operation. (floatunsv2siv2sf2): Ditto. (mmx_floatv2siv2sf2): Remove SSE alternatives. Change operand 1 predicate to nonimmediate_operand. (nearbyintv2sf2): Rewrite as a wrapper around V4SFmode operation. (rintv2sf2): Ditto. (lrintv2sfv2si2): Ditto. (ceilv2sf2): Ditto. (lceilv2sfv2si2): Ditto. (floorv2sf2): Ditto. (lfloorv2sfv2si2): Ditto. (btruncv2sf2): Ditto. (roundv2sf2): Ditto. (lroundv2sfv2si2): Ditto. (*mmx_roundv2sf2): Remove. 2023-07-26 Jose E. Marchesi * config/bpf/bpf.md: Fix neg{SI,DI}2 insn. 2023-07-26 Richard Biener PR tree-optimization/110799 * tree-ssa-pre.cc (compute_avail): More thoroughly match up TBAA behavior of redundant loads. 2023-07-26 Jakub Jelinek PR tree-optimization/110755 * range-op-float.cc (frange_arithmetic): Change +0 result to -0 for PLUS_EXPR or MINUS_EXPR if -frounding-math, inf is negative and it is exact op1 + (-op1) or op1 - op1. 2023-07-26 Kewen Lin PR target/110741 * config/rs6000/vsx.md (define_insn xxeval): Correct vsx operands output with "x". 2023-07-26 Aldy Hernandez * range-op.cc (class operator_absu): Add update_bitmask. (operator_absu::update_bitmask): New. 2023-07-26 Aldy Hernandez * range-op-mixed.h (class operator_abs): Add update_bitmask. * range-op.cc (operator_abs::update_bitmask): New. 2023-07-26 Aldy Hernandez * range-op-mixed.h (class operator_bitwise_not): Add update_bitmask. * range-op.cc (operator_bitwise_not::update_bitmask): New. 2023-07-26 Aldy Hernandez * range-op.cc (update_known_bitmask): Handle unary operators. 2023-07-26 Aldy Hernandez * tree-ssa-ccp.cc (bit_value_unop): Initialize val when appropriate. 2023-07-26 Jin Ma * config/riscv/riscv.md: Likewise. 2023-07-26 Jan Hubicka * profile-count.cc (profile_count::to_sreal_scale): Value is not know if we divide by zero. 2023-07-25 David Faust * config/bpf/bpf.cc (bpf_print_operand_address): Don't print enclosing parentheses for pseudo-C dialect. * config/bpf/bpf.md (zero_exdendhidi2): Add parentheses around operands of pseudo-C dialect output templates where needed. (zero_extendqidi2): Likewise. (zero_extendsidi2): Likewise. (*mov): Likewise. 2023-07-25 Aldy Hernandez * tree-ssa-ccp.cc (value_mask_to_min_max): Make static. (bit_value_mult_const): Same. (get_individual_bits): Same. 2023-07-25 Haochen Gui PR target/103605 * config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_builtin): Gimple fold RS6000_BIF_XSMINDP and RS6000_BIF_XSMAXDP when fast-math is set. * config/rs6000/rs6000.md (FMINMAX): New int iterator. (minmax_op): New int attribute. (UNSPEC_FMAX, UNSPEC_FMIN): New unspecs. (f3): New pattern by UNSPEC_FMAX and UNSPEC_FMIN. * config/rs6000/rs6000-builtins.def (__builtin_vsx_xsmaxdp): Set pattern to fmaxdf3. (__builtin_vsx_xsmindp): Set pattern to fmindf3. 2023-07-24 David Faust * config/bpf/bpf.md (nop): Add pseudo-c asm dialect template. 2023-07-24 Drew Ross Jakub Jelinek PR middle-end/109986 * generic-match-head.cc (bitwise_equal_p): New macro. * gimple-match-head.cc (bitwise_equal_p): New macro. (gimple_nop_convert): Declare. (gimple_bitwise_equal_p): Helper for bitwise_equal_p. * match.pd ((~X | Y) ^ X -> ~(X & Y)): New simplification. 2023-07-24 Jeff Law * common/config/riscv/riscv-common.cc (riscv_subset_list::add): Use single quote rather than backquote in diagnostic. 2023-07-24 Jose E. Marchesi PR target/110783 * config/bpf/bpf.opt: New command-line option -msdiv. * config/bpf/bpf.md: Conditionalize sdiv/smod on bpf_has_sdiv. * config/bpf/bpf.cc (bpf_option_override): Initialize bpf_has_sdiv. * doc/invoke.texi (eBPF Options): Document -msdiv. 2023-07-24 Jeff Law * config/riscv/riscv.cc (riscv_option_override): Spell out greater than and use cannot in diagnostic string. 2023-07-24 Richard Biener * tree-vectorizer.h (_slp_tree::push_vec_def): Add. (_slp_tree::vec_stmts): Remove. (SLP_TREE_VEC_STMTS): Remove. * tree-vect-slp.cc (_slp_tree::push_vec_def): Define. (_slp_tree::_slp_tree): Adjust. (_slp_tree::~_slp_tree): Likewise. (vect_get_slp_vect_def): Simplify. (vect_get_slp_defs): Likewise. (vect_transform_slp_perm_load_1): Adjust. (vect_add_slp_permutation): Likewise. (vect_schedule_slp_node): Likewise. (vectorize_slp_instance_root_stmt): Likewise. (vect_schedule_scc): Likewise. * tree-vect-stmts.cc (vectorizable_bswap): Use push_vec_def. (vectorizable_call): Likewise. (vectorizable_call): Likewise. (vect_create_vectorized_demotion_stmts): Likewise. (vectorizable_conversion): Likewise. (vectorizable_assignment): Likewise. (vectorizable_shift): Likewise. (vectorizable_operation): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. (vectorizable_comparison): Likewise. * tree-vect-loop.cc (vect_create_epilog_for_reduction): Adjust. (vectorize_fold_left_reduction): Use push_vec_def. (vect_transform_reduction): Likewise. (vect_transform_cycle_phi): Likewise. (vectorizable_lc_phi): Likewise. (vectorizable_phi): Likewise. (vectorizable_recurr): Likewise. (vectorizable_induction): Likewise. (vectorizable_live_operation): Likewise. 2023-07-24 Richard Biener * tree-ssa-loop.cc: Remove unused tree-vectorizer.h include. 2023-07-24 Richard Biener * config/i386/i386-builtins.cc: Remove tree-vectorizer.h include. * config/i386/i386-expand.cc: Likewise. * config/i386/i386-features.cc: Likewise. * config/i386/i386-options.cc: Likewise. 2023-07-24 Robin Dapp * tree-vect-stmts.cc (vectorizable_conversion): Handle more demotion/promotion for modifier == NONE. 2023-07-24 Roger Sayle PR target/110787 PR target/110790 Revert patch. * config/i386/i386.md (extv): Use QImode for offsets. (extzv): Likewise. (insv): Likewise. (*testqi_ext_3): Likewise. (*btr_2): Likewise. (define_split): Likewise. (*btsq_imm): Likewise. (*btrq_imm): Likewise. (*btcq_imm): Likewise. (define_peephole2 x3): Likewise. (*bt): Likewise (*bt_mask): New define_insn_and_split. (*jcc_bt): Use QImode for offsets. (*jcc_bt_1): Delete obsolete pattern. (*jcc_bt_mask): Use QImode offsets. (*jcc_bt_mask_1): Likewise. (define_split): Likewise. (*bt_setcqi): Likewise. (*bt_setncqi): Likewise. (*bt_setnc): Likewise. (*bt_setncqi_2): Likewise. (*bt_setc_mask): New define_insn_and_split. (bmi2_bzhi_3): Use QImode offsets. (*bmi2_bzhi_3): Likewise. (*bmi2_bzhi_3_1): Likewise. (*bmi2_bzhi_3_1_ccz): Likewise. (@tbm_bextri_): Likewise. 2023-07-24 Jose E. Marchesi * config/bpf/bpf-opts.h (enum bpf_kernel_version): Remove enum. * config/bpf/bpf.opt (mkernel): Remove option. * config/bpf/bpf.cc (bpf_target_macros): Do not define BPF_KERNEL_VERSION_CODE. 2023-07-24 Jose E. Marchesi PR target/110786 * config/bpf/bpf.opt (mcpu): Add ISA_V4 and make it the default. (mbswap): New option. * config/bpf/bpf-opts.h (enum bpf_isa_version): New value ISA_V4. * config/bpf/bpf.cc (bpf_option_override): Set bpf_has_bswap. * config/bpf/bpf.md: Use bswap instructions if available for bswap* insn, and fix constraint. * doc/invoke.texi (eBPF Options): Document -mcpu=v4 and -mbswap. 2023-07-24 Juzhe-Zhong * config/riscv/autovec.md (fold_left_plus_): New pattern. (mask_len_fold_left_plus_): Ditto. * config/riscv/riscv-protos.h (enum insn_type): New enum. (enum reduction_type): Ditto. (expand_reduction): Add in-order reduction. * config/riscv/riscv-v.cc (emit_nonvlmax_fp_reduction_insn): New function. (expand_reduction): Add in-order reduction. 2023-07-24 Ju-Zhe Zhong * tree-vect-loop.cc (get_masked_reduction_fn): Add mask_len_fold_left_plus. (vectorize_fold_left_reduction): Ditto. (vectorizable_reduction): Ditto. (vect_transform_reduction): Ditto. 2023-07-24 Richard Biener PR tree-optimization/110777 * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_avail): Avoid propagating abnormals. 2023-07-24 Richard Biener PR tree-optimization/110766 * tree-scalar-evolution.cc (analyze_and_compute_bitwise_induction_effect): Check the PHI is defined in the loop header. 2023-07-24 Kewen Lin PR tree-optimization/110740 * tree-vect-loop.cc (vect_analyze_loop_costing): Do not vectorize a loop with a single scalar iteration. 2023-07-24 Pan Li * config/riscv/riscv-vector-builtins-shapes.cc (struct alu_frm_def): Take range check. 2023-07-22 Vineet Gupta PR target/110748 * config/riscv/predicates.md (const_0_operand): Add back const_double. 2023-07-22 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_move): Disable the 64-bit insertions into TImode optimizations with -O0, unless the function has the "naked" attribute (for PR target/110533). 2023-07-22 Andrew Pinski PR target/110778 * rtl.h (extended_count): Change last argument type to bool. 2023-07-22 Roger Sayle * config/i386/i386.md (extv): Use QImode for offsets. (extzv): Likewise. (insv): Likewise. (*testqi_ext_3): Likewise. (*btr_2): Likewise. (define_split): Likewise. (*btsq_imm): Likewise. (*btrq_imm): Likewise. (*btcq_imm): Likewise. (define_peephole2 x3): Likewise. (*bt): Likewise (*bt_mask): New define_insn_and_split. (*jcc_bt): Use QImode for offsets. (*jcc_bt_1): Delete obsolete pattern. (*jcc_bt_mask): Use QImode offsets. (*jcc_bt_mask_1): Likewise. (define_split): Likewise. (*bt_setcqi): Likewise. (*bt_setncqi): Likewise. (*bt_setnc): Likewise. (*bt_setncqi_2): Likewise. (*bt_setc_mask): New define_insn_and_split. (bmi2_bzhi_3): Use QImode offsets. (*bmi2_bzhi_3): Likewise. (*bmi2_bzhi_3_1): Likewise. (*bmi2_bzhi_3_1_ccz): Likewise. (@tbm_bextri_): Likewise. 2023-07-22 Jeff Law * config/bfin/bfin.md (ones): Fix length computation. 2023-07-22 Vladimir N. Makarov * lra-eliminations.cc (update_reg_eliminate): Fix the assert. (lra_update_fp2sp_elimination): Use HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM to spill pseudos. 2023-07-21 Roger Sayle Richard Biener PR c/110699 * gimplify.cc (gimplify_compound_lval): If the array's type is error_mark_node then return GS_ERROR. 2023-07-21 Cupertino Miranda PR target/110770 * config/bpf/bpf.opt: Added option -masm=. * config/bpf/bpf-opts.h (enum bpf_asm_dialect): New type. * config/bpf/bpf.cc (bpf_print_register): New function. (bpf_print_register): Support pseudo-c syntax for registers. (bpf_print_operand_address): Likewise. * config/bpf/bpf.h (ASM_SPEC): handle -msasm. (ASSEMBLER_DIALECT): Define. * config/bpf/bpf.md: Added pseudo-c templates. * doc/invoke.texi (-masm=): New eBPF option item. 2023-07-21 Cupertino Miranda * config/bpf/bpf.md: fixed template for neg instruction. 2023-07-21 Jan Hubicka PR target/110727 * tree-vect-loop.cc (scale_profile_for_vect_loop): Avoid scaling flat profiles by vectorization factor. (vect_transform_loop): Check for flat profiles. 2023-07-21 Jan Hubicka * cfgloop.h (maybe_flat_loop_profile): Declare * cfgloopanal.cc (maybe_flat_loop_profile): New function. * tree-cfg.cc (print_loop_info): Print info about flat profiles. 2023-07-21 Jan Hubicka * cfgloop.cc (get_estimated_loop_iterations): Use sreal::to_nearest_int * cfgloopanal.cc (expected_loop_iterations_unbounded): Likewise. * predict.cc (estimate_bb_frequencies): Likewise. * profile.cc (branch_prob): Likewise. * tree-ssa-loop-niter.cc (estimate_numbers_of_iterations): Likewise 2023-07-21 Iain Sandoe * config.in: Regenerate. * config/darwin.h (DARWIN_LD_DEMANGLE): New. (LINK_COMMAND_SPEC_A): Add demangle handling. * configure: Regenerate. * configure.ac: Detect linker support for '-demangle'. 2023-07-21 Jan Hubicka * sreal.cc (sreal::to_nearest_int): New. (sreal_verify_basics): Verify also to_nearest_int. (verify_aritmetics): Likewise. (sreal_verify_conversions): New. (sreal_cc_tests): Call sreal_verify_conversions. * sreal.h: (sreal::to_nearest_int): Declare 2023-07-21 Jan Hubicka * tree-ssa-loop-ch.cc (enum ch_decision): New enum. (should_duplicate_loop_header_p): Return info on profitability. (do_while_loop_p): Watch for constant conditionals. (update_profile_after_ch): Do not sanity check that all static exits are taken. (ch_base::copy_headers): Run on all loops. (pass_ch::process_loop_p): Improve heuristics by handling also do_while loop and duplicating shortest sequence containing all winning blocks. 2023-07-21 Jan Hubicka * tree-ssa-loop-niter.cc (finite_loop_p): Reorder to do cheap tests first; update finite_p flag. 2023-07-21 Jan Hubicka * cfgloop.cc (flow_loop_dump): Use print_loop_info. * cfgloop.h (print_loop_info): Declare. * tree-cfg.cc (print_loop_info): Break out from ...; add printing of missing fields and profile (print_loop): ... here. 2023-07-21 Juzhe-Zhong * config/riscv/riscv-v.cc (expand_gather_scatter): Remove redundant variables. 2023-07-21 Juzhe-Zhong * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Change condition order. (vectorizable_operation): Ditto. 2023-07-21 Juzhe-Zhong * config/riscv/autovec.md: Align order of mask and len. * config/riscv/riscv-v.cc (expand_load_store): Ditto. (expand_gather_scatter): Ditto. * doc/md.texi: Ditto. * internal-fn.cc (add_len_and_mask_args): Ditto. (add_mask_and_len_args): Ditto. (expand_partial_load_optab_fn): Ditto. (expand_partial_store_optab_fn): Ditto. (expand_scatter_store_optab_fn): Ditto. (expand_gather_load_optab_fn): Ditto. (internal_fn_len_index): Ditto. (internal_fn_mask_index): Ditto. (internal_len_load_store_bias): Ditto. * tree-vect-stmts.cc (vectorizable_store): Ditto. (vectorizable_load): Ditto. 2023-07-21 Juzhe-Zhong * config/riscv/autovec.md (len_maskload): Change LEN_MASK into MASK_LEN. (mask_len_load): Ditto. (len_maskstore): Ditto. (mask_len_store): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_gather_load): Ditto. (mask_len_gather_load): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (mask_len_scatter_store): Ditto. * doc/md.texi: Ditto. * genopinit.cc (main): Ditto. (CMP_NAME): Ditto. Ditto. * gimple-fold.cc (arith_overflowed_p): Ditto. (gimple_fold_partial_load_store_mem_ref): Ditto. (gimple_fold_call): Ditto. * internal-fn.cc (len_maskload_direct): Ditto. (mask_len_load_direct): Ditto. (len_maskstore_direct): Ditto. (mask_len_store_direct): Ditto. (expand_call_mem_ref): Ditto. (expand_len_maskload_optab_fn): Ditto. (expand_mask_len_load_optab_fn): Ditto. (expand_len_maskstore_optab_fn): Ditto. (expand_mask_len_store_optab_fn): Ditto. (direct_len_maskload_optab_supported_p): Ditto. (direct_mask_len_load_optab_supported_p): Ditto. (direct_len_maskstore_optab_supported_p): Ditto. (direct_mask_len_store_optab_supported_p): Ditto. (internal_load_fn_p): Ditto. (internal_store_fn_p): Ditto. (internal_gather_scatter_fn_p): Ditto. (internal_fn_len_index): Ditto. (internal_fn_mask_index): Ditto. (internal_fn_stored_value_index): Ditto. (internal_len_load_store_bias): Ditto. * internal-fn.def (LEN_MASK_GATHER_LOAD): Ditto. (MASK_LEN_GATHER_LOAD): Ditto. (LEN_MASK_LOAD): Ditto. (MASK_LEN_LOAD): Ditto. (LEN_MASK_SCATTER_STORE): Ditto. (MASK_LEN_SCATTER_STORE): Ditto. (LEN_MASK_STORE): Ditto. (MASK_LEN_STORE): Ditto. * optabs-query.cc (supports_vec_gather_load_p): Ditto. (supports_vec_scatter_store_p): Ditto. * optabs-tree.cc (target_supports_mask_load_store_p): Ditto. (target_supports_len_load_store_p): Ditto. * optabs.def (OPTAB_CD): Ditto. * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Ditto. (call_may_clobber_ref_p_1): Ditto. * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Ditto. (dse_optimize_stmt): Ditto. * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Ditto. (get_alias_ptr_type_for_ptr_address): Ditto. * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Ditto. * tree-vect-patterns.cc (vect_recog_gather_scatter_pattern): Ditto. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Ditto. (vect_get_strided_load_store_ops): Ditto. (vectorizable_store): Ditto. (vectorizable_load): Ditto. 2023-07-21 Haochen Jiang * config/i386/i386.opt: Fix a typo. 2023-07-21 Richard Biener PR tree-optimization/88540 * tree-ssa-phiopt.cc (minmax_replacement): Do not give up with NaNs but handle the simple case by if-converting to a COND_EXPR. 2023-07-21 Andrew Pinski * match.pd (minmax,a>->minmax): New transformation. 2023-07-21 Richard Biener PR tree-optimization/110742 * tree-vect-slp.cc (vect_optimize_slp_pass::get_result_with_layout): Do not materialize an edge permutation in an external node with vector defs. (vect_slp_analyze_node_operations_1): Guard purely internal nodes better. 2023-07-21 Jan Hubicka * cfgloop.cc: Include sreal.h. (flow_loop_dump): Dump sreal iteration exsitmate. (get_estimated_loop_iterations): Update. * cfgloop.h (expected_loop_iterations_by_profile): Declare. * cfgloopanal.cc (expected_loop_iterations_by_profile): New function. (expected_loop_iterations_unbounded): Use new API. * cfgloopmanip.cc (scale_loop_profile): Use expected_loop_iterations_by_profile * predict.cc (pass_profile::execute): Likewise. * profile.cc (branch_prob): Likewise. * tree-ssa-loop-niter.cc: Include sreal.h. (estimate_numbers_of_iterations): Likewise 2023-07-21 Kewen Lin PR tree-optimization/110744 * tree-ssa-sccvn.cc (vn_reference_lookup_3): Correct the index of bias operand for ifn IFN_LEN_STORE. 2023-07-21 liuhongt PR target/89701 * common.opt: (fcf-protection=): Add EnumSet attribute to support combination of params. 2023-07-21 David Malcolm PR middle-end/110612 * text-art/table.cc (table_geometry::table_geometry): Drop m_table field. (table_geometry::table_x_to_canvas_x): Add cast to comparison. (table_geometry::table_y_to_canvas_y): Likewise. * text-art/table.h (table_geometry::m_table): Drop unused field. * text-art/widget.h (wrapper_widget::update_child_alloc_rects): Add "override". 2023-07-20 Uros Bizjak PR target/110717 * config/i386/i386-features.cc (general_scalar_chain::compute_convert_gain): Calculate gain for extend higpart case. (general_scalar_chain::convert_op): Handle ASHIFTRT/ASHIFT combined RTX. (general_scalar_to_vector_candidate_p): Enable ASHIFTRT for SImode for SSE2 targets. Handle ASHIFTRT/ASHIFT combined RTX. * config/i386/i386.md (*extend2_doubleword_highpart): New define_insn_and_split pattern. (*extendv2di2_highpart_stv): Ditto. 2023-07-20 Vladimir N. Makarov * lra-constraints.cc (simplify_operand_subreg): Check frame pointer simplification. 2023-07-20 Andrew Pinski * combine.cc (dump_combine_stats): Remove. (dump_combine_total_stats): Remove. (total_attempts, total_merges, total_extras, total_successes): Remove. (combine_instructions): Don't increment total stats instead use statistics_counter_event. * dumpfile.cc (print_combine_total_stats): Remove. * dumpfile.h (print_combine_total_stats): Remove. (dump_combine_total_stats): Remove. * passes.cc (finish_optimization_passes): Don't call print_combine_total_stats. * rtl.h (dump_combine_total_stats): Remove. (dump_combine_stats): Remove. 2023-07-20 Jan Hubicka * tree-ssa-loop-ch.cc (should_duplicate_loop_header_p): Use BIT instead of TRUTH logical ops. 2023-07-20 Martin Jambor * doc/invoke.texi (analyzer-text-art-string-ellipsis-threshold): New. (analyzer-text-art-ideal-canvas-width): Likewise. (analyzer-text-art-string-ellipsis-head-len): Likewise. (analyzer-text-art-string-ellipsis-tail-len): Likewise. 2023-07-20 Ju-Zhe Zhong * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Refine code structure. 2023-07-20 Jan Hubicka * tree-ssa-loop-ch.cc (edge_range_query): Rename to ... (get_range_query): ... this one; do (static_loop_exit): Add query parametr, turn ranger to reference. (loop_static_stmt_p): New function. (loop_static_op_p): New function. (loop_iv_derived_p): Remove. (loop_combined_static_and_iv_p): New function. (should_duplicate_loop_header_p): Discover combined onditionals; do not track iv derived; improve dumps. (pass_ch::execute): Fix whitespace. 2023-07-20 Richard Biener PR tree-optimization/110204 * tree-ssa-sccvn.cc (eliminate_dom_walker::eliminate_avail): Look through copies generated by PRE. 2023-07-20 Matthew Malcomson * tree-vect-stmts.cc (get_group_load_store_type): Account for `gap` when checking if need to peel twice. 2023-07-20 Francois-Xavier Coudert PR middle-end/77928 * doc/extend.texi: Document iseqsig builtin. * builtins.cc (fold_builtin_iseqsig): New function. (fold_builtin_2): Handle BUILT_IN_ISEQSIG. (is_inexpensive_builtin): Handle BUILT_IN_ISEQSIG. * builtins.def (BUILT_IN_ISEQSIG): New built-in. 2023-07-20 Pan Li * config/riscv/vector.md: Fix incorrect match_operand. 2023-07-20 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_move): Don't call force_reg, to use SUBREG rather than create a new pseudo when inserting DFmode fields into TImode with insvti_{high,low}part. * config/i386/i386.md (*concat3_3): Split into two define_insn_and_split... (*concatditi3_3): 64-bit implementation. Provide alternative that allows register allocation to use SSE registers that is split into vec_concatv2di after reload. (*concatsidi3_3): 32-bit implementation. 2023-07-20 Richard Biener PR middle-end/61747 * internal-fn.cc (expand_vec_cond_optab_fn): When the value operands are equal to the original comparison operands preserve that equality by re-using the comparison expansion. * optabs.cc (emit_conditional_move): When the value operands are equal to the comparison operands and would be forced to a register by prepare_cmp_insn do so earlier, preserving the equality. 2023-07-20 Pan Li * config/riscv/vector.md: Align pattern format. 2023-07-20 Haochen Jiang * doc/invoke.texi: Remove AVX512VP2INTERSECT in Granite Rapids{, D} from documentation. 2023-07-20 Juzhe-Zhong * config/riscv/autovec.md (len_mask_gather_load): Refactor RVV machine modes. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. * config/riscv/riscv-modes.def (VECTOR_BOOL_MODE): Ditto. (ADJUST_NUNITS): Ditto. (ADJUST_ALIGNMENT): Ditto. (ADJUST_BYTESIZE): Ditto. (ADJUST_PRECISION): Ditto. (RVV_MODES): Ditto. (RVV_WHOLE_MODES): Ditto. (RVV_FRACT_MODE): Ditto. (RVV_NF8_MODES): Ditto. (RVV_NF4_MODES): Ditto. (VECTOR_MODES_WITH_PREFIX): Ditto. (VECTOR_MODE_WITH_PREFIX): Ditto. (RVV_TUPLE_MODES): Ditto. (RVV_NF2_MODES): Ditto. (RVV_TUPLE_PARTIAL_MODES): Ditto. * config/riscv/riscv-v.cc (struct mode_vtype_group): Ditto. (ENTRY): Ditto. (TUPLE_ENTRY): Ditto. (get_vlmul): Ditto. (get_nf): Ditto. (get_ratio): Ditto. (preferred_simd_mode): Ditto. (autovectorize_vector_modes): Ditto. * config/riscv/riscv-vector-builtins.cc (DEF_RVV_TYPE): Ditto. * config/riscv/riscv-vector-builtins.def (DEF_RVV_TYPE): Ditto. (vbool64_t): Ditto. (vbool32_t): Ditto. (vbool16_t): Ditto. (vbool8_t): Ditto. (vbool4_t): Ditto. (vbool2_t): Ditto. (vbool1_t): Ditto. (vint8mf8_t): Ditto. (vuint8mf8_t): Ditto. (vint8mf4_t): Ditto. (vuint8mf4_t): Ditto. (vint8mf2_t): Ditto. (vuint8mf2_t): Ditto. (vint8m1_t): Ditto. (vuint8m1_t): Ditto. (vint8m2_t): Ditto. (vuint8m2_t): Ditto. (vint8m4_t): Ditto. (vuint8m4_t): Ditto. (vint8m8_t): Ditto. (vuint8m8_t): Ditto. (vint16mf4_t): Ditto. (vuint16mf4_t): Ditto. (vint16mf2_t): Ditto. (vuint16mf2_t): Ditto. (vint16m1_t): Ditto. (vuint16m1_t): Ditto. (vint16m2_t): Ditto. (vuint16m2_t): Ditto. (vint16m4_t): Ditto. (vuint16m4_t): Ditto. (vint16m8_t): Ditto. (vuint16m8_t): Ditto. (vint32mf2_t): Ditto. (vuint32mf2_t): Ditto. (vint32m1_t): Ditto. (vuint32m1_t): Ditto. (vint32m2_t): Ditto. (vuint32m2_t): Ditto. (vint32m4_t): Ditto. (vuint32m4_t): Ditto. (vint32m8_t): Ditto. (vuint32m8_t): Ditto. (vint64m1_t): Ditto. (vuint64m1_t): Ditto. (vint64m2_t): Ditto. (vuint64m2_t): Ditto. (vint64m4_t): Ditto. (vuint64m4_t): Ditto. (vint64m8_t): Ditto. (vuint64m8_t): Ditto. (vfloat16mf4_t): Ditto. (vfloat16mf2_t): Ditto. (vfloat16m1_t): Ditto. (vfloat16m2_t): Ditto. (vfloat16m4_t): Ditto. (vfloat16m8_t): Ditto. (vfloat32mf2_t): Ditto. (vfloat32m1_t): Ditto. (vfloat32m2_t): Ditto. (vfloat32m4_t): Ditto. (vfloat32m8_t): Ditto. (vfloat64m1_t): Ditto. (vfloat64m2_t): Ditto. (vfloat64m4_t): Ditto. (vfloat64m8_t): Ditto. * config/riscv/riscv-vector-switch.def (ENTRY): Ditto. (TUPLE_ENTRY): Ditto. * config/riscv/riscv-vsetvl.cc (change_insn): Ditto. * config/riscv/riscv.cc (riscv_valid_lo_sum_p): Ditto. (riscv_v_adjust_nunits): Ditto. (riscv_v_adjust_bytesize): Ditto. (riscv_v_adjust_precision): Ditto. (riscv_convert_vector_bits): Ditto. * config/riscv/riscv.h (riscv_v_adjust_nunits): Ditto. * config/riscv/riscv.md: Ditto. * config/riscv/vector-iterators.md: Ditto. * config/riscv/vector.md (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_load): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. (@pred_indexed_store): Ditto. 2023-07-19 Vladimir N. Makarov * lra-int.h (lra_update_fp2sp_elimination): New prototype. (lra_asm_insn_error): New prototype. * lra-spills.cc (remove_pseudos): Add check for pseudo slot memory existence. (lra_spill): Call lra_update_fp2sp_elimination. * lra-eliminations.cc: Remove trailing spaces. (elimination_fp2sp_occured_p): New static flag. (lra_eliminate_regs_1): Set the flag up. (update_reg_eliminate): Modify the assert for stack to frame pointer elimination. (lra_update_fp2sp_elimination): New function. (lra_eliminate): Clear flag elimination_fp2sp_occured_p. 2023-07-19 Andrew Carlotti * config/aarch64/aarch64.h (TARGET_MEMTAG): Remove armv8.5 dependency. * config/aarch64/arm_acle.h: Remove unnecessary armv8.x dependencies from target pragmas. * config/aarch64/arm_fp16.h (target): Likewise. * config/aarch64/arm_neon.h (target): Likewise. 2023-07-19 Andrew Pinski PR tree-optimization/110252 * tree-ssa-phiopt.cc (class auto_flow_sensitive): New class. (auto_flow_sensitive::auto_flow_sensitive): New constructor. (auto_flow_sensitive::~auto_flow_sensitive): New deconstructor. (match_simplify_replacement): Temporarily remove the flow sensitive info on the two statements that might be moved. 2023-07-19 Andrew Pinski * gimple-fold.cc (fosa_unwind): Replace `vrange_storage *` with flow_sensitive_info_storage. (follow_outer_ssa_edges): Update how to save off the flow sensitive info. (maybe_fold_comparisons_from_match_pd): Update restoring of flow sensitive info. * tree-ssanames.cc (flow_sensitive_info_storage::save): New method. (flow_sensitive_info_storage::restore): New method. (flow_sensitive_info_storage::save_and_clear): New method. (flow_sensitive_info_storage::clear_storage): New method. * tree-ssanames.h (class flow_sensitive_info_storage): New class. 2023-07-19 Andrew Pinski PR tree-optimization/110726 * match.pd ((a|b)&(a==b),a|(a==b),(a&b)|(a==b)): Add checks to make sure the type was one bit precision intergal type. 2023-07-19 Ju-Zhe Zhong * doc/md.texi: Add mask_len_fold_left_plus. * internal-fn.cc (mask_len_fold_left_direct): Ditto. (expand_mask_len_fold_left_optab_fn): Ditto. (direct_mask_len_fold_left_optab_supported_p): Ditto. * internal-fn.def (MASK_LEN_FOLD_LEFT_PLUS): Ditto. * optabs.def (OPTAB_D): Ditto. 2023-07-19 Jakub Jelinek * tree-switch-conversion.h (class bit_test_cluster): Fix comment typo. 2023-07-19 Jakub Jelinek PR tree-optimization/110731 * wide-int.cc (wi::divmod_internal): Always unpack dividend and divisor as UNSIGNED regardless of sgn. 2023-07-19 Lehua Ding * common/config/riscv/riscv-common.cc (riscv_supported_std_ext): Init. (standard_extensions_p): Add check. (riscv_subset_list::add): Just return NULL if it failed before. (riscv_subset_list::parse_std_ext): Continue parse when find a error (riscv_subset_list::parse): Just return NULL if it failed before. * config/riscv/riscv-subset.h (class riscv_subset_list): Add field. 2023-07-19 Jan Beulich * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate): Use gen_vec_set_0. (ix86_expand_vector_extract): Use gen_vec_extract_lo / gen_vec_extract_hi. (expand_vec_perm_broadcast_1): Use gen_vec_interleave_high / gen_vec_interleave_low. Rename local variable. 2023-07-19 Jan Beulich * config/i386/sse.md (vec_dupv2df): Add new AVX512F alternative. Move AVX512VL part of condition to new "enabled" attribute. 2023-07-19 liuhongt PR target/109504 * config/i386/i386-builtins.cc (ix86_register_float16_builtin_type): Remove TARGET_SSE2. (ix86_register_bf16_builtin_type): Ditto. * config/i386/i386-c.cc (ix86_target_macros): When TARGET_SSE2 isn't available, undef the macros which are used to check the backend support of the _Float16/__bf16 types when building libstdc++ and libgcc. * config/i386/i386.cc (construct_container): Issue errors for HFmode/BFmode when TARGET_SSE2 is not available. (function_value_32): Ditto. (ix86_scalar_mode_supported_p): Remove TARGET_SSE2 for HFmode/BFmode. (ix86_libgcc_floating_mode_supported_p): Ditto. (ix86_emit_support_tinfos): Adjust codes. (ix86_invalid_conversion): Return diagnostic message string when there's conversion from/to BF/HFmode w/o TARGET_SSE2. (ix86_invalid_unary_op): New function. (ix86_invalid_binary_op): Ditto. (TARGET_INVALID_UNARY_OP): Define. (TARGET_INVALID_BINARY_OP): Define. * config/i386/immintrin.h [__SSE2__]: Remove for fp16/bf16 related instrinsics header files. * config/i386/i386.h (VALID_SSE2_TYPE_MODE): New macro. 2023-07-18 Uros Bizjak * dwarf2asm.cc: Change FALSE to false. * dwarf2cfi.cc (execute_dwarf2_frame): Change return type to void. * dwarf2out.cc (matches_main_base): Change return type from int to bool. Change "last_match" variable to bool. (dump_struct_debug): Change return type from int to bool. Change "matches" and "result" function arguments to bool. (is_pseudo_reg): Change return type from int to bool. (is_tagged_type): Ditto. (same_loc_p): Ditto. (same_dw_val_p): Change return type from int to bool and adjust function body accordingly. (same_attr_p): Ditto. (same_die_p): Ditto. (is_type_die): Ditto. (is_declaration_die): Ditto. (should_move_die_to_comdat): Ditto. (is_base_type): Ditto. (is_based_loc): Ditto. (local_scope_p): Ditto. (class_scope_p): Ditto. (class_or_namespace_scope_p): Ditto. (is_tagged_type): Ditto. (is_rust): Use void argument. (is_nested_in_subprogram): Change return type from int to bool. (contains_subprogram_definition): Ditto. (gen_struct_or_union_type_die): Change "nested", "complete" and "ns_decl" variables to bool. (is_naming_typedef_decl): Change FALSE to false. 2023-07-18 Jan Hubicka * tree-ssa-loop-ch.cc (edge_range_query): Take loop argument; be ready for queries not in headers. (static_loop_exit): Add basic blck parameter; update use of edge_range_query (should_duplicate_loop_header_p): Add ranger and static_exits parameter. Do not account statements that will be optimized out after duplicaiton in overall size. Add ranger query to find static exits. (update_profile_after_ch): Take static_exits has set instead of single eliminated_edge. (ch_base::copy_headers): Do all analysis in the first pass; remember invariant_exits and static_exits. 2023-07-18 Jason Merrill * fold-const.cc (native_interpret_aggregate): Skip empty fields. 2023-07-18 Gaius Mulley * doc/gm2.texi (Semantic checking): Change example testwithptr to testnew6. 2023-07-18 Richard Biener PR middle-end/105715 * gimple-isel.cc (gimple_expand_vec_exprs): Merge into... (pass_gimple_isel::execute): ... this. Duplicate comparison defs of COND_EXPRs. 2023-07-18 Juzhe-Zhong * config/riscv/riscv-selftests.cc (run_poly_int_selftests): Add more selftests. * config/riscv/riscv.cc (riscv_legitimize_poly_move): Dynamic adjust size of VLA vectors. (riscv_convert_vector_bits): Ditto. 2023-07-18 Juzhe-Zhong * config/riscv/autovec.md (vec_shl_insert_): New patterns. * config/riscv/riscv-v.cc (shuffle_compress_patterns): Fix bugs. 2023-07-18 Juergen Christ * config/s390/vx-builtins.md: New vsel pattern. 2023-07-18 liuhongt PR target/110438 * config/i386/sse.md (one_cmpl2): Remove # from assemble output. 2023-07-18 liuhongt PR target/110591 * config/i386/sync.md (cmpccxadd_): Adjust the pattern to explicitly set FLAGS_REG like *cmp_1, also add extra 3 define_peephole2 after the pattern. 2023-07-18 Ju-Zhe Zhong * rtl-ssa/internals.inl: Fix when mode1 and mode2 are not ordred. 2023-07-18 Pan Li Juzhe-Zhong * config/riscv/riscv.cc (struct machine_function): Add new field. (riscv_static_frm_mode_p): New function. (riscv_emit_frm_mode_set): New function for emit FRM. (riscv_emit_mode_set): Extract function for FRM. (riscv_mode_needed): Fix the TODO. (riscv_mode_entry): Initial dynamic frm RTL. (riscv_mode_exit): Return DYN_EXIT. * config/riscv/riscv.md: Add rdfrm. * config/riscv/vector-iterators.md (unspecv): Add DYN_EXIT unspecv. * config/riscv/vector.md (frm_modee): Add new mode dyn_exit. (fsrm): Removed. (fsrmsi_backup): New pattern for swap. (fsrmsi_restore): New pattern for restore. (fsrmsi_restore_exit): New pattern for restore exit. (frrmsi): New pattern for backup. 2023-07-17 Arsen Arsenović * doc/extend.texi: Add @cindex on __auto_type. 2023-07-17 Uros Bizjak * combine-stack-adj.cc (stack_memref_p): Change return type from int to bool and adjust function body accordingly. (rest_of_handle_stack_adjustments): Change return type to void. 2023-07-17 Uros Bizjak * combine.cc (struct reg_stat_type): Change last_set_invalid to bool. (cant_combine_insn_p): Change return type from int to bool and adjust function body accordingly. (can_combine_p): Ditto. (combinable_i3pat): Ditto. Change "i1_not_in_src" and "i0_not_in_src" function arguments from int to bool. (contains_muldiv): Change return type from int to bool and adjust function body accordingly. (try_combine): Ditto. Change "new_direct_jump" pointer function argument from int to bool. Change "substed_i2", "substed_i1", "substed_i0", "added_sets_0", "added_sets_1", "added_sets_2", "i2dest_in_i2src", "i1dest_in_i1src", "i2dest_in_i1src", "i0dest_in_i0src", "i1dest_in_i0src", "i2dest_in_i0src", "i2dest_killed", "i1dest_killed", "i0dest_killed", "i1_feeds_i2_n", "i0_feeds_i2_n", "i0_feeds_i1_n", "i3_subst_into_i2", "have_mult", "swap_i2i3", "split_i2i3" and "changed_i3_dest" variables from int to bool. (subst): Change "in_dest", "in_cond" and "unique_copy" function arguments from int to bool. (combine_simplify_rtx): Change "in_dest" and "in_cond" function arguments from int to bool. (make_extraction): Change "unsignedp", "in_dest" and "in_compare" function argument from int to bool. (force_int_to_mode): Change "just_select" function argument from int to bool. Change "next_select" variable to bool. (rtx_equal_for_field_assignment_p): Change return type from int to bool and adjust function body accordingly. (merge_outer_ops): Ditto. Change "pcomp_p" pointer function argument from int to bool. (get_last_value_validate): Change return type from int to bool and adjust function body accordingly. (reg_dead_at_p): Ditto. (reg_bitfield_target_p): Ditto. (combine_instructions): Ditto. Change "new_direct_jump" variable to bool. (can_combine_p): Change return type from int to bool and adjust function body accordingly. (likely_spilled_retval_p): Ditto. (can_change_dest_mode): Change "added_sets" function argument from int to bool. (find_split_point): Change "unsignedp" variable to bool. (simplify_if_then_else): Change "comparison_p" and "swapped" variables to bool. (simplify_set): Change "other_changed" variable to bool. (expand_compound_operation): Change "unsignedp" variable to bool. (force_to_mode): Change "just_select" function argument from int to bool. Change "next_select" variable to bool. (extended_count): Change "unsignedp" function argument to bool. (simplify_shift_const_1): Change "complement_p" variable to bool. (simplify_comparison): Change "changed" variable to bool. (rest_of_handle_combine): Change return type to void. 2023-07-17 Andre Vieira PR plugins/110610 * Makefile.in (INTERNAL_FN_H): Add insn-opinit.h. 2023-07-17 Senthil Kumar Selvaraj * ira.cc (setup_reg_class_relations): Continue if regclass cl3 is hard_reg_set_empty_p. 2023-07-17 Juzhe-Zhong * config/riscv/riscv.cc (riscv_option_override): Add sorry check. 2023-07-17 Martin Jambor * tree-ssa-loop-ivcanon.cc (try_peel_loop): Remove unused variable entry_count. 2023-07-17 Aldy Hernandez * tree-ssa-ccp.cc (ccp_finalize): Export value/mask known bits. 2023-07-17 Lehua Ding PR target/110696 * common/config/riscv/riscv-common.cc (riscv_subset_list::handle_implied_ext): recur add all implied extensions. (riscv_subset_list::check_implied_ext): Add new method. (riscv_subset_list::parse): Call checker check_implied_ext. * config/riscv/riscv-subset.h: Add new method. 2023-07-17 Juzhe-Zhong * config/riscv/autovec.md (reduc_plus_scal_): New pattern. (reduc_smax_scal_): Ditto. (reduc_umax_scal_): Ditto. (reduc_smin_scal_): Ditto. (reduc_umin_scal_): Ditto. (reduc_and_scal_): Ditto. (reduc_ior_scal_): Ditto. (reduc_xor_scal_): Ditto. * config/riscv/riscv-protos.h (enum insn_type): Add reduction. (expand_reduction): New function. * config/riscv/riscv-v.cc (emit_vlmax_reduction_insn): Ditto. (emit_vlmax_fp_reduction_insn): Ditto. (get_m1_mode): Ditto. (expand_cond_len_binop): Fix name. (expand_reduction): New function * config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Fix VSETVL BUG. (validate_change_or_fail): New function. (change_insn): Fix VSETVL BUG. (change_vsetvl_insn): Ditto. (pass_vsetvl::backward_demand_fusion): Ditto. (pass_vsetvl::df_post_optimization): Ditto. 2023-07-17 Aldy Hernandez * ipa-prop.cc (ipcp_update_bits): Export value/mask known bits. 2023-07-17 Christoph Müllner * config/riscv/riscv.cc (riscv_regno_ok_for_index_p): Remove parameter name from declaration of unused parameter. 2023-07-17 Kewen Lin PR tree-optimization/110652 * tree-vect-stmts.cc (vectorizable_load): Initialize new_temp as NULL_TREE. 2023-07-17 Richard Biener PR tree-optimization/110669 * tree-scalar-evolution.cc (analyze_and_compute_bitop_with_inv_effect): Check we matched a header PHI. 2023-07-17 Aldy Hernandez * tree-ssanames.cc (set_bitmask): New. * tree-ssanames.h (set_bitmask): New. 2023-07-17 Aldy Hernandez * value-range.cc (irange_bitmask::verify_mask): Mask need not be normalized. * value-range.h (irange_bitmask::union_): Normalize beforehand. (irange_bitmask::intersect): Same. 2023-07-17 Andrew Pinski PR tree-optimization/95923 * match.pd ((a|b)&(a==b),a|(a==b),(a&b)|(a==b)): New transformation. 2023-07-17 Roger Sayle * tree-if-conv.cc (predicate_scalar_phi): Make the arguments to the std::sort comparison lambda function const. 2023-07-17 Andrew Pinski PR tree-optimization/110666 * match.pd (A NEEQ (A NEEQ CST)): Fix Outer EQ case. 2023-07-17 Mo, Zewei * common/config/i386/cpuinfo.h (get_intel_cpu): Handle Lunar Lake, Arrow Lake and Arrow Lake S. * common/config/i386/i386-common.cc: (processor_name): Add arrowlake. (processor_alias_table): Add arrow lake, arrow lake s and lunar lake. * common/config/i386/i386-cpuinfo.h (enum processor_subtypes): Add INTEL_COREI7_ARROWLAKE and INTEL_COREI7_ARROWLAKE_S. * config.gcc: Add -march=arrowlake and -march=arrowlake-s. * config/i386/driver-i386.cc (host_detect_local_cpu): Handle arrowlake-s. * config/i386/i386-c.cc (ix86_target_macros_internal): Add arrowlake. * config/i386/i386-options.cc (m_ARROWLAKE): New. (processor_cost_table): Add arrowlake. * config/i386/i386.h (enum processor_type): Add PROCESSOR_ARROWLAKE. * config/i386/x86-tune.def: Add m_ARROWLAKE. * doc/extend.texi: Add arrowlake and arrowlake-s. * doc/invoke.texi: Ditto. 2023-07-17 Haochen Jiang * config/i386/sse.md (VI2_AVX2): Delete V32HI since we actually have the same iterator. Also renaming all the occurence to VI2_AVX2_AVX512BW. (usdot_prod): New define_expand. (udot_prod): Ditto. 2023-07-17 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Detech SM4. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_SM4_SET, OPTION_MASK_ISA2_SM4_UNSET): New. (OPTION_MASK_ISA2_AVX_UNSET): Add SM4. (ix86_handle_option): Handle -msm4. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_SM4. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for sm4. * config.gcc: Add sm4intrin.h. * config/i386/cpuid.h (bit_SM4): New. * config/i386/i386-builtin.def (BDESC): Add new builtins. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __SM4__. * config/i386/i386-isa.def (SM4): Add DEF_PTA(SM4). * config/i386/i386-options.cc (isa2_opts): Add -msm4. (ix86_valid_target_attribute_inner_p): Handle sm4. * config/i386/i386.opt: Add option -msm4. * config/i386/immintrin.h: Include sm4intrin.h * config/i386/sse.md (vsm4key4_): New define insn. (vsm4rnds4_): Ditto. * doc/extend.texi: Document sm4. * doc/invoke.texi: Document -msm4. * doc/sourcebuild.texi: Document target sm4. * config/i386/sm4intrin.h: New file. 2023-07-17 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Detect SHA512. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_SHA512_SET, OPTION_MASK_ISA2_SHA512_UNSET): New. (OPTION_MASK_ISA2_AVX_UNSET): Add SHA512. (ix86_handle_option): Handle -msha512. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_SHA512. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for sha512. * config.gcc: Add sha512intrin.h. * config/i386/cpuid.h (bit_SHA512): New. * config/i386/i386-builtin-types.def: Add DEF_FUNCTION_TYPE (V4DI, V4DI, V4DI, V2DI). * config/i386/i386-builtin.def (BDESC): Add new builtins. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __SHA512__. * config/i386/i386-expand.cc (ix86_expand_args_builtin): Handle V4DI_FTYPE_V4DI_V4DI_V2DI and V4DI_FTYPE_V4DI_V2DI. * config/i386/i386-isa.def (SHA512): Add DEF_PTA(SHA512). * config/i386/i386-options.cc (isa2_opts): Add -msha512. (ix86_valid_target_attribute_inner_p): Handle sha512. * config/i386/i386.opt: Add option -msha512. * config/i386/immintrin.h: Include sha512intrin.h. * config/i386/sse.md (vsha512msg1): New define insn. (vsha512msg2): Ditto. (vsha512rnds2): Ditto. * doc/extend.texi: Document sha512. * doc/invoke.texi: Document -msha512. * doc/sourcebuild.texi: Document target sha512. * config/i386/sha512intrin.h: New file. 2023-07-17 Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Detect SM3. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_SM3_SET, OPTION_MASK_ISA2_SM3_UNSET): New. (OPTION_MASK_ISA2_AVX_UNSET): Add SM3. (ix86_handle_option): Handle -msm3. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_SM3. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for SM3. * config.gcc: Add sm3intrin.h * config/i386/cpuid.h (bit_SM3): New. * config/i386/i386-builtin-types.def: Add DEF_FUNCTION_TYPE (V4SI, V4SI, V4SI, V4SI, INT). * config/i386/i386-builtin.def (BDESC): Add new builtins. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __SM3__. * config/i386/i386-expand.cc (ix86_expand_args_builtin): Handle V4SI_FTYPE_V4SI_V4SI_V4SI_INT. * config/i386/i386-isa.def (SM3): Add DEF_PTA(SM3). * config/i386/i386-options.cc (isa2_opts): Add -msm3. (ix86_valid_target_attribute_inner_p): Handle sm3. * config/i386/i386.opt: Add option -msm3. * config/i386/immintrin.h: Include sm3intrin.h. * config/i386/sse.md (vsm3msg1): New define insn. (vsm3msg2): Ditto. (vsm3rnds2): Ditto. * doc/extend.texi: Document sm3. * doc/invoke.texi: Document -msm3. * doc/sourcebuild.texi: Document target sm3. * config/i386/sm3intrin.h: New file. 2023-07-17 Kong Lingling Haochen Jiang * common/config/i386/cpuinfo.h (get_available_features): Detect avxvnniint16. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_AVXVNNIINT16_SET): New. (OPTION_MASK_ISA2_AVXVNNIINT16_UNSET): Ditto. (ix86_handle_option): Handle -mavxvnniint16. * common/config/i386/i386-cpuinfo.h (enum processor_features): Add FEATURE_AVXVNNIINT16. * common/config/i386/i386-isas.h: Add ISA_NAME_TABLE_ENTRY for avxvnniint16. * config.gcc: Add avxvnniint16.h. * config/i386/avxvnniint16intrin.h: New file. * config/i386/cpuid.h (bit_AVXVNNIINT16): New. * config/i386/i386-builtin.def: Add new builtins. * config/i386/i386-c.cc (ix86_target_macros_internal): Define __AVXVNNIINT16__. * config/i386/i386-options.cc (isa2_opts): Add -mavxvnniint16. (ix86_valid_target_attribute_inner_p): Handle avxvnniint16intrin.h. * config/i386/i386-isa.def: Add DEF_PTA(AVXVNNIINT16). * config/i386/i386.opt: Add option -mavxvnniint16. * config/i386/immintrin.h: Include avxvnniint16.h. * config/i386/sse.md (vpdp_): New define_insn. * doc/extend.texi: Document avxvnniint16. * doc/invoke.texi: Document -mavxvnniint16. * doc/sourcebuild.texi: Document target avxvnniint16. 2023-07-16 Jan Hubicka PR middle-end/110649 * tree-vect-loop.cc (scale_profile_for_vect_loop): Rewrite. (vect_transform_loop): Move scale_profile_for_vect_loop after upper bound updates. 2023-07-16 Jan Hubicka PR tree-optimization/110649 * tree-vect-loop.cc (optimize_mask_stores): Set correctly probability of the if-then-else construct. 2023-07-16 Jan Hubicka PR middle-end/110649 * tree-ssa-loop-ivcanon.cc (try_peel_loop): Avoid double profile update. 2023-07-15 Andrew Pinski * doc/contrib.texi: Update my entry. 2023-07-15 John David Anglin * config/pa/pa.md: Define constants R1_REGNUM, R19_REGNUM and R27_REGNUM. (tgd_load): Restrict to !TARGET_64BIT. Use register constants. (tld_load): Likewise. (tgd_load_pic): Change to expander. (tld_load_pic, tld_offset_load, tp_load): Likewise. (tie_load_pic, tle_load): Likewise. (tgd_load_picsi, tgd_load_picdi): New. (tld_load_picsi, tld_load_picdi): New. (tld_offset_load): New. (tp_load): New. (tie_load_picsi, tie_load_picdi): New. (tle_load): New. 2023-07-14 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vcmlaq, vcmlaq_rot90) (vcmlaq_rot180, vcmlaq_rot270): New. * config/arm/arm-mve-builtins-base.def (vcmlaq, vcmlaq_rot90) (vcmlaq_rot180, vcmlaq_rot270): New. * config/arm/arm-mve-builtins-base.h: (vcmlaq, vcmlaq_rot90) (vcmlaq_rot180, vcmlaq_rot270): New. * config/arm/arm-mve-builtins.cc (function_instance::has_inactive_argument): Handle vcmlaq, vcmlaq_rot90, vcmlaq_rot180, vcmlaq_rot270. * config/arm/arm_mve.h (vcmlaq): Delete. (vcmlaq_rot180): Delete. (vcmlaq_rot270): Delete. (vcmlaq_rot90): Delete. (vcmlaq_m): Delete. (vcmlaq_rot180_m): Delete. (vcmlaq_rot270_m): Delete. (vcmlaq_rot90_m): Delete. (vcmlaq_f16): Delete. (vcmlaq_rot180_f16): Delete. (vcmlaq_rot270_f16): Delete. (vcmlaq_rot90_f16): Delete. (vcmlaq_f32): Delete. (vcmlaq_rot180_f32): Delete. (vcmlaq_rot270_f32): Delete. (vcmlaq_rot90_f32): Delete. (vcmlaq_m_f32): Delete. (vcmlaq_m_f16): Delete. (vcmlaq_rot180_m_f32): Delete. (vcmlaq_rot180_m_f16): Delete. (vcmlaq_rot270_m_f32): Delete. (vcmlaq_rot270_m_f16): Delete. (vcmlaq_rot90_m_f32): Delete. (vcmlaq_rot90_m_f16): Delete. (__arm_vcmlaq_f16): Delete. (__arm_vcmlaq_rot180_f16): Delete. (__arm_vcmlaq_rot270_f16): Delete. (__arm_vcmlaq_rot90_f16): Delete. (__arm_vcmlaq_f32): Delete. (__arm_vcmlaq_rot180_f32): Delete. (__arm_vcmlaq_rot270_f32): Delete. (__arm_vcmlaq_rot90_f32): Delete. (__arm_vcmlaq_m_f32): Delete. (__arm_vcmlaq_m_f16): Delete. (__arm_vcmlaq_rot180_m_f32): Delete. (__arm_vcmlaq_rot180_m_f16): Delete. (__arm_vcmlaq_rot270_m_f32): Delete. (__arm_vcmlaq_rot270_m_f16): Delete. (__arm_vcmlaq_rot90_m_f32): Delete. (__arm_vcmlaq_rot90_m_f16): Delete. (__arm_vcmlaq): Delete. (__arm_vcmlaq_rot180): Delete. (__arm_vcmlaq_rot270): Delete. (__arm_vcmlaq_rot90): Delete. (__arm_vcmlaq_m): Delete. (__arm_vcmlaq_rot180_m): Delete. (__arm_vcmlaq_rot270_m): Delete. (__arm_vcmlaq_rot90_m): Delete. 2023-07-14 Christophe Lyon * config/arm/arm_mve_builtins.def (vcmlaq_rot90_f) (vcmlaq_rot270_f, vcmlaq_rot180_f, vcmlaq_f): Add "_f" suffix. * config/arm/iterators.md (MVE_VCMLAQ_M): New. (mve_insn): Add vcmla. (rot): Add VCMLAQ_M_F, VCMLAQ_ROT90_M_F, VCMLAQ_ROT180_M_F, VCMLAQ_ROT270_M_F. (mve_rot): Add VCMLAQ_M_F, VCMLAQ_ROT90_M_F, VCMLAQ_ROT180_M_F, VCMLAQ_ROT270_M_F. * config/arm/mve.md (mve_vcmlaq): Rename into ... (@mve_q_f): ... this. (mve_vcmlaq_m_f, mve_vcmlaq_rot180_m_f) (mve_vcmlaq_rot270_m_f, mve_vcmlaq_rot90_m_f): Merge into ... (@mve_q_m_f): ... this. 2023-07-14 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vcmulq, vcmulq_rot90) (vcmulq_rot180, vcmulq_rot270): New. * config/arm/arm-mve-builtins-base.def (vcmulq, vcmulq_rot90) (vcmulq_rot180, vcmulq_rot270): New. * config/arm/arm-mve-builtins-base.h: (vcmulq, vcmulq_rot90) (vcmulq_rot180, vcmulq_rot270): New. * config/arm/arm_mve.h (vcmulq_rot90): Delete. (vcmulq_rot270): Delete. (vcmulq_rot180): Delete. (vcmulq): Delete. (vcmulq_m): Delete. (vcmulq_rot180_m): Delete. (vcmulq_rot270_m): Delete. (vcmulq_rot90_m): Delete. (vcmulq_x): Delete. (vcmulq_rot90_x): Delete. (vcmulq_rot180_x): Delete. (vcmulq_rot270_x): Delete. (vcmulq_rot90_f16): Delete. (vcmulq_rot270_f16): Delete. (vcmulq_rot180_f16): Delete. (vcmulq_f16): Delete. (vcmulq_rot90_f32): Delete. (vcmulq_rot270_f32): Delete. (vcmulq_rot180_f32): Delete. (vcmulq_f32): Delete. (vcmulq_m_f32): Delete. (vcmulq_m_f16): Delete. (vcmulq_rot180_m_f32): Delete. (vcmulq_rot180_m_f16): Delete. (vcmulq_rot270_m_f32): Delete. (vcmulq_rot270_m_f16): Delete. (vcmulq_rot90_m_f32): Delete. (vcmulq_rot90_m_f16): Delete. (vcmulq_x_f16): Delete. (vcmulq_x_f32): Delete. (vcmulq_rot90_x_f16): Delete. (vcmulq_rot90_x_f32): Delete. (vcmulq_rot180_x_f16): Delete. (vcmulq_rot180_x_f32): Delete. (vcmulq_rot270_x_f16): Delete. (vcmulq_rot270_x_f32): Delete. (__arm_vcmulq_rot90_f16): Delete. (__arm_vcmulq_rot270_f16): Delete. (__arm_vcmulq_rot180_f16): Delete. (__arm_vcmulq_f16): Delete. (__arm_vcmulq_rot90_f32): Delete. (__arm_vcmulq_rot270_f32): Delete. (__arm_vcmulq_rot180_f32): Delete. (__arm_vcmulq_f32): Delete. (__arm_vcmulq_m_f32): Delete. (__arm_vcmulq_m_f16): Delete. (__arm_vcmulq_rot180_m_f32): Delete. (__arm_vcmulq_rot180_m_f16): Delete. (__arm_vcmulq_rot270_m_f32): Delete. (__arm_vcmulq_rot270_m_f16): Delete. (__arm_vcmulq_rot90_m_f32): Delete. (__arm_vcmulq_rot90_m_f16): Delete. (__arm_vcmulq_x_f16): Delete. (__arm_vcmulq_x_f32): Delete. (__arm_vcmulq_rot90_x_f16): Delete. (__arm_vcmulq_rot90_x_f32): Delete. (__arm_vcmulq_rot180_x_f16): Delete. (__arm_vcmulq_rot180_x_f32): Delete. (__arm_vcmulq_rot270_x_f16): Delete. (__arm_vcmulq_rot270_x_f32): Delete. (__arm_vcmulq_rot90): Delete. (__arm_vcmulq_rot270): Delete. (__arm_vcmulq_rot180): Delete. (__arm_vcmulq): Delete. (__arm_vcmulq_m): Delete. (__arm_vcmulq_rot180_m): Delete. (__arm_vcmulq_rot270_m): Delete. (__arm_vcmulq_rot90_m): Delete. (__arm_vcmulq_x): Delete. (__arm_vcmulq_rot90_x): Delete. (__arm_vcmulq_rot180_x): Delete. (__arm_vcmulq_rot270_x): Delete. 2023-07-14 Christophe Lyon * config/arm/arm_mve_builtins.def (vcmulq_rot90_f) (vcmulq_rot270_f, vcmulq_rot180_f, vcmulq_f): Add "_f" suffix. * config/arm/iterators.md (MVE_VCADDQ_VCMULQ) (MVE_VCADDQ_VCMULQ_M): New. (mve_insn): Add vcmul. (rot): Add VCMULQ_M_F, VCMULQ_ROT90_M_F, VCMULQ_ROT180_M_F, VCMULQ_ROT270_M_F. (VCMUL): Delete. (mve_rot): Add VCMULQ_M_F, VCMULQ_ROT90_M_F, VCMULQ_ROT180_M_F, VCMULQ_ROT270_M_F. * config/arm/mve.md (mve_vcmulq): Merge into @mve_q_f. (mve_vcmulq_m_f, mve_vcmulq_rot180_m_f) (mve_vcmulq_rot270_m_f, mve_vcmulq_rot90_m_f): Merge into @mve_q_m_f. 2023-07-14 Christophe Lyon * config/arm/arm-mve-builtins-base.cc (vcaddq_rot90) (vcaddq_rot270, vhcaddq_rot90, vhcaddq_rot270): New. * config/arm/arm-mve-builtins-base.def (vcaddq_rot90) (vcaddq_rot270, vhcaddq_rot90, vhcaddq_rot270): New. * config/arm/arm-mve-builtins-base.h: (vcaddq_rot90) (vcaddq_rot270, vhcaddq_rot90, vhcaddq_rot270): New. * config/arm/arm-mve-builtins-functions.h (class unspec_mve_function_exact_insn_rot): New. * config/arm/arm_mve.h (vcaddq_rot90): Delete. (vcaddq_rot270): Delete. (vhcaddq_rot90): Delete. (vhcaddq_rot270): Delete. (vcaddq_rot270_m): Delete. (vcaddq_rot90_m): Delete. (vhcaddq_rot270_m): Delete. (vhcaddq_rot90_m): Delete. (vcaddq_rot90_x): Delete. (vcaddq_rot270_x): Delete. (vhcaddq_rot90_x): Delete. (vhcaddq_rot270_x): Delete. (vcaddq_rot90_u8): Delete. (vcaddq_rot270_u8): Delete. (vhcaddq_rot90_s8): Delete. (vhcaddq_rot270_s8): Delete. (vcaddq_rot90_s8): Delete. (vcaddq_rot270_s8): Delete. (vcaddq_rot90_u16): Delete. (vcaddq_rot270_u16): Delete. (vhcaddq_rot90_s16): Delete. (vhcaddq_rot270_s16): Delete. (vcaddq_rot90_s16): Delete. (vcaddq_rot270_s16): Delete. (vcaddq_rot90_u32): Delete. (vcaddq_rot270_u32): Delete. (vhcaddq_rot90_s32): Delete. (vhcaddq_rot270_s32): Delete. (vcaddq_rot90_s32): Delete. (vcaddq_rot270_s32): Delete. (vcaddq_rot90_f16): Delete. (vcaddq_rot270_f16): Delete. (vcaddq_rot90_f32): Delete. (vcaddq_rot270_f32): Delete. (vcaddq_rot270_m_s8): Delete. (vcaddq_rot270_m_s32): Delete. (vcaddq_rot270_m_s16): Delete. (vcaddq_rot270_m_u8): Delete. (vcaddq_rot270_m_u32): Delete. (vcaddq_rot270_m_u16): Delete. (vcaddq_rot90_m_s8): Delete. (vcaddq_rot90_m_s32): Delete. (vcaddq_rot90_m_s16): Delete. (vcaddq_rot90_m_u8): Delete. (vcaddq_rot90_m_u32): Delete. (vcaddq_rot90_m_u16): Delete. (vhcaddq_rot270_m_s8): Delete. (vhcaddq_rot270_m_s32): Delete. (vhcaddq_rot270_m_s16): Delete. (vhcaddq_rot90_m_s8): Delete. (vhcaddq_rot90_m_s32): Delete. (vhcaddq_rot90_m_s16): Delete. (vcaddq_rot270_m_f32): Delete. (vcaddq_rot270_m_f16): Delete. (vcaddq_rot90_m_f32): Delete. (vcaddq_rot90_m_f16): Delete. (vcaddq_rot90_x_s8): Delete. (vcaddq_rot90_x_s16): Delete. (vcaddq_rot90_x_s32): Delete. (vcaddq_rot90_x_u8): Delete. (vcaddq_rot90_x_u16): Delete. (vcaddq_rot90_x_u32): Delete. (vcaddq_rot270_x_s8): Delete. (vcaddq_rot270_x_s16): Delete. (vcaddq_rot270_x_s32): Delete. (vcaddq_rot270_x_u8): Delete. (vcaddq_rot270_x_u16): Delete. (vcaddq_rot270_x_u32): Delete. (vhcaddq_rot90_x_s8): Delete. (vhcaddq_rot90_x_s16): Delete. (vhcaddq_rot90_x_s32): Delete. (vhcaddq_rot270_x_s8): Delete. (vhcaddq_rot270_x_s16): Delete. (vhcaddq_rot270_x_s32): Delete. (vcaddq_rot90_x_f16): Delete. (vcaddq_rot90_x_f32): Delete. (vcaddq_rot270_x_f16): Delete. (vcaddq_rot270_x_f32): Delete. (__arm_vcaddq_rot90_u8): Delete. (__arm_vcaddq_rot270_u8): Delete. (__arm_vhcaddq_rot90_s8): Delete. (__arm_vhcaddq_rot270_s8): Delete. (__arm_vcaddq_rot90_s8): Delete. (__arm_vcaddq_rot270_s8): Delete. (__arm_vcaddq_rot90_u16): Delete. (__arm_vcaddq_rot270_u16): Delete. (__arm_vhcaddq_rot90_s16): Delete. (__arm_vhcaddq_rot270_s16): Delete. (__arm_vcaddq_rot90_s16): Delete. (__arm_vcaddq_rot270_s16): Delete. (__arm_vcaddq_rot90_u32): Delete. (__arm_vcaddq_rot270_u32): Delete. (__arm_vhcaddq_rot90_s32): Delete. (__arm_vhcaddq_rot270_s32): Delete. (__arm_vcaddq_rot90_s32): Delete. (__arm_vcaddq_rot270_s32): Delete. (__arm_vcaddq_rot270_m_s8): Delete. (__arm_vcaddq_rot270_m_s32): Delete. (__arm_vcaddq_rot270_m_s16): Delete. (__arm_vcaddq_rot270_m_u8): Delete. (__arm_vcaddq_rot270_m_u32): Delete. (__arm_vcaddq_rot270_m_u16): Delete. (__arm_vcaddq_rot90_m_s8): Delete. (__arm_vcaddq_rot90_m_s32): Delete. (__arm_vcaddq_rot90_m_s16): Delete. (__arm_vcaddq_rot90_m_u8): Delete. (__arm_vcaddq_rot90_m_u32): Delete. (__arm_vcaddq_rot90_m_u16): Delete. (__arm_vhcaddq_rot270_m_s8): Delete. (__arm_vhcaddq_rot270_m_s32): Delete. (__arm_vhcaddq_rot270_m_s16): Delete. (__arm_vhcaddq_rot90_m_s8): Delete. (__arm_vhcaddq_rot90_m_s32): Delete. (__arm_vhcaddq_rot90_m_s16): Delete. (__arm_vcaddq_rot90_x_s8): Delete. (__arm_vcaddq_rot90_x_s16): Delete. (__arm_vcaddq_rot90_x_s32): Delete. (__arm_vcaddq_rot90_x_u8): Delete. (__arm_vcaddq_rot90_x_u16): Delete. (__arm_vcaddq_rot90_x_u32): Delete. (__arm_vcaddq_rot270_x_s8): Delete. (__arm_vcaddq_rot270_x_s16): Delete. (__arm_vcaddq_rot270_x_s32): Delete. (__arm_vcaddq_rot270_x_u8): Delete. (__arm_vcaddq_rot270_x_u16): Delete. (__arm_vcaddq_rot270_x_u32): Delete. (__arm_vhcaddq_rot90_x_s8): Delete. (__arm_vhcaddq_rot90_x_s16): Delete. (__arm_vhcaddq_rot90_x_s32): Delete. (__arm_vhcaddq_rot270_x_s8): Delete. (__arm_vhcaddq_rot270_x_s16): Delete. (__arm_vhcaddq_rot270_x_s32): Delete. (__arm_vcaddq_rot90_f16): Delete. (__arm_vcaddq_rot270_f16): Delete. (__arm_vcaddq_rot90_f32): Delete. (__arm_vcaddq_rot270_f32): Delete. (__arm_vcaddq_rot270_m_f32): Delete. (__arm_vcaddq_rot270_m_f16): Delete. (__arm_vcaddq_rot90_m_f32): Delete. (__arm_vcaddq_rot90_m_f16): Delete. (__arm_vcaddq_rot90_x_f16): Delete. (__arm_vcaddq_rot90_x_f32): Delete. (__arm_vcaddq_rot270_x_f16): Delete. (__arm_vcaddq_rot270_x_f32): Delete. (__arm_vcaddq_rot90): Delete. (__arm_vcaddq_rot270): Delete. (__arm_vhcaddq_rot90): Delete. (__arm_vhcaddq_rot270): Delete. (__arm_vcaddq_rot270_m): Delete. (__arm_vcaddq_rot90_m): Delete. (__arm_vhcaddq_rot270_m): Delete. (__arm_vhcaddq_rot90_m): Delete. (__arm_vcaddq_rot90_x): Delete. (__arm_vcaddq_rot270_x): Delete. (__arm_vhcaddq_rot90_x): Delete. (__arm_vhcaddq_rot270_x): Delete. 2023-07-14 Christophe Lyon * config/arm/arm_mve_builtins.def (vcaddq_rot90_, vcaddq_rot270_) (vcaddq_rot90_f, vcaddq_rot90_f): Add "_" or "_f" suffix. * config/arm/iterators.md (mve_insn): Add vcadd, vhcadd. (isu): Add UNSPEC_VCADD90, UNSPEC_VCADD270, VCADDQ_ROT270_M_U, VCADDQ_ROT270_M_S, VCADDQ_ROT90_M_U, VCADDQ_ROT90_M_S, VHCADDQ_ROT90_M_S, VHCADDQ_ROT270_M_S, VHCADDQ_ROT90_S, VHCADDQ_ROT270_S. (rot): Add VCADDQ_ROT90_M_F, VCADDQ_ROT90_M_S, VCADDQ_ROT90_M_U, VCADDQ_ROT270_M_F, VCADDQ_ROT270_M_S, VCADDQ_ROT270_M_U, VHCADDQ_ROT90_S, VHCADDQ_ROT270_S, VHCADDQ_ROT90_M_S, VHCADDQ_ROT270_M_S. (mve_rot): Add VCADDQ_ROT90_M_F, VCADDQ_ROT90_M_S, VCADDQ_ROT90_M_U, VCADDQ_ROT270_M_F, VCADDQ_ROT270_M_S, VCADDQ_ROT270_M_U, VHCADDQ_ROT90_S, VHCADDQ_ROT270_S, VHCADDQ_ROT90_M_S, VHCADDQ_ROT270_M_S. (supf): Add VHCADDQ_ROT90_M_S, VHCADDQ_ROT270_M_S, VHCADDQ_ROT90_S, VHCADDQ_ROT270_S, UNSPEC_VCADD90, UNSPEC_VCADD270. (VCADDQ_ROT270_M): Delete. (VCADDQ_M_F VxCADDQ VxCADDQ_M): New. (VCADDQ_ROT90_M): Delete. * config/arm/mve.md (mve_vcaddq) (mve_vhcaddq_rot270_s, mve_vhcaddq_rot90_s): Merge into ... (@mve_q_): ... this. (mve_vcaddq): Rename into ... (@mve_q_f): ... this (mve_vcaddq_rot270_m_) (mve_vcaddq_rot90_m_, mve_vhcaddq_rot270_m_s) (mve_vhcaddq_rot90_m_s): Merge into ... (@mve_q_m_): ... this. (mve_vcaddq_rot270_m_f, mve_vcaddq_rot90_m_f): Merge into ... (@mve_q_m_f): ... this. 2023-07-14 Roger Sayle PR target/110588 * config/i386/i386.md (*bt_setcqi): Prefer string form preparation statement over braces for a single statement. (*bt_setncqi): Likewise. (*bt_setncqi_2): New define_insn_and_split. 2023-07-14 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_move): Generalize special case inserting of 64-bit values into a TImode register, to handle both DImode and DFmode using either *insvti_lowpart_1 or *isnvti_highpart_1. 2023-07-14 Uros Bizjak PR target/110206 * fwprop.cc (contains_paradoxical_subreg_p): Move to ... * rtlanal.cc (contains_paradoxical_subreg_p): ... here. * rtlanal.h (contains_paradoxical_subreg_p): Add prototype. * cprop.cc (try_replace_reg): Do not set REG_EQUAL note when the original source contains a paradoxical subreg. 2023-07-14 Jan Hubicka * passes.cc (execute_function_todo): Remove TODO_rebuild_frequencies * passes.def: Add rebuild_frequencies pass. * predict.cc (estimate_bb_frequencies): Drop force parameter. (tree_estimate_probability): Update call of estimate_bb_frequencies. (rebuild_frequencies): Turn into a pass; verify CFG profile consistency first and do not rebuild if not necessary. (class pass_rebuild_frequencies): New. (make_pass_rebuild_frequencies): New. * profile-count.h: Add profile_count::very_large_p. * tree-inline.cc (optimize_inline_calls): Do not return TODO_rebuild_frequencies * tree-pass.h (TODO_rebuild_frequencies): Remove. (make_pass_rebuild_frequencies): Declare. 2023-07-14 Juzhe-Zhong * config/riscv/autovec.md (cond_len_fma): New pattern. * config/riscv/riscv-protos.h (enum insn_type): New enum. (expand_cond_len_ternop): New function. * config/riscv/riscv-v.cc (emit_nonvlmax_fp_ternary_tu_insn): Ditto. (expand_cond_len_ternop): Ditto. 2023-07-14 Jose E. Marchesi PR target/110657 * config/bpf/bpf.md: Enable instruction scheduling. 2023-07-14 Tamar Christina PR tree-optimization/109154 * tree-if-conv.cc (INCLUDE_ALGORITHM): Include. (struct bb_predicate): Add no_predicate_stmts. (set_bb_predicate): Increase predicate count. (set_bb_predicate_gimplified_stmts): Conditionally initialize no_predicate_stmts. (get_bb_num_predicate_stmts): New. (init_bb_predicate): Initialzie no_predicate_stmts. (release_bb_predicate): Cleanup no_predicate_stmts. (insert_gimplified_predicates): Preserve no_predicate_stmts. 2023-07-14 Tamar Christina PR tree-optimization/109154 * tree-if-conv.cc (gen_simplified_condition, gen_phi_nest_statement): New. (gen_phi_arg_condition, predicate_scalar_phi): Use it. 2023-07-14 Richard Biener * gimple.h (gimple_phi_arg): New const overload. (gimple_phi_arg_def): Make gimple arg const. (gimple_phi_arg_def_from_edge): New inline function. * tree-phinodes.h (gimple_phi_arg_imm_use_ptr_from_edge): Likewise. * tree-ssa-operands.h (PHI_ARG_DEF_FROM_EDGE): Direct to new inline function. (PHI_ARG_DEF_PTR_FROM_EDGE): Likewise. 2023-07-14 Monk Chiang * common/config/riscv/riscv-common.cc: (riscv_implied_info): Add zihintntl item. (riscv_ext_version_table): Ditto. (riscv_ext_flag_table): Ditto. * config/riscv/riscv-opts.h (MASK_ZIHINTNTL): New macro. (TARGET_ZIHINTNTL): Ditto. 2023-07-14 Die Li * config/riscv/riscv.md: Remove redundant portion in and3. 2023-07-14 Oleg Endo PR target/101469 * config/sh/sh.md (peephole2): Handle case where eliminated reg is also used by the address of the following memory operand. 2023-07-13 Mikael Pettersson PR target/107841 * config/pdp11/pdp11.cc (pdp11_expand_epilogue): Also deallocate alloca-only frame. 2023-07-13 Iain Sandoe PR target/110624 * config/darwin.h (DARWIN_PLATFORM_ID): New. (LINK_COMMAND_A): Use DARWIN_PLATFORM_ID to pass OS, OS version and SDK data to the static linker. 2023-07-13 Carl Love * config/rs6000/rs6000-builtins.def (__builtin_set_fpscr_rn): Update built-in definition return type. * config/rs6000/rs6000-c.cc (rs6000_target_modify_macros): Add check, define __SET_FPSCR_RN_RETURNS_FPSCR__ macro. * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Add return argument to return FPSCR fields. * doc/extend.texi (__builtin_set_fpscr_rn): Update description for the return value. Add description for __SET_FPSCR_RN_RETURNS_FPSCR__ macro. 2023-07-13 Uros Bizjak PR target/106966 * config/alpha/alpha.cc (alpha_emit_set_long_const): Always use DImode when constructing long const. 2023-07-13 Uros Bizjak * haifa-sched.cc: Change TRUE/FALSE to true/false. * ira.cc: Ditto. * lra-assigns.cc: Ditto. * lra-constraints.cc: Ditto. * sel-sched.cc: Ditto. 2023-07-13 Andrew Pinski PR tree-optimization/110293 PR tree-optimization/110539 * match.pd: Expand the `x != (typeof x)(x == 0)` pattern to handle where the inner and outer comparsions are either `!=` or `==` and handle other constants than 0. 2023-07-13 Vladimir N. Makarov PR middle-end/109520 * lra-int.h (lra_insn_recog_data): Add member asm_reloads_num. (lra_asm_insn_error): New prototype. * lra.cc: Include rtl_error.h. (lra_set_insn_recog_data): Initialize asm_reloads_num. (lra_asm_insn_error): New func whose code is taken from ... * lra-assigns.cc (lra_split_hard_reg_for): ... here. Use lra_asm_insn_error. * lra-constraints.cc (curr_insn_transform): Check reloads nummber for asm. 2023-07-13 Ju-Zhe Zhong * genmatch.cc (commutative_op): Add COND_LEN_* * internal-fn.cc (first_commutative_argument): Ditto. (CASE): Ditto. (get_unconditional_internal_fn): Ditto. (can_interpret_as_conditional_op_p): Ditto. (internal_fn_len_index): Ditto. * internal-fn.h (can_interpret_as_conditional_op_p): Ditt. * tree-ssa-math-opts.cc (convert_mult_to_fma_1): Ditto. (convert_mult_to_fma): Ditto. (math_opts_dom_walker::after_dom_children): Ditto. 2023-07-13 Pan Li * config/riscv/riscv.cc (vxrm_rtx): New static var. (frm_rtx): Ditto. (global_state_unknown_p): Removed. (riscv_entity_mode_after): Removed. (asm_insn_p): New function. (vxrm_unknown_p): New function for fixed-point. (riscv_vxrm_mode_after): Ditto. (frm_unknown_dynamic_p): New function for floating-point. (riscv_frm_mode_after): Ditto. (riscv_mode_after): Leverage new functions. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vect_model_load_cost): Remove. (vectorizable_load): Adjust the cost handling on VMAT_CONTIGUOUS without calling vect_model_load_cost. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vect_model_load_cost): Assert this function only handle memory_access_type VMAT_CONTIGUOUS, remove some VMAT_CONTIGUOUS_PERMUTE related handlings. (vectorizable_load): Adjust the cost handling on VMAT_CONTIGUOUS_PERMUTE without calling vect_model_load_cost. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vect_model_load_cost): Assert it won't get VMAT_CONTIGUOUS_REVERSE any more. (vectorizable_load): Adjust the costing handling on VMAT_CONTIGUOUS_REVERSE without calling vect_model_load_cost. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Adjust the cost handling on VMAT_LOAD_STORE_LANES without calling vect_model_load_cost. (vectorizable_load): Remove VMAT_LOAD_STORE_LANES related handling and assert it will never get VMAT_LOAD_STORE_LANES. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Adjust the cost handling on VMAT_GATHER_SCATTER without calling vect_model_load_cost. (vect_model_load_cost): Adjut the assertion on VMAT_GATHER_SCATTER, remove VMAT_GATHER_SCATTER related handlings and the related parameter gs_info. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Adjust the cost handling on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP without calling vect_model_load_cost. (vect_model_load_cost): Assert it won't get VMAT_ELEMENTWISE and VMAT_STRIDED_SLP any more, and remove their related handlings. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (hoist_defs_of_uses): Add one argument HOIST_P. (vectorizable_load): Adjust the handling on VMAT_INVARIANT to respect hoisting decision and without calling vect_model_load_cost. (vect_model_load_cost): Assert it won't get VMAT_INVARIANT any more and remove VMAT_INVARIANT related handlings. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vect_build_gather_load_calls): Add the handlings on costing with one extra argument cost_vec. (vectorizable_load): Adjust the call to vect_build_gather_load_calls. (vect_model_load_cost): Assert it won't get VMAT_GATHER_SCATTER with gs_info.decl set any more. 2023-07-13 Kewen Lin * tree-vect-stmts.cc (vectorizable_load): Move and duplicate the call to vect_model_load_cost down to some different transform paths according to the handlings of different vect_memory_access_types. 2023-07-13 Kewen Lin * tree.h (wi::from_mpz): Hide from GENERATOR_FILE. 2023-07-13 Ju-Zhe Zhong * config/riscv/autovec.md (len_mask_gather_load): New pattern. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_gather_load): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. (len_mask_scatter_store): Ditto. * config/riscv/predicates.md (const_1_operand): New predicate. (vector_gs_scale_operand_16): Ditto. (vector_gs_scale_operand_32): Ditto. (vector_gs_scale_operand_64): Ditto. (vector_gs_extension_operand): Ditto. (vector_gs_scale_operand_16_rv32): Ditto. (vector_gs_scale_operand_32_rv32): Ditto. * config/riscv/riscv-protos.h (enum insn_type): Add gather/scatter. (expand_gather_scatter): New function. * config/riscv/riscv-v.cc (gen_const_vector_dup): Add gather/scatter. (emit_vlmax_masked_store_insn): New function. (emit_nonvlmax_masked_store_insn): Ditto. (modulo_sel_indices): Ditto. (expand_vec_perm): Fix SLP for gather/scatter. (prepare_gather_scatter): New function. (expand_gather_scatter): Ditto. * config/riscv/riscv.cc (riscv_legitimize_move): Fix bug of (subreg:SI (DI CONST_POLY_INT)). * config/riscv/vector-iterators.md: Add gather/scatter. * config/riscv/vector.md (vec_duplicate): Use "@" instead. (@vec_duplicate): Ditto. (@pred_indexed_store): Fix name. (@pred_indexed_store): Ditto. 2023-07-12 Juzhe-Zhong * config/riscv/autovec.md (cond_len_): New pattern. * config/riscv/riscv-protos.h (enum insn_type): New enum. (expand_cond_len_binop): New function. * config/riscv/riscv-v.cc (emit_nonvlmax_tu_insn): Ditto. (emit_nonvlmax_fp_tu_insn): Ditto. (need_fp_rounding_p): Ditto. (expand_cond_len_binop): Ditto. * config/riscv/riscv.cc (riscv_preferred_else_value): Ditto. (TARGET_PREFERRED_ELSE_VALUE): New target hook. 2023-07-12 Jan Hubicka * tree-cfg.cc (gimple_duplicate_sese_region): Rename to ... (gimple_duplicate_seme_region): ... this; break out profile updating code to ... * tree-ssa-loop-ch.cc (update_profile_after_ch): ... here. (ch_base::copy_headers): Update. * tree-cfg.h (gimple_duplicate_sese_region): Rename to ... (gimple_duplicate_seme_region): ... this. 2023-07-12 Aldy Hernandez PR tree-optimization/107043 * range-op.cc (operator_bitwise_and::op1_range): Update bitmask. 2023-07-12 Aldy Hernandez PR tree-optimization/107053 * gimple-range-op.cc (cfn_popcount): Use known set bits. 2023-07-12 Uros Bizjak * ira.cc (equiv_init_varies_p): Change return type from int to bool and adjust function body accordingly. (equiv_init_movable_p): Ditto. (memref_used_between_p): Ditto. * lra-constraints.cc (valid_address_p): Ditto. 2023-07-12 Aldy Hernandez * range-op.cc (irange_to_masked_value): Remove. (update_known_bitmask): Update irange value/mask pair instead of only updating nonzero bits. 2023-07-12 Jan Hubicka * tree-cfg.cc (gimple_duplicate_sese_region): Add ORIG_ELIMINATED_EDGES parameter and rewrite profile updating code to handle edges elimination. * tree-cfg.h (gimple_duplicate_sese_region): Update prototpe. * tree-ssa-loop-ch.cc (loop_invariant_op_p): New function. (loop_iv_derived_p): New function. (should_duplicate_loop_header_p): Track invariant exit edges; fix handling of PHIs and propagation of IV derived variables. (ch_base::copy_headers): Pass around the invariant edges hash set. 2023-07-12 Uros Bizjak * ifcvt.cc (cond_exec_changed_p): Change variable to bool. (last_active_insn): Change "skip_use_p" function argument to bool. (noce_operand_ok): Change return type from int to bool. (find_cond_trap): Ditto. (block_jumps_and_fallthru_p): Change "fallthru_p" and "jump_p" variables to bool. (noce_find_if_block): Change return type from int to bool. (cond_exec_find_if_block): Ditto. (find_if_case_1): Ditto. (find_if_case_2): Ditto. (dead_or_predicable): Ditto. Change "reversep" function arg to bool. (block_jumps_and_fallthru): Rename from block_jumps_and_fallthru_p. (cond_exec_process_insns): Change return type from int to bool. Change "mod_ok" function arg to bool. (cond_exec_process_if_block): Change return type from int to bool. Change "do_multiple_p" function arg to bool. Change "then_mod_ok" variable to bool. (noce_emit_store_flag): Change return type from int to bool. Change "reversep" function arg to bool. Change "cond_complex" variable to bool. (noce_try_move): Change return type from int to bool. (noce_try_ifelse_collapse): Ditto. (noce_try_store_flag): Ditto. Change "reversep" variable to bool. (noce_try_addcc): Change return type from int to bool. Change "subtract" variable to bool. (noce_try_store_flag_constants): Change return type from int to bool. (noce_try_store_flag_mask): Ditto. Change "reversep" variable to bool. (noce_try_cmove): Change return type from int to bool. (noce_try_cmove_arith): Ditto. Change "is_mem" variable to bool. (noce_try_minmax): Change return type from int to bool. Change "unsignedp" variable to bool. (noce_try_abs): Change return type from int to bool. Change "negate" variable to bool. (noce_try_sign_mask): Change return type from int to bool. (noce_try_move): Ditto. (noce_try_store_flag_constants): Ditto. (noce_try_cmove): Ditto. (noce_try_cmove_arith): Ditto. (noce_try_minmax): Ditto. Change "unsignedp" variable to bool. (noce_try_bitop): Change return type from int to bool. (noce_operand_ok): Ditto. (noce_convert_multiple_sets): Ditto. (noce_convert_multiple_sets_1): Ditto. (noce_process_if_block): Ditto. (check_cond_move_block): Ditto. (cond_move_process_if_block): Ditto. Change "success_p" variable to bool. (rest_of_handle_if_conversion): Change return type to void. 2023-07-12 Ju-Zhe Zhong * internal-fn.cc (FOR_EACH_CODE_MAPPING): Adapt for COND_LEN_* support. (CASE): Ditto. (get_conditional_len_internal_fn): New function. * internal-fn.h (get_conditional_len_internal_fn): Ditto. * tree-vect-stmts.cc (vectorizable_operation): Adapt for COND_LEN_* support. 2023-07-12 Roger Sayle PR target/91681 * config/i386/i386.md (*add3_doubleword_concat_zext): Typo. 2023-07-12 Roger Sayle PR target/91681 * config/i386/i386.md (*add3_doubleword_concat_zext): New define_insn_and_split derived from *add3_doubleword_concat and *add3_doubleword_zext. 2023-07-12 Roger Sayle PR target/110598 * config/i386/i386.md (peephole2): Check !reg_mentioned_p when optimizing rega = 0; rega op= regb for op in [XOR,IOR,PLUS]. (peephole2): Simplify rega = 0; rega op= rega cases. 2023-07-12 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_int_compare): If testing a TImode SUBREG of a 128-bit vector register against zero, use a PTEST instruction instead of first moving it to a pair of scalar registers. 2023-07-12 Robin Dapp * genopinit.cc (main): Adjust maximal number of optabs and machine modes. * gensupport.cc (find_optab): Shift optab by 20 and mode by 10 bits. * optabs-query.h (optab_handler): Ditto. (convert_optab_handler): Ditto. 2023-07-12 Richard Biener PR tree-optimization/110630 * tree-vect-slp.cc (vect_add_slp_permutation): New offset parameter, honor that for the extract code generation. (vectorizable_slp_permutation_1): Handle offsetted identities. 2023-07-12 Ju-Zhe Zhong * config/riscv/autovec.md (smul3_highpart): New pattern. (umul3_highpart): Ditto. 2023-07-12 Jan Beulich * config/i386/i386.md (extendbfsf2_1): Add new AVX512F alternative. Adjust original last alternative's "prefix" attribute to maybe_evex. 2023-07-12 Jan Beulich * config/i386/sse.md (vec_dupv4sf): Make first alternative use vbroadcastss for AVX2. New AVX512F alternative. (*vec_dupv4si): New AVX2 and AVX512F alternatives using vpbroadcastd. Replace sselog1 by sseshuf1 in "type" attribute. 2023-07-12 Christoph Müllner * config/riscv/peephole.md: Remove XThead* peephole passes. * config/riscv/thead.md: Include thead-peephole.md. * config/riscv/thead-peephole.md: New file. 2023-07-12 Christoph Müllner * config/riscv/riscv-protos.h (riscv_regno_ok_for_index_p): New prototype. (riscv_index_reg_class): Likewise. * config/riscv/riscv.cc (riscv_regno_ok_for_index_p): New function. (riscv_index_reg_class): New function. * config/riscv/riscv.h (INDEX_REG_CLASS): Call new function riscv_index_reg_class(). (REGNO_OK_FOR_INDEX_P): Call new function riscv_regno_ok_for_index_p(). 2023-07-12 Christoph Müllner * config/riscv/riscv-protos.h (enum riscv_address_type): New location of type definition. (struct riscv_address_info): Likewise. * config/riscv/riscv.cc (enum riscv_address_type): Old location of type definition. (struct riscv_address_info): Likewise. 2023-07-12 Christoph Müllner * config/riscv/riscv.h (Xmode): New macro. 2023-07-12 Christoph Müllner * config/riscv/riscv.cc (riscv_print_operand_address): Use output_addr_const rather than riscv_print_operand. 2023-07-12 Christoph Müllner * config/riscv/thead.md: Adjust constraints of th_addsl. 2023-07-12 Christoph Müllner * config/riscv/thead.cc (th_mempair_operands_p): Fix documentation of th_mempair_order_operands(). 2023-07-12 Christoph Müllner * config/riscv/thead.cc (th_mempair_save_regs): Emit REG_FRAME_RELATED_EXPR notes in prologue. 2023-07-12 Christoph Müllner * config/riscv/riscv.md: No base-ISA extension splitter for XThead*. * config/riscv/thead.md (*extend2_th_ext): New XThead extension INSN. (*zero_extendsidi2_th_extu): New XThead extension INSN. (*zero_extendhi2_th_extu): New XThead extension INSN. 2023-07-12 liuhongt PR target/110438 PR target/110202 * config/i386/predicates.md (int_float_vector_all_ones_operand): New predicate. * config/i386/sse.md (*vmov_constm1_pternlog_false_dep): New define_insn. (*_cvtmask2_pternlog_false_dep): Ditto. (*_cvtmask2_pternlog_false_dep): Ditto. (*_cvtmask2): Adjust to define_insn_and_split to avoid false dependence. (*_cvtmask2): Ditto. (one_cmpl2): Adjust constraint of operands 1 to '0' to avoid false dependence. (*andnot3): Ditto. (iornot3): Ditto. (*3): Ditto. 2023-07-12 Mo, Zewei * common/config/i386/cpuinfo.h (get_intel_cpu): Handle Granite Rapids D. * common/config/i386/i386-common.cc: (processor_alias_table): Add graniterapids-d. * common/config/i386/i386-cpuinfo.h (enum processor_subtypes): Add INTEL_COREI7_GRANITERAPIDS_D. * config.gcc: Add -march=graniterapids-d. * config/i386/driver-i386.cc (host_detect_local_cpu): Handle graniterapids-d. * config/i386/i386.h: (PTA_GRANITERAPIDS_D): New. * doc/extend.texi: Add graniterapids-d. * doc/invoke.texi: Ditto. 2023-07-12 Haochen Jiang * config/i386/i386-builtins.cc (ix86_init_mmx_sse_builtins): Add OPTION_MASK_ISA_AVX512VL. * config/i386/i386-expand.cc (ix86_check_builtin_isa_match): Ditto. 2023-07-11 Ju-Zhe Zhong * config/riscv/riscv-protos.h (enum insn_type): Add vcompress optimization. * config/riscv/riscv-v.cc (emit_vlmax_compress_insn): Ditto. (shuffle_compress_patterns): Ditto. (expand_vec_perm_const_1): Ditto. 2023-07-11 Uros Bizjak * cfghooks.cc (verify_flow_info): Change "err" variable to bool. * cfghooks.h (struct cfg_hooks): Change return type of verify_flow_info from integer to bool. * cfgrtl.cc (can_delete_note_p): Change return type from int to bool. (can_delete_label_p): Ditto. (rtl_verify_flow_info): Change return type from int to bool and adjust function body accordingly. Change "err" variable to bool. (rtl_verify_flow_info_1): Ditto. (free_bb_for_insn): Change return type to void. (rtl_merge_blocks): Change "b_empty" variable to bool. (try_redirect_by_replacing_jump): Change "fallthru" variable to bool. (verify_hot_cold_block_grouping): Change return type from int to bool. Change "err" variable to bool. (rtl_verify_edges): Ditto. (rtl_verify_bb_insns): Ditto. (rtl_verify_bb_pointers): Ditto. (rtl_verify_bb_insn_chain): Ditto. (rtl_verify_fallthru): Ditto. (rtl_verify_bb_layout): Ditto. (purge_all_dead_edges): Change "purged" variable to bool. * cfgrtl.h (free_bb_for_insn): Change return type from int to void. * postreload-gcse.cc (expr_hasher::equal): Change "equiv_p" to bool. (load_killed_in_block_p): Change return type from int to bool and adjust function body accordingly. (oprs_unchanged_p): Return true/false. (rest_of_handle_gcse2): Change return type to void. * tree-cfg.cc (gimple_verify_flow_info): Change return type from int to bool. Change "err" variable to bool. 2023-07-11 Gaius Mulley * doc/gm2.texi (-Wuninit-variable-checking=) New item. 2023-07-11 Ju-Zhe Zhong * doc/md.texi: Add COND_LEN_* operations for loop control with length. * internal-fn.cc (cond_len_unary_direct): Ditto. (cond_len_binary_direct): Ditto. (cond_len_ternary_direct): Ditto. (expand_cond_len_unary_optab_fn): Ditto. (expand_cond_len_binary_optab_fn): Ditto. (expand_cond_len_ternary_optab_fn): Ditto. (direct_cond_len_unary_optab_supported_p): Ditto. (direct_cond_len_binary_optab_supported_p): Ditto. (direct_cond_len_ternary_optab_supported_p): Ditto. * internal-fn.def (COND_LEN_ADD): Ditto. (COND_LEN_SUB): Ditto. (COND_LEN_MUL): Ditto. (COND_LEN_DIV): Ditto. (COND_LEN_MOD): Ditto. (COND_LEN_RDIV): Ditto. (COND_LEN_MIN): Ditto. (COND_LEN_MAX): Ditto. (COND_LEN_FMIN): Ditto. (COND_LEN_FMAX): Ditto. (COND_LEN_AND): Ditto. (COND_LEN_IOR): Ditto. (COND_LEN_XOR): Ditto. (COND_LEN_SHL): Ditto. (COND_LEN_SHR): Ditto. (COND_LEN_FMA): Ditto. (COND_LEN_FMS): Ditto. (COND_LEN_FNMA): Ditto. (COND_LEN_FNMS): Ditto. (COND_LEN_NEG): Ditto. * optabs.def (OPTAB_D): Ditto. 2023-07-11 Richard Biener PR tree-optimization/110614 * tree-vect-data-refs.cc (vect_supportable_dr_alignment): SLP splats are not suitable for re-align ops. 2023-07-10 Peter Bergner * config/rs6000/predicates.md (quad_memory_operand): Remove redundant MEM_P usage. (vsx_quad_dform_memory_operand): Likewise. 2023-07-10 Uros Bizjak * reorg.cc (stop_search_p): Change return type from int to bool and adjust function body accordingly. (resource_conflicts_p): Ditto. (insn_references_resource_p): Change return type from int to bool. (insn_sets_resource_p): Ditto. (redirect_with_delay_slots_safe_p): Ditto. (condition_dominates_p): Change return type from int to bool and adjust function body accordingly. (redirect_with_delay_list_safe_p): Ditto. (check_annul_list_true_false): Ditto. Change "annul_true_p" function argument to bool. (steal_delay_list_from_target): Change "pannul_p" function argument to bool pointer. Change "must_annul" and "used_annul" variables from int to bool. (steal_delay_list_from_fallthrough): Ditto. (own_thread_p): Change return type from int to bool and adjust function body accordingly. Change "allow_fallthrough" function argument to bool. (reorg_redirect_jump): Change return type from int to bool. (fill_simple_delay_slots): Change "non_jumps_p" function argument from int to bool. Change "maybe_never" varible to bool. (fill_slots_from_thread): Change "likely", "thread_if_true" and "own_thread" function arguments to bool. Change "lose" and "must_annul" variables to bool. (delete_from_delay_slot): Change "had_barrier" variable to bool. (try_merge_delay_insns): Change "annul_p" variable to bool. (fill_eager_delay_slots): Change "own_target" and "own_fallthrouhg" variables to bool. (rest_of_handle_delay_slots): Change return type from int to void and adjust function body accordingly. 2023-07-10 Kito Cheng * doc/extend.texi (RISC-V Operand Modifiers): New. 2023-07-10 Ju-Zhe Zhong * config/riscv/riscv-vsetvl.cc (add_label_notes): Remove it. (insert_insn_end_basic_block): Ditto. (pass_vsetvl::commit_vsetvls): Adapt for new helper function. * gcse.cc (insert_insn_end_basic_block): Export as global function. * gcse.h (insert_insn_end_basic_block): Ditto. 2023-07-10 Christophe Lyon PR target/110268 * config/arm/arm-builtins.cc (arm_init_mve_builtins): Handle LTO. (arm_builtin_decl): Hahndle MVE builtins. * config/arm/arm-mve-builtins.cc (builtin_decl): New function. (add_unique_function): Fix handling of __ARM_MVE_PRESERVE_USER_NAMESPACE. (add_overloaded_function): Likewise. * config/arm/arm-protos.h (builtin_decl): New declaration. 2023-07-10 Christophe Lyon * doc/sourcebuild.texi (arm_v8_1m_main_cde_mve_fp): Document. 2023-07-10 Xi Ruoyao PR tree-optimization/110557 * tree-vect-patterns.cc (vect_recog_bitfield_ref_pattern): Ensure the output sign-extended if necessary. 2023-07-10 Roger Sayle * config/i386/i386.md (peephole2): Transform xchg insn with a REG_UNUSED note to a (simple) move. (*insvti_lowpart_1): New define_insn_and_split. (*insvdi_lowpart_1): Likewise. 2023-07-10 Roger Sayle * config/i386/i386-features.cc (compute_convert_gain): Tweak gains/costs for ROTATE/ROTATERT by integer constant on AVX512VL. (general_scalar_chain::convert_rotate): On TARGET_AVX512F generate avx512vl_rolv2di or avx412vl_rolv4si when appropriate. 2023-07-10 liuhongt PR target/110170 * config/i386/i386.md (*ieee_max3_1): New pre_reload splitter to detect fp max pattern. (*ieee_min3_1): Ditto, but for fp min pattern. 2023-07-09 Jan Hubicka * cfg.cc (check_bb_profile): Dump counts with relative frequency. (dump_edge_info): Likewise. (dump_bb_info): Likewise. * profile-count.cc (profile_count::dump): Add comma between quality and freq. 2023-07-08 Jan Hubicka PR tree-optimization/110600 * cfgloopmanip.cc (scale_loop_profile): Add mising profile_dump check. 2023-07-08 Jan Hubicka PR middle-end/110590 * cfgloopmanip.cc (scale_loop_profile): Avoid scaling exits within inner loops and be more careful about inconsistent profiles. (duplicate_loop_body_to_header_edge): Fix profile update when eliminated exit is followed by other exit. 2023-07-08 Uros Bizjak * cprop.cc (reg_available_p): Change return type from int to bool. (reg_not_set_p): Ditto. (try_replace_reg): Ditto. Change "success" variable to bool. (cprop_jump): Change return type from int to void and adjust function body accordingly. (constprop_register): Ditto. (cprop_insn): Ditto. Change "changed" variable to bool. (local_cprop_pass): Change return type from int to void and adjust function body accordingly. (bypass_block): Ditto. Change "change", "may_be_loop_header" and "removed_p" variables to bool. (bypass_conditional_jumps): Change return type from int to void and adjust function body accordingly. Change "changed" variable to bool. (one_cprop_pass): Ditto. 2023-07-08 Uros Bizjak * gcse.cc (expr_equiv_p): Change return type from int to bool. (oprs_unchanged_p): Change return type from int to void and adjust function body accordingly. (oprs_anticipatable_p): Ditto. (oprs_available_p): Ditto. (insert_expr_in_table): Ditto. Change "antic_p" and "avail_p" arguments to bool. Change "found" variable to bool. (load_killed_in_block_p): Change return type from int to void and adjust function body accordingly. Change "avail_p" argument to bool. (pre_expr_reaches_here_p): Change return type from int to void and adjust function body accordingly. (pre_delete): Ditto. Change "changed" variable to bool. (pre_gcse): Change return type from int to void and adjust function body accordingly. Change "did_insert" and "changed" variables to bool. (one_pre_gcse_pass): Change return type from int to void and adjust function body accordingly. Change "changed" variable to bool. (should_hoist_expr_to_dom): Change return type from int to void and adjust function body accordingly. Change "visited_allocated_locally" variable to bool. (hoist_code): Change return type from int to void and adjust function body accordingly. Change "changed" variable to bool. (one_code_hoisting_pass): Ditto. (pre_edge_insert): Change return type from int to void and adjust function body accordingly. Change "did_insert" variable to bool. (pre_expr_reaches_here_p_work): Change return type from int to void and adjust function body accordingly. (simple_mem): Ditto. (want_to_gcse_p): Change return type from int to void and adjust function body accordingly. (can_assign_to_reg_without_clobbers_p): Update function body for bool return type. (hash_scan_set): Change "antic_p" and "avail_p" variables to bool. (pre_insert_copies): Change "added_copy" variable to bool. 2023-07-08 Jonathan Wakely PR c++/110595 PR c++/110596 * doc/invoke.texi (Warning Options): Fix typos. 2023-07-07 Jan Hubicka * profile-count.cc (profile_count::dump): Add FUN parameter; print relative frequency. (profile_count::debug): Update. * profile-count.h (profile_count::dump): Update prototype. 2023-07-07 Roger Sayle PR target/43644 PR target/110533 * config/i386/i386-expand.cc (ix86_expand_move): Convert SETs of TImode destinations from paradoxical SUBREGs (setting the lowpart) into explicit zero extensions. Use *insvti_highpart_1 instruction to set the highpart of a TImode destination. 2023-07-07 Jan Hubicka * predict.cc (force_edge_cold): Use set_edge_probability_and_rescale_others; improve dumps. 2023-07-07 Jan Hubicka * cfgloopmanip.cc (scale_loop_profile): Fix computation of count_in and scaling blocks after exit. * tree-vect-loop-manip.cc (vect_do_peeling): Scale loop profile of the epilogue if bound is known. 2023-07-07 Juergen Christ * config/s390/s390.cc (vec_init): Fix default case 2023-07-07 Vladimir N. Makarov * lra-assigns.cc (assign_by_spills): Add reload insns involving reload pseudos with non-refined class to be processed on the next sub-pass. * lra-constraints.cc (enough_allocatable_hard_regs_p): New func. (in_class_p): Use it. (print_curr_insn_alt): New func. (process_alt_operands): Use it. Improve debug info. (curr_insn_transform): Use print_curr_insn_alt. Refine reload pseudo class if it is not refined yet. 2023-07-07 Aldy Hernandez * value-range.cc (irange::get_bitmask_from_range): Return all the known bits for a singleton. (irange::set_range_from_bitmask): Set a range of a singleton when all bits are known. 2023-07-07 Aldy Hernandez * value-range.cc (irange::intersect): Leave normalization to caller. 2023-07-07 Aldy Hernandez * data-streamer-in.cc (streamer_read_value_range): Adjust for value/mask. * data-streamer-out.cc (streamer_write_vrange): Same. * range-op.cc (operator_cast::fold_range): Same. * value-range-pretty-print.cc (vrange_printer::print_irange_bitmasks): Same. * value-range-storage.cc (irange_storage::write_lengths_address): Same. (irange_storage::set_irange): Same. (irange_storage::get_irange): Same. (irange_storage::size): Same. (irange_storage::dump): Same. * value-range-storage.h: Same. * value-range.cc (debug): New. (irange_bitmask::dump): New. (add_vrange): Adjust for value/mask. (irange::operator=): Same. (irange::set): Same. (irange::verify_range): Same. (irange::operator==): Same. (irange::contains_p): Same. (irange::irange_single_pair_union): Same. (irange::union_): Same. (irange::intersect): Same. (irange::invert): Same. (irange::get_nonzero_bits_from_range): Rename to... (irange::get_bitmask_from_range): ...this. (irange::set_range_from_nonzero_bits): Rename to... (irange::set_range_from_bitmask): ...this. (irange::set_nonzero_bits): Rename to... (irange::update_bitmask): ...this. (irange::get_nonzero_bits): Rename to... (irange::get_bitmask): ...this. (irange::intersect_nonzero_bits): Rename to... (irange::intersect_bitmask): ...this. (irange::union_nonzero_bits): Rename to... (irange::union_bitmask): ...this. (irange_bitmask::verify_mask): New. * value-range.h (class irange_bitmask): New. (irange_bitmask::set_unknown): New. (irange_bitmask::unknown_p): New. (irange_bitmask::irange_bitmask): New. (irange_bitmask::get_precision): New. (irange_bitmask::get_nonzero_bits): New. (irange_bitmask::set_nonzero_bits): New. (irange_bitmask::operator==): New. (irange_bitmask::union_): New. (irange_bitmask::intersect): New. (class irange): Friend vrange_printer. (irange::varying_compatible_p): Adjust for bitmask. (irange::set_varying): Same. (irange::set_nonzero): Same. 2023-07-07 Jan Beulich * config/i386/sse.md (*vec_extractv2ti): Drop g modifiers. 2023-07-07 Jan Beulich * config/i386/sse.md (@vec_extract_hi_): Drop last alternative. Switch new last alternative's "isa" attribute to "avx512vl". (vec_extract_hi_v32qi): Likewise. 2023-07-07 Pan Li Robin Dapp * config/riscv/riscv.cc (riscv_emit_mode_set): Avoid emit insn when FRM_MODE_DYN. (riscv_mode_entry): Take FRM_MODE_DYN as entry mode. (riscv_mode_exit): Likewise for exit mode. (riscv_mode_needed): Likewise for needed mode. (riscv_mode_after): Likewise for after mode. 2023-07-07 Pan Li * config/riscv/vector.md: Fix typo. 2023-07-06 Jan Hubicka PR middle-end/25623 * tree-ssa-loop-ch.cc (ch_base::copy_headers): Scale loop frequency to maximal number of iterations determined. * tree-ssa-loop-ivcanon.cc (try_unroll_loop_completely): Likewise. 2023-07-06 Jan Hubicka * cfgloopmanip.cc (scale_loop_profile): Rewrite exit edge probability update to be safe on loops with subloops. Make bound parameter to be iteration bound. * tree-ssa-loop-ivcanon.cc (try_peel_loop): Update call of scale_loop_profile. * tree-vect-loop-manip.cc (vect_do_peeling): Likewise. 2023-07-06 Hao Liu OS PR tree-optimization/110449 * tree-vect-loop.cc (vectorizable_induction): use vec_n to replace vec_loop for the unrolled loop. 2023-07-06 Jan Hubicka * cfg.cc (set_edge_probability_and_rescale_others): New function. (update_bb_profile_for_threading): Use it; simplify the rest. * cfg.h (set_edge_probability_and_rescale_others): Declare. * profile-count.h (profile_probability::apply_scale): New. 2023-07-06 Claudiu Zissulescu * doc/extend.texi (ARC Built-in Functions): Update documentation with missing builtins. 2023-07-06 Richard Biener PR tree-optimization/110556 * tree-ssa-tail-merge.cc (gimple_equal_p): Check assign code and all operands of non-stores. 2023-07-06 Richard Biener PR tree-optimization/110563 * tree-vectorizer.h (vect_determine_partial_vectors_and_peeling): Remove second argument. * tree-vect-loop.cc (vect_determine_partial_vectors_and_peeling): Remove for_epilogue_p argument. Merge assert ... (vect_analyze_loop_2): ... with check done before determining partial vectors by moving it after. * tree-vect-loop-manip.cc (vect_do_peeling): Adjust. 2023-07-06 Thomas Schwinge * ggc-common.cc (gt_pch_note_reorder, gt_pch_save): Tighten up a few things re 'reorder' option and strings. * stringpool.cc (gt_pch_p_S): This is now 'gcc_unreachable'. 2023-07-06 Thomas Schwinge * gengtype-parse.cc: Clean up obsolete parametrized structs remnants. * gengtype.cc: Likewise. * gengtype.h: Likewise. 2023-07-06 Thomas Schwinge * gengtype.cc (struct walk_type_data): Remove 'needs_cast_p'. Adjust all users. 2023-07-06 Thomas Schwinge * gengtype-parse.cc (token_names): Add '"user"'. * gengtype.h (gty_token): Add 'UNUSED_PARAM_IS' for use with 'FIRST_TOKEN_WITH_VALUE'. 2023-07-06 Thomas Schwinge * doc/gty.texi (GTY Options) : Enhance. 2023-07-06 Thomas Schwinge * gengtype.cc (write_root, write_roots): Explicitly reject 'string_length' option. * doc/gty.texi (GTY Options) : Document. 2023-07-06 Thomas Schwinge * ggc-internal.h (ggc_pch_count_object, ggc_pch_alloc_object) (ggc_pch_write_object): Remove 'bool is_string' argument. * ggc-common.cc: Adjust. * ggc-page.cc: Likewise. 2023-07-06 Roger Sayle * dwarf2out.cc (mem_loc_descriptor): Handle COPYSIGN. 2023-07-06 Hongyu Wang * doc/extend.texi: Move x86 inlining rule to a new subsubsection and add description for inling of function with arch and tune attributes. 2023-07-06 Richard Biener PR tree-optimization/110515 * tree-ssa-pre.cc (compute_avail): Make code dealing with hoisting loads with different alias-sets more robust. 2023-07-06 Ju-Zhe Zhong * tree-vect-stmts.cc (vect_get_strided_load_store_ops): Fix ICE. 2023-07-06 Hongyu Wang * config/i386/i386.cc (ix86_can_inline_p): If callee has default arch=x86-64 and tune=generic, do not block the inlining to its caller. Also allow callee with different arch= to be inlined if it has always_inline attribute and it's ISA is subset of caller's. 2023-07-06 liuhongt * config/i386/i386.cc (ix86_rtx_costs): Adjust rtx_cost for DF/SFmode AND/IOR/XOR/ANDN operations. 2023-07-06 Andrew Pinski PR middle-end/110554 * tree-vect-generic.cc (expand_vector_condition): For comparisons, just build using boolean_type_node instead of the cond_type. For non-comparisons/non-scalar-bitmask, build a ` != 0` gimple that will feed into the COND_EXPR. 2023-07-06 liuhongt PR target/110170 * config/i386/i386.md (movdf_internal): Disparage slightly for 2 alternatives (r,v) and (v,r) by adding constraint modifier '?'. 2023-07-06 Jeevitha Palanisamy PR target/106907 * config/rs6000/rs6000.cc (rs6000_expand_vector_extract): Remove redundant initialization of new_addr. 2023-07-06 Hao Liu PR tree-optimization/110474 * tree-vect-loop.cc (vect_analyze_loop_2): unscale the VF by suggested unroll factor while selecting the epilog vect loop VF. 2023-07-05 Andrew MacLeod * gimple-range-gori.cc (compute_operand_range): Convert to a tail call. 2023-07-05 Andrew MacLeod * gimple-range-gori.cc (compute_operand_range): After calling compute_operand2_range, recursively call self if needed. (compute_operand2_range): Turn into a leaf function. (gori_compute::compute_operand1_and_operand2_range): Finish operand2 calculation. * gimple-range-gori.h (compute_operand2_range): Remove name param. 2023-07-05 Andrew MacLeod * gimple-range-gori.cc (compute_operand_range): After calling compute_operand1_range, recursively call self if needed. (compute_operand1_range): Turn into a leaf function. (gori_compute::compute_operand1_and_operand2_range): Finish operand1 calculation. * gimple-range-gori.h (compute_operand1_range): Remove name param. 2023-07-05 Andrew MacLeod * gimple-range-gori.cc (compute_operand_range): Check for operand interdependence when both op1 and op2 are computed. (compute_operand1_and_operand2_range): No checks required now. 2023-07-05 Andrew MacLeod * gimple-range-gori.cc (compute_operand_range): Check for a relation between op1 and op2 and use that instead. (compute_operand1_range): Don't look for a relation override. (compute_operand2_range): Ditto. 2023-07-05 Jonathan Wakely * doc/contrib.texi (Contributors): Update my entry. 2023-07-05 Filip Kastl * value-prof.cc (gimple_mod_subtract_transform): Correct edge prob calculation. 2023-07-05 Uros Bizjak * sched-int.h (struct haifa_sched_info): Change can_schedule_ready_p, scehdule_more_p and contributes_to_priority indirect frunction type from int to bool. (no_real_insns_p): Change return type from int to bool. (contributes_to_priority): Ditto. * haifa-sched.cc (no_real_insns_p): Change return type from int to bool and adjust function body accordingly. * modulo-sched.cc (try_scheduling_node_in_cycle): Change "success" variable type from int to bool. (ps_insn_advance_column): Change return type from int to bool. (ps_has_conflicts): Ditto. Change "has_conflicts" variable type from int to bool. * sched-deps.cc (deps_may_trap_p): Change return type from int to bool. (conditions_mutex_p): Ditto. * sched-ebb.cc (schedule_more_p): Ditto. (ebb_contributes_to_priority): Change return type from int to bool and adjust function body accordingly. * sched-rgn.cc (is_cfg_nonregular): Ditto. (check_live_1): Ditto. (is_pfree): Ditto. (find_conditional_protection): Ditto. (is_conditionally_protected): Ditto. (is_prisky): Ditto. (is_exception_free): Ditto. (haifa_find_rgns): Change "unreachable" and "too_large_failure" variables from int to bool. (extend_rgns): Change "rescan" variable from int to bool. (check_live): Change return type from int to bool and adjust function body accordingly. (can_schedule_ready_p): Ditto. (schedule_more_p): Ditto. (contributes_to_priority): Ditto. 2023-07-05 Robin Dapp * doc/md.texi: Document that vec_set and vec_extract must not fail. * gimple-isel.cc (gimple_expand_vec_set_expr): Rename this... (gimple_expand_vec_set_extract_expr): ...to this. (gimple_expand_vec_exprs): Call renamed function. * internal-fn.cc (vec_extract_direct): Add. (expand_vec_extract_optab_fn): New function to expand vec_extract optab. (direct_vec_extract_optab_supported_p): Add. * internal-fn.def (VEC_EXTRACT): Add. * optabs.cc (can_vec_extract_var_idx_p): New function. * optabs.h (can_vec_extract_var_idx_p): Declare. 2023-07-05 Robin Dapp * config/riscv/autovec.md: Add gen_lowpart. 2023-07-05 Robin Dapp * config/riscv/autovec.md: Allow register index operand. 2023-07-05 Pan Li * config/riscv/riscv-vector-builtins.cc (function_expander::use_exact_insn): Use FRM_DYN instead of const0. 2023-07-05 Robin Dapp * config/riscv/autovec.md: Use float_truncate. 2023-07-05 Ju-Zhe Zhong * internal-fn.cc (internal_fn_len_index): Apply LEN_MASK_GATHER_LOAD/SCATTER_STORE into vectorizer. (internal_fn_mask_index): Ditto. * optabs-query.cc (supports_vec_gather_load_p): Ditto. (supports_vec_scatter_store_p): Ditto. * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Ditto. * tree-vect-patterns.cc (vect_recog_gather_scatter_pattern): Ditto. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Ditto. (vect_get_strided_load_store_ops): Ditto. (vectorizable_store): Ditto. (vectorizable_load): Ditto. 2023-07-05 Robin Dapp Juzhe-Zhong * simplify-rtx.cc (native_encode_rtx): Ditto. (native_decode_vector_rtx): Ditto. (simplify_const_vector_byte_offset): Ditto. (simplify_const_vector_subreg): Ditto. * tree.cc (build_truth_vector_type_for_mode): Ditto. * varasm.cc (output_constant_pool_2): Ditto. 2023-07-05 YunQiang Su * config/mips/mips.cc (mips_expand_block_move): don't expand for r6 with -mno-unaligned-access option if one or both of src and dest are unaligned. restruct: return directly if length is not const. (mips_block_move_straight): emit_move if ISA_HAS_UNALIGNED_ACCESS. 2023-07-05 Jan Beulich PR target/100711 * config/i386/sse.md: New splitters to simplify not;vec_duplicate as a singular vpternlog. (one_cmpl2): Allow broadcast for operand 1. (one_cmpl2): Likewise. 2023-07-05 Jan Beulich PR target/100711 * config/i386/sse.md: New splitters to simplify not;vec_duplicate;{ior,xor} as vec_duplicate;{iornot,xnor}. 2023-07-05 Jan Beulich PR target/100711 * config/i386/sse.md: Permit non-immediate operand 1 in AVX2 form of splitter for PR target/100711. 2023-07-05 Richard Biener PR middle-end/110541 * tree.def (VEC_PERM_EXPR): Adjust documentation to reflect reality. 2023-07-05 Jan Beulich PR target/93768 * config/i386/sse.md (*andnot3): Add new alternatives for memory form operand 1. 2023-07-05 Jan Beulich PR target/93768 * config/i386/i386.cc (ix86_rtx_costs): Further special-case bitwise vector operations. * config/i386/sse.md (*iornot3): New insn. (*xnor3): Likewise. (*3): Likewise. (andor): New code iterator. (nlogic): New code attribute. (ternlog_nlogic): Likewise. 2023-07-05 Richard Biener * tree-vect-stmts.cc (vect_mark_relevant): Fix typo. 2023-07-05 yulong * config/riscv/vector.md: Add float16 attr at sew、vlmul and ratio. 2023-07-05 yulong * config/riscv/genrvv-type-indexer.cc (valid_type): Enable FP16 tuple. * config/riscv/riscv-modes.def (RVV_TUPLE_MODES): New macro. (ADJUST_ALIGNMENT): Ditto. (RVV_TUPLE_PARTIAL_MODES): Ditto. (ADJUST_NUNITS): Ditto. * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4x2_t): New types. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/riscv-vector-builtins.def (vfloat16mf4x2_t): New macro. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/riscv-vector-switch.def (TUPLE_ENTRY): New. * config/riscv/riscv.md: New. * config/riscv/vector-iterators.md: New. 2023-07-04 Andrew Pinski PR tree-optimization/110487 * match.pd (a !=/== CST1 ? CST2 : CST3): Always build a nonstandard integer and use that. 2023-07-04 Andrew Pinski * match.pd (a?-1:0): Cast type an integer type rather the type before the negative. (a?0:-1): Likewise. 2023-07-04 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (machine_function, xtensa_expand_prologue): Change to use HARD_REG_BIT and its macros. * config/xtensa/xtensa.md (peephole2: regmove elimination during DFmode input reload): Likewise. 2023-07-04 Richard Biener PR tree-optimization/110491 * tree-ssa-phiopt.cc (match_simplify_replacement): Check whether the PHI args are possibly undefined before folding the COND_EXPR. 2023-07-04 Pan Li Thomas Schwinge * lto-streamer-in.cc (lto_input_mode_table): Stream in the mode bits for machine mode table. * lto-streamer-out.cc (lto_write_mode_table): Stream out the HOST machine mode bits. * lto-streamer.h (struct lto_file_decl_data): New fields mode_bits. * tree-streamer.cc (streamer_mode_table): Take MAX_MACHINE_MODE as the table size. * tree-streamer.h (streamer_mode_table): Ditto. (bp_pack_machine_mode): Take 1 << ceil_log2 (MAX_MACHINE_MODE) as the packing limit. (bp_unpack_machine_mode): Ditto with 'file_data->mode_bits'. 2023-07-04 Thomas Schwinge * lto-streamer.h (class lto_input_block): Capture 'lto_file_decl_data *file_data' instead of just 'unsigned char *mode_table'. * ipa-devirt.cc (ipa_odr_read_section): Adjust. * ipa-fnsummary.cc (inline_read_section): Likewise. * ipa-icf.cc (sem_item_optimizer::read_section): Likewise. * ipa-modref.cc (read_section): Likewise. * ipa-prop.cc (ipa_prop_read_section, read_replacements_section): Likewise. * ipa-sra.cc (isra_read_summary_section): Likewise. * lto-cgraph.cc (input_cgraph_opt_section): Likewise. * lto-section-in.cc (lto_create_simple_input_block): Likewise. * lto-streamer-in.cc (lto_read_body_or_constructor) (lto_input_toplevel_asms): Likewise. * tree-streamer.h (bp_unpack_machine_mode): Likewise. 2023-07-04 Richard Biener * tree-ssa-phiopt.cc (pass_phiopt::execute): Mark SSA undefs. (empty_bb_or_one_feeding_into_p): Check for them. * tree-ssa.h (gimple_uses_undefined_value_p): Remove. * tree-ssa.cc (gimple_uses_undefined_value_p): Likewise. 2023-07-04 Richard Biener * tree-vect-loop.cc (vect_analyze_loop_costing): Remove check guarding scalar_niter underflow. 2023-07-04 Hao Liu PR tree-optimization/110531 * tree-vect-loop.cc (vect_analyze_loop_1): initialize slp_done_for_suggested_uf to false. 2023-07-04 Richard Biener PR tree-optimization/110228 * tree-ssa-ifcombine.cc (pass_tree_ifcombine::execute): Mark SSA may-undefs. (bb_no_side_effects_p): Check stmt uses for undefs. 2023-07-04 Richard Biener PR tree-optimization/110436 * tree-vect-stmts.cc (vect_mark_relevant): Expand dumping, force live but not relevant pattern stmts relevant. 2023-07-04 Lili Cui * config/i386/i386.h: Add PTA_ENQCMD and PTA_UINTR to PTA_SIERRAFOREST. * doc/invoke.texi: Update new isa to march=sierraforest and grandridge. 2023-07-04 Richard Biener PR middle-end/110495 * tree.h (TREE_OVERFLOW): Do not mention VECTOR_CSTs since we do not set TREE_OVERFLOW on those since the introduction of VL vectors. * match.pd (x +- CST +- CST): For VECTOR_CST do not look at TREE_OVERFLOW to determine validity of association. 2023-07-04 Richard Biener PR tree-optimization/110310 * tree-vect-loop.cc (vect_determine_partial_vectors_and_peeling): Move costing part ... (vect_analyze_loop_costing): ... here. Integrate better estimate for epilogues from ... (vect_analyze_loop_2): Call vect_determine_partial_vectors_and_peeling with actual epilogue status. * tree-vect-loop-manip.cc (vect_do_peeling): ... here and avoid cancelling epilogue vectorization. (vect_update_epilogue_niters): Remove. No longer update epilogue LOOP_VINFO_NITERS. 2023-07-04 Pan Li Revert: 2023-07-03 Pan Li * config/riscv/vector.md: Fix typo. 2023-07-04 Ju-Zhe Zhong * doc/md.texi: Add len_mask_gather_load/len_mask_scatter_store. * internal-fn.cc (expand_scatter_store_optab_fn): Ditto. (expand_gather_load_optab_fn): Ditto. (internal_load_fn_p): Ditto. (internal_store_fn_p): Ditto. (internal_gather_scatter_fn_p): Ditto. (internal_fn_len_index): Ditto. (internal_fn_mask_index): Ditto. (internal_fn_stored_value_index): Ditto. * internal-fn.def (LEN_MASK_GATHER_LOAD): Ditto. (LEN_MASK_SCATTER_STORE): Ditto. * optabs.def (OPTAB_CD): Ditto. 2023-07-04 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vector_insn_info::parse_insn): Add early break. 2023-07-04 Hans-Peter Nilsson * config/cris/cris.md (CRIS_UNSPEC_SWAP_BITS): Remove. ("cris_swap_bits", "ctzsi2"): Use bitreverse instead. 2023-07-04 Hans-Peter Nilsson * dwarf2out.cc (mem_loc_descriptor): Handle BITREVERSE. 2023-07-03 Christoph Müllner * common/config/riscv/riscv-common.cc: Add support for zvbb, zvbc, zvkg, zvkned, zvknha, zvknhb, zvksed, zvksh, zvkn, zvknc, zvkng, zvks, zvksc, zvksg, zvkt and the implied subsets. * config/riscv/arch-canonicalize: Add canonicalization info for zvkn, zvknc, zvkng, zvks, zvksc, zvksg. * config/riscv/riscv-opts.h (MASK_ZVBB): New macro. (MASK_ZVBC): Likewise. (TARGET_ZVBB): Likewise. (TARGET_ZVBC): Likewise. (MASK_ZVKG): Likewise. (MASK_ZVKNED): Likewise. (MASK_ZVKNHA): Likewise. (MASK_ZVKNHB): Likewise. (MASK_ZVKSED): Likewise. (MASK_ZVKSH): Likewise. (MASK_ZVKN): Likewise. (MASK_ZVKNC): Likewise. (MASK_ZVKNG): Likewise. (MASK_ZVKS): Likewise. (MASK_ZVKSC): Likewise. (MASK_ZVKSG): Likewise. (MASK_ZVKT): Likewise. (TARGET_ZVKG): Likewise. (TARGET_ZVKNED): Likewise. (TARGET_ZVKNHA): Likewise. (TARGET_ZVKNHB): Likewise. (TARGET_ZVKSED): Likewise. (TARGET_ZVKSH): Likewise. (TARGET_ZVKN): Likewise. (TARGET_ZVKNC): Likewise. (TARGET_ZVKNG): Likewise. (TARGET_ZVKS): Likewise. (TARGET_ZVKSC): Likewise. (TARGET_ZVKSG): Likewise. (TARGET_ZVKT): Likewise. * config/riscv/riscv.opt: Introduction of riscv_zv{b,k}_subext. 2023-07-03 Andrew Pinski PR middle-end/110510 * except.h (struct eh_landing_pad_d): Add chain_next GTY. 2023-07-03 Iain Sandoe * config/darwin.h: Avoid duplicate multiply_defined specs on earlier Darwin versions with shared libgcc. 2023-07-03 Uros Bizjak * tree.h (tree_int_cst_equal): Change return type from int to bool. (operand_equal_for_phi_arg_p): Ditto. (tree_map_base_marked_p): Ditto. * tree.cc (contains_placeholder_p): Update function body for bool return type. (type_cache_hasher::equal): Ditto. (tree_map_base_hash): Change return type from int to void and adjust function body accordingly. (tree_int_cst_equal): Ditto. (operand_equal_for_phi_arg_p): Ditto. (get_narrower): Change "first" variable to bool. (cl_option_hasher::equal): Update function body for bool return type. * ggc.h (ggc_set_mark): Change return type from int to bool. (ggc_marked_p): Ditto. * ggc-page.cc (gt_ggc_mx): Change return type from int to void and adjust function body accordingly. (ggc_set_mark): Ditto. 2023-07-03 Ju-Zhe Zhong * config/riscv/autovec.md: Change order of LEN_MASK_LOAD/LEN_MASK_STORE/LEN_LOAD/LEN_STORE arguments. * config/riscv/riscv-v.cc (expand_load_store): Ditto. * doc/md.texi: Ditto. * gimple-fold.cc (gimple_fold_partial_load_store_mem_ref): Ditto. * internal-fn.cc (len_maskload_direct): Ditto. (len_maskstore_direct): Ditto. (add_len_and_mask_args): New function. (expand_partial_load_optab_fn): Change order of LEN_MASK_LOAD/LEN_MASK_STORE/LEN_LOAD/LEN_STORE arguments. (expand_partial_store_optab_fn): Ditto. (internal_fn_len_index): New function. (internal_fn_mask_index): Change order of LEN_MASK_LOAD/LEN_MASK_STORE/LEN_LOAD/LEN_STORE arguments. (internal_fn_stored_value_index): Ditto. (internal_len_load_store_bias): Ditto. * internal-fn.h (internal_fn_len_index): New function. * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Change order of LEN_MASK_LOAD/LEN_MASK_STORE/LEN_LOAD/LEN_STORE arguments. * tree-vect-stmts.cc (vectorizable_store): Ditto. (vectorizable_load): Ditto. 2023-07-03 Gaius Mulley PR modula2/110125 * doc/gm2.texi (Semantic checking): Include examples using -Wuninit-variable-checking. 2023-07-03 Juzhe-Zhong * config/riscv/autovec-opt.md (*double_widen_fnma): New pattern. (*single_widen_fnma): Ditto. (*double_widen_fms): Ditto. (*single_widen_fms): Ditto. (*double_widen_fnms): Ditto. (*single_widen_fnms): Ditto. 2023-07-03 Juzhe-Zhong * config/riscv/autovec-opt.md (@pred_single_widen_mul): Change "@" into "*" in pattern name which simplifies build files. (*pred_single_widen_mul): Ditto. (*pred_single_widen_mul): New pattern. 2023-07-03 Richard Sandiford * config/aarch64/aarch64-simd.md (vec_extract): Expect the index to be 0 or 1. 2023-07-03 Lehua Ding Revert: 2023-07-03 Juzhe-Zhong * config/riscv/autovec-opt.md (*double_widen_fnma): New pattern. (*single_widen_fnma): Ditto. (*double_widen_fms): Ditto. (*single_widen_fms): Ditto. (*double_widen_fnms): Ditto. (*single_widen_fnms): Ditto. 2023-07-03 Juzhe-Zhong * config/riscv/autovec-opt.md (*double_widen_fnma): New pattern. (*single_widen_fnma): Ditto. (*double_widen_fms): Ditto. (*single_widen_fms): Ditto. (*double_widen_fnms): Ditto. (*single_widen_fnms): Ditto. 2023-07-03 Pan Li * config/riscv/vector.md: Fix typo. 2023-07-03 Richard Biener PR tree-optimization/110506 * tree-vect-patterns.cc (vect_recog_rotate_pattern): Re-order TYPE_PRECISION access with INTEGRAL_TYPE_P check. 2023-07-03 Richard Biener PR tree-optimization/110506 * tree-ssa-ccp.cc (get_value_for_expr): Check for integral type before relying on TYPE_PRECISION to produce a nonzero mask. 2023-07-03 Jie Mei * config/mips/mips.md(*and3_mips16): Generates ZEB/ZEH instructions. 2023-07-03 Jie Mei * config/mips/mips.cc(mips_9bit_offset_address_p): Restrict the address register to M16_REGS for MIPS16. (BUILTIN_AVAIL_MIPS16E2): Defined a new macro. (AVAIL_MIPS16E2_OR_NON_MIPS16): Same as above. (AVAIL_NON_MIPS16 (cache..)): Update to AVAIL_MIPS16E2_OR_NON_MIPS16. * config/mips/mips.h (ISA_HAS_CACHE): Add clause for ISA_HAS_MIPS16E2. * config/mips/mips.md (mips_cache): Mark as extended MIPS16. 2023-07-03 Jie Mei * config/mips/mips.h(ISA_HAS_9BIT_DISPLACEMENT): Add clause for ISA_HAS_MIPS16E2. (ISA_HAS_SYNC): Same as above. (ISA_HAS_LL_SC): Same as above. 2023-07-03 Jie Mei * config/mips/mips.cc(mips_expand_ins_as_unaligned_store): Add logics for generating instruction. * config/mips/mips.h(ISA_HAS_LWL_LWR): Add clause for ISA_HAS_MIPS16E2. * config/mips/mips.md(mov_l): Generates instructions. (mov_r): Same as above. (mov_l): Adjusted for the conditions above. (mov_r): Same as above. (mov_l_mips16e2): Add machine description for `define_insn mov_l_mips16e2`. (mov_r_mips16e2): Add machine description for `define_insn mov_r_mips16e2`. 2023-07-03 Jie Mei * config/mips/mips.cc(mips_symbol_insns_1): Generates LUI instruction. (mips_const_insns): Same as above. (mips_output_move): Same as above. (mips_output_function_prologue): Same as above. * config/mips/mips.md: Same as above 2023-07-03 Jie Mei * config/mips/constraints.md(Yz): New constraints for mips16e2. * config/mips/mips-protos.h(mips_bit_clear_p): Declared new function. (mips_bit_clear_info): Same as above. * config/mips/mips.cc(mips_bit_clear_info): New function for generating instructions. (mips_bit_clear_p): Same as above. * config/mips/mips.h(ISA_HAS_EXT_INS): Add clause for ISA_HAS_MIPS16E2. * config/mips/mips.md(extended_mips16): Generates EXT and INS instructions. (*and3): Generates INS instruction. (*and3_mips16): Generates EXT, INS and ANDI instructions. (ior3): Add logics for ORI instruction. (*ior3_mips16_asmacro): Generates ORI instrucion. (*ior3_mips16): Add logics for XORI instruction. (*xor3_mips16): Generates XORI instrucion. (*extzv): Add logics for EXT instruction. (*insv): Add logics for INS instruction. * config/mips/predicates.md(bit_clear_operand): New predicate for generating bitwise instructions. (and_reg_operand): Add logics for generating bitwise instructions. 2023-07-03 Jie Mei * config/mips/mips.cc(mips_regno_mode_ok_for_base_p): Generate instructions that uses global pointer register. (mips16_unextended_reference_p): Same as above. (mips_pic_base_register): Same as above. (mips_init_relocs): Same as above. * config/mips/mips.h(MIPS16_GP_LOADS): Defined a new macro. (GLOBAL_POINTER_REGNUM): Moved to machine description `mips.md`. * config/mips/mips.md(GLOBAL_POINTER_REGNUM): Moved to here from above. (*lowsi_mips16_gp):New `define_insn *low_mips16`. 2023-07-03 Jie Mei * config/mips/mips.h(ISA_HAS_CONDMOVE): Add condition for ISA_HAS_MIPS16E2. * config/mips/mips.md(*mov_on_): Add logics for MOVx insts. (*mov_on__mips16e2): Generate MOVx instruction. (*mov_on__ne): Add logics for MOVx insts. (*mov_on__ne_mips16e2): Generate MOVx instruction. * config/mips/predicates.md(reg_or_0_operand_mips16e2): New predicate for MOVx insts. 2023-07-03 Jie Mei * config/mips/mips.cc(mips_file_start): Add mips16e2 info for output file. * config/mips/mips.h(__mips_mips16e2): Defined a new predefine macro. (ISA_HAS_MIPS16E2): Defined a new macro. (ASM_SPEC): Pass mmips16e2 to the assembler. * config/mips/mips.opt: Add -m(no-)mips16e2 option. * config/mips/predicates.md: Add clause for TARGET_MIPS16E2. * doc/invoke.texi: Add -m(no-)mips16e2 option.. 2023-07-02 Jakub Jelinek PR tree-optimization/110508 * tree-ssa-math-opts.cc (match_uaddc_usubc): Only replace re2 with REALPART_EXPR opf nlhs if re2 is non-NULL. 2023-07-02 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (xtensa_match_CLAMPS_imms_p): Simplify. * config/xtensa/xtensa.md (*xtensa_clamps): Add TARGET_MINMAX to the condition. 2023-07-02 Takayuki 'January June' Suwa * config/xtensa/xtensa.md (*eqne_INT_MIN): Add missing ":SI" to the match_operator. 2023-07-02 Iain Sandoe PR target/108743 * config/darwin.opt: Add fconstant-cfstrings alias to mconstant-cfstrings. * doc/invoke.texi: Amend invocation descriptions to reflect that the fconstant-cfstrings is a target-option alias and to add the missing mconstant-cfstrings option description to the Darwin section. 2023-07-01 Jan Hubicka * tree-cfg.cc (gimple_duplicate_sese_region): Add elliminated_edge parmaeter; update profile. * tree-cfg.h (gimple_duplicate_sese_region): Update prototype. * tree-ssa-loop-ch.cc (entry_loop_condition_is_static): Rename to ... (static_loop_exit): ... this; return the edge to be elliminated. (ch_base::copy_headers): Handle profile updating for eliminated exits. 2023-07-01 Roger Sayle * config/i386/i386-features.cc (compute_convert_gain): Provide gains/costs for ROTATE and ROTATERT (by an integer constant). (general_scalar_chain::convert_rotate): New helper function to convert a DImode or SImode rotation by an integer constant into SSE vector form. (general_scalar_chain::convert_insn): Call the new convert_rotate for ROTATE and ROTATERT. (general_scalar_to_vector_candidate_p): Consider ROTATE and ROTATERT to be candidates if the second operand is an integer constant, valid for a rotation (or shift) in the given mode. * config/i386/i386-features.h (general_scalar_chain): Add new helper method convert_rotate. 2023-07-01 Jan Hubicka PR tree-optimization/103680 * cfg.cc (update_bb_profile_for_threading): Fix profile update; make message clearer. 2023-06-30 Qing Zhao PR tree-optimization/101832 * tree-object-size.cc (addr_object_size): Handle structure/union type when it has flexible size. 2023-06-30 Eric Botcazou * gimple-fold.cc (fold_array_ctor_reference): Fix head comment. (fold_nonarray_ctor_reference): Likewise. Specifically deal with integral bit-fields. (fold_ctor_reference): Make sure that the constructor uses the native storage order. 2023-06-30 Jan Hubicka PR middle-end/109849 * predict.cc (estimate_bb_frequencies): Turn to static function. (expr_expected_value_1): Fix handling of binary expressions with predicted values. * predict.def (PRED_MALLOC_NONNULL): Move later in the priority queue. (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Move to almost top of the priority queue. * predict.h (estimate_bb_frequencies): No longer declare it. 2023-06-30 Uros Bizjak * fold-const.h (multiple_of_p): Change return type from int to bool. * fold-const.cc (split_tree): Change negl_p, neg_litp_p, neg_conp_p and neg_var_p variables to bool. (const_binop): Change sat_p variable to bool. (merge_ranges): Change no_overlap variable to bool. (extract_muldiv_1): Change same_p variable to bool. (tree_swap_operands_p): Update function body for bool return type. (fold_truth_andor): Change commutative variable to bool. (multiple_of_p): Change return type from int to void and adjust function body accordingly. * optabs.h (expand_twoval_unop): Change return type from int to bool. (expand_twoval_binop): Ditto. (can_compare_p): Ditto. (have_add2_insn): Ditto. (have_addptr3_insn): Ditto. (have_sub2_insn): Ditto. (have_insn_for): Ditto. * optabs.cc (add_equal_note): Ditto. (widen_operand): Change no_extend argument from int to bool. (expand_binop): Ditto. (expand_twoval_unop): Change return type from int to void and adjust function body accordingly. (expand_twoval_binop): Ditto. (can_compare_p): Ditto. (have_add2_insn): Ditto. (have_addptr3_insn): Ditto. (have_sub2_insn): Ditto. (have_insn_for): Ditto. 2023-06-30 Oluwatamilore Adebayo * config/aarch64/aarch64-simd.md (vec_widen_abdl_lo_, vec_widen_abdl_hi_): Expansions for abd vec widen optabs. (aarch64_abdl_insn): VQW based abdl RTL. * config/aarch64/iterators.md (USMAX_EXT): Code attributes that give the appropriate extend RTL for the max RTL. 2023-06-30 Oluwatamilore Adebayo * internal-fn.def (VEC_WIDEN_ABD): New internal hilo optab. * optabs.def (vec_widen_sabd_optab, vec_widen_sabd_hi_optab, vec_widen_sabd_lo_optab, vec_widen_sabd_odd_even, vec_widen_sabd_even_optab, vec_widen_uabd_optab, vec_widen_uabd_hi_optab, vec_widen_uabd_lo_optab, vec_widen_uabd_odd_even, vec_widen_uabd_even_optab): New optabs. * doc/md.texi: Document them. * tree-vect-patterns.cc (vect_recog_abd_pattern): Update to to build a VEC_WIDEN_ABD call if the input precision is smaller than the precision of the output. (vect_recog_widen_abd_pattern): Should an ABD expression be found preceeding an extension, replace the two with a VEC_WIDEN_ABD. 2023-06-30 Pan Li * config/riscv/vector.md: Refactor the common condition. 2023-06-30 Richard Biener PR tree-optimization/110496 * gimple-ssa-store-merging.cc (find_bswap_or_nop_1): Re-order verifying and TYPE_PRECISION query for the BIT_FIELD_REF case. 2023-06-30 Richard Biener PR middle-end/110489 * statistics.cc (curr_statistics_hash): Add argument indicating whether we should allocate the hash. (statistics_fini_pass): If the hash isn't allocated only print the summary header. 2023-06-30 Segher Boessenkool Thomas Schwinge * config/nvptx/nvptx.cc (TARGET_LRA_P): Remove. 2023-06-30 Jovan Dmitrović PR target/109435 * config/mips/mips.cc (mips_function_arg_alignment): Returns the alignment of function argument. In case of typedef type, it returns the aligment of the aliased type. (mips_function_arg_boundary): Relocated calculation of the aligment of function arguments. 2023-06-29 Jan Hubicka PR tree-optimization/109849 * ipa-fnsummary.cc (decompose_param_expr): Skip functions returning its parameter. (set_cond_stmt_execution_predicate): Return early if predicate was constructed. 2023-06-29 Qing Zhao PR c/77650 * doc/extend.texi: Document GCC extension on a structure containing a flexible array member to be a member of another structure. 2023-06-29 Qing Zhao * print-tree.cc (print_node): Print new bit type_include_flexarray. * tree-core.h (struct tree_type_common): Use bit no_named_args_stdarg_p as type_include_flexarray for RECORD_TYPE or UNION_TYPE. * tree-streamer-in.cc (unpack_ts_type_common_value_fields): Stream in bit no_named_args_stdarg_p properly for its corresponding type. * tree-streamer-out.cc (pack_ts_type_common_value_fields): Stream out bit no_named_args_stdarg_p properly for its corresponding type. * tree.h (TYPE_INCLUDES_FLEXARRAY): New macro TYPE_INCLUDES_FLEXARRAY. 2023-06-29 Aldy Hernandez * tree-vrp.cc (maybe_set_nonzero_bits): Move from here... * tree-ssa-dom.cc (maybe_set_nonzero_bits): ...to here. * tree-vrp.h (maybe_set_nonzero_bits): Remove. 2023-06-29 Aldy Hernandez * value-range.cc (frange::set): Do not call verify_range. (frange::normalize_kind): Verify range. (frange::union_nans): Do not call verify_range. (frange::union_): Same. (frange::intersect): Same. (irange::irange_single_pair_union): Call normalize_kind if necessary. (irange::union_): Same. (irange::intersect): Same. (irange::set_range_from_nonzero_bits): Verify range. (irange::set_nonzero_bits): Call normalize_kind if necessary. (irange::get_nonzero_bits): Tweak comment. (irange::intersect_nonzero_bits): Call normalize_kind if necessary. (irange::union_nonzero_bits): Same. * value-range.h (irange::normalize_kind): Verify range. 2023-06-29 Uros Bizjak * cselib.h (rtx_equal_for_cselib_1): Change return type from int to bool. (references_value_p): Ditto. (rtx_equal_for_cselib_p): Ditto. * expr.h (can_store_by_pieces): Ditto. (try_casesi): Ditto. (try_tablejump): Ditto. (safe_from_p): Ditto. * sbitmap.h (bitmap_equal_p): Ditto. * cselib.cc (references_value_p): Change return type from int to void and adjust function body accordingly. (rtx_equal_for_cselib_1): Ditto. * expr.cc (is_aligning_offset): Ditto. (can_store_by_pieces): Ditto. (mostly_zeros_p): Ditto. (all_zeros_p): Ditto. (safe_from_p): Ditto. (is_aligning_offset): Ditto. (try_casesi): Ditto. (try_tablejump): Ditto. (store_constructor): Change "need_to_clear" and "const_bounds_p" variables to bool. * sbitmap.cc (bitmap_equal_p): Change return type from int to bool. 2023-06-29 Robin Dapp * tree-ssa-math-opts.cc (divmod_candidate_p): Use element_precision. 2023-06-29 Richard Biener PR tree-optimization/110460 * tree-vect-stmts.cc (get_related_vectype_for_scalar_type): Only allow integral, pointer and scalar float type scalar_type. 2023-06-29 Lili Cui PR tree-optimization/110148 * tree-ssa-reassoc.cc (rewrite_expr_tree_parallel): Handle loop-carried ops in this function. 2023-06-29 Richard Biener PR middle-end/110452 * expr.cc (store_constructor): Handle uniform boolean vectors with integer mode specially. 2023-06-29 Richard Biener PR middle-end/110461 * match.pd (bitop (convert@2 @0) (convert?@3 @1)): Disable for VECTOR_TYPE_P. 2023-06-29 Richard Sandiford * vec.h (gt_pch_nx): Add overloads for va_gc_atomic. (array_slice): Relax va_gc constructor to handle all vectors with a vl_embed layout. 2023-06-29 Pan Li * config/riscv/riscv.cc (riscv_emit_mode_set): Add emit for FRM. (riscv_mode_needed): Likewise. (riscv_entity_mode_after): Likewise. (riscv_mode_after): Likewise. (riscv_mode_entry): Likewise. (riscv_mode_exit): Likewise. * config/riscv/riscv.h (NUM_MODES_FOR_MODE_SWITCHING): Add number for FRM. * config/riscv/riscv.md: Add FRM register. * config/riscv/vector-iterators.md: Add FRM type. * config/riscv/vector.md (frm_mode): Define new attr for FRM mode. (fsrm): Define new insn for fsrm instruction. 2023-06-29 Pan Li * config/riscv/riscv-protos.h (enum floating_point_rounding_mode): Add macro for static frm min and max. * config/riscv/riscv-vector-builtins-bases.cc (class binop_frm): New class for floating-point with frm. (BASE): Add vfadd for frm. * config/riscv/riscv-vector-builtins-bases.h: Likewise. * config/riscv/riscv-vector-builtins-functions.def (vfadd_frm): Likewise. * config/riscv/riscv-vector-builtins-shapes.cc (struct alu_frm_def): New struct for alu with frm. (SHAPE): Add alu with frm. * config/riscv/riscv-vector-builtins-shapes.h: Likewise. * config/riscv/riscv-vector-builtins.cc (function_checker::report_out_of_range_and_not): New function for report out of range and not val. (function_checker::require_immediate_range_or): New function for checking in range or one val. * config/riscv/riscv-vector-builtins.h: Add function decl. 2023-06-29 Cui, Lili * common/config/i386/cpuinfo.h (get_intel_cpu): Remove model value 0xa8 from Rocketlake, move model value 0xbf from Alderlake to Raptorlake. 2023-06-28 Hans-Peter Nilsson PR target/110144 * config/cris/cris.cc (cris_postdbr_cmpelim): Don't apply PATTERN to insn before validating it. 2023-06-28 Jan Hubicka PR middle-end/110334 * ipa-fnsummary.h (ipa_fn_summary): Add safe_to_inline_to_always_inline. * ipa-inline.cc (can_early_inline_edge_p): ICE if SSA is not built; do cycle checking for always_inline functions. (inline_always_inline_functions): Be recrusive; watch for cycles; do not updat overall summary. (early_inliner): Do not give up on always_inlines. * ipa-utils.cc (ipa_reverse_postorder): Do not skip always inlines. 2023-06-28 Uros Bizjak * output.h (leaf_function_p): Change return type from int to bool. (final_forward_branch_p): Ditto. (only_leaf_regs_used): Ditto. (maybe_assemble_visibility): Ditto. * varasm.h (supports_one_only): Ditto. * rtl.h (compute_alignments): Change return type from int to void. * final.cc (app_on): Change return type from int to bool. (compute_alignments): Change return type from int to void and adjust function body accordingly. (shorten_branches): Change "something_changed" variable type from int to bool. (leaf_function_p): Change return type from int to bool and adjust function body accordingly. (final_forward_branch_p): Ditto. (only_leaf_regs_used): Ditto. * varasm.cc (contains_pointers_p): Change return type from int to bool and adjust function body accordingly. (compare_constant): Ditto. (maybe_assemble_visibility): Ditto. (supports_one_only): Ditto. 2023-06-28 Manolis Tsamis PR debug/110308 * regcprop.cc (maybe_mode_change): Check stack_pointer_rtx mode. (maybe_copy_reg_attrs): New function. (find_oldest_value_reg): Use maybe_copy_reg_attrs. (copyprop_hardreg_forward_1): Ditto. 2023-06-28 Richard Biener PR tree-optimization/110434 * tree-nrv.cc (pass_nrv::execute): Remove CLOBBERs of VAR we replace with . 2023-06-28 Richard Biener PR tree-optimization/110451 * tree-ssa-loop-im.cc (stmt_cost): [VEC_]COND_EXPR and tcc_comparison are expensive. 2023-06-28 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_branch): Also use ptest for TImode comparisons on 32-bit architectures. * config/i386/i386.md (cbranch4): Change from SDWIM to SWIM1248x to exclude/avoid TImode being conditional on -m64. (cbranchti4): New define_expand for TImode on both TARGET_64BIT and/or with TARGET_SSE4_1. * config/i386/predicates.md (ix86_timode_comparison_operator): New predicate that depends upon TARGET_64BIT. (ix86_timode_comparison_operand): Likewise. 2023-06-28 Roger Sayle PR target/78794 * config/i386/i386-features.cc (compute_convert_gain): Provide more accurate gains for conversion of scalar comparisons to PTEST. 2023-06-28 Richard Biener PR tree-optimization/110443 * tree-vect-slp.cc (vect_build_slp_tree_1): Reject non-grouped gather loads. 2023-06-28 Haochen Gui * config/rs6000/rs6000.md (peephole2 for compare_and_move): New. (peephole2 for move_and_compare): New. (mode_iterator WORD): New. Set the mode to SI/DImode by TARGET_POWERPC64. (*mov_internal2): Change the mode iterator from P to WORD. (split pattern for compare_and_move): Likewise. 2023-06-28 Juzhe-Zhong * config/riscv/autovec-opt.md (*double_widen_fma): New pattern. (*single_widen_fma): Ditto. 2023-06-28 Haochen Gui PR target/104124 * config/rs6000/altivec.md (*altivec_vupkhs_direct): Rename to... (altivec_vupkhs_direct): ...this. * config/rs6000/predicates.md (vspltisw_vupkhsw_constant_split): New predicate to test if a constant can be loaded with vspltisw and vupkhsw. (easy_vector_constant): Call vspltisw_vupkhsw_constant_p to Check if a vector constant can be synthesized with a vspltisw and a vupkhsw. * config/rs6000/rs6000-protos.h (vspltisw_vupkhsw_constant_p): Declare. * config/rs6000/rs6000.cc (vspltisw_vupkhsw_constant_p): New function to return true if OP mode is V2DI and can be synthesized with vupkhsw and vspltisw. * config/rs6000/vsx.md (*vspltisw_v2di_split): New insn to load up constants with vspltisw and vupkhsw. 2023-06-28 Jan Hubicka PR tree-optimization/110377 * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Pass statement to the ranger query. (ipa_analyze_node): Enable ranger. 2023-06-28 Richard Biener * tree.h (TYPE_PRECISION): Check for non-VECTOR_TYPE. (TYPE_PRECISION_RAW): Provide raw access to the precision field. * tree.cc (verify_type_variant): Compare TYPE_PRECISION_RAW. (gimple_canonical_types_compatible_p): Likewise. * tree-streamer-out.cc (pack_ts_type_common_value_fields): Stream TYPE_PRECISION_RAW. * tree-streamer-in.cc (unpack_ts_type_common_value_fields): Likewise. * lto-streamer-out.cc (hash_tree): Hash TYPE_PRECISION_RAW. 2023-06-28 Alexandre Oliva * doc/extend.texi (zero-call-used-regs): Document leafy and variants thereof. * flag-types.h (zero_regs_flags): Add LEAFY_MODE, as well as LEAFY and variants. * function.cc (gen_call_ued_regs_seq): Set only_used for leaf functions in leafy mode. * opts.cc (zero_call_used_regs_opts): Add leafy and variants. 2023-06-28 Juzhe-Zhong * config/riscv/riscv-vector-builtins-bases.cc: Adapt expand. * config/riscv/vector.md (@pred_single_widen_): Remove. (@pred_single_widen_add): New pattern. (@pred_single_widen_sub): New pattern. 2023-06-28 liuhongt * config/i386/i386.cc (ix86_invalid_conversion): New function. (TARGET_INVALID_CONVERSION): Define as ix86_invalid_conversion. 2023-06-27 Robin Dapp * config/riscv/autovec.md (2): New expander. (2): Ditto. (2): Ditto. (2): Ditto. * config/riscv/vector-iterators.md: Add vnconvert. 2023-06-27 Robin Dapp * config/riscv/autovec.md (extend2): New expander. (extend2): Ditto. (trunc2): Ditto. (trunc2): Ditto. * config/riscv/vector-iterators.md: Add VQEXTF and HF to V_QUAD_TRUNC and v_quad_trunc. 2023-06-27 Robin Dapp * config/riscv/autovec.md (2): New expander. 2023-06-27 Robin Dapp * config/riscv/autovec.md (copysign3): Add expander. (xorsign3): Ditto. * config/riscv/riscv-vector-builtins-bases.cc (class vfsgnjn): New class. * config/riscv/vector-iterators.md (copysign): Remove ncopysign. (xorsign): Ditto. (n): Ditto. (x): Ditto. * config/riscv/vector.md (@pred_ncopysign): Split off. (@pred_ncopysign_scalar): Ditto. 2023-06-27 Robin Dapp * config/riscv/autovec.md: VF_AUTO -> VF. * config/riscv/vector-iterators.md: Introduce VF_ZVFHMIN, VWEXTF_ZVFHMIN and use TARGET_ZVFH in VWCONVERTI, VHF and VHF_LMUL1. * config/riscv/vector.md: Use new iterators. 2023-06-27 Robin Dapp * match.pd: Use element_mode and check if target supports operation with new type. 2023-06-27 Prathamesh Kulkarni * config/aarch64/aarch64-sve-builtins-base.cc (svdupq_impl::fold_nonconst_dupq): New method. (svdupq_impl::fold): Call fold_nonconst_dupq. 2023-06-27 Andrew Pinski PR middle-end/110420 PR middle-end/103979 PR middle-end/98619 * gimplify.cc (gimplify_asm_expr): Mark asm with labels as volatile. 2023-06-27 Aldy Hernandez * ipa-cp.cc (decide_whether_version_node): Adjust comment. * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Adjust for Value_Range. (set_switch_stmt_execution_predicate): Same. * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Same. 2023-06-27 Aldy Hernandez * ipa-prop.cc (struct ipa_vr_ggc_hash_traits): Adjust for use with ipa_vr instead of value_range. (gt_pch_nx): Same. (gt_ggc_mx): Same. (ipa_get_value_range): Same. * value-range.cc (gt_pch_nx): Move to ipa-prop.cc and adjust for ipa_vr. (gt_ggc_mx): Same. 2023-06-27 Aldy Hernandez * ipa-cp.cc (ipa_vr_operation_and_type_effects): New. * ipa-prop.cc (ipa_get_value_range): Adjust for ipa_vr. (ipa_set_jfunc_vr): Take a range. (ipa_compute_jump_functions_for_edge): Pass range to ipa_set_jfunc_vr. (ipa_write_jump_function): Call streamer write helper. (ipa_read_jump_function): Call streamer read helper. * ipa-prop.h (class ipa_vr): Change m_vr to an ipa_vr. 2023-06-27 Richard Sandiford * gengtype-parse.cc (consume_until_comma_or_eos): Parse "= { ... }" as a probable initializer rather than a probable complete statement. 2023-06-27 Richard Biener PR tree-optimization/96208 * tree-vect-slp.cc (vect_build_slp_tree_1): Allow a non-grouped load if it is the same for all lanes. (vect_build_slp_tree_2): Handle not grouped loads. (vect_optimize_slp_pass::remove_redundant_permutations): Likewise. (vect_transform_slp_perm_load_1): Likewise. * tree-vect-stmts.cc (vect_model_load_cost): Likewise. (get_group_load_store_type): Likewise. Handle invariant accesses. (vectorizable_load): Likewise. 2023-06-27 liuhongt PR rtl-optimization/110237 * config/i386/sse.md (_store_mask): Refine with UNSPEC_MASKMOV. (maskstore_store_mask): New define_insn, it's renamed from original _store_mask. 2023-06-27 liuhongt * config/i386/i386-features.cc (pass_insert_vzeroupper:gate): Move flag_expensive_optimizations && !optimize_size to .. * config/i386/i386-options.cc (ix86_option_override_internal): .. this, it makes -mvzeroupper independent of optimization level, but still keeps the behavior of architecture tuning(emit_vzeroupper) unchanged. 2023-06-27 liuhongt PR target/82735 * config/i386/i386.cc (ix86_avx_u127_mode_needed): Don't emit vzeroupper for vzeroupper call_insn. 2023-06-27 Andrew Pinski * doc/extend.texi (__builtin_alloca_with_align_and_max): Fix defbuiltin usage. 2023-06-27 Juzhe-Zhong * config/riscv/riscv-v.cc (expand_const_vector): Fix stepped vector with base != 0. 2023-06-26 Andrew Pinski * doc/extend.texi (access attribute): Add cindex for it. (interrupt/interrupt_handler attribute): Likewise. 2023-06-26 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_sqrshrun_n_insn): Use instead of . (aarch64_sqrshrun_n): Likewise. 2023-06-26 Kyrylo Tkachov * config/aarch64/aarch64-protos.h (aarch64_const_vec_rsra_rnd_imm_p): Rename to... (aarch64_rnd_imm_p): ... This. * config/aarch64/predicates.md (aarch64_simd_rsra_rnd_imm_vec): Rename to... (aarch64_int_rnd_operand): ... This. (aarch64_simd_rshrn_imm_vec): Delete. * config/aarch64/aarch64-simd.md (aarch64_rsra_n_insn): Adjust for the above. (aarch64_rshr_n_insn): Likewise. (*aarch64_rshrn_n_insn): Likewise. (*aarch64_sqrshrun_n_insn): Likewise. (aarch64_sqrshrun_n_insn): Likewise. (aarch64_rshrn2_n_insn_le): Likewise. (aarch64_rshrn2_n_insn_be): Likewise. (aarch64_sqrshrun2_n_insn_le): Likewise. (aarch64_sqrshrun2_n_insn_be): Likewise. * config/aarch64/aarch64.cc (aarch64_const_vec_rsra_rnd_imm_p): Rename to... (aarch64_rnd_imm_p): ... This. 2023-06-26 Andreas Krebbel * config/s390/s390.cc (s390_encode_section_info): Set SYMBOL_FLAG_SET_NOTALIGN2 only if the symbol has explicitely been misaligned. 2023-06-26 Jan Hubicka PR tree-optimization/109849 * tree-ssa-dce.cc (make_forwarders_with_degenerate_phis): Fix profile count of newly constructed forwarder block. 2023-06-26 Andrew Carlotti * doc/optinfo.texi: Fix "steam" -> "stream". 2023-06-26 Ju-Zhe Zhong * tree-ssa-dse.cc (initialize_ao_ref_for_dse): Add LEN_MASK_STORE and fix LEN_STORE. (dse_optimize_stmt): Add LEN_MASK_STORE. 2023-06-26 Ju-Zhe Zhong * gimple-fold.cc (gimple_fold_partial_load_store_mem_ref): Fix gimple fold of LOAD/STORE with length. 2023-06-26 Andrew MacLeod * gimple-range-gori.cc (compute_operand1_and_operand2_range): Check for interdependence between operands 1 and 2. 2023-06-26 Richard Sandiford * tree-vect-stmts.cc (vectorizable_conversion): Take multi_step_cvt into account when costing non-widening/truncating conversions. 2023-06-26 Richard Biener PR tree-optimization/110381 * tree-vect-slp.cc (vect_optimize_slp_pass::start_choosing_layouts): Materialize permutes before fold-left reductions. 2023-06-26 Pan Li * config/riscv/riscv-vector-builtins-bases.h: Remove duplicated decl. 2023-06-26 Richard Biener * varasm.cc (initializer_constant_valid_p_1): Also constrain the type of value to be scalar integral before dispatching to narrowing_initializer_constant_valid_p. 2023-06-26 Richard Biener * tree-ssa-scopedtables.cc (hashable_expr_equal_p): Use element_precision. 2023-06-26 Juzhe-Zhong * config/riscv/autovec.md (vcond): Remove redundant vcond patterns. (vcondu): Ditto. * config/riscv/riscv-protos.h (expand_vcond): Ditto. * config/riscv/riscv-v.cc (expand_vcond): Ditto. 2023-06-26 Richard Biener PR tree-optimization/110392 * gimple-predicate-analysis.cc (uninit_analysis::is_use_guarded): Do early exits on true/false predicate only after normalization. 2023-06-26 Ju-Zhe Zhong * tree-ssa-sccvn.cc (vn_reference_lookup_3): Change name "len" into "length". 2023-06-26 Roger Sayle * config/i386/i386.md (peephole2): Simplify zeroing a register followed by an IOR, XOR or PLUS operation on it, into a move. (*ashl3_doubleword_highpart): New define_insn_and_split to eliminate (and hide from reload) unnecessary word to doubleword extensions that are followed by left shifts by sufficiently large, but valid, bit counts. 2023-06-26 liuhongt PR tree-optimization/110371 PR tree-optimization/110018 * tree-vect-stmts.cc (vectorizable_conversion): Use cvt_op to save intermediate type operand instead of "subtle" vec_dest for case NONE. 2023-06-26 liuhongt PR tree-optimization/110371 PR tree-optimization/110018 * tree-vect-stmts.cc (vectorizable_conversion): Don't use intermiediate type for FIX_TRUNC_EXPR when ftrapping-math. 2023-06-26 Hongyu Wang * config/i386/i386-options.cc (ix86_valid_target_attribute_tree): Override tune_string with arch_string if tune_string is not explicitly specified. 2023-06-25 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (vector_insn_info::parse_insn): Ehance AVL propagation. * config/riscv/riscv-vsetvl.h: New function. 2023-06-25 Li Xu * config/riscv/riscv-vector-builtins-bases.cc: change emit_insn to emit_move_insn 2023-06-25 Juzhe-Zhong * config/riscv/autovec.md (len_load_): Remove. (len_maskload): Remove. (len_store_): New pattern. (len_maskstore): New pattern. * config/riscv/predicates.md (autovec_length_operand): New predicate. * config/riscv/riscv-protos.h (enum insn_type): New enum. (expand_load_store): New function. * config/riscv/riscv-v.cc (emit_vlmax_masked_insn): Ditto. (emit_nonvlmax_masked_insn): Ditto. (expand_load_store): Ditto. * config/riscv/riscv-vector-builtins.cc (function_expander::use_contiguous_store_insn): Add avl_type operand into pred_store. * config/riscv/vector.md: Ditto. 2023-06-25 Ju-Zhe Zhong * internal-fn.cc (expand_partial_store_optab_fn): Fix bug of BIAS argument index. 2023-06-25 Pan Li * config/riscv/vector.md: Revert. 2023-06-25 Pan Li * config/riscv/genrvv-type-indexer.cc (valid_type): Revert changes. * config/riscv/riscv-modes.def (RVV_TUPLE_MODES): Ditto. (ADJUST_ALIGNMENT): Ditto. (RVV_TUPLE_PARTIAL_MODES): Ditto. (ADJUST_NUNITS): Ditto. * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4x2_t): Ditto. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Diito. (vfloat16m2x4_t): Diito. (vfloat16m4x2_t): Diito. * config/riscv/riscv-vector-builtins.def (vfloat16mf4x2_t): Ditto. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/riscv-vector-switch.def (TUPLE_ENTRY): Ditto. * config/riscv/riscv.md: Ditto. * config/riscv/vector-iterators.md: Ditto. 2023-06-25 Ju-Zhe Zhong * gimple-fold.cc (arith_overflowed_p): Apply LEN_MASK_{LOAD,STORE}. (gimple_fold_partial_load_store_mem_ref): Ditto. (gimple_fold_partial_store): Ditto. (gimple_fold_call): Ditto. 2023-06-25 liuhongt PR target/110309 * config/i386/sse.md (maskload): Refine pattern with UNSPEC_MASKLOAD. (maskload): Ditto. (*_load_mask): Extend mode iterator to VI12HFBF_AVX512VL. (*_load): Ditto. 2023-06-25 Ju-Zhe Zhong * tree-ssa-alias.cc (call_may_clobber_ref_p_1): Add LEN_MASK_STORE. 2023-06-25 Ju-Zhe Zhong * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Apply LEN_MASK_{LOAD,STORE} 2023-06-25 yulong * config/riscv/vector.md: Add float16 attr at sew、vlmul and ratio. 2023-06-24 Roger Sayle * config/i386/i386.md (*qi_ext_3): New define_insn. 2023-06-24 Juzhe-Zhong * config/riscv/autovec.md (*fma): set clobber to Pmode in expand stage. (*fma): Ditto. (*fnma): Ditto. (*fnma): Ditto. 2023-06-24 Juzhe-Zhong * config/riscv/autovec.md (fma4): New pattern. (*fma): Ditto. (fnma4): Ditto. (*fnma): Ditto. (fms4): Ditto. (*fms): Ditto. (fnms4): Ditto. (*fnms): Ditto. * config/riscv/riscv-protos.h (emit_vlmax_fp_ternary_insn): New function. * config/riscv/riscv-v.cc (emit_vlmax_fp_ternary_insn): Ditto. * config/riscv/vector.md: Fix attribute bug. 2023-06-24 Ju-Zhe Zhong * tree-ssa-loop-ivopts.cc (get_mem_type_for_internal_fn): Apply LEN_MASK_{LOAD,STORE}. 2023-06-24 Ju-Zhe Zhong * tree-ssa-loop-ivopts.cc (get_alias_ptr_type_for_ptr_address): Add LEN_MASK_{LOAD,STORE}. 2023-06-24 David Malcolm * diagnostic-format-sarif.cc: Add #define INCLUDE_VECTOR. * diagnostic.cc: Likewise. * text-art/box-drawing.cc: Likewise. * text-art/canvas.cc: Likewise. * text-art/ruler.cc: Likewise. * text-art/selftests.cc: Likewise. * text-art/selftests.h (text_art::canvas): New forward decl. * text-art/style.cc: Add #define INCLUDE_VECTOR. * text-art/styled-string.cc: Likewise. * text-art/table.cc: Likewise. * text-art/table.h: Remove #include . * text-art/theme.cc: Add #define INCLUDE_VECTOR. * text-art/types.h: Check that INCLUDE_VECTOR is defined. Remove #include of and . * text-art/widget.cc: Add #define INCLUDE_VECTOR. * text-art/widget.h: Remove #include . 2023-06-24 Ju-Zhe Zhong * internal-fn.cc (expand_partial_store_optab_fn): Adapt for LEN_MASK_STORE. (internal_load_fn_p): Add LEN_MASK_LOAD. (internal_store_fn_p): Add LEN_MASK_STORE. (internal_fn_mask_index): Add LEN_MASK_{LOAD,STORE}. (internal_fn_stored_value_index): Add LEN_MASK_STORE. (internal_len_load_store_bias): Add LEN_MASK_{LOAD,STORE}. * optabs-tree.cc (can_vec_mask_load_store_p): Adapt for LEN_MASK_{LOAD,STORE}. (get_len_load_store_mode): Ditto. * optabs-tree.h (can_vec_mask_load_store_p): Ditto. (get_len_load_store_mode): Ditto. * tree-vect-stmts.cc (check_load_store_for_partial_vectors): Ditto. (get_all_ones_mask): New function. (vectorizable_store): Apply LEN_MASK_{LOAD,STORE} into vectorizer. (vectorizable_load): Ditto. 2023-06-23 Marek Polacek * doc/cpp.texi (__cplusplus): Document value for -std=c++26 and -std=gnu++26. Document that for C++23, its value is 202302L. * doc/invoke.texi: Document -std=c++26 and -std=gnu++26. * dwarf2out.cc (highest_c_language): Handle GNU C++26. (gen_compile_unit_die): Likewise. 2023-06-23 Jan Hubicka * tree-ssa-phiprop.cc (propagate_with_phi): Compute post dominators on demand. (pass_phiprop::execute): Do not compute it here; return update_ssa_only_virtuals if something changed. (pass_data_phiprop): Remove TODO_update_ssa from todos. 2023-06-23 Michael Meissner Aaron Sawdey PR target/105325 * config/rs6000/genfusion.pl (gen_ld_cmpi_p10_one): Fix problems that allowed prefixed lwa to be generated. * config/rs6000/fusion.md: Regenerate. * config/rs6000/predicates.md (ds_form_mem_operand): Delete. * config/rs6000/rs6000.md (prefixed attribute): Add support for load plus compare immediate fused insns. (maybe_prefixed): Likewise. 2023-06-23 Roger Sayle * simplify-rtx.cc (simplify_subreg): Optimize lowpart SUBREGs of ASHIFT to const0_rtx with sufficiently large shift count. Optimize highpart SUBREGs of ASHIFT as the shift operand when the shift count is the correct offset. Optimize SUBREGs of multi-word logic operations if the SUBREGs of both operands can be simplified. 2023-06-23 Richard Biener * varasm.cc (initializer_constant_valid_p_1): Only allow conversions between scalar floating point types. 2023-06-23 Richard Biener * tree-vect-stmts.cc (vectorizable_assignment): Properly handle non-integral operands when analyzing conversions. 2023-06-23 Prathamesh Kulkarni PR tree-optimization/110280 * match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector using build_vector_from_val with the element of input operand, and mask's type if operand and mask's types don't match. 2023-06-23 Richard Biener * fold-const.cc (tree_simple_nonnegative_warnv_p): Guard the truth_value_p case with !VECTOR_TYPE_P. 2023-06-23 Richard Biener * tree-vect-patterns.cc (vect_look_through_possible_promotion): Exit early when the type isn't scalar integral. 2023-06-23 Richard Biener * match.pd ((outertype)((innertype0)a+(innertype1)b) -> ((newtype)a+(newtype)b)): Use element_precision where appropriate. 2023-06-23 Richard Biener * fold-const.cc (fold_binary_loc): Use element_precision when trying (double)float1 CMP (double)float2 to float1 CMP float2 simplification. * match.pd: Likewise. 2023-06-23 Richard Biener * tree-vect-stmts.cc (vectorizable_load): Avoid useless copies of VMAT_INVARIANT vectorized stmts, fix SLP support. 2023-06-23 Richard Biener * tree-vect-stmts.cc (vector_vector_composition_type): Handle composition of a vector from a number of elements that happens to match its number of lanes. 2023-06-22 Marek Polacek * configure.ac (--enable-host-bind-now): New check. Add -Wl,-z,now to LD_PICFLAG if --enable-host-bind-now. * configure: Regenerate. * doc/install.texi: Document --enable-host-bind-now. 2023-06-22 Di Zhao OS * config/aarch64/aarch64.cc: Change fma_reassoc_width for ampere1. 2023-06-22 Richard Biener PR tree-optimization/110332 * tree-ssa-phiprop.cc (propagate_with_phi): Always check aliasing with edge inserted loads. 2023-06-22 Roger Sayle Uros Bizjak * config/i386/i386-expand.cc (ix86_expand_sse_ptest): Recognize expansion of ptestc with equal operands as producing const1_rtx. * config/i386/i386.cc (ix86_rtx_costs): Provide accurate cost estimates of UNSPEC_PTEST, where the ptest performs the PAND or PAND of its operands. * config/i386/sse.md (define_split): Transform CCCmode UNSPEC_PTEST of reg_equal_p operands into an x86_stc instruction. (define_split): Split pandn/ptestz/set{n?}e into ptestc/set{n?}c. (define_split): Similar to above for strict_low_part destinations. (define_split): Split pandn/ptestz/j{n?}e into ptestc/j{n?}c. 2023-06-22 David Malcolm PR analyzer/106626 * Makefile.in (ANALYZER_OBJS): Add analyzer/access-diagram.o. * doc/invoke.texi (Wanalyzer-out-of-bounds): Add description of text art. (fanalyzer-debug-text-art): New. 2023-06-22 David Malcolm * Makefile.in (OBJS-libcommon): Add text-art/box-drawing.o, text-art/canvas.o, text-art/ruler.o, text-art/selftests.o, text-art/style.o, text-art/styled-string.o, text-art/table.o, text-art/theme.o, and text-art/widget.o. * color-macros.h (COLOR_FG_BRIGHT_BLACK): New. (COLOR_FG_BRIGHT_RED): New. (COLOR_FG_BRIGHT_GREEN): New. (COLOR_FG_BRIGHT_YELLOW): New. (COLOR_FG_BRIGHT_BLUE): New. (COLOR_FG_BRIGHT_MAGENTA): New. (COLOR_FG_BRIGHT_CYAN): New. (COLOR_FG_BRIGHT_WHITE): New. (COLOR_BG_BRIGHT_BLACK): New. (COLOR_BG_BRIGHT_RED): New. (COLOR_BG_BRIGHT_GREEN): New. (COLOR_BG_BRIGHT_YELLOW): New. (COLOR_BG_BRIGHT_BLUE): New. (COLOR_BG_BRIGHT_MAGENTA): New. (COLOR_BG_BRIGHT_CYAN): New. (COLOR_BG_BRIGHT_WHITE): New. * common.opt (fdiagnostics-text-art-charset=): New option. (diagnostic-text-art.h): New SourceInclude. (diagnostic_text_art_charset) New Enum and EnumValues. * configure: Regenerate. * configure.ac (gccdepdir): Add text-art to loop. * diagnostic-diagram.h: New file. * diagnostic-format-json.cc (json_emit_diagram): New. (diagnostic_output_format_init_json): Wire it up to context->m_diagrams.m_emission_cb. * diagnostic-format-sarif.cc: Include "diagnostic-diagram.h" and "text-art/canvas.h". (sarif_result::on_nested_diagnostic): Move code to... (sarif_result::add_related_location): ...this new function. (sarif_result::on_diagram): New. (sarif_builder::emit_diagram): New. (sarif_builder::make_message_object_for_diagram): New. (sarif_emit_diagram): New. (diagnostic_output_format_init_sarif): Set context->m_diagrams.m_emission_cb to sarif_emit_diagram. * diagnostic-text-art.h: New file. * diagnostic.cc: Include "diagnostic-text-art.h", "diagnostic-diagram.h", and "text-art/theme.h". (diagnostic_initialize): Initialize context->m_diagrams and call diagnostics_text_art_charset_init. (diagnostic_finish): Clean up context->m_diagrams.m_theme. (diagnostic_emit_diagram): New. (diagnostics_text_art_charset_init): New. * diagnostic.h (text_art::theme): New forward decl. (class diagnostic_diagram): Likewise. (diagnostic_context::m_diagrams): New field. (diagnostic_emit_diagram): New decl. * doc/invoke.texi (Diagnostic Message Formatting Options): Add -fdiagnostics-text-art-charset=. (-fdiagnostics-plain-output): Add -fdiagnostics-text-art-charset=none. * gcc.cc: Include "diagnostic-text-art.h". (driver_handle_option): Handle OPT_fdiagnostics_text_art_charset_. * opts-common.cc (decode_cmdline_options_to_array): Add "-fdiagnostics-text-art-charset=none" to expanded_args for -fdiagnostics-plain-output. * opts.cc: Include "diagnostic-text-art.h". (common_handle_option): Handle OPT_fdiagnostics_text_art_charset_. * pretty-print.cc (pp_unicode_character): New. * pretty-print.h (pp_unicode_character): New decl. * selftest-run-tests.cc: Include "text-art/selftests.h". (selftest::run_tests): Call text_art_tests. * text-art/box-drawing-chars.inc: New file, generated by contrib/unicode/gen-box-drawing-chars.py. * text-art/box-drawing.cc: New file. * text-art/box-drawing.h: New file. * text-art/canvas.cc: New file. * text-art/canvas.h: New file. * text-art/ruler.cc: New file. * text-art/ruler.h: New file. * text-art/selftests.cc: New file. * text-art/selftests.h: New file. * text-art/style.cc: New file. * text-art/styled-string.cc: New file. * text-art/table.cc: New file. * text-art/table.h: New file. * text-art/theme.cc: New file. * text-art/theme.h: New file. * text-art/types.h: New file. * text-art/widget.cc: New file. * text-art/widget.h: New file. 2023-06-21 Uros Bizjak * function.h (emit_initial_value_sets): Change return type from int to void. (aggregate_value_p): Change return type from int to bool. (prologue_contains): Ditto. (epilogue_contains): Ditto. (prologue_epilogue_contains): Ditto. * function.cc (temp_slot): Make "in_use" variable bool. (make_slot_available): Update for changed "in_use" variable. (assign_stack_temp_for_type): Ditto. (emit_initial_value_sets): Change return type from int to void and update function body accordingly. (instantiate_virtual_regs): Ditto. (rest_of_handle_thread_prologue_and_epilogue): Ditto. (safe_insn_predicate): Change return type from int to bool. (aggregate_value_p): Change return type from int to bool and update function body accordingly. (prologue_contains): Change return type from int to bool. (prologue_epilogue_contains): Ditto. 2023-06-21 Alexander Monakov * common.opt (fp_contract_mode) [on]: Remove fallback. * config/sh/sh.md (*fmasf4): Correct flag_fp_contract_mode test. * doc/invoke.texi (-ffp-contract): Update. * trans-mem.cc (diagnose_tm_1): Skip internal function calls. 2023-06-21 Kyrylo Tkachov * config/aarch64/aarch64-sve.md (mask_gather_load): Add alternatives to prefer to avoid same input and output Z register. (mask_gather_load): Likewise. (*mask_gather_load_xtw_unpacked): Likewise. (*mask_gather_load_sxtw): Likewise. (*mask_gather_load_uxtw): Likewise. (@aarch64_gather_load_): Likewise. (@aarch64_gather_load_): Likewise. (*aarch64_gather_load_ _xtw_unpacked): Likewise. (*aarch64_gather_load_ _sxtw): Likewise. (*aarch64_gather_load_ _uxtw): Likewise. (@aarch64_ldff1_gather): Likewise. (@aarch64_ldff1_gather): Likewise. (*aarch64_ldff1_gather_sxtw): Likewise. (*aarch64_ldff1_gather_uxtw): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (*aarch64_ldff1_gather_ _sxtw): Likewise. (*aarch64_ldff1_gather_ _uxtw): Likewise. * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt): Likewise. (@aarch64_gather_ldnt_ ): Likewise. 2023-06-21 Kyrylo Tkachov * config/aarch64/aarch64-sve.md (mask_gather_load): Convert to compact alternatives syntax. (mask_gather_load): Likewise. (*mask_gather_load_xtw_unpacked): Likewise. (*mask_gather_load_sxtw): Likewise. (*mask_gather_load_uxtw): Likewise. (@aarch64_gather_load_): Likewise. (@aarch64_gather_load_): Likewise. (*aarch64_gather_load_ _xtw_unpacked): Likewise. (*aarch64_gather_load_ _sxtw): Likewise. (*aarch64_gather_load_ _uxtw): Likewise. (@aarch64_ldff1_gather): Likewise. (@aarch64_ldff1_gather): Likewise. (*aarch64_ldff1_gather_sxtw): Likewise. (*aarch64_ldff1_gather_uxtw): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (*aarch64_ldff1_gather_ _sxtw): Likewise. (*aarch64_ldff1_gather_ _uxtw): Likewise. * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt): Likewise. (@aarch64_gather_ldnt_ ): Likewise. 2023-06-21 Kyrylo Tkachov Revert: 2023-06-21 Kyrylo Tkachov * config/aarch64/aarch64-sve.md (mask_gather_load): Convert to compact alternatives syntax. (mask_gather_load): Likewise. (*mask_gather_load_xtw_unpacked): Likewise. (*mask_gather_load_sxtw): Likewise. (*mask_gather_load_uxtw): Likewise. (@aarch64_gather_load_): Likewise. (@aarch64_gather_load_): Likewise. (*aarch64_gather_load_ _xtw_unpacked): Likewise. (*aarch64_gather_load_ _sxtw): Likewise. (*aarch64_gather_load_ _uxtw): Likewise. (@aarch64_ldff1_gather): Likewise. (@aarch64_ldff1_gather): Likewise. (*aarch64_ldff1_gather_sxtw): Likewise. (*aarch64_ldff1_gather_uxtw): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (*aarch64_ldff1_gather_ _sxtw): Likewise. (*aarch64_ldff1_gather_ _uxtw): Likewise. * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt): Likewise. (@aarch64_gather_ldnt_ ): Likewise. 2023-06-21 Ju-Zhe Zhong * optabs-query.cc (can_vec_mask_load_store_p): Move to optabs-tree.cc. (get_len_load_store_mode): Ditto. * optabs-query.h (can_vec_mask_load_store_p): Move to optabs-tree.h. (get_len_load_store_mode): Ditto. * optabs-tree.cc (can_vec_mask_load_store_p): New function. (get_len_load_store_mode): Ditto. * optabs-tree.h (can_vec_mask_load_store_p): Ditto. (get_len_load_store_mode): Ditto. * tree-if-conv.cc: include optabs-tree instead of optabs-query 2023-06-21 Richard Biener * tree-ssa-loop-ivopts.cc (add_iv_candidate_for_use): Use split_constant_offset for the POINTER_PLUS_EXPR case. 2023-06-21 Richard Biener * tree-ssa-loop-ivopts.cc (record_group_use): Use split_constant_offset. 2023-06-21 Richard Biener * tree-loop-distribution.cc (classify_builtin_st): Use split_constant_offset. * tree-ssa-loop-ivopts.h (strip_offset): Remove. * tree-ssa-loop-ivopts.cc (strip_offset): Make static. 2023-06-21 Kyrylo Tkachov * config/aarch64/aarch64-sve.md (mask_gather_load): Convert to compact alternatives syntax. (mask_gather_load): Likewise. (*mask_gather_load_xtw_unpacked): Likewise. (*mask_gather_load_sxtw): Likewise. (*mask_gather_load_uxtw): Likewise. (@aarch64_gather_load_): Likewise. (@aarch64_gather_load_): Likewise. (*aarch64_gather_load_ _xtw_unpacked): Likewise. (*aarch64_gather_load_ _sxtw): Likewise. (*aarch64_gather_load_ _uxtw): Likewise. (@aarch64_ldff1_gather): Likewise. (@aarch64_ldff1_gather): Likewise. (*aarch64_ldff1_gather_sxtw): Likewise. (*aarch64_ldff1_gather_uxtw): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (@aarch64_ldff1_gather_ ): Likewise. (*aarch64_ldff1_gather_ _sxtw): Likewise. (*aarch64_ldff1_gather_ _uxtw): Likewise. * config/aarch64/aarch64-sve2.md (@aarch64_gather_ldnt): Likewise. (@aarch64_gather_ldnt_ ): Likewise. 2023-06-21 Tamar Christina PR other/110329 * doc/md.texi: Replace backslashchar. 2023-06-21 Richard Biener * config/i386/i386.cc (ix86_vector_costs::finish_cost): Overload. For masked main loops make sure the vectorization factor isn't more than double the number of iterations. 2023-06-21 Jan Beulich * config/i386/i386-expand.cc (ix86_expand_copysign): Request value duplication by ix86_build_signbit_mask() when AVX512F and not HFmode. * config/i386/sse.md (*_vternlog_all): Convert to 2-alternative form. Adjust "mode" attribute. Add "enabled" attribute. (*_vpternlog_1): Also permit when TARGET_AVX512F && !TARGET_PREFER_AVX256. (*_vpternlog_2): Likewise. (*_vpternlog_3): Likewise. 2023-06-21 liuhongt PR target/110018 * tree-vect-stmts.cc (vectorizable_conversion): Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed. 2023-06-20 Tamar Christina PR bootstrap/110324 * gensupport.cc (convert_syntax): Explicitly check for RTX code. 2023-06-20 Richard Sandiford * config/aarch64/aarch64.md (stack_tie): Hard-code the first register operand to the stack pointer. Require the second register operand to have the number specified in a separate const_int operand. * config/aarch64/aarch64.cc (aarch64_emit_stack_tie): New function. (aarch64_allocate_and_probe_stack_space): Use it. (aarch64_expand_prologue, aarch64_expand_epilogue): Likewise. (aarch64_expand_epilogue): Likewise. 2023-06-20 Jakub Jelinek PR middle-end/79173 * tree-ssa-math-opts.cc (match_uaddc_usubc): Remember lhs of IMAGPART_EXPR of arg2/arg3 and use that as arg3 if it has the right type. 2023-06-20 Uros Bizjak * calls.h (setjmp_call_p): Change return type from int to bool. * calls.cc (struct arg_data): Change "pass_on_stack" to bool. (store_one_arg): Change return type from int to bool and adjust function body accordingly. Change "sibcall_failure" variable to bool. (finalize_must_preallocate): Ditto. Change *must_preallocate pointer argument to bool. Change "partial_seen" variable to bool. (load_register_parameters): Change *sibcall_failure pointer argument to bool. (check_sibcall_argument_overlap_1): Change return type from int to bool and adjust function body accordingly. (check_sibcall_argument_overlap): Ditto. Change "mark_stored_args_map" argument to bool. (emit_call_1): Change "already_popped" variable to bool. (setjmp_call_p): Change return type from int to bool and adjust function body accordingly. (initialize_argument_information): Change *must_preallocate pointer argument to bool. (expand_call): Change "pcc_struct_value", "must_preallocate" and "sibcall_failure" variables to bool. (emit_library_call_value_1): Change "pcc_struct_value" variable to bool. 2023-06-20 Martin Jambor PR ipa/110276 * ipa-sra.cc (struct caller_issues): New field there_is_one. (check_for_caller_issues): Set it. (check_all_callers_for_issues): Check it. 2023-06-20 Martin Jambor * ipa-prop.h (ipa_uid_to_idx_map_elt): New type. (struct ipcp_transformation): Rearrange members according to C++ class coding convention, add m_uid_to_idx, get_param_index and maybe_create_parm_idx_map. * ipa-cp.cc (ipcp_transformation::get_param_index): New function. (compare_uids): Likewise. (ipcp_transformation::maype_create_parm_idx_map): Likewise. * ipa-prop.cc (ipcp_get_parm_bits): Use get_param_index. (ipcp_update_bits): Accept TS as a parameter, assume it is not NULL. (ipcp_update_vr): Likewise. (ipcp_transform_function): Call, maybe_create_parm_idx_map of TS, bail out quickly if empty, pass it to ipcp_update_bits and ipcp_update_vr. 2023-06-20 Carl Love * config/rs6000/rs6000-builtin.cc (rs6000_expand_builtin): Rename CODE_FOR_xsxsigqp_tf to CODE_FOR_xsxsigqp_tf_ti. Rename CODE_FOR_xsxsigqp_kf to CODE_FOR_xsxsigqp_kf_ti. Rename CCDE_FOR_xsxexpqp_tf to CODE_FOR_xsxexpqp_tf_di. Rename CODE_FOR_xsxexpqp_kf to CODE_FOR_xsxexpqp_kf_di. (CODE_FOR_xsxexpqp_kf_v2di, CODE_FOR_xsxsigqp_kf_v1ti, CODE_FOR_xsiexpqp_kf_v2di): Add case statements. * config/rs6000/rs6000-builtins.def (__builtin_vsx_scalar_extract_exp_to_vec, __builtin_vsx_scalar_extract_sig_to_vec, __builtin_vsx_scalar_insert_exp_vqp): Add new builtin definitions. Rename xsxexpqp_kf, xsxsigqp_kf, xsiexpqp_kf to xsexpqp_kf_di, xsxsigqp_kf_ti, xsiexpqp_kf_di respectively. * config/rs6000/rs6000-c.cc (altivec_resolve_overloaded_builtin): Update case RS6000_OVLD_VEC_VSIE to handle MODE_VECTOR_INT for new overloaded instance. Update comments. * config/rs6000/rs6000-overload.def (__builtin_vec_scalar_insert_exp): Add new overload definition with vector arguments. (scalar_extract_exp_to_vec, scalar_extract_sig_to_vec): New overloaded definitions. * config/rs6000/vsx.md (V2DI_DI): New mode iterator. (DI_to_TI): New mode attribute. Rename xsxexpqp_ to sxexpqp__. Rename xsxsigqp_ to xsxsigqp__. Rename xsiexpqp_ to xsiexpqp__. * doc/extend.texi (scalar_extract_exp_to_vec, scalar_extract_sig_to_vec): Add documentation for new builtins. (scalar_insert_exp): Add new overloaded builtin definition. 2023-06-20 Li Xu * config/riscv/riscv.cc (riscv_regmode_natural_size): set the natural size of vector mask mode to one rvv register. 2023-06-20 Juzhe-Zhong * config/riscv/riscv-v.cc (expand_const_vector): Optimize codegen. 2023-06-20 Lehua Ding * config/riscv/riscv.cc (riscv_arg_has_vector): Add default switch handler. 2023-06-20 Richard Biener * tree-ssa-dse.cc (dse_classify_store): When we found no defs and the basic-block with the original definition ends in __builtin_unreachable[_trap] the store is dead. 2023-06-20 Richard Biener * tree-ssa-phiprop.cc (phiprop_insert_phi): For simple loads keep the virtual SSA form up-to-date. 2023-06-20 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (*aarch64_addp_same_reg): New define_insn_and_split. 2023-06-20 Tamar Christina * config/aarch64/aarch64.md (*mov_aarch64): Drop test comment. 2023-06-20 Jan Beulich * config/i386/sse.md (vec_dupv2di): Correct %vmovddup input constraint. Add new AVX512F alternative. 2023-06-20 Richard Biener PR debug/110295 * dwarf2out.cc (process_scope_var): Continue processing the decl after setting a parent in case the existing DIE was in limbo. 2023-06-20 Lehua Ding * config/riscv/riscv.cc (riscv_scalable_vector_type_p): Delete. (riscv_arg_has_vector): Simplify. (riscv_pass_in_vector_p): Adjust warning message. 2023-06-19 Jin Ma * config/riscv/riscv.cc (riscv_compute_frame_info): Allocate frame for FCSR. (riscv_for_each_saved_reg): Save and restore FCSR in interrupt functions. * config/riscv/riscv.md (riscv_frcsr): New patterns. (riscv_fscsr): Likewise. 2023-06-19 Toru Kisuki PR rtl-optimization/110305 * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): Handle HONOR_SNANS for x + 0.0. 2023-06-19 Jan Hubicka PR tree-optimization/109811 PR tree-optimization/109849 * passes.def: Add phiprop to early optimization passes. * tree-ssa-phiprop.cc: Allow clonning. 2023-06-19 Tamar Christina * config/aarch64/aarch64.md (arches): Add nosimd. (*mov_aarch64, *movsi_aarch64, *movdi_aarch64): Rewrite to compact syntax. 2023-06-19 Tamar Christina Omar Tahir * gensupport.cc (class conlist, add_constraints, add_attributes, skip_spaces, expect_char, preprocess_compact_syntax, parse_section_layout, parse_section, convert_syntax): New. (process_rtx): Check for conversion. * genoutput.cc (process_template): Check for unresolved iterators. (class data): Add compact_syntax_p. (gen_insn): Use it. * gensupport.h (compact_syntax): New. (hash-set.h): Include. * doc/md.texi: Document it. 2023-06-19 Uros Bizjak * recog.h (check_asm_operands): Change return type from int to bool. (insn_invalid_p): Ditto. (verify_changes): Ditto. (apply_change_group): Ditto. (constrain_operands): Ditto. (constrain_operands_cached): Ditto. (validate_replace_rtx_subexp): Ditto. (validate_replace_rtx): Ditto. (validate_replace_rtx_part): Ditto. (validate_replace_rtx_part_nosimplify): Ditto. (added_clobbers_hard_reg_p): Ditto. (peep2_regno_dead_p): Ditto. (peep2_reg_dead_p): Ditto. (store_data_bypass_p): Ditto. (if_test_bypass_p): Ditto. * rtl.h (split_all_insns_noflow): Change return type from unsigned int to void. * genemit.cc (output_added_clobbers_hard_reg_p): Change return type of generated added_clobbers_hard_reg_p from int to bool and adjust function body accordingly. Change "used" variable type from int to bool. * recog.cc (check_asm_operands): Change return type from int to bool and adjust function body accordingly. (insn_invalid_p): Ditto. Change "is_asm" variable to bool. (verify_changes): Change return type from int to bool. (apply_change_group): Change return type from int to bool and adjust function body accordingly. (validate_replace_rtx_subexp): Change return type from int to bool. (validate_replace_rtx): Ditto. (validate_replace_rtx_part): Ditto. (validate_replace_rtx_part_nosimplify): Ditto. (constrain_operands_cached): Ditto. (constrain_operands): Ditto. Change "lose" and "win" variables type from int to bool. (split_all_insns_noflow): Change return type from unsigned int to void and adjust function body accordingly. (peep2_regno_dead_p): Change return type from int to bool. (peep2_reg_dead_p): Ditto. (peep2_find_free_register): Change "success" variable type from int to bool (store_data_bypass_p_1): Change return type from int to bool. (store_data_bypass_p): Ditto. 2023-06-19 Li Xu * config/riscv/vector-iterators.md: zvfh/zvfhmin depends on the Zve32f extension. 2023-06-19 Pan Li PR target/110299 * config/riscv/riscv-vector-builtins-bases.cc: Adjust expand for modes. * config/riscv/vector-iterators.md: Remove VWLMUL1, VWLMUL1_ZVE64, VWLMUL1_ZVE32, VI_ZVE64, VI_ZVE32, VWI, VWI_ZVE64, VWI_ZVE32, VF_ZVE63 and VF_ZVE32. * config/riscv/vector.md (@pred_widen_reduc_plus): Removed. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): New pattern. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. (@pred_widen_reduc_plus): Ditto. 2023-06-19 Pan Li PR target/110277 * config/riscv/riscv-vector-builtins-bases.cc: Adjust expand for ret_mode. * config/riscv/vector-iterators.md: Add VHF, VSF, VDF, VHF_LMUL1, VSF_LMUL1, VDF_LMUL1, and remove unused attr. * config/riscv/vector.md (@pred_reduc_): Removed. (@pred_reduc_): Ditto. (@pred_reduc_): Ditto. (@pred_reduc_plus): Ditto. (@pred_reduc_plus): Ditto. (@pred_reduc_plus): Ditto. (@pred_reduc_): New pattern. (@pred_reduc_): Ditto. (@pred_reduc_): Ditto. (@pred_reduc_plus): Ditto. (@pred_reduc_plus): Ditto. (@pred_reduc_plus): Ditto. 2023-06-19 Andrew Stubbs * config/gcn/gcn.cc (gcn_expand_divmod_libfunc): New function. (gcn_init_libfuncs): Add div and mod functions for all modes. Add placeholders for divmod functions. (TARGET_EXPAND_DIVMOD_LIBFUNC): Define. 2023-06-19 Andrew Stubbs * tree-vect-generic.cc: Include optabs-libfuncs.h. (get_compute_type): Check optab_libfunc. * tree-vect-stmts.cc: Include optabs-libfuncs.h. (vectorizable_operation): Check optab_libfunc. 2023-06-19 Andrew Stubbs * config/gcn/gcn-protos.h (vgpr_4reg_mode_p): New function. * config/gcn/gcn-valu.md (V_4REG, V_4REG_ALT): New iterators. (V_MOV, V_MOV_ALT): Likewise. (scalar_mode, SCALAR_MODE): Add TImode. (vnsi, VnSI, vndi, VnDI): Likewise. (vec_merge, vec_merge_with_clobber, vec_merge_with_vcc): Use V_MOV. (mov, mov_unspec): Use V_MOV. (*mov_4reg): New insn. (mov_exec): New 4reg variant. (mov_sgprbase): Likewise. (reload_in, reload_out): Use V_MOV. (vec_set): Likewise. (vec_duplicate): New 4reg variant. (vec_extract): Likewise. (vec_extract): Rename to ... (vec_extract): ... this, and use V_MOV. (vec_extract_nop): New 4reg variant. (fold_extract_last_): Use V_MOV. (vec_init): Rename to ... (vec_init): ... this, and use V_MOV. (gather_load, gather_expr, gather_insn_1offset, gather_insn_1offset_ds, gather_insn_2offsets): Use V_MOV. (scatter_store, scatter_expr, scatter_insn_1offset, scatter_insn_1offset_ds, scatter_insn_2offsets): Likewise. (maskloaddi, maskstoredi, mask_gather_load, mask_scatter_store): Likewise. * config/gcn/gcn.cc (gcn_class_max_nregs): Use vgpr_4reg_mode_p. (gcn_hard_regno_mode_ok): Likewise. (GEN_VNM): Add TImode support. (USE_TI): New macro. Separate TImode operations from non-TImode ones. (gcn_vector_mode_supported_p): Add V64TImode, V32TImode, V16TImode, V8TImode, and V2TImode. (print_operand): Add 'J' and 'K' print codes. 2023-06-19 Richard Biener PR tree-optimization/110298 * tree-ssa-loop-ivcanon.cc (tree_unroll_loops_completely): Clear number of iterations info before cleaning up the CFG. 2023-06-19 Kyrylo Tkachov * simplify-rtx.cc (simplify_context::simplify_binary_operation_1): Simplify vec_concat of lowpart subreg and high part vec_select. 2023-06-19 Tobias Burnus * doc/invoke.texi (-foffload-options): Remove '-O3' from the examples. 2023-06-19 Richard Sandiford * tree-vect-loop-manip.cc (vect_set_loop_condition_partial_vectors): Handle null niters_skip. 2023-06-19 Richard Biener * config/aarch64/aarch64.cc (aarch64_vector_costs::analyze_loop_vinfo): Fix reference to LOOP_VINFO_MASKS. 2023-06-19 Senthil Kumar Selvaraj PR target/105523 * common/config/avr/avr-common.cc: Remove setting of OPT_fdelete_null_pointer_checks. * config/avr/avr.cc (avr_option_override): Clear flag_delete_null_pointer_checks if zero_address_valid. (avr_addr_space_zero_address_valid): New function. (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Provide target hook. 2023-06-19 Ju-Zhe Zhong Robin Dapp * doc/md.texi: Add len_mask{load,store}. * genopinit.cc (main): Ditto. (CMP_NAME): Ditto. * internal-fn.cc (len_maskload_direct): Ditto. (len_maskstore_direct): Ditto. (expand_call_mem_ref): Ditto. (expand_partial_load_optab_fn): Ditto. (expand_len_maskload_optab_fn): Ditto. (expand_partial_store_optab_fn): Ditto. (expand_len_maskstore_optab_fn): Ditto. (direct_len_maskload_optab_supported_p): Ditto. (direct_len_maskstore_optab_supported_p): Ditto. * internal-fn.def (LEN_MASK_LOAD): Ditto. (LEN_MASK_STORE): Ditto. * optabs.def (OPTAB_CD): Ditto. 2023-06-19 Robin Dapp * config/riscv/autovec.md (2): Add unop expanders. 2023-06-19 Robin Dapp * config/riscv/autovec.md (3): Implement binop expander. * config/riscv/riscv-protos.h (emit_vlmax_fp_insn): Declare. (enum vxrm_field_enum): Rename this... (enum fixed_point_rounding_mode): ...to this. (enum frm_field_enum): Rename this... (enum floating_point_rounding_mode): ...to this. * config/riscv/riscv-v.cc (emit_vlmax_fp_insn): New function * config/riscv/riscv.cc (riscv_const_insns): Clarify const vector handling. (riscv_libgcc_floating_mode_supported_p): Adjust comment. (riscv_excess_precision): Do not convert to float for ZVFH. * config/riscv/vector-iterators.md: Add VF_AUTO iterator. 2023-06-19 Robin Dapp * config/riscv/vector-iterators.md: Add VI_QH iterator. * config/riscv/autovec-opt.md (@pred_extract_first_sextdi): New vmv.x.s pattern that includes sign extension. (@pred_extract_first_sextsi): Dito for SImode. 2023-06-19 Robin Dapp * config/riscv/autovec.md (vec_set): Implement. (vec_extract): Implement. * config/riscv/riscv-protos.h (enum insn_type): Add slide insn. (emit_vlmax_slide_insn): Declare. (emit_nonvlmax_slide_tu_insn): Declare. (emit_scalar_move_insn): Export. (emit_nonvlmax_integer_move_insn): Export. * config/riscv/riscv-v.cc (emit_vlmax_slide_insn): New function. (emit_nonvlmax_slide_tu_insn): New function. (emit_vlmax_masked_mu_insn): No change. (emit_vlmax_integer_move_insn): Export. 2023-06-19 Richard Biener * tree-vectorizer.h (enum vect_partial_vector_style): New. (_loop_vec_info::partial_vector_style): Likewise. (LOOP_VINFO_PARTIAL_VECTORS_STYLE): Likewise. (rgroup_controls::compare_type): Add. (vec_loop_masks): Change from a typedef to auto_vec<> to a structure. * tree-vect-loop-manip.cc (vect_set_loop_condition_partial_vectors): Adjust. Convert niters_skip to compare_type. (vect_set_loop_condition_partial_vectors_avx512): New function implementing the AVX512 partial vector codegen. (vect_set_loop_condition): Dispatch to the correct vect_set_loop_condition_partial_vectors_* function based on LOOP_VINFO_PARTIAL_VECTORS_STYLE. (vect_prepare_for_masked_peels): Compute LOOP_VINFO_MASK_SKIP_NITERS in the original niter type. * tree-vect-loop.cc (_loop_vec_info::_loop_vec_info): Initialize partial_vector_style. (can_produce_all_loop_masks_p): Adjust. (vect_verify_full_masking): Produce the rgroup_controls vector here. Set LOOP_VINFO_PARTIAL_VECTORS_STYLE on success. (vect_verify_full_masking_avx512): New function implementing verification of AVX512 style masking. (vect_verify_loop_lens): Set LOOP_VINFO_PARTIAL_VECTORS_STYLE. (vect_analyze_loop_2): Also try AVX512 style masking. Adjust condition. (vect_estimate_min_profitable_iters): Implement AVX512 style mask producing cost. (vect_record_loop_mask): Do not build the rgroup_controls vector here but record masks in a hash-set. (vect_get_loop_mask): Implement AVX512 style mask query, complementing the existing while_ult style. 2023-06-19 Richard Biener * tree-vectorizer.h (vect_get_loop_mask): Add loop_vec_info argument. * tree-vect-loop.cc (vect_get_loop_mask): Likewise. (vectorize_fold_left_reduction): Adjust. (vect_transform_reduction): Likewise. (vectorizable_live_operation): Likewise. * tree-vect-stmts.cc (vectorizable_call): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vectorizable_condition): Likewise. 2023-06-19 Senthil Kumar Selvaraj PR target/110086 * config/avr/avr.opt (mgas-isr-prologues, mmain-is-OS_task): Add Optimization option property. 2023-06-19 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (xtensa_constantsynth_2insn): Add new pattern for the abovementioned case. 2023-06-19 Takayuki 'January June' Suwa * config/xtensa/xtensa.cc (TARGET_MEMORY_MOVE_COST, xtensa_memory_move_cost): Remove. 2023-06-19 Jiufu Guo * config/rs6000/rs6000.cc (TARGET_CONST_ANCHOR): New define. 2023-06-19 Jiufu Guo * cse.cc (try_const_anchors): Check SCALAR_INT_MODE. 2023-06-19 liuhongt PR target/110235 * config/i386/sse.md (_packsswb): Substitute with .. (sse2_packsswb): .. this, .. (avx2_packsswb): .. this and .. (avx512bw_packsswb): .. this. (_packssdw): Substitute with .. (sse2_packssdw): .. this, .. (avx2_packssdw): .. this and .. (avx512bw_packssdw): .. this. 2023-06-19 liuhongt PR target/110235 * config/i386/i386-expand.cc (ix86_split_mmx_pack): Use UNSPEC_US_TRUNCATE instead of original us_truncate for packusdw/packuswb. * config/i386/mmx.md (mmx_packswb): Substitute with .. (mmx_packsswb): .. this and .. (mmx_packuswb): .. this. (mmx_packusdw): Use UNSPEC_US_TRUNCATE instead of original us_truncate. (s_trunsuffix): Removed code iterator. (any_s_truncate): Ditto. * config/i386/sse.md (_packuswb): Use UNSPEC_US_TRUNCATE instead of original us_truncate. (_packusdw): Ditto. * config/i386/i386.md (UNSPEC_US_TRUNCATE): New unspec_c_enum. 2023-06-18 Pan Li * config/riscv/riscv-vector-builtins-bases.cc: Fix one typo. 2023-06-18 Uros Bizjak * rtl.h (*rtx_equal_p_callback_function): Change return type from int to bool. (rtx_equal_p): Ditto. (*hash_rtx_callback_function): Ditto. * rtl.cc (rtx_equal_p): Change return type from int to bool and adjust function body accordingly. * early-remat.cc (scratch_equal): Ditto. * sel-sched-ir.cc (skip_unspecs_callback): Ditto. (hash_with_unspec_callback): Ditto. 2023-06-18 Jeff Law * config/arc/arc.md (movqi_insn): Allow certain constants to be stored into memory in the pattern's condition. (movsf_insn): Similarly. 2023-06-18 Honza PR tree-optimization/109849 * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Add new parameter ES; handle ipa_predicate::not_sra_candidate. (evaluate_properties_for_edge): Pass es to evaluate_conditions_for_known_args. (ipa_fn_summary_t::duplicate): Handle sra candidates. (dump_ipa_call_summary): Dump points_to_possible_sra_candidate. (load_or_store_of_ptr_parameter): New function. (points_to_possible_sra_candidate_p): New function. (analyze_function_body): Initialize points_to_possible_sra_candidate; determine sra predicates. (estimate_ipcp_clone_size_and_time): Update call of evaluate_conditions_for_known_args. (remap_edge_params): Update points_to_possible_sra_candidate. (read_ipa_call_summary): Stream points_to_possible_sra_candidate (write_ipa_call_summary): Likewise. * ipa-predicate.cc (ipa_predicate::add_clause): Handle not_sra_candidate. (dump_condition): Dump it. * ipa-predicate.h (struct inline_param_summary): Add points_to_possible_sra_candidate. 2023-06-18 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_carry): New helper function for setting the carry flag. (ix86_expand_builtin) : Use it here. * config/i386/i386-protos.h (ix86_expand_carry): Prototype here. * config/i386/i386.md (uaddc5): Use ix86_expand_carry. (usubc5): Likewise. 2023-06-18 Roger Sayle * config/i386/i386.md (*concat3_1): Use QImode for the immediate constant shift count. (*concat3_2): Likewise. (*concat3_3): Likewise. (*concat3_4): Likewise. (*concat3_5): Likewise. (*concat3_6): Likewise. 2023-06-18 Uros Bizjak * cse.cc (hash_rtx_cb): Rename to hash_rtx. (hash_rtx): Remove. * early-remat.cc (remat_candidate_hasher::equal): Update to call rtx_equal_p with rtx_equal_p_callback_function argument. * rtl.cc (rtx_equal_p_cb): Rename to rtx_equal_p. (rtx_equal_p): Remove. * rtl.h (rtx_equal_p): Add rtx_equal_p_callback_function argument with NULL default value. (rtx_equal_p_cb): Remove function declaration. (hash_rtx_cb): Ditto. (hash_rtx): Add hash_rtx_callback_function argument with NULL default value. * sel-sched-ir.cc (free_nop_pool): Update function comment. (skip_unspecs_callback): Ditto. (vinsn_init): Update to call hash_rtx with hash_rtx_callback_function argument. (vinsn_equal_p): Ditto. 2023-06-18 yulong * config/riscv/genrvv-type-indexer.cc (valid_type): Enable FP16 tuple. * config/riscv/riscv-modes.def (RVV_TUPLE_MODES): New macro. (ADJUST_ALIGNMENT): Ditto. (RVV_TUPLE_PARTIAL_MODES): Ditto. (ADJUST_NUNITS): Ditto. * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4x2_t): New types. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/riscv-vector-builtins.def (vfloat16mf4x2_t): New macro. (vfloat16mf4x3_t): Ditto. (vfloat16mf4x4_t): Ditto. (vfloat16mf4x5_t): Ditto. (vfloat16mf4x6_t): Ditto. (vfloat16mf4x7_t): Ditto. (vfloat16mf4x8_t): Ditto. (vfloat16mf2x2_t): Ditto. (vfloat16mf2x3_t): Ditto. (vfloat16mf2x4_t): Ditto. (vfloat16mf2x5_t): Ditto. (vfloat16mf2x6_t): Ditto. (vfloat16mf2x7_t): Ditto. (vfloat16mf2x8_t): Ditto. (vfloat16m1x2_t): Ditto. (vfloat16m1x3_t): Ditto. (vfloat16m1x4_t): Ditto. (vfloat16m1x5_t): Ditto. (vfloat16m1x6_t): Ditto. (vfloat16m1x7_t): Ditto. (vfloat16m1x8_t): Ditto. (vfloat16m2x2_t): Ditto. (vfloat16m2x3_t): Ditto. (vfloat16m2x4_t): Ditto. (vfloat16m4x2_t): Ditto. * config/riscv/riscv-vector-switch.def (TUPLE_ENTRY): New. * config/riscv/riscv.md: New. * config/riscv/vector-iterators.md: New. 2023-06-17 Roger Sayle * config/i386/i386-expand.cc (ix86_expand_move): Check that OP1 is CONST_WIDE_INT_P before calling ix86_convert_wide_int_to_broadcast. Generalize special case for converting TImode to V1TImode to handle all 128-bit vector conversions. 2023-06-17 Costas Argyris * gcc-ar.cc (main): Refactor to slightly reduce code duplication. Avoid unnecessary elements in nargv. 2023-06-16 Pan Li PR target/110265 * config/riscv/riscv-vector-builtins-bases.cc: Add ret_mode for integer reduction expand. * config/riscv/vector-iterators.md: Add VQI, VHI, VSI and VDI, and the LMUL1 attr respectively. * config/riscv/vector.md (@pred_reduc_): Removed. (@pred_reduc_): Likewise. (@pred_reduc_): Likewise. (@pred_reduc_): New pattern. (@pred_reduc_): Likewise. (@pred_reduc_): Likewise. (@pred_reduc_): Likewise. 2023-06-16 Juzhe-Zhong PR target/110264 * config/riscv/riscv-vsetvl.cc (insert_vsetvl): Fix bug. 2023-06-16 Jakub Jelinek PR middle-end/79173 * builtin-types.def (BT_FN_UINT_UINT_UINT_UINT_UINTPTR, BT_FN_ULONG_ULONG_ULONG_ULONG_ULONGPTR, BT_FN_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONG_ULONGLONGPTR): New types. * builtins.def (BUILT_IN_ADDC, BUILT_IN_ADDCL, BUILT_IN_ADDCLL, BUILT_IN_SUBC, BUILT_IN_SUBCL, BUILT_IN_SUBCLL): New builtins. * builtins.cc (fold_builtin_addc_subc): New function. (fold_builtin_varargs): Handle BUILT_IN_{ADD,SUB}C{,L,LL}. * doc/extend.texi (__builtin_addc, __builtin_subc): Document. 2023-06-16 Jakub Jelinek PR tree-optimization/110271 * tree-ssa-math-opts.cc (math_opts_dom_walker::after_dom_children) : Ignore return value from match_arith_overflow, instead call match_uaddc_usubc only if gsi_stmt (gsi) is still stmt. 2023-06-16 Martin Jambor * configure: Regenerate. 2023-06-16 Roger Sayle Uros Bizjak PR target/31985 * config/i386/i386.md (*add3_doubleword_concat): New define_insn_and_split combine *add3_doubleword with a *concat3 for more efficient lowering after reload. 2023-06-16 Vladimir N. Makarov * ira-lives.cc: Include except.h. (process_bb_node_lives): Ignore conflicts from cleanup exceptions when the pseudo does not live at the exception landing pad. 2023-06-16 Alex Coplan * doc/invoke.texi: Document -Welaborated-enum-base. 2023-06-16 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (shrn2_n): Rename builtins to... (ushrn2_n): ... This. (sqshrn2_n): Rename builtins to... (ssqshrn2_n): ... This. (uqshrn2_n): Rename builtins to... (uqushrn2_n): ... This. * config/aarch64/arm_neon.h (vqshrn_high_n_s16): Adjust for the above. (vqshrn_high_n_s32): Likewise. (vqshrn_high_n_s64): Likewise. (vqshrn_high_n_u16): Likewise. (vqshrn_high_n_u32): Likewise. (vqshrn_high_n_u64): Likewise. (vshrn_high_n_s16): Likewise. (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. * config/aarch64/aarch64-simd.md (aarch64_shrn2_n_insn_le): Rename to... (aarch64_shrn2_n_insn_le): ... This. Use SHIFTRT iterator and AARCH64_VALID_SHRN_OP check. (aarch64_shrn2_n_insn_be): Rename to... (aarch64_shrn2_n_insn_be): ... This. Use SHIFTRT iterator and AARCH64_VALID_SHRN_OP check. (aarch64_shrn2_n): Rename to... (aarch64_shrn2_n): ... This. Update expander for the above. 2023-06-16 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (shrn2): Rename builtins to... (shrn2_n): ... This. (rshrn2): Rename builtins to... (rshrn2_n): ... This. * config/aarch64/arm_neon.h (vrshrn_high_n_s16): Adjust for the above. (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. (vshrn_high_n_s16): Likewise. (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. * config/aarch64/aarch64-simd.md (*aarch64_shrn2_vect_le): Delete. (*aarch64_shrn2_vect_be): Likewise. (aarch64_shrn2_insn_le): Likewise. (aarch64_shrn2_insn_be): Likewise. (aarch64_shrn2): Likewise. (aarch64_rshrn2_insn_le): Likewise. (aarch64_rshrn2_insn_be): Likewise. (aarch64_rshrn2): Likewise. (aarch64_qshrn2_n_insn_le): Likewise. (aarch64_shrn2_n_insn_le): New define_insn. (aarch64_qshrn2_n_insn_be): Delete. (aarch64_shrn2_n_insn_be): New define_insn. (aarch64_qshrn2_n): Delete. (aarch64_shrn2_n): New define_expand. (aarch64_rshrn2_n_insn_le): New define_insn. (aarch64_rshrn2_n_insn_be): New define_insn. (aarch64_rshrn2_n): New define_expand. (aarch64_sqshrun2_n_insn_le): New define_insn. (aarch64_sqshrun2_n_insn_be): New define_insn. (aarch64_sqshrun2_n): New define_expand. (aarch64_sqrshrun2_n_insn_le): New define_insn. (aarch64_sqrshrun2_n_insn_be): New define_insn. (aarch64_sqrshrun2_n): New define_expand. * config/aarch64/iterators.md (UNSPEC_SQSHRUN, UNSPEC_SQRSHRUN, UNSPEC_SQSHRN, UNSPEC_UQSHRN, UNSPEC_SQRSHRN, UNSPEC_UQRSHRN): Delete unspec values. (VQSHRN_N): Delete int iterator. 2023-06-16 Kyrylo Tkachov * config/aarch64/aarch64.h (AARCH64_VALID_SHRN_OP): Define. * config/aarch64/aarch64-simd.md (*aarch64_shrn_n_insn): Rename to... (*aarch64_shrn_n_insn): ... This. Use SHIFTRT iterator and add AARCH64_VALID_SHRN_OP to condition. * config/aarch64/iterators.md (shrn_s): New code attribute. 2023-06-16 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_qshrn_n): Rename to... (aarch64_shrn_n): ... This. Reimplement with RTL codes. (*aarch64_rshrn_n_insn): New define_insn. (aarch64_sqrshrun_n_insn): Likewise. (aarch64_sqshrun_n_insn): Likewise. (aarch64_rshrn_n): New define_expand. (aarch64_sqshrun_n): Likewise. (aarch64_sqrshrun_n): Likewise. * config/aarch64/iterators.md (V2XWIDE): Add HI and SI modes. 2023-06-16 Kyrylo Tkachov * config/aarch64/aarch64-simd-builtins.def (shrn): Rename builtins to... (shrn_n): ... This. (rshrn): Rename builtins to... (rshrn_n): ... This. * config/aarch64/arm_neon.h (vshrn_n_s16): Adjust for the above. (vshrn_n_s32): Likewise. (vshrn_n_s64): Likewise. (vshrn_n_u16): Likewise. (vshrn_n_u32): Likewise. (vshrn_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. * config/aarch64/aarch64-simd.md (*aarch64_shrn): Delete. (aarch64_shrn): Likewise. (aarch64_rshrn_insn): Likewise. (aarch64_rshrn): Likewise. (aarch64_qshrn_n_insn): Likewise. (aarch64_qshrn_n): Likewise. (*aarch64_shrn_n_insn): New define_insn. (*aarch64_rshrn_n_insn): Likewise. (*aarch64_sqshrun_n_insn): Likewise. (*aarch64_sqrshrun_n_insn): Likewise. (aarch64_shrn_n): New define_expand. (aarch64_rshrn_n): Likewise. (aarch64_sqshrun_n): Likewise. (aarch64_sqrshrun_n): Likewise. * config/aarch64/iterators.md (ALL_TRUNC): New code iterator. (TRUNCEXTEND): New code attribute. (TRUNC_SHIFT): Likewise. (shrn_op): Likewise. * config/aarch64/predicates.md (aarch64_simd_umax_quarter_mode): New predicate. 2023-06-16 Pan Li * config/riscv/riscv-vsetvl.cc (pass_vsetvl::global_eliminate_vsetvl_insn): Initialize var by NULL. 2023-06-16 Richard Biener PR tree-optimization/110278 * match.pd (uns < (typeof uns)(uns != 0) -> false): New. (x != (typeof x)(x == 0) -> true): Likewise. 2023-06-16 Pali Rohár * config/i386/mingw-w64.h (CPP_SPEC): Adjust for -mcrtdll=. (REAL_LIBGCC_SPEC): New define. * config/i386/mingw.opt: Add mcrtdll= * config/i386/mingw32.h (CPP_SPEC): Adjust for -mcrtdll=. (REAL_LIBGCC_SPEC): Adjust for -mcrtdll=. (STARTFILE_SPEC): Adjust for -mcrtdll=. * doc/invoke.texi: Add mcrtdll= documentation. 2023-06-16 Simon Dardis * config/mips/mips.cc (enum mips_code_readable_setting):New enmu. (mips_handle_code_readable_attr):New static function. (mips_get_code_readable_attr):New static enum function. (mips_set_current_function):Set the code_readable mode. (mips_option_override):Same as above. * doc/extend.texi:Document code_readable. 2023-06-16 Richard Biener PR tree-optimization/110269 * fold-const.cc (fold_binary_loc): Merge x != 0 folding with tree_expr_nonzero_p ... * match.pd (cmp (convert? addr@0) integer_zerop): With this pattern. 2023-06-15 Marek Polacek * Makefile.in: Set LD_PICFLAG. Use it. Set enable_host_pie. Remove NO_PIE_CFLAGS and NO_PIE_FLAG. Pass LD_PICFLAG to ALL_LINKERFLAGS. Use the "pic" build of libiberty if --enable-host-pie. * configure.ac (--enable-host-shared): Don't set PICFLAG here. (--enable-host-pie): New check. Set PICFLAG and LD_PICFLAG after this check. * configure: Regenerate. * doc/install.texi: Document --enable-host-pie. 2023-06-15 Manolis Tsamis * regcprop.cc (maybe_mode_change): Enable stack pointer propagation. 2023-06-15 Andrew MacLeod PR tree-optimization/110266 * gimple-range-fold.cc (adjust_imagpart_expr): Check for integer complex type. (adjust_realpart_expr): Ditto. 2023-06-15 Jan Beulich * config/i386/sse.md (_vec_dup): Use vmovddup. 2023-06-15 Jan Beulich * config/i386/constraints.md: Mention k and r for B. 2023-06-15 Lulu Cheng Andrew Pinski PR target/110136 * config/loongarch/loongarch.md: Modify the register constraints for template "jumptable" and "indirect_jump" from "r" to "e". 2023-06-15 Xi Ruoyao * config/loongarch/loongarch-tune.h (loongarch_align): New struct. * config/loongarch/loongarch-def.h (loongarch_cpu_align): New array. * config/loongarch/loongarch-def.c (loongarch_cpu_align): Define the array. * config/loongarch/loongarch.cc (loongarch_option_override_internal): Set the value of -falign-functions= if -falign-functions is enabled but no value is given. Likewise for -falign-labels=. 2023-06-15 Jakub Jelinek PR middle-end/79173 * internal-fn.def (UADDC, USUBC): New internal functions. * internal-fn.cc (expand_UADDC, expand_USUBC): New functions. (commutative_ternary_fn_p): Return true also for IFN_UADDC. * optabs.def (uaddc5_optab, usubc5_optab): New optabs. * tree-ssa-math-opts.cc (uaddc_cast, uaddc_ne0, uaddc_is_cplxpart, match_uaddc_usubc): New functions. (math_opts_dom_walker::after_dom_children): Call match_uaddc_usubc for PLUS_EXPR, MINUS_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR unless other optimizations have been successful for those. * gimple-fold.cc (gimple_fold_call): Handle IFN_UADDC and IFN_USUBC. * fold-const-call.cc (fold_const_call): Likewise. * gimple-range-fold.cc (adjust_imagpart_expr): Likewise. * tree-ssa-dce.cc (eliminate_unnecessary_stmts): Likewise. * doc/md.texi (uaddc5, usubc5): Document new named patterns. * config/i386/i386.md (uaddc5, usubc5): New define_expand patterns. (*setcc_qi_addqi3_cconly_overflow_1_, *setccc): Split into NOTE_INSN_DELETED note rather than nop instruction. (*setcc_qi_negqi_ccc_1_, *setcc_qi_negqi_ccc_2_): Likewise. 2023-06-15 Jakub Jelinek PR middle-end/79173 * config/i386/i386.md (subborrow): Add alternative with memory destination and add for it define_peephole2 TARGET_READ_MODIFY_WRITE/-Os patterns to prefer using memory destination in these patterns. 2023-06-15 Jakub Jelinek PR middle-end/79173 * config/i386/i386.md (*sub_3, @add3_carry, addcarry, @sub3_carry, *add3_cc_overflow_1): Add define_peephole2 TARGET_READ_MODIFY_WRITE/-Os patterns to prefer using memory destination in these patterns. 2023-06-15 Jakub Jelinek * gimple-fold.cc (gimple_fold_call): Move handling of arg0 as well as arg1 INTEGER_CSTs for .UBSAN_CHECK_{ADD,SUB,MUL} and .{ADD,SUB,MUL}_OVERFLOW calls from here... * fold-const-call.cc (fold_const_call): ... here. 2023-06-15 Oluwatamilore Adebayo * config/aarch64/aarch64-simd.md (aarch64_abd): Rename to abd3. * config/aarch64/aarch64-sve.md (abd_3): Rename to abd3. 2023-06-15 Oluwatamilore Adebayo * doc/md.texi (sabd, uabd): Document them. * internal-fn.def (ABD): Use new optab. * optabs.def (sabd_optab, uabd_optab): New optabs, * tree-vect-patterns.cc (vect_recog_absolute_difference): Recognize the following idiom abs (a - b). (vect_recog_sad_pattern): Refactor to use vect_recog_absolute_difference. (vect_recog_abd_pattern): Use patterns found by vect_recog_absolute_difference to build a new ABD internal call. 2023-06-15 chenxiaolong * config/loongarch/loongarch.h (LARCH_CALL_RATIO): Modify the value of macro LARCH_CALL_RATIO on LoongArch to make it perform optimally. 2023-06-15 Juzhe-Zhong * config/riscv/riscv-v.cc (shuffle_merge_patterns): New pattern. (expand_vec_perm_const_1): Add merge optmization. 2023-06-15 Lehua Ding PR target/110119 * config/riscv/riscv.cc (riscv_get_arg_info): Return NULL_RTX for vector mode (riscv_pass_by_reference): Return true for vector mode 2023-06-15 Pan Li * config/riscv/autovec-opt.md: Align the predictor sytle. * config/riscv/autovec.md: Ditto. 2023-06-15 Pan Li * config/riscv/riscv-v.cc (rvv_builder::get_merge_scalar_mask): Take elen instead of scalar BITS_PER_WORD. (expand_vector_init_merge_repeating_sequence): Use inner_bits_size instead of scaler BITS_PER_WORD. 2023-06-14 Jivan Hakobyan * config/moxie/uclinux.h (MFWRAP_SPEC): Remove 2023-06-14 Kyrylo Tkachov * config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold): Fix signed comparison warning in loop from npats to enelts. 2023-06-14 Thomas Schwinge * gcc.cc (driver_handle_option): Forward host '-lgfortran', '-lm' to offloading compilation. * config/gcn/mkoffload.cc (main): Adjust. * config/nvptx/mkoffload.cc (main): Likewise. * doc/invoke.texi (foffload-options): Update example. 2023-06-14 liuhongt PR target/110227 * config/i386/sse.md (mov_internal>): Use x instead of v for alternative 2 since there's no evex version for vpcmpeqd ymm, ymm, ymm. 2023-06-13 Jeff Law * gcc.cc (LINK_COMMAND_SPEC): Remove mudflap spec handling. 2023-06-13 Jeff Law * config/sh/divtab.cc: Remove. 2023-06-13 Jakub Jelinek * config/i386/i386.cc (standard_sse_constant_opcode): Remove superfluous spaces around \t for vpcmpeqd. 2023-06-13 Roger Sayle * expr.cc (store_constructor) : Don't bother clearing vectors with only a single element. Set CLEARED if the vector was initialized to zero. 2023-06-13 Lehua Ding * config/riscv/riscv-v.cc (struct mode_vtype_group): Remove duplicate #include. (ENTRY): Undef. (TUPLE_ENTRY): Undef. 2023-06-13 Juzhe-Zhong * config/riscv/riscv-v.cc (rvv_builder::single_step_npatterns_p): Add comment. (shuffle_generic_patterns): Ditto. (expand_vec_perm_const_1): Ditto. 2023-06-13 Juzhe-Zhong * config/riscv/riscv-v.cc (emit_vlmax_decompress_insn): Fix bug. (shuffle_decompress_patterns): Ditto. 2023-06-13 Richard Biener * tree-ssa-loop-ch.cc (ch_base::copy_headers): Free loop BBs. 2023-06-13 Yanzhang Wang Kito Cheng * config/riscv/riscv-protos.h (riscv_init_cumulative_args): Set warning flag if func is not builtin * config/riscv/riscv.cc (riscv_scalable_vector_type_p): Determine whether the type is scalable vector. (riscv_arg_has_vector): Determine whether the arg is vector type. (riscv_pass_in_vector_p): Check the vector type param is passed by value. (riscv_init_cumulative_args): The same as header. (riscv_get_arg_info): Add the checking. (riscv_function_value): Check the func return and set warning flag * config/riscv/riscv.h (INIT_CUMULATIVE_ARGS): Add a flag to determine whether warning psabi or not. 2023-06-13 Kyrylo Tkachov * config/arm/arm-opts.h (enum arm_tp_type): Remove TP_CP15. Add TP_TPIDRURW, TP_TPIDRURO, TP_TPIDRPRW values. * config/arm/arm-protos.h (arm_output_load_tpidr): Declare prototype. * config/arm/arm.cc (arm_option_reconfigure_globals): Replace TP_CP15 with TP_TPIDRURO. (arm_output_load_tpidr): Define. * config/arm/arm.h (TARGET_HARD_TP): Define in terms of TARGET_SOFT_TP. * config/arm/arm.md (load_tp_hard): Call arm_output_load_tpidr to output assembly. (reload_tp_hard): Likewise. * config/arm/arm.opt (tpidrurw, tpidruro, tpidrprw): New values for arm_tp_type. * doc/invoke.texi (Arm Options, mtp): Document new values. 2023-06-13 Kyrylo Tkachov PR target/108779 * config/aarch64/aarch64-opts.h (enum aarch64_tp_reg): Add AARCH64_TPIDRRO_EL0 value. * config/aarch64/aarch64.cc (aarch64_output_load_tp): Define. * config/aarch64/aarch64.opt (tpidr_el0, tpidr_el1, tpidr_el2, tpidr_el3, tpidrro_el3): New accepted values to -mtp=. * doc/invoke.texi (AArch64 Options): Document new -mtp= options. 2023-06-13 Alexandre Oliva * range-op-float.cc (frange_nextafter): Drop inline. (frelop_early_resolve): Add static. (frange_float): Likewise. 2023-06-13 Richard Biener PR middle-end/110232 * fold-const.cc (native_interpret_vector): Use TYPE_SIZE_UNIT to check whether the buffer covers the whole vector. 2023-06-13 Richard Biener * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): For .MASK_LOAD and friends set the size of the access to unknown. 2023-06-13 Tejas Belagod PR target/96339 * config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold): Fold sve calls that have a constant input predicate vector. (svlast_impl::is_lasta): Query to check if intrinsic is svlasta. (svlast_impl::is_lastb): Query to check if intrinsic is svlastb. (svlast_impl::vect_all_same): Check if all vector elements are equal. 2023-06-13 Andi Kleen * config/i386/gcc-auto-profile: Regenerate. 2023-06-13 Juzhe-Zhong * config/riscv/vector-iterators.md: Fix requirement. 2023-06-13 Juzhe-Zhong * config/riscv/riscv-v.cc (emit_vlmax_decompress_insn): New function. (shuffle_decompress_patterns): New function. (expand_vec_perm_const_1): Add decompress optimization. 2023-06-12 Jeff Law PR rtl-optimization/101188 * postreload.cc (reload_cse_move2add_invalidate): New function, extracted from... (reload_cse_move2add): Call reload_cse_move2add_invalidate. 2023-06-12 Prathamesh Kulkarni * config/aarch64/aarch64.cc (aarch64_expand_vector_init): Tweak condition if (n_var == n_elts && n_elts <= 16) to allow a single constant, and if maxv == 1, use constant element for duplicating into register. 2023-06-12 Tobias Burnus * gimplify.cc (gimplify_adjust_omp_clauses_1): Use GOMP_MAP_FORCE_PRESENT for 'present alloc' implicit mapping. (gimplify_adjust_omp_clauses): Change GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC} to the equivalent GOMP_MAP_FORCE_PRESENT. * omp-low.cc (lower_omp_target): Remove handling of no-longer valid GOMP_MAP_PRESENT_{TO,TOFROM,FROM,ALLOC}; update map kinds used for to/from clauses with present modifier. 2023-06-12 Andrew MacLeod PR tree-optimization/110205 * range-op-float.cc (range_operator::fold_range): Add default FII fold routine. * range-op-mixed.h (class operator_gt): Add missing final overrides. * range-op.cc (range_op_handler::fold_range): Add RO_FII case. (operator_lshift ::update_bitmask): Add final override. (operator_rshift ::update_bitmask): Add final override. * range-op.h (range_operator::fold_range): Add FII prototype. 2023-06-12 Andrew MacLeod * gimple-range-op.cc (gimple_range_op_handler::maybe_non_standard): Use range_op_handler directly. * range-op.cc (range_op_handler::range_op_handler): Unsigned param instead of tree-code. (ptr_op_widen_plus_signed): Delete. (ptr_op_widen_plus_unsigned): Delete. (ptr_op_widen_mult_signed): Delete. (ptr_op_widen_mult_unsigned): Delete. (range_op_table::initialize_integral_ops): Add new opcodes. * range-op.h (range_op_handler): Use unsigned. (OP_WIDEN_MULT_SIGNED): New. (OP_WIDEN_MULT_UNSIGNED): New. (OP_WIDEN_PLUS_SIGNED): New. (OP_WIDEN_PLUS_UNSIGNED): New. (RANGE_OP_TABLE_SIZE): New. (range_op_table::operator []): Use unsigned. (range_op_table::set): Use unsigned. (m_range_tree): Make unsigned. (ptr_op_widen_mult_signed): Remove. (ptr_op_widen_mult_unsigned): Remove. (ptr_op_widen_plus_signed): Remove. (ptr_op_widen_plus_unsigned): Remove. 2023-06-12 Andrew MacLeod * gimple-range-op.cc (gimple_range_op_handler): Set m_operator manually as there is no access to the default operator. (cfn_copysign::fold_range): Don't check for validity. (cfn_ubsan::fold_range): Ditto. (gimple_range_op_handler::maybe_builtin_call): Don't set to NULL. * range-op.cc (default_operator): New. (range_op_handler::range_op_handler): Use default_operator instead of NULL. (range_op_handler::operator bool): Move from header, compare against default operator. (range_op_handler::range_op): New. * range-op.h (range_op_handler::operator bool): Move. 2023-06-12 Andrew MacLeod * range-op.cc (unified_table): Delete. (range_op_table operator_table): Instantiate. (range_op_table::range_op_table): Rename from unified_table. (range_op_handler::range_op_handler): Use range_op_table. * range-op.h (range_op_table::operator []): Inline. (range_op_table::set): Inline. 2023-06-12 Andrew MacLeod * gimple-range-gori.cc (gori_compute::condexpr_adjust): Do not pass type. * gimple-range-op.cc (get_code): Rename from get_code_and_type and simplify. (gimple_range_op_handler::supported_p): No need for type. (gimple_range_op_handler::gimple_range_op_handler): Ditto. (cfn_copysign::fold_range): Ditto. (cfn_ubsan::fold_range): Ditto. * ipa-cp.cc (ipa_vr_operation_and_type_effects): Ditto. * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Ditto. * range-op-float.cc (operator_plus::op1_range): Ditto. (operator_mult::op1_range): Ditto. (range_op_float_tests): Ditto. * range-op.cc (get_op_handler): Remove. (range_op_handler::set_op_handler): Remove. (operator_plus::op1_range): No need for type. (operator_minus::op1_range): Ditto. (operator_mult::op1_range): Ditto. (operator_exact_divide::op1_range): Ditto. (operator_cast::op1_range): Ditto. (perator_bitwise_not::fold_range): Ditto. (operator_negate::fold_range): Ditto. * range-op.h (range_op_handler::range_op_handler): Remove type param. (range_cast): No need for type. (range_op_table::operator[]): Check for enum_code >= 0. * tree-data-ref.cc (compute_distributive_range): No need for type. * tree-ssa-loop-unswitch.cc (unswitch_predicate): Ditto. * value-query.cc (range_query::get_tree_range): Ditto. * value-relation.cc (relation_oracle::validate_relation): Ditto. * vr-values.cc (range_of_var_in_loop): Ditto. (simplify_using_ranges::fold_cond_with_ops): Ditto. 2023-06-12 Andrew MacLeod * range-op-mixed.h (operator_max): Remove final. * range-op-ptr.cc (pointer_table::pointer_table): Remove MAX_EXPR. (pointer_table::pointer_table): Remove. (class hybrid_max_operator): New. (range_op_table::initialize_pointer_ops): Add hybrid_max_operator. * range-op.cc (pointer_tree_table): Remove. (unified_table::unified_table): Comment out MAX_EXPR. (get_op_handler): Remove check of pointer table. * range-op.h (class pointer_table): Remove. 2023-06-12 Andrew MacLeod * range-op-mixed.h (operator_min): Remove final. * range-op-ptr.cc (pointer_table::pointer_table): Remove MIN_EXPR. (class hybrid_min_operator): New. (range_op_table::initialize_pointer_ops): Add hybrid_min_operator. * range-op.cc (unified_table::unified_table): Comment out MIN_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (operator_bitwise_or): Remove final. * range-op-ptr.cc (pointer_table::pointer_table): Remove BIT_IOR_EXPR. (class hybrid_or_operator): New. (range_op_table::initialize_pointer_ops): Add hybrid_or_operator. * range-op.cc (unified_table::unified_table): Comment out BIT_IOR_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (operator_bitwise_and): Remove final. * range-op-ptr.cc (pointer_table::pointer_table): Remove BIT_AND_EXPR. (class hybrid_and_operator): New. (range_op_table::initialize_pointer_ops): Add hybrid_and_operator. * range-op.cc (unified_table::unified_table): Comment out BIT_AND_EXPR. 2023-06-12 Andrew MacLeod * Makefile.in (OBJS): Add range-op-ptr.o. * range-op-mixed.h (update_known_bitmask): Move prototype here. (minus_op1_op2_relation_effect): Move prototype here. (wi_includes_zero_p): Move function to here. (wi_zero_p): Ditto. * range-op.cc (update_known_bitmask): Remove static. (wi_includes_zero_p): Move to header. (wi_zero_p): Move to header. (minus_op1_op2_relation_effect): Remove static. (operator_pointer_diff): Move class and routines to range-op-ptr.cc. (pointer_plus_operator): Ditto. (pointer_min_max_operator): Ditto. (pointer_and_operator): Ditto. (pointer_or_operator): Ditto. (pointer_table): Ditto. (range_op_table::initialize_pointer_ops): Ditto. * range-op-ptr.cc: New. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_max): Move from... * range-op.cc (unified_table::unified_table): Add MAX_EXPR. (get_op_handler): Remove the integral table. (class operator_max): Move from here. (integral_table::integral_table): Delete. * range-op.h (class integral_table): Delete. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_min): Move from... * range-op.cc (unified_table::unified_table): Add MIN_EXPR. (class operator_min): Move from here. (integral_table::integral_table): Remove MIN_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_bitwise_or): Move from... * range-op.cc (unified_table::unified_table): Add BIT_IOR_EXPR. (class operator_bitwise_or): Move from here. (integral_table::integral_table): Remove BIT_IOR_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_bitwise_and): Move from... * range-op.cc (unified_table::unified_table): Add BIT_AND_EXPR. (get_op_handler): Check for a pointer table entry first. (class operator_bitwise_and): Move from here. (integral_table::integral_table): Remove BIT_AND_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_bitwise_xor): Move from... * range-op.cc (unified_table::unified_table): Add BIT_XOR_EXPR. (class operator_bitwise_xor): Move from here. (integral_table::integral_table): Remove BIT_XOR_EXPR. (pointer_table::pointer_table): Remove BIT_XOR_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_bitwise_not): Move from... * range-op.cc (unified_table::unified_table): Add BIT_NOT_EXPR. (class operator_bitwise_not): Move from here. (integral_table::integral_table): Remove BIT_NOT_EXPR. (pointer_table::pointer_table): Remove BIT_NOT_EXPR. 2023-06-12 Andrew MacLeod * range-op-mixed.h (class operator_addr_expr): Move from... * range-op.cc (unified_table::unified_table): Add ADDR_EXPR. (class operator_addr_expr): Move from here. (integral_table::integral_table): Remove ADDR_EXPR. (pointer_table::pointer_table): Remove ADDR_EXPR. 2023-06-12 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat16m1_t): Add type to lmul1 ops. (vfloat16m2_t): Likewise. (vfloat16m4_t): Likewise. 2023-06-12 Richard Biener * tree-ssa-alias.cc (call_may_clobber_ref_p_1): For .MASK_STORE and friend set the size of the access to unknown. 2023-06-12 Tamar Christina * config.in: Regenerate. * configure: Regenerate. * configure.ac: Remove DEFAULT_MATCHPD_PARTITIONS. 2023-06-12 Juzhe-Zhong * config/riscv/autovec-opt.md (*vtrunc): New pattern. (*trunc): Ditto. * config/riscv/autovec.md (3): Change to define_insn_and_split. (v3): Ditto. (trunc2): Ditto. 2023-06-12 Kyrylo Tkachov * simplify-rtx.cc (simplify_const_unary_operation): Handle US_TRUNCATE, SS_TRUNCATE. 2023-06-12 Eric Botcazou PR modula2/109952 * doc/gm2.texi (Standard procedures): Fix Next link. 2023-06-12 Tamar Christina * config.in: Regenerate. 2023-06-12 Andre Vieira PR middle-end/110142 * tree-vect-patterns.cc (vect_recog_widen_op_pattern): Don't pass subtype to vect_widened_op_tree and remove subtype parameter, also remove superfluous overloaded function definition. (vect_recog_widen_plus_pattern): Remove subtype parameter and dont pass to call to vect_recog_widen_op_pattern. (vect_recog_widen_minus_pattern): Likewise. 2023-06-12 liuhongt * config/i386/sse.md (vec_pack_float_): New expander. (vec_unpack_fix_trunc_lo_): Ditto. (vec_unpack_fix_trunc_hi_): Ditto. (vec_unpacks_lo_): Ditto. (vec_unpacks_hi_): Ditto. (sse_movlhps_): New define_insn. (ssse3_palignr_perm): Extend to V_128H. (V_128H): New mode iterator. (ssepackPHmode): New mode attribute. (vunpck_extract_mode): Ditto. (vpckfloat_concat_mode): Extend to VxSI/VxSF for _Float16. (vpckfloat_temp_mode): Ditto. (vpckfloat_op_mode): Ditto. (vunpckfixt_mode): Extend to VxHF. (vunpckfixt_model): Ditto. (vunpckfixt_extract_mode): Ditto. 2023-06-12 Richard Biener PR middle-end/110200 * genmatch.cc (expr::gen_transform): Put braces around the if arm for the (convert ...) short-cut. 2023-06-12 Kewen Lin PR target/109932 * config/rs6000/rs6000-builtins.def (__builtin_pack_vector_int128, __builtin_unpack_vector_int128): Move from stanza power7 to vsx. 2023-06-12 Kewen Lin PR target/110011 * config/rs6000/rs6000.cc (output_toc): Use the mode of the 128-bit floating constant itself for real_to_target call. 2023-06-12 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4_t): Add type to X2/X4/X8/X16/X32 vlmul ext ops. (vfloat16mf2_t): Ditto. (vfloat16m1_t): Ditto. (vfloat16m2_t): Ditto. (vfloat16m4_t): Ditto. 2023-06-12 David Edelsohn * config/rs6000/rs6000-logue.cc (rs6000_stack_info): Do not require a stack frame when debugging is enabled for AIX. 2023-06-11 Georg-Johann Lay * config/avr/avr.md (adjust_len) [insv_notbit_0, insv_notbit_7]: Remove attribute values. (insv_notbit): New post-reload insn. (*insv.not-shiftrt_split, *insv.xor1-bit.0_split) (*insv.not-bit.0_split, *insv.not-bit.7_split) (*insv.xor-extract_split): Split to insv_notbit. (*insv.not-shiftrt, *insv.xor1-bit.0, *insv.not-bit.0, *insv.not-bit.7) (*insv.xor-extract): Remove post-reload insns. * config/avr/avr.cc (avr_out_insert_notbit) [bitno]: Remove parameter. (avr_adjust_insn_length): Adjust call of avr_out_insert_notbit. [ADJUST_LEN_INSV_NOTBIT_0, ADJUST_LEN_INSV_NOTBIT_7]: Remove cases. * config/avr/avr-protos.h (avr_out_insert_notbit): Adjust prototype. 2023-06-11 Georg-Johann Lay PR target/109907 * config/avr/avr.md (adjust_len) [extr, extr_not]: New elements. (MSB, SIZE): New mode attributes. (any_shift): New code iterator. (*lshr3_split, *lshr3, lshr3) (*lshr3_const_split): Add constraint alternative for the case of shift-offset = MSB. Ditch "length" attribute. (extzv, *extzv..subreg, *extzv.xor) (*extzv.ge, *neg.ashiftrt.msb, *extzv.io.lsr7): New. * config/avr/constraints.md (C15, C23, C31, Yil): New * config/avr/predicates.md (reg_or_low_io_operand) (const7_operand, reg_or_low_io_operand) (const15_operand, const_0_to_15_operand) (const23_operand, const_0_to_23_operand) (const31_operand, const_0_to_31_operand): New. * config/avr/avr-protos.h (avr_out_extr, avr_out_extr_not): New. * config/avr/avr.cc (avr_out_extr, avr_out_extr_not): New funcs. (lshrqi3_out, lshrhi3_out, lshrpsi3_out, lshrsi3_out): Adjust MSB case to new insn constraint "r" for operands[1]. (avr_adjust_insn_length) [ADJUST_LEN_EXTR_NOT, ADJUST_LEN_EXTR]: Handle these cases. (avr_rtx_costs_1): Adjust cost for a new pattern. 2023-06-11 Juzhe-Zhong * config/riscv/riscv-vsetvl.cc (available_occurrence_p): Enhance user vsetvl optimization. (vector_insn_info::parse_insn): Add rtx_insn parse. (pass_vsetvl::local_eliminate_vsetvl_insn): Enhance user vsetvl optimization. (get_first_vsetvl): New function. (pass_vsetvl::global_eliminate_vsetvl_insn): Ditto. (pass_vsetvl::cleanup_insns): Remove it. (pass_vsetvl::ssa_post_optimization): New function. (has_no_uses): Ditto. (pass_vsetvl::propagate_avl): Remove it. (pass_vsetvl::df_post_optimization): New function. (pass_vsetvl::lazy_vsetvl): Rework Phase 5 && Phase 6. * config/riscv/riscv-vsetvl.h: Adapt declaration. 2023-06-10 Aldy Hernandez * ipa-cp.cc (ipcp_vr_lattice::init): Take type argument. (ipcp_vr_lattice::print): Call dump method. (ipcp_vr_lattice::meet_with): Adjust for m_vr being a Value_Range. (ipcp_vr_lattice::meet_with_1): Make argument a reference. (ipcp_vr_lattice::set_to_bottom): Set varying for an unsupported range. (initialize_node_lattices): Pass type when appropriate. (ipa_vr_operation_and_type_effects): Make type agnostic. (ipa_value_range_from_jfunc): Same. (propagate_vr_across_jump_function): Same. * ipa-fnsummary.cc (evaluate_conditions_for_known_args): Same. (evaluate_properties_for_edge): Same. * ipa-prop.cc (ipa_vr::get_vrange): Same. (ipcp_update_vr): Same. * ipa-prop.h (ipa_value_range_from_jfunc): Same. (ipa_range_set_and_normalize): Same. 2023-06-10 Georg-Johann Lay PR target/109650 PR target/92729 * config/avr/avr-passes.def (avr_pass_ifelse): Insert new pass. * config/avr/avr.cc (avr_pass_ifelse): New RTL pass. (avr_pass_data_ifelse): New pass_data for it. (make_avr_pass_ifelse, avr_redundant_compare, avr_cbranch_cost) (avr_canonicalize_comparison, avr_out_plus_set_ZN) (avr_out_cmp_ext): New functions. (compare_condtition): Make sure REG_CC dies in the branch insn. (avr_rtx_costs_1): Add computation of cbranch costs. (avr_adjust_insn_length) [ADJUST_LEN_ADD_SET_ZN, ADJUST_LEN_CMP_ZEXT]: [ADJUST_LEN_CMP_SEXT]Handle them. (TARGET_CANONICALIZE_COMPARISON): New define. (avr_simplify_comparison_p, compare_diff_p, avr_compare_pattern) (avr_reorg_remove_redundant_compare, avr_reorg): Remove functions. (TARGET_MACHINE_DEPENDENT_REORG): Remove define. * config/avr/avr-protos.h (avr_simplify_comparison_p): Remove proto. (make_avr_pass_ifelse, avr_out_plus_set_ZN, cc_reg_rtx) (avr_out_cmp_zext): New Protos * config/avr/avr.md (branch, difficult_branch): Don't split insns. (*cbranchhi.zero-extend.0", *cbranchhi.zero-extend.1") (*swapped_tst, *add.for.eqne.): New insns. (*cbranch4): Rename to cbranch4_insn. (define_peephole): Add dead_or_set_regno_p(insn,REG_CC) as needed. (define_deephole2): Add peep2_regno_dead_p(*,REG_CC) as needed. Add new RTL peepholes for decrement-and-branch and *swapped_tst. Rework signtest-and-branch peepholes for *sbrx_branch. (adjust_len) [add_set_ZN, cmp_zext]: New. (QIPSI): New mode iterator. (ALLs1, ALLs2, ALLs4, ALLs234): New mode iterators. (gelt): New code iterator. (gelt_eqne): New code attribute. (rvbranch, *rvbranch, difficult_rvbranch, *difficult_rvbranch) (branch_unspec, *negated_tst, *reversed_tst) (*cmpqi_sign_extend): Remove insns. (define_c_enum "unspec") [UNSPEC_IDENTITY]: Remove. * config/avr/avr-dimode.md (cbranch4): Canonicalize comparisons. * config/avr/predicates.md (scratch_or_d_register_operand): New. * config/avr/constraints.md (Yxx): New constraint. 2023-06-10 Juzhe-Zhong * config/riscv/autovec.md (select_vl): New pattern. * config/riscv/riscv-protos.h (expand_select_vl): New function. * config/riscv/riscv-v.cc (expand_select_vl): Ditto. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_mult_div_base): Delete. (foperator_mult_div_base::find_range): Make static local function. (foperator_mult): Remove. Move prototypes to range-op-mixed.h (operator_mult::op1_range): Rename from foperator_mult. (operator_mult::op2_range): Ditto. (operator_mult::rv_fold): Ditto. (float_table::float_table): Remove MULT_EXPR. (class foperator_div): Inherit from range_operator. (float_table::float_table): Delete. * range-op-mixed.h (class operator_mult): Combined from integer and float files. * range-op.cc (float_tree_table): Delete. (op_mult): New object. (unified_table::unified_table): Add MULT_EXPR. (get_op_handler): Do not check float table any longer. (class cross_product_operator): Move to range-op-mixed.h. (class operator_mult): Move to range-op-mixed.h. (integral_table::integral_table): Remove MULT_EXPR. (pointer_table::pointer_table): Remove MULT_EXPR. * range-op.h (float_table): Remove. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_negate): Remove. Move prototypes to range-op-mixed.h (operator_negate::fold_range): Rename from foperator_negate. (operator_negate::op1_range): Ditto. (float_table::float_table): Remove NEGATE_EXPR. * range-op-mixed.h (class operator_negate): Combined from integer and float files. * range-op.cc (op_negate): New object. (unified_table::unified_table): Add NEGATE_EXPR. (class operator_negate): Move to range-op-mixed.h. (integral_table::integral_table): Remove NEGATE_EXPR. (pointer_table::pointer_table): Remove NEGATE_EXPR. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_minus): Remove. Move prototypes to range-op-mixed.h (operator_minus::fold_range): Rename from foperator_minus. (operator_minus::op1_range): Ditto. (operator_minus::op2_range): Ditto. (operator_minus::rv_fold): Ditto. (float_table::float_table): Remove MINUS_EXPR. * range-op-mixed.h (class operator_minus): Combined from integer and float files. * range-op.cc (op_minus): New object. (unified_table::unified_table): Add MINUS_EXPR. (class operator_minus): Move to range-op-mixed.h. (integral_table::integral_table): Remove MINUS_EXPR. (pointer_table::pointer_table): Remove MINUS_EXPR. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_abs): Remove. Move prototypes to range-op-mixed.h (operator_abs::fold_range): Rename from foperator_abs. (operator_abs::op1_range): Ditto. (float_table::float_table): Remove ABS_EXPR. * range-op-mixed.h (class operator_abs): Combined from integer and float files. * range-op.cc (op_abs): New object. (unified_table::unified_table): Add ABS_EXPR. (class operator_abs): Move to range-op-mixed.h. (integral_table::integral_table): Remove ABS_EXPR. (pointer_table::pointer_table): Remove ABS_EXPR. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_plus): Remove. Move prototypes to range-op-mixed.h (operator_plus::fold_range): Rename from foperator_plus. (operator_plus::op1_range): Ditto. (operator_plus::op2_range): Ditto. (operator_plus::rv_fold): Ditto. (float_table::float_table): Remove PLUS_EXPR. * range-op-mixed.h (class operator_plus): Combined from integer and float files. * range-op.cc (op_plus): New object. (unified_table::unified_table): Add PLUS_EXPR. (class operator_plus): Move to range-op-mixed.h. (integral_table::integral_table): Remove PLUS_EXPR. (pointer_table::pointer_table): Remove PLUS_EXPR. 2023-06-10 Andrew MacLeod * range-op-mixed.h (class operator_cast): Combined from integer and float files. * range-op.cc (op_cast): New object. (unified_table::unified_table): Add op_cast (class operator_cast): Move to range-op-mixed.h. (integral_table::integral_table): Remove op_cast (pointer_table::pointer_table): Remove op_cast. 2023-06-10 Andrew MacLeod * range-op-float.cc (operator_cst::fold_range): New. * range-op-mixed.h (class operator_cst): Move from integer file. * range-op.cc (op_cst): New object. (unified_table::unified_table): Add op_cst. Also use for REAL_CST. (class operator_cst): Move to range-op-mixed.h. (integral_table::integral_table): Remove op_cst. (pointer_table::pointer_table): Remove op_cst. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_identity): Remove. Move prototypes to range-op-mixed.h (operator_identity::fold_range): Rename from foperator_identity. (operator_identity::op1_range): Ditto. (float_table::float_table): Remove fop_identity. * range-op-mixed.h (class operator_identity): Combined from integer and float files. * range-op.cc (op_identity): New object. (unified_table::unified_table): Add op_identity. (class operator_identity): Move to range-op-mixed.h. (integral_table::integral_table): Remove identity. (pointer_table::pointer_table): Remove identity. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_ge): Remove. Move prototypes to range-op-mixed.h (operator_ge::fold_range): Rename from foperator_ge. (operator_ge::op1_range): Ditto. (float_table::float_table): Remove GE_EXPR. * range-op-mixed.h (class operator_ge): Combined from integer and float files. * range-op.cc (op_ge): New object. (unified_table::unified_table): Add GE_EXPR. (class operator_ge): Move to range-op-mixed.h. (ge_op1_op2_relation): Fold into operator_ge::op1_op2_relation. (integral_table::integral_table): Remove GE_EXPR. (pointer_table::pointer_table): Remove GE_EXPR. * range-op.h (ge_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_gt): Remove. Move prototypes to range-op-mixed.h (operator_gt::fold_range): Rename from foperator_gt. (operator_gt::op1_range): Ditto. (float_table::float_table): Remove GT_EXPR. * range-op-mixed.h (class operator_gt): Combined from integer and float files. * range-op.cc (op_gt): New object. (unified_table::unified_table): Add GT_EXPR. (class operator_gt): Move to range-op-mixed.h. (gt_op1_op2_relation): Fold into operator_gt::op1_op2_relation. (integral_table::integral_table): Remove GT_EXPR. (pointer_table::pointer_table): Remove GT_EXPR. * range-op.h (gt_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_le): Remove. Move prototypes to range-op-mixed.h (operator_le::fold_range): Rename from foperator_le. (operator_le::op1_range): Ditto. (float_table::float_table): Remove LE_EXPR. * range-op-mixed.h (class operator_le): Combined from integer and float files. * range-op.cc (op_le): New object. (unified_table::unified_table): Add LE_EXPR. (class operator_le): Move to range-op-mixed.h. (le_op1_op2_relation): Fold into operator_le::op1_op2_relation. (integral_table::integral_table): Remove LE_EXPR. (pointer_table::pointer_table): Remove LE_EXPR. * range-op.h (le_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_lt): Remove. Move prototypes to range-op-mixed.h (operator_lt::fold_range): Rename from foperator_lt. (operator_lt::op1_range): Ditto. (float_table::float_table): Remove LT_EXPR. * range-op-mixed.h (class operator_lt): Combined from integer and float files. * range-op.cc (op_lt): New object. (unified_table::unified_table): Add LT_EXPR. (class operator_lt): Move to range-op-mixed.h. (lt_op1_op2_relation): Fold into operator_lt::op1_op2_relation. (integral_table::integral_table): Remove LT_EXPR. (pointer_table::pointer_table): Remove LT_EXPR. * range-op.h (lt_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_not_equal): Remove. Move prototypes to range-op-mixed.h (operator_equal::fold_range): Rename from foperator_not_equal. (operator_equal::op1_range): Ditto. (float_table::float_table): Remove NE_EXPR. * range-op-mixed.h (class operator_not_equal): Combined from integer and float files. * range-op.cc (op_equal): New object. (unified_table::unified_table): Add NE_EXPR. (class operator_not_equal): Move to range-op-mixed.h. (not_equal_op1_op2_relation): Fold into operator_not_equal::op1_op2_relation. (integral_table::integral_table): Remove NE_EXPR. (pointer_table::pointer_table): Remove NE_EXPR. * range-op.h (not_equal_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (foperator_equal): Remove. Move prototypes to range-op-mixed.h (operator_equal::fold_range): Rename from foperator_equal. (operator_equal::op1_range): Ditto. (float_table::float_table): Remove EQ_EXPR. * range-op-mixed.h (class operator_equal): Combined from integer and float files. * range-op.cc (op_equal): New object. (unified_table::unified_table): Add EQ_EXPR. (class operator_equal): Move to range-op-mixed.h. (equal_op1_op2_relation): Fold into operator_equal::op1_op2_relation. (integral_table::integral_table): Remove EQ_EXPR. (pointer_table::pointer_table): Remove EQ_EXPR. * range-op.h (equal_op1_op2_relation): Delete. 2023-06-10 Andrew MacLeod * range-op-float.cc (class float_table): Move to header. (float_table::float_table): Move float only operators to... (range_op_table::initialize_float_ops): Here. * range-op-mixed.h: New. * range-op.cc (integral_tree_table, pointer_tree_table): Moved to top of file. (float_tree_table): Moved from range-op-float.cc. (unified_tree_table): New. (unified_table::unified_table): New. Call initialize routines. (get_op_handler): Check unified table first. (range_op_handler::range_op_handler): Handle no type constructor. (integral_table::integral_table): Move integral only operators to... (range_op_table::initialize_integral_ops): Here. (pointer_table::pointer_table): Move pointer only operators to... (range_op_table::initialize_pointer_ops): Here. * range-op.h (enum bool_range_state): Move to range-op-mixed.h. (get_bool_state): Ditto. (empty_range_varying): Ditto. (relop_early_resolve): Ditto. (class range_op_table): Add new init methods for range types. (class integral_table): Move declaration to here. (class pointer_table): Move declaration to here. (class float_table): Move declaration to here. 2023-06-09 Ju-Zhe Zhong Richard Sandiford Richard Biener * doc/md.texi: Add SELECT_VL support. * internal-fn.def (SELECT_VL): Ditto. * optabs.def (OPTAB_D): Ditto. * tree-vect-loop-manip.cc (vect_set_loop_controls_directly): Ditto. * tree-vect-loop.cc (_loop_vec_info::_loop_vec_info): Ditto. * tree-vect-stmts.cc (get_select_vl_data_ref_ptr): Ditto. (vectorizable_store): Ditto. (vectorizable_load): Ditto. * tree-vectorizer.h (LOOP_VINFO_USING_SELECT_VL_P): Ditto. 2023-06-09 Andrew MacLeod PR ipa/109886 * ipa-prop.cc (ipa_compute_jump_functions_for_edge): Check param type as well. 2023-06-09 Andrew MacLeod * range-op.cc (range_cast): Move to... * range-op.h (range_cast): Here and add generic a version. 2023-06-09 Marek Polacek PR c/39589 PR c++/96868 * doc/invoke.texi: Clarify that -Wmissing-field-initializers doesn't warn about designated initializers in C only. 2023-06-09 Andrew Pinski PR tree-optimization/97711 PR tree-optimization/110155 * match.pd ((zero_one == 0) ? y : z y): Add plus to the op. ((zero_one != 0) ? z y : y): Likewise. 2023-06-09 Andrew Pinski * match.pd ((zero_one ==/!= 0) ? y : z y): Use multiply rather than negation/bit_and. 2023-06-09 Andrew Pinski * match.pd (`X & -Y -> X * Y`): Allow for truncation and the same type for unsigned types. 2023-06-09 Andrew Pinski PR tree-optimization/110165 PR tree-optimization/110166 * match.pd (zero_one_valued_p): Don't accept signed 1-bit integers. 2023-06-09 Richard Biener * match.pd (two conversions in a row): Use element_precision to DTRT for VECTOR_TYPE. 2023-06-09 Pan Li * config/riscv/riscv.md (enabled): Move to another place, and add fp_vector_disabled to the cond. (fp_vector_disabled): New attr defined for disabling fp. * config/riscv/vector-iterators.md: Fix V_WHOLE and V_FRACT. 2023-06-09 Pan Li * config/riscv/riscv-protos.h (enum frm_field_enum): Adjust literal to int. 2023-06-09 liuhongt PR target/110108 * config/i386/i386.cc (ix86_gimple_fold_builtin): Explicitly view_convert_expr mask to signed type when folding pblendvb builtins. 2023-06-09 liuhongt PR target/110108 * config/i386/i386.cc (ix86_gimple_fold_builtin): Fold _mm{,256,512}_abs_{epi8,epi16,epi32,epi64} into gimple ABSU_EXPR + VCE, don't fold _mm_abs_{pi8,pi16,pi32} w/o TARGET_64BIT. * config/i386/i386-builtin.def: Replace CODE_FOR_nothing with real codename for __builtin_ia32_pabs{b,w,d}. 2023-06-08 Andrew MacLeod * gimple-range-op.cc (gimple_range_op_handler::gimple_range_op_handler): Adjust. (gimple_range_op_handler::maybe_builtin_call): Adjust. * gimple-range-op.h (operand1, operand2): Use m_operator. * range-op.cc (integral_table, pointer_table): Relocate. (get_op_handler): Rename from get_handler and handle all types. (range_op_handler::range_op_handler): Relocate. (range_op_handler::set_op_handler): Relocate and adjust. (range_op_handler::range_op_handler): Relocate. (dispatch_trio): New. (RO_III, RO_IFI, RO_IFF, RO_FFF, RO_FIF, RO_FII): New consts. (range_op_handler::dispatch_kind): New. (range_op_handler::fold_range): Relocate and Use new dispatch value. (range_op_handler::op1_range): Ditto. (range_op_handler::op2_range): Ditto. (range_op_handler::lhs_op1_relation): Ditto. (range_op_handler::lhs_op2_relation): Ditto. (range_op_handler::op1_op2_relation): Ditto. (range_op_handler::set_op_handler): Use m_operator member. * range-op.h (range_op_handler::operator bool): Use m_operator. (range_op_handler::dispatch_kind): New. (range_op_handler::m_valid): Delete. (range_op_handler::m_int): Delete (range_op_handler::m_float): Delete (range_op_handler::m_operator): New. (range_op_table::operator[]): Relocate from .cc file. (range_op_table::set): Ditto. * value-range.h (class vrange): Make range_op_handler a friend. 2023-06-08 Andrew MacLeod * gimple-range-op.cc (cfn_constant_float_p): Change base class. (cfn_pass_through_arg1): Adjust using statemenmt. (cfn_signbit): Change base class, adjust using statement. (cfn_copysign): Ditto. (cfn_sqrt): Ditto. (cfn_sincos): Ditto. * range-op-float.cc (fold_range): Change class to range_operator. (rv_fold): Ditto. (op1_range): Ditto (op2_range): Ditto (lhs_op1_relation): Ditto. (lhs_op2_relation): Ditto. (op1_op2_relation): Ditto. (foperator_*): Ditto. (class float_table): New. Inherit from range_op_table. (floating_tree_table) Change to range_op_table pointer. (class floating_op_table): Delete. * range-op.cc (operator_equal): Adjust using statement. (operator_not_equal): Ditto. (operator_lt, operator_le, operator_gt, operator_ge): Ditto. (operator_minus, operator_cast): Ditto. (operator_bitwise_and, pointer_plus_operator): Ditto. (get_float_handle): Change return type. * range-op.h (range_operator_float): Delete. Relocate all methods into class range_operator. (range_op_handler::m_float): Change type to range_operator. (floating_op_table): Delete. (floating_tree_table): Change type. 2023-06-08 Andrew MacLeod * range-op.cc (range_operator::fold_range): Call virtual routine. (range_operator::update_bitmask): New. (operator_equal::update_bitmask): New. (operator_not_equal::update_bitmask): New. (operator_lt::update_bitmask): New. (operator_le::update_bitmask): New. (operator_gt::update_bitmask): New. (operator_ge::update_bitmask): New. (operator_ge::update_bitmask): New. (operator_plus::update_bitmask): New. (operator_minus::update_bitmask): New. (operator_pointer_diff::update_bitmask): New. (operator_min::update_bitmask): New. (operator_max::update_bitmask): New. (operator_mult::update_bitmask): New. (operator_div:operator_div):New. (operator_div::update_bitmask): New. (operator_div::m_code): New member. (operator_exact_divide::operator_exact_divide): New constructor. (operator_lshift::update_bitmask): New. (operator_rshift::update_bitmask): New. (operator_bitwise_and::update_bitmask): New. (operator_bitwise_or::update_bitmask): New. (operator_bitwise_xor::update_bitmask): New. (operator_trunc_mod::update_bitmask): New. (op_ident, op_unknown, op_ptr_min_max): New. (op_nop, op_convert): Delete. (op_ssa, op_paren, op_obj_type): Delete. (op_realpart, op_imagpart): Delete. (op_ptr_min, op_ptr_max): Delete. (pointer_plus_operator:update_bitmask): New. (range_op_table::set): Do not use m_code. (integral_table::integral_table): Adjust to single instances. * range-op.h (range_operator::range_operator): Delete. (range_operator::m_code): Delete. (range_operator::update_bitmask): New. 2023-06-08 Andrew MacLeod * range-op-float.cc (range_operator_float::fold_range): Return NAN of the result type. 2023-06-08 Jakub Jelinek * optabs.cc (expand_ffs): Add forward declaration. (expand_doubleword_clz): Rename to ... (expand_doubleword_clz_ctz_ffs): ... this. Add UNOPTAB argument, handle also doubleword CTZ and FFS in addition to CLZ. (expand_unop): Adjust caller. Also call it for doubleword ctz_optab and ffs_optab. 2023-06-08 Jakub Jelinek PR target/110152 * config/i386/i386-expand.cc (ix86_expand_vector_init_general): For n_words == 2 recurse with mmx_ok as first argument rather than false. 2023-06-07 Roger Sayle * wide-int.cc (wi::bitreverse_large): Use HOST_WIDE_INT_1U to avoid sign extension/undefined behaviour when setting each bit. 2023-06-07 Roger Sayle Uros Bizjak * config/i386/i386-expand.cc (ix86_expand_builtin) : Use new x86_stc instruction when the carry flag must be set. * config/i386/i386.cc (ix86_cc_mode): Use CCCmode for *x86_cmc. (ix86_rtx_costs): Provide accurate rtx_costs for *x86_cmc. * config/i386/i386.h (TARGET_SLOW_STC): New define. * config/i386/i386.md (UNSPEC_STC): New UNSPEC for stc. (x86_stc): New define_insn. (define_peephole2): Convert x86_stc into alternate implementation on pentium4 without -Os when a QImode register is available. (*x86_cmc): New define_insn. (define_peephole2): Convert *x86_cmc into alternate implementation on pentium4 without -Os when a QImode register is available. (*setccc): New define_insn_and_split for a no-op CCCmode move. (*setcc_qi_negqi_ccc_1_): New define_insn_and_split to recognize (and eliminate) the carry flag being copied to itself. (*setcc_qi_negqi_ccc_2_): Likewise. * config/i386/x86-tune.def (X86_TUNE_SLOW_STC): New tuning flag. 2023-06-07 Andrew Pinski * match.pd: Fix comment for the `(zero_one ==/!= 0) ? y : z y` patterns. 2023-06-07 Jeff Law Jeff Law * config/riscv/bitmanip.md (rotrdi3, rotrsi3, rotlsi3): New expanders. (rotrsi3_sext): Expose generator. (rotlsi3 pattern): Hide generator. * config/riscv/riscv-protos.h (riscv_emit_binary): New function declaration. * config/riscv/riscv.cc (riscv_emit_binary): Removed static * config/riscv/riscv.md (addsi3, subsi3, negsi2): Hide generator. (mulsi3, si3): Likewise. (addsi3, subsi3, negsi2, mulsi3, si3): New expanders. (addv4, subv4, mulv4): Use riscv_emit_binary. (mulsidi3): Likewise. (addsi3_extended, subsi3_extended, negsi2_extended): Expose generator. (mulsi3_extended, si3_extended): Likewise. (splitter for shadd feeding divison): Update RTL pattern to account for changes in how 32 bit ops are expanded for TARGET_64BIT. * loop-iv.cc (get_biv_step_1): Process src of extension when it PLUS. 2023-06-07 Dimitar Dimitrov PR target/109725 * config/riscv/riscv.cc (riscv_print_operand): Calculate memmodel only when it is valid. 2023-06-07 Dimitar Dimitrov * config/riscv/riscv.cc (riscv_const_insns): Recursively call for constant element of a vector. 2023-06-07 Jakub Jelinek * match.pd (zero_one_valued_p): Don't handle integer_zerop specially, instead compare tree_nonzero_bits <= 1U rather than just == 1. 2023-06-07 Alex Coplan PR target/110132 * config/aarch64/aarch64-builtins.cc (aarch64_general_simulate_builtin): New. Use it ... (aarch64_init_ls64_builtins): ... here. Switch to declaring public ACLE names for builtins. (aarch64_general_init_builtins): Ensure we invoke the arm_acle.h setup if in_lto_p, just like we do for SVE. * config/aarch64/arm_acle.h: (__arm_ld64b): Delete. (__arm_st64b): Delete. (__arm_st64bv): Delete. (__arm_st64bv0): Delete. 2023-06-07 Alex Coplan PR target/110100 * config/aarch64/aarch64-builtins.cc (aarch64_expand_builtin_ls64): Use input operand for the destination address. * config/aarch64/aarch64.md (st64b): Fix constraint on address operand. 2023-06-07 Alex Coplan PR target/110100 * config/aarch64/aarch64-builtins.cc (aarch64_init_ls64_builtins_types): Replace eight consecutive spaces with tabs. (aarch64_init_ls64_builtins): Likewise. (aarch64_expand_builtin_ls64): Likewise. * config/aarch64/aarch64.md (ld64b): Likewise. (st64b): Likewise. (st64bv): Likewise (st64bv0): Likewise. 2023-06-07 Vladimir N. Makarov * ira-costs.cc: (find_costs_and_classes): Constrain classes of pic offset table pseudo to a general reg subset. 2023-06-07 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_sqmovun): Rename to... (*aarch64_sqmovun_insn): ... This. Reimplement with RTL codes. (aarch64_sqmovun [SD_HSDI]): Reimplement with RTL codes. (aarch64_sqxtun2_le): Likewise. (aarch64_sqxtun2_be): Likewise. (aarch64_sqxtun2): Adjust for the above. (aarch64_sqmovun): New define_expand. * config/aarch64/iterators.md (UNSPEC_SQXTUN): Delete. (half_mask): New mode attribute. * config/aarch64/predicates.md (aarch64_simd_umax_half_mode): New predicate. 2023-06-07 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_addp): Reimplement as... (aarch64_addp_insn): ... This... (aarch64_addp_insn): ... And this. (aarch64_addp): New define_expand. 2023-06-07 Juzhe-Zhong * config/riscv/riscv-protos.h (expand_vec_perm_const): New function. * config/riscv/riscv-v.cc (rvv_builder::can_duplicate_repeating_sequence_p): Support POLY handling. (rvv_builder::single_step_npatterns_p): New function. (rvv_builder::npatterns_all_equal_p): Ditto. (const_vec_all_in_range_p): Support POLY handling. (gen_const_vector_dup): Ditto. (emit_vlmax_gather_insn): Add vrgatherei16. (emit_vlmax_masked_gather_mu_insn): Ditto. (expand_const_vector): Add VLA SLP const vector support. (expand_vec_perm): Support POLY. (struct expand_vec_perm_d): New struct. (shuffle_generic_patterns): New function. (expand_vec_perm_const_1): Ditto. (expand_vec_perm_const): Ditto. * config/riscv/riscv.cc (riscv_vectorize_vec_perm_const): Ditto. (TARGET_VECTORIZE_VEC_PERM_CONST): New targethook. 2023-06-07 Andrew Pinski PR middle-end/110117 * expr.cc (expand_single_bit_test): Handle const_int from expand_expr. 2023-06-07 Andrew Pinski * expr.cc (do_store_flag): Rearrange the TER code so that it overrides the nonzero bits info if we had `a & POW2`. 2023-06-07 Andrew Pinski PR tree-optimization/110134 * match.pd (-A CMP -B -> B CMP A): Allow EQ/NE for all integer types. (-A CMP CST -> B CMP (-CST)): Likewise. 2023-06-07 Andrew Pinski PR tree-optimization/89263 PR tree-optimization/99069 PR tree-optimization/20083 PR tree-optimization/94898 * match.pd: Add patterns to optimize `a ? onezero : onezero` with one of the operands are constant. 2023-06-07 Andrew Pinski * match.pd (zero_one_valued_p): Match 0 integer constant too. 2023-06-07 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat32mf2_t): Take RVV_REQUIRE_ELEN_FP_16 as requirement. (vfloat32m1_t): Ditto. (vfloat32m2_t): Ditto. (vfloat32m4_t): Ditto. (vfloat32m8_t): Ditto. (vint16mf4_t): Ditto. (vint16mf2_t): Ditto. (vint16m1_t): Ditto. (vint16m2_t): Ditto. (vint16m4_t): Ditto. (vint16m8_t): Ditto. (vuint16mf4_t): Ditto. (vuint16mf2_t): Ditto. (vuint16m1_t): Ditto. (vuint16m2_t): Ditto. (vuint16m4_t): Ditto. (vuint16m8_t): Ditto. (vint32mf2_t): Ditto. (vint32m1_t): Ditto. (vint32m2_t): Ditto. (vint32m4_t): Ditto. (vint32m8_t): Ditto. (vuint32mf2_t): Ditto. (vuint32m1_t): Ditto. (vuint32m2_t): Ditto. (vuint32m4_t): Ditto. (vuint32m8_t): Ditto. 2023-06-07 Jason Merrill PR c++/58487 * doc/invoke.texi: Document it. 2023-06-06 Roger Sayle * doc/rtl.texi (bitreverse, copysign): Document new RTX codes. * rtl.def (BITREVERSE, COPYSIGN): Define new RTX codes. * simplify-rtx.cc (simplify_unary_operation_1): Optimize NOT (BITREVERSE x) as BITREVERSE (NOT x). Optimize POPCOUNT (BITREVERSE x) as POPCOUNT x. Optimize PARITY (BITREVERSE x) as PARITY x. Optimize BITREVERSE (BITREVERSE x) as x. (simplify_const_unary_operation) : Evaluate BITREVERSE of a constant integer at compile-time. (simplify_binary_operation_1) : Optimize COPY_SIGN (x, x) as x. Optimize COPYSIGN (x, C) as ABS x or NEG (ABS x) for constant C. Optimize COPYSIGN (ABS x, y) and COPYSIGN (NEG x, y) as COPYSIGN (x, y). Optimize COPYSIGN (x, ABS y) as ABS x. Optimize COPYSIGN (COPYSIGN (x, y), z) as COPYSIGN (x, z). Optimize COPYSIGN (x, COPYSIGN (y, z)) as COPYSIGN (x, z). (simplify_const_binary_operation): Evaluate COPYSIGN of constant arguments at compile-time. 2023-06-06 Uros Bizjak * rtl.h (function_invariant_p): Change return type from int to bool. * reload1.cc (function_invariant_p): Change return type from int to bool and adjust function body accordingly. 2023-06-06 Juzhe-Zhong * config/riscv/autovec-opt.md (*_fma): New pattern. (*single_mult_plus): Ditto. (*double_mult_plus): Ditto. (*sign_zero_extend_fma): Ditto. (*zero_sign_extend_fma): Ditto. * config/riscv/riscv-protos.h (enum insn_type): New enum. 2023-06-06 Kwok Cheung Yeung Tobias Burnus * gimplify.cc (omp_notice_variable): Apply GOVD_MAP_ALLOC_ONLY flag and defaultmap flags if the defaultmap has GOVD_MAP_FORCE_PRESENT flag set. (omp_get_attachment): Handle map clauses with 'present' modifier. (omp_group_base): Likewise. (gimplify_scan_omp_clauses): Reorder present maps to come first. Set GOVD flags for present defaultmaps. (gimplify_adjust_omp_clauses_1): Set map kind for present defaultmaps. * omp-low.cc (scan_sharing_clauses): Handle 'always, present' map clauses. (lower_omp_target): Handle map clauses with 'present' modifier. Handle 'to' and 'from' clauses with 'present'. * tree-core.h (enum omp_clause_defaultmap_kind): Add OMP_CLAUSE_DEFAULTMAP_PRESENT defaultmap kind. * tree-pretty-print.cc (dump_omp_clause): Handle 'map', 'to' and 'from' clauses with 'present' modifier. Handle present defaultmap. * tree.h (OMP_CLAUSE_MOTION_PRESENT): New #define. 2023-06-06 Segher Boessenkool * config/rs6000/genfusion.pl: Delete some dead code. 2023-06-06 Segher Boessenkool * config/rs6000/genfusion.pl (gen_ld_cmpi_p10_one): New, rewritten and split out from... (gen_ld_cmpi_p10): ... this. 2023-06-06 Jeevitha Palanisamy PR target/106907 * config/rs6000/rs6000.cc (vec_const_128bit_to_bytes): Remove duplicate expression. 2023-06-06 Kyrylo Tkachov * config/aarch64/aarch64-builtins.cc (aarch64_general_gimple_fold_builtin): Handle unsigned reduc_plus_scal_ builtins. * config/aarch64/aarch64-simd-builtins.def (addp): Delete DImode instances. * config/aarch64/aarch64-simd.md (aarch64_addpdi): Delete. * config/aarch64/arm_neon.h (vpaddd_s64): Reimplement with __builtin_aarch64_reduc_plus_scal_v2di. (vpaddd_u64): Reimplement with __builtin_aarch64_reduc_plus_scal_v2di_uu. 2023-06-06 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_shr_n): Delete. (aarch64_rshr_n_insn): New define_insn. (aarch64_rshr_n): New define_expand. 2023-06-06 Kyrylo Tkachov * config/aarch64/aarch64-simd.md (aarch64_shrn_insn_le): Delete. (aarch64_shrn_insn_be): Delete. (*aarch64_shrn_vect): Rename to... (*aarch64_shrn): ... This. (aarch64_shrn): Remove reference to the above deleted patterns. (aarch64_rshrn_insn_le): Delete. (aarch64_rshrn_insn_be): Delete. (aarch64_rshrn_insn): New define_insn. (aarch64_rshrn): Remove references to the above deleted patterns. 2023-06-06 Kyrylo Tkachov * config/aarch64/aarch64-protos.h (aarch64_parallel_select_half_p): Define prototype. (aarch64_pars_overlap_p): Likewise. * config/aarch64/aarch64-simd.md (aarch64_addlv): Express in terms of UNSPEC_ADDV. (*aarch64_addlv_ze): Likewise. (*aarch64_addlv_reduction): Define. (*aarch64_uaddlv_reduction_2): Likewise. * config/aarch64/aarch64.cc (aarch64_parallel_select_half_p): Define. (aarch64_pars_overlap_p): Likewise. * config/aarch64/iterators.md (UNSPEC_SADDLV, UNSPEC_UADDLV): Delete. (VQUADW): New mode attribute. (VWIDE2X_S): Likewise. (USADDLV): Delete. (su): Delete handling of UNSPEC_SADDLV, UNSPEC_UADDLV. * config/aarch64/predicates.md (vect_par_cnst_select_half): Define. 2023-06-06 Richard Biener PR middle-end/110055 * gimplify.cc (gimplify_target_expr): Do not emit CLOBBERs for variables which have static storage duration after gimplifying their initializers. 2023-06-06 Richard Biener PR tree-optimization/109143 * tree-ssa-structalias.cc (solution_set_expand): Avoid one bitmap iteration and optimize bit range setting. 2023-06-06 Hans-Peter Nilsson PR bootstrap/110120 * postreload.cc (reload_cse_move2add, move2add_use_add2_insn): Use XVECEXP, not XEXP, to access first item of a PARALLEL. 2023-06-06 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4_t): Add vfloat16mf4_t to WF operations. (vfloat16mf2_t): Likewise. (vfloat16m1_t): Likewise. (vfloat16m2_t): Likewise. (vfloat16m4_t): Likewise. (vfloat16m8_t): Likewise. * config/riscv/vector-iterators.md: Add FP=16 to VWF, VWF_ZVE64, VWLMUL1, VWLMUL1_ZVE64, vwlmul1 and vwlmul1_zve64. 2023-06-06 Fei Gao * config/riscv/riscv.cc (riscv_adjust_libcall_cfi_prologue): Use Pmode for cfi reg/mem machmode (riscv_adjust_libcall_cfi_epilogue): Use Pmode for cfi reg machmode 2023-06-06 Li Xu * config/riscv/vector-iterators.md: Fix 'REQUIREMENT' for machine_mode 'MODE'. * config/riscv/vector.md (@pred_indexed_store ): change VNX16_QHSI to VNX16_QHSDI. (@pred_indexed_store): Ditto. 2023-06-06 Pan Li * config/riscv/vector-iterators.md: Fix typo in mode attr. 2023-06-05 Andre Vieira Joel Hutton * doc/generic.texi: Remove old tree codes. * expr.cc (expand_expr_real_2): Remove old tree code cases. * gimple-pretty-print.cc (dump_binary_rhs): Likewise. * optabs-tree.cc (optab_for_tree_code): Likewise. (supportable_half_widening_operation): Likewise. * tree-cfg.cc (verify_gimple_assign_binary): Likewise. * tree-inline.cc (estimate_operator_cost): Likewise. (op_symbol_code): Likewise. * tree-vect-data-refs.cc (vect_get_smallest_scalar_type): Likewise. (vect_analyze_data_ref_accesses): Likewise. * tree-vect-generic.cc (expand_vector_operations_1): Likewise. * cfgexpand.cc (expand_debug_expr): Likewise. * tree-vect-stmts.cc (vectorizable_conversion): Likewise. (supportable_widening_operation): Likewise. * gimple-range-op.cc (gimple_range_op_handler::maybe_non_standard): Likewise. * optabs.def (vec_widen_ssubl_hi_optab, vec_widen_ssubl_lo_optab, vec_widen_saddl_hi_optab, vec_widen_saddl_lo_optab, vec_widen_usubl_hi_optab, vec_widen_usubl_lo_optab, vec_widen_uaddl_hi_optab, vec_widen_uaddl_lo_optab): Remove optabs. * tree-pretty-print.cc (dump_generic_node): Remove tree code definition. * tree.def (WIDEN_PLUS_EXPR, WIDEN_MINUS_EXPR, VEC_WIDEN_PLUS_HI_EXPR, VEC_WIDEN_PLUS_LO_EXPR, VEC_WIDEN_MINUS_HI_EXPR, VEC_WIDEN_MINUS_LO_EXPR): Likewise. 2023-06-05 Andre Vieira Joel Hutton Tamar Christina * config/aarch64/aarch64-simd.md (vec_widen_addl_lo_): Rename this ... (vec_widen_add_lo_): ... to this. (vec_widen_addl_hi_): Rename this ... (vec_widen_add_hi_): ... to this. (vec_widen_subl_lo_): Rename this ... (vec_widen_sub_lo_): ... to this. (vec_widen_subl_hi_): Rename this ... (vec_widen_sub_hi_): ...to this. * doc/generic.texi: Document new IFN codes. * internal-fn.cc (lookup_hilo_internal_fn): Add lookup function. (commutative_binary_fn_p): Add widen_plus fn's. (widening_fn_p): New function. (narrowing_fn_p): New function. (direct_internal_fn_optab): Change visibility. * internal-fn.def (DEF_INTERNAL_WIDENING_OPTAB_FN): Macro to define an internal_fn that expands into multiple internal_fns for widening. (IFN_VEC_WIDEN_PLUS, IFN_VEC_WIDEN_PLUS_HI, IFN_VEC_WIDEN_PLUS_LO, IFN_VEC_WIDEN_PLUS_EVEN, IFN_VEC_WIDEN_PLUS_ODD, IFN_VEC_WIDEN_MINUS, IFN_VEC_WIDEN_MINUS_HI, IFN_VEC_WIDEN_MINUS_LO, IFN_VEC_WIDEN_MINUS_ODD, IFN_VEC_WIDEN_MINUS_EVEN): Define widening plus,minus functions. * internal-fn.h (direct_internal_fn_optab): Declare new prototype. (lookup_hilo_internal_fn): Likewise. (widening_fn_p): Likewise. (Narrowing_fn_p): Likewise. * optabs.cc (commutative_optab_p): Add widening plus optabs. * optabs.def (OPTAB_D): Define widen add, sub optabs. * tree-vect-patterns.cc (vect_recog_widen_op_pattern): Support patterns with a hi/lo or even/odd split. (vect_recog_sad_pattern): Refactor to use new IFN codes. (vect_recog_widen_plus_pattern): Likewise. (vect_recog_widen_minus_pattern): Likewise. (vect_recog_average_pattern): Likewise. * tree-vect-stmts.cc (vectorizable_conversion): Add support for _HILO IFNs. (supportable_widening_operation): Likewise. * tree.def (WIDEN_SUM_EXPR): Update example to use new IFNs. 2023-06-05 Andre Vieira Joel Hutton * tree-vect-patterns.cc: Add include for gimple-iterator. (vect_recog_widen_op_pattern): Refactor to use code_helper. (vect_gimple_build): New function. * tree-vect-stmts.cc (simple_integer_narrowing): Refactor to use code_helper. (vectorizable_call): Likewise. (vect_gen_widened_results_half): Likewise. (vect_create_vectorized_demotion_stmts): Likewise. (vect_create_vectorized_promotion_stmts): Likewise. (vect_create_half_widening_stmts): Likewise. (vectorizable_conversion): Likewise. (supportable_widening_operation): Likewise. (supportable_narrowing_operation): Likewise. * tree-vectorizer.h (supportable_widening_operation): Change prototype to use code_helper. (supportable_narrowing_operation): Likewise. (vect_gimple_build): New function prototype. * tree.h (code_helper::safe_as_tree_code): New function. (code_helper::safe_as_fn_code): New function. 2023-06-05 Roger Sayle * wide-int.cc (wi::bitreverse_large): New function implementing bit reversal of an integer. * wide-int.h (wi::bitreverse): New (template) function prototype. (bitreverse_large): Prototype helper function/implementation. (wi::bitreverse): New template wrapper around bitreverse_large. 2023-06-05 Uros Bizjak * rtl.h (print_rtl_single): Change return type from int to void. (print_rtl_single_with_indent): Ditto. * print-rtl.h (class rtx_writer): Ditto. Change m_sawclose to bool. * print-rtl.cc (rtx_writer::rtx_writer): Update for m_sawclose change. (rtx_writer::print_rtx_operand_code_0): Ditto. (rtx_writer::print_rtx_operand_codes_E_and_V): Ditto. (rtx_writer::print_rtx_operand_code_i): Ditto. (rtx_writer::print_rtx_operand_code_u): Ditto. (rtx_writer::print_rtx_operand): Ditto. (rtx_writer::print_rtx): Ditto. (rtx_writer::finish_directive): Ditto. (print_rtl_single): Change return type from int to void and adjust function body accordingly. (rtx_writer::print_rtl_single_with_indent): Ditto. 2023-06-05 Uros Bizjak * rtl.h (reg_classes_intersect_p): Change return type from int to bool. (reg_class_subset_p): Ditto. * reginfo.cc (reg_classes_intersect_p): Ditto. (reg_class_subset_p): Ditto. 2023-06-05 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat32mf2_t): New type for DEF_RVV_WEXTF_OPS. (vfloat32m1_t): Ditto. (vfloat32m2_t): Ditto. (vfloat32m4_t): Ditto. (vfloat32m8_t): Ditto. (vint16mf4_t): New type for DEF_RVV_CONVERT_I_OPS. (vint16mf2_t): Ditto. (vint16m1_t): Ditto. (vint16m2_t): Ditto. (vint16m4_t): Ditto. (vint16m8_t): Ditto. (vuint16mf4_t): New type for DEF_RVV_CONVERT_U_OPS. (vuint16mf2_t): Ditto. (vuint16m1_t): Ditto. (vuint16m2_t): Ditto. (vuint16m4_t): Ditto. (vuint16m8_t): Ditto. (vint32mf2_t): New type for DEF_RVV_WCONVERT_I_OPS. (vint32m1_t): Ditto. (vint32m2_t): Ditto. (vint32m4_t): Ditto. (vint32m8_t): Ditto. (vuint32mf2_t): New type for DEF_RVV_WCONVERT_U_OPS. (vuint32m1_t): Ditto. (vuint32m2_t): Ditto. (vuint32m4_t): Ditto. (vuint32m8_t): Ditto. * config/riscv/vector-iterators.md: Add FP=16 support for V, VWCONVERTI, VCONVERT, VNCONVERT, VMUL1 and vlmul1. 2023-06-05 Andrew Pinski PR bootstrap/110085 * Makefile.in (clean): Remove the removing of MULTILIB_DIR/MULTILIB_OPTIONS directories. 2023-06-05 YunQiang Su * config/mips/mips-protos.h (mips_emit_speculation_barrier): New prototype. * config/mips/mips.cc (speculation_barrier_libfunc): New static variable. (mips_init_libfuncs): Initialize it. (mips_emit_speculation_barrier): New function. * config/mips/mips.md (speculation_barrier): Call mips_emit_speculation_barrier. 2023-06-05 Juzhe-Zhong * config/riscv/riscv-v.cc (class rvv_builder): Reorganize functions. (rvv_builder::can_duplicate_repeating_sequence_p): Ditto. (rvv_builder::repeating_sequence_use_merge_profitable_p): Ditto. (rvv_builder::get_merged_repeating_sequence): Ditto. (rvv_builder::get_merge_scalar_mask): Ditto. (emit_scalar_move_insn): Ditto. (emit_vlmax_integer_move_insn): Ditto. (emit_nonvlmax_integer_move_insn): Ditto. (emit_vlmax_gather_insn): Ditto. (emit_vlmax_masked_gather_mu_insn): Ditto. (get_repeating_sequence_dup_machine_mode): Ditto. 2023-06-05 Juzhe-Zhong * config/riscv/autovec.md: Split arguments. * config/riscv/riscv-protos.h (expand_vec_perm): Ditto. * config/riscv/riscv-v.cc (expand_vec_perm): Ditto. 2023-06-04 Andrew Pinski * expr.cc (do_store_flag): Improve for single bit testing not against zero but against that single bit. 2023-06-04 Andrew Pinski * expr.cc (do_store_flag): Extend the one bit checking case to handle the case where we don't have an and but rather still one bit is known to be non-zero. 2023-06-04 Jeff Law * config/h8300/constraints.md (Zz): Make this a normal constraint. * config/h8300/h8300.cc (TARGET_LRA_P): Remove. * config/h8300/logical.md (H8/SX bit patterns): Remove. 2023-06-04 Takayuki 'January June' Suwa * config/xtensa/xtensa.md (*btrue_INT_MIN, *eqne_INT_MIN): New insn_and_split patterns. 2023-06-04 Juzhe-Zhong PR target/110109 * config/riscv/riscv-vector-builtins-bases.cc: Change expand approach. * config/riscv/vector.md (@vlmul_extx2): Remove it. (@vlmul_extx4): Ditto. (@vlmul_extx8): Ditto. (@vlmul_extx16): Ditto. (@vlmul_extx32): Ditto. (@vlmul_extx64): Ditto. (*vlmul_extx2): Ditto. (*vlmul_extx4): Ditto. (*vlmul_extx8): Ditto. (*vlmul_extx16): Ditto. (*vlmul_extx32): Ditto. (*vlmul_extx64): Ditto. 2023-06-04 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat32mf2_t): Add vfloat32mf2_t type to vfncvt.f.f.w operations. (vfloat32m1_t): Likewise. (vfloat32m2_t): Likewise. (vfloat32m4_t): Likewise. (vfloat32m8_t): Likewise. * config/riscv/riscv-vector-builtins.def: Fix typo in comments. * config/riscv/vector-iterators.md: Add single to half machine mode conversion. 2023-06-04 Juzhe-Zhong * config/riscv/autovec-opt.md (*not): Move to autovec-opt.md. (*n): Ditto. * config/riscv/autovec.md (*not): Ditto. (*n): Ditto. * config/riscv/vector.md: Ditto. 2023-06-04 Roger Sayle PR target/110083 * config/i386/i386-features.cc (scalar_chain::convert_compare): Update or delete REG_EQUAL notes, converting CONST_INT and CONST_WIDE_INT immediate operands to a suitable CONST_VECTOR. 2023-06-04 Jason Merrill PR c++/97720 * tree-eh.cc (lower_resx): Pass the exception pointer to the failure_decl. * except.h: Tweak comment. 2023-06-04 Hans-Peter Nilsson * postreload.cc (move2add_use_add2_insn): Handle trivial single_sets. Rename variable PAT to SET. (move2add_use_add3_insn, reload_cse_move2add): Similar. 2023-06-04 Pan Li * config/riscv/riscv-vector-builtins-types.def (vfloat16mf4_t): Add the float16 type to DEF_RVV_F_OPS. (vfloat16mf2_t): Likewise. (vfloat16m1_t): Likewise. (vfloat16m2_t): Likewise. (vfloat16m4_t): Likewise. (vfloat16m8_t): Likewise. * config/riscv/riscv.md: Add vfloat16*_t to attr mode. * config/riscv/vector-iterators.md: Add vfloat16*_t machine mode to V, V_WHOLE, V_FRACT, VINDEX, VM, VEL and sew. * config/riscv/vector.md: Add vfloat16*_t machine mode to sew, vlmul and ratio. 2023-06-03 Fei Gao * config/riscv/riscv.cc (riscv_expand_epilogue): fix cfi issue with correct offset. 2023-06-03 Die Li * config/riscv/thead.md (*th_cond_gpr_mov): Delete. 2023-06-03 Juzhe-Zhong * config/riscv/predicates.md: Change INTVAL into UINTVAL. 2023-06-03 Juzhe-Zhong * config/riscv/vector.md: Add vector-opt.md. * config/riscv/autovec-opt.md: New file. 2023-06-03 liuhongt PR tree-optimization/110067 * gimple-ssa-store-merging.cc (find_bswap_or_nop): Don't try bswap + rotate when TYPE_PRECISION(n->type) > n->range. 2023-06-03 liuhongt PR target/92658 * config/i386/mmx.md (truncv2hiv2qi2): New define_insn. (truncv2si2): Ditto. 2023-06-02 Andrew Pinski PR rtl-optimization/102733 * dse.cc (store_info): Add addrspace field. (record_store): Record the address space and check to make sure they are the same. 2023-06-02 Andrew Pinski PR rtl-optimization/110042 * ifcvt.cc (bbs_ok_for_cmove_arith): Allow paradoxical subregs. (bb_valid_for_noce_process_p): Strip the subreg for the SET_DEST. 2023-06-02 Iain Sandoe PR target/110044 * config/rs6000/rs6000.cc (darwin_rs6000_special_round_type_align): Make sure that we do not have a cap on field alignment before altering the struct layout based on the type alignment of the first entry. 2023-06-02 David Faust PR debug/110073 * btfout.cc (btf_absolute_func_id): New function. (btf_asm_func_type): Call it here. Change index parameter from size_t to ctf_id_t. Use PRIu64 formatter. 2023-06-02 Alex Coplan * btfout.cc (btf_asm_type): Use PRIu64 instead of %lu for uint64_t. (btf_asm_datasec_type): Likewise. 2023-06-02 Carl Love * config/rs6000/rs6000-builtins.def (__builtin_altivec_tr_stxvrhx, __builtin_altivec_tr_stxvrwx): Fix type of third argument. 2023-06-02 Jason Merrill PR c++/110070 PR c++/105838 * tree.h (DECL_MERGEABLE): New. * tree-core.h (struct tree_decl_common): Mention it. * gimplify.cc (gimplify_init_constructor): Check it. * cgraph.cc (symtab_node::address_can_be_compared_p): Likewise. * varasm.cc (categorize_decl_for_section): Likewise. 2023-06-02 Uros Bizjak * rtl.h (stack_regs_mentioned): Change return type from int to bool. * reg-stack.cc (struct_block_info_def): Change "done" to bool. (stack_regs_mentioned_p): Change return type from int to bool and adjust function body accordingly. (stack_regs_mentioned): Ditto. (check_asm_stack_operands): Ditto. Change "malformed_asm" variable to bool. (move_for_stack_reg): Recode handling of control_flow_insn_deleted. (swap_rtx_condition_1): Change return type from int to bool and adjust function body accordingly. Change "r" variable to bool. (swap_rtx_condition): Change return type from int to bool and adjust function body accordingly. (subst_stack_regs_pat): Recode handling of control_flow_insn_deleted. (subst_stack_regs): Ditto. (convert_regs_entry): Change return type from int to bool and adjust function body accordingly. Change "inserted" variable to bool. (convert_regs_1): Recode handling of control_flow_insn_deleted. (convert_regs_2): Recode handling of cfg_altered. (convert_regs): Ditto. Change "inserted" variable to bool. 2023-06-02 Jason Merrill