1. 08 May, 2019 15 commits
    • re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout) · ab87ac8d
      	PR c++/59813
      	PR tree-optimization/89060
      	* tree-ssa-live.h (live_vars_map): New typedef.
      	(compute_live_vars, live_vars_at_stmt, destroy_live_vars): Declare.
      	* tree-ssa-live.c: Include gimple-walk.h and cfganal.h.
      	(struct compute_live_vars_data): New type.
      	(compute_live_vars_visit, compute_live_vars_1, compute_live_vars,
      	live_vars_at_stmt, destroy_live_vars): New functions.
      	* tree-tailcall.c: Include tree-ssa-live.h.
      	(live_vars, live_vars_vec): New global variables.
      	(find_tail_calls): Perform variable life analysis before punting.
      	(tree_optimize_tail_calls_1): Clean up live_vars and live_vars_vec.
      	* tree-inline.h (struct copy_body_data): Add eh_landing_pad_dest
      	member.
      	* tree-inline.c (add_clobbers_to_eh_landing_pad): Remove BB argument.
      	Perform variable life analysis to select variables that really need
      	clobbers added.
      	(copy_edges_for_bb): Don't call add_clobbers_to_eh_landing_pad here,
      	instead set id->eh_landing_pad_dest and assert it is the same.
      	(copy_cfg_body): Call it here if id->eh_landing_pad_dest is non-NULL.
      
      	* gcc.dg/tree-ssa/pr89060.c: New test.
      
      From-SVN: r271013
      Jakub Jelinek committed
    • [arm][PR88167] Fix __builtin_return_address returns invalid address · 69708e0a
      This patch fixes a problem with the thumb1 prologue code where the link
      register could be unconditionally used as a scratch register even if the
      return value was still live at the end of the prologue.
      
      Additionally, the patch improves the code generated when we are not
      using many low call-saved registers to make use of any unused call
      clobbered registers to help with the saving of high registers that
      cannot be pushed directly (quite rare in normal code as the register
      allocator correctly prefers low registers).
      
      2019-05-08  Mihail Ionescu  <mihail.ionescu@arm.com>
      	    Richard Earnshaw  <rearnsha@arm.com>
      
      gcc:
      
      	PR target/88167
      	* config/arm/arm.c (thumb1_prologue_unused_call_clobbered_lo_regs): New
      	function.
      	(thumb1_epilogue_unused_call_clobbered_lo_regs): New function.
      	(thumb1_compute_save_core_reg_mask): Don't force a spare work
      	register if both the epilogue and prologue can use call-clobbered
      	regs.
      	(thumb1_unexpanded_epilogue): Use
      	thumb1_epilogue_unused_call_clobbered_lo_regs.  Reverse the logic for
      	picking temporaries for restoring high regs to match that of the
      	prologue where possible.
      	(thumb1_expand_prologue): Add any usable call-clobbered low registers to
      	the list of work registers.  Detect if the return address is still live
      	at the end of the prologue and avoid using it for a work register if so.
      	If the return address is not live, add LR to the list of pushable regs
      	after the first pass.
      
      gcc/testsuite:
      
      	PR target/88167
      	* gcc.target/arm/pr88167-1.c: New test.
      	* gcc.target/arm/pr88167-2.c: New test.
      
      
      Co-Authored-By: Richard Earnshaw <rearnsha@arm.com>
      
      From-SVN: r271012
      Mihail Ionescu committed
    • re PR libstdc++/90277 (Debug Mode test failures) · 857c7202
      2019-05-08  François Dumont  <fdumont@gcc.gnu.org>
      
      	PR libstdc++/90277
      	* testsuite/23_containers/unordered_multiset/insert/24061-multiset.cc
      	(test01): Reserve for number of insertions to avoid rehash during test.
      	* testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
      	(test01): Likewise.
      	* testsuite/23_containers/unordered_multimap/insert/24061-multimap.cc
      	(test01): Likewise.
      	(test02): Likewise.
      	(test03): Likewise.
      
      From-SVN: r271011
      François Dumont committed
    • re PR tree-optimization/90078 (ICE with deep templates caused by overflow) · 8363a2f1
      	PR tree-optimization/90078
      	* tree-ssa-loop-ivopts.c (INFTY): Increase value for infinite cost.
      	(struct comp_cost): Promote type of members to int64_t.
      	(infinite_cost): Don't set complexity in initialization.
      	(comp_cost::operator +,-,+=,-+,/=,*=): Assert when cost computation
      	overflows to infinite_cost.
      	(adjust_setup_cost): Promote type of parameter and cost computation
      	to int64_t.
      	(struct ainc_cost_data, struct iv_ca): Promote type of member to
      	int64_t.
      	(get_scaled_computation_cost_at, determine_iv_cost): Promote type of
      	cost computation to int64_t.
      	(determine_group_iv_costs, iv_ca_dump, find_optimal_iv_set): Use
      	int64_t's format specifier in dump.
      
      	gcc/testsuite
      	* g++.dg/tree-ssa/pr90078.C: New test.
      
      From-SVN: r271008
      Bin Cheng committed
    • re PR tree-optimization/90240 (ICE in try_improve_iv_set, at tree-ssa-loop-ivopts.c:6694) · 98d8f142
      	PR tree-optimization/90240
      	* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Scale cost
      	with respect to scaling factor pre-computed for each basic block.
      	(try_improve_iv_set): Return bool if best_cost equals to iv_ca cost.
      	(find_optimal_iv_set_1): Free iv_ca set if it has infinite_cost.
      	(COST_SCALING_FACTOR_BOUND, determine_scaling_factor): New.
      	(tree_ssa_iv_optimize_loop): Call determine_scaling_factor.  Extend
      	live range for array of loop's basic blocks.  Cleanup aux field of
      	loop's basic blocks.
      
      	gcc/testsuite
      	* gfortran.dg/graphite/pr90240.f: New test.
      
      From-SVN: r271007
      Bin Cheng committed
    • Enable support for bfloat16 which will be in Future Cooper Lake. · 4f0e90fa
      There are 3 instructions for AVX512BF16: VCVTNE2PS2BF16, VCVTNEPS2BF16 and
      DPBF16PS instructions, which are Vector Neural Network Instructions
      supporting:
          
      - VCVTNE2PS2BF16: Convert Two Packed Single Data to One Packed BF16 Data.
      - VCVTNEPS2BF16: Convert Packed Single Data to Packed BF16 Data.
      - VDPBF16PS: Dot Product of BF16 Pairs Accumulated into Packed Single Precision.
      
      2019-05-07  Wei Xiao  <wei3.xiao@intel.com>
      
      	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512BF16_SET
      	OPTION_MASK_ISA_AVX512BF16_UNSET, OPTION_MASK_ISA2_AVX512BW_UNSET): New.
      	(OPTION_MASK_ISA2_AVX512F_UNSET): Add OPTION_MASK_ISA_AVX512BF16_UNSET.
      	(ix86_handle_option): Handle -mavx512bf16.
      	* config.gcc: Add avx512bf16vlintrin.h and avx512bf16intrin.h
      	to extra_headers.
      	* config/i386/avx512bf16vlintrin.h: New.
      	* config/i386/avx512bf16intrin.h: New.
      	* config/i386/cpuid.h (bit_AVX512BF16): New.
      	* config/i386/driver-i386.c (host_detect_local_cpu): Detect BF16.
      	* config/i386/i386-builtin-types.def: Add new types.
      	* config/i386/i386-builtin.def: Add new builtins.
      	* config/i386/i386-c.c (ix86_target_macros_internal): Define
      	__AVX512BF16__.
      	* config/i386/i386-option.c (ix86_target_string): Add -mavx512bf16.
      	(ix86_option_override_internal): Handle BF16.
      	(ix86_valid_target_attribute_inner_p): Ditto.
      	* config/i386/i386-expand.c (ix86_expand_args_builtin): Ditto.
      	* config/i386/i386-builtin.c (enum processor_features): Add
      	F_AVX512BF16.
      	(static const _isa_names_table isa_names_table): Ditto.
      	* config/i386/i386.h (TARGET_AVX512BF16, TARGET_AVX512BF16_P): New.
      	(PTA_AVX512BF16): Ditto.
      	* config/i386/i386.opt: Add -mavx512bf16.
      	* config/i386/immintrin.h: Include avx512bf16intrin.h
      	and avx512bf16vlintrin.h.
      	* config/i386/sse.md (avx512f_cvtne2ps2bf16_<mode><mask_name>,
      	avx512f_cvtneps2bf16_<mode><mask_name>,
      	avx512f_dpbf16ps_<mode><mask_half_name>): New define_insn patterns.
      	* config/i386/subst.md (mask_half): Add new subst.
      	* doc/invoke.texi: Document -mavx512bf16.
      
      2019-05-07  Wei Xiao  <wei3.xiao@intel.com>
      
      	* gcc.target/i386/avx512bf16-vcvtne2ps2bf16-1.c: New test.
      	* gcc.target/i386/avx512bf16-vcvtneps2bf16-1.c: New test.
      	* gcc.target/i386/avx512bf16-vdpbf16ps-1.c: New test.
      	* gcc.target/i386/avx512bf16vl-vcvtne2ps2bf16-1.c: New test.
      	* gcc.target/i386/avx512bf16vl-vcvtneps2bf16-1.c: New test.
      	* gcc.target/i386/avx512bf16vl-vdpbf16ps-1.c: New test.
      	* gcc.target/i386/builtin_target.c: Handle avx512bf16.
      	* gcc.target/i386/sse-12.c: Add -mavx512bf16.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-14.c: Ditto.
      	* gcc.target/i386/sse-22.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      	* g++.dg/other/i386-2.C: Ditto.
      	* g++.dg/other/i386-3.C: Ditto.
      
      2019-05-07  Hongtao Liu  <hongtao.liu@intel.com>
      
      	* config/i386/cpuinfo.c (get_available_features): Detect BF16.
      	* config/i386/cpuinfo.h (enum processor_features): Add
      	FEATURE_AVX512BF16.
      
      From-SVN: r271006
      Hongtao Liu committed
    • Address compiler diagnostics in libgomp.oacc-c-c++-common/pr87835.c · da2d30c1
          source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr87835.c: In function 'main':
          source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr87835.c:45: warning: ignoring #pragma loop gang [-Wunknown-pragmas]
             45 |     #pragma loop gang
                |
          source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/pr87835.c:19:7: warning: unused variable 'b' [-Wunused-variable]
             19 |   int b[n];
                |       ^
      
      	libgomp/
      	PR target/87835
      	* testsuite/libgomp.oacc-c-c++-common/pr87835.c: Update.
      
      From-SVN: r271004
      Thomas Schwinge committed
    • * standard.ads.h: New file. · 1927f640
      From-SVN: r271003
      Arnaud Charlet committed
    • re PR other/90381 (New test case gcc.dg/tree-ssa/pr88676-2.c fails with its… · d486dbfb
      re PR other/90381 (New test case gcc.dg/tree-ssa/pr88676-2.c fails with its introduction in r270934)
      
      	PR other/90381
      	* gcc.dg/tree-ssa/pr88676-2.c: Add 'target le' option to limit the
      	test case to run on the little endian machine.
      
      From-SVN: r271002
      Li Jia He committed
    • re PR tree-optimization/90356 (Missed optimization for variables initialized to 0.0) · f7b7e5d0
      	PR tree-optimization/90356
      	* match.pd ((X +/- 0.0) +/- 0.0): Optimize into X +/- 0.0 if possible.
      
      	* gcc.dg/tree-ssa/pr90356-1.c: New test.
      	* gcc.dg/tree-ssa/pr90356-2.c: New test.
      	* gcc.dg/tree-ssa/pr90356-3.c: New test.
      	* gcc.dg/tree-ssa/pr90356-4.c: New test.
      
      From-SVN: r271001
      Jakub Jelinek committed
    • reflect: correctly handle direct interface typed receiver in Value.call · b65b77cc
          
          A direct interface type's value method takes value receiver now.
          Don't pass pointer to the method function.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175798
      
      From-SVN: r271000
      Ian Lance Taylor committed
    • compiler: don't add pointer twice to value method of direct interface type · d9b120ce
          
          For a direct interface type T with a value method M, its pointer
          type (*T)'s method table includes a stub method of M which takes
          a (*T) as the receiver instead of a T. However, for the "typ"
          field of the method table entry, we added another layer of
          indirection, which makes it appear to take a **T, which is wrong.
          This causes problems when using reflect.Type.Method to get the
          method. This CL fixes the second, incorrect, indirection.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175837
      
      From-SVN: r270999
      Ian Lance Taylor committed
    • Daily bump. · 8c4a4099
      From-SVN: r270997
      GCC Administrator committed
    • compiler: add an option to emit optimization diagnostics · f837b9c4
          
          Add a -fgo-debug-optimization option to emit optimization
          diagnostics. This can be used for testing optimizations. Apply
          this to the range clear optimizations of maps and arrays.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/170002
      
      gcc/go:
      
      	* lang.opt (-fgo-debug-optimization): New option.
      	* go-c.h (struct go_create_gogo_args): Add debug_optimization
      	field.
      	* go-lang.c (go_langhook_init): Set debug_optimization field.
      	* gccgo.texi (Invoking gccgo): Document -fgo-debug-optimization.
      
      gcc/testsuite:
      
      	* go.dg/arrayclear.go: New test.
      	* go.dg/mapclear.go: New test.
      
      From-SVN: r270993
      Cherry Zhang committed
    • Update .po files. · a88158bc
      	* be.po, da.po, de.po, el.po, es.po, fi.po, fr.po, hr.po, id.po,
      	ja.po, nl.po, ru.po, sr.po, sv.po, tr.po, uk.po, vi.po, zh_CN.po,
      	zh_TW.po: Update.
      
      From-SVN: r270991
      Joseph Myers committed
  2. 07 May, 2019 25 commits
    • Improve API docs for Filesystem TS and Networking TS · 041aa6ab
      	* include/experimental/bits/fs_path.h: Improve docs.
      	* include/experimental/bits/net.h: Fix wrong header name in comment.
      	Do not document implementation details.
      	* include/experimental/netfwd: Fix doxygen grouping.
      
      From-SVN: r270990
      Jonathan Wakely committed
    • Improve API docs for std::pair · 0e7bd559
      	* include/bits/stl_pair.h: Improve docs.
      	* include/std/tuple: Likewise.
      
      From-SVN: r270989
      Jonathan Wakely committed
    • Improve API docs for <chrono> and <ratio> · c34d3fd3
      	* doc/doxygen/doxygroups.cc (std::literals): Add documentation for
      	inline namespace.
      	* include/std/chrono: Improve docs.
      	* include/std/ratio: Do not document implementation details.
      	* testsuite/20_util/ratio/cons/cons_overflow_neg.cc: Adjust dg-error
      	line numbers.
      	* testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Likewise.
      
      From-SVN: r270988
      Jonathan Wakely committed
    • PR libstdc++/89102 implement new common_type rules (P0435R1, P0548R1) · f61a12b3
      This change ensures that std::common_type<> is a complete type (LWG
      2408), and that std::common_type<T>, std::common_type<cv T1, cv T2>, and
      std::common_type<T1, T2, R...> will use program-defined specializations
      for std::common_type<T1, T2> (LWG 2465).
      
      The implementation of common_type<T1, T2, R...> is changed to use
      void_t, and the specializations for duration and time_point are modified
      to also use void_t instead of depending on implementation details of
      common_type.
      
      	PR libstdc++/89102
      	* doc/xml/manual/intro.xml: Document DR 2408 and 2465 changes.
      	* include/std/chrono (__duration_common_type_wrapper): Replace with ...
      	(__duration_common_type): New helper.
      	(common_type<chrono::duration<R1, P2>, chrono::duration<R2, P2>>): Use
      	__duration_common_type.
      	(__timepoint_common_type_wrapper): Replace with ...
      	(__timepoint_common_type): New helper.
      	(common_type<chrono::time_point<C, D2>, chrono::time_point<C, D2>>):
      	Use __time_point_common_type.
      	* include/std/type_traits (common_type<>): Define, as per LWG 2408.
      	(__common_type_impl): If either argument is transformed by decay,
      	use the common_type of the decayed types.
      	(__common_type_impl<_Tp, _Up, _Tp, _Up>): If the types are already
      	decayed, use __do_common_type_impl to get the common_type.
      	(common_type<_Tp>): Use common_type<_Tp, _Tp>.
      	(__do_member_type_wrapper, __member_type_wrapper)
      	(__expanded_common_type_wrapper): Remove.
      	(__common_type_pack, __common_type_fold): New helpers.
      	(common_type<_Tp, _Up, _Vp...>): Use new helpers instead of
      	__member_type_wrapper and __expanded_common_type_wrapper.
      	* testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
      	Test zero-length template argument list.
      	* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
      	Test single argument cases and argument types that should decay.
      	* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
      	Adjust expected error.
      	* testsuite/20_util/duration/literals/range_neg.cc: Use zero for
      	dg-error lineno.
      	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Likewise.
      	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Likewise.
      	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Likewise.
      
      From-SVN: r270987
      Jonathan Wakely committed
    • PR c++/90171 - reorganize usual_deallocation_fn_p · f7f36e3d
      When fixing 90171 it struck me as undesirable to have so many separate
      functions that all needed to know about the definition of a usual
      deallocation function.  So this patch condenses them into one.  I left
      destroying_delete_p because it is used by other files as well.
      
      	* call.c (struct dealloc_info): New.
      	(usual_deallocation_fn_p): Take a dealloc_info*.
      	(aligned_deallocation_fn_p, sized_deallocation_fn_p): Remove.
      	(build_op_delete_call): Adjust.
      
      From-SVN: r270986
      Jason Merrill committed
    • PR c++/86485 - -Wmaybe-unused with empty class ?: · 7f16ac89
      	* typeck.c (build_static_cast_1): Use cp_build_addr_expr.
      
      For GCC 9 I fixed this bug with a patch to gimplify_cond_expr, but this
      function was also doing the wrong thing.
      
      Using build_address does not push the ADDR_EXPR down into the arms of a
      COND_EXPR, which we need for proper handling of conversion of an lvalue ?:
      to another reference type.
      
      From-SVN: r270985
      Jason Merrill committed
    • A non-type template parm with a placeholder type is type-dependent. · 258195f1
      	* pt.c (type_dependent_expression_p): A non-type template parm with
      	a placeholder type is type-dependent.
      
      From-SVN: r270984
      Jason Merrill committed
    • rs6000: Remove reload leftovers · 76ddb9eb
      There are a few things left in the rs6000 port that are unused now
      that we do not support old reload anymore.  This removes those.
      
      
      	* config/rs6000/rs6000-protos.h (rs6000_legitimize_reload_address_ptr):
      	Delete declaration.
      	* config/rs6000/rs6000.c (rs6000_legitimize_reload_address): Delete.
      	(rs6000_debug_legitimize_reload_address): Delete.
      	(rs6000_legitimize_reload_address_ptr): Delete.
      	(rs6000_option_override_internal): Adjust.
      	(mem_operand_gpr): Adjust comment.
      	(legitimate_lo_sum_address_p): Ditto.
      	(rs6000_legitimize_reload_address): Delete.
      	(rs6000_debug_legitimize_reload_address): Delete.
      	* config/rs6000/rs6000.h (LEGITIMIZE_RELOAD_ADDRESS): Delete.
      
      From-SVN: r270983
      Segher Boessenkool committed
    • re PR middle-end/89765 (Multiple problems with vec-insert implementation on PowerPC) · 5d30228e
      gcc/ChangeLog:
      
      2019-05-07  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	PR target/89765
      	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
      	In handling of ALTIVEC_BUILTIN_VEC_INSERT, use modular arithmetic
      	to compute vector element selector for both constant and variable
      	operands.
      
      gcc/testsuite/ChangeLog:
      
      2019-05-07  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	PR target/89765
      	* gcc.target/powerpc/pr89765-mc.c: New test.
      	* gcc.target/powerpc/vsx-builtin-10c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-10d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-11c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-11d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-12c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-12d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-13c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-13d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-14c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-14d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-15c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-15d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-16c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-16d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-17c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-17d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-18c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-18d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-19c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-19d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-20c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-20d.c: New test.
      	* gcc.target/powerpc/vsx-builtin-9c.c: New test.
      	* gcc.target/powerpc/vsx-builtin-9d.c: New test.
      
      From-SVN: r270982
      Kelvin Nilsen committed
    • i386.md (cvt_mnemonic): New mode attribute. · e9d2e7b8
      	* config/i386/i386.md (cvt_mnemonic): New mode attribute.
      	(ashr<mode>3_cvt): Merge insn pattern from ashrsi3_cvt and
      	ashrdi3_cvt using SWI48 mode iterator.
      
      From-SVN: r270981
      Uros Bizjak committed
    • [libcpp] Reimplement mkdeps data structures · 61145d93
      https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00323.html
      	* files.c (_cpp_stack_file): Empty filenames aren't dependencies.
      	* mkdeps.c (deps_add_dep): Assert not empty.
      
      From-SVN: r270978
      Nathan Sidwell committed
    • Resign as IA-64 maintainer. · 2ed6d245
      	* MAINTAINERS: Remove myself as IA-64 maintainer.
      
      From-SVN: r270977
      Jim Wilson committed
    • This patch adds support to vectorize sum of abslolute differences (SAD_EXPR) · a9fad8fe
      using SVE.
      
      Given this input code:
      
      int
      sum_abs (uint8_t *restrict x, uint8_t *restrict y, int n)
      {
        int sum = 0;
      
        for (int i = 0; i < n; i++)
          {
            sum += __builtin_abs (x[i] - y[i]);
          }
      
        return sum;
      }
      
      The resulting SVE code is:
      
      0000000000000000 <sum_abs>:
         0:	7100005f 	cmp	w2, #0x0
         4:	5400026d 	b.le	50 <sum_abs+0x50>
         8:	d2800003 	mov	x3, #0x0                   	// #0
         c:	93407c42 	sxtw	x2, w2
        10:	2538c002 	mov	z2.b, #0
        14:	25221fe0 	whilelo	p0.b, xzr, x2
        18:	2538c023 	mov	z3.b, #1
        1c:	2518e3e1 	ptrue	p1.b
        20:	a4034000 	ld1b	{z0.b}, p0/z, [x0, x3]
        24:	a4034021 	ld1b	{z1.b}, p0/z, [x1, x3]
        28:	0430e3e3 	incb	x3
        2c:	0520c021 	sel	z1.b, p0, z1.b, z0.b
        30:	25221c60 	whilelo	p0.b, x3, x2
        34:	040d0420 	uabd	z0.b, p1/m, z0.b, z1.b
        38:	44830402 	udot	z2.s, z0.b, z3.b
        3c:	54ffff21 	b.ne	20 <sum_abs+0x20>  // b.any
        40:	2598e3e0 	ptrue	p0.s
        44:	04812042 	uaddv	d2, p0, z2.s
        48:	1e260040 	fmov	w0, s2
        4c:	d65f03c0 	ret
        50:	1e2703e2 	fmov	s2, wzr
        54:	1e260040 	fmov	w0, s2
        58:	d65f03c0 	ret
      
      Notice how udot is used inside a fully masked loop.
      
      
      gcc/Changelog:
      
      2019-05-07  Alejandro Martinez  <alejandro.martinezvicente@arm.com>
      
      	* config/aarch64/aarch64-sve.md (<su>abd<mode>_3): New define_expand.
      	(aarch64_<su>abd<mode>_3): Likewise.
      	(*aarch64_<su>abd<mode>_3): New define_insn.
      	(<sur>sad<vsi2qi>): New define_expand.
      	* config/aarch64/iterators.md: Added MAX_OPP attribute.
      	* tree-vect-loop.c (use_mask_by_cond_expr_p): Add SAD_EXPR.
      	(build_vect_cond_expr): Likewise.
      
      gcc/testsuite/Changelog:
       
      2019-05-07  Alejandro Martinez  <alejandro.martinezvicente@arm.com>
      
      	* gcc.target/aarch64/sve/sad_1.c: New test for sum of absolute
      	differences.
      
      From-SVN: r270975
      Alejandro Martinez committed
    • cfgexpand.c (asm_clobber_reg_is_valid): Reject clobbers outside of accessible_reg_set. · 0a592151
      	* cfgexpand.c (asm_clobber_reg_is_valid): Reject
      	clobbers outside of accessible_reg_set.
      	* config/i386/i386.c (ix86_conditional_register_usage):
      	Disable register sets by clearing corresponding bits in
      	accessible_reg_set.  Do not set corresponding bits in fixed_regs,
      	call_used_regs and don't clear corresponding reg_names array members.
      
      testsuite/ChangeLog:
      
      	* gcc.target/i386/asm-7.c: New test.
      	* gcc.target/i386/asm-1.c: Update expected error string.
      	* gcc.target/i386/pr62120.c: Ditto.
      
      From-SVN: r270955
      Uros Bizjak committed
    • Fix incorrect DR numbers in libstdc++ manual · 73e828be
      	* doc/xml/manual/intro.xml: Fix DR 2537 and DR 2566 confusion.
      
      From-SVN: r270954
      Jonathan Wakely committed
    • Make allocator propagation more consistent for operator+(basic_string) (P1165R1) · f4e678ef
      2019-05-01  Nina Dinka Ranns  <dinka.ranns@gmail.com>
      
      	Make allocator propagation more consistent for
      	operator+(basic_string) (P1165R1)
      	* include/bits/basic_string.h
      	(operator+(basic_string&&, basic_string&&): Changed resulting
      	allocator to always be the one from the first parameter.
      	* include/bits/basic_string.tcc
      	(operator+(const _CharT*, const basic_string&)): Changed
      	resulting allocator to be SOCCC on the second parameter's allocator.
      	(operator+(_CharT, const basic_string&)): Likewise.
      	* testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
      	New.
      	* testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
      	New.
      
      From-SVN: r270953
      Nina Dinka Ranns committed
    • Improve API docs for std::regex · 2313938e
      	* include/bits/regex.h: Improve docs.
      	* include/bits/regex.tcc: Do not document implementation details.
      
      From-SVN: r270952
      Jonathan Wakely committed
    • Add test for std::hash<std::error_code> · 99f12959
      Copied from 19_diagnostics/error_condition/hash.cc added recently.
      
      	* testsuite/19_diagnostics/error_code/hash.cc: New test.
      
      From-SVN: r270951
      Jonathan Wakely committed
    • Fix make install-gcc-specs with empty GCC_SPECS_FILES · 339197c7
      	* gcc-interface/Makefile.in (install-gcc-specs): Use foreach.
      	Honor DESTDIR.
      
      From-SVN: r270947
      Rainer Orth committed
    • tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still… · fcd0566b
      tree-vect-stmts.c (vect_is_simple_cond): When vectype is not specified still compute a comp_vectype for invariant compares.
      
      2019-05-07  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-stmts.c (vect_is_simple_cond): When vectype is
      	not specified still compute a comp_vectype for invariant
      	compares.
      
      From-SVN: r270945
      Richard Biener committed
    • re PR tree-optimization/90316 (large compile time increase in opt / alias stmt… · 530ec1ac
      re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
      
      2019-05-07  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90316
      	* tree-ssa-pre.c (translate_vuse_through_block): When
      	same_valid is NULL do not bother to search for a virtual
      	PHI continuation.
      	(phi_translate_1): When operands changed we cannot keep
      	the same value-number so do not bother to ask whether
      	that's possible from translate_vuse_through_block.
      
      From-SVN: r270944
      Richard Biener committed
    • [libcpp] Reimplement mkdeps data structures · d7b6aee8
      https://gcc.gnu.org/ml/gcc-patches/2019-05/msg00293.html
      	* include/mkdeps.h (deps_write): Add PHONY arg.
      	(deps_phony_targets): Delete.
      	* init.c (cpp_finish): Just call deps_write.
      	* mkdeps.c (struct mkdeps): Add local vector class.  Reimplement
      	vector handling.
      	(munge): Munge to static buffer.
      	(apply_vpath): Adjust vector handling.
      	(deps_init, deps_free): Use new, delete.
      	(deps_add_target): Do not munge here.  Record quoting low water mark.
      	(deps_add_dep): Do not munge here.
      	(deps_add_vpath): Adjust vector handling.
      	(make_write_name): New.  Munge on demand here.
      	(make_write_vec): New.
      	(deps_phony_targets): Delete.
      	(make_write): New.
      	(deps_write): Forward to deps_Write.
      	(deps_save, deps_restore): Adjust vector handling.
      
      From-SVN: r270943
      Nathan Sidwell committed
    • Fix bitmap registration of overheads. · 7664eeb7
      2019-05-07  Martin Liska  <mliska@suse.cz>
      
      	* bitmap.c (bitmap_register): Come up with
      	alloc_descriptor_max_uid and assign it for
      	a new bitmap.
      	(register_overhead): Use get_descriptor as
      	a descriptor.
      	(release_overhead): New.
      	(bitmap_elem_to_freelist): Call it.
      	(bitmap_elt_clear_from): Likewise.
      	(bitmap_obstack_free): Likewise.
      	(bitmap_move): Sensitively release memory.
      	* bitmap.h (struct GTY): Add alloc_descriptor and padding.
      	(bitmap_initialize): Initialize alloc_descriptor to zero.
      	* tree-ssa-pre.c (do_hoist_insertion): Use bitmap_move.
      
      From-SVN: r270942
      Martin Liska committed
    • tree-vect-slp.c (vect_build_slp_tree_2): Bump size whenever we build a SLP node. · 9f708a84
      2019-05-07  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-slp.c (vect_build_slp_tree_2): Bump size whenever
      	we build a SLP node.  Remove max_size and limiting.
      	(vect_analyze_slp_instance): Record and dump size of the SLP graph.
      
      From-SVN: r270941
      Richard Biener committed
    • re PR tree-optimization/90316 (large compile time increase in opt / alias stmt… · 3cf8b3e3
      re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)
      
      2019-05-07  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90316
      	* tree-ssa-alias.h (get_continuation_for_phi): Take walking
      	limit by reference.
      	(walk_non_aliased_vuses): Take walking limit argument.
      	* tree-ssa-alias.c (maybe_skip_until): Take limit and abort
      	walking if it is reached instead of just counting.
      	(get_continuation_for_phi): Likewise.
      	(walk_non_aliased_vuses): Likewise, instead of leaving counter
      	limiting to the callback.
      	* tree-ssa-sccvn.c (vn_reference_lookup_2): Adjust.
      	(vn_reference_lookup_3): Likewise.
      	(vn_reference_lookup_pieces): Likewise.
      	(vn_reference_lookup): Likewise.
      	* tree-ssa-pre.c (translate_vuse_through_block): Limit walking.
      	* tree-ssa-scopedtables.c (vuse_eq): Adjust.
      	(avail_exprs_stack::lookup_avail_expr): Likewise.
      
      From-SVN: r270940
      Richard Biener committed