1. 13 Sep, 2019 5 commits
  2. 12 Sep, 2019 6 commits
    • re PR tree-optimization/89386 (Generation of vectorized MULHRS (Multiply High… · d6ecb707
      re PR tree-optimization/89386 (Generation of vectorized MULHRS (Multiply High with Round and Scale) instruction)
      
      	PR tree-optimization/89386
      	* config/i386/sse.md (smulhrs<mode>3): New expander.
      	(smulhrsv4hi3): Ditto.
      
      testsuite/ChangeLog:
      
      	PR tree-optimization/89386
      	* gcc.target/i386/pr89386.c: New test.
      	* gcc.target/i386/pr89386-1.c: Ditto.
      
      From-SVN: r275689
      Uros Bizjak committed
    • re PR tree-optimization/91750 (Induction vectorization introduces signed overflows) · bdc91a32
      2019-09-12  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/91750
      	* tree-vect-loop.c (vectorizable_induction): Compute IV increments
      	in the type of the evolution.
      
      	* gcc.dg/vect/pr91750.c: New testcase.
      
      From-SVN: r275685
      Richard Biener committed
    • PR libstdc++/91748 fix std::for_each_n for random access iterators · 52f6afe0
      	PR libstdc++/91748
      	* include/bits/stl_algo.h (for_each_n): Fix random access iterator
      	case.
      	* testsuite/25_algorithms/for_each/for_each_n.cc: Test with random
      	access iterators.
      
      From-SVN: r275683
      Jonathan Wakely committed
    • Vectorise multiply high with scaling operations (PR 89386) · 58cc9876
      2019-09-12  Yuliang Wang  <yuliang.wang@arm.com>
      
      gcc/
      	PR tree-optimization/89386
      	* config/aarch64/aarch64-sve2.md (<su>mull<bt><Vwide>)
      	(<r>shrnb<mode>, <r>shrnt<mode>): New SVE2 patterns.
      	(<su>mulh<r>s<mode>3): New pattern for MULHRS.
      	* config/aarch64/iterators.md (UNSPEC_SMULLB, UNSPEC_SMULLT)
      	(UNSPEC_UMULLB, UNSPEC_UMULLT, UNSPEC_SHRNB, UNSPEC_SHRNT)
      	(UNSPEC_RSHRNB, UNSPEC_RSHRNT, UNSPEC_SMULHS, UNSPEC_SMULHRS)
      	UNSPEC_UMULHS, UNSPEC_UMULHRS): New unspecs.
      	(MULLBT, SHRNB, SHRNT, MULHRS): New int iterators.
      	(su, r): Handle the unspecs above.
      	(bt): New int attribute.
      	* internal-fn.def (IFN_MULHS, IFN_MULHRS): New internal functions.
      	* internal-fn.c (first_commutative_argument): Commutativity info for
      	above.
      	* optabs.def (smulhs_optab, smulhrs_optab, umulhs_optab)
      	(umulhrs_optab): New optabs.
      	* doc/md.texi (smulhs$var{m3}, umulhs$var{m3})
      	(smulhrs$var{m3}, umulhrs$var{m3}): Documentation for the above.
      	* tree-vect-patterns.c (vect_recog_mulhs_pattern): New pattern
      	function.
      	(vect_vect_recog_func_ptrs): Add it.
      	* testsuite/gcc.target/aarch64/sve2/mulhrs_1.c: New test.
      	* testsuite/gcc.dg/vect/vect-mulhrs-1.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-2.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-3.c: As above.
      	* testsuite/gcc.dg/vect/vect-mulhrs-4.c: As above.
      	* doc/sourcebuild.texi (vect_mulhrs_hi): Document new target selector.
      	* testsuite/lib/target-supports.exp
      	(check_effective_target_vect_mulhrs_hi): Return true for AArch64
      	with SVE2.
      
      From-SVN: r275682
      Yuliang Wang committed
    • Daily bump. · 8c58d9d8
      From-SVN: r275680
      GCC Administrator committed
  3. 11 Sep, 2019 19 commits
  4. 10 Sep, 2019 10 commits
    • PR c++/91673 - ICE with noexcept in alias-declaration. · 480c18e1
      	* parser.c (CP_PARSER_FLAGS_DELAY_NOEXCEPT): New parser flag.
      	(cp_parser_lambda_declarator_opt): Pass CP_PARSER_FLAGS_NONE to
      	cp_parser_exception_specification_opt.
      	(cp_parser_direct_declarator): Adjust a call to
      	cp_parser_exception_specification_opt.
      	(cp_parser_member_declaration): Pass CP_PARSER_FLAGS_DELAY_NOEXCEPT
      	to cp_parser_declarator if not processing a friend or typedef
      	declaration.
      	(cp_parser_late_noexcept_specifier): Adjust a call to
      	cp_parser_noexcept_specification_opt.
      	(cp_parser_noexcept_specification_opt): New parameter for parser flags,
      	drop the FRIEND_P parameter.  Use the new parameter.
      	(cp_parser_exception_specification_opt): Likewise.
      	(cp_parser_transaction): Adjust a call to
      	cp_parser_noexcept_specification_opt.
      	(cp_parser_transaction_expression): Likewise.
      
      	* g++.dg/cpp1z/using7.C: New test.
      	* g++.dg/cpp1z/using8.C: New test.
      
      From-SVN: r275617
      Marek Polacek committed
    • PR c++/91705 - constexpr evaluation rejects ++/-- on floats. · d85569f6
      	* constexpr.c (cxx_eval_increment_expression): Call fold_simple on
      	the offset.
      
      	* g++.dg/cpp1y/constexpr-incr2.C: New test.
      
      From-SVN: r275613
      Marek Polacek committed
    • libgo: Solaris and x/sys/cpu compatibility fixes · efc86492
          
          Restore Solaris compatibility fixes lost when internal/x/net/lif moved
          to golang.org/x/net/lif.  Also fix the Makefile for x/net/lif and
          x/net/route.
          
          Change x/sys/cpu to get the cache line size from goarch.sh as the
          gofrontend version of internal/cpu does.
          
          Partially based on work by Rainer Orth.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194438
      
      From-SVN: r275611
      Ian Lance Taylor committed
    • re PR go/91621 (libgo/mksysinfo.sh: please avoid test ==) · 4d7bfeec
      	PR go/91621
          mksysinfo: change test == to test =
          
          Fixes https://gcc.gnu.org/PR91621
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194569
      
      From-SVN: r275608
      Ian Lance Taylor committed
    • go/internal/gccgoimporter: support embedded field in pointer loop · a1fc3891
          
          Backport of https://golang.org/cl/194440.  Original description:
          
              If an embedded field refers to a type via a pointer, the parser needs
              to know the name of the embedded field. It is possible that the
              pointer type is not yet resolved. This CL fixes the parser to handle
              that case by setting the pointer element type to the unresolved named
              type while the pointer is being resolved.
          
          Updates golang/go#34182
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/194562
      
      From-SVN: r275606
      Ian Lance Taylor committed
    • Remove call_really_used_regs · d7fb4c31
      After previous patches, it's now possible for call_used_regs to be
      the "real" set of call-clobbered registers, without any special
      handling for fixed registers.  This patch therefore removes the
      separate call_really_used_regs and updates the targets that define
      CALL_REALLY_USED_REGISTERS so that they handle call_used_regs in
      the same way that they used to handle call_really_used_regs.
      
      With this change, it's no longer necessary for targets that define
      CALL_REALLY_USED_REGISTERS to define CALL_USED_REGISTER as well.
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* doc/tm.texi.in: Document that exactly one of CALL_USED_REGISTERS
      	and CALL_REALLY_USED_REGISTERS must be defined, and that
      	CALL_REALLY_USED_REGISTERS is preferred.
      	* doc/tm.texi: Regenerate.
      	* hard-reg-set.h (target_hard_regs::x_call_really_used_regs): Delete.
      	(call_really_used_regs): Likewise.
      	* reginfo.c: Raise an #error if both CALL_USED_REGISTERS and
      	CALL_REALLY_USED_REGISTERS are defined.
      	(initial_call_used_regs): Use CALL_REALLY_USED_REGISTERS as the
      	initial value if defined.
      	(initial_call_really_used_regs): Delete.
      	(saved_call_really_used_regs): Likewise.
      	(CALL_REALLY_USED_REGNO_P): Likewise.
      	(init_reg_sets): Remove handling of call_really_used_regs.
      	(save_register_info, restore_register_info, globalize_reg): Likewise.
      	(init_reg_sets_1): Likewise.  Use call_used_regs instead of
      	CALL_REALLY_USED_REGNO_P.  Don't set call_used_regs for registers
      	outside operand_reg_set.
      	(fix_register): Don't change call_used_regs if
      	CALL_REALLY_USED_REGISTERS is defined.
      	* config/csky/csky.h (CALL_USED_REGISTERS): Delete.
      	* config/csky/csky.c (get_csky_live_regs): Use call_used_regs
      	instead of call_really_used_regs.
      	(csky_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/ia64/ia64.h (CALL_USED_REGISTERS): Delete.
      	* config/ia64/ia64.c (fix_range): Don't set call_used_regs when
      	making a register fixed.
      	* config/m32r/m32r.h (CALL_USED_REGISTERS): Delete.
      	* config/m32r/m32r.c (MUST_SAVE_REGISTER): Use call_used_regs
      	instead of call_really_used_regs.
      	(m32r_conditional_register_usage): Don't set call_used_regs when
      	making a register fixed.
      	* config/mips/mips.h (CALL_USED_REGISTERS): Delete.
      	* config/mips/mips.c (mips_global_pointer): Use call_used_regs
      	instead of call_really_used_regs.
      	(mips_interrupt_extra_call_saved_reg_p): Likewise.
      	(mips_cfun_call_saved_reg_p): Likewise.
      	(mips_swap_registers): Remove the old handling of call_used_regs
      	and change the handling of call_really_used_regs to use call_used_regs
      	instead.
      	(mips_conditional_register_usage): Likewise.
      	* config/mn10300/mn10300.h (CALL_USED_REGISTERS): Delete.
      	* config/mn10300/mn10300.c (fp_regs_to_save): Use call_used_regs
      	instead of call_really_used_regs.
      	(mn10300_get_live_callee_saved_regs): Likewise.
      	(mn10300_expand_prologue, mn10300_expand_epilogue): Likewise.
      	(mn10300_conditional_register_usage): Don't set call_used_regs when
      	making a register fixed.
      	* config/rs6000/rs6000.h (CALL_USED_REGISTERS): Delete.
      	* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
      	Remove the old handling of call_used_regs and change the handling
      	of call_really_used_regs to use call_used_regs instead.
      	* config/s390/s390.h (CALL_USED_REGISTERS): Delete.
      	* config/s390/s390.c (s390_regs_ever_clobbered): Use call_used_regs
      	instead of call_really_used_regs.
      	(s390_register_info_gprtofpr, s390_register_info): Likewise.
      	(s390_hard_regno_rename_ok, s390_hard_regno_scratch_ok): Likewise.
      	(s390_emit_prologue, s300_set_up_by_prologue): Likewise.
      	(s390_can_use_return_insn, s390_optimize_prologue): Likewise.
      	(s390_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/sh/sh.h (CALL_USED_REGISTERS): Delete.
      	* config/sh/sh.c (output_stack_adjust, calc_live_regs): Likewise.
      	(sh_fix_range, reg_unused_after): Likewise.
      	(sh_conditional_register_usage): Remove the old handling of
      	call_used_regs and change the handling of call_really_used_regs
      	to use call_used_regs instead.
      	* config/sparc/sparc.h (CALL_USED_REGISTERS): Delete.
      	* config/sparc/sparc.c (sparc_conditional_register_usage): Don't set
      	call_used_regs when making a register fixed.
      	* config/tilegx/tilegx.h (CALL_USED_REGISTERS): Delete.
      	* config/tilegx/tilegx.c (tilegx_conditional_register_usage): Don't set
      	call_used_regs when making a register fixed.
      	* config/tilepro/tilepro.h (CALL_USED_REGISTERS): Delete.
      	* config/tilepro/tilepro.c (tilepro_conditional_register_usage): Don't
      	set call_used_regs when making a register fixed.
      	* config/visium/visium.h (CALL_USED_REGISTERS): Delete.
      	* config/visium/visium.c (visium_conditional_register_usage): Remove
      	the old handling of call_used_regs and change the handling of
      	call_really_used_regs to use call_used_regs instead.
      
      From-SVN: r275605
      Richard Sandiford committed
    • Hide call_used_regs in target-independent code · 53bee79c
      Now that tests of call_used_regs go through call_used_or_fixed_reg_p,
      we can hide call_used_regs from target-independent code.  (It still
      needs to be available to targets for the conditional register usage
      hooks.)
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* hard-reg-set.h (call_used_regs): Only define if IN_TARGET_CODE.
      	(call_used_or_fixed_reg_p): Expand definition of call_used_regs.
      	* reginfo.c (call_used_regs): New macro.
      
      From-SVN: r275604
      Richard Sandiford committed
    • Remove redundant fixed_regs tests · 2e3d041b
      This patch removes redundant fixed_regs tests in things like:
      
        !fixed_regs[i] && !call_used_or_fixed_reg_p (i)
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/alpha/alpha.c (alpha_compute_frame_layout): Remove redundant
      	fixed_regs test.
      	* config/bpf/bpf.c (bpf_compute_frame_layout, bpf_expand_prologue)
      	(bpf_expand_epilogue): Likewise.
      	* config/c6x/c6x.c (c6x_save_reg): Likewise.
      	* config/ft32/ft32.c (ft32_expand_prologue): Likewise.
      	(ft32_expand_epilogue): Likewise.
      	* config/i386/i386.c (ix86_save_reg): Likewise.
      	* config/moxie/moxie.c (moxie_expand_prologue): Likewise.
      	(moxie_expand_epilogue): Likewise.
      	* config/tilegx/tilegx.c (need_to_save_reg): Likewise.
      	* config/tilepro/tilepro.c (need_to_save_reg): Likewise.
      	* config/xtensa/xtensa.c (xtensa_call_save_reg): Likewise.
      
      From-SVN: r275603
      Richard Sandiford committed
    • Add call_used_or_fixed_reg_p · a365fa06
      Similarly to the call_used_or_fixed_regs patch, this one replaces
      tests of call_used_regs[i] with call_used_or_fixed_reg_p (i).
      The only remaining direct uses of call_used_regs are in reginfo.c
      and in the conditional register usage hooks.
      
      Again, this is purely mechanical.  A later patch will clear up the
      oddities in config/ code.
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* hard-reg-set.h (call_used_or_fixed_reg_p): New macro.
      	* cfgloopanal.c (init_set_costs): Use call_used_or_fixed_reg_p
      	instead of testing call_used_regs directly.
      	* config/aarch64/aarch64.c (aarch64_layout_frame): Likewise.
      	(aarch64_components_for_bb): Likewise.
      	* config/alpha/alpha.c (alpha_compute_frame_layout): Likewise.
      	* config/arc/arc.c (arc_must_save_register): Likewise.
      	(arc_epilogue_uses): Likewise.
      	* config/arm/arm.c (arm_option_override, use_return_insn): Likewise.
      	(legitimize_pic_address, callee_saved_reg_p): Likewise.
      	(arm_compute_save_reg0_reg12_mask): Likewise.
      	(arm_compute_save_core_reg_mask): Likewise.
      	(arm_get_vfp_saved_size, arm_compute_frame_layout): Likewise.
      	(arm_save_coproc_regs, thumb1_extra_regs_pushed): Likewise.
      	(cmse_nonsecure_entry_clear_before_return): Likewise.
      	(thumb1_expand_epilogue, arm_expand_epilogue_apcs_frame): Likewise.
      	(arm_expand_epilogue): Likewise.
      	* config/avr/avr.c (avr_regs_to_save, sequent_regs_live): Likewise.
      	(avr_function_arg_advance, avr_find_unused_d_reg): Likewise.
      	(_reg_unused_after): Likewise.
      	* config/bfin/bfin.c (must_save_p, expand_prologue_reg_save): Likewise.
      	(expand_epilogue_reg_restore, n_regs_saved_by_prologue): Likewise.
      	(add_to_reg, hwloop_optimize): Likewise.
      	* config/bpf/bpf.c (bpf_compute_frame_layout, bpf_expand_prologue)
      	(bpf_expand_epilogue): Likewise.
      	* config/c6x/c6x.c (c6x_save_reg, c6x_regno_reg_class): Likewise.
      	* config/cr16/cr16.c (cr16_compute_save_regs): Likewise.
      	* config/cris/cris.c (cris_reg_saved_in_regsave_area): Likewise.
      	* config/epiphany/epiphany.c (epiphany_init_reg_tables): Likewise.
      	(epiphany_compute_function_type, MUST_SAVE_REGISTER): Likewise.
      	(epiphany_output_mi_thunk, epiphany_start_function): Likewise.
      	* config/fr30/fr30.c (fr30_num_arg_regs): Likewise.
      	* config/frv/frv.c (frv_stack_info): Likewise.
      	* config/ft32/ft32.c (ft32_compute_frame): Likewise.
      	(ft32_expand_prologue, ft32_expand_epilogue): Likewise.
      	* config/gcn/gcn.c (gcn_compute_frame_offsets): Likewise.
      	(move_callee_saved_registers): Likewise.
      	* config/h8300/h8300.c (byte_reg): Likewise.
      	* config/i386/i386-options.c (ix86_set_current_function): Likewise.
      	* config/i386/i386.c (ix86_save_reg, ix86_expand_prologue): Likewise.
      	(ix86_expand_epilogue, x86_order_regs_for_local_alloc): Likewise.
      	* config/i386/predicates.md (sibcall_memory_operand): Likewise.
      	* config/ia64/ia64.c (emit_safe_across_calls, find_gr_spill): Likewise.
      	(next_scratch_gr_reg, ia64_compute_frame_size): Likewise.
      	* config/iq2000/iq2000.h (MUST_SAVE_REGISTER): Likewise.
      	* config/lm32/lm32.c (lm32_compute_frame_size): Likewise.
      	* config/m32c/m32c.c (need_to_save): Likewise.
      	* config/m68k/m68k.c (m68k_save_reg): Likewise.
      	* config/mcore/mcore.c (calc_live_regs): Likewise.
      	* config/microblaze/microblaze.c (microblaze_must_save_register):
      	Likewise.
      	* config/mmix/mmix.c (mmix_local_regno): Likewise.
      	(mmix_initial_elimination_offset, mmix_reorg): Likewise.
      	(mmix_use_simple_return, mmix_expand_prologue): Likewise.
      	(mmix_expand_epilogue): Likewise.
      	* config/moxie/moxie.c (moxie_compute_frame): Likewise.
      	(moxie_expand_prologue, moxie_expand_epilogue): Likewise.
      	* config/msp430/msp430.c (msp430_preserve_reg_p): Likewise.
      	* config/nds32/nds32.h (nds32_16bit_address_type): Likewise.
      	(NDS32_REQUIRED_CALLEE_SAVED_P): Likewise.
      	* config/nios2/nios2.c (prologue_saved_reg_p): Likewise.
      	* config/or1k/or1k.c (callee_saved_regno_p): Likewise.
      	* config/pa/pa.c (pa_expand_prologue, pa_expand_epilogue): Likewise.
      	* config/pdp11/pdp11.c (pdp11_saved_regno): Likewise.
      	* config/pru/pru.c (prologue_saved_reg_p): Likewise.
      	* config/riscv/riscv.c (riscv_save_reg_p): Likewise.
      	(riscv_epilogue_uses, riscv_hard_regno_mode_ok): Likewise.
      	* config/rl78/rl78.c (need_to_save): Likewise.
      	* config/rs6000/rs6000-logue.c (save_reg_p): Likewise.
      	(rs6000_stack_info, generate_set_vrsave): Likewise.
      	(rs6000_emit_prologue, rs6000_emit_epilogue): Likewise.
      	* config/rs6000/rs6000.c (rs6000_debug_reg_print): Likewise.
      	* config/rx/rx.c (rx_get_stack_layout): Likewise.
      	* config/s390/s390.c (s390_call_saved_register_used): Likewise.
      	* config/sh/sh.c (calc_live_regs, sh_output_mi_thunk): Likewise.
      	* config/sparc/sparc.c (save_global_or_fp_reg_p): Likewise.
      	(save_local_or_in_reg_p): Likewise.
      	* config/stormy16/stormy16.c (REG_NEEDS_SAVE): Likewise.
      	(xstormy16_epilogue_uses): Likewise.
      	* config/tilegx/tilegx.c (need_to_save_reg): Likewise.
      	* config/tilepro/tilepro.c (need_to_save_reg): Likewise.
      	* config/v850/v850.c (compute_register_save_size): Likewise.
      	* config/vax/vax.c (vax_expand_prologue): Likewise.
      	* config/visium/visium.c (visium_save_reg_p): Likewise.
      	* config/xtensa/xtensa.c (xtensa_call_save_reg): Likewise.
      	* cselib.c (cselib_process_insn): Likewise.
      	* df-scan.c (df_get_entry_block_def_set): Likewise.
      	* function.c (aggregate_value_p): Likewise.
      	* haifa-sched.c (alloc_global_sched_pressure_data): Likewise.
      	* ira-lives.c (process_bb_node_lives): Likewise.
      	* ira.c (do_reload): Likewise.
      	* lra-lives.c (process_bb_lives): Likewise.
      	* lra-remat.c (lra_remat): Likewise.
      	* lra.c (lra): Likewise.
      	* postreload.c (reload_combine_recognize_pattern): Likewise.
      	(reload_cse_move2add): Likewise.
      	* recog.c (peep2_find_free_register): Likewise.
      	* regrename.c (check_new_reg_p): Likewise.
      	* reload.c (find_equiv_reg): Likewise.
      	* reload1.c (reload, find_reg): Likewise.
      	* sel-sched.c (init_hard_regs_data): Likewise.
      
      From-SVN: r275602
      Richard Sandiford committed
    • Make more use of regs_invalidated_by_call · ff18ad15
      This cleans up a couple of places in which the previous patch had:
      
        call_used_or_fixed_regs & ~fixed_reg_set
      
      In that context, regs_invalidated_by_call is IMO more obvious.
      
      2019-09-10  Richard Sandiford  <richard.sandiford@arm.com>
      
      gcc/
      	* config/frv/frv.c (frv_ifcvt_modify_tests): Use
      	regs_invalidated_by_call & ~fixed_reg_set instead of
      	call_used_or_fixed_regs & ~fixed_reg_set.
      	* config/sh/sh.c (output_stack_adjust): Likewise.
      
      From-SVN: r275601
      Richard Sandiford committed