1. 28 Dec, 2017 8 commits
    • builtins.def: (_Float<N> and _Float<N>X BUILT_IN_CEIL): Add _Float<N> and _Float<N>X variants... · c6cfa2bf
      [gcc]
      2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* builtins.def: (_Float<N> and _Float<N>X BUILT_IN_CEIL): Add
      	_Float<N> and _Float<N>X variants for rounding built-in
      	functions.
      	(_Float<N> and _Float<N>X BUILT_IN_FLOOR): Likewise.
      	(_Float<N> and _Float<N>X BUILT_IN_NEARBYINT): Likewise.
      	(_Float<N> and _Float<N>X BUILT_IN_RINT): Likewise.
      	(_Float<N> and _Float<N>X BUILT_IN_ROUND): Likewise.
      	(_Float<N> and _Float<N>X BUILT_IN_TRUNC): Likewise.
      	* builtins.c (mathfn_built_in_2): Likewise.
      	* internal-fn.def (CEIL): Likewise.
      	(FLOOR): Likewise.
      	(NEARBYINT): Likewise.
      	(RINT): Likewise.
      	(ROUND): Likewise.
      	(TRUNC): Likewise.
      	* convert.c (convert_to_integer_1): Likewise.
      	* fold-const.c (tree_call_nonnegative_warnv_p): Likewise.
      	(integer_valued_real_call_p): Likewise.
      	* fold-const-call.c (fold_const_call_ss): Likewise.
      	* gencfn-macros.c (print_case_cfn): Change CFN and operator
      	printers to take a const char * suffix instead of a bool.
      	(print_define_operator_list): Likewise.
      	(fltall_suffixes): New list of suffixes, that include the
      	traditional suffixes as well as all of the _Float<N> and
      	_Float<N>X suffixes.
      	(main): For _Float<N> and _Float<N>X functions, emit both
      	<name>_FN and <name>_ALL variants.  The <macro>_FN variant only
      	has the _Float<N> and _Float<N>X case names or operators.  The
      	<name>_ALL variant has both the traditional and the
      	_Float<N>/_Float<N>X case names or operators.
      	* match.pd (COPYSIGN optimizations): Provide optimizations for
      	_Float<N> and _Float<N>X types where possible.
      	(MIN/MAX optimizations): Likewise.
      	(sqrt optimizations): Likewise.
      	(rounding optimizations): Likewise.
      
      [gcc/c]
      2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* c-decl.c (header_for_builtin_fn): Add integer rounding _Float<N>
      	and _Float<N>X built-in functions.
      
      From-SVN: r256026
      Michael Meissner committed
    • [rs6000] Use gen_int_mode in ieee_128bit_negative_zero · ec8a1b8d
      Previously we'd generate a non-canonical zero-extended CONST_INT
      instead of a sign-extended one, which tripped the assert for
      canonical CONST_INTs after a later patch.
      
      2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* config/powerpcspe/powerpcspe.md (ieee_128bit_negative_zero): Use
      	gen_int_mode rather than GEN_INT.
      	* config/rs6000/rs6000.md (ieee_128bit_negative_zero): Likewise.
      
      From-SVN: r256024
      Richard Sandiford committed
    • Use valid_for_const_vector_p instead of CONSTANT_P · af2e4475
      This patch makes the VEC_SERIES code use valid_for_const_vector_p
      instead of CONSTANT_P, to match what we already do for VEC_DUPLICATE.
      This showed up as a failure in gcc.c-torture/execute/pr28982b.c for -m32
      on x86_64-linux-gnu after later patches.
      
      2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* emit-rtl.c (gen_const_vec_series): Use valid_for_const_vector_p
      	instead of CONSTANT_P.
      	(gen_vec_series): Likewise.
      	* simplify-rtx.c (simplify_binary_operation_1): Likewise.
      
      From-SVN: r256023
      Richard Sandiford committed
    • re PR fortran/83548 (Compilation Error using logical function in parameter) · 4e48b472
      2017-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR Fortran/83548
      	* match.c (gfc_match_type_spec): Check for LOGICAL conflict in
      	type-spec versus LOGICAL intrinsic subprogram.
      
      2017-12-28  Steven G. Kargl  <kargl@gcc.gnu.org>
      
      	PR Fortran/83548
      	* gfortran.dg/array_constructor_type_22.f03: New test.
      
      From-SVN: r256022
      Steven G. Kargl committed
    • PR fortran/83344 Don't set bogus constant value · 208413c7
      This patch does not fix PR 83344, but merely fixes an error where we
      used to set a constant character length value from a non-constant
      expression, and thus set it to some bogus value.
      
      As a result of this, I have commented out part of the associate_22.f90
      test which otherwise generates a warning message.
      
      Regtested on x86_64-pc-linux-gnu.
      
      gcc/fortran/ChangeLog:
      
      2017-12-28  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/83344
      	* resolve.c (resolve_assoc_var): Don't set the constant value
      	unless the target is a constant expression.
      
      gcc/testsuite/ChangeLog:
      
      2017-12-28  Janne Blomqvist  <jb@gcc.gnu.org>
      
      	PR fortran/83344
      	* gfortran.dg/associate_22.f90: Comment out part of test.
      
      From-SVN: r256021
      Janne Blomqvist committed
    • m68k.md (ashrdi3_const1, [...]): Add CC_STATUS_INIT. · 9fd8313a
      * config/m68k/m68k.md (ashrdi3_const1, lshrdi3_const1): Add
      CC_STATUS_INIT.
      
      From-SVN: r256020
      Andreas Schwab committed
    • re PR fortran/83567 (Parametrized derived types: Segmentation fault when… · 96acdb8d
      re PR fortran/83567 (Parametrized derived types: Segmentation fault when assigning a function return value)
      
      2017-12-28  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/83567
      	* trans-expr.c (gfc_trans_assignment_1): Free parameterized
      	components of the lhs if dealloc is set.
      	*trans-decl.c (gfc_trans_deferred_vars): Do not free the
      	parameterized components of function results on leaving scope.
      
      
      2017-12-28  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/83567
      	* gfortran.dg/pdt_26.f90 : New test.
      
      From-SVN: r256019
      Paul Thomas committed
    • Daily bump. · 7b7801e3
      From-SVN: r256017
      GCC Administrator committed
  2. 27 Dec, 2017 9 commits
    • PR libstdc++/83600 fix end iterator for unready std::match_results · ecba3566
      	PR libstdc++/83600
      	* include/bits/regex.h (match_results::end()): Return valid iterator
      	when not ready.
      	* testsuite/28_regex/match_results/ctors/char/default.cc: Check that
      	unready objects are empty and have equal begin and end iterators.
      	* testsuite/28_regex/match_results/ctors/wchar_t/default.cc: Likewise.
      
      From-SVN: r256014
      Jonathan Wakely committed
    • PR libstdc++/83598 don't modify flags passed to std::basic_regex constructors · 8afe2df0
      	PR libstdc++/83598
      	* include/bits/regex.h (basic_regex): Don't modify flags passed to
      	constructors.
      	* testsuite/28_regex/basic_regex/ctors/83598.cc: New test.
      
      From-SVN: r256013
      Jonathan Wakely committed
    • PR libstdc++/83538 fix std::match_results<T>::reference (LWG 2306) · c41743d0
      	PR libstdc++/83538
      	* doc/xml/manual/intro.xml: Document LWG 2306 change.
      	* include/bits/regex.h (match_results::reference): Change to
      	non-const reference.
      	* testsuite/28_regex/match_results/typedefs.cc: Check types are
      	correct.
      
      From-SVN: r256012
      Jonathan Wakely committed
    • 2017_12_27 Louis Krupp <louis.krupp@zoho.com> · aefd636b
      	PR fortran/83092
      	* expr.c (gfc_apply_init): Check that typespec has character type
      	before using character length field.
      
      2017_12_27  Louis Krupp  <louis.krupp@zoho.com>
      
      	PR fortran/83092
      	* gfortran.dg/init_char_with_nonchar_ctr.f90: New test.
      
      From-SVN: r256011
      Louis Krupp committed
    • aarch64-simd.md (aarch64_ld1x2<VQ:mode>): New. · 467e6f1b
      gcc/ChangeLog:
      
      2017-12-27  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	* config/aarch64/aarch64-simd.md (aarch64_ld1x2<VQ:mode>): New.
      	(aarch64_ld1x2<VDC:mode>): Likewise.
      	(aarch64_simd_ld1<mode>_x2): Likewise.
      	(aarch64_simd_ld1<mode>_x2): Likewise.
      	* config/aarch64/arm_neon.h (vld1_u8_x2): New.
      	(vld1_s8_x2): Likewise.
      	(vld1_u16_x2): Likewise.
      	(vld1_s16_x2): Likewise.
      	(vld1_u32_x2): Likewise.
      	(vld1_s32_x2): Likewise.
      	(vld1_u64_x2): Likewise.
      	(vld1_s64_x2): Likewise.
      	(vld1_f16_x2): Likewise.
      	(vld1_f32_x2): Likewise.
      	(vld1_f64_x2): Likewise.
      	(vld1_p8_x2): Likewise.
      	(vld1_p16_x2): Likewise.
      	(vld1_p64_x2): Likewise.
      	(vld1q_u8_x2): Likewise.
      	(vld1q_s8_x2): Likewise.
      	(vld1q_u16_x2): Likewise.
      	(vld1q_s16_x2): Likewise.
      	(vld1q_u32_x2): Likewise.
      	(vld1q_s32_x2): Likewise.
      	(vld1q_u64_x2): Likewise.
      	(vld1q_s64_x2): Likewise.
      	(vld1q_f16_x2): Likewise.
      	(vld1q_f32_x2): Likewise.
      	(vld1q_f64_x2): Likewise.
      	(vld1q_p8_x2): Likewise.
      	(vld1q_p16_x2): Likewise.
      	(vld1q_p64_x2): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      2017-12-27  Kugan Vivekanandarajah  <kuganv@linaro.org>
      
      	* gcc.target/aarch64/advsimd-intrinsics/vld1x2.c: New test.
      
      From-SVN: r256010
      Kugan Vivekanandarajah committed
    • Assign result of get_string_lenth to a SSA_NAME (PR tree-optimization/83552). · 96863f32
      2017-12-27  Martin Liska  <mliska@suse.cz>
      
      	PR tree-optimization/83552
      	* tree-ssa-strlen.c (fold_strstr_to_strncmp): Assign result
      	of get_string_lenth to a SSA_NAME if not a GIMPLE value.
      2017-12-27  Martin Liska  <mliska@suse.cz>
      
      	PR tree-optimization/83552
      	* gcc.dg/pr83552.c: New test.
      
      From-SVN: r256009
      Martin Liska committed
    • Workaround PR83046 in gang-static-2.c · 7ec16b79
      2017-12-27  Tom de Vries  <tom@codesourcery.com>
      
      	PR c++/83046
      	* testsuite/libgomp.oacc-c-c++-common/gang-static-2.c (test_static)
      	(test_nonstatic): Fix return type to workaround PR83046.
      
      From-SVN: r256008
      Tom de Vries committed
    • Disable -gstatement-frontiers for nvptx · fa9afdc3
      2017-12-27  Tom de Vries  <tom@codesourcery.com>
      
      	* config/nvptx/nvptx.c (nvptx_option_override): Disable
      	-gstatement-frontiers.
      
      From-SVN: r256007
      Tom de Vries committed
    • Daily bump. · 3178f224
      From-SVN: r256006
      GCC Administrator committed
  3. 26 Dec, 2017 4 commits
  4. 25 Dec, 2017 2 commits
    • re PR target/83488 (ICE on a CET test-case) · 2e34b5bc
      	PR target/83488
      	* config/i386/i386.opt (-mavx512vpopcntdq, -mmavx512bitalg): Move from
      	ix86_isa_flags2 to ix86_isa_flags.
      	* config/i386/i386-c.c (ix86_target_macros_internal): Test
      	OPTION_MASK_ISA_AVX512BITALG and OPTION_MASK_ISA_AVX512VPOPCNTDQ in
      	isa_flags rather than isa_flags2.
      	* config/i386/i386.c (ix86_target_string): Move -mavx512vpopcntdq
      	and -mavx512bitalg from isa2_opts to isa_opts.
      	(ix86_option_override_internal): Test OPTION_MASK_ISA_AVX512VPOPCNTDQ
      	in x_ix86_isa_flags_explicit rather than x_ix86_isa_flags2_explicit
      	and set it in x_ix86_isa_flags rather than x_ix86_isa_flags2.
      	Formatting fixes.
      	(def_builtin): Treat OPTION_MASK_ISA_AVX512BW or
      	OPTION_MASK_ISA_AVX512F ored with another option similarly to
      	OPTION_MASK_ISA_AVX512VL.  Even for OPTION_MASK_ISA_AVX512VL don't
      	clear it if mask is just OPTION_MASK_ISA_AVX512VL itself.
      	(ix86_expand_builtin): Don't handle OPTION_MASK_ISA_GFNI and
      	OPTION_MASK_ISA_VPCLMULQDQ specially, instead handle
      	OPTION_MASK_ISA_AVX512BW and OPTION_MASK_ISA_AVX512F that way.
      	* config/i386/i386-builtin.def: Move AVX512VPOPCNTDQ and AVX512BITALG
      	builtins from bdesc_args2 to bdesc_args section.
      	(__builtin_ia32_compressstoreuqi512_mask,
      	__builtin_ia32_compressstoreuhi512_mask,
      	__builtin_ia32_compressstoreuqi256_mask,
      	__builtin_ia32_expandloadqi512_mask,
      	__builtin_ia32_expandloadqi512_maskz,
      	__builtin_ia32_expandloadhi512_mask,
      	__builtin_ia32_expandloadhi512_maskz,
      	__builtin_ia32_compressqi512_mask, __builtin_ia32_compresshi512_mask,
      	__builtin_ia32_compressqi256_mask, __builtin_ia32_expandqi512_mask,
      	__builtin_ia32_expandqi512_maskz, __builtin_ia32_expandhi512_mask,
      	__builtin_ia32_expandhi512_maskz, __builtin_ia32_expandqi256_mask,
      	__builtin_ia32_expandqi256_maskz, __builtin_ia32_vpshrd_v32hi_mask,
      	__builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshrdv_v32hi_mask,
      	__builtin_ia32_vpshrdv_v32hi_maskz, __builtin_ia32_vpshldv_v32hi_mask,
      	__builtin_ia32_vpshldv_v32hi_maskz,
      	__builtin_ia32_vpopcountb_v64qi_mask,
      	__builtin_ia32_vpopcountw_v32hi_mask,
      	__builtin_ia32_vpshufbitqmb512_mask,
      	__builtin_ia32_vpshufbitqmb256_mask): Add
      	" | OPTION_MASK_ISA_AVX512BW".
      	(__builtin_ia32_expandloadqi256_mask,
      	__builtin_ia32_expandloadqi256_maskz,
      	__builtin_ia32_vpopcountb_v32qi_mask): Add
      	" | OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA_AVX512BW".
      	(__builtin_ia32_expandloadhi256_mask,
      	__builtin_ia32_expandloadhi256_maskz,
      	__builtin_ia32_expandloadqi128_mask,
      	__builtin_ia32_expandloadqi128_maskz,
      	__builtin_ia32_expandloadhi128_mask,
      	__builtin_ia32_expandloadhi128_maskz,
      	__builtin_ia32_vpshrd_v16hi, __builtin_ia32_vpshrd_v16hi_mask,
      	__builtin_ia32_vpshrd_v8hi, __builtin_ia32_vpshrd_v8hi_mask,
      	__builtin_ia32_vpshrd_v8si, __builtin_ia32_vpshrd_v8si_mask,
      	__builtin_ia32_vpshrd_v4si, __builtin_ia32_vpshrd_v4si_mask,
      	__builtin_ia32_vpshrd_v4di, __builtin_ia32_vpshrd_v4di_mask,
      	__builtin_ia32_vpshrd_v2di, __builtin_ia32_vpshrd_v2di_mask,
      	__builtin_ia32_vpshld_v16hi, __builtin_ia32_vpshld_v16hi_mask,
      	__builtin_ia32_vpshld_v8hi, __builtin_ia32_vpshld_v8hi_mask,
      	__builtin_ia32_vpshld_v8si, __builtin_ia32_vpshld_v8si_mask,
      	__builtin_ia32_vpshld_v4si, __builtin_ia32_vpshld_v4si_mask,
      	__builtin_ia32_vpshld_v4di, __builtin_ia32_vpshld_v4di_mask,
      	__builtin_ia32_vpshld_v2di, __builtin_ia32_vpshld_v2di_mask,
      	__builtin_ia32_vpshrdv_v16hi, __builtin_ia32_vpshrdv_v16hi_mask,
      	__builtin_ia32_vpshrdv_v16hi_maskz, __builtin_ia32_vpshrdv_v8hi,
      	__builtin_ia32_vpshrdv_v8hi_mask, __builtin_ia32_vpshrdv_v8hi_maskz,
      	__builtin_ia32_vpshrdv_v8si, __builtin_ia32_vpshrdv_v8si_mask,
      	__builtin_ia32_vpshrdv_v8si_maskz, __builtin_ia32_vpshrdv_v4si,
      	__builtin_ia32_vpshrdv_v4si_mask, __builtin_ia32_vpshrdv_v4si_maskz,
      	__builtin_ia32_vpshrdv_v4di, __builtin_ia32_vpshrdv_v4di_mask,
      	__builtin_ia32_vpshrdv_v4di_maskz, __builtin_ia32_vpshrdv_v2di,
      	__builtin_ia32_vpshrdv_v2di_mask, __builtin_ia32_vpshrdv_v2di_maskz,
      	__builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
      	__builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
      	__builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
      	__builtin_ia32_vpshldv_v8si, __builtin_ia32_vpshldv_v8si_mask,
      	__builtin_ia32_vpshldv_v8si_maskz, __builtin_ia32_vpshldv_v4si,
      	__builtin_ia32_vpshldv_v4si_mask, __builtin_ia32_vpshldv_v4si_maskz,
      	__builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
      	__builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
      	__builtin_ia32_vpshldv_v2di_mask, __builtin_ia32_vpshldv_v2di_maskz,
      	__builtin_ia32_vpopcountb_v32qi, __builtin_ia32_vpopcountb_v16qi,
      	__builtin_ia32_vpopcountb_v16qi_mask, __builtin_ia32_vpopcountw_v16hi,
      	__builtin_ia32_vpopcountw_v16hi_mask, __builtin_ia32_vpopcountw_v8hi,
      	__builtin_ia32_vpopcountw_v8hi_mask): Add
      	" | OPTION_MASK_ISA_AVX512VL".
      	* config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
      	_mm512_shrdi_epi32, _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32,
      	_mm512_shrdi_epi64, _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64,
      	_mm512_shldi_epi16, _mm512_shldi_epi32, _mm512_mask_shldi_epi32,
      	_mm512_maskz_shldi_epi32, _mm512_shldi_epi64, _mm512_mask_shldi_epi64,
      	_mm512_maskz_shldi_epi64, _mm512_shrdv_epi16, _mm512_shrdv_epi32,
      	_mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
      	_mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64, _mm512_shldv_epi16,
      	_mm512_shldv_epi32, _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32,
      	_mm512_shldv_epi64, _mm512_mask_shldv_epi64,
      	_mm512_maskz_shldv_epi64): Don't require avx512bw for these intrinsics.
      	* config/i386/avx512bitalgintrin.h (_mm_bitshuffle_epi64_mask,
      	_mm_mask_bitshuffle_epi64_mask): Likewise.
      	* common/config/i386/i386-common.c
      	(OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
      	OPTION_MASK_ISA_AVX512BITALG_SET): Or in OPTION_MASK_ISA_AVX512F_SET.
      	(OPTION_MASK_ISA_AVX512F_UNSET): Or in
      	OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET and
      	OPTION_MASK_ISA_AVX512BITALG_UNSET.
      	(OPTION_MASK_ISA2_AVX512F_UNSET,
      	OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Define.
      	(ix86_handle_option): For -mno-general-regs-only, clear from
      	ix86_isa_flags2 OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET rather than
      	just OPTION_MASK_ISA_MPX.  For -mno-sse{,2,3,4,4.1,4.2,avx,avx2} and
      	-mno-ssse3 clear OPTION_MASK_ISA2_AVX512F_UNSET bits from
      	ix86_isa_flags2.  For -mno-avx512f likewise, instead of masking
      	individually listed ISAs.  For -m{,no-}avx512{vpopcntdq,bitalg} adjust
      	for moving from ix86_isa_flags2 to ix86_isa_flags.
      
      From-SVN: r255997
      Jakub Jelinek committed
    • Daily bump. · 112ed9dc
      From-SVN: r255996
      GCC Administrator committed
  5. 24 Dec, 2017 3 commits
  6. 23 Dec, 2017 2 commits
  7. 22 Dec, 2017 12 commits
    • re PR debug/83550 (Bad location of DW_TAG_structure_type with forward declaration since r224161) · 14ec014e
      	PR debug/83550
      	* c-decl.c (finish_struct): Set DECL_SOURCE_LOCATION on
      	TYPE_STUB_DECL and call rest_of_type_compilation before processing
      	incomplete vars rather than after it.
      
      	* c-c++-common/dwarf2/pr83550.c: New test.
      
      From-SVN: r255981
      Jakub Jelinek committed
    • re PR debug/83547 ((statement-frontiers) error: void value not ignored as it ought to be) · 11d29d63
      	PR debug/83547
      	* tree-iterator.c (alloc_stmt_list): Start with cleared
      	TREE_SIDE_EFFECTS regardless whether a new STATEMENT_LIST is allocated
      	or old one reused.
      c/
      	* c-typeck.c (c_finish_stmt_expr): Ignore !TREE_SIDE_EFFECTS as
      	indicator of ({ }), instead skip all trailing DEBUG_BEGIN_STMTs first,
      	and consider empty ones if there are no other stmts.  For
      	-Wunused-value walk all statements before the one only followed by
      	DEBUG_BEGIN_STMTs.
      testsuite/
      	* gcc.c-torture/compile/pr83547.c: New test.
      
      From-SVN: r255980
      Jakub Jelinek committed
    • re PR target/83488 (ICE on a CET test-case) · d7727ce4
      	PR target/83488
      	* config/i386/avx512vnniintrin.h: Don't check for __AVX512F__ nor
      	enable avx512f explicitly in #pragma GCC target.
      	* config/i386/i386-builtin.def (__builtin_ia32_vpdpbusd_v8si,
      	__builtin_ia32_vpdpbusd_v8si_mask, __builtin_ia32_vpdpbusd_v8si_maskz,
      	__builtin_ia32_vpdpbusd_v4si, __builtin_ia32_vpdpbusd_v4si_mask,
      	__builtin_ia32_vpdpbusd_v4si_maskz, __builtin_ia32_vpdpbusds_v8si,
      	__builtin_ia32_vpdpbusds_v8si_mask,
      	__builtin_ia32_vpdpbusds_v8si_maskz, __builtin_ia32_vpdpbusds_v4si,
      	__builtin_ia32_vpdpbusds_v4si_mask,
      	__builtin_ia32_vpdpbusds_v4si_maskz, __builtin_ia32_vpdpwssd_v8si,
      	__builtin_ia32_vpdpwssd_v8si_mask, __builtin_ia32_vpdpwssd_v8si_maskz,
      	__builtin_ia32_vpdpwssd_v4si, __builtin_ia32_vpdpwssd_v4si_mask,
      	__builtin_ia32_vpdpwssd_v4si_maskz, __builtin_ia32_vpdpwssds_v8si,
      	__builtin_ia32_vpdpwssds_v8si_mask,
      	__builtin_ia32_vpdpwssds_v8si_maskz, __builtin_ia32_vpdpwssds_v4si,
      	__builtin_ia32_vpdpwssds_v4si_mask,
      	__builtin_ia32_vpdpwssds_v4si_maskz): Use
      	OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL instead of
      	just OPTION_MASK_ISA_AVX512VNNI.
      
      	* gcc.target/i386/pr83488-2.c: New test.
      	* gcc.target/i386/pr83488-3.c: New test.
      
      From-SVN: r255979
      Jakub Jelinek committed
    • [PR 82027] Also stream opt_info of former_clones · a50e9b2f
      2017-12-22  Martin Jambor  <mjambor@suse.cz>
      
      	PR lto/82027
      	* lto-cgraph.c (output_cgraph_opt_summary_p): Also check former
      	clones.
      
      testsuite/
      	* g++.dg/lto/pr82027_0.C: New test.
      
      From-SVN: r255978
      Martin Jambor committed
    • compiler: do not propagate address-taken of a slice element to the slice · d7b24d55
          
          Array_index_expression may be used for indexing/slicing array or
          slice. If a slice element is address taken, the slice itself is
          not necessarily address taken. Only propagate address-taken for
          arrays.
          
          Reviewed-on: https://go-review.googlesource.com/83877
      
      From-SVN: r255977
      Ian Lance Taylor committed
    • compiler: bring escape analysis mostly in line with gc compiler · bb14e19c
          
          This CL ports the latest (~Go 1.10) escape analysis code from
          the gc compiler. Changes include:
          
          - In the gc compiler, the variable expression is represented
            with the variable node itself (ONAME). It is the same node
            used in the AST for multiple var expressions for the same
            variable. In our case, the var expressions nodes are distinct
            nodes. We need to propagate the escape state from/to the
            underlying variable in getter and setter. We already do it in
            the setter. Do it in the getter as well.
          
          - At the point of escape analysis, some AST constructs have not
            been lowered to runtime calls, for example, map literal
            construction and some builtin calls. Change the analysis to
            work on the non-lowered AST constructs instead of call
            expressions for them. For this to work, the analysis needs to
            look into Builtin_call_expression. Move its class definition
            from expressions.cc to expressions.h, and add necessary
            accessors. Also fix bugs in other runtime call handlings
            (selectsend, ifaceX2Y2, etc.).
          
          - Handle closures properly. The analysis tracks the function
            reference expression, and the escape state is propagated to
            the underlying heap expression for get_backend to do stack
            allocation for non-escaping closures.
          
          - Fix add_dereference. Before, this was doing expr->deref(),
            which undoes an indirection instead of add one. In the gc
            compiler, it adds a level of indirection, which is modeled as
            an OIND node regardless of the type of the expression. We
            can't do this for non-pointer typed expression, otherwise it
            will result in a type error. Instead, we model it with a
            special flavor of Node, "indirect". The flood phase handles
            this by incrementing its level.
          
          - Slicing of an array was not handled correctly. The gc compiler
            has an implicit (compiler inserted) OADDR node for the array,
            so the analysis is actually performed on the address of the
            array. We don't have this implicit address-of expression in
            the AST. Instead, we model this by adding an implicit child to
            the Node of the Array_index_expression representing slicing of
            an array.
          
          - Array_index_expression may represent indexing or slicing. The
            code distinguishes them by looking at whether the type of the
            expression is a slice. This does not work if the slice element
            is a slice. Instead, check whether its end() is NULL.
          
          - Temporary references was handled only in a limited case, as
            part of address-of expression. This CL handles it in general.
            The analysis uses the Temporary_statement as the point of
            tracking, and forwards Temporary_reference_expression to the
            underlying statement when needed.
          
          - Handle call return value flows, escpecially multiple return
            values. This includes porting part of CL 8202, CL 20102, and
            other fixes.
          
          - Support go:noescape pragma.
          
          - Add special handling for self assignment like
            b.buf = b.buf[m:n]. (CL 3162)
          
          - Remove ESCAPE_SCOPE, which was treated essentially the same as
            ESCAPE_HEAP, and was removed from the gc compiler. (CL 32130)
          
          - Run flood phase until fix point. (CL 30693)
          
          - Unnamed parameters do not escape. (CL 38600)
          
          - Various small bug fixes and improvements.
          
          "make check-go" passes except the one test in math/big, when the
          escape analysis is on. The escape analysis is still not run by
          default.
          
          Reviewed-on: https://go-review.googlesource.com/83876
      
      From-SVN: r255976
      Ian Lance Taylor committed
    • Enable AVX512BITALG · e2a29465
      gcc/
      	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512BITALG_SET,
      	OPTION_MASK_ISA_AVX512BITALG_UNSET): New.
      	(ix86_handle_option): Handle -mavx512bitalg, fix 4VNNIW formatting.
      	* config.gcc: Add avx512vpopcntdqvlintrin.h and avx512bitalgintrin.h.
      	* config/i386/avx512bitalgintrin.h (_mm512_popcnt_epi8, _mm512_popcnt_epi16,
      	_mm512_mask_popcnt_epi8, _mm512_maskz_popcnt_epi8, _mm512_mask_popcnt_epi16,
      	_mm512_maskz_popcnt_epi16, _mm512_bitshuffle_epi64_mask, _mm256_popcnt_epi8,
      	_mm512_mask_bitshuffle_epi64_mask, _mm256_mask_popcnt_epi8, _mm_popcnt_epi8,
      	_mm256_maskz_popcnt_epi8, _mm_bitshuffle_epi64_mask, _mm256_popcnt_epi16,
      	_mm_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
      	_mm256_mask_bitshuffle_epi64_mask, _mm_popcnt_epi16, _mm_maskz_popcnt_epi8,
      	_mm256_mask_popcnt_epi16, _mm256_maskz_popcnt_epi16, _mm_mask_popcnt_epi8,
      	_mm_mask_popcnt_epi16, _mm_maskz_popcnt_epi16): New intrinsics.
      	* config/i386/avx512vpopcntdqvlintrin.h (_mm_popcnt_epi32, _mm_popcnt_epi64,
      	_mm_mask_popcnt_epi32, _mm_maskz_popcnt_epi32, _mm256_popcnt_epi32,
      	_mm256_mask_popcnt_epi32, _mm256_maskz_popcnt_epi32, _mm_mask_popcnt_epi64,
      	_mm_maskz_popcnt_epi64, _mm256_popcnt_epi64, _mm256_mask_popcnt_epi64,
      	_mm256_maskz_popcnt_epi64): New intrinsics.
      	* config/i386/cpuid.h (bit_AVX512BITALG): New bit.
      	* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mavx512bitalg.
      	* config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI, V64QI_FTYPE_V64QI,
      	V4DI_FTYPE_V4DI, UHI_FTYPE_V2DI_V2DI_UHI, USI_FTYPE_V4DI_V4DI_USI,
      	V4SI_FTYPE_V4SI_V4SI_UHI, V8SI_FTYPE_V8SI_V8SI_UHI): New types.
      	* config/i386/i386-builtin.def (__builtin_ia32_vpopcountq_v4di,
      	__builtin_ia32_vpopcountq_v4di_mask, __builtin_ia32_vpopcountq_v2di,
      	__builtin_ia32_vpopcountq_v2di_mask, __builtin_ia32_vpopcountd_v4si,
      	__builtin_ia32_vpopcountd_v4si_mask, __builtin_ia32_vpopcountd_v8si,
      	__builtin_ia32_vpopcountd_v8si_mask, __builtin_ia32_vpopcountb_v64qi,
      	__builtin_ia32_vpopcountb_v64qi_mask, __builtin_ia32_vpopcountb_v32qi,
      	__builtin_ia32_vpopcountb_v32qi_mask, __builtin_ia32_vpopcountb_v16qi,
      	__builtin_ia32_vpopcountb_v16qi_mask, __builtin_ia32_vpopcountw_v32hi,
      	__builtin_ia32_vpopcountw_v32hi_mask, __builtin_ia32_vpopcountw_v16hi,
      	__builtin_ia32_vpopcountw_v16hi_mask, __builtin_ia32_vpopcountw_v8hi,
      	__builtin_ia32_vpopcountw_v8hi_mask, __builtin_ia32_vpshufbitqmb128_mask,
      	__builtin_ia32_vpshufbitqmb256_mask,
      	__builtin_ia32_vpshufbitqmb512_mask): New builtins.
      	* config/i386/i386-c.c (__AVX512BITALG__): New.
      	* config/i386/i386.c (isa2_opts): Add -mavx512bitalg.
      	(ix86_valid_target_attribute_inner_p): Ditto.
      	(ix86_expand_args_builtin): Handle new types.
      	* config/i386/i386.h (TARGET_AVX512BITALG, TARGET_AVX512BITALG_P): New.
      	* config/i386/i386.opt: Add -mavx512bitalg.
      	* config/i386/immintrin.h: Add avx512vpopcntdqvlintrin.h and
      	avx512bitalgintrin.h.
      	* config/i386/sse.md (VI48_AVX512VLBW): New iterator.
      	(vpopcount<mode><mask_name>): Add more types.
      	(avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): New.
      	* doc/invoke.texi: Add -mavx512bitalg and -mavx512vpopcntdq.
      gcc/testsuite/
      	* g++.dg/other/i386-2.C: Add new options.
      	* g++.dg/other/i386-3.C: Ditto.
      	* gcc.target/i386/sse-12.c: Ditto.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-22.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      	* gcc.target/i386/avx512-check.h: Handle bit_AVX512BITALG.
      	* gcc.target/i386/avx512bitalg-vpopcntb-1.c: New.
      	* gcc.target/i386/avx512bitalg-vpopcntb.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpopcntbvl.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpopcntw-1.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpopcntw.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpopcntwvl.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c: Ditto.
      	* gcc.target/i386/avx512bitalg-vpshufbitqmb.c: Ditto.
      	* gcc.target/i386/avx512bitalgvl-vpopcntb-1.c: Ditto.
      	* gcc.target/i386/avx512bitalgvl-vpopcntw-1.c: Ditto.
      	* gcc.target/i386/avx512bitalgvl-vpshufbitqmb-1.c: Ditto.
      	* gcc.target/i386/avx512vpopcntdqvl-vpopcntd-1.c: Ditto.
      	* gcc.target/i386/avx512vpopcntdqvl-vpopcntq-1.c: Ditto.
      	* gcc.target/i386/i386.exp (check_effective_target_avx512bitalg): New.
      	* gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Add more types.
      	* gcc.target/i386/avx512vpopcntdq-vpopcntd.c: Handle new intrinsics.
      	* gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto.
      	* gcc.target/i386/avx512vpopcntdq-vpopcntq.c: Ditto.
      
      Co-Authored-By: Sebastian Peryt <sebastian.peryt@intel.com>
      
      From-SVN: r255975
      Julia Koval committed
    • This is a follow up patch for pr83488 to fix an error in setting... · fefab953
      This is a follow up patch for pr83488 to fix an error in setting
      OPTION_MASK_ISA_AVX512VNNI_SET and OPTION_MASK_ISA_AVX512F_SET bits.
      There were both set in ix86_isa_flags2 while being defined in
      different ISA sets. Additionally move OPTION_MASK_ISA_AVX512VNNI_SET
      to ix86_isa_flags as it can be used with OPTION_MASK_ISA_AVX512VL_SET.
      
      gcc/
      	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET):
      	Or in OPTION_MASK_ISA_AVX512F_SET.
      	(OPTION_MASK_ISA_AVX512F_UNSET): Or in
      	OPTION_MASK_ISA_AVX512VNNI_UNSET.
      	(ix86_handle_option): Adjust for
      	OPTION_MASK_ISA_AVX512VNNI_*SET being in ix86_isa_flags.
      	* config/i386/i386-builtin.def: Move VNNI builtins from ARGS2
      	section to ARGS.
      	* config/i386/i386-c.c: Check for OPTION_MASK_ISA_AVX512VNNI in
      	isa_flag instead of isa_flag2.
      	* config/i386/i386.c (ix86_target_string): Move -mavx512vnni from
      	isa_opts2 to isa_opts.
      	* config/i386/i386.opt (mavx512vnni): Move from ix86_isa_flags2
      	to ix86_isa_flags.
      
      From-SVN: r255974
      Igor Tsimbalist committed
    • extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll. · 170a8bd6
      	* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
      c-family/
      	* c-pragma.c (init_pragma): Register pragma GCC unroll.
      	* c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
      c/
      	* c-parser.c (c_parser_while_statement): Add unroll parameter and
      	build ANNOTATE_EXPR if present.  Add 3rd operand to ANNOTATE_EXPR.
      	(c_parser_do_statement): Likewise.
      	(c_parser_for_statement): Likewise.
      	(c_parser_statement_after_labels): Adjust calls to above.
      	(c_parse_pragma_ivdep): New static function.
      	(c_parser_pragma_unroll): Likewise.
      	(c_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
      	<PRAGMA_UNROLL>: New case.
      cp/
      	* constexpr.c (cxx_eval_constant_expression) <ANNOTATE_EXPR>: Remove
      	assertion on 2nd operand.
      	(potential_constant_expression_1): Likewise.
      	* cp-tree.def (RANGE_FOR_STMT): Take a 5th operand.
      	* cp-tree.h (RANGE_FOR_UNROLL): New macro.
      	(cp_convert_range_for): Adjust prototype.
      	(finish_while_stmt_cond): Likewise.
      	(finish_do_stmt): Likewise.
      	(finish_for_cond): Likewise.
      	* init.c (build_vec_init): Adjut call to finish_for_cond.
      	* parser.c (cp_parser_statement): Adjust call to
      	cp_parser_iteration_statement.
      	(cp_parser_for): Add unroll parameter and pass it in calls to
      	cp_parser_range_for and cp_parser_c_for.
      	(cp_parser_c_for): Add unroll parameter and pass it in call to
      	finish_for_cond.
      	(cp_parser_range_for): Add unroll parameter, set in on RANGE_FOR_STMT
      	and pass it in call to cp_convert_range_for.
      	(cp_convert_range_for): Add unroll parameter and pass it in call to
      	finish_for_cond.
      	(cp_parser_iteration_statement): Add unroll parameter and pass it in
      	calls to finish_while_stmt_cond, finish_do_stmt and cp_parser_for.
      	(cp_parser_pragma_ivdep): New static function.
      	(cp_parser_pragma_unroll): Likewise.
      	(cp_parser_pragma) <PRAGMA_IVDEP>: Add support for pragma Unroll.
      	<PRAGMA_UNROLL>: New case.
      	* pt.c (tsubst_expr) <FOR_STMT>: Adjust call to finish_for_cond.
      	<RANGE_FOR_STMT>: Pass unrolling factor to cp_convert_range_for.
      	<WHILE_STMT>: Adjust call to finish_while_stmt_cond.
      	<DO_STMT>: Adjust call to finish_do_stmt.
      	* semantics.c (finish_while_stmt_cond): Add unroll parameter and
      	build ANNOTATE_EXPR if present.
      	(finish_do_stmt): Likewise.
      	(finish_for_cond): Likewise.
      	(begin_range_for_stmt): Build RANGE_FOR_STMT with 5th operand.
      fortran/
      	* array.c (gfc_copy_iterator): Copy unroll field.
      	* decl.c (directive_unroll): New global variable.
      	(gfc_match_gcc_unroll): New function.
      	* gfortran.h (gfc_iterator]): Add unroll field.
      	(directive_unroll): Declare:
      	* match.c (gfc_match_do): Use memset to initialize the iterator.
      	* match.h (gfc_match_gcc_unroll): New prototype.
      	* parse.c (decode_gcc_attribute): Match "unroll".
      	(parse_do_block): Set iterator's unroll.
      	(parse_executable): Diagnose misplaced unroll directive.
      	* trans-stmt.c (gfc_trans_simple_do) Annotate loop condition with
      	annot_expr_unroll_kind.
      	(gfc_trans_do): Likewise.
      	* gfortran.texi (GNU Fortran Compiler Directives): Split section into
      	subections 'ATTRIBUTES directive' and 'UNROLL directive'.
      
      From-SVN: r255973
      Eric Botcazou committed
    • compiler: improve escape analysis diagnostics · fa546f0f
          
          This CL brings escape analysis diagnostics closer to the gc
          compiler's. This makes porting and debugging escape analysis
          code easier. A few changes:
          
          - In the gc compiler, the variable expression is represented
            with the variable node itself (ONAME), the location of which
            is the location of definition. We add a definition_location
            method to Node, and make use of it when the gc compiler emits
            diagnostics at the definition locations.
          
          - In the gc compiler, methods are named T.M or (*T).M. Add the
            type to the method name when possible.
          
          - Print "moved to heap" messages only for variables.
          
          - Reduce some duplicated diagnostics.
          
          - Print "does not escape" messages in more situations which the
            gc compiler does.
          
          - Remove the special handling for closure numbers. In gofrontend,
            closures are named "$nested#" where # is a global counter
            starting from 0, whereas in the gc compiler they are named
            "outer.func#" where # is a per-function counter starting from
            1. We tried to adjust the closure name to better matching the
            ones in the gc compiler, however, it cannot match exactly
            because of the difference of the counter. Instead, just print
            "outer.$nested#".
          
          Reviewed-on: https://go-review.googlesource.com/83875
      
      From-SVN: r255967
      Ian Lance Taylor committed
    • [SFN] sync up debug-only stmt list's side effects with empty stmts too · 18408e96
      for  gcc/c-family/ChangeLog
      
      	PR debug/83527
      	PR debug/83419
      	* c-semantics.c (only_debug_stmts_after_p): New.
      	(pop_stmt_list): Clear side effects in debug-only stmt list.
      	Check for single nondebug stmt followed by debug stmts only.
      
      for  gcc/testsuite/ChangeLog
      
      	PR debug/83527
      	PR debug/83419
      	* gcc.dg/pr83527.c: New.
      
      From-SVN: r255966
      Alexandre Oliva committed
    • Daily bump. · cacb2cce
      From-SVN: r255965
      GCC Administrator committed