view gcc/ChangeLog-2017 @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

2017-12-31  Jakub Jelinek  <jakub@redhat.com>

	PR target/83536
	* config/i386/i386.c (ix86_attribute_table): Remove excess
	initializer for "shared" attribute.

2017-12-30  Tom de Vries  <tom@codesourcery.com>

	PR libgomp/83046
	* omp-expand.c (expand_omp_target): If in_lto_p, mark offload_funcs with
	DECL_PRESERVE_P.
	* lto-streamer-out.c (prune_offload_funcs): New function.  Remove
	offload_funcs entries that no longer have a corresponding cgraph_node.
	Mark the remaining ones as DECL_PRESERVE_P.
	(output_lto): Call prune_offload_funcs.

2017-12-30  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
	vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>,
	vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
	vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
	vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
	vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1, vpdpbusd_<mode>,
	vpdpbusd_<mode>_mask, vpdpbusd_<mode>_maskz, vpdpbusd_<mode>_maskz_1,
	vpdpbusds_<mode>, vpdpbusds_<mode>_mask, vpdpbusds_<mode>_maskz,
	vpdpbusds_<mode>_maskz_1, vpdpwssd_<mode>, vpdpwssd_<mode>_mask,
	vpdpwssd_<mode>_maskz, vpdpwssd_<mode>_maskz_1, vpdpwssds_<mode>,
	vpdpwssds_<mode>_mask, vpdpwssds_<mode>_maskz,
	vpdpwssds_<mode>_maskz_1, vaesdec_<mode>, vaesdeclast_<mode>,
	vaesenc_<mode>, vpclmulqdq_<mode>,
	avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): Formatting fixes.

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.

2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>

	* 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.

2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>

	* 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.

2017-12-28  Andreas Schwab  <schwab@linux-m68k.org>

	* config/m68k/m68k.md (ashrdi3_const1, lshrdi3_const1): Add
	CC_STATUS_INIT.

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.

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  Tom de Vries  <tom@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_option_override): Disable
	-gstatement-frontiers.

2017-12-26  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/83513
	* sel-sched.c (sel_rank_for_schedule): Order by non-zero usefulness
	before priority comparison.

2017-12-25  Jakub Jelinek  <jakub@redhat.com>

	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.

2017-12-23  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83553
	* fold-const.c (struct contains_label_data): New type.
	(contains_label_1): Return non-NULL even for CASE_LABEL_EXPR, unless
	inside of a SWITCH_BODY seen during the walk.
	(contains_label_p): Use walk_tree instead of
	walk_tree_without_duplicates, prepare data for contains_label_1 and
	provide own pset.

2017-12-22  Jakub Jelinek  <jakub@redhat.com>

	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.

	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.

2017-12-22  Martin Jambor  <mjambor@suse.cz>

	PR lto/82027
	* lto-cgraph.c (output_cgraph_opt_summary_p): Also check former
	clones.

2017-12-22  Julia Koval  <julia.koval@intel.com>
	    Sebastian Peryt  <sebastian.peryt@intel.com>

	* 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.

2017-12-22  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* 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.

2017-12-22  Mike Stump  <mikestump@comcast.net>
            Eric Botcazou  <ebotcazou@adacore.com>

	* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.

2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/83487
	* config/i386/i386.c (ix86_function_arg_boundary): Return
	PARM_BOUNDARY for TYPE_EMPTY_P types.

	PR c/83448
	* gimple-ssa-sprintf.c (maybe_warn): Don't call set_caret_index
	if navail is >= dir.len.

2017-12-21  Steve Ellcey  <sellcey@cavium.com>

	* config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Fix
	triplet for ilp32.

2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/80747
	PR rtl-optimization/83512
	* cfgrtl.c (force_nonfallthru_and_redirect): When splitting
	succ edge from ENTRY, copy partition from e->dest to the newly
	created bb.
	* bb-reorder.c (reorder_basic_blocks_simple): If last_tail is
	ENTRY, use BB_PARTITION of its successor block as current_partition.
	Don't copy partition when splitting succ edge from ENTRY.

	PR tree-optimization/83523
	* tree-ssa-math-opts.c (is_widening_mult_p): Return false if
	for INTEGER_TYPE TYPE_OVERFLOW_TRAPS.
	(convert_mult_to_fma): Likewise.

	PR tree-optimization/83521
	* tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
	gimple_build_assign without code on result of
	fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
	a VIEW_CONVERT_EXPR.

2017-12-21  Andrew Pinski  <apinski@cavium.com>
	    Steve Ellcey  <sellcey@cavium.com>

	* config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Handle
	multi-arch for ilp32.

2017-12-21  Uros Bizjak  <ubizjak@gmail.com>

	PR target/83467
	* config/i386/i386.md (*ashl<mode>3_mask): Add operand
	constraints to operand 2.
	(*ashl<mode>3_mask_1): Ditto.
	(*<shift_insn><mode>3_mask): Ditto.
	(*<shift_insn><mode>3_mask_1): Ditto.
	(*<rotate_insn><mode>3_mask): Ditto.
	(*<rotate_insn><mode>3_mask_1): Ditto.

2017-12-21  Alexandre Oliva  <aoliva@redhat.com>

	* reorg.c (make_return_insns): Reemit each insn with its own location.

2017-12-21  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
	generation for cases where splatting a value is not useful.
	* simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
	across a vec_duplicate and a paradoxical subreg forming a vector
	mode to a vec_concat.

2017-12-21  James Greenhalgh  <james.greenhalgh@arm.com>

	* combine.c (simplify_set): Do not transform subregs to zero_extends
	if the destination is not a scalar int mode.

2017-12-21  Eric Botcazou  <ebotcazou@adacore.com>

	PR c++/82872
	* convert.c (convert_to_integer_1) <POINTER_TYPE>: Do not return the
	shared zero if the input has overflowed.

2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/driver-arm.c (arm_cpu_table): Specify dotprod
	support for Cortex-A55 and Cortex-A75.

2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* common/config/arm/arm-common.c (compare_opt_names): Add function
	comment.  Use strcmp instead of manual loop.

2017-12-21  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/83509
	* gcov-dump.c (dump_gcov_file): Do not read info about
	support_unexecuted_blocks for gcda files.

2017-12-21  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/82973
	* emit-rtl.h (valid_for_const_vec_duplicate_p): Rename to ...
	(valid_for_const_vector_p): ... this.
	* emit-rtl.c (valid_for_const_vec_duplicate_p): Rename to ...
	(valid_for_const_vector_p): ... this.  Adjust function comment.
	(gen_vec_duplicate): Adjust caller.
	* optabs.c (expand_vector_broadcast): Likewise.
	* simplify-rtx.c (simplify_const_unary_operation): Don't optimize into
	CONST_VECTOR if some element isn't simplified valid_for_const_vector_p
	constant.
	(simplify_const_binary_operation): Likewise.  Use CONST_FIXED_P macro
	instead of GET_CODE == CONST_FIXED.
	(simplify_subreg): Use CONST_FIXED_P macro instead of
	GET_CODE == CONST_FIXED.

	PR target/83488
	* config/i386/i386.c (ix86_target_string): Move -mavx512vbmi2 and
	-mshstk entries from isa_opts2 to isa_opts and -mhle, -mmovbe,
	-mclzero and -mmwaitx entries from isa_opts to isa_opts2.
	(ix86_option_override_internal): Adjust for
	OPTION_MASK_ISA_{HLE,MOVBE,CLZERO,MWAITX} moving to ix86_isa_flags2
	and OPTION_MASK_ISA_SHSTK moving to ix86_isa_flags.
	(BDESC_VERIFYS): Remove SPECIAL_ARGS2 related checks.
	(ix86_init_mmx_sse_builtins): Remove bdesc_special_args2 handling.
	Use def_builtin2 instead of def_builtin for OPTION_MASK_ISA_MWAITX
	and OPTION_MASK_ISA_CLZERO builtins.  Use def_builtin instead of
	def_builtin2 for CET builtins.
	(ix86_expand_builtin): Remove bdesc_special_args2 handling.  Fix
	up formatting in IX86_BUILTIN_RDPID code.
	* config/i386/i386-builtin.def: Move VBMI2 builtins from SPECIAL_ARGS2
	section to SPECIAL_ARGS and from ARGS2 section to ARGS.
	* config/i386/i386.opt (mavx512vbmi2, mshstk): Move from
	ix86_isa_flags2 to ix86_isa_flags.
	(mhle, mmovbe, mclzero, mmwaitx): Move from ix86_isa_flags to
	ix86_isa_flags2.
	* config/i386/i386-c.c (ix86_target_macros_internal): Check for
	OPTION_MASK_ISA_{CLZERO,MWAITX} in isa_flag2 instead of isa_flag.
	Check for OPTION_MASK_ISA_{SHSTK,AVX512VBMI2} in isa_flag instead
	of isa_flag2.
	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET):
	Or in OPTION_MASK_ISA_AVX512F_SET.
	(OPTION_MASK_ISA_AVX512F_UNSET): Or in
	OPTION_MASK_ISA_AVX512VBMI2_UNSET.
	(ix86_handle_option): Adjust for
	OPTION_MASK_ISA_{SHSTK,AVX512VBMI2}_*SET being in ix86_isa_flags
	and OPTION_MASK_ISA_{MOVBE,MWAITX,CLZERO}_*SET in ix86_isa_flags2.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-data-ref.h (prune_runtime_alias_test_list): Take the
	factor as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
	* tree-data-ref.c (prune_runtime_alias_test_list): Likewise.
	Track polynomial offsets.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
	Treat drb->init as a poly_int.  Fail if its misalignment wrt
	vector_alignment isn't known.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-vectorizer.h (_loop_vec_info): Add a versioning_threshold
	field.
	(LOOP_VINFO_VERSIONING_THRESHOLD): New macro
	(vect_loop_versioning): Take the loop versioning threshold as a
	separate parameter.
	* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
	* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
	versioning_threshold.
	(vect_analyze_loop_2): Compute the loop versioning threshold
	whenever loop versioning is needed, and store it in the new
	field rather than combining it with the cost model threshold.
	(vect_transform_loop): Update call to vect_loop_versioning.
	Try to combine the loop versioning and cost thresholds here.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssa-loop-ivopts.h (strip_offset): Return the offset as
	poly_uint64_pod rather than an unsigned HOST_WIDE_INT.
	* tree-loop-distribution.c (classify_builtin_st): Update accordingly.
	* tree-ssa-loop-ivopts.c (iv_use::addr_offset): Change from
	an unsigned HOST_WIDE_INT to a poly_uint64_pod.
	(group_compare_offset): Update accordingly.
	(split_small_address_groups_p): Likewise.
	(record_use): Take addr_offset as a poly_uint64 rather than
	an unsigned HOST_WIDE_INT.
	(strip_offset): Return the offset as a poly_uint64 rather than
	an unsigned HOST_WIDE_INT.
	(record_group_use, split_address_groups): Track polynomial offsets.
	(add_iv_candidate_for_use): Likewise.
	(addr_offset_valid_p): Take the offset as a poly_int64 rather
	than a HOST_WIDE_INT.
	(strip_offset_1): Return the offset as a poly_int64 rather than
	a HOST_WIDE_INT.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree.h (get_binfo_at_offset): Take the offset as a poly_int64
	rather than a HOST_WIDE_INT.
	* tree.c (get_binfo_at_offset): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* ipa-prop.h (build_ref_for_offset): Take the offset as a poly_int64
	rather than a HOST_WIDE_INT.
	* tree-sra.c (build_ref_for_offset): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* fold-const.h (mem_ref_offset): Return a poly_offset_int rather
	than an offset_int.
	* tree.c (mem_ref_offset): Likewise.
	(build_simple_mem_ref_loc): Treat MEM_REF offsets as poly_ints.
	* builtins.c (get_object_alignment_2): Likewise.
	* expr.c (get_inner_reference, expand_expr_real_1): Likewise.
	* gimple-fold.c (get_base_constructor): Likewise.
	* gimple-ssa-strength-reduction.c (restructure_reference): Likewise.
	* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
	Likewise.
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
	* ipa-prop.c (compute_complex_assign_jump_func): Likewise.
	(get_ancestor_addr_info): Likewise.
	* ipa-param-manipulation.c (ipa_get_adjustment_candidate): Likewise.
	* match.pd: Likewise.
	* tree-data-ref.c (dr_analyze_innermost): Likewise.
	* tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
	* tree-eh.c (tree_could_trap_p): Likewise.
	* tree-object-size.c (addr_object_size): Likewise.
	* tree-ssa-address.c (copy_ref_info): Likewise.
	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise.
	(indirect_refs_may_alias_p): Likewise.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
	* tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise.
	(non_rewritable_mem_ref_base): Likewise.
	* tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
	* tree-vrp.c (vrp_prop::check_array_ref): Likewise.
	* varasm.c (decode_addr_const): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gimple-ssa-stor-merging.c (find_bswap_or_nop_load): Track polynomial
	offsets for MEM_REFs.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssanames.h (adjust_ptr_info_misalignment): Take the increment
	as a poly_uint64 rather than an unsigned int.
	* tree-ssanames.c (adjust_ptr_info_misalignment): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* varasm.c (addr_const::offset): Change from HOST_WIDE_INT
	to poly_int64.
	(decode_addr_const): Update accordingly.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree.h (bit_field_size, bit_field_offset): New functions.
	* hsa-gen.c (gen_hsa_addr): Use them.
	* tree-ssa-forwprop.c (simplify_bitfield_ref): Likewise.
	(simplify_vector_constructor): Likewise.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
	* tree-cfg.c (verify_expr): Require the sizes and offsets of a
	BIT_FIELD_REF to be poly_uint64s rather than uhwis.
	* fold-const.c (fold_ternary_loc): Protect tree_to_uhwi with
	tree_fits_uhwi_p.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expr.h (emit_group_load, emit_group_load_into_temps)
	(emit_group_store): Take the size as a poly_int64 rather than an int.
	* expr.c (emit_group_load_1, emit_group_load): Likewise.
	(emit_group_load_into_temp, emit_group_store): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* ira-int.h (ira_spilled_reg_stack_slot::width): Change from
	an unsigned int to a poly_uint64.
	* ira.h (ira_reuse_stack_slot, ira_mark_new_stack_slot): Take the
	sizes as poly_uint64s rather than unsigned ints.
	* ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot):
	Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* lra-constraints.c (emit_inc): Change inc_amount from an int
	to a poly_int64.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* cfgexpand.c (stack_var::size): Change from a HOST_WIDE_INT
	to a poly_uint64.
	(add_stack_var, stack_var_cmp, partition_stack_vars)
	(dump_stack_var_partition): Update accordingly.
	(alloc_stack_frame_space): Take the size as a poly_int64 rather
	than a HOST_WIDE_INT.
	(expand_stack_vars, expand_one_stack_var_1): Handle polynomial sizes.
	(defer_stack_allocation, estimated_stack_frame_size): Likewise.
	(account_stack_vars, expand_one_var): Likewise.  Return a poly_uint64
	rather than a HOST_WIDE_INT.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* target.def (return_pops_args): Treat both the input and output
	sizes as poly_int64s rather than HOST_WIDE_INTS.
	* targhooks.h (default_return_pops_args): Update accordingly.
	* targhooks.c (default_return_pops_args): Likewise.
	* doc/tm.texi: Regenerate.
	* emit-rtl.h (incoming_args): Change pops_args, size and
	outgoing_args_size from int to poly_int64_pod.
	* function.h (expr_status): Change x_pending_stack_adjust and
	x_stack_pointer_delta from int to poly_int64.
	(args_size::constant): Change from HOST_WIDE_INT to poly_int64.
	(ARGS_SIZE_RTX): Update accordingly.
	* calls.c (highest_outgoing_arg_in_use): Change from int to
	unsigned int.
	(stack_usage_watermark, stored_args_watermark): New variables.
	(stack_region_maybe_used_p, mark_stack_region_used): New functions.
	(emit_call_1): Change the stack_size and rounded_stack_size
	parameters from HOST_WIDE_INT to poly_int64.  Track n_popped
	as a poly_int64.
	(save_fixed_argument_area): Check stack_usage_watermark.
	(initialize_argument_information): Change old_pending_adj from
	a HOST_WIDE_INT * to a poly_int64_pod *.
	(compute_argument_block_size): Return the size as a poly_int64
	rather than an int.
	(finalize_must_preallocate): Track polynomial argument sizes.
	(compute_argument_addresses): Likewise.
	(internal_arg_pointer_based_exp): Track polynomial offsets.
	(mem_overlaps_already_clobbered_arg_p): Rename to...
	(mem_might_overlap_already_clobbered_arg_p): ...this and take the
	size as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
	Check stored_args_used_watermark.
	(load_register_parameters): Update accordingly.
	(check_sibcall_argument_overlap_1): Likewise.
	(combine_pending_stack_adjustment_and_call): Take the unadjusted
	args size as a poly_int64 rather than an int.  Return a bool
	indicating whether the optimization was possible and return
	the new adjustment by reference.
	(check_sibcall_argument_overlap): Track polynomail argument sizes.
	Update stored_args_watermark.
	(can_implement_as_sibling_call_p): Handle polynomial argument sizes.
	(expand_call): Likewise.  Maintain stack_usage_watermark and
	stored_args_watermark.  Update calls to
	combine_pending_stack_adjustment_and_call.
	(emit_library_call_value_1): Handle polynomial argument sizes.
	Call stack_region_maybe_used_p and mark_stack_region_used.
	Maintain stack_usage_watermark.
	(store_one_arg): Likewise.  Update call to
	mem_overlaps_already_clobbered_arg_p.
	* config/arm/arm.c (arm_output_function_prologue): Add a cast to
	HOST_WIDE_INT.
	* config/avr/avr.c (avr_outgoing_args_size): Likewise.
	* config/microblaze/microblaze.c (microblaze_function_prologue):
	Likewise.
	* config/cr16/cr16.c (cr16_return_pops_args): Update for new
	TARGET_RETURN_POPS_ARGS interface.
	(cr16_compute_frame, cr16_initial_elimination_offset): Add casts
	to HOST_WIDE_INT.
	* config/ft32/ft32.c (ft32_compute_frame): Likewise.
	* config/i386/i386.c (ix86_return_pops_args): Update for new
	TARGET_RETURN_POPS_ARGS interface.
	(ix86_expand_split_stack_prologue): Add a cast to HOST_WIDE_INT.
	* config/moxie/moxie.c (moxie_compute_frame): Likewise.
	* config/m68k/m68k.c (m68k_return_pops_args): Update for new
	TARGET_RETURN_POPS_ARGS interface.
	* config/vax/vax.c (vax_return_pops_args): Likewise.
	* config/pa/pa.h (STACK_POINTER_OFFSET): Add a cast to poly_int64.
	(EXIT_IGNORE_STACK): Update reference to crtl->outgoing_args_size.
	* config/arm/arm.h (CALLER_INTERWORKING_SLOT_SIZE): Likewise.
	* config/powerpcspe/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
	* config/powerpcspe/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
	* config/powerpcspe/powerpcspe.h (STACK_DYNAMIC_OFFSET): Likewise.
	* config/rs6000/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
	* config/rs6000/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
	* config/rs6000/rs6000.h (STACK_DYNAMIC_OFFSET): Likewise.
	* dojump.h (saved_pending_stack_adjust): Change x_pending_stack_adjust
	and x_stack_pointer_delta from int to poly_int64.
	* dojump.c (do_pending_stack_adjust): Update accordingly.
	* explow.c (allocate_dynamic_stack_space): Handle polynomial
	stack_pointer_deltas.
	* function.c (STACK_DYNAMIC_OFFSET): Add a cast to poly_int64.
	(pad_to_arg_alignment): Track polynomial offsets.
	(assign_parm_find_stack_rtl): Likewise.
	(assign_parms, locate_and_pad_parm): Handle polynomial argument sizes.
	* toplev.c (output_stack_usage): Update reference to
	current_function_pushed_stack_size.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* function.c (in_arg_offset, var_offset, dynamic_offset)
	(out_arg_offset, cfa_offset): Change from int to poly_int64.
	(instantiate_new_reg): Return the new offset as a poly_int64_pod
	rather than a HOST_WIDE_INT.
	(instantiate_virtual_regs_in_rtx): Track polynomial offsets.
	(instantiate_virtual_regs_in_insn): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (get_args_size, add_args_size_note): New functions.
	(find_args_size_adjust): Return a poly_int64 rather than a
	HOST_WIDE_INT.
	(fixup_args_size_notes): Likewise.  Make the same change to the
	end_args_size parameter.
	* rtlanal.c (get_args_size, add_args_size_note): New functions.
	* builtins.c (expand_builtin_trap): Use add_args_size_note.
	* calls.c (emit_call_1): Likewise.
	* explow.c (adjust_stack_1): Likewise.
	* cfgcleanup.c (old_insns_match_p): Update use of
	find_args_size_adjust.
	* combine.c (distribute_notes): Track polynomial arg sizes.
	* dwarf2cfi.c (dw_trace_info): Change beg_true_args_size,
	end_true_args_size, beg_delay_args_size and end_delay_args_size
	from HOST_WIDE_INT to poly_int64.
	(add_cfi_args_size): Take the args_size as a poly_int64 rather
	than a HOST_WIDE_INT.
	(notice_args_size, notice_eh_throw, maybe_record_trace_start)
	(maybe_record_trace_start_abnormal, scan_trace, connect_traces): Track
	polynomial arg sizes.
	* emit-rtl.c (try_split): Use get_args_size.
	* recog.c (peep2_attempt): Likewise.
	* reload1.c (reload_as_needed): Likewise.
	* expr.c (find_args_size_adjust): Return the adjustment as a
	poly_int64 rather than a HOST_WIDE_INT.
	(fixup_args_size_notes): Change end_args_size from a HOST_WIDE_INT
	to a poly_int64 and change the return type in the same way.
	(emit_single_push_insn): Track polynomial arg sizes.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expr.h (push_block, emit_push_insn): Change the "extra" parameter
	from HOST_WIDE_INT to poly_int64.
	* expr.c (push_block, emit_push_insn): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* function.h (frame_space): Change start and length from HOST_WIDE_INT
	to poly_int64.
	(get_frame_size): Return the size as a poly_int64 rather than a
	HOST_WIDE_INT.
	(frame_offset_overflow): Take the offset as a poly_int64 rather
	than a HOST_WIDE_INT.
	(assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
	(assign_stack_temp): Likewise for the size.
	* function.c (get_frame_size): Return a poly_int64 rather than
	a HOST_WIDE_INT.
	(frame_offset_overflow): Take the offset as a poly_int64 rather
	than a HOST_WIDE_INT.
	(try_fit_stack_local): Take the start, length and size as poly_int64s
	rather than HOST_WIDE_INTs.  Return the offset as a poly_int64_pod
	rather than a HOST_WIDE_INT.
	(add_frame_space): Take the start and end as poly_int64s rather than
	HOST_WIDE_INTs.
	(assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
	(assign_stack_temp): Likewise for the size.
	(temp_slot): Change size, base_offset and full_size from HOST_WIDE_INT
	to poly_int64.
	(find_temp_slot_from_address): Handle polynomial offsets.
	(combine_temp_slots): Likewise.
	* emit-rtl.h (rtl_data::x_frame_offset): Change from HOST_WIDE_INT
	to poly_int64.
	* cfgexpand.c (alloc_stack_frame_space): Return the offset as a
	poly_int64 rather than a HOST_WIDE_INT.
	(expand_one_stack_var_at): Take the offset as a poly_int64 rather
	than a HOST_WIDE_INT.
	(expand_stack_vars, expand_one_stack_var_1, expand_used_vars): Handle
	polynomial frame offsets.
	* config/m32r/m32r-protos.h (m32r_compute_frame_size): Take the size
	as a poly_int64 rather than an int.
	* config/m32r/m32r.c (m32r_compute_frame_size): Likewise.
	* config/v850/v850-protos.h (compute_frame_size): Likewise.
	* config/v850/v850.c (compute_frame_size): Likewise.
	* config/xtensa/xtensa-protos.h (compute_frame_size): Likewise.
	* config/xtensa/xtensa.c (compute_frame_size): Likewise.
	* config/pa/pa-protos.h (pa_compute_frame_size): Likewise.
	* config/pa/pa.c (pa_compute_frame_size): Likewise.
	* explow.h (get_dynamic_stack_base): Take the offset as a poly_int64
	rather than a HOST_WIDE_INT.
	* explow.c (get_dynamic_stack_base): Likewise.
	* final.c (final_start_function): Use the constant lower bound
	of the frame size for -Wframe-larger-than.
	* ira.c (do_reload): Adjust for new get_frame_size return type.
	* lra.c (lra): Likewise.
	* reload1.c (reload): Likewise.
	* config/avr/avr.c (avr_asm_function_end_prologue): Likewise.
	* config/pa/pa.h (EXIT_IGNORE_STACK): Likewise.
	* rtlanal.c (get_initial_register_offset): Return the offset as
	a poly_int64 rather than a HOST_WIDE_INT.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* reload1.c (elim_table): Change initial_offset, offset and
	previous_offset from HOST_WIDE_INT to poly_int64_pod.
	(offsets_at): Change the target array's element type from
	HOST_WIDE_INT to poly_int64_pod.
	(set_label_offsets, eliminate_regs_1, eliminate_regs_in_insn)
	(elimination_costs_in_insn, update_eliminable_offsets)
	(verify_initial_elim_offsets, set_offsets_for_label)
	(init_eliminable_invariants): Update after above changes.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* reload.h (reload::inc): Change from an int to a poly_int64_pod.
	* reload.c (combine_reloads, debug_reload_to_stream): Likewise.
	(decomposition): Change start and end from HOST_WIDE_INT
	to poly_int64_pod.
	(decompose, immune_p): Update accordingly.
	(find_inc_amount): Return a poly_int64 rather than an int.
	* reload1.c (inc_for_reload): Take the inc_amount as a poly_int64
	rather than an int.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree.h (get_inner_reference): Return the bitsize and bitpos
	as poly_int64_pods rather than HOST_WIDE_INT.
	* fold-const.h (ptr_difference_const): Return the pointer difference
	as a poly_int64_pod rather than a HOST_WIDE_INT.
	* expr.c (get_inner_reference): Return the bitsize and bitpos
	as poly_int64_pods rather than HOST_WIDE_INT.
	(expand_expr_addr_expr_1, expand_expr_real_1): Track polynomial
	offsets and sizes.
	* fold-const.c (make_bit_field_ref): Take the bitpos as a poly_int64
	rather than a HOST_WIDE_INT.  Update call to get_inner_reference.
	(optimize_bit_field_compare): Update call to get_inner_reference.
	(decode_field_reference): Likewise.
	(fold_unary_loc): Track polynomial offsets and sizes.
	(split_address_to_core_and_offset): Return the bitpos as a
	poly_int64_pod rather than a HOST_WIDE_INT.
	(ptr_difference_const): Likewise for the pointer difference.
	* asan.c (instrument_derefs): Track polynomial offsets and sizes.
	* config/mips/mips.c (r10k_safe_mem_expr_p): Likewise.
	* dbxout.c (dbxout_expand_expr): Likewise.
	* dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref)
	(loc_list_from_tree_1, fortran_common): Likewise.
	* gimple-laddress.c (pass_laddress::execute): Likewise.
	* gimple-ssa-store-merging.c (find_bswap_or_nop_load): Likewise.
	* gimplify.c (gimplify_scan_omp_clauses): Likewise.
	* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
	* tree-affine.c (tree_to_aff_combination): Likewise.
	(get_inner_reference_aff): Likewise.
	* tree-data-ref.c (split_constant_offset_1): Likewise.
	(dr_analyze_innermost): Likewise.
	* tree-scalar-evolution.c (interpret_rhs_expr): Likewise.
	* tree-sra.c (ipa_sra_check_caller): Likewise.
	* tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
	* ubsan.c (maybe_instrument_pointer_overflow): Likewise.
	(instrument_bool_enum_load, instrument_object_size): Likewise.
	* gimple-ssa-strength-reduction.c (slsr_process_ref): Update call
	to get_inner_reference.
	* hsa-gen.c (gen_hsa_addr): Likewise.
	* sanopt.c (maybe_optimize_ubsan_ptr_ifn): Likewise.
	* tsan.c (instrument_expr): Likewise.
	* match.pd: Update call to ptr_difference_const.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* fold-const.c (fold_comparison): Track sizes and offsets as
	poly_int64s rather than HOST_WIDE_INTs when folding address
	comparisons.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expr.h (get_bit_range): Return the bitstart and bitend as
	poly_uint64s rather than unsigned HOST_WIDE_INTs.  Return the bitpos
	as a poly_int64 rather than a HOST_WIDE_INT.
	* expr.c (get_bit_range): Likewise.
	(expand_assignment): Update call accordingly.
	* fold-const.c (optimize_bit_field_compare): Likewise.

2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_addr_query_type): New enum.
	(aarch64_legitimate_address_p): Use it instead of an rtx code,
	as an optional final parameter.
	* config/aarch64/aarch64.c (aarch64_classify_address): Likewise.
	(aarch64_legitimate_address_p): Likewise.
	(aarch64_print_address_internal): Take an aarch64_addr_query_type
	instead of an rtx code.
	(aarch64_address_valid_for_prefetch_p): Update calls accordingly.
	(aarch64_legitimate_address_hook_p): Likewise.
	(aarch64_print_ldpstp_address): Likewise.
	(aarch64_print_operand_address): Likewise.
	(aarch64_address_cost): Likewise.
	* config/aarch64/constraints.md (Uml, Umq, Ump, Utq): Likewise.
	* config/aarch64/predicates.md (aarch64_mem_pair_operand): Likewise.
	(aarch64_mem_pair_lanes_operand): Likewise.

2017-12-20  Richard Biener  <rguenther@suse.de>

	* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Call
	update_stmt_if_modified.

2017-12-20  Wilco Dijkstra  <wdijkstr@arm.com>

	PR tree-optimization/83491
	* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Check for SSA_NAME
	before walking uses.  Improve coding style and comments.

2017-12-20  Tom de Vries  <tom@codesourcery.com>

	* gimple-fold.c (fold_internal_goacc_dim): Simplify.

2017-12-20  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/83506
	* ipa-fnsummary.c (pass_data_ipa_free_fn_summary): Use 0 for
	todo_flags_finish.
	(pass_ipa_free_fn_summary): Add small_p private data member,
	initialize to false in the ctor.
	(pass_ipa_free_fn_summary::clone,
	pass_ipa_free_fn_summary::set_pass_param,
	pass_ipa_free_fn_summary::gate): New methods.
	(pass_ipa_free_fn_summary::execute): Return TODO_remove_functions
	| TODO_dump_symtab if small_p.
	* passes.def: Add true parm for the existing pass_ipa_free_fn_summary
	entry and add another instance of the pass with false parm after
	ipa-pure-const.
	* ipa-pure-const.c (pass_ipa_pure_const): Don't call
	ipa_free_fn_summary here.

2017-12-20  Paolo Carlini  <paolo.carlini@oracle.com>

	* gimplify.c (gimplify_return_expr): Remove dead error_mark_node check.

2017-12-20  Martin Sebor  <msebor@redhat.com>

	PR testsuite/83131
	* builtins.c (expand_builtin_strlen): Use get_callee_fndecl.
	(expand_builtin_strcmp): Call maybe_warn_nonstring_arg.
	(expand_builtin_strncmp): Same.

2017-12-20  Alexandre Oliva  <aoliva@redhat.com>

	PR bootstrap/83396
	* cfgexpand.c (label_rtx_for_bb): Revert SFN changes that
	allowed debug stmts before labels.
	(expand_gimple_basic_block): Likewise.
	* gimple-iterator.c (gimple_find_edge_insert_loc): Likewise.
	* gimple-iterator.h (gsi_after_labels): Likewise.
	* tree-cfgcleanup (remove_forwarder_block): Likewise, but
	rename reused variable, and simplify using gsi_move_before.
	* tree-ssa-tail-merge.c (find_duplicate): Likewise.
	* tree-cfg.c (make_edges, cleanup_dead_labels): Likewise.
	(gimple_can_merge_blocks_p, verify_gimple_in_cfg): Likewise.
	(gimple_verify_flow_info, gimple_block_label): Likewise.
	(make_blocks): Move debug markers after adjacent labels.
	* cfgrtl.c (skip_insns_after_block): Revert SFN changes that
	allowed debug insns outside blocks.
	* df-scan.c (df_insn_delete): Likewise.
	* lra-constraints.c (update_ebb_live_info): Likewise.
	* var-tracking.c (get_first_insn, vt_emit_notes): Likewise.
	(vt_initialize, delete_vta_debug_insns): Likewise.
	(reemit_marker_as_note): Drop BB parm.  Adjust callers.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* poly-int-types.h (round_down_to_byte_boundary): New macro.
	(round_up_to_byte_boundary): Likewise.
	* expr.h (get_bit_range): Add temporary shim.
	* gimple-ssa-store-merging.c (store_operand_info): Change the
	bitsize, bitpos, bitregion_start and bitregion_end fields from
	unsigned HOST_WIDE_INT to poly_uint64.
	(merged_store_group): Likewise load_align_base.
	(compatible_load_p, compatible_load_p): Update accordingly.
	(imm_store_chain_info::coalesce_immediate_stores): Likewise.
	(split_group, imm_store_chain_info::output_merged_store): Likewise.
	(mem_valid_for_store_merging): Return the bitsize, bitpos,
	bitregion_start and bitregion_end as poly_uint64s rather than
	unsigned HOST_WIDE_INTs.  Track polynomial offsets internally.
	(handled_load): Take the bitsize, bitpos,
	bitregion_start and bitregion_end as poly_uint64s rather than
	unsigned HOST_WIDE_INTs.
	(pass_store_merging::process_store): Update call to
	mem_valid_for_store_merging.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* builtins.c (get_object_alignment_2): Track polynomial offsets
	and sizes.  Update the alignment handling.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree.h (get_inner_reference): Add a version that returns the
	offset and size as poly_int64_pods rather than HOST_WIDE_INTs.
	* cfgexpand.c (expand_debug_expr): Track polynomial offsets.  Simply
	the case in which bitpos is not associated with the first byte.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-affine.h (get_inner_reference_aff): Return the size as a
	poly_widest_int.
	* tree-affine.c (get_inner_reference_aff): Likewise.
	* tree-data-ref.c (dr_may_alias_p): Update accordingly.
	* tree-ssa-loop-im.c (mem_refs_may_alias_p): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* fold-const.c (pointer_may_wrap_p): Take the offset as a
	HOST_WIDE_INT rather than a poly_int64.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gimple-ssa-store-merging.c (symbolic_number::bytepos): Change from
	HOST_WIDE_INT to poly_int64_pod.
	(perform_symbolic_merge): Update accordingly.
	(bswap_replace): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-affine.h (aff_tree::offset): Change from widest_int
	to poly_widest_int.
	(wide_int_ext_for_comb): Delete.
	(aff_combination_const, aff_comb_cannot_overlap_p): Take the
	constants as poly_widest_int rather than widest_int.
	(aff_combination_constant_multiple_p): Return the multiplier
	as a poly_widest_int.
	(aff_combination_zero_p, aff_combination_singleton_var_p): Handle
	polynomial offsets.
	* tree-affine.c (wide_int_ext_for_comb): Make original widest_int
	version static and add an overload for poly_widest_int.
	(aff_combination_const, aff_combination_add_cst)
	(wide_int_constant_multiple_p, aff_comb_cannot_overlap_p): Take
	the constants as poly_widest_int rather than widest_int.
	(tree_to_aff_combination): Generalize INTEGER_CST case to
	poly_int_tree_p.
	(aff_combination_to_tree): Track offsets as poly_widest_ints.
	(aff_combination_add_product, aff_combination_mult): Handle
	polynomial offsets.
	(aff_combination_constant_multiple_p): Return the multiplier
	as a poly_widest_int.
	* tree-predcom.c (determine_offset): Return the offset as a
	poly_widest_int.
	(split_data_refs_to_components, suitable_component_p): Update
	accordingly.
	(valid_initializer_p): Update call to
	aff_combination_constant_multiple_p.
	* tree-ssa-address.c (addr_to_parts): Handle polynomial offsets.
	* tree-ssa-loop-ivopts.c (get_address_cost_ainc): Take the step
	as a poly_int64 rather than a HOST_WIDE_INT.
	(get_address_cost): Handle polynomial offsets.
	(iv_elimination_compare_lt): Likewise.
	(rewrite_use_nonlinear_expr): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-dfa.h (get_addr_base_and_unit_offset_1): Return the offset
	as a poly_int64_pod rather than a HOST_WIDE_INT.
	(get_addr_base_and_unit_offset): Likewise.
	* tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
	(get_addr_base_and_unit_offset): Likewise.
	* doc/match-and-simplify.texi: Change off from HOST_WIDE_INT
	to poly_int64 in example.
	* fold-const.c (fold_binary_loc): Update call to
	get_addr_base_and_unit_offset.
	* gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
	(maybe_canonicalize_mem_ref_addr): Likewise.
	(gimple_fold_stmt_to_constant_1): Likewise.
	* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
	Likewise.
	* ipa-param-manipulation.c (ipa_modify_call_arguments): Likewise.
	* match.pd: Likewise.
	* omp-low.c (lower_omp_target): Likewise.
	* tree-sra.c (build_ref_for_offset): Likewise.
	(build_debug_ref_for_model): Likewise.
	* tree-ssa-address.c (maybe_fold_tmr): Likewise.
	* tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Likewise.
	* tree-ssa-ccp.c (optimize_memcpy): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
	(constant_pointer_difference): Likewise.
	* tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
	* tree-ssa-phiopt.c (jump_function_from_stmt): Likewise.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
	(vn_reference_maybe_forwprop_address, vn_reference_lookup_3): Likewise.
	(set_ssa_val_to): Likewise.
	* tree-ssa-strlen.c (get_addr_stridx, addr_stridxptr)
	(maybe_diag_stxncpy_trunc): Likewise.
	* tree-vrp.c (vrp_prop::check_array_ref): Likewise.
	* tree.c (build_simple_mem_ref_loc): Likewise.
	(array_at_struct_end_p): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-dfa.h (get_ref_base_and_extent): Return the base, size and
	max_size as poly_int64_pods rather than HOST_WIDE_INTs.
	(get_ref_base_and_extent_hwi): Declare.
	* tree-dfa.c (get_ref_base_and_extent): Return the base, size and
	max_size as poly_int64_pods rather than HOST_WIDE_INTs.
	(get_ref_base_and_extent_hwi): New function.
	* cfgexpand.c (expand_debug_expr): Update call to
	get_ref_base_and_extent.
	* dwarf2out.c (add_var_loc_to_decl): Likewise.
	* gimple-fold.c (get_base_constructor): Return the offset as a
	poly_int64_pod rather than a HOST_WIDE_INT.
	(fold_const_aggregate_ref_1): Track polynomial sizes and offsets.
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::set_by_invariant)
	(extr_type_from_vtbl_ptr_store): Track polynomial offsets.
	(ipa_polymorphic_call_context::ipa_polymorphic_call_context)
	(check_stmt_for_type_change): Use get_ref_base_and_extent_hwi
	rather than get_ref_base_and_extent.
	(ipa_polymorphic_call_context::get_dynamic_type): Likewise.
	* ipa-prop.c (ipa_load_from_parm_agg, compute_complex_assign_jump_func)
	(get_ancestor_addr_info, determine_locally_known_aggregate_parts):
	Likewise.
	* ipa-param-manipulation.c (ipa_get_adjustment_candidate): Update
	call to get_ref_base_and_extent.
	* tree-sra.c (create_access, get_access_for_expr): Likewise.
	* tree-ssa-alias.c (ao_ref_base, aliasing_component_refs_p)
	(stmt_kills_ref_p): Likewise.
	* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
	* tree-ssa-scopedtables.c (avail_expr_hash, equal_mem_array_ref_p):
	Likewise.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
	Use get_ref_base_and_extent_hwi rather than get_ref_base_and_extent
	when calling native_encode_expr.
	* tree-ssa-structalias.c (get_constraint_for_component_ref): Update
	call to get_ref_base_and_extent.
	(do_structure_copy): Use get_ref_base_and_extent_hwi rather than
	get_ref_base_and_extent.
	* var-tracking.c (track_expr_p): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* ipa-param-manipulation.h (ipa_parm_adjustment::offset): Change from
	HOST_WIDE_INT to poly_int64_pod.
	* ipa-param-manipulation.c (ipa_modify_call_arguments): Track
	polynomail parameter offsets.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gengtype.c (main): Handle poly_int64_pod.
	* dwarf2out.h (dw_cfi_oprnd_cfa_loc): New dw_cfi_oprnd_type.
	(dw_cfi_oprnd::dw_cfi_cfa_loc): New field.
	(dw_cfa_location::offset, dw_cfa_location::base_offset): Change
	from HOST_WIDE_INT to poly_int64_pod.
	* dwarf2cfi.c (queued_reg_save::cfa_offset): Likewise.
	(copy_cfa): New function.
	(lookup_cfa_1): Use the cached dw_cfi_cfa_loc, if it exists.
	(cfi_oprnd_equal_p): Handle dw_cfi_oprnd_cfa_loc.
	(cfa_equal_p, dwarf2out_frame_debug_adjust_cfa)
	(dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_expr)
	(initial_return_save): Treat offsets as poly_ints.
	(def_cfa_0): Likewise.  Cache the CFA in dw_cfi_cfa_loc if either
	offset is nonconstant.
	(reg_save): Take the offset as a poly_int64.  Fall back to
	DW_CFA_expression for nonconstant offsets.
	(queue_reg_save): Take the offset as a poly_int64.
	* dwarf2out.c (dw_cfi_oprnd2_desc): Handle DW_CFA_def_cfa_expression.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (operand_subword, operand_subword_force): Take the offset
	as a poly_uint64 an unsigned int.
	* emit-rtl.c (operand_subword, operand_subword_force): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/rtl.texi: Update documentation of SUBREG_BYTE.  Document the
	'p' format code.  Use INT_LIST rather than SUBREG as the example of
	a code with an XINT and an XEXP.  Remove the implication that
	accessing an rtx field using XINT is expected to work.
	* rtl.def (SUBREG): Change format from "ei" to "ep".
	* rtl.h (rtunion::rt_subreg): New field.
	(XCSUBREG): New macro.
	(SUBREG_BYTE): Use it.
	(subreg_shape): Change offset from an unsigned int to a poly_uint16.
	Update constructor accordingly.
	(subreg_shape::operator ==): Update accordingly.
	(subreg_shape::unique_id): Return an unsigned HOST_WIDE_INT rather
	than an unsigned int.
	(subreg_lsb, subreg_lowpart_offset, subreg_highpart_offset): Return
	a poly_uint64 rather than an unsigned int.
	(subreg_lsb_1): Likewise.  Take the offset as a poly_uint64 rather
	than an unsigned int.
	(subreg_size_offset_from_lsb, subreg_size_lowpart_offset)
	(subreg_size_highpart_offset): Return a poly_uint64 rather than
	an unsigned int.  Take the sizes as poly_uint64s.
	(subreg_offset_from_lsb): Return a poly_uint64 rather than
	an unsigned int.  Take the shift as a poly_uint64 rather than
	an unsigned int.
	(subreg_regno_offset, subreg_offset_representable_p): Take the offset
	as a poly_uint64 rather than an unsigned int.
	(simplify_subreg_regno): Likewise.
	(byte_lowpart_offset): Return the memory offset as a poly_int64
	rather than an int.
	(subreg_memory_offset): Likewise.  Take the subreg offset as a
	poly_uint64 rather than an unsigned int.
	(simplify_subreg, simplify_gen_subreg, subreg_get_info)
	(gen_rtx_SUBREG, validate_subreg): Take the subreg offset as a
	poly_uint64 rather than an unsigned int.
	* rtl.c (rtx_format): Describe 'p' in comment.
	(copy_rtx, rtx_equal_p_cb, rtx_equal_p): Handle 'p'.
	* emit-rtl.c (validate_subreg, gen_rtx_SUBREG): Take the subreg
	offset as a poly_uint64 rather than an unsigned int.
	(byte_lowpart_offset): Return the memory offset as a poly_int64
	rather than an int.
	(subreg_memory_offset): Likewise.  Take the subreg offset as a
	poly_uint64 rather than an unsigned int.
	(subreg_size_lowpart_offset, subreg_size_highpart_offset): Take the
	mode sizes as poly_uint64s rather than unsigned ints.  Return a
	poly_uint64 rather than an unsigned int.
	(subreg_lowpart_p): Treat subreg offsets as poly_ints.
	(copy_insn_1): Handle 'p'.
	* rtlanal.c (set_noop_p): Treat subregs offsets as poly_uint64s.
	(subreg_lsb_1): Take the subreg offset as a poly_uint64 rather than
	an unsigned int.  Return the shift in the same way.
	(subreg_lsb): Return the shift as a poly_uint64 rather than an
	unsigned int.
	(subreg_size_offset_from_lsb): Take the sizes and shift as
	poly_uint64s rather than unsigned ints.  Return the offset as
	a poly_uint64.
	(subreg_get_info, subreg_regno_offset, subreg_offset_representable_p)
	(simplify_subreg_regno): Take the offset as a poly_uint64 rather than
	an unsigned int.
	* rtlhash.c (add_rtx): Handle 'p'.
	* genemit.c (gen_exp): Likewise.
	* gengenrtl.c (type_from_format, gendef): Likewise.
	* gensupport.c (subst_pattern_match, get_alternatives_number)
	(collect_insn_data, alter_predicate_for_insn, alter_constraints)
	(subst_dup): Likewise.
	* gengtype.c (adjust_field_rtx_def): Likewise.
	* genrecog.c (find_operand, find_matching_operand, validate_pattern)
	(match_pattern_2): Likewise.
	(rtx_test::SUBREG_FIELD): New rtx_test::kind_enum.
	(rtx_test::subreg_field): New function.
	(operator ==, safe_to_hoist_p, transition_parameter_type)
	(print_nonbool_test, print_test): Handle SUBREG_FIELD.
	* genattrtab.c (attr_rtx_1): Say that 'p' is deliberately not handled.
	* genpeep.c (match_rtx): Likewise.
	* print-rtl.c (print_poly_int): Include if GENERATOR_FILE too.
	(rtx_writer::print_rtx_operand): Handle 'p'.
	(print_value): Handle SUBREG.
	* read-rtl.c (apply_int_iterator): Likewise.
	(rtx_reader::read_rtx_operand): Handle 'p'.
	* alias.c (rtx_equal_for_memref_p): Likewise.
	* cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Likewise.
	* caller-save.c (replace_reg_with_saved_mem): Treat subreg offsets
	as poly_ints.
	* calls.c (expand_call): Likewise.
	* combine.c (combine_simplify_rtx, expand_field_assignment): Likewise.
	(make_extraction, gen_lowpart_for_combine): Likewise.
	* loop-invariant.c (hash_invariant_expr_1, invariant_expr_equal_p):
	Likewise.
	* cse.c (remove_invalid_subreg_refs): Take the offset as a poly_uint64
	rather than an unsigned int.  Treat subreg offsets as poly_ints.
	(exp_equiv_p): Handle 'p'.
	(hash_rtx_cb): Likewise.  Treat subreg offsets as poly_ints.
	(equiv_constant, cse_insn): Treat subreg offsets as poly_ints.
	* dse.c (find_shift_sequence): Likewise.
	* dwarf2out.c (rtl_for_decl_location): Likewise.
	* expmed.c (extract_low_bits): Likewise.
	* expr.c (emit_group_store, undefined_operand_subword_p): Likewise.
	(expand_expr_real_2): Likewise.
	* final.c (alter_subreg): Likewise.
	(leaf_renumber_regs_insn): Handle 'p'.
	* function.c (assign_parm_find_stack_rtl, assign_parm_setup_stack):
	Treat subreg offsets as poly_ints.
	* fwprop.c (forward_propagate_and_simplify): Likewise.
	* ifcvt.c (noce_emit_move_insn, noce_emit_cmove): Likewise.
	* ira.c (get_subreg_tracking_sizes): Likewise.
	* ira-conflicts.c (go_through_subreg): Likewise.
	* ira-lives.c (process_single_reg_class_operands): Likewise.
	* jump.c (rtx_renumbered_equal_p): Likewise.  Handle 'p'.
	* lower-subreg.c (simplify_subreg_concatn): Take the subreg offset
	as a poly_uint64 rather than an unsigned int.
	(simplify_gen_subreg_concatn, resolve_simple_move): Treat
	subreg offsets as poly_ints.
	* lra-constraints.c (operands_match_p): Handle 'p'.
	(match_reload, curr_insn_transform): Treat subreg offsets as poly_ints.
	* lra-spills.c (assign_mem_slot): Likewise.
	* postreload.c (move2add_valid_value_p): Likewise.
	* recog.c (general_operand, indirect_operand): Likewise.
	* regcprop.c (copy_value, maybe_mode_change): Likewise.
	(copyprop_hardreg_forward_1): Likewise.
	* reginfo.c (simplifiable_subregs_hasher::hash, simplifiable_subregs)
	(record_subregs_of_mode): Likewise.
	* rtlhooks.c (gen_lowpart_general, gen_lowpart_if_possible): Likewise.
	* reload.c (operands_match_p): Handle 'p'.
	(find_reloads_subreg_address): Treat subreg offsets as poly_ints.
	* reload1.c (alter_reg, choose_reload_regs): Likewise.
	(compute_reload_subreg_offset): Likewise, and return an poly_int64.
	* simplify-rtx.c (simplify_truncation, simplify_binary_operation_1):
	(test_vector_ops_duplicate): Treat subreg offsets as poly_ints.
	(simplify_const_poly_int_tests<N>::run): Likewise.
	(simplify_subreg, simplify_gen_subreg): Take the subreg offset as
	a poly_uint64 rather than an unsigned int.
	* valtrack.c (debug_lowpart_subreg): Likewise.
	* var-tracking.c (var_lowpart): Likewise.
	(loc_cmp): Handle 'p'.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* ira.c (get_subreg_tracking_sizes): New function.
	(init_live_subregs): Take an integer size rather than a register.
	(build_insn_chain): Use get_subreg_tracking_sizes.  Update calls
	to init_live_subregs.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expr.c (store_constructor_field): Change bitsize from a
	unsigned HOST_WIDE_INT to a poly_uint64 and bitpos from a
	HOST_WIDE_INT to a poly_int64.
	(store_constructor): Change size from a HOST_WIDE_INT to
	a poly_int64.
	(store_field): Likewise bitsize and bitpos.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expmed.h (store_bit_field): Change bitregion_start and
	bitregion_end from unsigned HOST_WIDE_INT to poly_uint64.
	* expmed.c (adjust_bit_field_mem_for_reg, strict_volatile_bitfield_p)
	(store_bit_field_1, store_integral_bit_field, store_bit_field)
	(store_fixed_bit_field, store_split_bit_field): Likewise.
	* expr.c (store_constructor_field, store_field): Likewise.
	(optimize_bitfield_assignment_op): Likewise.  Make the same change
	to bitsize and bitpos.
	* machmode.h (bit_field_mode_iterator): Change m_bitregion_start
	and m_bitregion_end from HOST_WIDE_INT to poly_int64.  Make the
	same change in the constructor arguments.
	(get_best_mode): Change bitregion_start and bitregion_end from
	unsigned HOST_WIDE_INT to poly_uint64.
	* stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
	Change bitregion_start and bitregion_end from HOST_WIDE_INT to
	poly_int64.
	(bit_field_mode_iterator::next_mode): Update for new types
	of m_bitregion_start and m_bitregion_end.
	(get_best_mode): Change bitregion_start and bitregion_end from
	unsigned HOST_WIDE_INT to poly_uint64.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (simplify_gen_subreg): Add a temporary overload that
	accepts poly_uint64 offsets.
	* expmed.h (extract_bit_field): Take bitsize and bitnum as
	poly_uint64s rather than unsigned HOST_WIDE_INTs.
	* expmed.c (lowpart_bit_field_p): Likewise.
	(extract_bit_field_as_subreg): New function, split out from...
	(extract_bit_field_1): ...here.  Take bitsize and bitnum as
	poly_uint64s rather than unsigned HOST_WIDE_INTs.  For vector
	extractions, check that BITSIZE matches the size of the extracted
	value and that BITNUM is an exact multiple of that size.
	If all else fails, try forcing the value into memory if
	BITNUM is variable, and adjusting the address so that the
	offset is constant.  Split the part that can only handle constant
	bitsize and bitnum out into...
	(extract_integral_bit_field): ...this new function.
	(extract_bit_field): Take bitsize and bitnum as poly_uint64s
	rather than unsigned HOST_WIDE_INTs.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expmed.h (store_bit_field): Take bitsize and bitnum as
	poly_uint64s rather than unsigned HOST_WIDE_INTs.
	* expmed.c (simple_mem_bitfield_p): Likewise.  Add a parameter
	that returns the byte size.
	(store_bit_field_1): Take bitsize and bitnum as
	poly_uint64s rather than unsigned HOST_WIDE_INTs.  Update call
	to simple_mem_bitfield_p.  Split the part that can only handle
	constant bitsize and bitnum out into...
	(store_integral_bit_field): ...this new function.
	(store_bit_field): Take bitsize and bitnum as poly_uint64s rather
	than unsigned HOST_WIDE_INTs.
	(extract_bit_field_1): Update call to simple_mem_bitfield_p.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* lra-int.h (lra_reg): Change offset from int to poly_int64.
	(lra_insn_recog_data): Change sp_offset from HOST_WIDE_INT
	to poly_int64.
	(lra_eliminate_regs_1, eliminate_regs_in_insn): Change
	update_sp_offset from a HOST_WIDE_INT to a poly_int64.
	(lra_update_reg_val_offset, lra_reg_val_equal_p): Take the
	offset as a poly_int64 rather than an int.
	* lra-assigns.c (find_hard_regno_for_1): Handle poly_int64 offsets.
	(setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
	* lra-constraints.c (equiv_address_substitution): Track offsets
	as poly_int64s.
	(emit_inc): Check poly_int_rtx_p instead of CONST_INT_P.
	(curr_insn_transform): Handle the new form of sp_offset.
	* lra-eliminations.c (lra_elim_table): Change previous_offset
	and offset from HOST_WIDE_INT to poly_int64.
	(print_elim_table, update_reg_eliminate): Update accordingly.
	(self_elim_offsets): Change from HOST_WIDE_INT to poly_int64_pod.
	(get_elimination): Update accordingly.
	(form_sum): Check poly_int_rtx_p instead of CONST_INT_P.
	(lra_eliminate_regs_1, eliminate_regs_in_insn): Change
	update_sp_offset from a HOST_WIDE_INT to a poly_int64.  Handle
	poly_int64 offsets generally.
	(curr_sp_change): Change from HOST_WIDE_INT to poly_int64.
	(mark_not_eliminable, init_elimination): Update accordingly.
	(remove_reg_equal_offset_note): Return a bool and pass the new
	offset back by pointer as a poly_int64.
	* lra-remat.c (change_sp_offset): Take sp_offset as a poly_int64
	rather than a HOST_WIDE_INT.
	(do_remat): Track offsets poly_int64s.
	* lra.c (lra_update_insn_recog_data, setup_sp_offset): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (mem_attrs): Add a default constructor.  Change size and
	offset from HOST_WIDE_INT to poly_int64.
	* emit-rtl.h (set_mem_offset, set_mem_size, adjust_address_1)
	(adjust_automodify_address_1, set_mem_attributes_minus_bitpos)
	(widen_memory_access): Take the sizes and offsets as poly_int64s
	rather than HOST_WIDE_INTs.
	* alias.c (ao_ref_from_mem): Handle the new form of MEM_OFFSET.
	(offset_overlap_p): Take poly_int64s rather than HOST_WIDE_INTs
	and ints.
	(adjust_offset_for_component_ref): Change the offset from a
	HOST_WIDE_INT to a poly_int64.
	(nonoverlapping_memrefs_p): Track polynomial offsets and sizes.
	* cfgcleanup.c (merge_memattrs): Update after mem_attrs changes.
	* dce.c (find_call_stack_args): Likewise.
	* dse.c (record_store): Likewise.
	* dwarf2out.c (tls_mem_loc_descriptor, dw_sra_loc_expr): Likewise.
	* print-rtl.c (rtx_writer::print_rtx): Likewise.
	* read-rtl-function.c (test_loading_mem): Likewise.
	* rtlanal.c (may_trap_p_1): Likewise.
	* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
	* var-tracking.c (int_mem_offset, track_expr_p): Likewise.
	* emit-rtl.c (mem_attrs_eq_p, get_mem_align_offset): Likewise.
	(mem_attrs::mem_attrs): New function.
	(set_mem_attributes_minus_bitpos): Change bitpos from a
	HOST_WIDE_INT to poly_int64.
	(set_mem_alias_set, set_mem_addr_space, set_mem_align, set_mem_expr)
	(clear_mem_offset, clear_mem_size, change_address)
	(get_spill_slot_decl, set_mem_attrs_for_spill): Directly
	initialize mem_attrs.
	(set_mem_offset, set_mem_size, adjust_address_1)
	(adjust_automodify_address_1, offset_address, widen_memory_access):
	Likewise.  Take poly_int64s rather than HOST_WIDE_INT.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtlanal.c (rtx_addr_can_trap_p_1): Take the offset and size
	as poly_int64s rather than HOST_WIDE_INTs.  Use a size of -1
	rather than 0 to represent an unknown size.  Assert that the size
	is known when the mode isn't BLKmode.
	(may_trap_p_1): Use -1 for unknown sizes.
	(rtx_addr_can_trap_p): Likewise.  Pass BLKmode rather than VOIDmode.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* dse.c (store_info): Change offset and width from HOST_WIDE_INT
	to poly_int64.  Update commentary for positions_needed.large.
	(read_info_type): Change offset and width from HOST_WIDE_INT
	to poly_int64.
	(set_usage_bits): Likewise.
	(canon_address): Return the offset as a poly_int64 rather than
	a HOST_WIDE_INT.  Use strip_offset_and_add.
	(set_all_positions_unneeded, any_positions_needed_p): Use
	positions_needed.large to track stores with non-constant widths.
	(all_positions_needed_p): Likewise.  Take the offset and width
	as poly_int64s rather than ints.  Assert that rhs is nonnull.
	(record_store): Cope with non-constant offsets and widths.
	Nullify the rhs of an earlier store if we can't tell which bytes
	of it are needed.
	(find_shift_sequence): Take the access_size and shift as poly_int64s
	rather than ints.
	(get_stored_val): Take the read_offset and read_width as poly_int64s
	rather than HOST_WIDE_INTs.
	(check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Handle
	non-constant offsets and widths.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* inchash.h (inchash::hash::add_poly_int): New function.
	* tree-ssa-alias.h (ao_ref::offset, ao_ref::size, ao_ref::max_size):
	Use poly_int64 rather than HOST_WIDE_INT.
	(ao_ref::max_size_known_p): New function.
	* tree-ssa-sccvn.h (vn_reference_op_struct::off): Use poly_int64_pod
	rather than HOST_WIDE_INT.
	* tree-ssa-alias.c (ao_ref_base): Apply get_ref_base_and_extent
	to temporaries until its interface is adjusted to match.
	(ao_ref_init_from_ptr_and_size): Handle polynomial offsets and sizes.
	(aliasing_component_refs_p, decl_refs_may_alias_p)
	(indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p): Take
	the offsets and max_sizes as poly_int64s instead of HOST_WIDE_INTs.
	(refs_may_alias_p_1, stmt_kills_ref_p): Adjust for changes to
	ao_ref fields.
	* alias.c (ao_ref_from_mem): Likewise.
	* tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
	* tree-ssa-dse.c (valid_ao_ref_for_dse, normalize_ref)
	(clear_bytes_written_by, setup_live_bytes_from_ref, compute_trims)
	(maybe_trim_complex_store, maybe_trim_constructor_store)
	(live_bytes_read, dse_classify_store): Likewise.
	* tree-ssa-sccvn.c (vn_reference_compute_hash, vn_reference_eq):
	(copy_reference_ops_from_ref, ao_ref_init_from_vn_reference)
	(fully_constant_vn_reference_p, valueize_refs_1): Likewise.
	(vn_reference_lookup_3): Likewise.
	* tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p)
	(indirect_refs_may_alias_p): Use ranges_may_overlap_p
	instead of ranges_overlap_p.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssa-alias.c (same_addr_size_stores_p): Take the offsets and
	sizes as poly_int64s rather than HOST_WIDE_INTs.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* gimple-fold.h (fold_ctor_reference): Take the offset and size
	as poly_uint64 rather than unsigned HOST_WIDE_INT.
	* gimple-fold.c (fold_ctor_reference): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* target.def (dwarf_poly_indeterminate_value): New hook.
	* targhooks.h (default_dwarf_poly_indeterminate_value): Declare.
	* targhooks.c (default_dwarf_poly_indeterminate_value): New function.
	* doc/tm.texi.in (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Document.
	* doc/tm.texi: Regenerate.
	* dwarf2out.h (build_cfa_loc, build_cfa_aligned_loc): Take the
	offset as a poly_int64.
	* dwarf2out.c (new_reg_loc_descr): Move later in file.  Take the
	offset as a poly_int64.
	(loc_descr_plus_const, loc_list_plus_const, build_cfa_aligned_loc):
	Take the offset as a poly_int64.
	(build_cfa_loc): Likewise.  Use loc_descr_plus_const.
	(frame_pointer_fb_offset): Change to a poly_int64.
	(int_loc_descriptor): Take the offset as a poly_int64.  Use
	targetm.dwarf_poly_indeterminate_value for polynomial offsets.
	(based_loc_descr): Take the offset as a poly_int64.
	Use strip_offset_and_add to handle (plus X (const)).
	Use new_reg_loc_descr instead of an open-coded version of the
	previous implementation.
	(mem_loc_descriptor): Handle CONST_POLY_INT.
	(compute_frame_pointer_to_fb_displacement): Take the offset as a
	poly_int64.  Use strip_offset_and_add to handle (plus X (const)).

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (reg_attrs::offset): Change from HOST_WIDE_INT to poly_int64.
	(gen_rtx_REG_offset): Take the offset as a poly_int64.
	* inchash.h (inchash::hash::add_poly_hwi): New function.
	* gengtype.c (main): Register poly_int64.
	* emit-rtl.c (reg_attr_hasher::hash): Use inchash.  Treat the
	offset as a poly_int.
	(reg_attr_hasher::equal): Use must_eq to compare offsets.
	(get_reg_attrs, update_reg_offset, gen_rtx_REG_offset): Take the
	offset as a poly_int64.
	(set_reg_attrs_from_value): Treat the offset as a poly_int64.
	* print-rtl.c (print_poly_int): New function.
	(rtx_writer::print_rtx_operand_code_r): Treat REG_OFFSET as
	a poly_int.
	* var-tracking.c (track_offset_p, get_tracked_reg_offset): New
	functions.
	(var_reg_set, var_reg_delete_and_set, var_reg_delete): Use them.
	(same_variable_part_p, track_loc_p): Take the offset as a poly_int64.
	(vt_get_decl_and_offset): Return the offset as a poly_int64.
	Enforce track_offset_p for parts of a PARALLEL.
	(vt_add_function_parameter): Use const_offset for the final
	offset to track.  Use get_tracked_reg_offset for the parts
	of a PARALLEL.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* target.def (truly_noop_truncation): Take poly_uint64s instead of
	unsigned ints.  Change default to hook_bool_puint64_puint64_true.
	* doc/tm.texi: Regenerate.
	* hooks.h (hook_bool_uint_uint_true): Delete.
	(hook_bool_puint64_puint64_true): Declare.
	* hooks.c (hook_bool_uint_uint_true): Delete.
	(hook_bool_puint64_puint64_true): New function.
	* config/mips/mips.c (mips_truly_noop_truncation): Take poly_uint64s
	instead of unsigned ints.
	* config/spu/spu.c (spu_truly_noop_truncation): Likewise.
	* config/tilegx/tilegx.c (tilegx_truly_noop_truncation): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* optabs.h (expand_operand): Add an int_value field.
	(create_expand_operand): Add an int_value parameter and use it
	to initialize the new expand_operand field.
	(create_integer_operand): Replace with a declaration of a function
	that accepts poly_int64s.  Move the implementation to...
	* optabs.c (create_integer_operand): ...here.
	(maybe_legitimize_operand): For EXPAND_INTEGER, check whether
	the mode preserves the value of int_value, instead of calling
	const_int_operand on the rtx.  Use gen_int_mode to generate
	the new rtx.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* dumpfile.h (dump_dec): Declare.
	* dumpfile.c (dump_dec): New function.
	* pretty-print.h (pp_wide_integer): Turn into a function and
	declare a poly_int version.
	* pretty-print.c (pp_wide_integer): New function for poly_ints.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/generic.texi (POLY_INT_CST): Document.
	* tree.def (POLY_INT_CST): New tree code.
	* treestruct.def (TS_POLY_INT_CST): New tree layout.
	* tree-core.h (tree_poly_int_cst): New struct.
	(tree_node): Add a poly_int_cst field.
	* tree.h (POLY_INT_CST_P, POLY_INT_CST_COEFF): New macros.
	(wide_int_to_tree, force_fit_type): Take a poly_wide_int_ref
	instead of a wide_int_ref.
	(build_int_cst, build_int_cst_type): Take a poly_int64 instead
	of a HOST_WIDE_INT.
	(build_int_cstu, build_array_type_nelts): Take a poly_uint64
	instead of an unsigned HOST_WIDE_INT.
	(build_poly_int_cst, tree_fits_poly_int64_p, tree_fits_poly_uint64_p)
	(ptrdiff_tree_p): Declare.
	(tree_to_poly_int64, tree_to_poly_uint64): Likewise.  Provide
	extern inline implementations if the target doesn't use POLY_INT_CST.
	(poly_int_tree_p): New function.
	(wi::unextended_tree): New class.
	(wi::int_traits <unextended_tree>): New override.
	(wi::extended_tree): Add a default constructor.
	(wi::extended_tree::get_tree): New function.
	(wi::widest_extended_tree, wi::offset_extended_tree): New typedefs.
	(wi::tree_to_widest_ref, wi::tree_to_offset_ref): Use them.
	(wi::tree_to_poly_widest_ref, wi::tree_to_poly_offset_ref)
	(wi::tree_to_poly_wide_ref): New typedefs.
	(wi::ints_for): Provide overloads for extended_tree and
	unextended_tree.
	(poly_int_cst_value, wi::to_poly_widest, wi::to_poly_offset)
	(wi::to_wide): New functions.
	(wi::fits_to_boolean_p, wi::fits_to_tree_p): Handle poly_ints.
	* tree.c (poly_int_cst_hasher): New struct.
	(poly_int_cst_hash_table): New variable.
	(tree_node_structure_for_code, tree_code_size, simple_cst_equal)
	(valid_constant_size_p, add_expr, drop_tree_overflow): Handle
	POLY_INT_CST.
	(initialize_tree_contains_struct): Handle TS_POLY_INT_CST.
	(init_ttree): Initialize poly_int_cst_hash_table.
	(build_int_cst, build_int_cst_type, build_invariant_address): Take
	a poly_int64 instead of a HOST_WIDE_INT.
	(build_int_cstu, build_array_type_nelts): Take a poly_uint64
	instead of an unsigned HOST_WIDE_INT.
	(wide_int_to_tree): Rename to...
	(wide_int_to_tree_1): ...this.
	(build_new_poly_int_cst, build_poly_int_cst): New functions.
	(force_fit_type): Take a poly_wide_int_ref instead of a wide_int_ref.
	(wide_int_to_tree): New function that takes a poly_wide_int_ref.
	(ptrdiff_tree_p, tree_to_poly_int64, tree_to_poly_uint64)
	(tree_fits_poly_int64_p, tree_fits_poly_uint64_p): New functions.
	* lto-streamer-out.c (DFS::DFS_write_tree_body, hash_tree): Handle
	TS_POLY_INT_CST.
	* tree-streamer-in.c (lto_input_ts_poly_tree_pointers): Likewise.
	(streamer_read_tree_body): Likewise.
	* tree-streamer-out.c (write_ts_poly_tree_pointers): Likewise.
	(streamer_write_tree_body): Likewise.
	* tree-streamer.c (streamer_check_handled_ts_structures): Likewise.
	* asan.c (asan_protect_global): Require the size to be an INTEGER_CST.
	* cfgexpand.c (expand_debug_expr): Handle POLY_INT_CST.
	* expr.c (expand_expr_real_1, const_vector_from_tree): Likewise.
	* gimple-expr.h (is_gimple_constant): Likewise.
	* gimplify.c (maybe_with_size_expr): Likewise.
	* print-tree.c (print_node): Likewise.
	* tree-data-ref.c (data_ref_compare_tree): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-address.c (addr_for_mem_ref): Likewise.
	* tree-vect-data-refs.c (dr_group_sort_cmp): Likewise.
	* tree-vrp.c (compare_values_warnv): Likewise.
	* tree-ssa-loop-ivopts.c (determine_base_object, constant_multiple_of)
	(get_loop_invariant_expr, add_candidate_1, get_computation_aff_1)
	(force_expr_to_var_cost): Likewise.
	* tree-ssa-loop.c (for_each_index): Likewise.
	* fold-const.h (build_invariant_address, size_int_kind): Take a
	poly_int64 instead of a HOST_WIDE_INT.
	* fold-const.c (fold_negate_expr_1, const_binop, const_unop)
	(fold_convert_const, multiple_of_p, fold_negate_const): Handle
	POLY_INT_CST.
	(size_binop_loc): Likewise.  Allow int_const_binop_1 to fail.
	(int_const_binop_2): New function, split out from...
	(int_const_binop_1): ...here.  Handle POLY_INT_CST.
	(size_int_kind): Take a poly_int64 instead of a HOST_WIDE_INT.
	* expmed.c (make_tree): Handle CONST_POLY_INT_P.
	* gimple-ssa-strength-reduction.c (slsr_process_add)
	(slsr_process_mul): Check for INTEGER_CSTs before using them
	as candidates.
	* stor-layout.c (bits_from_bytes): New function.
	(bit_from_pos): Use it.
	(layout_type): Likewise.  For vectors, multiply the TYPE_SIZE_UNIT
	by BITS_PER_UNIT to get the TYPE_SIZE.
	* tree-cfg.c (verify_expr, verify_types_in_gimple_reference): Allow
	MEM_REF and TARGET_MEM_REF offsets to be a POLY_INT_CST.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/rtl.texi (const_poly_int): Document.  Also document the
	rtl sharing behavior.
	* gengenrtl.c (excluded_rtx): Return true for CONST_POLY_INT.
	* rtl.h (const_poly_int_def): New struct.
	(rtx_def::u): Add a cpi field.
	(CASE_CONST_UNIQUE, CASE_CONST_ANY): Add CONST_POLY_INT.
	(CONST_POLY_INT_P, CONST_POLY_INT_COEFFS): New macros.
	(wi::rtx_to_poly_wide_ref): New typedef
	(const_poly_int_value, wi::to_poly_wide, rtx_to_poly_int64)
	(poly_int_rtx_p): New functions.
	(trunc_int_for_mode): Declare a poly_int64 version.
	(plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
	(immed_wide_int_const): Take a poly_wide_int_ref rather than
	a wide_int_ref.
	(strip_offset): Declare.
	(strip_offset_and_add): New function.
	* rtl.def (CONST_POLY_INT): New rtx code.
	* rtl.c (rtx_size): Handle CONST_POLY_INT.
	(shared_const_p): Use poly_int_rtx_p.
	* emit-rtl.h (gen_int_mode): Take a poly_int64 instead of a
	HOST_WIDE_INT.
	(gen_int_shift_amount): Likewise.
	* emit-rtl.c (const_poly_int_hasher): New class.
	(const_poly_int_htab): New variable.
	(init_emit_once): Initialize it when NUM_POLY_INT_COEFFS > 1.
	(const_poly_int_hasher::hash): New function.
	(const_poly_int_hasher::equal): Likewise.
	(gen_int_mode): Take a poly_int64 instead of a HOST_WIDE_INT.
	(immed_wide_int_const): Rename to...
	(immed_wide_int_const_1): ...this and make static.
	(immed_wide_int_const): New function, taking a poly_wide_int_ref
	instead of a wide_int_ref.
	(gen_int_shift_amount): Take a poly_int64 instead of a HOST_WIDE_INT.
	(gen_lowpart_common): Handle CONST_POLY_INT.
	* cse.c (hash_rtx_cb, equiv_constant): Likewise.
	* cselib.c (cselib_hash_rtx): Likewise.
	* dwarf2out.c (const_ok_for_output_1): Likewise.
	* expr.c (convert_modes): Likewise.
	* print-rtl.c (rtx_writer::print_rtx, print_value): Likewise.
	* rtlhash.c (add_rtx): Likewise.
	* explow.c (trunc_int_for_mode): Add a poly_int64 version.
	(plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
	Handle existing CONST_POLY_INT rtxes.
	* expmed.h (expand_shift): Take a poly_int64 instead of a
	HOST_WIDE_INT.
	* expmed.c (expand_shift): Likewise.
	* rtlanal.c (strip_offset): New function.
	(commutative_operand_precedence): Give CONST_POLY_INT the same
	precedence as CONST_DOUBLE and put CONST_WIDE_INT between that
	and CONST_INT.
	* rtl-tests.c (const_poly_int_tests): New struct.
	(rtl_tests_c_tests): Use it.
	* simplify-rtx.c (simplify_const_unary_operation): Handle
	CONST_POLY_INT.
	(simplify_const_binary_operation): Likewise.
	(simplify_binary_operation_1): Fold additions of symbolic constants
	and CONST_POLY_INTs.
	(simplify_subreg): Handle extensions and truncations of
	CONST_POLY_INTs.
	(simplify_const_poly_int_tests): New struct.
	(simplify_rtx_c_tests): Use it.
	* wide-int.h (storage_ref): Add default constructor.
	(wide_int_ref_storage): Likewise.
	(trailing_wide_ints): Use GTY((user)).
	(trailing_wide_ints::operator[]): Add a const version.
	(trailing_wide_ints::get_precision): New function.
	(trailing_wide_ints::extra_size): Likewise.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* emit-rtl.h (gen_int_shift_amount): Declare.
	* emit-rtl.c (gen_int_shift_amount): New function.
	* asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
	instead of GEN_INT.
	* calls.c (shift_return_value): Likewise.
	* cse.c (fold_rtx): Likewise.
	* dse.c (find_shift_sequence): Likewise.
	* expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
	(expand_shift, expand_smod_pow2): Likewise.
	* lower-subreg.c (shift_cost): Likewise.
	* optabs.c (expand_superword_shift, expand_doubleword_mult)
	(expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
	(expand_vec_perm_var): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_binary_operation_1): Likewise.
	* combine.c (try_combine, find_split_point, force_int_to_mode)
	(simplify_shift_const_1, simplify_shift_const): Likewise.
	(change_zero_ext): Likewise.  Use simplify_gen_binary.

2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>

	* poly-int.h (multiple_p): Fix handling of two non-poly_ints.

2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* doc/invoke.texi (ARM Options): Document accepted extension options
	for -march=armv8.3-a.

2017-12-20  Richard Earnshaw  <rearnsha@arm.com>

	PR target/83105
	* config.gcc (arm*-*-linux*): When configured with --with-float=hard
	or --with-float=softfp, set the default CPU to arm10e.

2017-12-20  Eric Botcazou  <ebotcazou@adacore.com>

	* config/visium/constraints.md (J, K, L): Use IN_RANGE macro.
	* config/visium/predicates.md (const_shift_operand): Likewise.
	* config/visium/visium.c (visium_legitimize_address): Fix oversight.
	(visium_legitimize_reload_address): Likewise.

2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/82975
	* config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.

2017-12-20  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83490
	* calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments.

2017-12-20  Julia Koval  <julia.koval@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET,
	OPTION_MASK_ISA_VPCLMULQDQ_UNSET): New.
	(ix86_handle_option): Handle -mvpclmulqdq, move cx6 to flags2.
	* config.gcc: Include vpclmulqdqintrin.h.
	* config/i386/cpuid.h: Handle bit_VPCLMULQDQ.
	* config/i386/driver-i386.c (host_detect_local_cpu): Handle
	-mvpclmulqdq.
	* config/i386/i386-builtin.def (__builtin_ia32_vpclmulqdq_v2di,
	__builtin_ia32_vpclmulqdq_v4di, __builtin_ia32_vpclmulqdq_v8di): New.
	* config/i386/i386-c.c (__VPCLMULQDQ__): New.
	* config/i386/i386.c (isa2_opts): Add -mcx16.
	(isa_opts): Add -mpclmulqdq, remove -mcx16.
	(ix86_option_override_internal): Move mcx16 to flags2.
	(ix86_valid_target_attribute_inner_p): Add vpclmulqdq.
	(ix86_expand_builtin): Handle OPTION_MASK_ISA_VPCLMULQDQ.
	* config/i386/i386.h (TARGET_VPCLMULQDQ, TARGET_VPCLMULQDQ_P): New.
	* config/i386/i386.opt: Add mvpclmulqdq, move mcx16 to flags2.
	* config/i386/immintrin.h: Include vpclmulqdqintrin.h.
	* config/i386/sse.md (vpclmulqdq_<mode>): New pattern.
	* config/i386/vpclmulqdqintrin.h (_mm512_clmulepi64_epi128,
	_mm_clmulepi64_epi128, _mm256_clmulepi64_epi128): New intrinsics.
	* doc/invoke.texi: Add -mvpclmulqdq.

2017-12-20  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/83423
	* config/i386/i386.c (ix86_static_chain): Move
	DECL_STATIC_CHAIN test ...
	* calls.c (rtx_for_static_chain): ... here.  New function.
	* calls.h (rtx_for_static_chain): Declare.
	* builtins.c (expand_builtin_setjmp_receiver): Use rtx_for_static_chain
	instead of targetm.calls.static_chain.
	* df-scan.c (df_get_entry_block_def_set): Same.

2017-12-19  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/83493
	* graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
	and lb.

2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	* gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
	inform with hardcoded english plural handling.

2017-12-18  Jeff Law  <law@redhat.com>

	PR tree-optimization/83477
	* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis): For
	a non-virtual PHI, always push a new range.

2017-12-19  Martin Sebor  <msebor@redhat.com>

	PR middle-end/77608
	* builtins.c (compute_objsize): Handle non-constant offsets.

2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83444
	* tree-ssa-strlen.c (strlen_check_and_optimize_stmt): For the
	character load case, if get_stridx on MEM_REF's operand doesn't
	look usable, retry with get_addr_stridx.

2017-12-19  Alexandre Oliva  <aoliva@redhat.com>

	PR debug/83422
	* var-tracking.c (vt_debug_insns_local): Do not drop markers.
	(variable_tracking_main_1): Keep markers even when VTA fails.

	PR bootstrap/83396
	* cfgexpand.c (expand_gimple_basic_block): Expand label first,
	even if there are markers before it.
	* cfgrtl.c (rtl_verify_bb_layout): Reject DEBUG_INSNs outside BBs.

2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	* read-rtl.c (parse_reg_note_name): Replace Yoda conditions with
	typical order conditions.
	* sel-sched.c (extract_new_fences_from): Likewise.
	* config/visium/constraints.md (J, K, L): Likewise.
	* config/visium/predicates.md (const_shift_operand): Likewise.
	* config/visium/visium.c (visium_legitimize_address,
	visium_legitimize_reload_address): Likewise.
	* config/m68k/m68k.c (output_reg_adjust, emit_reg_adjust): Likewise.
	* config/arm/arm.c (arm_block_move_unaligned_straight): Likewise.
	* config/avr/constraints.md (Y01, Ym1, Y02, Ym2): Likewise.
	* config/avr/avr-log.c (avr_vdump, avr_log_set_avr_log,
	SET_DUMP_DETAIL): Likewise.
	* config/avr/predicates.md (const_8_16_24_operand): Likewise.
	* config/avr/avr.c (STR_PREFIX_P, avr_popcount_each_byte,
	avr_is_casesi_sequence, avr_casei_sequence_check_operands,
	avr_set_core_architecture, avr_set_current_function,
	avr_legitimize_reload_address, avr_asm_len, avr_print_operand,
	output_movqi, output_movsisf, avr_out_plus, avr_out_bitop,
	avr_out_fract, avr_adjust_insn_length, avr_encode_section_info,
	avr_2word_insn_p, output_reload_in_const, avr_has_nibble_0xf,
	avr_map_decompose, avr_fold_builtin): Likewise.
	* config/avr/driver-avr.c (avr_devicespecs_file): Likewise.
	* config/avr/gen-avr-mmcu-specs.c (str_prefix_p, print_mcu): Likewise.
	* config/i386/i386.c (ix86_parse_stringop_strategy_string): Likewise.
	* config/m32c/m32c-pragma.c (m32c_pragma_memregs): Likewise.
	* config/m32c/m32c.c (m32c_conditional_register_usage,
	m32c_address_cost): Likewise.
	* config/m32c/predicates.md (shiftcount_operand,
	longshiftcount_operand): Likewise.
	* config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise.
	* config/nios2/nios2.c (nios2_handle_custom_fpu_insn_option,
	can_use_cdx_ldstw): Likewise.
	* config/nios2/nios2.h (CDX_REG_P): Likewise.
	* config/cr16/cr16.h (RETURN_ADDR_RTX, REGNO_MODE_OK_FOR_BASE_P):
	Likewise.
	* config/cr16/cr16.md (*mov<mode>_double): Likewise.
	* config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
	* config/h8300/h8300.c (h8300_rtx_costs, get_shift_alg): Likewise.
	* config/vax/constraints.md (U06, U08, U16, CN6, S08, S16): Likewise.
	* config/vax/vax.c (adjacent_operands_p): Likewise.
	* config/ft32/constraints.md (L, b, KA): Likewise.
	* config/ft32/ft32.c (ft32_load_immediate, ft32_expand_prologue):
	Likewise.
	* cfgexpand.c (expand_stack_alignment): Likewise.
	* gcse.c (insert_expr_in_table): Likewise.
	* print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Likewise.
	* cgraphunit.c (cgraph_node::expand): Likewise.
	* ira-build.c (setup_min_max_allocno_live_range_point): Likewise.
	* emit-rtl.c (add_insn): Likewise.
	* input.c (dump_location_info): Likewise.
	* passes.c (NEXT_PASS): Likewise.
	* read-rtl-function.c (parse_note_insn_name,
	function_reader::read_rtx_operand_r, function_reader::parse_mem_expr):
	Likewise.
	* sched-rgn.c (sched_rgn_init): Likewise.
	* diagnostic-show-locus.c (layout::show_ruler): Likewise.
	* combine.c (find_split_point, simplify_if_then_else, force_to_mode,
	if_then_else_cond, simplify_shift_const_1, simplify_comparison):
	Likewise.
	* explow.c (eliminate_constant_term): Likewise.
	* final.c (leaf_renumber_regs_insn): Likewise.
	* cfgrtl.c (print_rtl_with_bb): Likewise.
	* genhooks.c (emit_init_macros): Likewise.
	* poly-int.h (maybe_ne, maybe_le, maybe_lt): Likewise.
	* tree-data-ref.c (conflict_fn): Likewise.
	* selftest.c (assert_streq): Likewise.
	* expr.c (store_constructor_field, expand_expr_real_1): Likewise.
	* fold-const.c (fold_range_test, extract_muldiv_1, fold_truth_andor,
	fold_binary_loc, multiple_of_p): Likewise.
	* reload.c (push_reload, find_equiv_reg): Likewise.
	* et-forest.c (et_nca, et_below): Likewise.
	* dbxout.c (dbxout_symbol_location): Likewise.
	* reorg.c (relax_delay_slots): Likewise.
	* dojump.c (do_compare_rtx_and_jump): Likewise.
	* gengtype-parse.c (type): Likewise.
	* simplify-rtx.c (simplify_gen_ternary, simplify_gen_relational,
	simplify_const_relational_operation): Likewise.
	* reload1.c (do_output_reload): Likewise.
	* dumpfile.c (get_dump_file_info_by_switch): Likewise.
	* gengtype.c (type_for_name): Likewise.
	* gimple-ssa-sprintf.c (format_directive): Likewise.

2017-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/82975
	* config/arm/arm.h (TEST_REGNO): Check reg_renumber is set before
	accessing it.  Adjust comment.

2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/81914
	* predict.c (zero_one_minusone): New function.
	(apply_return_prediction): Avoid return prediction for functions
	returning only -1, 0 and 1 values, unless they only return -1 and 0
	or 0 and 1.

2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (legitimate_scaled_address_p): Clean
	fall-through warning.
	(arc_compute_frame_size): Remove unused variables.
	(arc_print_operand): Fix fprintif format.
	(arc_can_follow_jump): Clean fall-through warning.

2017-12-19  Marek Polacek  <polacek@redhat.com>

	PR c++/83489
	* config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
	on an error node.

2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (overriderregs): New variable.
	(arc_override_options): Track fixed/call saved/call options.
	(arc_conditional_register_usage): Check against overrideregs
	variable whenever we change register properties.

2017-12-19  Nathan Sidwell  <nathan@acm.org>

	* opts.c (finish_options): Don't prefix dump_base_name if it
	already contains directories.

2017-12-19  Martin Liska  <mliska@suse.cz>

	PR rtl-optimization/82675
	* loop-unroll.c (unroll_loop_constant_iterations): Allocate one
	more element in sbitmap.

2017-12-19  Paolo Carlini  <paolo.carlini@oracle.com>

	* gimplify.c (gimplify_expr): Use error_operand_p.

2017-12-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	PR target/83387
	* config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float
	multilib.

2017-12-19  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
	the jump is to a label.

2017-12-19  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83444
	* tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Optimize
	character loads.

	PR ipa/82801
	PR ipa/83346
	* ipa-inline.c (flatten_remove_node_hook): New function.
	(ipa_inline): Keep only nodes with flatten attribute at the end of
	the array in the order from ipa_reverse_postorder, only walk that
	portion of array for flattening, if there is more than one such
	node, temporarily register a removal hook and ignore removed nodes.

	PR tree-optimization/80631
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Compare
	induc_code against MAX_EXPR or MIN_EXPR instead of reduc_fn against
	IFN_REDUC_MAX or IFN_REDUC_MIN.

2017-12-18  Jeff Law  <law@redhat.com>

	* tree-ssa-dom.c (record_equivalences_from_phis): Do not
	record symbolic equivalences from backedges in the CFG.

	Revert
	2017-11-19  Jeff Law  <law@redhat.com>

	* tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
	of degenerates resulting from ignoring an edge.

2017-12-18  Martin Sebor  <msebor@redhat.com>

	PR middle-end/83373
	PR tree-optimization/78450
	* tree-ssa-strlen.c (maybe_set_strlen_range): New function.
	(handle_builtin_strlen): Call it.

2017-12-18  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83424
	* rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET.

2017-12-18  Marek Polacek  <polacek@redhat.com>

	PR middle-end/83463
	* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
	Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
	values.

2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
	(umaddsidi4, umaddsidi_split): Likewise.

2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_legitimate_constant_p): Always check all
	constants.

2017-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/83420
	* config/s390/s390.c (s390_option_override): Avoid strncpy.

2017-12-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81877
	* tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters.
	(outermost_indep_loop): Adjust.
	(ref_indep_loop_p_1): Likewise.  Remove safelen handling again.
	(can_sm_ref_p): Adjust.

2017-12-18  Richard Biener  <rguenther@suse.de>

	PR middle-end/77291
	* tree.c (array_at_struct_end_p): Return true if the underlying
	object has space for at least one element in excess of what
	the array domain specifies.

2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>

	* doc/extend.texi (x86 Function Attributes): Reformat nocf_check
	example	to avoid overfull hbox.
	* doc/invoke.texi (Option Summary): Add missing @gol.
	(C++ Dialect Options): Reformat -Wnoexcept-type example to avoid
	overfull hbox.

2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
	    Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* doc/invoke.texi (Option Summary): Add -mverbose-cost-dump
	to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
	(AArch64 Options): Document -mverbose-cost-dump.
	(ARM Options): Likewise, plus -mflip-thumb.

2017-12-17  Martin Sebor  <msebor@redhat.com>

	PR bootstrap/83446
	* gimple-ssa-warn-restrict.c
	(builtin_memref::offset_out_of_bounds): Correct the handling of
	anti-ranges.

2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>

	* doc/invoke.texi (ARC Options): Add missing -mlra entry.

2017-12-17  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_som_asm_init_sections): Fix comment.

2017-12-17  Markus Trippelsdorf  <markus@trippelsdorf.de>

	* x86-tune-costs.h (skylake_cost, core_cost): Decrease r64 multiply
	latencies.

2017-12-16  Sandra Loosemore  <sandra@codesourcery.com>

	* doc/invoke.texi: Fix some typos.

2017-12-16  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/78918
	* Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
	* builtins.c (check_sizes): Rename...
	(check_access): ...to this.  Rename function arguments for clarity.
	(check_memop_sizes): Adjust names.
	(expand_builtin_memchr, expand_builtin_memcpy): Same.
	(expand_builtin_memmove, expand_builtin_mempcpy): Same.
	(expand_builtin_strcat, expand_builtin_stpncpy): Same.
	(check_strncat_sizes, expand_builtin_strncat): Same.
	(expand_builtin_strncpy, expand_builtin_memset): Same.
	(expand_builtin_bzero, expand_builtin_memcmp): Same.
	(expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
	(maybe_emit_sprintf_chk_warning): Same.
	(expand_builtin_strcpy): Adjust.
	(expand_builtin_stpcpy): Same.
	(expand_builtin_with_bounds): Detect out-of-bounds accesses
	in pointer-checking forms of memcpy, memmove, and mempcpy.
	(gcall_to_tree_minimal, max_object_size): Define new functions.
	* builtins.h (max_object_size): Declare.
	* calls.c (alloc_max_size): Call max_object_size instead of
	hardcoding ssizetype limit.
	(get_size_range): Handle new argument.
	* calls.h (get_size_range): Add a new argument.
	* cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
	* doc/invoke.texi (-Wrestrict): Adjust, add example.
	* gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
	operations.
	(gimple_fold_builtin_memory_chk): Same.
	(gimple_fold_builtin_stxcpy_chk): New function.
	* gimple-ssa-warn-restrict.c: New source.
	* gimple-ssa-warn-restrict.h: New header.
	* gimple.c (gimple_build_call_from_tree): Propagate location.
	* passes.def (pass_warn_restrict): Add new pass.
	* tree-pass.h (make_pass_warn_restrict): Declare.
	* tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
	operations.
	(handle_builtin_strcat): Same.
	(strlen_optimize_stmt): Rename...
	(strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
	stpncpy, strncpy, and their checking forms.

2017-12-16  Jan Hubicka  <hubicka@ucw.cz>

	PR rtl-optimization/82849
	* modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
	and get_max_loop_iterations_int.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
	(smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
	size as a poly_uint64.
	(mode_for_vector, mode_for_int_vector): Take the number of vector
	elements as a poly_uint64.
	* stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
	size as a poly_uint64.
	(mode_for_vector, mode_for_int_vector): Take the number of vector
	elements as a poly_uint64.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* machmode.h (MACRO_MODE): New macro.
	* addresses.h (base_reg_class, ok_for_base_p_1): Use it.
	* targhooks.c (default_libcall_value, default_secondary_reload)
	(default_memory_move_cost, default_register_move_cost)
	(default_class_max_nregs): Likewise.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi: Document IN_TARGET_CODE.
	* genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
	target C file.
	* genautomata.c (main): Likewise.
	* genconditions.c (write_header): Likewise.
	* genemit.c (main): Likewise.
	* genextract.c (print_header): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c (main): Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* genrecog.c (writer_header): Likewise.
	* config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
	* config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
	* config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
	* config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
	* config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
	* config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
	* config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
	* config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
	* config/arc/arc.c (IN_TARGET_CODE): Likewise.
	* config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
	* config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
	* config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
	* config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
	* config/arm/arm.c (IN_TARGET_CODE): Likewise.
	* config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
	* config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
	* config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
	* config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
	* config/avr/avr.c (IN_TARGET_CODE): Likewise.
	* config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
	* config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
	* config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
	* config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
	* config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
	* config/cris/cris.c (IN_TARGET_CODE): Likewise.
	* config/darwin.c (IN_TARGET_CODE): Likewise.
	* config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
	* config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
	* config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
	* config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
	* config/frv/frv.c (IN_TARGET_CODE): Likewise.
	* config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
	* config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
	* config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
	* config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
	* config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
	* config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
	* config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
	* config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
	* config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
	* config/i386/i386.c (IN_TARGET_CODE): Likewise.
	* config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
	* config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
	* config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
	* config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
	* config/i386/winnt.c (IN_TARGET_CODE): Likewise.
	* config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
	* config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
	* config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
	* config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
	* config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
	* config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
	* config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
	* config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
	* config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
	* config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
	* config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
	* config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
	* config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
	* config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
	* config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
	* config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
	* config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
	* config/mips/mips.c (IN_TARGET_CODE): Likewise.
	* config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
	* config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
	* config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
	* config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
	* config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
	* config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
	* config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
	* config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
	* config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
	* config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
	* config/pa/pa.c (IN_TARGET_CODE): Likewise.
	* config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
	* config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
	* config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
	* config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
	* config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
	* config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
	* config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
	* config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
	* config/rx/rx.c (IN_TARGET_CODE): Likewise.
	* config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
	* config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
	* config/s390/s390.c (IN_TARGET_CODE): Likewise.
	* config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
	* config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
	* config/sh/sh.c (IN_TARGET_CODE): Likewise.
	* config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
	* config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
	* config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
	* config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
	* config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
	* config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
	* config/spu/spu.c (IN_TARGET_CODE): Likewise.
	* config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
	* config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
	* config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
	* config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
	* config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
	* config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
	* config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
	* config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
	* config/v850/v850.c (IN_TARGET_CODE): Likewise.
	* config/vax/vax.c (IN_TARGET_CODE): Likewise.
	* config/visium/visium.c (IN_TARGET_CODE): Likewise.
	* config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
	* config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
	* config/vms/vms.c (IN_TARGET_CODE): Likewise.
	* config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
	checks for MEM_REF.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/generic.texi (VEC_SERIES_EXPR): Document.
	* doc/md.texi (vec_series@var{m}): Document.
	* tree.def (VEC_SERIES_EXPR): New tree code.
	* tree.h (build_vec_series): Declare.
	* tree.c (build_vec_series): New function.
	* cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* gimple-pretty-print.c (dump_binary_rhs): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* expr.c (expand_expr_real_2): Likewise.
	* optabs-tree.c (optab_for_tree_code): Likewise.
	* tree-cfg.c (verify_gimple_assign_binary): Likewise.
	* fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
	* expmed.c (make_tree): Handle VEC_SERIES.
	* optabs.def (vec_series_optab): New optab.
	* optabs.h (expand_vec_series_expr): Declare.
	* optabs.c (expand_vec_series_expr): New function.
	* tree-vect-generic.c (expand_vector_operations_1): Check that
	the operands also have vector type.

2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hawyard@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
	(VEC_COND_EXPR): Add missing @tindex.
	* doc/md.texi (vec_duplicate@var{m}): Document.
	* tree.def (VEC_DUPLICATE_EXPR): New tree codes.
	* tree.c (build_vector_from_val): Add stubbed-out handling of
	variable-length vectors, using VEC_DUPLICATE_EXPR.
	(uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
	* fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
	(test_vec_duplicate_folding): New function.
	(fold_const_c_tests): Call it.
	* optabs.def (vec_duplicate_optab): New optab.
	* optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
	* optabs.h (expand_vector_broadcast): Declare.
	* optabs.c (expand_vector_broadcast): Make non-static.  Try using
	vec_duplicate_optab.
	* expr.c (store_constructor): Try using vec_duplicate_optab for
	uniform vectors.
	(expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.

2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>

	PR target/83358
	* config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
	div/mod latencies a bit.

2017-12-15  Jeff Law  <law@redhat.com>

	PR tree-optimization/36550
	* tree-ssa-threadupdate.c (count_stmts_and_phis_in_block): New.
	(mark_threaded_blocks): Rewrite code to avoid block copying when
	optimizing for size.  Don't pessimize blocks which will be
	copied, but all the statements will be dead.

2017-12-15  Alexandre Oliva  <aoliva@redhat.com>

	PR tree-optimization/81165
	* tree-ssa-threadupdate.c (uses_in_bb): New.
	(estimate_threading_killed_stmts): New.
	* tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
	* tree-ssa-threadedge.c
	(record_temporary_equivalences_from_stmts_at_dest): Expand limit
	when its hit.

2017-12-15  Jeff Law  <law@redhat.com>

	PR tree-optimization/83410
	* tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
	threads when parallelizing loops.

2017-12-15  Jakub Jelinek  <jakub@redhat.com>

	* tree-core.h (struct attribute_spec): Swap affects_type_identity and
	handler fields.
	* config/alpha/alpha.c (vms_attribute_table): Swap
	affects_type_identity and handler fields, adjust comments.
	* config/mips/mips.c (mips_attribute_table): Likewise.
	* config/visium/visium.c (visium_attribute_table): Likewise.
	* config/epiphany/epiphany.c (epiphany_attribute_table): Likewise.
	* config/microblaze/microblaze.c (microblaze_attribute_table):
	Likewise.
	* config/spu/spu.c (spu_attribute_table): Likewise.
	* config/mcore/mcore.c (mcore_attribute_table): Likewise.
	* config/arc/arc.c (arc_attribute_table): Likewise.
	* config/m68k/m68k.c (m68k_attribute_table): Likewise.
	* config/v850/v850.c (v850_handle_interrupt_attribute,
	v850_handle_data_area_attribute): Formatting fixes.
	(v850_attribute_table): Swap affects_type_identity and handler
	fields, adjust comments.
	* config/m32r/m32r.c (m32r_attribute_table): Likewise.
	* config/arm/arm.c (arm_attribute_table): Likewise.
	* config/avr/avr.c (avr_attribute_table): Likewise.
	* config/s390/s390.c (s390_attribute_table): Likewise.
	* config/sh/sh.c (sh_attribute_table): Likewise.
	* config/i386/i386.c (ix86_handle_cconv_attribute,
	ix86_handle_callee_pop_aggregate_return): Formatting fixes.
	(ix86_attribute_table): Swap affects_type_identity and handler
	fields, adjust comments.
	* config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
	* config/sparc/sparc.c (sparc_attribute_table): Likewise.
	* config/m32c/m32c.c (m32c_attribute_table): Likewise.
	* config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise.
	* config/ia64/ia64.c (ia64_attribute_table): Likewise.
	* config/msp430/msp430.c (msp430_attribute_table): Likewise.
	* config/rx/rx.c (rx_attribute_table): Likewise.
	* config/cr16/cr16.c (cr16_attribute_table): Likewise.
	* config/h8300/h8300.c (h8300_attribute_table): Likewise.
	* config/nvptx/nvptx.c (nvptx_attribute_table): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise.
	* config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
	* config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise.
	* config/bfin/bfin.c (bfin_attribute_table): Likewise.
	* config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
	* config/rl78/rl78.c (rl78_attribute_table): Likewise.
	* config/nds32/nds32.c (nds32_attribute_table): Likewise.
	* doc/plugins.texi (user_attr): Likewise.  Add NULL for
	exclude.
	* attribs.c (empty_attribute_table): Swap affects_type_identity and
	handler fields.
	(register_scoped_attributes, decl_attributes): Formatting fixes.

	PR tree-optimization/83269
	* fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
	subtraction in arg0's type if type is signed and arg0 is unsigned.
	Formatting fix.

	PR sanitizer/81281
	* match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
	convert? on @0 instead of convert.  Check type of @1, not @0.
	((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
	convert? on @0 instead of convert.  Check type of @1, not @0.
	((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
	only optimize if either both @1 and @2 types are narrower
	precision, or both are wider or equal precision, and in the former
	case only if both have undefined overflow.

2017-12-15  Richard Biener  <rguenther@suse.de>

	PR lto/83388
	* internal-fn.def (IFN_NOP): Add.
	* internal-fn.c (expand_NOP): Do nothing.
	* lto-streamer-in.c (input_function): Instead of removing
	sanitizer calls replace them with IFN_NOP calls.

2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* dse.c (store_info, read_info_type): Replace begin and end with
	offset and width.
	(print_range): New function.
	(set_all_positions_unneeded, any_positions_needed_p)
	(check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
	accordingly.
	(record_store): Likewise.  Optimize the case in which all positions
	are unneeded.
	(get_stored_val): Replace read_begin and read_end with read_offset
	and read_width.
	(replace_read): Update call accordingly.

2017-12-15  Bin Cheng  <bin.cheng@arm.com>

	* gimple-loop-interchange.cc (STMT_COST_RATIO): New macro.
	(loop_cand::m_num_stmts, loop_cand::m_const_init_reduc): New members.
	(loop_cand::loop_cand): Initialize above members.
	(loop_cand::supported_operations): Delete.
	(loop_cand::can_interchange_p): Inline above function.
	(loop_cand::classify_simple_reduction): Record number of constant
	initialized simple reductions.
	(should_interchange_loops): New parameters.  Check stmt cost of loops
	to be interchange.
	(tree_loop_interchange::interchange): Prepare stmt cost of outer loop.
	Update call to should_interchange_loops.
	(should_interchange_loop_nest): Update call to
	should_interchange_loops.

2017-12-15  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/66488
	* ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
	* hwint.h (HOST_BITS_PER_PTR): ...but here instead.
	* config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.

2017-12-15  Julia Koval  <julia.koval@intel.com>

	* config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi,
	__builtin_ia32_vaesenclast_v32qi, __builtin_ia32_vaesenclast_v64qi):
	New.
	* config/i386/sse.md (vaesenclast_<mode>): New pattern.
	* config/i386/vaesintrin.h (_mm256_aesenclast_epi128,
	_mm512_aesenclast_epi128, _mm_aesenclast_epi128): New intrinsics.

2017-12-15  Julia Koval  <julia.koval@intel.com>

	* config/i386/i386-builtin.def (__builtin_ia32_vaesenc_v16qi,
	__builtin_ia32_vaesenc_v32qi, __builtin_ia32_vaesenc_v64qi): New.
	* config/i386/sse.md (vaesenc_<mode>): New pattern.
	* config/i386/vaesintrin.h (_mm256_aesenc_epi128, _mm512_aesenc_epi128,
	_mm_aesenc_epi128): New intrinsics.

2017-12-15  Julia Koval  <julia.koval@intel.com>

	* config/i386/i386-builtin.def (__builtin_ia32_vaesdeclast_v16qi,
	__builtin_ia32_vaesdeclast_v32qi, __builtin_ia32_vaesdeclast_v64qi):
	New.
	* config/i386/sse.md (vaesdeclast_<mode>): New pattern.
	* config/i386/vaesintrin.h (_mm256_aesdeclast_epi128,
	_mm512_aesdeclast_epi128, _mm_aesdeclast_epi128): New intrinsics.

2017-12-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gimple-ssa-strength-reduction.c (analyze_increments):
	Distinguish replacement costs for constant strides from those for
	unknown strides.

2017-12-14  Jakub Jelinek  <jakub@redhat.com>

	* var-tracking.c (variable_tracking_main_1): Formatting fix.

2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* doc/invoke.texi: Document -Wcast-function-type.
	* recog.h (stored_funcptr): Change signature.
	* tree-dump.c (dump_node): Avoid warning.
	* typed-splay-tree.h (typed_splay_tree): Avoid warning.

2017-12-14  Qing Zhao  <qing.zhao@oracle.com>

	PR middle_end/79538
	* gimple-fold.c (get_range_strlen): Add the handling of non-member 
	array.

2017-12-14  David Malcolm  <dmalcolm@redhat.com>

	PR tree-optimization/83312
	* domwalk.h (dom_walker::dom_walker): Fix typo in comment.
	* tree-cfg.c (find_taken_edge): Update to handle NULL_TREE for
	"val" param, and to cope with arbitrary basic blocks.
	(find_taken_edge_cond_expr): Add "cond_stmt" param and use it to
	handle NULL_TREE for "val", dropping "bb" param.
	(find_taken_edge_switch_expr): Make "switch_stmt" param const and
	drop "bb" param.  Handle NULL_TREE for "val".
	(find_case_label_for_value): Make "switch_stmt" param const.
	* tree-vrp.c (class check_array_bounds_dom_walker): New subclass
	of dom_walker.
	(vrp_prop::check_all_array_refs): Reimplement as...
	(check_array_bounds_dom_walker::before_dom_children): ...this new
	vfunc.  Replace linear search through BB block list, excluding
	those with non-executable in-edges via dominator walk.

2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/arm.opt (mverbose-cost-dump): New option.
	* config/arm/arm.c (arm_rtx_costs): Use it.

2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>

	PR bootstrap/83396
	* reload1.c (emit_input_reload_insns): Skip debug markers.

2017-12-14  Alexandre Oliva  <aoliva@redhat.com>

	* config/i386/i386.c (rest_of_insert_endbranch): Use call loc
	for its nop_endbr.

	PR bootstrap/83396
	* config/arc/arc.c (hwloop_optimize): Skip debug insns.
	* config/sh/sh-protos.h (sh_find_set_of_reg): Adjust.
	* config/sh/sh.c: Skip debug insns besides notes.
	* config/sh/sh.md: Likewise.
	* config/sh/sh_treg_combine.cc: Likewise.
	* config/sh/sync.md: Likewise.

2017-12-14  Tom de Vries  <tom@codesourcery.com>

	* doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
	Add item for weak_undefined.

2017-12-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67842
	* sese.h (bb_in_region): Remove #if 0'ed code.

2017-12-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83326
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
	may_be_zero parameter and handle it by not marking the first
	peeled copy as not exiting the loop.
	(try_peel_loop): Likewise.
	(canonicalize_loop_induction_variables): Use number_of_iterations_exit
	to handle the case of constant or zero iterations and perform
	loop header copying on-the-fly.

2017-12-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83418
	* vr-values.c (vr_values::extract_range_for_var_from_comparison_expr):
	Instead of asserting we don't get unfolded comparisons deal with them.

2017-12-14  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/83396
	* var-tracking.c (vt_initialize): Ignore non-DEBUG_INSNs outside of
	basic blocks.  Assert debug bind insns don't appear outside of bbs,
	don't reset them.  Assert insns without BLOCK_FOR_INSN are outside of
	bb.  Simplify.

	PR tree-optimization/83198
	* gimple-ssa-sprintf.c (format_floating): Set type solely based on
	dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
	value if arg is a REAL_CST with incompatible type.

2017-12-14  Sudakshina Das  <sudi.das@arm.com>
	    Bin Cheng  <bin.cheng@arm.com>

	PR target/81228
	* config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT
	to CCFPEmode.
	* config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Add
	LTGT.

2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75,
	cortex-a75.cortex-a55): Specify AARCH64_FL_F16 in the arch features.

2017-12-14  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* poly-int.h: New file.
	* poly-int-types.h: Likewise.
	* coretypes.h: Include them.
	(POLY_INT_CONVERSION): Define.
	* target.def (estimated_poly_value): New hook.
	* doc/tm.texi.in (TARGET_ESTIMATED_POLY_VALUE): New hook.
	* doc/tm.texi: Regenerate.
	* doc/poly-int.texi: New file.
	* doc/gccint.texi: Include it.
	* doc/rtl.texi: Describe restrictions on subreg modes.
	* Makefile.in (TEXI_GCCINT_FILES): Add poly-int.texi.
	* genmodes.c (NUM_POLY_INT_COEFFS): Provide a default definition.
	(emit_insn_modes_h): Emit a definition of NUM_POLY_INT_COEFFS.
	* targhooks.h (default_estimated_poly_value): Declare.
	* targhooks.c (default_estimated_poly_value): New function.
	* target.h (estimated_poly_value): Likewise.
	* wide-int.h (WI_UNARY_RESULT): Use wi::binary_traits.
	(wi::unary_traits): Delete.
	(wi::binary_traits::signed_shift_result_type): Define for
	offset_int << HOST_WIDE_INT, etc.
	(generic_wide_int::operator <<=): Define for all types and use
	wi::lshift instead of <<.
	(wi::hwi_with_prec): Add a default constructor.
	(wi::ints_for): New class.
	(operator <<): Define for all wide-int types.
	(operator /): New function.
	(operator %): Likewise.
	* selftest.h (ASSERT_KNOWN_EQ, ASSERT_KNOWN_EQ_AT, ASSERT_MAYBE_NE)
	(ASSERT_MAYBE_NE_AT): New macros.

2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
	    Dominik Vogt  <vogt@linux.vnet.ibm.com>

	PR middle-end/78468
	* emit-rtl.c (init_emit): Remove ??? comment.
	* explow.c (get_dynamic_stack_size): Take known alignment of stack
	pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
	* config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
	alignment of 3 virtual registers to BITS_PER_WORD.

	* config/sparc/sparc.c (sparc_compute_frame_size): Simplify.

2017-12-13  Peter Bergner  <bergner@vnet.ibm.com>

	* config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define.
	* config/rs6000/rs6000.c (cpu_supports_info): Use it.

2017-12-13  Alexandre Oliva  <aoliva@redhat.com>

	PR bootstrap/83396
	* reload1.c (eliminate_regs_in_insn): Skip debug markers.

2017-12-13  Jakub Jelinek  <jakub@redhat.com>

	* tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
	with the exception of debug begin stmt markers appear before
	labels.

	PR bootstrap/83396
	* final.c (rest_of_handle_final): Call variable_tracking_main only
	if !flag_var_tracking.

2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/83396
	PR debug/83391
	* tree-cfgcleanup.c (remove_forwarder_block): Keep after
	labels debug stmts that can only appear after labels.

2017-12-13  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/82398
	* sel-sched.c (sel_rank_for_schedule): Fix check for zero
	EXPR_USEFULNESS in priority comparison.

2017-12-13  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83393
	* combine.c (move_deaths): If reg_stat points to a too new insn in
	last_death, do not use it: find the proper insn instead.

2017-12-12  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

	PR target/82190
	* config/rs6000/rs6000-string.c (expand_block_compare,
	expand_strn_compare): Fix set_mem_size() calls.

2017-12-12  Jeff Law  <law@redhat.com>

	PR tree-optimization/83298
	PR tree-optimization/83362
	PR tree-optimization/83383
	* gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
	push_value_range a public interface.  Add new argument to
	record_ranges_from_stmt.
	* gimple-ssa-evrp-analyze.c
	(evrp_range_analyzer::record_ranges_from_stmt): Add new argument.
	Update comments.  Handle recording temporary equivalences.
	* tree-ssa-dom.c (dom_opt_opt_walker::before_dom_children): Add
	new argument to call to evrp_range_analyzer::record_ranges_from_stmt.
	* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Likewise.
	* tree-ssa-threadedge.c: Include alloc-pool.h, vr-values.h and
	gimple-ssa-evrp-analyze.h.
	(record_temporary_equivalences_from_phis): Add new argument.  When
	the PHI arg is an SSA_NAME, set the result's range to the range
	of the PHI arg.
	(record_temporary_equivalences_from_stmts_at_dest): Record ranges
	from statements too.
	(thread_through_normal_block): Accept new argument, evrp_range_analyzer.
	Pass it down to children as needed.
	(thread_outgoing_edges): Likewise.
	(thread_across_edge): Likewise.   Push/pop range state as needed.
	* tree-ssa-threadedge.h (thread_outgoing_edges): Update prototype.

2017-12-12  Julia Koval  <julia.koval@intel.com>

	* config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB.
	(PTA_CANNONLAKE): Remove PTA_CLWB.

2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/83332
	* config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
	(vcondv2div2df): Likewise.
	(vconduv2dfv2di): Likewise.

2017-12-12  Jakub Jelinek  <jakub@redhat.com>

	* builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
	BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, BUILT_IN_NEXTTOWARDF,
	BUILT_IN_NEXTTOWARDL): Use ATTR_MATHFN_ERRNO instead of
	ATTR_MATHFN_FPROUNDING_ERRNO.

2017-12-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83385
	* graphite-scop-detection.c (get_order, order): Remove.
	(bb_to_rpo): New global.
	(cmp_pbbs): Adjust.
	(build_scops): Sort pbbs in RPO order.

2017-12-12  James Greenhalgh  <james.greenhalgh@arm.com>

	* combine.c (simplify_set): Do not transform subregs to zero_extends
	if the destination mode is a vector mode.

2017-12-12  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83359
	* tree-cfg.h (fold_loop_internal_call): Declare.
	* tree-vectorizer.c (fold_loop_internal_call): Moved to ...
	* tree-cfg.c (fold_loop_internal_call): ... here.  No longer static.
	(find_loop_dist_alias): New function.
	(move_sese_region_to_fn): If any dloop->orig_loop_num value is
	updated, also adjust any corresponding LOOP_DIST_ALIAS internal
	calls.

	PR tree-optimization/80631
	* tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
	(vect_create_epilog_for_reduction): Add INDUC_VAL and INDUC_CODE
	arguments, for INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
	hardcoding zero as the value if COND_EXPR is never true.  For
	INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
	INDUC_VAL is equal to INITIAL_DEF, and use INDUC_CODE instead of
	hardcoding MAX_EXPR as the reduction operation.
	(is_nonwrapping_integer_induction): Allow negative step.
	(vectorizable_reduction): Compute INDUC_VAL and INDUC_CODE for
	vect_create_epilog_for_reduction, if no value is suitable, don't
	use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.

2017-12-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81889
	* tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
	range info from the non-wrapping IV instead of just the range
	of the type.

2017-12-12  Julia Koval  <julia.koval@intel.com>

	* config.gcc: Add vaesintrin.h.
	* config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
	New type.
	* config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
	__builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
	New builtins.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
	* config/i386/immintrin.h: Include vaesintrin.h.
	* config/i386/sse.md (vaesdec_<mode>): New pattern.
	* config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
	_mm_aesdec_epi128): New intrinsics.

2017-12-12  Julia Koval  <julia.koval@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
	OPTION_MASK_ISA_VAES_UNSET): New.
	(ix86_handle_option): Handle -mvaes.
	* config/i386/cpuid.h: Define bit_VAES.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
	* config/i386/i386-c.c (__VAES__): New.
	* config/i386/i386.c (ix86_target_string): Add -mvaes.
	(ix86_valid_target_attribute_inner_p): Ditto.
	* config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
	* config/i386/i386.opt: Add -mvaes.
	* doc/invoke.texi: Ditto.

2017-12-12  Alexandre Oliva  <aoliva@redhat.com>

	* debug.h (gcc_debug_hooks): Add inline_entry.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
	* debug.c (do_nothing_debug_hooks): Likewise.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* dwarf2out.c (dwarf2_debug_hooks): Likewise.
	(dwarf2_lineno_debug_hooks): Likewise.

	* common.opt (gstatement-frontiers): New, setting
	debug_nonbind_markers_p.
	* rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate.
	* toplev.c (process_options): Autodetect value for debug statement
	frontiers option.
	* tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate.
	* doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New.

	* cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
	markers.  Integrate source bind into debug stmt expand loop.
	(pass_expand::execute): Check debug marker limit.  Avoid deep
	TER and expand debug locations for debug bind insns only.
	* cse.c (insn_live_p): Keep nonbind markers and debug bindings
	followed by them.
	* df-scan.c (df_insn_delete): Accept out-of-block debug insn.
	* final.c (reemit_insn_block_notes): Take current block from
	nonbind markers.  Declare note where it's first set.
	(final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
	begin stmt markers if enabled.
	(notice_source_line): Handle nonbind markers.  Fail if their
	location is unknown or that of builtins.
	(rest_of_handle_final): Convert begin stmt markers to notes if
	var-tracking didn't run.
	(rest_of_clean_state): Skip begin stmt markers.
	* gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
	markers.
	* function.c (allocate_struct_function): Set begin_stmt_markers.
	* function.h (struct function): Add debug_marker_count counter
	and debug_nonbind_markers flag.
	* gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
	* gimple-low.c (lower_function_body): Adjust
	debug_nonbind_markers.
	(lower_stmt): Drop or skip gimple debug stmts.
	(lower_try_catch): Skip debug stmts.
	* gimple.c (gimple_build_debug_begin_stmt): New.
	(gimple_copy): Increment debug_marker_count if copying one.
	* gimple.h (gimple_build_debug_begin_stmt): Declare.
	* gimplify.c (rexpr_location): New.
	(rexpr_has_location): New.
	(warn_switch_unreachable_r): Handle gimple debug stmts.
	(shortcut_cond_r): Call expr_location.
	(find_goto): New.
	(find_goto_label): New.
	(shortcut_cond_expr): Call expr_has_location, expr_location, and
	find_goto_label.
	(gimplify_cond_expr): Call find_goto_label, expr_has_location, and
	expr_location.
	(gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
	* langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
	(LANG_HOOKS_INITIALIZER): ... this.
	* langhooks.h (struct lang_hooks): Add emits_begin_stmt.
	* lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
	debug insns.
	(update_ebb_live_info): Skip debug insn markers.
	* lra.c (debug_insn_static_data): Rename to...
	(debug_bind_static_data): ... this.
	(debug_marker_static_data): New.
	(lra_set_insn_recog_data): Select one of the above depending
	on debug insn kind.
	(lra_update_isn_regno_info): Don't assume debug insns have
	freqs.
	(push_insns): Skip debug insns.
	* lto-streamer-in.c (input_function): Drop debug stmts
	depending on active options.  Adjust debug_nonbind_markers.
	* params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
	* print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
	begin stmt marker notes.
	(print_insn): Likewise.
	* recog.c (extract_insn): Recognize rtl for debug markers.
	* rtl.def (DEBUG_MARKER): New.
	* tree-inline.c: Include params.h.
	(remap_gimple_stmt): Handle nonbind markers.
	(maybe_move_debug_stmts_to_successors): Likewise.
	(copy_debug_stmt): Likewise.
	* tree-iterator.c (append_to_statement_list_1): Append begin stmt
	markers regardless of no side effects.
	(tsi_link_before): Don't update container's side effects when adding
	a begin stmt marker.
	(tsi_link_after): Likewise.
	(expr_first): Skip begin stmt markers.
	(expr_last): Likewise.
	* tree-pretty-print (dump_generic_node): Handle begin stmt markers.
	* tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
	Disregard nonbind markers.
	* tree.c (make_node_stat): Don't set side effects for begin stmt
	markers.
	(build1_stat): Likewise.
	* tree.def (DEBUG_BEGIN_STMT): New.
	* tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
	* var-tracking.c (delete_debug_insns): Renamed to...
	(delete_vta_debug_insns): ... this.
	(reemit_marker_as_note): New.
	(vt_initialize): Reemit markers.
	(delete_vta_debug_insns): Likewise.
	(vt_debug_insns_local): Reemit or delete markers.
	(variable_tracking_main_1): Likewise.
	* doc/generic.texi (DEBUG_BEGIN_STMT): Document.
	* doc/gimple.texi (gimple_debug_begin_stmt_p): New.
	(gimple_debug_nonbind_marker_p): New.
	(gimple_build_debug_bind): Adjust.
	(gimple_build_debug_begin_stmt): New.
	* doc/invoke.texi (max-debug-marker-count): New param.
	* doc/rtl.texi (debug_implicit_ptr, entry_value): New.
	(debug_parameter_ref, debug_marker): New.
	(NOTE_INSN_BEGIN_STMT): New.
	(DEBUG_INSN): Describe begin stmt markers.

	* cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
	without debug insns, we wouldn't, but clean up debug insns
	after a control flow insn nevertheless.

	* cfgcleanup.c (delete_unreachable_blocks): Use alternate
	block removal order if MAY_HAVE_DEBUG_BIND_INSNS.
	* cfgexpand.c (label_rtx_for_bb): Skip debug insns.
	* cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns.
	(rtl_tidy_fallthru_edge): Likewise.
	(rtl_verify_fallthru): Likewise.
	(rtl_verify_bb_layout): Likewise.
	(skip_insns_after_block): Likewise.
	(duplicate_insn_chain): Use DEBUG_BIND_INSN_P.
	* dwarf2out.c: Include print-rtl.h.
	(dwarf2out_next_real_insn): New.
	(dwarf2out_var_location): Call it.  Disregard begin stmt markers.
	Dump debug binds in asm comments.
	* gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts.
	* gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust
	callers to use gsi_start_nondebug_bb instead.
	(gsi_after_labels): Skip gimple debug stmts.
	(gsi_start_nondebug): New.
	* gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust.
	(proper_loop_form_for_interchange): Adjust.
	* gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt.
	* gimple.h (gimple_seq_last_nondebug_stmt): New.
	* gimplify.c (last_stmt_in_scope): Skip debug stmts.
	(collect_fallthrough_labels): Likewise.
	(should_warn_for_implicit_fallthrough): Likewise.
	(warn_implicit_fallthrough_r): Likewise.
	(expand_FALLTHROUGH_r): Likewise.
	* graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust.
	(graphite_copy_stmts_from_block): Skip nonbind markers.
	* haifa-sched.c (sched_extend_bb): Skip debug insns.
	* ipa-icf-gimple.c (func_checker::compare_bb): Adjust.
	* jump.c (clean_barriers): Skip debug insns.
	* omp-expand.c (expand_parallel_call): Skip debug insns.
	(expand_task_call): Likewise.
	(remove_exit_barrier): Likewise.
	(expand_omp_taskreg): Likewise.
	(expand_omp_for_init_counts): Likewise.
	(expand_omp_for_generic): Likewise.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_for_static_chunk): Likewise.
	(expand_omp_simd): Likewise.
	(expand_omp_taskloop_for_outer): Likewise.
	(expand_omp_taskloop_for_inner): Likewise.
	(expand_oacc_for): Likewise.
	(expand_omp_sections): Likewise.
	(expand_omp_single): Likewise.
	(expand_omp_synch): Likewise.
	(expand_omp_atomic_load): Likewise.
	(expand_omp_atomic_store): Likewise.
	(expand_omp_atomic_fetch_op): Likewise.
	(expand_omp_atomic_pipeline): Likewise.
	(expand_omp_atomic_mutex): Likewise.
	(expand_omp_target): Likewise.
	(grid_expand_omp_for_loop): Likewise.
	(grid_expand_target_grid_body): Likewise.
	(build_omp_regions_1): Likewise.
	* omp-low.c (check_combined_parallel): Skip debug stmts.
	* postreload.c (fixup_debug_insns): Skip nonbind debug insns.
	* regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo.
	* sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in
	test.
	* tree-cfg.c (make_blobs_1): Skip debug stmts.
	(make_edges): Likewise.
	(cleanup_dead_labels): Likewise.
	(gimple_can_merge_blocks_p): Likewise.
	(stmt_starts_bb_p): Likewise.
	(gimple_block_label): Likewise.
	(gimple_redirect_edge_and_branch): Likewise.
	* tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping
	of debug stmts.
	(execute_cleanup_cfg_post_optimizing): Dump enumerated decls with
	TDF_SLIM.
	* tree-pretty-print (print_declaration): Omit initializer in slim
	dumps.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt
	markers.
	(eliminate_unnecessary_stmts): Stabilize block removal order.
	* tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts.
	* var-tracking.c (get_first_insn): New.
	(vt_emit_notes): Call it.
	(vt_initialize): Walk any insns before the first BB.
	(delete_debug_insns): Likewise.

	* gimple.h (enum gimple_debug_subcode): Add
	GIMPLE_DEBUG_BEGIN_STMT.
	(gimple_debug_begin_stmt_p): New.
	(gimple_debug_nonbind_marker_p): New.
	* tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): New.
	(MAY_HAVE_DEBUG_BIND_STMTS): Renamed from....
	(MAY_HAVE_DEBUG_STMTS): ... this.  Check both.
	* insn-notes.def (BEGIN_STMT): New.
	* rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): New.
	(MAY_HAVE_DEBUG_BIND_INSNS): Renamed from....
	(MAY_HAVE_DEBUG_INSNS): ... this.  Check both.
	(NOTE_MARKER_LOCATION, NOTE_MARKER_P): New.
	(DEBUG_BIND_INSN_P, DEBUG_MARKER_INSN_P): New.
	(INSN_DEBUG_MARKER_KIND): New.
	(GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT): New.
	(INSN_VAR_LOCATION): Check for VAR_LOCATION.
	(INSN_VAR_LOCATION_PTR): New.
	* cfgexpand.c (expand_debug_locations): Handle debug bind insns
	only.
	(expand_gimple_basic_block): Likewise.  Emit debug temps for TER
	deps only if debug bind insns are enabled.
	(pass_expand::execute): Avoid deep TER and expand
	debug locations for debug bind insns only.
	* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Narrow
	debug stmts special handling down to debug bind stmts.
	* combine.c (try_combine): Narrow debug insns special handling
	down to debug bind insns.
	* cse.c (delete_trivially_dead_insns): Handle debug bindings.
	Narrow debug insns preexisting special handling down to debug
	bind insns.
	* dce.c (rest_of_handle_ud_dce): Narrow debug insns special
	handling down to debug bind insns.
	* function.c (instantiate_virtual_regs): Skip debug markers,
	adjust handling of debug binds.
	* gimple-ssa-backprop.c (backprop::prepare_change): Try debug
	temp insertion iff MAY_HAVE_DEBUG_BIND_STMTS.
	* haifa-sched.c (schedule_insn): Narrow special handling of debug
	insns to debug bind insns.
	* ipa-param-manipulation.c (ipa_modify_call_arguments): Narrow
	special handling of debug stmts to debug bind stmts.
	* ipa-split.c (split_function): Likewise.
	* ira.c (combine_and_move_insns): Adjust debug bind insns only.
	* loop-unroll.c (apply_opt_in_copies): Adjust tests on bind
	debug insns.
	* reg-stack.c (convert_regs_1): Use DEBUG_BIND_INSN_P.
	* regrename.c (build_def_use): Likewise.
	* regcprop.c (copyprop_hardreg_forward_1): Likewise.
	(pass_cprop_hardreg): Narrow special casing of debug insns to
	debug bind insns.
	* regstat.c (regstat_init_n_sets_and_refs): Likewise.
	* reload1.c (reload): Likewise.
	* sese.c (sese_insert_phis_for_liveouts): Narrow special
	casing of debug stmts to debug bind stmts.
	* shrink-wrap.c (move_insn_for_shrink_wrap): Likewise.
	* ssa-iterators.h (num_imm_uses): Likewise.
	* tree-cfg.c (gimple_merge_blocks): Narrow special casing of
	debug stmts to debug bind stmts.
	* tree-inline.c	(tree_function_versioning): Narrow special casing
	of debug stmts to debug bind stmts.
	* tree-loop-distribution.c (generate_loops_for_partition):
	Narrow special casing of debug stmts to debug bind stmts.
	* tree-sra.c (analyze_access_subtree): Narrow special casing
	of debug stmts to debug bind stmts.
	* tree-ssa-dce.c (remove_dead_stmt): Narrow special casing of debug
	stmts to debug bind stmts.
	* tree-ssa-loop-ivopt.c (remove_unused_ivs): Narrow special
	casing of debug stmts to debug bind stmts.
	* tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise.
	* tree-ssa-tail-merge.c (tail_merge_optimize): Narrow special
	casing of debug stmts to debug bind stmts.
	* tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
	Likewise.
	* tree-ssa.c (flush_pending_stmts): Narrow special casing of
	debug stmts to debug bind stmts.
	(gimple_replace_ssa_lhs): Likewise.
	(insert_debug_temp_for_var_def): Likewise.
	(insert_debug_temps_for_defs): Likewise.
	(reset_debug_uses): Likewise.
	* tree-ssanames.c (release_ssa_name_fn): Likewise.
	* tree-vect-loop-manip.c (adjust_debug_stmts_now): Likewise.
	(adjust_debug_stmts): Likewise.
	(adjust_phi_and_debug_stmts): Likewise.
	(vect_do_peeling): Likewise.
	* tree-vect-loop.c (vect_transform_loop): Likewise.
	* valtrack.c (propagate_for_debug): Use BIND_DEBUG_INSN_P.
	* var-tracking.c (adjust_mems): Narrow special casing of debug
	insns to debug bind insns.
	(dv_onepart_p, dataflow_set_clar_at_call, use_type): Likewise.
	(compute_bb_dataflow, vt_find_locations): Likewise.
	(vt_expand_loc, emit_notes_for_changes): Likewise.
	(vt_init_cfa_base): Likewise.
	(vt_emit_notes): Likewise.
	(vt_initialize): Likewise.
	(vt_finalize): Likewise.

	* emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.
	(next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.
	(next_nonnote_nondebug_insn_bb): New.
	(prev_nonnote_nondebug_insn_bb): New.
	(prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.
	* rtl.h	(prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.
	(prev_nonnote_nondebug_insn_bb): Declare.
	(next_nonnote_nondebug_insn_bb): Declare.
	* cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.
	* cfgrtl.c (get_last_bb_insn): Likewise.
	* lra.c (push_insns): Likewise.

2017-12-11  David Malcolm  <dmalcolm@redhat.com>

	PR c/82050
	* selftest-run-tests.c (selftest::run_tests): Move start/finish code
	to...
	* selftest.c (selftest::test_runner::test_runner): New ctor.
	(selftest::test_runner::~test_runner): New dtor.
	* selftest.h (class selftest::test_runner): New class.

2017-12-11  Carl Love  <cel@us.ibm.com>

	* config/rs6000/altivec.h (vec_extract_fp32_from_shorth,
	vec_extract_fp32_from_shortl]): Add #defines.
	* config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion.
	* config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_UNPACKH,
	ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VEC_AND,
	ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SRL,
	ALTIVEC_BUILTIN_VEC_SRO, ALTIVEC_BUILTIN_VEC_SLD,
	ALTIVEC_BUILTIN_VEC_SLL): Add expansions.
	* doc/extend.texi: Add documentation for the added builtins.

2017-12-11  Alexandre Oliva  <aoliva@redhat.com>

	PR rtl-optimization/80693
	PR rtl-optimization/81019
	PR rtl-optimization/81020
	* combine.c (distribute_notes): Reset any REG_UNUSED REGs that
	are not mentioned in i3.  Place the REG_UNUSED note on i2,
	possibly modified to REG_DEAD, if it did not originate in i3.

2017-12-11  Jakub Jelinek  <jakub@redhat.com>

	* recog.c (store_data_bypass_p_1): New function.
	(store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER.  Use
	store_data_bypass_p_1 to avoid code duplication.  Formatting fixes.

2017-12-11  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83361
	* ifcvt.c (if_convert): Call fixup_partitions.

2017-12-11  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
	early folding of splat_u{8,16,32}.

2017-12-11  Jakub Jelinek  <jakub@redhat.com>

	* config/aarch64/aarch64.c (aarch64_print_operand): Don't start
	output_operand_lossage first argument with capital letter.
	(aarch64_override_options): Don't start error and sorry first argument
	with capital letter.

2017-12-11  Andi Kleen  <ak@linux.intel.com>

	PR gcov-profile/83355
	* auto-profile.c (string_table::get_index_by_decl): Don't
	recurse when abstract origin points to itself.

2017-12-11  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/83320
	* gimple-loop-interchange.cc (free_data_refs_with_aux): Use delete.
	(prune_datarefs_not_in_loop): Ditto.

2017-12-10  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/install.texi (Specific): Tweak link to mkssoftware.com.

2017-12-10  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83337
	* gimple-loop-interchange.cc (compute_access_stride): Handle
	bitfield DRs properly.

2017-12-09  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83338
	* tree-vect-stmts.c (vectorizable_operation): Handle POINTER_DIFF_EXPR
	vectorization as MINUS_EXPR with a subsequent VIEW_CONVERT_EXPR from
	vector of unsigned integers to vector of signed integers.

2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/83317
	* lra-constraints.c (process_address_1): Add insn code check.

2017-12-08  Michael Matz  <matz@suse.de>

	Fix PR tree-optimization/83323
	* gimple-loop-jam (unroll_jam_possible_p): Correct test for
	head-controlled loops and loop BBs.
	* common.opt (funroll-and-jam): Remove, instead ...
	(floop-unroll-and-jam): ... reuse this option.
	* opts.c (default_options_table): Use OPT_floop_unroll_and_jam.
	* doc/invoke.texi (-funroll-and-jam): Move docu to ...
	(-floop-unroll-and-jam): ... this option.

2017-12-08  Jakub Jelinek  <jakub@redhat.com>

	* ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
	a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
	* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.

2017-12-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/81782
	* tree-ssa-uninit.c (warn_uninitialized_vars): Properly
	handle accesses outside of zero-sized vars.

2017-12-08  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/83141
	* tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
	test for MEM_REFs implicitely changing types with padding.  Remove
	inline keyword.
	(build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.

2017-12-08  Jakub Jelinek  <jakub@redhat.com>

	* config/arc/arc.c (arc_attribute_table): Add exclusions to
	the comment.
	* config/avr/avr.c (avr_attribute_table): Likewise.
	* config/msp430/msp430.c (msp430_attribute_table): Likewise.
	* config/rl78/rl78.c (rl78_attribute_table): Likewise.
	* config/nds32/nds32.c (nds32_attribute_table): Likewise.
	* config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
	of struct attribute_spec.
	* config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.

2017-12-08  Ulrich Weigand  <uweigand@de.ibm.com>

	PR target/82960
	* config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.

2017-12-08  Jan Hubicka  <hubicka@ucw.cz>

	PR middle-end/83609
	* profile-count.c (profile_count::from_gcov_type): Move from
	profile-count.h; handle overflow.
	* profile-count.h (profile_count::from_gcov_type): Move offline.

2017-12-08  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83304
	* combine.c (move_deaths): If we do not know where a register died,
	search for it.

2017-12-08  Richard Biener  <rguenther@suse.de>

	* gimple-loop-interchange.cc (tree_loop_interchange::interchange):
	Provide -fopt-info-loop feedback when we interchange in a nest.

2017-06-08  Richard Earnshaw  <rearnsha@arm.com>

	* config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
	for armv6 ARM CPU IDs.

2017-06-08  Richard Earnshaw  <rearnsha@arm.com>

	* common/config/arm/arm-common.c: Include <algorithm>.
	(INCLUDE_VECTOR): Define.
	(compare_opt_names): New function.
	(arm_rewrite_selected_arch): Only strip out extensions that can be
	expressed through -mfpu.  Sort the remaining extensions
	alphabetically.

2017-06-08  Richard Earnshaw  <rearnsha@arm.com>

	* config/arm/arm.h (arm_asm_auto_mfpu): Declare.
	(ASM_CPU_SPEC_FUNCTIONS): Add new rule asm_auto_mfpu.
	(ASM_CPU_SPEC): Use it if -mfpu is set to auto.
	* common/config/arm/arm-common.c (arm_asm_auto_mfpu): New function.

2017-06-08  Tristan Gingold  <gindold@adacore.com>

	PR ada/81470
	* dwarf2out.c (dwarf2out_do_cfi_startproc): Only emit
	.cfi_personality or .cfi_lsda if the eh data format is dwarf2.

2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
	of struct attribute_spec.

2017-12-08  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vnniintrin.h (_mm512_dpwssds_epi32,
	_mm512_mask_dpwssds_epi32, _mm512_maskz_dpwssds_epi32): New intrinsics.
	* config/i386/avx512vnnivlintrin.h (_mm256_dpwssds_epi32,
	_mm256_mask_dpwssds_epi32, _mm256_maskz_dpwssds_epi32,
	_mm_dpwssds_epi32, _mm_mask_dpwssds_epi32,
	_mm_maskz_dpwssds_epi32): Ditto.

2017-12-08  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81303
	* tree-vect-stmts.c (vect_is_simple_cond): For invariant
	conditions try to create a comparison vector type matching
	the data vector type.
	(vectorizable_condition): Adjust.
	* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
	Leave invariant conditions alone in case we can vectorize those.

2017-12-08  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vnniintrin.h (_mm512_dpwssd_epi32,
	_mm512_mask_dpwssd_epi32, _mm512_maskz_dpwssd_epi32): New intrinsics.
	* config/i386/avx512vnnivlintrin.h (_mm256_dpwssd_epi32,
	_mm256_mask_dpwssd_epi32, _mm256_maskz_dpwssd_epi32, _mm_dpwssd_epi32,
	_mm_mask_dpwssd_epi32, _mm_maskz_dpwssd_epi32): Ditto.

2017-12-08  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vnniintrin.h (_mm512_dpbusds_epi32,
	_mm512_mask_dpbusds_epi32, _mm512_maskz_dpbusds_epi32): New.
	* config/i386/avx512vnnivlintrin.h (_mm256_dpbusds_epi32,
	_mm256_mask_dpbusds_epi32, _mm256_maskz_dpbusds_epi32,
	_mm_dpbusds_epi32, _mm_mask_dpbusds_epi32,
	_mm_maskz_dpbusds_epi32): New intrinsics.

2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.md (ld<bhw_uns>io): Add splitter for memory
	operand.
	(ld<bh>io_signed): Likewise.
	(st<bhw>io): Likewise.
	* config/nios2/predicates.md (ldstio_memory_operand): Allow
	SMALL_INT12 constant integer operand.

2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.c (nios2_symbolic_constant_allowed):
	Rename to...
	(nios2_large_constant_allowed): ...this.  Adjust uses.
	(nios2_plus_symbolic_constant_p): Rename to...
	(nios2_plus_large_constant_p): ...this.  Adjust uses.
	(nios2_legitimate_address_p): Correct CONST_INT handling.
	(nios2_symbolic_memory_operand_p): Rename to...
	(nios2_large_constant_memory_operand_p): ...this.  Adjust uses.
	(nios2_large_constant_p): Check for large constant integers too.
	(nios2_split_large_constant): Handle constant integers.
	(nios2_split_symbolic_memory_operand): Rename to...
	(nios2_split_large_constant_memory_operand): ...this.  Adjust uses.
	(nios2_legitimize_constant_address): Handle constant integers.
	(r0rel_constant_p): Handle small constant integers.
	(nios2_print_operand_address): Handle r0-relative integer addresses.
	* config/nios2/nios2-protos.h: Adjust for renamed functions.
	* config/nios2/nios2.md: Adjust for renamed functions.

2017-12-07  Andrew Waterman  <andrew@sifive.com>

	* config/riscv/riscv.c (TARGET_ASM_SELECT_SECTION): New define.
	(TARGET_HAVE_SRODATA_SECTION): New define.
	(riscv_select_section): New function.

2017-12-08  Joseph Myers  <joseph@codesourcery.com>
	    Alexander Monakov  <amonakov@ispras.ru>
	    Jakub Jelinek  <jakub@redhat.com>

	PR target/81906
	* config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/aarch64/aarch64.c (aarch64_print_address_internal): Return
	a bool success value.  Don't call output_operand_lossage here.
	(aarch64_print_ldpstp_address): Return a bool success value.
	(aarch64_print_operand_address): Call output_addr_const if
	aarch64_print_address_internal fails.
	(aarch64_print_operand): Don't assert that the mode is 16 bytes for
	'y'; call output_operand_lossage instead.  Call output_operand_lossage
	if aarch64_print_ldpstp_address fails.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vector-builder.h
	(tree_vector_builder::binary_encoded_nelts): Declare.
	* tree-vector-builder.c
	(tree_vector_builder::binary_encoded_nelts): New function.
	* fold-const.c (negate_expr_p): Likewise.
	(operand_equal_p, fold_checksum_tree): Likewise.
	* tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
	* tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
	(real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
	(uniform_vector_p): Likewise.
	* varasm.c (const_hash_1, compare_constant): Likewise.
	* tree-ssa-ccp.c: Include tree-vector-builder.h.
	(valid_lattice_transition): Operate directly on the VECTOR_CST
	encoding.
	* ipa-icf.c: Include tree-vector-builder.h.
	(sem_variable::equals): Operate directly on the VECTOR_CST encoding.
	* print-tree.c (print_node): Print encoding of VECTOR_CSTs.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree.c (build_vector): Delete.
	* tree.h (build_vector): Make static and move into the self-testing
	block.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* vector-builder.h (vector_builder::derived): New const overload.
	(vector_builder::elt): New function.
	* tree-vector-builder.h (tree_vector_builder::type): New function.
	(tree_vector_builder::apply_step): Declare.
	* tree-vector-builder.c (tree_vector_builder::apply_step): New
	function.
	* gimple-fold.h (tree_vector_builder): Declare.
	(gimple_build_vector): Take a tree_vector_builder instead of a
	type and vector of elements.
	* gimple-fold.c (gimple_build_vector): Likewise.
	* tree-vect-loop.c (get_initial_def_for_reduction): Update call
	accordingly.
	(get_initial_defs_for_reduction): Likewise.
	(vectorizable_induction): Likewise.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vector-builder.h
	(tree_vector_builder::new_binary_operation): Declare.
	* tree-vector-builder.c
	(tree_vector_builder::new_binary_operation): New function.
	* fold-const.c (fold_relational_const): Use it.
	(const_binop): Likewise.  Check that both input vectors have
	the same number of elements, thus excluding things like WIDEN_SUM.
	Check whether it is possible to operate directly on the encodings
	of stepped inputs.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* fold-const.c (fold_negate_expr_1): Use tree_vector_builder and
	new_unary_operation, operating only on the encoded elements.
	(const_unop): Likewise.
	(exact_inverse): Likewise.
	(distributes_over_addition_p): New function.
	(const_binop): Use tree_vector_builder and new_unary_operation
	for combinations of VECTOR_CST and INTEGER_CST.  Operate only
	on the encoded elements unless the encoding is strided and the
	operation does not distribute over addition.
	(fold_convert_const):  Use tree_vector_builder and
	new_unary_operation.  Operate only on the encoded elements
	for truncating integer conversions, or for non-stepped encodings.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/sparc/sparc.c: Include tree-vector-builder.h.
	(sparc_fold_builtin): Use tree_vector_builder instead of build_vector.
	* expmed.c: Include tree-vector-builder.h.
	(make_tree): Use tree_vector_builder instead of build_vector.
	* fold-const.c: Include tree-vector-builder.h.
	(const_binop): Use tree_vector_builder instead of build_vector.
	(const_unop): Likewise.
	(native_interpret_vector): Likewise.
	(fold_vec_perm): Likewise.
	(fold_ternary_loc): Likewise.
	* gimple-fold.c: Include tree-vector-builder.h.
	(gimple_fold_stmt_to_constant_1): Use tree_vector_builder instead
	of build_vector.
	* tree-ssa-forwprop.c: Include tree-vector-builder.h.
	(simplify_vector_constructor): Use tree_vector_builder instead
	of build_vector.
	* tree-vect-generic.c: Include tree-vector-builder.h.
	(add_rshift): Use tree_vector_builder instead of build_vector.
	(expand_vector_divmod): Likewise.
	(optimize_vector_constructor): Likewise.
	* tree-vect-loop.c: Include tree-vector-builder.h.
	(vect_create_epilog_for_reduction): Use tree_vector_builder instead
	of build_vector.  Explicitly use a stepped encoding for
	{ 1, 2, 3, ... }.
	* tree-vect-slp.c: Include tree-vector-builder.h.
	(vect_get_constant_vectors): Use tree_vector_builder instead
	of build_vector.
	(vect_transform_slp_perm_load): Likewise.
	(vect_schedule_slp_instance): Likewise.
	* tree-vect-stmts.c: Include tree-vector-builder.h.
	(vectorizable_bswap): Use tree_vector_builder instead of build_vector.
	(vect_gen_perm_mask_any): Likewise.
	(vectorizable_call): Likewise.  Explicitly use a stepped encoding.
	* tree.c: (build_vector_from_ctor): Use tree_vector_builder instead
	of build_vector.
	(build_vector_from_val): Likewise.  Explicitly use a duplicate
	encoding.

2017-12-07  Richard Sandiford  <richard.sandiford@arm.com>

	* doc/generic.texi (VECTOR_CST): Describe new representation of
	vector constants.
	* vector-builder.h: New file.
	* tree-vector-builder.h: Likewise.
	* tree-vector-builder.c: Likewise.
	* Makefile.in (OBJS): Add tree-vector-builder.o.
	* tree.def (VECTOR_CST): Update comment to refer to generic.texi.
	* tree-core.h (tree_base): Add a vector_cst field to the u union.
	(tree_vector): Change the number of elements to
	vector_cst_encoded_nelts.
	* tree.h (VECTOR_CST_NELTS): Redefine using TYPE_VECTOR_SUBPARTS.
	(VECTOR_CST_ELTS): Delete.
	(VECTOR_CST_ELT): Redefine using vector_cst_elt.
	(VECTOR_CST_LOG2_NPATTERNS, VECTOR_CST_NPATTERNS): New macros.
	(VECTOR_CST_NELTS_PER_PATTERN, VECTOR_CST_DUPLICATE_P): Likewise.
	(VECTOR_CST_STEPPED_P, VECTOR_CST_ENCODED_ELTS): Likewise.
	(VECTOR_CST_ENCODED_ELT): Likewise.
	(vector_cst_encoded_nelts): New function.
	(make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
	VECTOR_CST_NELTS_PER_PATTERN as arguments.
	(vector_cst_int_elt, vector_cst_elt): Declare.
	* tree.c: Include tree-vector-builder.h.
	(tree_code_size): Abort if passed VECTOR_CST.
	(tree_size): Update for new VECTOR_CST layout.
	(make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
	VECTOR_CST_NELTS_PER_PATTERN as arguments.
	(build_vector): Use tree_vector_builder.
	(vector_cst_int_elt, vector_cst_elt): New functions.
	(drop_tree_overflow): For VECTOR_CST, drop the TREE_OVERFLOW from the
	encoded elements and then create the vector in the canonical form.
	(check_vector_cst, check_vector_cst_duplicate, check_vector_cst_fill)
	(check_vector_cst_stepped, test_vector_cst_patterns): New functions.
	(tree_c_tests): Call test_vector_cst_patterns.
	* lto-streamer-out.c (DFS::DFS_write_tree_body): Handle the new
	VECTOR_CST fields.
	(hash_tree): Likewise.
	* tree-streamer-out.c (write_ts_vector_tree_pointers): Likewise.
	(streamer_write_tree_header): Likewise.
	* tree-streamer-in.c (lto_input_ts_vector_tree_pointers): Likewise.
	(streamer_alloc_tree): Likewise.  Update call to make_vector.
	* fold-const.c (fold_ternary_loc): Avoid using VECTOR_CST_ELTS.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* selftest.h (ASSERT_TRUE_AT, ASSERT_FALSE_AT, ASSERT_EQ_AT)
	(ASSERT_NE, ASSERT_PRED1): Add underscores to local variable names
	* selftest-rtl.h (ASSERT_RTX_EQ, ASSERT_RTX_PTR_EQ): Likewise.

2017-12-07  Bin Cheng  <bin.cheng@arm.com>
	    Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81303
	* Makefile.in (gimple-loop-interchange.o): New object file.
	* common.opt (floop-interchange): Reuse the option from graphite.
	* doc/invoke.texi (-floop-interchange): Ditto.  New document for
	-floop-interchange and mention it for -O3.
	* opts.c (default_options_table): Enable -floop-interchange at -O3.
	* gimple-loop-interchange.cc: New file.
	* params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
	(PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
	* passes.def (pass_linterchange): New pass.
	* timevar.def (TV_LINTERCHANGE): New time var.
	* tree-pass.h (make_pass_linterchange): New declaration.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
	interchange.  Record IV before/after increment in new parameters.
	* tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
	* tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
	path check into...
	(check_reduction_path): ...New function here.
	* tree-vectorizer.h (check_reduction_path): New declaration.

2017-12-07  Vladimir Makarov  <vmakarov@redhat.com>

	PR target/83252
	PR rtl-optimization/80818
	* lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
	always early clobbered.
	* lra-lives.c (process_bb_lives): Check input hard regs for early
	clobbered non-operand hard reg.

2017-12-07  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/83164
	* tree-cfg.c (verify_gimple_assign_binary): Don't require
	types_compatible_p, just that TYPE_MODE is the same.

2017-12-07  Martin Sebor  <msebor@redhat.com>

	PR c/81544
	* attribs.c (empty_attribute_table): Initialize new member of
	struct attribute_spec.
	(decl_attributes): Add argument.  Handle mutually exclusive
	combinations of attributes.
	(selftests::test_attribute_exclusions): New function.
	(selftests::attribute_c_tests): Ditto.
	* attribs.h (decl_attributes): Add default argument.
	* selftest.h (attribute_c_tests): Declare.
	* selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
	* tree-core.h (attribute_spec::exclusions, exclude): New type and
	member.
	* doc/extend.texi (Common Function Attributes): Update const and pure.
	* config/alpha/alpha.c (vms_attribute_table): Initialize new member
	of struct attribute_spec.
	* config/arc/arc.c (arc_attribute_table): Same.
	* config/arm/arm.c (arm_attribute_table): Same.
	* config/avr/avr.c ( avr_attribute_table): Same.
	* config/bfin/bfin.c (bfin_attribute_table): Same.
	* config/cr16/cr16.c (cr16_attribute_table): Same.
	* config/epiphany/epiphany.c (epiphany_attribute_table): Same.
	* config/h8300/h8300.c (h8300_attribute_table): Same.
	* config/i386/i386.c (ix86_attribute_table): Same.
	* config/ia64/ia64.c (ia64_attribute_table): Same.
	* config/m32c/m32c.c (m32c_attribute_table): Same.
	* config/m32r/m32r.c (m32r_attribute_table): Same.
	* config/m68k/m68k.c (m68k_attribute_table): Same.
	* config/mcore/mcore.c (mcore_attribute_table): Same.
	* config/microblaze/microblaze.c (microblaze_attribute_table): Same.
	* config/mips/mips.c (mips_attribute_table): Same.
	* config/msp430/msp430.c (msp430_attribute_table): Same.
	* config/nds32/nds32.c (nds32_attribute_table): Same.
	* config/nvptx/nvptx.c (nvptx_attribute_table): Same.
	* config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Same.
	* config/rl78/rl78.c (rl78__attribute_table): Same.
	* config/rs6000/rs6000.c (rs6000_attribute_table): Same.
	* onfig/rx/rx.c (rx_attribute_table): Same.
	* config/s390/s390.c (s390_handle_vectorbool_attribute): Same.
	* config/sh/sh.c (sh_attribute_table): Same.
	* config/sparc/sparc.c (sparc_attribute_table): Same.
	* config/spu/spu.c (spu_attribute_table): Same.
	* config/stormy16/stormy16.c (xstormy16_attribute_table): Same.
	* config/v850/v850.c (v850_attribute_table): Same.
	* config/visium/visium.c (visium_attribute_table): Same.

2017-12-07  Tamar Christina  <tamar.christina@arm.com>

	PR target/82641
	* config/arm/arm.c (INCLUDE_STRING): Define.
	(arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
	(arm_declare_function_name): Conservatively emit .arch, .arch_extensions
	and .fpu.

2017-12-07  Michael Matz  <matz@suse.de>

	Add unroll and jam pass

	* gimple-loop-jam.c: New file.
	* Makefile.in (OBJS): Add gimple-loop-jam.o.
	* common.opt (funroll-and-jam): New option.
	* opts.c (default_options_table): Add unroll-and-jam at -O3.
	* params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
	(PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
	* passes.def: Add pass_loop_jam.
	* timevar.def (TV_LOOP_JAM): Add.
	* tree-pass.h (make_pass_loop_jam): Declare.
	* cfgloop.c (flow_loop_tree_node_add): Add AT argument.
	* cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
	* cfgloopmanip.c (duplicate_loop): Add AT argument, adjust call
	to flow_loop_tree_node_add.
	(duplicate_subloops, copy_loops_to): Append to sibling list.
	* cfgloopmanip.h: (duplicate_loop): Adjust declaration.
	* doc/invoke.texi (-funroll-and-jam): Document new option.
	(unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.

2017-12-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83296
	PR tree-optimization/67769
	* tree-ssa-phiopt.c (conditional_replacement): Do not reset
	flow sensitive info in an unrelated BB.
	(value_replacement): Use reset_flow_sensitive_info.
	(minmax_replacement): Reset flow sensitive info on the def
	we move.  Do not reset flow sensitive info in the whole BB
	we move the stmt to.
	(abs_replacement): Likewise.

2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/43871
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
	rs6000_cpu to the given -mcpu=, or to the default processor.

2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
	* config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
	instead of rs6000_cpu_attr.
	(rs6000_adjust_cost): Ditto.
	(is_microcoded_insn): Ditto.
	(rs6000_adjust_priority): Ditto.
	(rs6000_issue_rate): Ditto.
	(rs6000_use_sched_lookahead): Ditto.
	(rs6000_use_sched_lookahead_guard): Ditto.
	(rs6000_sched_reorder): Ditto.
	(force_new_group): Ditto.
	* config/rs6000/rs6000.md (cpu attribute): Ditto.
	(group_ending_nop): Ditto.

2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.opt (rs6000_tune): New variable.
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
	rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
	(rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
	appropriate.
	(rs6000_reassociation_width): Ditto.
	(rs6000_emit_epilogue): Ditto.
	(rs6000_adjust_cost): Ditto.
	(is_microcoded_insn): Ditto.
	(is_cracked_insn): Ditto.
	(rs6000_adjust_priority): Ditto.
	(rs6000_sched_reorder): Ditto.
	(rs6000_sched_reorder2): Ditto.
	(insn_must_be_first_in_group): Ditto.
	(insn_must_be_last_in_group): Ditto.
	(rs6000_register_move_cost): Ditto.
	* config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
	rs6000_cpu.

2017-12-07  Julia Koval  <julia.koval@intel.com>

	* config.gcc: Add vaesintrin.h.
	* config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
	New type.
	* config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
	__builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
	New builtins.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
	* config/i386/immintrin.h: Include vaesintrin.h.
	* config/i386/sse.md (vaesdec_<mode>): New pattern.
	* config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
	_mm_aesdec_epi128): New intrinsics.

2017-12-06  David Malcolm  <dmalcolm@redhat.com>

	* Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
	* spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
	c-family/c-spellcheck.cc.
	(best_macro_match::best_macro_match): Likewise.
	* spellcheck-tree.h
	(struct edit_distance_traits<cpp_hashnode *>): Move to
	c-family/c-spellcheck.h.
	(class best_macro_match): Likewise.

2017-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83293
	* gimple-ssa-strength-reduction.c (insert_initializers): Use
	GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
	might insert into empty bb.

	PR sanitizer/81281
	* match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
	simplify for plus with :c added, and pointer_plus without that.
	((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
	with undefined overflow and the conversion is not widening,
	perform negation in utype and only convert to type afterwards.
	((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
	simplify for plus with :c added, and pointer_plus without that.
	If type is integral with undefined overflow and the conversion is
	not widening, perform minus in utype and only convert to type
	afterwards.  Move the last pointer_diff_expr simplify into the
	two outermost ifs.

2017-12-06  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/82646
	* builtins.c (maybe_emit_chk_warning): Use size as the bound for
	strncpy, not maxlen.

2017-12-06  Martin Sebor  <msebor@redhat.com>

	* doc/invoke.texi (-Wstringop-truncation): Mention attribute
	nonstring.

	PR tree-optimization/83075
	* tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
	strncat/strncpy don't change length of source string.

2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>

	Revert
	2017-11-29  Martin Aberg  <maberg@gaisler.com>

	* config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
	to prevent b2bst errata sequence.
	(sqrtdf2_fix): Likewise.

2017-12-06  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/81945
	* cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
	* tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
	to dest_cfun has orig_loop_num set, either remap it to the new
	loop number if the loop got moved too, or clear it.

2017-12-05  Steve Ellcey  <sellcey@cavium.com>

	* config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
	to reservation.
	(thunderx2t99_nothing): New insn reservation.
	(thunderx2t99_mrs): New insn reservation.
	(thunderx2t99_multiple): New insn reservation.
	(thunderx2t99_alu_basi): Add bfx to reservation.
	(thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.

2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	PR target/82248
	* config/arm/arm.md (probe_stack) : Use the 'o' constraint.

2017-12-05  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
	tree-ssa-pre.c::remove_dead_inserted_code.
	* tree-ssa-dce.h: New file.
	* tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
	(remove_dead_inserted_code): Move and rename to function
	tree-ssa-dce.c::simple_dce_from_worklist.
	(pass_pre::execute): Update use.

2017-12-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83277
	* graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
	to code-gen liveout vars.

2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
	(aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
	(aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
	split condition.

2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>

	* config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
	function.
	(TARGET_ASAN_SHADOW_OFFSET): New macro definition.
	* config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
	ASAN is enabled.

2017-12-05  Richard Biener  <rguenther@suse.de>

	* timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL): Add.
	* tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
	(pass_data_cse_sincos): Use TV_TREE_SINCOS.
	(pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.

2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* dbxout.c (dbxout_block): Grow buf to 30 bytes.

2017-12-05  Martin Liska  <mliska@suse.cz>
	    Jakub Jelinek  <jakub@redhat.com>

	* doc/invoke.texi: Document the options.
	* flag-types.h (enum sanitize_code): Add
	SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
	* ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
	of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
	* opts.c: Define new sanitizer options.
	* sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
	(BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.

2017-12-05  Julia Koval  <julia.koval@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
	OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
	(ix86_handle_option): Handle -mavx512vnni.
	* config/i386/cpuid.h (bit_AVX512VNNI): New bit.
	* config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
	* config/i386/i386-c (__AVX512VNNI__): New.
	* config/i386/i386.c (ix86_target_string): Handle new option.
	(ix86_valid_target_attribute_inner_p): Handle new option.
	* config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
	* config/i386/i386.opt (mavx512vnni): New option.

2017-12-01  Jan Hubicka  <hubicka@ucw.cz>

	PR target/81616
	* athlon.md: Disable for generic.
	* haswell.md: Enable for generic.
	* i386.c (ix86_sched_init_global): Add core hooks for generic.
	* x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
	to 4.
	(ix86_adjust_cost): Move generic to haswell path.

2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>

	* config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
	instead of MEM_P in a couple more places.  Fix formatting issues.

2017-12-04  Jim Wilson  <jimw@sifive.com>

	* config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
	instead of GP_REG_LAST-1.
	(riscv_adjust_libcall_cfi_prologue): Likewise.
	(riscv_adjust_libcall_cri_epilogue): Likewise.
	* config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
	comment.

2017-12-04  Luis Machado  <luis.machado@linaro.org>

	* ipa-pure-const.c (check_decl): Add missing newline.
	(state_from_flags): Likewise.

2017-12-04  Jeff Law  <law@redhat.com>

	PR tree-optimizatin/78496
	* gimple-ssa-evrp-analyze.h
	(evrp_range_analyzer::get_vr_values): Simplify.
	* gimple-ssa-evrp-analyze.c: Corresponding changes.
	* tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
	and gimple-ssa-evrp-analyze.h.
	(dom_opt_dom_walker class): Add evrp_range_analyzer member.
	(simplify_stmt_for_jump_threading): Copy a blob of code from
	tree-vrp.c to use ranges to simplify statements.
	(dom_opt_dom_walker::before_dom_children): Call
	evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
	(dom_opt_dom_walker::after_dom_children): Similarly for
	evrp_range_analyzer::leave.
	(dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
	conditionals.

	* gimple-ssa-evrp-analyze.c
	(evrp_range_analyzer::extract_range_from_stmt):  Always use
	vr_values::update_value_range so preexisting range info is
	medged with new range info, even if the new range is VR_VARYING.

2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine.c: Adjust comment.
	(use_crosses_set_p): Delete.
	(can_combine_p): Use modified_between_p instead of use_crosses_set_p.
	(try_combine): Ditto.

2017-12-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83255
	* graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
	Re-add zero-iteration check.

2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83245
	* lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
	hard registers as earlyclobber, also if not in an asm.

2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>

	PR bootstrap/83265
	Revert
	2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/43871
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
	rs6000_cpu based on cpu_index, not tune_index.

2017-12-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83238
	* graphite-scop-detection.c (scop_detection::merge_sese): Make
	code match comment, rejecting invalid SESE regions.

2017-12-03  John David Anglin  <danglin@gcc.gnu.org>

	* config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
	require base operand is a REG_POINTER prior to reload on targets
	with non-equivalent space registers.

2017-12-01  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
	(update_specialized_profile): Fix updating of counts.
	(perhaps_add_new_callers): Likewise.

2017-12-01  Jan Hubicka  <hubicka@ucw.cz>

	PR target/81616
	* x86-tune.def: Remove obsolette FIXMEs.
	(X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
	(X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
	X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
	Enable for generic.
	(X86_TUNE_PAD_RETURNS): Disable for generic.

2017-12-02  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83170
	PR tree-optimization/83241
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::try_coalesce_bswap): Update vuse field from
	gimple_vuse (ins_stmt) in case it has changed.
	(imm_store_chain_info::output_merged_store): Likewise.

	* tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
	POINTER_DIFF_EXPR.

	PR c++/81212
	* tree-cfg.c (pass_warn_function_return::execute): Handle
	__builtin_ubsan_handle_missing_return like __builtin_unreachable
	with BUILTINS_LOCATION.

	PR target/78643
	PR target/80583
	* expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
	is BLKmode for vector field with vector raw mode, use TYPE_MODE
	instead of DECL_MODE.

	* config/i386/i386-protos.h (standard_sse_constant_opcode): Change
	last argument to rtx pointer.
	* config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
	with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
	or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
	depending on the chosen ISAs.
	* config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
	*movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
	*movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
	callers.
	* config/i386/sse.md (mov<mode>_internal): Likewise.
	* config/i386/mmx.md (*mov<mode>_internal): Likewise.

2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>

	* doc/invoke.texi (-dp): Say that instruction cost is printed as well.

2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
	parameters from prototype.
	* config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
	parameters.  Don't print a comment.
	(emit_fusion_gpr_load): Adjust.
	(emit_fusion_load_store): Adjust.
	* config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
	* config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
	comment on the second line.

2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/43871
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Set
	rs6000_cpu based on cpu_index, not tune_index.

2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>

	* final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
	which_alternative instead of which_alternative + 1.
	(output_asm_insn): Print an extra tab if the template is short.

2017-12-01  Jim Wilson  <jimw@sifive.com>

	* common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
	comment.
	* config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
	* doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
	reference.
	* doc/tm.texi: Regenerate.

2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81959
	* config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
	whether we can allocate pseudos before trying to fix an address.
	* config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
	memory address is indexed or indirect.
	(floatuns_<mode>si2_hw2): Likewise.

2017-12-01  Jason Merrill  <jason@redhat.com>

	* Makefile.in (TAGS): Add c-family/*.cc.

2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
	(call_value_insn): Likewise.
	(sibcall_insn): Likewise.
	(sibcall_value_insn): Likewise.
	(movsi_aarch64): Likewise.
	(movdi_aarch64): Likewise.
	(add_losym_): Likewise.
	(ldr_got_small_): Likewise.
	(ldr_got_small_sidi): Likewise.
	(ldr_got_small_28k_): Likewise.
	(ldr_got_small_28k_sidi): Likewise.
	* config/aarch64/aarch64.c (aarch64_print_address_internal):
	Move output_addr_const to symbolic case. Add error check.

2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/predicates.md (plus16_Q_operand): New predicate.
	* config/s390/s390.md: Disable MVC merging peephole if it would
	disable operand forwarding.
	(new peephole2): Split MVCs if it would turn them into up to 2
	forwardable MVCs.

2017-12-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83232
	* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
	detection of same access. Instead of breaking the group here
	do not consider the duplicate.  Add comment explaining real fix.

2017-12-01  Jonathan Wakely  <jwakely@redhat.com>

	* doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.

2017-12-01  Sudakshina Das  <sudi.das@arm.com>

	* config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.

2017-12-01  Jakub Jelinek  <jakub@redhat.com>

	* function.h (struct function): Remove cilk_frame_decl,
	is_cilk_function and calls_cilk_spawn fields.
	* tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
	field.
	* omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
	cilk_elemental field.
	* cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
	* target.def: Adjust comment.
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Don't test cilk_elemental.

	PR tree-optimization/83233
	* gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
	bswap_stat name for the struct.

	PR c/79153
	* tree.h (SWITCH_BREAK_LABEL_P): Define.
	* gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
	starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
	SWITCH_BREAK_LABEL_P set on the label.
	(gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
	added for default case if it was missing and not all cases covered.
	Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
	switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
	set on the label.
	* tree-chrec.c (evolution_function_is_univariate_p): Add return true;
	to avoid -Wimplicit-fallthrough warning.
	* config/i386/i386.c (ix86_expand_special_args_builtin): Add
	FALLTHRU comment to avoid -Wimplicit-fallthrough warning.

	PR tree-optimization/83221
	* tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
	down by 16.
	(init_reassoc): Formatting fix.

	PR sanitizer/81275
	* tree-cfg.c (group_case_labels_stmt): Don't optimize away
	C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
	is diagnosed.

	PR sanitizer/83219
	* tree-cfg.c: Include asan.h.
	(gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.

2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.

2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
	vpcmpeqd instruction.

2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.c (standard_sse_constant_opcode): Fix
	registers type for 128bit mode.

2017-11-30  Jakub Jelinek  <jakub@redhat.com>

	* spellcheck-tree.c (test_find_closest_identifier): Use ; instead
	of ;;.
	* gengtype-state.c (read_state_pair): Likewise.
	* gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
	* sel-sched-dump.c (dump_insn_rtx_1): Likewise.
	* ipa-cp.c (intersect_aggregates_with_edge): Likewise.
	* ifcvt.c (noce_try_store_flag_constants): Likewise.
	* tree-ssa-ccp.c (ccp_finalize): Likewise.
	* omp-grid.c (grid_process_kernel_body_copy): Likewise.
	* builtins.c (fold_builtin_3): Likewise.
	* graphite-scop-detection.c
	(scop_detection::stmt_has_simple_data_refs_p): Likewise.
	* hsa-gen.c (hsa_function_representation::hsa_function_representation):
	Likewise.

2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR sanitizer/81697
	* asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
	parameter. Return true if ignore_decl_rtl_set_p is true and other
	conditions are satisfied.
	* asan.h (asan_protect_global): Add new parameter.
	* varasm.c (categorize_decl_for_section): Pass true as second parameter
	to asan_protect_global calls.

2017-11-30  Jim Wilson  <jimw@sifive.com>

	* doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
	-mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
	-mstrict-align, add info on default value.  Delete redundant lines for
	-mabi.  Add missing -mexplicit-relocs docs.

2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (trap): New pattern.

2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
	instruction to end into a delay slot.
	* config/arc/arc.md (cond_delay_insn): Check if the instruction
	can be placed into a delay slot against reg_note.

2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
	labels number of usages.

2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
	function.
	(TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.

2017-11-30  Jakub Jelinek  <jakub@redhat.com>

	PR target/83210
	* internal-fn.c (expand_mul_overflow): Optimize unsigned
	multiplication by power of 2 constant into two shifts + comparison.

2017-11-30  Jan Hubicka  <hubicka@ucw.cz>

	PR target/81616
	* config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.

2017-11-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83202
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
	allow_peel argument and guard peeling.
	(canonicalize_loop_induction_variables): Likewise.
	(canonicalize_induction_variables): Pass false.
	(tree_unroll_loops_completely_1): Pass unroll_outer to disallow
	peeling from cunrolli.

2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine.c (try_combine): Print a message to dump file whenever
	I0, I1, or I2 cannot be combined into I3.

2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/83156
	PR rtl-optimization/82621
	* combine.c (try_combine): Don't split an I2 if one of the dests is
	set again before I3.  Allow unused dests.

2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.

2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80818
	* lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
	recursively.  Use insn code for clobber.
	(lra_set_insn_recog_data): Pass the new arg to
	collect_non_operand_hard_regs.
	(add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
	code for clobber.
	(lra_update_insn_regno_info): Pass insn to
	add_regs_to_insn_regno_info.

2017-11-29  Jim Wilson  <jimw@sifive.com>
	    Andrew Waterman  <andrew@sifive.com>

	* config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
	(riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
	SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
	use SINGLE_SHIFT_COST.
	* config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
	(lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.

2017-11-29  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
	_mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
	_mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
	_mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
	* config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
	_mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
	_mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
	_mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
	_mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
	_mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
	_mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
	* config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
	__builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_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_v16si, __builtin_ia32_vpshldv_v16si_mask,
	__builtin_ia32_vpshldv_v16si_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_v8di,
	__builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_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): New builtins.
	* config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
	vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.

2017-11-29  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
	_mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
	_mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
	_mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
	* config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
	_mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
	_mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
	_mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
	_mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
	_mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
	_mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
	* config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
	V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
	V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
	V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
	V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
	V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
	V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
	* config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
	vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.

2017-11-29  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
	movsi_pic_gotdata_op instruction as a load for the UT699 errata
	workaround.

2017-11-29  Martin Aberg  <maberg@gaisler.com>

	* config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
	to prevent b2bst errata sequence.
	(sqrtdf2_fix): Likewise.

2017-11-29  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (fpop_reg_depend_p): New function.
	(div_sqrt_insn_p): New function.
	(sparc_do_work_around_errata): Insert NOP instructions to
	prevent sequences that could trigger the TN-0013 errata for
	certain LEON3 processors.
	(pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
	(sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
	* config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
	(in_branch_delay): Prevent div and sqrt in delay slot if
	fix_lost_divsqrt.
	* config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.

2017-11-29  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (atomic_insn_p): New function.
	(sparc_do_work_around_errata): Insert NOP instructions to
	prevent sequences that could trigger the TN-0010 errata for
	UT700.
	* config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
	instruction referable in atomic_insns_p.

2017-11-29  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
	(atomic_compare_and_swap_leon3_1): Likewise.
	(ldstub): Likewise.

2017-11-29  Daniel Cederman  <cederman@gaisler.com>

	* config/sparc/sparc.c (fpop_insn_p): New function.
	(sparc_do_work_around_errata): Insert NOP instructions to
	prevent sequences that could trigger the TN-0012 errata for
	GR712RC.
	(pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
	* config/sparc/sparc.md (fix_gr712rc): New attribute.
	(in_branch_annul_delay): Prevent floating-point instructions
	in delay slot of annulled integer branch.

2017-11-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83202
	* tree-vect-slp.c (scalar_stmts_set_t): New typedef.
	(bst_fail): Use it.
	(vect_analyze_slp_cost_1): Add visited set, do not account SLP
	nodes vectorized to the same stmts multiple times.
	(vect_analyze_slp_cost): Allocate a visited set and pass it down.
	(vect_analyze_slp_instance): Adjust.
	(scalar_stmts_to_slp_tree_map_t): New typedef.
	(vect_schedule_slp_instance): Add a map recording the SLP node
	representing the vectorized stmts for a set of scalar stmts.
	Avoid code-generating redundancies.
	(vect_schedule_slp): Allocate map and pass it down.

2017-11-29  Nathan Sidwell  <nathan@acm.org>

	PR c++/83187
	* tree.c (build_complex_type): Fix canonicalization.  Only fill in
	type if it is new.

2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_print_operand): Add new
	cases for printing LDP/STP memory addresses.
	(aarch64_print_address_internal): Renamed from
	aarch64_print_operand_address, added parameter, add Pmode check.
	(aarch64_print_ldpstp_address): New function for LDP/STP addresses.
	(aarch64_print_operand_address): Indirect to
	aarch64_print_address_internal.
	* config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
	'y' operand output specifier.

2017-11-29  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/83185
	* tree.c (build_simple_mem_ref_loc): Handle
	get_addr_base_and_unit_offset returning a MEM_REF.

	PR middle-end/80929
	* rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.

	PR target/80819
	* config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
	alternative.

2017-11-28  David Malcolm  <dmalcolm@redhat.com>

	* diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
	m_x_offset.
	(layout::move_to_column): Likewise.

2017-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/81275
	* tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
	is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).

2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
	    Martin Jambor  <mjambor@suse.cz>

	PR ipa/82808
	* tree.h (expr_type_first_operand_type_p): Declare
	* tree.c (expr_type_first_operand_type_p): New function.
	* ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
	(ipa_value_from_jfunc): Adjust declaration.
	* ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
	Use it as result type for arithmetics, unless it is NULL in which case
	be more conservative.
	(ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
	ipa_get_jf_pass_through_result.
	(propagate_vals_across_pass_through): Likewise.
	(propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
	is to propagate_vals_across_pass_through.
	(propagate_constants_across_call): Pass PARM_TYPE to
	propagate_scalar_across_jump_function.
	(find_more_scalar_values_for_callers_subset): Pass parameter type to
	ipa_value_from_jfunc.
	(cgraph_edge_brings_all_scalars_for_node): Likewise.
	* ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
	to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
	* ipa-prop.c (try_make_edge_direct_simple_call): New parameter
	target_type, pass it to ipa_value_from_jfunc.
	(update_indirect_edges_after_inlining): Pass parameter type to
	try_make_edge_direct_simple_call.

2017-11-28  Jeff Law  <law@redhat.com>

	* gimple-ssa-evrp-analyze.c
	(evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
	refine ranges if scev_initialized_p returns true.
	* vr-values.c (vr_values::extract_range_from_phi_node): Likewise.

2017-11-28  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
	_mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
	_mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
	_mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
	* config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
	_mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
	_mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
	_mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
	_mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
	_mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
	_mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
	* config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
	__builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
	__builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
	__builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
	__builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
	__builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
	__builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
	__builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
	__builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
	__builtin_ia32_vpshrd_v2di_mask): New builtins.
	* config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.

2017-11-28  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
	_mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
	_mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
	_mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
	* config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
	_mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
	_mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
	_mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
	_mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
	_mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
	_mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
	* config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
	V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
	V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
	V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
	V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
	V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
	V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
	V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
	V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
	* config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
	__builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
	__builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
	__builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
	__builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
	__builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
	__builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
	__builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
	__builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
	__builtin_ia32_vpshld_v2di_mask): New builtins.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
	* config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.

2017-11-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80776
	* gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
	Declare.
	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
	New function.
	(evrp_range_analyzer::record_ranges_from_incoming_edges):
	If the incoming edge is an effective fallthru because the other
	edge only reaches a __builtin_unreachable () then record ranges
	derived from the controlling condition in SSA info.
	(evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
	(evrp_range_analyzer::record_ranges_from_stmt): Likewise.

2017-11-28  Olivier Hainque  <hainque@adacore.com>

	* Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
	on mingw build hosts.

2017-11-28  Jakub Jelinek  <jakub@redhat.com>

	PR debug/81307
	* dbxout.c (dbx_block_with_cold_children): Fix function comment.

2017-11-28  Richard Biener  <rguenther@suse.de>

	PR middle-end/83141
	* gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
	copies generated from memcpy use a character array as reference
	type.

2017-11-28  Julia Koval  <julia.koval@intel.com>
	    Sebastian Peryt  <sebastian.peryt@intel.com>

	* Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
	c-family/c-cilkplus.o, c-family/array-notation-common.o,
	cilk-common.o, cilk.h, cilk-common.c): Remove.
	* builtin-types.def
	(BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
	* builtins.c (is_builtin_name): Remove cilkplus condition.
	(BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
	* builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
	cilk-builtins.def, cilkplus.def): Remove.
	* cif-code.def (CILK_SPAWN): Remove.
	* cilk-builtins.def: Delete.
	* cilk-common.c: Ditto.
	* cilk.h: Ditto.
	* cilkplus.def: Ditto.
	* config/darwin.h (fcilkplus): Delete.
	* cppbuiltin.c: Ditto.
	* doc/extend.texi: Remove cilkplus doc.
	* doc/generic.texi: Ditto.
	* doc/invoke.texi: Ditto.
	* doc/passes.texi: Ditto.
	* gcc.c (fcilkplus): Remove.
	* gengtype.c (cilk.h): Remove.
	* gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
	support.
	* gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
	Remove.
	* gimplify.c (gimplify_return_expr, maybe_fold_stmt,
	gimplify_call_expr,
	is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
	gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
	cilkplus conditions.
	* ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
	inline_read_section): Ditto.
	* ipa-inline-analysis.c (cilk.h): Remove.
	* ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
	* lto-wrapper.c (merge_and_complain, append_compiler_options,
	append_linker_options): Remove condition for fcilkplus.
	* lto/lto-lang.c (cilk.h): Remove.
	(lto_init): Remove condition for fcilkplus.
	* omp-expand.c (expand_cilk_for_call): Delete.
	(expand_omp_taskreg, expand_omp_for_static_chunk,
	expand_omp_for): Remove cilkplus
	conditions.
	(expand_cilk_for): Delete.
	* omp-general.c (omp_extract_for_data): Remove cilkplus support.
	* omp-low.c (scan_sharing_clauses, create_omp_child_function,
	execute_lower_omp, diagnose_sb_0): Ditto.
	* omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
	* tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
	* tree-nested.c: Ditto.
	* tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
	(dump_generic_node): Ditto.
	* tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
	* tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
	Delete.
	* tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.

2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

	* config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
	* config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
	for vector mode and !TARGET_SIMD.

2017-11-28  Jakub Jelinek  <jakub@redhat.com>

	* tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
	Adjust comment.
	* tree.h (SWITCH_LABELS): Remove.
	* gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
	assert SWITCH_BODY is non-NULL.
	* tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
	handling.
	* tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.

	PR tree-optimization/80788
	* match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
	has TREE_OVERFLOW set, call drop_tree_overflow.

2017-11-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83158
	* tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more cases.

2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>

	PR 81288/target
	* config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
	TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.

2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
	LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.

2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR middle_end/82333
	* varasm.c (compare_constant): Take the mode of the constants into
	account when comparing floating point constants.

2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>

	* hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
	from explicit instantiation of debug_helper.
	* vec.h (DEFINE_DEBUG_VEC): Ditto.

2017-11-27  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
	refactor a bit.

2017-11-27  Richard Biener  <rguenther@suse.de>

	* tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
	(type_hash_canon): Also clear int_cst_hash_table entry for
	TYPE_MIN/MAX_VALUE.
	(build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.

2017-11-27  Tamar Christina  <tamar.christina@arm.com>

	* doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
	* doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
	* doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).

2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>

	* hash-map.h (gt_cleare_cache): Avoid UB.

2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>

	* cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
	* loop-unroll.c (decide_unroll_constant_iterations): Implement it.
	(decide_unroll_runtime_iterations): Likewise.
	(decide_unroll_stupid): Likewise.

2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	PR target/83109
	* config/i386/i386.md: Add a loop with incssp.

2017-11-27  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/81248
	* tree-sra.c (splice_param_accesses): Remove size check.
	(decide_one_param_reduction): Fix size check.
	* gimple-pretty-print.c (dump_profile): Silence warning.
	* params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.

2017-11-27  Jakub Jelinek  <jakub@redhat.com>

	PR debug/81307
	* dbxout.c (lastlineno): New variable.
	(dbx_debug_hooks): Use dbxout_switch_text_section as
	switch_text_section debug hook.
	(dbxout_function_end): Switch to current_function_section
	rather than function_section.  If crtl->has_bb_partition,
	output just one N_FUN, depending on in_cold_section_p.
	(dbxout_source_line): Remember last lineno in lastlineno.
	(dbxout_switch_text_section): New function.
	(dbxout_function_decl): Adjust dbxout_block caller.
	(dbx_block_with_cold_children): New function.
	(dbxout_block): Return true if any LBRAC/RBRAC have been
	emitted.  Use dbx_block_with_cold_children at depth == 0
	in second partition.  Add PARENT_BLOCKNUM argument, pass
	it optionally adjusted to children.  Output LBRAC/RBRAC
	around recursive call only if the block is in the current
	partition, if not and anything was output, emit empty
	range LBRAC/RBRAC.
	* final.c (final_scan_insn): Compute cold_function_name
	before calling switch_text_section debug hook.  Call
	that hook even if dwarf2out_do_frame if not emitting
	dwarf debug info.

	PR target/83100
	* varasm.c (bss_initializer_p): Return true for DECL_COMMON
	TREE_READONLY decls.

2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>

	PR rtl-optimization/82488
	* expr.c (fixup_args_size_notes): Avoid signed integer overflow.

2017-11-26  Julia Koval  <julia.koval@intel.com>

	* config/i386/i386.c (processor_target_table): Add skylake_cost for
	skylake-avx512.
	* config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
	skylake_cost): New.

2017-11-26  Julia Koval  <julia.koval@intel.com>

	* config/i386/driver-i386.c (host_detect_local_cpu):
	Detect skylake-avx512.

2017-11-26  Julia Koval  <julia.koval@intel.com>

	* config.gcc: Add -march=cannonlake.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
	* config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
	(PTA_CANNONLAKE): New.
	(processor_target_table): Add cannonlake.
	(ix86_option_override_internal): Ditto.
	(fold_builtin_cpu): Ditto.
	(get_builtin_code_for_version): Handle cannonlake.
	(M_INTEL_COREI7_CANNONLAKE): New.
	* config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
	* doc/invoke.texi: Add -march=cannonlake.

2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>

	* plugin.c (add_new_plugin): Use platform-specific library extensions.
	(try_init_one_plugin): Alternative implementation for MinGW.
	* Makefile.in (plugin_implib): New.
	(gengtype-lex.c): Fix broken AIX workaround.
	* configure: Regenerate.
	* doc/plugins.texi: Document support for MinGW.

2017-11-25  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/81553
	* combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
	to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
	is a shift where C1 has different mode than the whole shift, use C1's
	mode for MULT rather than the shift's mode.

	PR target/82848
	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
	builtins not enabled in the currently selected ISA.

2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>

	PR tree-optimization/71026
	* tree-ssa-math-opts (is_division_by_square, is_square_of): New.
	(insert_reciprocals): Change to insert reciprocals before a division
	by a square and to insert the square of a reciprocal.
	(execute_cse_reciprocals_1): Change to consider division by a square.
	(register_division_in): Add importance parameter.

2017-11-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82402
	* tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
	set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.

2017-11-24  Marc Glisse  <marc.glisse@inria.fr>

	* match.pd (0-ptr): New transformation.

2017-11-24  Jan Hubicka  <hubicka@ucw.cz>

	PR bootstrap/83015
	* ipa-inline.c (inline_small_functions): Set current badnes correctly
	when skipping checking.

2017-11-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83128
	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
	(vn_reference_lookup_3): Likewise.

2017-11-24  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/83014
	* ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
	instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
	tree_to_uhwi twice.

	* tree-object-size.c (pass_through_call): Use gimple_call_return_flags
	ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
	check for the latter with gimple_call_builtin_p.  Do not handle
	BUILT_IN_STPNCPY_CHK which is not a pass through call.

2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>

	* config/arm/arm_neon.h: Fix pragma GCC push_options before
	vdot_u32.

2017-11-23  Julia Koval  <julia.koval@intel.com>

	* config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
	_mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
	_mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
	_mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
	_mm512_maskz_expandloadu_epi16): New intrinsics.
	* config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
	_mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
	_mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
	_mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
	_mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
	_mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
	_mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
	_mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
	_mm256_maskz_expandloadu_epi8): New intrinsics.
	* config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
	V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
	V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
	V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
	* config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
	* config/i386/sse.md (VI248_VLBW): New iterator.
	(expand<mode>_mask, expand<mode>_maskz): New patterns.

2017-11-23  Julia Koval  <julia.koval@intel.com>

	* config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
	* config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
	_mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
	_mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
	_mm512_mask_compressstoreu_epi16): New.
	* config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
	_mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
	_mm_mask_compress_epi16, _mm_maskz_compress_epi16,
	_mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
	_mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
	_mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
	_mm256_mask_compressstoreu_epi8): New.
	* config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
	VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
	VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
	VOID_FTYPE_PV8HI_V8HI_UQI): New types.
	* config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
	__builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
	__builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
	__builtin_ia32_compresshi128_mask,
	__builtin_ia32_compressstoreuqi512_mask,
	__builtin_ia32_compressstoreuhi512_mask,
	__builtin_ia32_compressstoreuqi256_mask,
	__builtin_ia32_compressstoreuqi128_mask,
	__builtin_ia32_compressstoreuhi256_mask,
	__builtin_ia32_compressstoreuhi128_mask): New builtins.
	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
	array for flags2.
	(ix86_expand_special_args_builtin): Handle new types.
	(s4fma_expand): Handle new builtin array.
	* config/i386/immintrin.h: Include new headers.
	* config/i386/sse.md (VI12_AVX512VLBW): New iterator.
	(compress<mode>_mask, compressstore<mode>_mask): New patterns.

2017-11-23  Jakub Jelinek  <jakub@redhat.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
	fixes.  Declare temp and g variables at the top in order to avoid
	{} in most of the cases.

2017-11-23  Marc Glisse  <marc.glisse@inria.fr>

	* match.pd (ptr-0): New transformation.

2017-11-23  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/arm-protos.h (enum arm_addr_mode_op): New.
	(struct addr_mode_cost_table): New.
	(struct tune_params): Add field addr_mode_costs.
	* config/arm/arm.c (generic_addr_mode_costs): New.
	(arm_slowmul_tune): Initialise addr_mode_costs field.
	(arm_fastmul_tune): Likewise.
	(arm_strongarm_tune): Likewise.
	(arm_xscale_tune): Likewise.
	(arm_9e_tune): Likewise.
	(arm_marvell_pj4_tune): Likewise.
	(arm_v6t2_tune): Likewise.
	(arm_cortex_tune): Likewise.
	(arm_cortex_a8_tune): Likewise.
	(arm_cortex_a7_tune): Likewise.
	(arm_cortex_a15_tune): Likewise.
	(arm_cortex_a35_tune): Likewise.
	(arm_cortex_a53_tune): Likewise.
	(arm_cortex_a57_tune): Likewise.
	(arm_exynosm1_tune): Likewise.
	(arm_xgene1_tune): Likewise.
	(arm_cortex_a5_tune): Likewise.
	(arm_cortex_a9_tune): Likewise.
	(arm_cortex_a12_tune): Likewise.
	(arm_cortex_a73_tune): Likewise.
	(arm_v7m_tune): Likewise.
	(arm_cortex_m7_tune): Likewise.
	(arm_v6m_tune): Likewise.
	(arm_fa726te_tune): Likewise.
	(arm_mem_costs): Use table lookup to calculate cost of addressing mode.

2017-11-23  Charles Baylis  <charles.baylis@linaro.org>

	* config/arm/arm.c (arm_mem_costs): New function.
	(arm_rtx_costs_internal): Use arm_mem_costs.

2017-11-23  Mark Wielaard  <mark@klomp.org>

	* dwarf2out.c (init_sections_and_labels): Use generation to create
	unique ranges_section_label and ranges_base_label. Return generation.
	(output_rnglists): Add generation argument. Use generation to create
	unique ranges labels.
	(dwarf2out_finish): Get generation from init_sections_and_labels
	and pass generation to output_rnglists.

2017-11-23  Mike Stump  <mikestump@comcast.net>
	    Eric Botcazou  <ebotcazou@adacore.com>

	* doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
	* cfgloop.h (struct loop): Add unroll field.
	* function.h (struct function): Add has_unroll bitfield.
	* gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
	(gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
	* loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
	(pass_rtl_unroll_loops::gate): Likewise.
	* loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
	for which loop->unroll==1.
	(decide_unroll_constant_iterations): Use note for consistency and
	take loop->unroll into account.  Return early if loop->unroll is set.
	Fix thinko in existing test.
	(decide_unroll_runtime_iterations): Use note for consistency and
	take loop->unroll into account.
	(decide_unroll_stupid): Likewise.
	* lto-streamer-in.c (input_cfg): Read loop->unroll.
	* lto-streamer-out.c (output_cfg): Write loop->unroll.
	* tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
	New case.
	(replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
	(print_loop): Print loop->unroll if set.
	* tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
	* tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
	* tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
	New case.
	* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
	loop->unroll is set and smaller than the trip count.  Otherwise bypass
	entirely the heuristics if loop->unroll is set.  Remove dead note.
	Fix off-by-one bug in other note.
	(try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
	(tree_unroll_loops_completely_1): Force unrolling if loop->unroll
	is greater than 1.
	(tree_unroll_loops_completely): Make static.
	(pass_complete_unroll::execute): Use correct type for variable.
	(pass_complete_unrolli::execute): Fix formatting.
	* tree.def (ANNOTATE_EXPR): Add 3rd operand.

2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.h (TARGET_PREFER_AVX256): Also
	enable when TARGET_PREFER_AVX128 is set.

2017-11-23  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
	frequency.
	* cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
	(cgraph_edge::maybe_hot_p): Use sreal frequencies.

2017-11-23  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-fnsummary.c (record_modified_bb_info): Use sreal
	frequencies. Fix estimation of aggregate parameters.

2017-11-23  Jan Hubicka  <hubicka@ucw.cz>

	* cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
	when inlining.

2017-11-23  Tom de Vries  <tom@codesourcery.com>

	* config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".

2017-11-23  Tom de Vries  <tom@codesourcery.com>

	* config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
	macro.

2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>

	PR target/83111
	* config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
	sibcall_value_pcrel_fdpic): Use local variable instead of
	operands[3].
	(calli_tbr_rel): Add missing operand 2.
	(call_valuei_tbr_rel): Add missing operand 3.

2017-11-23  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/82253
	* expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
	bitpos/bitsize covering the whole destination, use store_expr only if
	the complex mode is the same.  Otherwise, use expand_normal and if
	it returns CONCAT, subreg each part separately instead of trying to
	subreg the whole result.

2017-11-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/23094
	* tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
	come here from walking over backedges in the first iteration.
	(vn_reference_lookup_3): Skip clobbers that store the same value.

2017-11-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81403
	* tree-ssa-pre.c (get_representative_for): Add parameter specifying
	a block we need a leader relative to.
	(phi_translate_1): For nary processing require a leader from
	get_representative_for given we run expression simplification
	using match-and-simplify.  Remove previous fix.

2017-11-22  Jeff Law  <law@redhat.com>

	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
	Use new method allocate_value_range rather than accessing the
	vrp_value_range_pool data member directly.
	* tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
	to use extract_range_from_stmt method to avoid need for
	extract_range_from_assignment method.
	(vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
	method rather than setting values_propgated data member directly.
	* vr-values.h (class vr_values): Privatize vrp_value_range_pool,
	and values propagated data members and extract_range_from_assignment
	method.  Reorder private data members to conform to standards.
	Add new methods set_lattice_propagation_complete and
	allocate_value_range.

2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/83030
	* doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
	for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
	(Insns): Delete entry for REG_CROSSING_JUMP in register notes.
	* bb-reorder.c (update_crossing_jump_flags): Do not test whether the
	CROSSING_JUMP_P flag is already set before setting it.
	* cfgrtl.c (fixup_partition_crossing): Likewise.
	* reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
	insn as useless.

2017-11-22  Jakub Jelinek  <jakub@redhat.com>

	* simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
	Handle the case where both arguments are using gen_const_vec_series.

2017-11-22  David Malcolm  <dmalcolm@redhat.com>

	PR c++/62170
	* pretty-print.c (pp_format): Move quoting implementation to
	pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
	to pass address of "quote" local.
	(pp_begin_quote): New function.
	(pp_end_quote): New function.
	* pretty-print.h (printer_fn): Convert penultimate param from bool
	to bool *.
	(pp_begin_quote): New decl.
	(pp_end_quote): New decl.
	* tree-diagnostic.c (default_tree_printer): Convert penultimate
	param from bool to bool *.
	* tree-diagnostic.h (default_tree_printer): Likewise.

2017-11-22  Jeff Law  <law@redhat.com>

	* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
	Initialize vr_values.
	(evrp_range_analyzer::try_find_new_range): Call methods attached to
	vr_values via vr_values class instance rather than delegators.
	(evrp_range_analyzer::record_ranges_from_phis): Likewise.
	(evrp_range_analyzer::record_ranges_from_stmt): Likewise.
	(evrp_range_analyzer::push_value_range): Likewise.
	(evrp_range_analyzer::pop_value_range): Likewise.
	* gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
	most delegators.  Those remaining are exposed as public interfaces.
	Make vr_values a pointer and private.
	(evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
	vr_values.
	(evrp_range_analyzer::get_vr_value): New method.
	* gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
	(evrp_folder::evrp_folder): New ctor to initialize vr_values.
	(class evrp_dom_walker): Attach evrp_folder class, initialize
	it in the ctor.  Remove temporary delegators.
	(evrp_dom_walker::before_dom_children): Call methods in attached
	evrp_range_analyzer class via class instance pointer.  Use
	free value_range_constant_singleton to remove need for
	op_with_constant_singleton_value delegator method.  Do not
	create a vrp_prop class instance for every call!  Narrow
	scope of a couple variables.
	(evrp_dom_walker::cleanup): Call methods in attached
	evrp_range_analyzer class via class instance pointer.
	* vr-values.h (class vr_values): Privatize many methods and
	data members.

2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
	* cfgexpand.c (expand_debug_expr): Remove handling for them.
	* expr.c (expand_expr_real_2): Likewise.
	* fold-const.c (const_unop): Likewise.
	* optabs-tree.c (optab_for_tree_code): Likewise.
	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	(op_code_prio): Likewise.
	(op_symbol_code): Likewise.
	* internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
	(IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
	* internal-fn.c (direct_internal_fn_optab): New function.
	(direct_internal_fn_array, direct_internal_fn_supported_p
	(internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
	* fold-const-call.c (fold_const_reduction): New function.
	(fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
	CFN_REDUC_MIN.
	* tree-vect-loop.c: Include internal-fn.h.
	(reduction_code_for_scalar_code): Rename to...
	(reduction_fn_for_scalar_code): ...this and return an internal
	function.
	(vect_model_reduction_cost): Take an internal_fn rather than
	a tree_code.
	(vect_create_epilog_for_reduction): Likewise.  Build calls rather
	than assignments.
	(vectorizable_reduction): Use internal functions rather than tree
	codes for the reduction operation.  Update calls to the functions
	above.
	* config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
	Use calls to internal functions rather than REDUC tree codes.
	* config/aarch64/aarch64-simd.md: Update comment accordingly.

2017-11-22  Olivier Hainque  <hainque@adacore.com>

	* config/vxworks.c (vxworks_override_options): Pick default
	dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
	* config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
	DWARF_GNAT_ENCODINGS_DEFAULT.
	* config/vxworksae.h: Likewise.

2017-11-22  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/83104
	* vr-values.c (simplify_stmt_using_ranges): Check integral argument,
	not result.

2017-11-22  Marek Polacek  <polacek@redhat.com>
	    H.J. Lu  <hongjiu.lu@intel.com>
	    Jason Merrill  <jason@redhat.com>

	PR c++/60336
	PR middle-end/67239
	PR target/68355
	* calls.c (initialize_argument_information): Call
	warn_parameter_passing_abi target hook.
	(store_one_arg): Use 0 for empty record size.  Don't push 0 size
	argument onto stack.
	(must_pass_in_stack_var_size_or_pad): Return false for empty types.
	* common.opt: Update -fabi-version description.
	* config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
	(ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
	int_size_in_bytes.
	(ix86_is_empty_record): New function.
	(ix86_warn_parameter_passing_abi): New function.
	(TARGET_EMPTY_RECORD_P): Redefine.
	(TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
	* config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
	* doc/tm.texi: Regenerated.
	* doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
	TARGET_WARN_PARAMETER_PASSING_ABI): Add.
	* dwarf2out.c (get_ultimate_context): Move to tree.c.
	* explow.c (hard_function_value): Call arg_int_size_in_bytes
	instead of int_size_in_bytes.
	* expr.c (copy_blkmode_to_reg): Likewise.
	* function.c (aggregate_value_p): Return 0 for empty types.
	(assign_parm_find_entry_rtl): Call warn_parameter_passing_abi
	target hook.
	(locate_and_pad_parm): Call arg size_in_bytes instead
	size_in_bytes.
	* lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
	* stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
	* target.def (empty_record_p, warn_parameter_passing_abi): New target
	hooks.
	* targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
	(std_gimplify_va_arg_expr): Skip empty records.  Call
	arg_size_in_bytes instead size_in_bytes.
	* targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
	* tree-core.h (tree_type_common): Add empty_flag.
	(tree_decl_common): Update comments.
	* tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
	DECL_PADDING_P.
	(unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
	* tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
	DECL_PADDING_P.
	(pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
	* tree.c (default_is_empty_type): New function.
	(default_is_empty_record): New function.
	(arg_int_size_in_bytes): New function.
	(arg_size_in_bytes): New function.
	(get_ultimate_context): New function.
	* tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
	TRANSLATION_UNIT_WARN_EMPTY_P.
	(default_is_empty_record, arg_int_size_in_bytes,
	arg_size_in_bytes, get_ultimate_context): Declare.

2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (cmse_clear_registers): New function.
	(cmse_nonsecure_call_clear_caller_saved): Replace register clearing
	code by call to cmse_clear_registers.
	(cmse_nonsecure_entry_clear_before_return): Likewise.

2017-11-22  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm_neon.h (vdot_u32, vdotq_u32)
	(vdot_s32, vdotq_s32): New.
	(vdot_lane_u32, vdotq_lane_u32): New.
	(vdot_lane_s32, vdotq_lane_s32): New.


2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>

	PR middle-end/82547
	* wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
	for unsigned values with fewer HWIs than the precision.
	(test_overflow): New function.
	(wide_int_cc_tests): Call it.

2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>

	* emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
	has the same mode class as Pmode.

2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
	padding_bits_to_clear_ptr.
	(cmse_nonsecure_entry_clear_before_return): Likewise.

2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
	auto_sbitap instead of integer bitfield to control register needing
	clearing.

2017-11-22  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83044
	* tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
	INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
	that need the upper bound.  Subtract offset from
	get_addr_base_and_unit_offset only if positive and subtract it
	before division by eltsize rather than after it.

	PR debug/83084
	* valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
	debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
	(dead_debug_insert_temp): Likewise, but also ignore even non-volatile
	asm.

	PR middle-end/82875
	* optabs.c (expand_doubleword_mult, expand_binop): Before calling
	expand_binop with *mul_widen_optab, make sure at least one of the
	operands doesn't have VOIDmode.

	PR debug/83034
	* dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.

	PR rtl-optimization/82044
	PR tree-optimization/82042
	* dse.c (record_store): Check for overflow.
	(check_mem_read_rtx): Properly check for overflow if width == -1, call
	add_wild_read instead of clear_rhs_from_active_local_stores on
	overflow and log it into dump_file.

2017-11-22  Richard Biener  <rguenther@suse.de>

	* gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
	fake edges to exit when looking for a place to insert.
	* tree-ssa-pre.c (clear_expression_ids): Inline into callers
	and remove.
	(insert_into_preds_of_block): Commit edge insertion immediately,
	assert that doesn't require new BBs.
	(fini_pre): Release expressions.
	(pass_pre::execute): Shuffle things around a bit, if the fn
	is too large do not compute AVAIL either as this is really the
	quadratic bit.

2017-11-22  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83089
	* tree-if-conv.c (pass_if_conversion::execute): If anything
	changed reset SCEV and free the number of iteration estimates.

2017-11-21  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/82945
	* calls.h (warn_nonstring_bound): Remove unused function.

2017-11-21  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/82945
	* builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
	* calls.h (maybe_warn_nonstring_arg): Declare new function.
	* calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
	functions.
	(initialize_argument_information): Call maybe_warn_nonstring_arg.
	* calls.h (get_attr_nonstring_decl): Declare new function.
	* doc/extend.texi (attribute nonstring): Update.
	* gimple-fold.c (gimple_fold_builtin_strncpy): Call
	get_attr_nonstring_decl and handle it.
	* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
	detection of nul-termination.
	(strlen_to_stridx): Change to a pointer.
	(handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
	(pass_strlen::execute): Same.

2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
	for the new option -mprefer-vector-width=[none|128|256|512].
	* config/i386/i386.c (ix86_target_string): remove old style options
	-mprefer-avx256 and make -mprefer-avx128 as alias.
	(ix86_option_override_internal):  Apply defaults for the
	-mprefer-vector-width=[128|256] option.
	* config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
	Implement macros to work with -mprefer-vector-width=.
	* config/i386/i386.opt: Implemented option
	-mprefer-vector-width=[none|128|256|512].
	* doc/invoke.texi: Documentation for
	-mprefer-vector-width=[none|128|256|512].

2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>

	* config/rs6000/ppc-asm.h (f50, vs50): Fix values.

2017-11-21  Jonathan Wakely  <jwakely@redhat.com>

	* doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.

2017-11-21  Marc Glisse  <marc.glisse@inria.fr>

	* doc/generic.texi: Document POINTER_DIFF_EXPR, update
	POINTER_PLUS_EXPR.
	* cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
	* expr.c (expand_expr_real_2): Likewise.
	* fold-const.c (const_binop, fold_addr_of_array_ref_difference,
	fold_binary_loc): Likewise.
	* match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
	P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
	(A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
	MINUS_EXPR transformations.
	* optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
	* tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
	* tree-inline.c (estimate_operator_cost): Likewise.
	* tree-pretty-print.c (dump_generic_node, op_code_prio,
	op_symbol_code): Likewise.
	* tree-vect-stmts.c (vectorizable_operation): Likewise.
	* vr-values.c (extract_range_from_binary_expr): Likewise.
	* varasm.c (initializer_constant_valid_p_1): Likewise.
	* tree.def: New tree code POINTER_DIFF_EXPR.

2017-11-21  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*bswap<mode>2_movbe): Add
	integer suffix to movbe mnemonic.
	(*bswaphi2_movbe): Ditto.
	(bswaphi_lowpart): Merge with *bswaphi_lowpart_1.

2017-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR c++/83045
	* tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
	Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
	Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.

2017-11-21  Martin Liska  <mliska@suse.cz>

	* tree-inline.c (expand_call_inline): Remove not needed
	xstrdup_for_dump.

2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
	    Jakub Jelinek  <jakub@redhat.com>

	PR target/82880
	* config/mips/frame-header-opt.c (mips_register_frame_header_opt):
	Remove static keyword from f variable.

2017-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83086
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
	rather than n.base_addr.

2017-11-21  Martin Liska  <mliska@suse.cz>

	PR rtl-optimization/82044
	PR tree-optimization/82042
	* dse.c (check_mem_read_rtx): Check for overflow.

2017-11-21  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
	typo in comment.

2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>

	* cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
	and its corresponding call arg location note.

2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
	    Andrew Burgess  <andrew.burgess@embecosm.com>

	* config/arc/arc-protos.h (arc_compute_frame_size): Delete
	declaration.
	(arc_return_slot_offset): Likewise.
	(arc_eh_return_address_location): New declaration.
	* config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
	(MUST_SAVE_REGISTER): Add exception handler case.
	(MUST_SAVE_RETURN_ADDR): Likewise.
	(arc_frame_pointer_required): Likewise.
	(arc_frame_pointer_needed): New function.
	(arc_compute_frame_size): Changed.
	(arc_expand_prologue): Likewise.
	(arc_expand_epilogue): Likewise.
	(arc_initial_elimination_offset): Likewise.
	(arc_return_slot_offset): Delete.
	(arc_eh_return_address_location): New function.
	(arc_builtin_setjmp_frame_value): Likewise.
	* config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
	(EH_RETURN_STACKADJ_RTX): Define.
	(EH_RETURN_HANDLER_RTX): Likewise.
	* config/arc/arc.md (eh_return): Delete.

2017-11-21  Aldy Hernandez  <aldyh@redhat.com>

	* print-tree.h (debug_vec_tree): Remove prototype.
	* gdbinit.in (pvt): Remove macro.

2017-11-21  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/83047
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::output_merged_store): If the loads with the
	same vuse are in different basic blocks, for load_gsi pick a load
	location that is dominated by the other loads.

	PR c++/83059
	* config/i386/i386.c (ix86_memmodel_check): Start
	-Winvalid-memory-model diagnostics with lowercase letter.

	PR debug/82718
	* dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
	set in_cold_section_p to the partition containing loc_list->first.
	When seeing loc_list->last_before_switch node, update secname and
	perform range_across_switch second partition handling only after that.

	PR debug/82933
	* run-rtl-passes.c: Include debug.h.
	(run_rtl_passes): Call debug_hooks->assembly_start.
	* dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
	multiple times.

	PR target/82981
	* internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
	OPTAB_DIRECT in calls to expand_simple_binop.

2017-11-20  David Malcolm  <dmalcolm@redhat.com>

	PR c/81404
	* Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.

2017-11-20  David Malcolm  <dmalcolm@redhat.com>

	PR c++/72786
	* spellcheck.h (best_match::blithely_get_best_candidate): New
	accessor.

2017-11-20  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
	with lower case letter.

2017-11-20  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (bswaphi2): New expander.
	(*bswaphi2_movbe): New insn pattern.
	(bswaphi -> rorhi pepehole2): New peephole pattern.

2017-11-20  Jeff Law  <law@redhat.com>

	* Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
	* gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
	* gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
	* gimple-ssa-evrp.c: Remove bits moved into new files.  Include
	gimple-ssa-evrp-analyze.h.

	* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
	set BB_VISITED here.
	(evrp_range_analyzer::enter): Set BB_VISITED here instead.

2017-11-20  Bin Cheng  <bin.cheng@arm.com>

	* tree-predcom.c: Add general comment on Store-Store chains.
	(split_data_refs_to_components): Postpone clearing eliminate_store_p
	flag in component.
	(get_chain_last_ref_at): Rename into...
	(get_chain_last_write_at): ...this.
	(get_chain_last_write_before_load): New function.
	(add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
	CT_STORE_STORE when write reference is added.
	(determine_roots_comp): Support load ref in CT_STORE_STORE chains.
	(is_inv_store_elimination_chain): Update get_chain_last_write_at call.
	(initialize_root_vars_store_elim_1): Ditto.
	(initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
	definition is created.
	(execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
	chain by replacing it with dominant stored value.

2017-11-20  Bin Cheng  <bin.cheng@arm.com>

	* tree-predcom.c (add_ref_to_chain): Remove check on distance.

2017-11-20  Marc Glisse  <marc.glisse@inria.fr>

	* vr-values.c (extract_range_from_binary_expr): Use a full range
	for VR_VARYING.

2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.md (R4_REGNUM): Define constant.
	(nonsecure_call_internal): Remove r4 clobber.
	(nonsecure_call_value_internal): Likewise.
	* config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
	clobber and resequence match_operands.
	(nonsecure_call_value_reg_thumb1_v5): Likewise.
	* config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
	(nonsecure_call_value_reg_thumb2): Likewise.

2017-11-20  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/78821
	* gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
	if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
	to the address of the base rather than the base itself.
	(find_bswap_or_nop_1): Just use pointer comparison for vuse check.
	(find_bswap_or_nop_finalize): New function.
	(find_bswap_or_nop): Use it.
	(bswap_replace): Return a tree rather than bool, change first
	argument from gimple * to gimple_stmt_iterator, allow inserting
	into an empty sequence, allow ins_stmt to be NULL - then emit
	all stmts into gsi.  Fix up MEM_REF address gimplification.
	(pass_optimize_bswap::execute): Adjust bswap_replace caller.
	(struct store_immediate_info): Add N and INS_STMT non-static
	data members.
	(store_immediate_info::store_immediate_info): Initialize them
	from newly added ctor args.
	(merged_store_group::apply_stores): Formatting fixes.  Sort by
	bitpos at the end.
	(stmts_may_clobber_ref_p): For stores call also
	refs_anti_dependent_p.
	(gather_bswap_load_refs): New function.
	(imm_store_chain_info::try_coalesce_bswap): New method.
	(imm_store_chain_info::coalesce_immediate_stores): Use it.
	(split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
	(imm_store_chain_info::output_merged_store): Fail if number of
	new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
	and NOP_EXPR rhs_code.
	(pass_store_merging::process_store): Compute n and ins_stmt, if
	ins_stmt is non-NULL and the store rhs is otherwise invalid, use
	LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
	ctor.
	(pass_store_merging::execute): Calculate dominators.

	* tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
	BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
	CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
	init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
	find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
	class pass_optimize_bswap, bswap_replace,
	pass_optimize_bswap::execute): Moved to ...
	* gimple-ssa-store-merging.c: ... this file.
	Include optabs-tree.h.
	(nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
	init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
	find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
	anonymous namespace, remove static keywords.
	(pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
	(pass_optimize_bswap::execute): ... rather than here.  Formatting fix.

2017-11-20  Jan Hubicka  <hubicka@ucw.cz>

	PR bootstrap/83062
	* ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.

2017-11-20  Aldy Hernandez  <aldyh@redhat.com>

	* vec.h (debug_helper): New function.
	(DEFINE_DEBUG_VEC): New macro.
	* hash-set.h (debug_helper): New function.
	(DEFINE_DEBUG_HASH_SET): New macro.
	* cfg.c (debug_slim (edge)): New function.
	Call DEFINE_DEBUG_VEC for edges.
	Call DEFINE_DEBUG_HASH_SET for edges.
	* cfghooks.c (debug_slim (basic_block)): New function.
	Call DEFINE_DEBUG_VEC for basic blocks.
	Call DEFINE_DEBUG_HASH_SET for basic blocks.
	* print-tree.c (debug_slim): New function to handle trees.
	Call DEFINE_DEBUG_VEC for trees.
	Call DEFINE_DEBUG_HASH_SET for trees.
	(debug (vec<tree, va_gc>) &): Remove.
	(debug (<vec<tree, va_gc>) *): Remove.
	* print-rtl.c (debug_slim): New function to handle const_rtx.
	Call DEFINE_DEBUG_VEC for rtx_def.
	Call DEFINE_DEBUG_VEC for rtx_insn.
	Call DEFINE_DEBUG_HASH_SET for rtx_def.
	Call DEFINE_DEBUG_HASH_SET for rtx_insn.
	* sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
	(debug (vec<rtx_insn *> *ptr): Remove.
	(debug_insn_vector): Remove.
	* stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.

2017-11-20  Tom de Vries  <tom@codesourcery.com>

	PR rtl-optimization/82020
	* simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
	IF_THEN_ELSE condition.

2017-11-19  Jeff Law  <law@redhat.com>

	* tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
	of degenerates resulting from ignoring an edge.

2017-11-19  Jan Hubicka  <hubicka@ucw.cz>

	PR ipa/81360
	* ipa-inline.c (can_inline_edge_p): Also check that caller is optimized

2017-11-19  Jan Hubicka  <hubicka@ucw.cz>

	PR ipa/83001
	* profile-count.c (profile_count::to_sreal_scale): Fix return value
	for uninitialied counts.

2017-11-19  Jan Hubicka  <hubicka@ucw.cz>

	PR ipa/60243
	* tree-inline.c (estimate_num_insns): Set to 1 at least.

2017-11-19  Jan Hubicka  <hubicka@ucw.cz>

	PR target/82713
	* i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
	"do while (0)".

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
	"do {} while (0)".

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
	macro body.

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
	"do {} while (0)".
	* config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	* config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
	"do {} while (0)".
	* config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
	semicolon after MCORE_EXPORT_NAME call.

2017-11-19  Tom de Vries  <tom@codesourcery.com>

	PR target/82961
	* vmsdbgout.c (vmsdbgout_early_finish): New function.
	(vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.

2017-11-18  Jan Hubicka  <hubicka@ucw.cz>

	* cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
	(cgraph_edge::clone): Cleanup updating of profile.
	* ipa-cp.c (update_profiling_info): Likewise.
	* ipa-inline-transform.c (inline_transform): Likewise.
	* ipa-inline.c (inline_small_functions): Add missing space to dump.
	* ipa-split.c (execute_split_functions): Do not split when function
	is cold.
	* predict.c (estimate_bb_frequencies): Cleanup updating of profile.
	* profile-count.c (profile_count::dump): Add global0.
	(profile_count::to_cgraph_frequency): Do not ICE when entry is
	undefined.
	(profile_count::to_sreal_scale): Likewise.
	(profile_count::adjust_for_ipa_scaling): Fix typo in comment.
	(profile_count::combine_with_ipa_count): New function.
	* profile-count.h (profile_guessed_global0adjusted): New.
	(profile_count::adjusted_zero): New.
	(profile_count::global0adjusted): New.
	(profile_count::combine_with_ipa_count): New.
	* tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
	correct profile of return block of split functions.
	(copy_cfg_body): Remove unused profile_count.
	(copy_body): Likewise.
	(expand_call_inline): Update.
	(tree_function_versioning): Update.

2017-11-18  Aldy Hernandez  <aldyh@redhat.com>

	* hash-set.h (hash_set::empty): New.
	* tree-ssa-threadbackward.h: Delete.
	* tree-ssa-threadbackward.c (class thread_jumps): New.
	Move max_threaded_paths into class.
	(fsm_find_thread_path): Remove arguments that are now in class.
	(profitable_jump_thread_path): Rename to...
	(thread_jumps::profitable_jump_thread_path): ...this.
	(convert_and_register_jump_thread_path): Rename to...
	(thread_jumps::convert_and_register_current_path): ...this.
	(check_subpath_and_update_thread_path): Rename to...
	(thread_jumps::check_subpath_and_update_thread_path): ...this.
	(register_jump_thread_path_if_profitable): Rename to...
	(thread_jumps::register_jump_thread_path_if_profitable): ...this.
	(handle_phi): Rename to...
	(thread_jumps::handle_phi): ...this.
	(handle_assignment): Rename to...
	(thread_jumps::handle_assignment): ...this.
	(fsm_find_control_statement_thread_paths): Rename to...
	(thread_jumps::fsm_find_control_statement_thread_paths): ...this.
	(find_jump_threads_backwards): Rename to...
	(thread_jumps::find_jump_threads_backwards): ...this.
	Initialize path local data.
	(pass_thread_jumps::execute): Call find_jump_threads_backwards
	from within thread_jumps class.
	(pass_early_thread_jumps::execute): Same.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.

2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	* config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
	to canonical location.

2017-11-17  Steve Ellcey  <sellcey@cavium.com>

	PR target/81356
	* config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
	Remove.
	(TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.

2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>

	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
	rcrt1.o%s/grcrt1.o%s for -static-pie.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (ix86_multiplication_cost, ix86_division_cost,
	ix86_shift_rotate_cost): Break out from ...
	(ix86_rtx_costs): ... here.
	(ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
	vector operations.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* predict.c (determine_unlikely_bbs): Set cgraph node count to 0
	when entry block was promoted unlikely.
	(estimate_bb_frequencies): Increase frequency scale.
	* profile-count.h (profile_count): Export precision info.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* tree-tailcall.c (eliminate_tail_call): Be more careful about not
	disturbin profile of entry block.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
	roundoff errors.

2017-11-17  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-cp.c (update_profiling_info): Handle conversion to local profile.
	* tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.

2017-11-17  Jeff Law  <law@redhat.com>

	* gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
	from evrp_dom_walker class.  Various methods moved into new class.
	(evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
	(evrp_range_analyzer::enter): New method.
	(evrp_range_analyzer::leave): New method.
	(evrp_dom_walker): Remove delegators no longer needed by this class.
	Replace vr_values data member with evrp_range_analyzer

	* gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
	method extracted from evrp_dom_walker::before_dom_children.
	(evrp_dom_walker::record_ranges_from_stmt): Likewise.
	(evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.

	* gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
	Add private copy constructor and move assignment operators.
	Privatize methods and class data where trivially possible.
	(evrp_dom_walker::cleanup): New function, extracted from
	execute_early_vrp.  Simplify access to class data.

	* vr-values.h (get_output_for_vrp): Prototype.
	* vr-values.c (get_output_for_vrp): New function extracted from
	vrp_visit_assignment_or_call and extract_range_from_stmt.
	(vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.

2017-11-17  Luis Machado  <luis.machado@linaro.org>

	* config/aarch64/aarch64.c
	(qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
	(qdf24xx_tunings) <autoprefetcher_model>: Set to
	tune_params::AUTOPREFETCHER_WEAK.

2017-11-17  Tamar Christina  <tamar.christina@arm.com>

	PR target/82641
	* config/arm/arm.c (arm_valid_target_attribute_rec):
	Parse "arch=" and "+<ext>".
	(arm_valid_target_attribute_tree): Re-init global options.
	(arm_option_override): Make non-static.
	(arm_options_perform_arch_sanity_checks): Make errors fatal.
	* gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
	(__ARM_FEATURE_CRC32): Support undef.
	* config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
	* doc/extend.texi (ARM Function Attributes): Add pragma and target.

2017-11-17  David Malcolm  <dmalcolm@redhat.com>

	* gdbinit.in (break-on-diagnostic): New command.

2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* config/i386/i386.c (ix86_expand_epilogue): Change simple
	return to indirect jump for EH return if control-flow
	protection is enabled. Change explicit 'false' argument in
	pro_epilogue_adjust_stack with a value of
	flag_cf_protection.
	* config/i386/i386.md (simple_return_indirect_internal):
	Remove SImode restriction to support 64-bit.

2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine.c (added_notes_insn): New.
	(try_combine): Handle added_notes_insn like added_links_insn.
	Rewrite return value code.
	(distribute_notes): Set added_notes_insn to the earliest insn we added
	a note to.

2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/82621
	* combine.c (try_combine): Do not split PARALLELs of two SETs if the
	dest of one of those SETs is unused.

2017-11-17  Richard Biener  <rguenther@suse.de>

	PR fortran/83017
	* tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
	* tree-pretty-print.c (dump_generic_node): Handle
	annot_expr_parallel_kind.
	* tree-cfg.c (replace_loop_annotate_in_block): Likewise.
	* gimplify.c (gimple_boolify): Likewise.

2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* config.gcc (extra_headers): Add cet.h for x86 targets.
	* config/i386/cet.h: New file.
	* doc/install.texi: Add --enable-cet/--disable-cet.

2017-11-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83017
	* tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
	(gen_parallel_loop): Properly count iterations.
	(parallelize_loops): Handle loop->can_be_parallel independent
	of flag_loop_parallelize_all.  Make static profitability test match
	the runtime one.
	* params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
	* invoke.texi (parloops-min-per-thread): Document.

2017-11-17  Vineet Gupta  <vgupta@synopsys.com>

	* config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
	upstreaming review comments.

2017-11-17  Tamar Christina  <tamar.christina@arm.com>

	* expr.c (copy_blkmode_to_reg): Fix bitsize for targets
	with fast unaligned access.
	* doc/sourcebuild.texi (word_mode_no_slow_unalign): New.

2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
	to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.

2017-11-17  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (phi_translate_1): Remove redundant constant
	folding of references.

2017-11-17  Qing Zhao  <qing.zhao@oracle.com>

	PR middle-end/78809
	* gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
	of replacing call to strncmp with corresponding call to strcmp when
	meeting conditions.

2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
	option prefer-avx256 for skylake-avx512 configuration.
	* config/i386/i386.c (ix86_option_override_internal): Ditto.
	(get_builtin_code_for_version): Ditto.

2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
	    Monk Chiang  <sh.chiang04@gmail.com>

	* config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
	(FIXED_REGISTERS): Reserve more register numbers.
	(CALL_USED_REGISTERS): Likewise.
	(REG_ALLOC_ORDER): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(REGISTER_NAMES): Likewise.

2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
	    Kito Cheng  <kito.cheng@gmail.com>

	* config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
	V2SI.
	* config/nds32/iterators.md: Add vector mode iterators and attributes.

2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>

	* config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
	parameter list for vec_splats.

2017-11-16  Joseph Myers  <joseph@codesourcery.com>

	* doc/invoke.texi (-std=c17): Refer to 2018 expected publication
	date of C17.
	(-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.

2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR bootstrap/82856
	* doc/install.texi: Document incompatibility of Perl >=5.6.26
	with the required version of automake 1.11.6.

2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>

	* rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
	for it.
	(DU_C2_3_power9): Correct reservation combinations.
	(FP_DIV_power9, VEC_DIV_power9): New.
	(power9-alu): Split out rotate/shift...
	(power9-rot): ...to here, correct dispatch resource.
	(power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
	resource.
	(power9-fp): Correct latency.
	(power9-sdiv): Add div/sqrt resource.
	(power9-ddiv): Correct latency, add div/sqrt resource.
	(power9-sqrt, power9-dsqrt): Add div/sqrt resource.
	(power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
	resource.
	(power9-qpdiv, power9-qpmul): Adjust resource usage.

2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
	switch statement mapping KF built-ins to TF built-ins if we don't
	have the proper ISA 3.0 assembler support.

2017-11-16  Jan Hubicka  <hubicka@ucw.cz>

	* tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
	(lower_emutls_function_body): Do not compute it.

2017-11-16  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-split.c (split_bb_info): Turn time to sreal.
	(split_point): Likewise.
	(dump_split_point): Likewise.
	(fine_split_points): Likewise.
	(execute_split_functions): Only zero split_bbs; turn time to sreals.

2017-11-16  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
	in sreal.

2017-11-16  Jan Hubicka  <hubicka@ucw.cz>

	* predict.c (combine_predictions_for_bb): Preserve zero predicted
	edges.
	(expensive_function_p): Remove useless assert.
	(determine_unlikely_bbs): Propagate also forward; determine cold blocks

2017-11-16  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/82588
	PR tree-optimization/82583
	* tree-vrp.c (check_array_ref): Handle flexible array members,
	string literals, and inner indices.
	(search_for_addr_array): Add detail to diagnostics.

2017-11-16  Nathan Sidwell  <nathan@acm.org>

	PR c++/82836
	PR c++/82737
	* tree.h (COPY_DECL_RTL): Rename parms for clarity.
	(SET_DECL_ASSEMBLER_NAME): Forward to
	overwrite_decl_assembler_name.
	(COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
	(overwrite_decl_assembler_name): Declare.
	* tree.c (overwrite_decl_assembler_name): New.
	* langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
	(LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
	(LANG_HOOKS_INITIALIZER): Add it.
	* langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
	* langhooks.c (lhd_set_decl_assembler_name): Use
	SET_DECL_ASSEMBLER_NAME.
	(lhd_overwrite_decl_assembler_name): Default implementation.

2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
	    Jackson Woodruff  <jackson.woodruff@arm.com>

	PR tree-optimization/71026
	* match.pd: Canonicalize constant multiplies in division.

2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>

	* opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
	* common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
	Remove OPT_fomit_frame_pointer entry.
	* common/config/arc/arc-common.c: Likewise.
	* common/config/arm/arm-common.c: Likewise.
	* common/config/avr/avr-common.c: Likewise.
	* common/config/c6x/c6x-common.c: Likewise.
	* common/config/cr16/cr16-common.c: Likewise.
	* common/config/cris/cris-common.c: Likewise.
	* common/config/epiphany/epiphany-common.c: Likewise.
	* common/config/fr30/fr30-common.c: Likewise.
	* common/config/frv/frv-common.c: Likewise.
	* common/config/ia64/ia64-common.c: Likewise.
	* common/config/iq2000/iq2000-common.c: Likewise.
	* common/config/lm32/lm32-common.c: Likewise.
	* common/config/m32r/m32r-common.c: Likewise.
	* common/config/mcore/mcore-common.c: Likewise.
	* common/config/microblaze/microblaze-common.c: Likewise.
	* common/config/mips/mips-common.c: Likewise.
	* common/config/mmix/mmix-common.c: Likewise.
	* common/config/mn10300/mn10300-common.c: Likewise.
	* common/config/nios2/nios2-common.c: Likewise.
	* common/config/pa/pa-common.c: Likewise.
	* common/config/pdp11/pdp11-common.c: Likewise.
	* common/config/powerpcspe/powerpcspe-common.c: Likewise.
	* common/config/riscv/riscv-common.c: Likewise.
	* common/config/rs6000/rs6000-common.c: Likewise.
	* common/config/rx/rx-common.c: Likewise.
	* common/config/s390/s390-common.c: Likewise.
	* common/config/sh/sh-common.c: Likewise.
	* common/config/sparc/sparc-common.c: Likewise.
	* common/config/tilegx/tilegx-common.c: Likewise.
	* common/config/tilepro/tilepro-common.c: Likewise.
	* common/config/v850/v850-common.c: Likewise.
	* common/config/visium/visium-common.c: Likewise.
	* common/config/xstormy16/xstormy16-common.c: Likewise.
	* common/config/xtensa/xtensa-common.c: Likewise.
	* invoke.texi (-fomit-frame-pointer): Update documentation.

2017-11-16  Jan Hubicka  <hubicka@ucw.cz>

	* tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* cfg.c (scale_bbs_frequencies_int,
	cale_bbs_frequencies_gcov_type): Remove.
	* cfg.h (scale_bbs_frequencies_int,
	cale_bbs_frequencies_gcov_type): Remove.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-loop-manip.c
	(scale_dominated_blocks_in_loop): Update to profile counts.
	(tree_transform_and_unroll_loop): Likewise.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* tree-vect-loop-manip.c (vect_do_peeling): Do not use
	scale_bbs_frequencies_int.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* final.c (compute_alignments): Use counts rather than frequencies.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* cfgloopanal.c: Include sreal.h
	(average_num_loop_insns): Use counts and sreal for accounting.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
	manipulation.

2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
	    Kito Cheng  <kito.cheng@gmail.com>

	* config/nds32/constraints.md: Provide more constraints.
	* config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
	REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
	support constraints usage.

2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>

	* config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.

2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
	    Kito Cheng  <kito.cheng@gmail.com>

	* config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
	* config/nds32/nds32.opt: Refine the layout.
	* config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
	TARGET_EXT_STRING): Support new options.
	* config/nds32/nds32.h: Likewise.
	* config/nds32/nds32.md: Likewise.
	* config/nds32/nds32-predicates.c: Likewise.
	* config/nds32/constraints.md: Likewise.
	* common/config/nds32/nds32-common.c: Likewise.

2017-11-16  Julia Koval  <julia.koval@intel.com>

	PR target/82983
	* config/i386/gfniintrin.h: Add sse check.
	* config/i386/i386.c (ix86_expand_builtin): Fix gfni check.

2017-11-16  Julia Koval  <julia.koval@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
	OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
	(ix86_handle_option): Handle -mavx512vbmi2.
	* config/i386/cpuid.h: Add bit_AVX512VBMI2.
	* config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
	* config/i386/i386-c.c (__AVX512VBMI2__): New.
	* config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
	(ix86_valid_target_attribute_inner_p): Ditto.
	* config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
	* config/i386/i386.opt (mavx512vbmi2): New option.
	* doc/invoke.texi: Add new option.

2017-11-16  Julia Koval  <julia.koval@intel.com>

	* config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
	_mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
	_mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
	_mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
	_mm512_gf2p8mul_epi8): New intrinsics.
	* config/i386/i386-builtin-types.def
	(V64QI_FTYPE_V64QI_V64QI): New type.
	* config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
	__builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
	__builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
	__builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
	* config/i386/sse.md (vgf2p8mulb_*): New pattern.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new type.

2017-11-15  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
	explicitly as a stream of bytes.

2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.h (vec_xst_be): New #define.
	* config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
	and externalize from *altivec_vperm_<mode>_internal.
	* config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
	instantiation.
	(XL_BE_V8HI): Likewise.
	(XL_BE_V4SI): Likewise.
	(XL_BE_V4SI): Likewise.
	(XL_BE_V2DI): Likewise.
	(XL_BE_V4SF): Likewise.
	(XL_BE_V2DF): Likewise.
	(XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
	all array entries with these keys: VSX_BUILTIN_VEC_XL,
	VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
	VSX_BUILTIN_VEC_XST_BE.
	* config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
	(altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
	built-ins.
	(altivec_init_builtins): Replace conditional calls to def_builtin
	for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
	__builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
	with unconditional calls.  Remove calls to def_builtin for
	__builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
	__builtin_vec_xst_be.
	* config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
	to define_expand, and add alternate RTL generation for P8.
	(*vsx_ld_elemrev_v8hi_internal): New define_insn based on
	vsx_ld_elemrev_v8hi.
	(vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
	add alternate RTL generation for P8.
	(*vsx_ld_elemrev_v16qi_internal): New define_insn based on
	vsx_ld_elemrev_v16qi.
	(vsx_st_elemrev_v8hi): Convert define_insn
	to define_expand, and add alternate RTL generation for P8.
	(*vsx_st_elemrev_v8hi_internal): New define_insn based on
	vsx_st_elemrev_v8hi.
	(vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
	add alternate RTL generation for P8.
	(*vsx_st_elemrev_v16qi_internal): New define_insn based on
	vsx_st_elemrev_v16qi.

2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/82990
	* config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
	TARGET_AVX512ER check.
	(ix86_option_override_internal): Set MASK_VZEROUPPER if
	neither -mzeroupper nor -mno-zeroupper is used and
	TARGET_EMIT_VZEROUPPER is set.
	* config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
	* config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.

2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
	folding of vector compares.
	(fold_build_vec_cmp): New helper function.
	(fold_compare_helper): New helper function.
	(builtin_function_type): Add compare builtins to the list of functions
	having unsigned arguments.  Cosmetic updates to comment indentation.
	* config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
	the not+eq combination.

2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82726
	PR tree-optimization/70754
	* tree-predcom.c (order_drefs_by_pos): New function.
	(combine_chains): Move code setting has_max_use_after to...
	(try_combine_chains): ...here.  New parameter.  Sort combined chains
	according to position information.
	(tree_predictive_commoning_loop): Update call to above function.
	(update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.

2017-11-15  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82726
	Revert
	2017-01-23  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/70754
	* tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
	(reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
	combined stmt before it if not NULL.
	(combine_chains): Process refs reversely and compute dominance point
	for root ref.

	Revert
	2017-02-23  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/79663
	* tree-predcom.c (combine_chains): Process refs in reverse order
	only for ZERO length chains, and add explaining comment.

2017-11-15  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
	* config/arm/arm-tables.opt (armv8.3-a): Regenerated.
	* doc/invoke.texi (ARM Options): Add armv8.3-a.

2017-11-15  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.

2017-11-15  Martin Liska  <mliska@suse.cz>

	* tree-cfg.c (pass_warn_function_return::execute):
	Compare warn_return_type for greater than zero.

2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>

	PR target/82941
	PR target/82942
	* config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
	to return true on Xeon and not on Xeon Phi.
	(ix86_check_avx256_register): Changed to ...
	(ix86_check_avx_upper_register): ... this. Add extra check for
	VALID_AVX512F_REG_OR_XI_MODE.
	(ix86_avx_u128_mode_needed): Changed
	ix86_check_avx256_register to ix86_check_avx_upper_register.
	(ix86_check_avx256_stores): Changed to ...
	(ix86_check_avx_upper_stores): ... this. Changed
	ix86_check_avx256_register to ix86_check_avx_upper_register.
	(ix86_avx_u128_mode_after): Changed
	avx_reg256_found to avx_upper_reg_found. Changed
	ix86_check_avx256_stores to ix86_check_avx_upper_stores.
	(ix86_avx_u128_mode_entry): Changed
	ix86_check_avx256_register to ix86_check_avx_upper_register.
	(ix86_avx_u128_mode_exit): Ditto.
	* config/i386/i386.h: (host_detect_local_cpu): New define.

2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>

	* config/arm/xgene1.md (xgene1): Split into automatons
	xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
	(xgene1_f_load): Adjust reservations and/or types.
	(xgene1_f_store): Likewise.
	(xgene1_load_pair): Likewise.
	(xgene1_store_pair): Likewise.
	(xgene1_fp_load1): Likewise.
	(xgene1_load1): Likewise.
	(xgene1_store1): Likewise.
	(xgene1_move): Likewise.
	(xgene1_alu): Likewise.
	(xgene1_simd): Likewise.
	(xgene1_bfm): Likewise.
	(xgene1_neon_load1): Likewise.
	(xgene1_neon_store1): Likewise.
	(xgene1_neon_logic): Likewise.
	(xgene1_neon_st1): Likewise.
	(xgene1_neon_ld1r): Likewise.
	(xgene1_alu_cond): Added.
	(xgene1_shift_reg): Likwise.
	(xgene1_bfx): Likewise.
	(xgene1_mul): Split into xgene1_mul32, xgene1_mul64.

2017-11-15  Jakub Jelinek  <jakub@redhat.com>

	PR target/82981
	* internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
	ssa-iterators.h.
	(can_widen_mult_without_libcall): New function.
	(expand_mul_overflow): If only checking unsigned mul overflow,
	not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
	Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
	no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
	(expand_DIVMOD): Formatting fix.
	* expmed.h (expand_mult): Add NO_LIBCALL argument.
	* expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
	than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.

	PR tree-optimization/82977
	* tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
	constructed temporary to strlen_to_stridx.put.

2017-11-15  Martin Liska  <mliska@suse.cz>

	* configure.ac: Remove -fkeep-inline-functions from coverage_flags.
	* configure: Regenerate.

2017-11-15  Martin Liska  <mliska@suse.cz>

	PR target/82927
	* config/sh/sh-mem.cc: Use proper probability for
	REG_BR_PROB_NOTE.

2017-11-14  Jeff Law  <law@redhat.com>

	* explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
	the red zone for stack_clash_protection_final_dynamic_probe targets
	when the total dynamic stack size is zero bytes.

	* tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
	blocks is post order.

2017-11-15  Alexandre Oliva  <aoliva@redhat.com>

	* dumpfile.h (TDF_COMPARE_DEBUG): New.
	* final.c (rest_of_clean_state): Set it for the
	-fcompare-debug dump.
	* tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
	class when TDF_COMPARE_DEBUG is set.

	* dwarf2out.c (gen_producer_string): Discard
	OPT_fcompare_debug.

2017-11-15  Joseph Myers  <joseph@codesourcery.com>

	PR c/81156
	* doc/extend.texi (Other Builtins): Document __builtin_tgmath.
	* ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
	(__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
	(__TGMATH_REAL_2_3): Remove macros.
	(__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
	(__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
	__builtin_tgmath.
	(frexp, ldexp, nexttoward, scalbn, scalbln): Define using
	__TGMATH_REAL_2.
	(remquo): Define using __TGMATH_REAL_3.

2017-11-14  Jeff Law  <law@redhat.com>

	* vr-values.c: New file with contents extracted from tree-vrp.c.
	* Makefile.in (OBJS): Add vr-values.o
	* tree-vrp.h (set_value_range_to_nonnull): Prototype.
	(set_value_range, set_and_canonicalize_value_range): Likewise.
	(vrp_bitmap_equal_p, range_is_nonnull): Likewise.
	(value_range_constant_singleton, symbolic_range_p): Likewise.
	(compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
	(vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
	(extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
	(set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
	(find_case_label_range, find_case_label_index): Likewise.
	(zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
	(range_int_cst_singleton_p, value_inside_range): Likewise.
	(get_single_symbol): Likewise.
	(switch_update): Move structure definition here.
	(to_remove_edges, to_update_switch_stmts): Provide externs.
	* tree-vrp.c: Move all methods for vr-values class to vr-values.c
	(vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
	(vrp_val_is_min, set_value_range): Likewise.
	(set_and_canonicalize_value_range, copy_value_range): Likewise.
	(set_value_range_to_value, set_value_range_to_nonnull): Likewise.
	(set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
	(range_is_nonnull, range_int_cst_p): Likewwise.
	(range_int_cst_singleton_p, symbolic_range_p): Likewise.
	(get_single_symbol, operand_less_p): Likewise
	(compare_values_warnv, compare_values): Likewise.
	(value_inside_range, value_range_constant_singleton): Likewise.
	(zero_nonzero_bitgs_from_vr): Likewise.
	(extract_range_from_binary_expr_1): Likewise.
	(overflow_comparison_p): Likewise.
	(to_remove_edges, to_update_switch_stmts): Likewise.
	(find_case_label-index, find_case_label_range): Likewise.
	(switch_update, set_value_range_to_nonnegative): Remove.
	(set_value_range_to_truthvalue): Likewise.
	(symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
	(gimple_stmt_nonzero_p, compare_ranges): Likewise.
	(compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
	(find_case_label_ranges, test_for_singularity): Likewise.
	(range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
	(x_vr_values): Move to its remaining use site.

2017-11-10  Jeff Law  <law@redhat.com>

	* vr-values.h (VR_INITIALIZER): Move #define here.
	* gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
	* Makefile.in (OBJS): Add tree-evrp.o
	* tree-vrp.h (assert_info): Move structure definition here.
	(set_value_range_to_varying): Prototype.
	(vrp_operand_equal_p, range_includes_zero_p): Likewise.
	(infer_value_range, register_edge_assert_for): Likewise.
	(stmt_interesting_for_vrp): Likewise.
	* tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
	(set_value_range_to_varying): No longer static.
	(vrp_operand_equal_p, range_includes_zero_p): Likewise.
	(infer_value_range, register_edge_assert_for): Likewise.

2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
	generate the XXBRD instruction.

	* config/rs6000/rs6000-c.c (is_float128_p): New helper function.
	(rs6000_builtin_type_compatible): Treat _Float128 and long double
	as being compatible if -mabi=ieeelongdouble.
	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
	to setup float128 built-ins with hardware support.
	(BU_FLOAT128_HW_2): Likewise.
	(BU_FLOAT128_HW_3): Likewise.
	(BU_FLOAT128_HW_VSX_1): Likewise.
	(BU_FLOAT128_HW_VSX_2): Likewise.
	(scalar_extract_expq): Change float128 built-in functions to
	accommodate having both KFmode and TFmode functions.  Use the
	KFmode variant as the default.
	(scalar_extract_sigq): Likewise.
	(scalar_test_neg_qp): Likewise.
	(scalar_insert_exp_q): Likewise.
	(scalar_insert_exp_qp): Likewise.
	(scalar_test_data_class_qp): Likewise.
	(sqrtf128_round_to_odd): Delete processing the round to odd
	built-in functions as special built-in functions, and define them
	as float128 built-ins.  Use the KFmode variant as the default.
	(truncf128_round_to_odd): Likewise.
	(addf128_round_to_odd): Likewise.
	(subf128_round_to_odd): Likewise.
	(mulf128_round_to_odd): Likewise.
	(divf128_round_to_odd): Likewise.
	(fmaf128_round_to_odd): Likewise.
	* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
	support for KFmode and TFmode xststdcqp calls.
	(rs6000_expand_builtin): If long double is IEEE 128-bit floating
	point, switch the built-in handlers for the get/set float128
	exponent, get float128 mantissa, float128 test built-ins, and the
	float128 round to odd built-in functions.  Eliminate creating the
	float128 round to odd built-in functions as special built-ins.
	(rs6000_init_builtins): Eliminate special creation of the float128
	round to odd built-in functions.
	* config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
	function insns to support both TFmode and KFmode variants.
	(xsxsigqp_<mode>): Likewise.
	(xsiexpqpf_<mode>): Likewise.
	(xsiexpqp_<mode>): Likewise.
	(xststdcqp_<mode>): Likewise.
	(xststdcnegqp_<mode>): Likewise.
	(xststdcqp_<mode>): Likewise.

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-threadupdate.c (compute_path_counts): Remove
	unused path_in_freq_ptr parameter.
	(ssa_fix_duplicate_block_edges): Do not pass around path_in_freq

2017-11-14  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-inline.c (edge_badness): Dump sreal frequency.
	(compute_inlined_call_time): Match natural implementaiton ...
	* ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
	forgotten division by CGRAPH_FREQ_BASE.

2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
	Solaris 11.  Update comment.
	* configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
	renaming.
	* config/sol2.h (STARTFILE_SPEC): Likewise.
	* configure: Regenerate.

2017-11-14  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
	le_ and be_ prefixes to swap* variables.  Remove
	if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
	statements.

2017-11-14  Jason Merrill  <jason@redhat.com>

	Support GTY((cache)) on hash_map.
	* hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
	(ggc_cache_remove): Override it instead of ggc_mx.
	* hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
	(gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
	* hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
	(simple_cache_map_traits): Override maybe_mx.
	* hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
	(hash_map): Friend gt_cleare_cache.
	(gt_cleare_cache): New.
	* tree.h (tree_cache_traits): New hash_map traits class.
	(tree_cache_map): New typedef.

2017-11-14  Richard Biener  <rguenther@suse.de>

	* tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
	paramter and handling.
	(cleanup_control_flow_bb): Likewise.
	(cleanup_control_flow_pre): New helper performing a DFS walk
	to call cleanup_control_flow_bb in PRE order.
	(cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
	via cleanup_control_flow_pre.

2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64-simd.md
	(aarch64_simd_bsl<mode>_internal): Remove DImode.
	(*aarch64_simd_bsl<mode>_alt): Likewise.
	(aarch64_simd_bsldi_internal): New.
	(aarch64_simd_bsldi_alt): Likewise.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* tracer.c (better_p): Do not compare frequencies.
	* reg-stack.c (better_edge): Likewise.
	* shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
	and back.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
	* cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
	* ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
	* lto-streamer-in.c (input_function): Use update_max_bb_count.
	* omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
	* predict.c (maybe_hot_frequency_p): Inline to ...
	(maybe_hot_count_p): ... here; rewrite to counts.
	(counts_to_freqs): Rename to ...
	(update_max_bb_count): ... this one.
	(expensive_function_p): Use counts.
	(estimate_bb_frequencies): Update.
	(rebuild_frequencies): Update.
	* predict.h (counts_to_freqs): Rename to ...
	(update_max_bb_count): ... this one.
	* profile.c (compute_branch_probabilities): Add debug info
	* tree-inline.c (expand_call_inline): Update debug info.
	(optimize_inline_calls): Use update_max_bb_count..
	(tree_function_versioning): Use update_max_bb_count..
	* value-prof.c (gimple_value_profile_transformations):
	Do not use update_max_bb_count.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
	always use frequencies.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* bb-reorder.c: Remove frequencies from comments.
	(better_edge_p): Use profile counts.
	(find_traces): Dump profile counts.
	(rotate_loop): Use profile counts.
	(find_traces_1_round): Likewise.
	(connect_better_edge_p): Use counts instead of probabilities for
	reverse walk.
	(copy_bb_p): Drop early check for non-0 frequency.
	(sanitize_hot_paths): Update comments.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* ipa-split.c (struct split_point): Add count.
	(consider_split): Do not compute incoming frequency; compute incoming
	count and store it to split_point.
	(split_function): Set count of the call to split part correctly.

2017-11-13  Carl Love  <cel@us.ibm.com>

	* config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.

2017-11-13  Tom Tromey  <tom@tromey.com>

	* doc/cpp.texi (Variadic Macros): Document __VA_OPT__.

2017-11-13  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
	Add support for builtins:
	unsigned int vec_first_{,miss}_match_{,or_eos}index,
	vector {un,}signed {char,int,short},
	vector {un,}signed {char,int,short}) arguments.
	* config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
	VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
	Add BU_P9V_AV_2 expansions for the builtins.
	* config/rs6000/altivec.h (vec_first_match_index,
	vec_first_mismatch_index, vec_first_match_or_eos_index,
	vec_first_mismatch_or_eos_index): Add #defines for the builtins.
	* config/rs6000/rs6000-protos.h (bytes_in_mode): Add
	new extern declaration.
	* config/rs6000/rs6000.c (bytes_in_mode): Add new function.
	* config/rs6000/vsx.md (first_match_index_<mode>,
	first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
	first_mismatch_or_eos_index_<mode>): Add define expand.
	(vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
	* doc/extend.texi: Update the built-in documenation file for the new
	built-in functions.

2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
	into the min/max operations for _Float<N> and _Float<N>X types.

2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>

	PR lto/81351
	* dwarf2out.c (do_eh_frame): New static variable.
	(dwarf2out_begin_prologue): Set it.
	(dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-coalesce.c (coalesce_cost): Fix formating.

	* tree-ssa-sink.c (select_best_block): Do not use frequencies.

2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>

	PR lto/81351
	* debug.h (dwarf2out_do_eh_frame): Declare.
	* dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
	(dwarf2out_do_frame): Use it.
	(dwarf2out_do_cfi_asm): Likewise.
	* dwarf2out.c (dwarf2out_frame_finish): Likewise.
	(dwarf2out_assembly_start): Likewise.
	(dwarf2out_begin_prologue): Fix comment.
	* toplev.c (compile_file): Always call dwarf2out_frame_finish
	if the target needs either debug or unwind DWARF2 info.
	* lto-opts.c (lto_write_options): Do not save -fexceptions,
	-fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
	-ftrapping-math, -ftrapv and -fwrapv.

2017-11-13  Jan Hubicka  <hubicka@ucw.cz>

	* cgraph.c (cgraph_edge::sreal_frequency): New function.
	* cgraph.h (cgraph_edge::sreal_frequency): Declare.
	* ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
	(estimate_edge_size_and_time): Likewise.
	(ipa_merge_fn_summary_after_inlining): Likewise.
	* ipa-inline.c (cgraph_freq_base_rec): Remove.
	(compute_uninlined_call_time): Use sreal_frequency.
	(compute_inlined_call_time): Likewise.
	(ipa_inline): Do not initialize cgraph_freq_base_rec.
	* profile-count.c: Include sreal.h.
	(profile_count::to_sreal_scale): New.
	* profile-count.h: Forward declare sreal.
	(profile_count::to_sreal_scale): Declare.

2017-11-13  Nathan Sidwell  <nathan@acm.org>

	* diagnostic.c (maybe_line_and_column): New.
	(diagnostic_get_location_text): Use it.
	(diagnostic_report_current_module): Likewise.
	(test_diagnostic_get_location_text): Add tests.

2017-11-13  Luis Machado  <luis.machado@linaro.org>

	* doc/md.texi (Specifying processor pipeline description): Fix
	incorrect latency for the div instruction example.

2017-11-13  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/78821
	* gimple-ssa-store-merging.c (compatible_load_p): Don't require
	that bit_not_p is the same.
	(imm_store_chain_info::coalesce_immediate_stores): Likewise.
	(split_group): Count precisely bit_not_p bits in each statement.
	(invert_op): New function.
	(imm_store_chain_info::output_merged_store): Use invert_op to
	emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
	but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct coverage_info): Remove typedef of coverage_t.
	(struct source_info): Likewise.
	(add_branch_counts): Likewise.
	(add_line_counts): Likewise.
	(function_summary): Likewise.
	(output_intermediate_line): Likewise.
	(generate_results): Likewise.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct block_info): Remove typedef for block_t.
	(struct line_info): Likewise.
	(line_info::has_block): Likewise.
	(EXIT_BLOCK): Likewise.
	(unblock): Likewise.
	(circuit): Likewise.
	(get_cycles_count): Likewise.
	(process_file): Likewise.
	(read_graph_file): Likewise.
	(solve_flow_graph): Likewise.
	(find_exception_blocks): Likewise.
	(add_line_counts): Likewise.
	(accumulate_line_info): Likewise.
	(output_line_details): Likewise.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct arc_info): Remove typedef for arc_t.
	(struct line_info): Likewise.
	(add_branch_counts): Likewise.
	(output_branch_count): Likewise.
	(function_info::~function_info): Likewise.
	(circuit): Likewise.
	(output_intermediate_line): Likewise.
	(read_graph_file): Likewise.
	(solve_flow_graph): Likewise.
	(find_exception_blocks): Likewise.
	(add_line_counts): Likewise.
	(accumulate_line_info): Likewise.
	(output_line_details): Likewise.
	(output_function_details): Likewise.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct function_info): Remove typedef for function_t.
	(struct source_info): Likewise.
	(source_info::get_functions_at_location): Likewise.
	(solve_flow_graph): Likewise.
	(find_exception_blocks): Likewise.
	(add_line_counts): Likewise.
	(output_intermediate_file): Likewise.
	(process_file): Likewise.
	(generate_results): Likewise.
	(release_structures): Likewise.
	(read_graph_file): Likewise.
	(read_count_file): Likewise.
	(accumulate_line_counts): Likewise.
	(output_lines): Likewise.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (function_info::function_info): Remove num_counts
	and add vector<gcov_type>.
	(function_info::~function_info): Use the vector.
	(process_file): Likewise.
	(read_graph_file): Likewise.
	(read_count_file): Likewise.
	(solve_flow_graph): Likewise.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (function_info::is_artificial): New function.
	(process_file): Erase all artificial early.
	(generate_results): Skip as all artificial are already
	removed.

2017-11-13  Martin Liska  <mliska@suse.cz>

	* gcov.c (read_graph_file): Store to global vector of functions.
	(read_count_file): Iterate the vector.
	(process_file): Likewise.
	(generate_results): Likewise.
	(release_structures): Likewise.

2017-11-13  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/82954
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::coalesce_immediate_stores): If
	!infof->ops[N].base_addr, split group if info->ops[N].base_addr.

2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
	Upddate call to ENDIAN_LANE_N.
	(aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
	(aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
	(*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
	and use aarch64_endian_lane_rtx.
	(*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.

2017-11-12  Tom de Vries  <tom@codesourcery.com>

	* config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).

2017-11-12  Tom de Vries  <tom@codesourcery.com>

	* config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.

2017-11-12  Tom de Vries  <tom@codesourcery.com>

	* config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
	body.
	* config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
	* config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
	* defaults.h (ASM_OUTPUT_LABELREF): Same.

2017-11-11  Martin Sebor  <msebor@redhat.com>

	PR c/81117
	* doc/extend.texi (attribute nonstring): Remove spurious argument.

	PR bootstrap/82948
	* prefic.c (translate_name): Replace strncpy with memcpy to
	avoid -Wstringop-truncation.

2017-11-10  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.

2017-11-10  Jan Hubicka  <hubicka@ucw.cz>

	* predict.c (maybe_hot_frequency_p): Do not use cfun.

2017-11-10  Jan Hubicka  <hubicka@ucw.cz>

	* tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
	merging.

2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
	enable generating XXBRH if the value is in a vector register.
	(bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
	value is in a vector register.
	(bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
	register to register bswap64's instead of doing the GPR sequence
	used on previous machines.
	(bswapdi2_xxbrd): New insn.
	(bswapdi2_reg): Disallow on ISA 3.0.
	(register to register bswap64 splitter): Do not split the insn on
	ISA 3.0 systems that use XXBRD.

2017-11-10  Martin Sebor  <msebor@redhat.com>

	PR c/81117
	* config/darwin-c.c (framework_construct_pathname): Replace strncpy
	with memcpy.
	(find_subframework_file): Same.

2017-11-10  Jan Hubicka  <hubicka@ucw.cz>

	* auto-profile.c (afdo_indirect_call): Drop frequency.
	* cgraph.c (symbol_table::create_edge): Drop frequency argument.
	(cgraph_node::create_edge): Drop frequency argument.
	(cgraph_node::create_indirect_edge): Drop frequency argument.
	(cgraph_edge::make_speculative): Drop frequency arguments.
	(cgraph_edge::resolve_speculation): Do not update frequencies
	(cgraph_edge::dump_edge_flags): Do not dump frequency.
	(cgraph_node::dump): Check consistency in IPA mode.
	(cgraph_edge::maybe_hot_p): Use IPA counter.
	(cgraph_edge::verify_count_and_frequency): Rename to ...
	(cgraph_edge::verify_count): ... this one; drop frequency checking.
	(cgraph_node::verify_node): Update.
	* cgraph.h (struct cgraph_edge): Drop frequency.
	(cgraph_edge::frequency): New function.
	* cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
	frequencies.
	(cgraph_edge::rebuild_edges): Likewise.
	* cgraphclones.c (cgraph_edge::clone): Scale only counts.
	(duplicate_thunk_for_node): Do not pass frequency.
	(cgraph_node::create_clone): Scale only counts.
	(cgraph_node::create_virtual_clone): Do not pass frequency.
	(cgraph_node::create_edge_including_clones): Do not pass frequency.
	(cgraph_node::create_version_clone): Do not pass frequency.
	* cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
	(cgraph_node::expand_thunk): Do not pass frequency.
	(cgraph_node::create_wrapper): Do not pass frequency.
	* gimple-iterator.c (update_call_edge_frequencies): Do not pass
	frequency.
	* gimple-streamer-in.c (input_bb): Scale only IPA counts.
	* ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
	* ipa-cp.c (ipcp_lattice::print): Use frequency function.
	(gather_caller_stats): Use frequency function.
	(ipcp_cloning_candidate_p): Use frequency function.
	(ipcp_propagate_stage): Use frequency function.
	(get_info_about_necessary_edges): Use frequency function.
	(update_profiling_info): Update only IPA profile.
	(update_specialized_profile): Use frequency functoin.
	(perhaps_add_new_callers): Update only IPA profile.
	* ipa-devirt.c (ipa_devirt): Use IPA profile.
	* ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
	(dump_ipa_call_summary): Use frequency function.
	(estimate_edge_size_and_time): Use frequency function.
	(ipa_merge_fn_summary_after_inlining): Use frequency function.
	* ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
	* ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
	(update_noncloned_counts): ... ths one; scale counts only.
	(clone_inlined_nodes): Do not scale frequency.
	(inline_call): Do not pass frequency.
	* ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
	(compute_inlined_call_time): Use IPA profile.
	(want_inline_small_function_p): Use IPA profile.
	(want_inline_self_recursive_call_p): Use IPA profile.
	(edge_badness): Use IPA profile.
	(lookup_recursive_calls): Use IPA profile.
	(recursive_inlining): Do not pass frequency.
	(resolve_noninline_speculation): Do not update frequency.
	(inline_small_functions): Collect max of IPA profile.
	(dump_overall_stats): Dump IPA porfile.
	(dump_inline_stats): Dump IPA porfile.
	(ipa_inline): Collect IPA stats.
	* ipa-inline.h (clone_inlined_nodes): Update prototype.
	* ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
	(ipa_propagate_frequency): Use frequency function.
	(ipa_profile): Cleanup.
	* ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
	* ipa-utils.c (ipa_merge_profiles): Merge all profiles.
	* lto-cgraph.c (lto_output_edge): Do not stream frequency.
	(input_node): Do not stream frequency.
	(input_edge): Do not stream frequency.
	(merge_profile_summaries): Scale only IPA profiles.
	* omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
	* predict.c (drop_profile): Do not recompute frequency.
	* trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
	(ipa_tm_insert_gettmclone_call): Do not pass frequency.
	* tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
	* tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
	* tree-emutls.c (gen_emutls_addr): Do not pass frequency.
	* tree-inline.c (copy_bb): Do not scale frequency.
	(expand_call_inline): Do not scale frequency.
	(tree_function_versioning): Do not scale frequency.
	* ubsan.c (ubsan_create_edge): Do not pass frequency.

2017-11-10  Julia Koval  <julia.koval@intel.com>

	* config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
	(_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
	(_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
	(_mm256_maskz_gf2p8affine_epi64_epi8)
	(_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
	(_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
	* config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
	(__builtin_ia32_vgf2p8affineqb_v32qi)
	(__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
	* config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.

2017-11-10  Tamar Christina  <tamar.christina@arm.com>

	PR target/82641
	* config/arm/arm.c
	(arm_option_override): Refactor.
	(arm_option_reconfigure_globals): New.
	(arm_options_perform_arch_sanity_checks): New.
	* config/arm/arm-protos.h (arm_option_reconfigure_globals):
	New prototype.
	(arm_options_perform_arch_sanity_checks): Likewise

2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>

	* rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
	(power9-qpmul): New.
	* rs6000/rs6000.md ("type" attr): Add qmul.
	(mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
	*nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
	*nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.

2017-11-10  Martin Sebor  <msebor@redhat.com>

	PR c/81117
	* builtins.c (compute_objsize): Handle arrays that
	compute_builtin_object_size likes to fail for.  Make extern.
	* builtins.h (compute_objsize): Declare.
	(check_strncpy_sizes): New function.
	(expand_builtin_strncpy): Call check_strncpy_sizes.
	* gimple-fold.c (gimple_fold_builtin_strncpy): Implement
	-Wstringop-truncation.
	(gimple_fold_builtin_strncat): Same.
	* gimple.c (gimple_build_call_from_tree): Set call location.
	* tree-ssa-strlen.c (strlen_to_stridx): New global variable.
	(maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
	(handle_builtin_stxncpy, handle_builtin_strncat): Same.
	(handle_builtin_strlen): Use strlen_to_stridx.
	(strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
	stpncpy.
	Use strlen_to_stridx.
	(pass_strlen::execute): Release strlen_to_stridx.
	* doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
	(-Wstringop-truncation): Document new option.

2017-11-10  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/82702
	* gcov.c (main): Handle intermediate files in a different
	way.
	(get_gcov_intermediate_filename): New function.
	(output_gcov_file): Remove support of intermediate files.
	(generate_results): Allocate intermediate file.
	(release_structures): Clean-up properly fn_end.
	(output_intermediate_file): Start iterating with line 1.

2017-11-10  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/82929
	* gimple-ssa-store-merging.c (struct store_immediate_info): Add
	ops_swapped_p non-static data member.
	(store_immediate_info::store_immediate_info): Clear it.
	(imm_store_chain_info::coalesce_immediate_stores): If swapping
	ops set ops_swapped_p.
	(count_multiple_uses): Handle ops_swapped_p.

2017-11-10  Martin Liska  <mliska@suse.cz>

	* coverage.c (coverage_init): Stream information about
	support of has_unexecuted_blocks.
	* doc/gcov.texi: Document that.
	* gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
	* gcov.c (read_graph_file): Likewise.
	(output_line_beginning): Fix a small issue with
	color output.

2017-11-10  Bin Cheng  <bin.cheng@arm.com>

	* tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
	reference of trivial component.

2017-11-10  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/82916
	* gimple-ssa-store-merging.c
	(pass_store_merging::terminate_all_aliasing_chains): For
	gimple_store_p stmts also call refs_output_dependent_p.

	PR rtl-optimization/82913
	* compare-elim.c (try_merge_compare): Punt if def_insn is not
	single set.

2017-11-09  Jeff Law  <law@redhat.com>

	* vr-values.h: New file with vr_values class.
	* tree-vrp.c: Include vr-values.h
	(vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
	data objects into the vr_values class.
	(vr_value, values_propagated, vr_phi_edge_counts): Likewise.
	(get_value_range): Make it a member function within vr_values class.
	(set_defs_to_varying, update_value_range, add_equivalence): Likewise.
	(vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
	(op_with_constant_singleton_value_range): Likewise.
	(extract_range_for_var_from_comparison_expr): Likewise.
	(extract_range_from_assert, extract_range_from_ssa_name): Likewise.
	(extract_range_from_binary_expr): Likewise.
	(extract_range_from_unary_expr): Likewise.
	(extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
	(check_for_binary_op_overflow, extract_range_basic): Likewise.
	(extract_range_from_assignment, adjust_range_with_scev): Likewise.
	(dump_all_value_ranges, get_vr_for_comparison): Likewise.
	(compare_name_with_value, compare_names): Likewise.
	(vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
	(vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
	(vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
	(vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
	(extract_range_from_phi_node): Likewise.
	(simplify_truth_ops_using_ranges): Likewise.
	(simplify_div_or_mod_using_ranges): Likewise.
	(simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
	(simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
	(simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
	(simplify_float_conversion_using_ranges): Likewise.
	(simplify_internal_call_using_ranges): Likewise.
	(two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
	(vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
	poitner via x_vr_values for calls into gimple folder.
	(vrp_initialize_lattice): Make this the vr_values ctor.
	(vrp_free_lattice): Make this the vr_values dtor.
	(set_vr_value): New function.
	(class vrp_prop): Add vr_values data member.  Add various member
	functions as well as member functions that delegate to vr_values.
	(check_array_ref): Make a member function within vrp_prop class.
	(search_for_addr_array, vrp_initialize): Likewise.
	(vrp_finalize): Likewise.  Revamp to avoid direct access to
	vr_value, values_propagated, etc.
	(check_array_bounds): Extract vrp_prop class instance pointer from
	walk info structure.  Use it to call member functions.
	(check_all_array_refs): Make a member function within vrp_prop class.
	Smuggle class instance pointer via walk info structure.
	(x_vr_values): New local static.
	(vrp_valueize): Use x_vr_values to get class instance.
	(vr_valueize_1): Likewise.
	(class vrp_folder): Add vr_values data member.  Add various member
	functions as well as member functions that delegate to vr_values.
	(fold_predicate_in): Make a mber fucntion within vrp_folder class.
	(simplify_stmt_for_jump_threading): Extract smuggled vr_values
	class instance from vr_values.  Use it to call member functions.
	(vrp_dom_walker): Add vr_values data member.
	(vrp_dom_walker::after_dom_children): Smuggle vr_values class
	instance via x_vr_values.
	(identify_jump_threads): Accept vr_values as argument.  Store
	it into the walker structure.
	(evrp_dom_walker): Add vr_values class data member.  Add various
	delegators.
	(evrp_dom_walker::try_find_new_range): Use vr_values data
	member to access the memory allocator.
	(evrp_dom_walker::before_dom_children): Store vr_values class
	instance into the vrp_folder class.
	(evrp_dom_walker::push_value_range): Rework to avoid direct
	access to num_vr_values and vr_value.
	(evrp_dom_walker::pop_value_range): Likewise.
	(execute_early_vrp): Remove call to vrp_initialize_lattice.
	Use vr_values to get to dump_all_value_ranges member function.
	Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
	and simplify_cond_using_ranges_2 via vrp_prop class instance.
	Pass vr_values class instance down to identify_jump_threads.
	Remove call to vrp_free_lattice.
	(debug_all_value_ranges): Remove.

	* tree-vrp.c (vrp_prop): Move class to earlier point in the file.
	(vrp_folder): Likewise.

	* tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
	Get it from the existing bitmap instead.
	(vrp_intersect_ranges_1): Likewise.

2017-11-09  Jakub Jelinek  <jakub@redhat.com>

	* gimple-ssa-store-merging.c (struct store_immediate_info): Add
	bit_not_p field.
	(store_immediate_info::store_immediate_info): Add bitnotp argument,
	set bit_not_p to it.
	(imm_store_chain_info::coalesce_immediate_stores): Break group
	if bit_not_p is different.
	(count_multiple_uses, split_group,
	imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
	(handled_load): Avoid multiple chained BIT_NOT_EXPRs.
	(pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
	result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
	to store_immediate_info ctor.

2017-11-09  Jim Wilson  <jimw@sifive.com>

	* collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
	(scan_prog_file): Likewise.

2017-11-09  Jan Hubicka  <hubicka@ucw.cz>

	* bb-reorder.c (max_entry_frequency): Remove.
	(find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
	connect_traces, push_to_next_round_p): Remove prototypes.
	(find_traces_1_round): Use counts only.
	(push_to_next_round_p): Likewise.
	(find_traces): Likewise.
	(rotate_loop): Likewise.
	(find_traces_1_round): Likewise.
	(connect_traces): Likewise.
	(edge_order): Likewise.

2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (output_return_instruction): Add comments to
	indicate requirement for cmse_nonsecure_entry return to account
	for the size of clearing instruction output here.
	(thumb_exit): Likewise.
	* config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
	return in hardfloat mode.

2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (machine_function): Add a bool,
	"toc_is_wrapped_separately".
	(rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
	if it wasn't explicitly set or unset, we are optimizing for speed, and
	doing separate shrink-wrapping.
	(rs6000_get_separate_components): Enable the TOC component if
	saving the TOC register in the prologue.
	(rs6000_components_for_bb): Handle the TOC component.
	(rs6000_emit_prologue_components): Store the TOC register where needed.
	(rs6000_set_handled_components): Mark TOC as handled, if handled.
	(rs6000_emit_prologue): Don't save the TOC if that is already done.

2017-11-09  Martin Jambor  <mjambor@suse.cz>

	* ipa-param-manipulation.c: New file.
	* ipa-param-manipulation.h: Likewise.
	* Makefile.in (OBJS): Add ipa-param-manipulation.o.
	(PLUGIN_HEADERS): Addded ipa-param-manipulation.h
	* ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
	(ipa_parm_adjustment): Likewise.
	(ipa_parm_adjustment_vec): Likewise.
	(ipa_get_vector_of_formal_parms): Moved declaration to
	ipa-param-manipulation.h.
	(ipa_get_vector_of_formal_parm_types): Likewise.
	(ipa_modify_formal_parameters): Likewise.
	(ipa_modify_call_arguments): Likewise.
	(ipa_combine_adjustments): Likewise.
	(ipa_dump_param_adjustments): Likewise.
	(ipa_modify_expr): Likewise.
	(ipa_get_adjustment_candidate): Likewise.
	* ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
	ipa-param-manipulation.c.
	(ipa_get_vector_of_formal_parm_types): Likewise.
	(ipa_modify_formal_parameters): Likewise.
	(ipa_modify_call_arguments): Likewise.
	(ipa_modify_expr): Likewise.
	(get_ssa_base_param): Likewise.
	(ipa_get_adjustment_candidate): Likewise.
	(index_in_adjustments_multiple_times_p): Likewise.
	(ipa_combine_adjustments): Likewise.
	(ipa_dump_param_adjustments): Likewise.
	* tree-sra.c: Also include ipa-param-manipulation.h
	* omp-simd-clone.c: Include ipa-param-manipulation.h instead of
	ipa-param.h.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_masked_store): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_align_stack_vars): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_variable_length): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_unaligned_possible): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_element_align_preferred): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
	previously undocumented selectors.
	(vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>

	* doc/rtl.texi (const_vector): Say that elements can be
	const_wide_ints too.
	* emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
	* emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
	(gen_vec_duplicate): Use it instead of CONSTANT_P.
	* optabs.c (expand_vector_broadcast): Likewise.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* tree-ssa-loop-ivopts.c (get_address_cost): Try using a
	scaled index even if the unscaled address was invalid.
	Don't increase the complexity of using a scale in that case.

2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/rtl.texi: Rewrite the subreg rules so that they partition
	the inner register into REGMODE_NATURAL_SIZE bytes rather than
	UNITS_PER_WORD bytes.
	* emit-rtl.c (validate_subreg): Divide subregs into blocks
	based on REGMODE_NATURAL_SIZE of the inner mode.
	(gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
	!SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
	* expmed.c (lowpart_bit_field_p): Divide the value up into
	chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
	* expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
	whether something is likely to occupy more than one register.

2017-11-09  Jan Hubicka  <hubicka@ucw.cz>

	PR ipa/82879
	* ipa-inline-transform.c (update_noncloned_frequencies): Use
	profile_count::adjust_for_ipa_scaling.
	* tree-inline.c (copy_bb, copy_cfg_body): Likewise.
	* profile-count.c (profile_count::adjust_for_ipa_scaling): New member
	function.
	* profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.

2017-11-09  Jakub Jelinek  <jakub@redhat.com>

	* gimple-ssa-store-merging.c (count_multiple_uses): New function.
	(split_group): Add total_orig and total_new arguments, estimate the
	number of statements related to the store group without store merging
	and with store merging.
	(imm_store_chain_info::output_merged_store): Adjust split_group
	callers, punt if estimated number of statements with store merging
	is not smaller than estimated number of statements without it.
	Formatting fix.
	(handled_load): Remove has_single_use checks.
	(pass_store_merging::process_store): Likewise.

2017-11-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82902
	* tree-ssa-phiprop.c (propagate_with_phi): Test proper type.

2017-11-09  Martin Liska  <mliska@suse.cz>

	PR target/82863
	* emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
	uninitialized.

2017-11-09  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/82669
	* sbitmap.h (bmp_iter_set_init): Remove non needed check.

2017-11-09  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/48463
	* coverage.c (coverage_begin_function): Output also end locus
	of a function and information whether the function is
	artificial.
	* gcov-dump.c (tag_function): Parse and print the information.
	* gcov.c (INCLUDE_MAP): Add include.
	(INCLUDE_SET): Likewise.
	(struct line_info): Move earlier in the source file because
	of vector<line_info> in function_info structure.
	(line_info::line_info): Likewise.
	(line_info::has_block): Likewise.
	(struct source_info): Add new member index.
	(source_info::get_functions_at_location): New function.
	(function_info::group_line_p): New function.
	(output_intermediate_line): New function.
	(output_intermediate_file): Use the mentioned function.
	(struct function_start): New.
	(struct function_start_pair_hash): Likewise.
	(process_file): Add code that identifies group functions.
	Assign lines either to global or function scope.
	(generate_results): Skip artificial functions.
	(find_source): Assign index for each source file.
	(read_graph_file): Read new flag artificial and end_line.
	(add_line_counts): Assign it either to global of function scope.
	(accumulate_line_counts): Isolate core of the function to
	accumulate_line_info and call it for both function and global
	scope lines.
	(accumulate_line_info): New function.
	(output_line_beginning): Fix GNU coding style.
	(print_source_line): New function.
	(output_line_details): Likewise.
	(output_function_details): Likewise.
	(output_lines): Iterate both source (global) scope and function
	scope.
	(struct function_line_start_cmp): New class.
	* doc/gcov.texi: Reflect changes in documentation.

2017-11-09  Jakub Jelinek  <jakub@redhat.com>

	PR debug/82837
	* dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
	(mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
	and similarly for not instead of neg.

2017-11-08  Andi Kleen  <ak@linux.intel.com>

	* config/i386/i386.opt: Add -mforce-indirect-call.
	* config/i386/predicates.md: Check for flag_force_indirect_call.
	* doc/invoke.texi: Document -mforce-indirect-call

2017-11-08  Kito Cheng  <kito.cheng@gmail.com>

	* config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
	New extern.
	(MOVE_RATIO): Use riscv_slow_unaligned_access_p.
	config/riscv/riscv.c (predict.h): New include.
	(riscv_slow_unaligned_access_p): No longer static.
	(riscv_block_move_straight): Add require.
	* config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.

2017-11-08  Jakub Jelinek  <jakub@redhat.com>

	PR target/82855
	* config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
	<avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
	nonimmediate_operand predicate for operand 1 instead of
	register_operand.

2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
	New pattern.
	* config/aarch64/constraints.md (Uml): New constraint.
	* config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
	predicate.

2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
	of two vec_duplicates into a vec_concat.

2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
	Simplify vec_merge of vec_duplicate and vec_concat.
	* config/aarch64/constraints.md (Utq): New constraint.
	* config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
	define_insn.

2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
	Simplify vec_merge of vec_duplicate and const_vector.
	* config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
	New predicate.
	* config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
	mode iterator.  Update predicate on operand 1 to
	handle non-const_vec constants.  Delete constraints.
	(*aarch64_combinez_be<mode>): Likewise for operand 2.

2017-11-08  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/78821
	* gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
	data member.
	(store_operand_info::store_operand_info): Initialize it to false.
	(pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
	ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
	store in the group, and if chain_info is non-NULL, to ignore altogether
	that chain.
	(compatible_load_p): Fail if bit_not_p does not match.
	(imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
	(handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
	(pass_store_merging::process_store): Adjust
	terminate_all_aliasing_chains calls to pass NULL in all current spots,
	call terminate_all_aliasing_chains newly when adding a store into
	a chain with non-NULL chain_info.

2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.

2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_frame_pointer_required)
	Remove.
	(aarch64_layout_frame): Initialise emit_frame_chain.
	(aarch64_can_eliminate): Remove omit leaf frame pointer code.
	(TARGET_FRAME_POINTER_REQUIRED): Remove define.

2017-11-08  Martin Liska  <mliska@suse.cz>

	* gimplify.c (expand_FALLTHROUGH_r): Simplify usage
	of gimple_call_internal_p.

2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".

2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
	"do {} while (0)".

2017-11-08  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82792
	* gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.

2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>

	* gimple-pretty-print.c (dump_profile): Return "" instead of NULL.

2017-11-07  Jakub Jelinek  <jakub@redhat.com>

	PR target/82855
	* config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
	(*cmp<mode>_ccz_1): New insn with $k alternative.

	PR target/82855
	* config/i386/i386.c (ix86_swap_binary_operands_p): Treat
	RTX_COMM_COMPARE as commutative as well.
	(ix86_binary_operator_ok): Formatting fix.
	* config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
	*<code><mode>3<mask_name><round_saeonly_name>,
	*<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
	*<s>mul<mode>3_highpart<mask_name>,
	*vec_widen_umult_even_v16si<mask_name>,
	*vec_widen_umult_even_v8si<mask_name>,
	*vec_widen_umult_even_v4si<mask_name>,
	*vec_widen_smult_even_v16si<mask_name>,
	*vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
	*avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
	*avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
	*sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
	*sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
	<avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
	*sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
	*<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
	*<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
	!(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
	ix86_binary_operator_ok.  Formatting fixes.
	(*<plusminus_insn><mode>3<mask_name><round_name>,
	*<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
	fixes.

2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (GPR2): New mode_iterator.
	("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
	eq and ne if TARGET_ISEL.
	(cmp): New code_iterator.
	(UNS, UNSU_, UNSIK): New code_attrs.
	(<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
	("eq<mode>3"): New define_expand, rename the define_insn_and_split
	to...
	("eq<mode>3"): ... this.
	("ne<mode>3"): New define_expand, rename the define_insn_and_split
	to...
	("ne<mode>3"): ... this.

2017-11-07  Julia Koval  <julia.koval@intel.com>

	PR target/82812
	* common/config/i386/i386-common.c
	(OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
	(ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
	* config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
	* config/i386/i386.opt: Ditto.
	* config/i386/i386.c (ix86_target_string): Ditto.
	(ix86_option_override_internal): Ditto.
	(ix86_init_mpx_builtins): Move MPX to args2.
	(ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
	* config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
	__builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
	__builtin_ia32_vgf2p8affineinvqb_v32qi,
	__builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
	__builtin_ia32_vgf2p8affineinvqb_v16qi,
	__builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.

2017-11-07  Uros Bizjak  <ubizjak@gmail.com>

	PR target/80425
	* config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
	and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
	(zero-extendsidi peephole2): Remove peephole.

2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>

	PR c/53037
	* stor-layout.c: Include attribs.h.
	(handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
	explicit lookup of "aligned" attribute.

2017-11-07  Andrew Waterman  <andrew@sifive.com>

	* config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
	(riscv_expand_block_move): Likewise.
	* config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
	implementation.
	(RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
	(RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
	* config/riscv/riscv.c (riscv_block_move_straight): New function.
	(riscv_adjust_block_mem): Likewise.
	(riscv_block_move_loop): Likewise.
	(riscv_expand_block_move): Likewise.
	* config/riscv/riscv.md (movmemsi): New pattern.

2017-11-07  Michael Clark  <michaeljclark@mac.com>

	* config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
	(MUSL_DYNAMIC_LINKER): Likewise.

2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
	(rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
	nonmmory_operand.

2017-11-07  Richard Biener  <rguenther@suse.de>

	* match.pd: Fix build.

2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
	    Jackson Woodruff  <jackson.woodruff@arm.com>

	PR tree-optimization/71026
	* match.pd: Canonicalize negate in division.

2017-11-07  Sudakshina Das  <sudi.das@arm.com>

	PR middle-end/80131
	* match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.

2017-11-07  Marc Glisse  <marc.glisse@inria.fr>

	* match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
	(a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.

2017-11-07  Marc Glisse  <marc.glisse@inria.fr>

	* fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
	non-scalar integral types.
	* match.pd (negate_expr_p): Handle MINUS_EXPR.
	(-(A-B), -(~A)): New transformations.

2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
	semicolon after "do {} while (0)".
	* config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.

2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
	after "do {} while (0)".
	* config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.

2017-11-07  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
	"while {} do (0)".
	(arm_rtx_costs_internal): Add missing semicolon after
	HANDLE_NARROW_SHIFT_ARITH call.

2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
	disable isel if it was not set explicitly.

2017-11-06  James Bowman  <james.bowman@ftdichip.com>

	* gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
	(add_type_attribute) likewise.

2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
	of struct ix86_frame.
	(ix86_initial_elimination_offset): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

2017-11-06  Marc Glisse  <marc.glisse@inria.fr>

	* tree-vrp.h (enum value_range_type): Update stale comment.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
	(aarch64_expand_vec_perm_const): Take the number of units too.
	* config/aarch64/aarch64.c (aarch64_expand_vec_perm)
	(aarch64_expand_vec_perm_const): Likewise.
	* config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
	(vec_perm<mode>): Update accordingly.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
	Take the number of units too.
	* config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
	(aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
	but check for a vector mode before rather than after the call.
	* config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
	(move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
	(vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
	(vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
	(vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
	(aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
	(widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
	(aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
	(aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
	(aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
	(aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
	(aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
	(aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
	(aarch64_sqdmull2_n<mode>): Update accordingly.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
	the number of units too.
	* config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
	* config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
	(vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
	(vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
	(vec_store_lanesxi<mode>): Update accordingly.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
	* config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
	* config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
	of units rather than the mode.
	* config/aarch64/iterators.md (nunits): New mode attribute.
	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
	Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
	* config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
	(aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
	(*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
	(*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
	(*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
	(*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
	(*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
	(*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
	(*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
	(*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
	(reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
	(reduc_<maxmin_uns>_scal_<mode>): Likewise.
	(*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
	(*aarch64_get_lane_zero_extendsi<mode>): Likewise.
	(aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
	(*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
	(aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
	(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
	(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
	(aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
	(aarch64_sqdmull2_lane<mode>_internal): Likewise.
	(aarch64_sqdmull2_laneq<mode>_internal): Likewise.
	(aarch64_vec_load_lanesoi_lane<mode>): Likewise.
	(aarch64_vec_store_lanesoi_lane<mode>): Likewise.
	(aarch64_vec_load_lanesci_lane<mode>): Likewise.
	(aarch64_vec_store_lanesci_lane<mode>): Likewise.
	(aarch64_vec_load_lanesxi_lane<mode>): Likewise.
	(aarch64_vec_store_lanesxi_lane<mode>): Likewise.
	(aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
	(aarch64_simd_vec_setv2di): Likewise.

2017-11-06  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
	definitions.
	(P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
	* config/rs6000/altivec.h (vec_revb): Change the #define from power 9
	to power 8.
	* config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
	extern declaration.
	* config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
	* config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
	Add power 8 macro expansions.
	(BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
	* config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
	power 8 instructions.  (VSX_XXBR): Add iterator.

2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/arm/arm.md (predicable_short_it): Change default to "no",
	improve documentation, remove uses that are identical to the default.
	(enabled_for_depr_it): Rename to enabled_for_short_it.
	* gcc/config/arm/arm-fixed.md (predicable_short_it):
	Remove default uses.
	* gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
	* gcc/config/arm/sync.md (predicable_short_it): Likewise.
	* gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
	* gcc/config/arm/vfp.md (predicable_short_it): Likewise.

2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/82748
	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
	float128 helper macros, which are no longer used after deleting
	the old 'q' built-in functions, and moving the round to odd
	built-in functions to being special built-in functions.
	(BU_FLOAT128_2): Likewise.
	(BU_FLOAT128_1_HW): Likewise.
	(BU_FLOAT128_2_HW): Likewise.
	(BU_FLOAT128_3_HW): Likewise.
	(FABSQ): Delete old 'q' built-in functions.
	(COPYSIGNQ): Likewise.
	(SQRTF128_ODD): Move round to odd built-in functions to be
	special built-in functions, so that we can handle
	-mabi=ieeelongdouble.
	(TRUNCF128_ODD): Likewise.
	(ADDF128_ODD): Likewise.
	(SUBF128_ODD): Likewise.
	(MULF128_ODD): Likewise.
	(DIVF128_ODD): Likewise.
	(FMAF128_ODD): Likewise.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
	built-in names to 'f128'.
	* config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
	old 'q' built-in functions, as the machine independent code for
	'f128' built-in functions handles this.
	(rs6000_expand_builtin): Add expansion for float128 round to odd
	functions, keying off on -mabi=ieeelongdouble of whether to use
	the KFmode or TFmode variant.
	(rs6000_init_builtins): Initialize the _Float128 round to odd
	built-in functions.
	* doc/extend.texi (PowerPC Built-in Functions): Document the old
	_Float128 'q' built-in functions are now mapped into the new
	'f128' built-in functions.

2017-11-06  David Edelsohn  <dje.gcc@gmail.com>

	* collect2.c (add_lto_object): Compile for OBJECT_COFF.
	(scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.

2017-11-06  David Malcolm  <dmalcolm@redhat.com>

	PR jit/82826
	* ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
	* ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
	* toplev.c: Include "ipa-fnsummary.h".
	(toplev::finalize): Call ipa_fnsummary_c_finalize.

2017-11-06  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/82838
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
	on a separate gimple_seq which is then appended to seq.

2017-11-06  Jeff Law  <law@redhat.com>

	PR target/82788
	* config/i386/i386.c (PROBE_INTERVAL): Remove.
	(get_probe_interval): New functions.
	(ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
	(ix86_adjust_stack_and_probe): Likewise.
	(output_adjust_stack_and_probe): Likewise.
	(ix86_emit_probe_stack_range): Likewise.
	(ix86_expand_prologue): Likewise.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/82816
	* tree-ssa-math-opts.c (convert_mult_to_widen): Return false
	if the modes of the two types are the same.
	(convert_plusminus_to_widen): Likewise.

2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
	p9_vadu<mode>3.
	(usadv16qi): New define_expand.
	(usadv8hi): New define_expand.

2017-11-06  Jan Hubicka  <hubicka@ucw.cz>

	PR bootstrap/82832
	* ipa-inline-transform.c (update_noncloned_frequencies): Always
	scale.
	(inline_transform): Likewise.
	* predict.c (counts_to_freqs): Remove useless conditional.
	* profile-count.h (profile_count::apply_scale): Move sanity check.
	* tree-inline.c (copy_bb): Always scale.
	(copy_cfg_body): Likewise.

2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/67591
	* config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
	attribute.
	(*cmp_ite0): Add enabled_for_depr_it attribute.
	(*cmp_ite1): Likewise.

2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
	TYPE_MFCRF.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vrp.c (vrp_int_const_binop): Return true on success and
	return the value by pointer.
	(extract_range_from_multiplicative_op_1): Update accordingly.
	Return as soon as an operation fails.

2017-11-05  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
	(DEF_SANITIZER_BUILTIN): ... here.
	(initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
	DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.

2017-11-05  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
	macro body.
	(ASM_OUTPUT_CASE_LABEL): Add semicolon after
	ASM_OUTPUT_BEFORE_CASE_LABEL call.
	* config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
	after macro body.
	* config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
	* config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
	* config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.

2017-11-05  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
	"do {} while (0)".

2017-11-04  Michael Clark  <michaeljclark@mac.com>

	* config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
	config/riscv/riscv.md (addsi3): Use 'i' for immediates.
	(adddi3): Likewise.
	(*addsi3_extended): Likewise.
	(*addsi3_extended2): Likewise.
	(<optab>si3): Likewise.
	(<optab>di3): Likewise.
	(<optab><mode>3): Likewise.
	(<*optabe>si3_internal): Likewise.
	(zero_extendqi<SUPERQI:mode>2): Likewise.
	(*add<mode>hi3): Likewise.
	(*xor<mode>hi3): Likewise.
	(<optab>di3): Likewise.
	(*<optab>si3_extend): Likewise.
	(*sge<u>_<X:mode><GPR:mode>): Likewise.
	(*slt<u>_<X:mode><GPR:mode>): Likewise.
	(*sle<u>_<X:mode><GPR:mode>): Likewise.

2017-11-04  Andrew Waterman  <andrew@sifive.com>

	* config/riscv/riscv.c (riscv_option_override): Conditionally set
	TARGET_STRICT_ALIGN based upon -mtune argument.

2017-11-04  Andrew Waterman  <andrew@sifive.com>

	* config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.

2017-11-04  Daniel Santos  <daniel.santos@pobox.com>

	* config/i386/i386.c (choose_basereg): Use optional scratch
	register and add assertion.
	(x86_emit_outlined_ms2sysv_save): Use scratch register when
	needed, and don't allocate stack.
	(ix86_expand_prologue): Rearrange where SSE saves/stub call is
	emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
	(ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.

2017-11-03  Jeff Law  <law@redhat.com>

	* config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
	(ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
	to probe at the start of a noreturn function.

2017-11-03  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/78821
	* gimple-ssa-store-merging.c: Update the file comment.
	(MAX_STORE_ALIAS_CHECKS): Define.
	(struct store_operand_info): New type.
	(store_operand_info::store_operand_info): New constructor.
	(struct store_immediate_info): Add rhs_code and ops data members.
	(store_immediate_info::store_immediate_info): Add rhscode, op0r
	and op1r arguments to the ctor, initialize corresponding data members.
	(struct merged_store_group): Add load_align_base and load_align
	data members.
	(merged_store_group::merged_store_group): Initialize them.
	(merged_store_group::do_merge): Update them.
	(merged_store_group::apply_stores): Pick the constant for
	encode_tree_to_bitpos from one of the two operands, or skip
	encode_tree_to_bitpos if neither operand is a constant.
	(class pass_store_merging): Add process_store method decl.  Remove
	bool argument from terminate_all_aliasing_chains method decl.
	(pass_store_merging::terminate_all_aliasing_chains): Remove
	var_offset_p argument and corresponding handling.
	(stmts_may_clobber_ref_p): New function.
	(compatible_load_p): New function.
	(imm_store_chain_info::coalesce_immediate_stores): Terminate group
	if there is overlap and rhs_code is not INTEGER_CST.  For
	non-overlapping stores terminate group if rhs is not mergeable.
	(get_alias_type_for_stmts): Change first argument from
	auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
	BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
	instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
	alias type.
	(get_location_for_stmts): Change first argument from
	auto_vec<gimple *> & to vec<gimple *> &.
	(struct split_store): Remove orig_stmts data member, add orig_stores.
	(split_store::split_store): Create orig_stores rather than orig_stmts.
	(find_constituent_stmts): Renamed to ...
	(find_constituent_stores): ... this.  Change second argument from
	vec<gimple *> * to vec<store_immediate_info *> *, push pointers
	to info structures rather than the statements.
	(split_group): Rename ALLOW_UNALIGNED argument to
	ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
	it.  Adjust find_constituent_stores caller.
	(imm_store_chain_info::output_merged_store): Handle rhs_code other
	than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
	get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
	MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
	(mem_valid_for_store_merging): New function.
	(handled_load): New function.
	(pass_store_merging::process_store): New method.
	(pass_store_merging::execute): Use process_store method.  Adjust
	terminate_all_aliasing_chains caller.

2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
	Return true for more constants, symbols and label references.
	(aarch64_valid_floating_const): Remove unused function.

2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>

	PR target/82786
	* config/aarch64/aarch64.c (aarch64_layout_frame):
	Undo forcing of LR at bottom of frame.

2017-11-03  Jeff Law  <law@redhat.com>

	PR target/82823
	* config/i386/i386.c (ix86_expand_prologue): Tighten assert
	for int_registers_saved.

	* cfganal.c (single_pred_edge_ignoring_loop_edges): New function
	extracted from tree-ssa-dom.c.
	* cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
	* tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
	(record_equivalences_from_incoming_edge): Add additional argument
	to single_pred_edge_ignoring_loop_edges call.
	* tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
	(uncprop_dom_walker::before_dom_children): Add additional argument
	to single_pred_edge_ignoring_loop_edges call.
	* tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
	single_pred_edge_ignoring_loop_edges rather than open coding.
	* tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.

2017-11-03  Marc Glisse  <marc.glisse@inria.fr>

	* match.pd (-(-A)): Rewrite.

2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
	(rs6000_emit_int_cmove): New declaration.
	* config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
	(rs6000_emit_sISEL): Delete.
	(rs6000_emit_int_cmove): Make non-static.
	* config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
	instead of rs6000_emit_sISEL.

2017-11-03  Jan Hubicka  <hubicka@ucw.cz>

	* asan.c (create_cond_insert_point): Maintain profile.
	* ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
	merged.
	* basic-block.h (struct basic_block_def): Remove frequency.
	(EDGE_FREQUENCY): Use to_frequency
	* bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
	heuristics.
	(find_traces): Update to use to_frequency.
	(find_traces_1_round): Likewise; use only IPA counts.
	(bb_to_key): Likewise.
	(connect_traces): Use IPA counts only.
	(copy_bb_p): Update to use to_frequency.
	(fix_up_crossing_landing_pad): Likewise.
	(sanitize_hot_paths): Likewise.
	* bt-load.c (basic_block_freq): Likewise.
	* cfg.c (init_flow): Set count_max to uninitialized.
	(check_bb_profile): Remove frequencies; check counts.
	(dump_bb_info): Do not dump frequencies.
	(update_bb_profile_for_threading): Update counts only.
	(scale_bbs_frequencies_int): Likewise.
	(MAX_SAFE_MULTIPLIER): Remove.
	(scale_bbs_frequencies_gcov_type): Update counts only.
	(scale_bbs_frequencies_profile_count): Update counts only.
	(scale_bbs_frequencies): Update counts only.
	* cfg.h (struct control_flow_graph): Add count-max.
	(update_bb_profile_for_threading): Update prototype.
	* cfgbuild.c (find_bb_boundaries): Do not update frequencies.
	(find_many_sub_basic_blocks): Likewise.
	* cfgcleanup.c (try_forward_edges): Likewise.
	(try_crossjump_to_edge): Likewise.
	* cfgexpand.c (expand_gimple_cond): Likewise.
	(expand_gimple_tailcall): Likewise.
	(construct_init_block): Likewise.
	(construct_exit_block): Likewise.
	* cfghooks.c (verify_flow_info): Check consistency of counts.
	(dump_bb_for_graph): Do not dump frequencies.
	(split_block_1): Do not update frequencies.
	(split_edge): Do not update frequencies.
	(make_forwarder_block): Do not update frequencies.
	(duplicate_block): Do not update frequencies.
	(account_profile_record): Do not update frequencies.
	* cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
	for global heuristics.
	* cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
	(expected_loop_iterations_unbounded): Use counts only.
	* cfgloopmanip.c (scale_loop_profile): Simplify.
	(create_empty_loop_on_edge): Simplify
	(loopify): Simplify
	(duplicate_loop_to_header_edge): Simplify
	* cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
	(update_br_prob_note): Take care of removing note when profile
	becomes undefined.
	(relink_block_chain): Do not dump frequency.
	(rtl_account_profile_record): Use to_frequency.
	* cgraph.c (symbol_table::create_edge): Convert count to ipa count.
	(cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
	(cgraph_update_edges_for_call_stmt_node): Likewise.
	(cgraph_edge::verify_count_and_frequency): Update.
	(cgraph_node::verify_node): Temporarily disable frequency verification.
	* cgraphbuild.c (compute_call_stmt_bb_frequency): Use
	to_cgraph_frequency.
	(cgraph_edge::rebuild_edges): Convert to ipa counts.
	* cgraphunit.c (init_lowered_empty_function): Do not initialize
	frequencies.
	(cgraph_node::expand_thunk): Update profile.
	* except.c (dw2_build_landing_pads): Do not update frequency.
	* final.c (compute_alignments): Use to_frequency.
	(dump_basic_block_info): Do not dump frequency.
	* gimple-pretty-print.c (dump_profile): Do not dump frequency.
	(dump_gimple_bb_header): Do not dump frequency.
	* gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
	do update count.
	* gimple-streamer-in.c (input_bb): Do not stream frequency.
	* gimple-streamer-out.c (output_bb): Do not stream frequency.
	* haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
	(init_before_recovery): Do not update frequency.
	(sched_create_recovery_edges): Do not update frequency.
	* hsa-gen.c (convert_switch_statements): Do not update frequency.
	* ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
	(ipa_cp_c_finalize): Set max_count to uninitialized.
	* ipa-fnsummary.c (get_minimal_bb): Use counts.
	(param_change_prob): Use counts.
	* ipa-profile.c (ipa_profile_generate_summary): Do not summarize
	local profiles.
	* ipa-split.c (consider_split): Use to_frequency.
	(split_function): Use to_frequency.
	* ira-build.c (loop_compare_func): Likewise.
	(mark_loops_for_removal): Likewise.
	(mark_all_loops_for_removal): Likewise.
	* loop-doloop.c (doloop_modify): Do not update frequency.
	* loop-unroll.c (unroll_loop_runtime_iterations): Do not update
	frequency.
	* lto-streamer-in.c (input_function): Update count_max.
	* omp-expand.c (expand_omp_taskreg): Update count_max.
	* omp-simd-clone.c (simd_clone_adjust): Update profile.
	* predict.c (maybe_hot_frequency_p): Use to_frequency.
	(maybe_hot_count_p): Use ipa counts only.
	(maybe_hot_bb_p): Simplify.
	(maybe_hot_edge_p): Simplify.
	(probably_never_executed): Do not take frequency argument.
	(probably_never_executed_bb_p): Do not pass frequency.
	(probably_never_executed_edge_p): Likewise.
	(combine_predictions_for_bb): Check that profile is nonzero.
	(propagate_freq): Do not set frequency.
	(drop_profile): Simplify.
	(counts_to_freqs): Simplify.
	(expensive_function_p): Use to_frequency.
	(propagate_unlikely_bbs_forward): Simplify.
	(determine_unlikely_bbs): Simplify.
	(estimate_bb_frequencies): Add hack to silence graphite issues.
	(compute_function_frequency): Use ipa counts.
	(pass_profile::execute): Update.
	(rebuild_frequencies): Use counts only.
	(force_edge_cold): Use counts only.
	* profile-count.c (profile_count::dump): Dump new count types.
	(profile_count::differs_from_p): Check compatiblity.
	(profile_count::to_frequency): New function.
	(profile_count::to_cgraph_frequency): New function.
	* profile-count.h (struct function): Declare.
	(enum profile_quality): Add profile_guessed_local and
	profile_guessed_global0.
	(class profile_proability): Decrease number of bits to 29;
	update from_reg_br_prob_note and to_reg_br_prob_note.
	(class profile_count: Update comment; decrease number of bits
	to 61. Check compatibility.
	(profile_count::compatible_p): New private member function.
	(profile_count::ipa_p): New member function.
	(profile_count::operator<): Handle global zero correctly.
	(profile_count::operator>): Handle global zero correctly.
	(profile_count::operator<=): Handle global zero correctly.
	(profile_count::operator>=): Handle global zero correctly.
	(profile_count::nonzero_p): New member function.
	(profile_count::force_nonzero): New member function.
	(profile_count::max): New member function.
	(profile_count::apply_scale): Handle IPA scalling.
	(profile_count::guessed_local): New member function.
	(profile_count::global0): New member function.
	(profile_count::ipa): New member function.
	(profile_count::to_frequency): Declare.
	(profile_count::to_cgraph_frequency): Declare.
	* profile.c (OVERLAP_BASE): Delete.
	(compute_frequency_overlap): Delete.
	(compute_branch_probabilities): Do not use compute_frequency_overlap.
	* regs.h (REG_FREQ_FROM_BB): Use to_frequency.
	* sched-ebb.c (rank): Use counts only.
	* shrink-wrap.c (handle_simple_exit): Use counts only.
	(try_shrink_wrapping): Use counts only.
	(place_prologue_for_one_component): Use counts only.
	* tracer.c (find_best_predecessor): Use to_frequency.
	(find_trace): Use to_frequency.
	(tail_duplicate): Use to_frequency.
	* trans-mem.c (expand_transaction): Do not update frequency.
	* tree-call-cdce.c: Do not update frequency.
	* tree-cfg.c (gimple_find_sub_bbs): Likewise.
	(gimple_merge_blocks): Likewise.
	(gimple_split_edge): Likewise.
	(gimple_duplicate_sese_region): Likewise.
	(gimple_duplicate_sese_tail): Likewise.
	(move_sese_region_to_fn): Likewise.
	(gimple_account_profile_record): Likewise.
	(insert_cond_bb): Likewise.
	* tree-complex.c (expand_complex_div_wide): Likewise.
	* tree-eh.c (lower_resx): Update profile.
	* tree-inline.c (copy_bb): Simplify count scaling; do not scale
	frequencies.
	(initialize_cfun): Do not initialize frequencies
	(freqs_to_counts): Delete.
	(copy_cfg_body): Ignore count parameter.
	(copy_body): Update.
	(expand_call_inline): Update count_max.
	(optimize_inline_calls): Update count_max.
	(tree_function_versioning): Update count_max.
	* tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
	* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
	frequency.
	* tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
	* tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
	(try_peel_loop): Likewise.
	* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
	to_frequency.
	* tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
	(tree_transform_and_unroll_loop): Do not use frequencies
	* tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
	Use reliable prediction only.
	* tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
	* tree-ssa-sink.c (select_best_block): Use to_frequency.
	* tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
	probability scaling.
	* tree-ssa-threadupdate.c (create_block_for_threading): Do
	not update frequency
	(any_remaining_duplicated_blocks): Likewise.
	(update_profile): Likewise.
	(estimated_freqs_path): Delete.
	(freqs_to_counts_path): Delete.
	(clear_counts_path): Delete.
	(ssa_fix_duplicate_block_edges): Likewise.
	(duplicate_thread_path): Likewise.
	* tree-switch-conversion.c (gen_inbound_check): Use counts.
	* tree-tailcall.c (decrease_profile): Do not update frequency.
	(eliminate_tail_call): Likewise.
	* tree-vect-loop-manip.c (vect_do_peeling): Likewise.
	* tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
	(optimize_mask_stores): Likewise.
	* tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
	* ubsan.c (ubsan_expand_null_ifn): Update profile.
	(ubsan_expand_ptr_ifn): Update profile.
	* value-prof.c (gimple_ic): Simplify.
	* value-prof.h (gimple_ic): Update prototype.
	* ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
	* ipa-inline.c (compute_uninlined_call_time): Be sure that
	counts are nonzero.
	(want_inline_self_recursive_call_p): Likewise.
	(resolve_noninline_speculation): Only cummulate defined counts.
	(inline_small_functions): Use nonzero_p.
	(ipa_inline): Do not access freed node.

2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_override_options_internal):
	Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.

2017-11-03  Kito Cheng  <kito.cheng@gmail.com>

	* config/riscv/riscv.c (riscv_legitimize_move): Handle
	non-legitimate address.

2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (*lt0_disi): Delete.
	(*lt0_<mode>di, *lt0_<mode>si): New.

2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
	TARGET_PAIRED_FLOAT.

2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
	    Jim Wilson  <jim.wilson@linaro.org>

	* config/aarch64/aarch64-cores.def (saphira): New CPU.
	* config/aarch64/aarch64-tune.md: Regenerated.
	* doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
	* gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.

2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>

	* config/arc/arc.c (arc_save_restore): Corrected CFA note.
	(arc_expand_prologue): Restore blink for millicode.
	* config/arc/linux.h (LINK_EH_SPEC): Defined.

2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>

	PR target/82809
	* config/i386/i386.c (ix86_vector_duplicate_value): Use
	gen_vec_duplicate after forcing the scalar into a register.

2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine (try_combine): Print the insns input to try_combine to the
	dump file.

2017-11-02  Steve Ellcey  <sellcey@cavium.com>

	PR target/79868
	* config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
	Remove second argument from aarch64_process_target_attr call.
	* config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
	Ditto.
	* config/aarch64/aarch64.c (aarch64_attribute_info): Change
	field type.
	(aarch64_handle_attr_arch): Remove second argument.
	(aarch64_handle_attr_cpu): Ditto.
	(aarch64_handle_attr_tune): Ditto.
	(aarch64_handle_attr_isa_flags): Ditto.
	(aarch64_process_one_target_attr): Ditto.
	(aarch64_process_target_attr): Ditto.
	(aarch64_option_valid_attribute_p): Remove second argument.
	on aarch64_process_target_attr call.

2017-11-02  David Malcolm  <dmalcolm@redhat.com>

	* diagnostic.c: Include "selftest-diagnostic.h".
	(selftest::assert_location_text): New function.
	(selftest::test_diagnostic_get_location_text): New function.
	(selftest::diagnostic_c_tests): Call it.

2017-11-02  David Malcolm  <dmalcolm@redhat.com>

	* Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
	* diagnostic-show-locus.c: Include "selftest-diagnostic.h".
	(class selftest::test_diagnostic_context): Move to...
	* selftest-diagnostic.c: New file.
	* selftest-diagnostic.h: New file.

2017-11-02  James Bowman  <james.bowman@ftdichip.com>

	* config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
	offset range for FT32B.
	* config/ft32/ft32.h: option "mcompress" enables relaxation.
	* config/ft32/ft32.md: Add TARGET_NOPM.
	* config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
	* gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.

2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.

2017-11-02  Jeff Law  <law@redhat.com>

	* gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
	virtual keyword on FINAL OVERRIDE members.

	* tree-ssa-propagate.h (ssa_propagation_engine): Group
	virtuals together.  Add virtual destructor.
	(substitute_and_fold_engine): Similarly.

2017-11-02  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.

2017-11-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82795
	* tree-if-conv.c (predicate_mem_writes): Remove bogus assert.

2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
	gcc_SUN_LD_VERSION.
	(gcc_GAS_CHECK_FEATURE): Remove.
	* configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
	gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
	* configure: Regenerate.

2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>

	* config/arc/arc.c (hwloop_optimize): Account for empty
	body loops.

2017-11-02  Richard Biener  <rguenther@suse.de>

	PR middle-end/82765
	* varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
	Truncate ARRAY_REF index and element size.

2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>

	* doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".

2017-11-01  Jeff Law  <law@redhat.com>

	* tree-ssa-ccp.c (ccp_folder): New class derived from
	substitute_and_fold_engine.
	(ccp_folder::get_value): New member function.
	(ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
	(ccp_fold_stmt): Remove prototype.
	(ccp_finalize): Call substitute_and_fold from the ccp_class.
	* tree-ssa-copy.c (copy_folder): New class derived from
	substitute_and_fold_engine.
	(copy_folder::get_value): Renamed from get_value.
	(fini_copy_prop): Call substitute_and_fold from copy_folder class.
	* tree-vrp.c (vrp_folder): New class derived from
	substitute_and_fold_engine.
	(vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
	(vrp_folder::get_value): New member function.
	(vrp_finalize): Call substitute_and_fold from vrp_folder class.
	(evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
	* tree-ssa-propagate.h (substitute_and_fold_engine): New class to
	provide a class interface to folder/substitute routines.
	(ssa_prop_fold_stmt_fn): Remove typedef.
	(ssa_prop_get_value_fn): Likewise.
	(subsitute_and_fold): Remove prototype.
	(replace_uses_in): Likewise.
	* tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
	Renamed from replace_uses_in.  Call the virtual member function
	(substitute_and_fold_engine::replace_phi_args_in): Similarly.
	(substitute_and_fold_dom_walker): Remove initialization of
	data member entries for calbacks.  Add substitute_and_fold_engine
	member and initialize it.
	(substitute_and_fold_dom_walker::before_dom_children0: Use the
	member functions for get_value, replace_phi_args_in c
	replace_uses_in, and fold_stmt calls.
	(substitute_and_fold_engine::substitute_and_fold): Renamed from
	substitute_and_fold.  Remove assert.   Update ctor call.

	* tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
	(ssa_prop_visit_phi_fn): Likewise.
	(class ssa_propagation_engine): New class to provide an interface
	into ssa_propagate.
	* tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
	variable.
	(ssa_prop_visit_phi): Likewise.
	(ssa_propagation_engine::simulate_stmt): Moved into class.
	Call visit_phi/visit_stmt from the class rather than via
	file scoped static variables.
	(ssa_propagation_engine::simulate_block): Moved into class.
	(ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
	(ssa_propagation_engine::ssa_propagate): Similarly.  No longer
	set file scoped statics for the visit_stmt/visit_phi callbacks.
	* tree-complex.c (complex_propagate): New class derived from
	ssa_propagation_engine.
	(complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
	(complex_propagate::visit_phi): Renamed from complex_visit_phi.
	(tree_lower_complex): Call ssa_propagate via the complex_propagate
	class.
	* tree-ssa-ccp.c: (ccp_propagate): New class derived from
	ssa_propagation_engine.
	(ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
	(ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
	(do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
	* tree-ssa-copy.c (copy_prop): New class derived from
	ssa_propagation_engine.
	(copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
	(copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
	(execute_copy_prop): Call ssa_propagate from the copy_prop class.
	* tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
	(vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
	(vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
	(execute_vrp): Call ssa_propagate from the vrp_prop class.

2017-11-01  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/82778
	PR rtl-optimization/82597
	* compare-elim.c (struct comparison): Add in_a_setter field.
	(find_comparison_dom_walker::before_dom_children): Remove killed
	bitmap and df_simulate_find_defs call, instead walk the defs.
	Compute last_setter and initialize in_a_setter.  Merge definitions
	with first initialization for a few variables.
	(try_validate_parallel): Use insn_invalid_p instead of
	recog_memoized.  Return insn rather than just the pattern.
	(try_merge_compare): Fix up comment.  Don't uselessly test if
	in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
	chains.
	(execute_compare_elim_after_reload): Remove df_chain_add_problem
	call.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64.c (aarch64_rtx_costs): Use
	aarch64_hard_regno_nregs to get the number of registers
	in a mode.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/constraints.md (Upl): Rename to...
	(Uaa): ...this.
	* config/aarch64/aarch64.md
	(*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
	Update accordingly.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64.c (aarch64_add_constant_internal)
	(aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
	earlier in file.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
	(aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
	(aarch64_evpc_dup): Generate rtl direcly, rather than using
	named expanders.
	(aarch64_expand_vec_perm_const_1): Explicitly check for permutes
	of a single element.
	* config/aarch64/iterators.md: Add a comment above the permute
	unspecs to say that they are generated directly by
	aarch64_expand_vec_perm_const.
	* config/aarch64/aarch64-simd.md: Likewise the permute instructions.

2017-11-01  Nathan Sidwell  <nathan@acm.org>

	* tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.

2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>

	* doc/invoke.texi (RISC-V Options): Explicitly name the medlow
	and medany code models, and describe what they do.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>

	Revert accidental duplicate:

	* combine.c (can_change_dest_mode): Reject changes in
	REGMODE_NATURAL_SIZE.

2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/64682
	PR rtl-optimization/69567
	PR rtl-optimization/69737
	PR rtl-optimization/82683
	* combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
	register mentioned in the note, drop the note, unless it came from I3,
	in which case it should go to I3 again.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
	and return false if not.
	(clear_bytes_written_by, live_bytes_read): Update accordingly.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-ssa-alias.h (ranges_overlap_p): Return false if either
	range is known to be empty.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
	and CONST_VECTOR_NUNITS instead of computing the number of units from
	the byte sizes of the vector and element.
	(simplify_binary_operation_1): Likewise.
	(simplify_const_binary_operation): Likewise.
	(simplify_ternary_operation): Likewise.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* var-tracking.c (INT_MEM_OFFSET): Replace with...
	(int_mem_offset): ...this new function.
	(var_mem_set, var_mem_delete_and_set, var_mem_delete)
	(find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
	(same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
	Update accordingly.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* lower-subreg.c (interesting_mode_p): New function.
	(compute_costs, find_decomposable_subregs, decompose_register)
	(simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
	(resolve_clobber, dump_choices): Use it.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* alias.c (find_base_value, find_base_term): Only process integer
	truncations.  Check the precision rather than the size.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* machmode.h (is_narrower_int_mode): New function
	* optabs.c (expand_float, expand_fix): Use it.
	* dwarf2out.c (rotate_loc_descriptor): Likewise.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (narrower_subreg_mode): New function.
	* ira-color.c (update_costs_from_allocno): Use it.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* optabs-query.h (convert_optab_p): New function, split out from...
	(convert_optab_handler): ...here.
	(widening_optab_handler): Delete.
	(find_widening_optab_handler): Remove permit_non_widening parameter.
	(find_widening_optab_handler_and_mode): Likewise.  Provide an
	override that operates on mode class wrappers.
	* optabs-query.c (widening_optab_handler): Delete.
	(find_widening_optab_handler_and_mode): Remove permit_non_widening
	parameter.  Assert that the two modes are the same class and that
	the "from" mode is narrower than the "to" mode.  Use
	convert_optab_handler instead of widening_optab_handler.
	* expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
	instead of widening_optab_handler.
	* expr.c (expand_expr_real_2): Update calls to
	find_widening_optab_handler.
	* optabs.c (expand_widen_pattern_expr): Likewise.
	(expand_binop_directly): Take the insn_code as a parameter.
	(expand_binop): Only call find_widening_optab_handler for
	conversion optabs; use optab_handler otherwise.  Update calls
	to find_widening_optab_handler and expand_binop_directly.
	Use convert_optab_handler instead of widening_optab_handler.
	* tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
	find_widening_optab_handler and use scalar_mode rather than
	machine_mode.
	(convert_plusminus_to_widen): Likewise.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* machmode.h (fixed_size_mode): New class.
	* rtl.h (get_pool_mode): Return fixed_size_mode.
	* gengtype.c (main): Add fixed_size_mode.
	* target.def (get_raw_result_mode): Return a fixed_size_mode.
	(get_raw_arg_mode): Likewise.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
	* targhooks.c (default_get_reg_raw_mode): Likewise.
	* config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
	* config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
	* config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
	(msp430_get_raw_result_mode): Likewise.
	* config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
	* dbxout.c (dbxout_parms): Require fixed-size modes.
	* expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
	* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
	* omp-low.c (lower_oacc_reductions): Likewise.
	* simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
	(simplify_subreg): Update accordingly.
	* varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
	(force_const_mem): Update accordingly.  Return NULL_RTX for modes
	that aren't fixed-size.
	(get_pool_mode): Return a fixed_size_mode.
	(output_constant_pool_2): Take a fixed_size_mode.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/rtl.texi (vec_series): Document.
	(const): Say that the operand can be a vec_series.
	* rtl.def (VEC_SERIES): New rtx code.
	* rtl.h (const_vec_series_p_1): Declare.
	(const_vec_series_p): New function.
	* emit-rtl.h (gen_const_vec_series): Declare.
	(gen_vec_series): Likewise.
	* emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
	(gen_vec_series): Likewise.
	* optabs.c (expand_mult_highpart): Use gen_const_vec_series.
	* simplify-rtx.c (simplify_unary_operation): Handle negations
	of vector series.
	(simplify_binary_operation_series): New function.
	(simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
	(test_vector_ops_series): New function.
	(test_vector_ops): Call it.
	* config/powerpcspe/altivec.md (altivec_lvsl): Use
	gen_const_vec_series.
	(altivec_lvsr): Likewise.
	* config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* doc/rtl.texi (const): Update description of address constants.
	Say that vector constants are allowed too.
	* common.md (E, F): Use CONSTANT_P instead of checking for
	CONST_VECTOR.
	* emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
	checking for CONST_VECTOR.
	* expmed.c (make_tree): Use build_vector_from_val for a CONST
	VEC_DUPLICATE.
	* expr.c (expand_expr_real_2): Check for vector modes instead
	of checking for CONST_VECTOR.
	* rtl.h (const_vec_p): New function.
	(const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
	(unwrap_const_vec_duplicate): Handle them here too.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    David Malcolm  <dmalcolm@redhat.com>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (vec_duplicate_p): New function.
	* selftest-rtl.c (assert_rtx_eq_at): New function.
	* selftest-rtl.h (ASSERT_RTX_EQ): New macro.
	(assert_rtx_eq_at): Declare.
	* selftest.h (selftest::simplify_rtx_c_tests): Declare.
	* selftest-run-tests.c (selftest::run_tests): Call it.
	* simplify-rtx.c: Include selftest.h and selftest-rtl.h.
	(simplify_unary_operation_1): Recursively handle vector duplicates.
	(simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
	vector duplicates.
	(simplify_subreg): Handle subregs of vector duplicates.
	(make_test_reg, test_vector_ops_duplicate, test_vector_ops)
	(selftest::simplify_rtx_c_tests): New functions.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* emit-rtl.h (gen_const_vec_duplicate): Declare.
	(gen_vec_duplicate): Likewise.
	* emit-rtl.c (gen_const_vec_duplicate_1): New function, split
	out from...
	(gen_const_vector): ...here.
	(gen_const_vec_duplicate, gen_vec_duplicate): New functions.
	(gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
	whose elements are all equal.
	* optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
	* simplify-rtx.c (simplify_const_unary_operation): Likewise.
	(simplify_relational_operation): Likewise.
	* config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
	Likewise.
	(aarch64_simd_dup_constant): Use gen_vec_duplicate.
	(aarch64_expand_vector_init): Likewise.
	* config/arm/arm.c (neon_vdup_constant): Likewise.
	(neon_expand_vector_init): Likewise.
	(arm_expand_vec_perm): Use gen_const_vec_duplicate.
	(arm_block_set_unaligned_vect): Likewise.
	(arm_block_set_aligned_vect): Likewise.
	* config/arm/neon.md (neon_copysignf<mode>): Likewise.
	* config/i386/i386.c (ix86_expand_vec_perm): Likewise.
	(expand_vec_perm_even_odd_pack): Likewise.
	(ix86_vector_duplicate_value): Use gen_vec_duplicate.
	* config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
	* config/ia64/ia64.c (ia64_expand_vecint_compare): Use
	gen_const_vec_duplicate.
	* config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
	* config/mips/mips.c (mips_gen_const_int_vector): Use
	gen_const_vec_duplicate.
	(mips_expand_vector_init): Use CONST0_RTX.
	* config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
	(define_split): Use gen_const_vec_duplicate.
	* config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
	(define_split): Use gen_const_vec_duplicate.
	* config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
	(vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
	* config/spu/spu.c (spu_const): Likewise.

2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* combine.c (can_change_dest_mode): Reject changes in
	REGMODE_NATURAL_SIZE.

2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>

	* configure.ac (--enable-libssp): New.
	(gcc_cv_libc_provides_ssp): Check for explicit setting before
	trying to determine target-specific default.  Adjust indentation.
	* configure: Regenerated.
	* doc/install.texi (Configuration): Expand --disable-libssp
	documentation.

2017-10-31  Daniel Santos  <daniel.santos@pobox.com>

	config/i386/i386.c (ix86_expand_epilogue): Correct stack
	calculation.

2017-10-31  Martin Jambor  <mjambor@suse.cz>

	PR c++/81702
	* gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.

2017-10-31  David Malcolm  <dmalcolm@redhat.com>

	* auto-profile.c (autofdo_source_profile::read): Use
	UNKNOWN_LOCATION rather than 0.
	* diagnostic-core.h (warning_at_rich_loc): Rename to...
	(warning_at): ...this overload.
	(warning_at_rich_loc_n): Rename to...
	(warning_n): ...this overload.
	(error_at_rich_loc): Rename to...
	(error_at): ...this overload.
	(pedwarn_at_rich_loc): Rename to...
	(pedwarn): ...this overload.
	(permerror_at_rich_loc): Rename to...
	(permerror): ...this overload.
	(inform_at_rich_loc): Rename to...
	(inform): ...this overload.
	* diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
	(diagnostic_n_impl_richloc): Rename to...
	(diagnostic_n_impl): ...this rich_location *-based decl.
	(inform_at_rich_loc): Rename to...
	(inform): ...this, and add an assertion.
	(inform_n): Update for removal of location_t-based diagnostic_n_impl.
	(warning_at_rich_loc): Rename to...
	(warning_at): ...this, and add an assertion.
	(warning_at_rich_loc_n): Rename to...
	(warning_n): ...this, and add an assertion.
	(warning_n): Update location_t-based implementation for removal of
	location_t-based diagnostic_n_impl.
	(pedwarn_at_rich_loc): Rename to...
	(pedwarn): ...this, and add an assertion.
	(permerror_at_rich_loc): Rename to...
	(permerror): ...this, and add an assertion.
	(error_n): Update for removal of location_t-based diagnostic_n_impl.
	(error_at_rich_loc): Rename to...
	(error_at): ...this, and add an assertion.
	* gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
	(driver::do_spec_on_infiles): Likewise.
	* substring-locations.c (format_warning_va): Update for renaming
	of inform_at_rich_loc.

2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
	_Float<N>X built-in functions so that the variant without the
	"__builtin_" prefix is only enabled for the GNU C and Objective C
	languages when they are in non-strict ANSI/ISO mode.
	(DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
	* target.def (floatn_builtin_p): Add a target hook to control
	whether _Float<N> and _Float<N>X built-in functions without the
	"__builtin_" prefix are enabled, and return true for C and
	Objective C in the default hook.  Include langhooks.h in
	targhooks.c.
	* targhooks.h (default_floatn_builtin_p): Likewise.
	* targhooks.c (default_floatn_builtin_p): Likewise.
	* doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
	floatn_builtin_p target hook.
	* doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.

2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
	    Eric Botcazou  <ebotcazou@adacore.com>

	PR rtl-optimization/81803
	* lra-constraints.c (curr_insn_transform): Also reload the whole
	register for a strict subreg no wider than a word if this is for
	a WORD_REGISTER_OPERATIONS target.

2017-10-31  Jason Merrill  <jason@redhat.com>

	* gdbinit.in: Skip over inlines from timevar.h.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* doc/gcov.texi: Document new option.
	* gcov.c (print_usage): Likewise print it.
	(process_args): Support the argument.
	(format_count): New function.
	(format_gcov): Use the function.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct name_map): do not use typedef.
	Define operator== and operator<.
	(name_search): Remove.
	(name_sort): Remove.
	(main): Do not allocate names.
	(process_file): Add vertical space.
	(generate_results): Use std::find.
	(release_structures): Do not release memory.
	(find_source): Use std::find.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct line_info): Remove it's typedef.
	(line_info::line_info): Add proper ctor.
	(line_info::has_block): Do not use a typedef.
	(struct source_info): Do not use typedef.
	(circuit): Likewise.
	(get_cycles_count): Likewise.
	(output_intermediate_file): Iterate via vector iterator.
	(add_line_counts): Use std::vector methods.
	(accumulate_line_counts): Likewise.
	(output_lines): Likewise.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* gcov.c (struct source_info): Remove typedef.
	(source_info::source_info): Add proper ctor.
	(accumulate_line_counts): Use struct, not it's typedef.
	(output_gcov_file): Likewise.
	(output_lines): Likewise.
	(main): Do not allocate an array.
	(output_intermediate_file): Use size of vector container.
	(process_file): Resize the vector.
	(generate_results): Do not preallocate, use newly added vector
	lines.
	(release_structures): Do not release sources.
	(find_source): Use vector methods.
	(add_line_counts): Do not use typedef.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* doc/gcov.texi: Document that.
	* gcov.c (add_line_counts): Mark lines with a non-executed
	statement.
	(output_line_beginning): Handle such lines.
	(output_lines): Pass new argument.
	(output_intermediate_file): Print it in intermediate format.

2017-10-31  Martin Liska  <mliska@suse.cz>

	* color-macros.h: New file.
	* diagnostic-color.c: Factor out color related to macros to
	color-macros.h.
	* doc/gcov.texi: Document -k option.
	* gcov.c (INCLUDE_STRING): Include string.h.
	(print_usage): Add -k option.
	(process_args): Parse it.
	(pad_count_string): New function.
	(output_line_beginning): Likewise.
	(DEFAULT_LINE_START): New macro.
	(output_lines): Support color output.

2017-10-31  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/82633
	* doc/gcov.texi: Document -fkeep-{static,inline}-functions and
	their interaction with GCOV infrastructure.
	* configure.ac: Add -fkeep-{inline,static}-functions to
	coverage_flags.
	* configure: Regenerate.

2017-10-31  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82772
	* config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".

2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/82674
	* config/rs6000/rs6000.md (allocate_stack): Force update interval
	into a register if it does not fit into an immediate offset field.

2017-10-31  Olivier Hainque  <hainque@adacore.com>

	* gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.

2017-10-31  Julia Koval  <julia.koval@intel.com>

	* config.gcc: Add gfniintrin.h.
	* config/i386/gfniintrin.h: New.
	* config/i386/i386-builtin-types.def
	(__builtin_ia32_vgf2p8affineinvqb_v64qi,
	__builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
	__builtin_ia32_vgf2p8affineinvqb_v32qi,
	__builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
	__builtin_ia32_vgf2p8affineinvqb_v16qi,
	__builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
	* config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
	V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
	V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
	V64QI_FTYPE_V64QI_V64QI_INT): New types.
	* config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
	* config/i386/immintrin.h: Include gfniintrin.h.
	* config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.

2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.

2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
	(arm_ashldi3_1bit): Remove pattern.
	(ashrdi3): Remove shift by 1 expansion.
	(arm_ashrdi3_1bit): Remove pattern.
	(lshrdi3): Remove shift by 1 expansion.
	(arm_lshrdi3_1bit): Remove pattern.
	* config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
	cost of ashldi3 by 1.
	* config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
	(<shift>di3_neon): Likewise.

2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>

	* config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
	both identically named patterns to (*aarch64_simd_mov<VD:mode>)
	and (*aarch64_simd_mov<VQ:mode>).
	(*aarch64_simd_mov<VD:mode>): Change type attribute to match
	pattern alternative.
	(*aarch64_simd_mov<VQ:mode>): Re-order and change type
	attributes to match pattern alternative.

2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>

	* config.gcc (powerpc*-*-*): Add emmintrin.h.
	* config/rs6000/emmintrin.h: New file.
	* config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.

2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
	* (movdi_vfp_cortexa8): Remove pattern.

2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
	etc. reference.
	(Specific, alpha*-dec-osf5.1): Remove.
	(Specific, mips-sgi-irix5): Remove.
	(Specific, mips-sgi-irix6): Remove.

2017-10-30  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/22141
	* gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
	arguments to clear_bit_region_be.

2017-10-30  Jim Wilson  <wilson@tuliptree.org>

	* gimplify.c: Include memmodel.h.

2017-10-30  Martin Jambor  <mjambor@suse.cz>

	* omp-grid.c (grid_attempt_target_gridification): Also insert a
	condition whether loop should be executed at all.

2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
	gimple folding of vec_madd() intrinsics.
	* config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
	fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
	* config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4

2017-10-30  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82762
	Revert
	2017-10-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82129
	Revert
	2017-08-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81181
	* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
	(compute_antic): ... end of iteration here.

2017-10-30  Joseph Myers  <joseph@codesourcery.com>

	* doc/invoke.texi (C Dialect Options): Document -std=c17,
	-std=iso9899:2017 and -std=gnu17.
	* doc/standards.texi (C Language): Document C17 support.
	* doc/cpp.texi (Overview): Mention -std=c17.
	(Standard Predefined Macros): Document C11 and C17 values of
	__STDC_VERSION__.  Do not refer to C99 support as incomplete.
	* doc/extend.texi (Inline): Do not list individual options for
	standards newer than C99.
	* dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
	"GNU C17".
	* config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
	language name.

2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>

	* asan.c (asan_finish_file): Align asan globals array by shadow
	granularity.

2017-10-30  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/22141
	* gimple-ssa-store-merging.c: Include rtl.h and expr.h.
	(struct store_immediate_info): Add bitregion_start and bitregion_end
	fields.
	(store_immediate_info::store_immediate_info): Add brs and bre
	arguments and initialize bitregion_{start,end} from those.
	(struct merged_store_group): Add bitregion_start, bitregion_end,
	align_base and mask fields.  Drop unnecessary struct keyword from
	struct store_immediate_info.  Add do_merge method.
	(clear_bit_region_be): Use memset instead of loop storing zeros.
	(merged_store_group::do_merge): New method.
	(merged_store_group::merge_into): Use do_merge.  Allow gaps in between
	stores as long as the surrounding bitregions have no gaps.
	(merged_store_group::merge_overlapping): Use do_merge.
	(merged_store_group::apply_stores): Test that bitregion_{start,end}
	is byte aligned, rather than requiring that start and width are
	byte aligned.  Drop unnecessary struct keyword from
	struct store_immediate_info.  Allocate and populate also mask array.
	Make start of the arrays relative to bitregion_start rather than
	start and size them according to bitregion_{end,start} difference.
	(struct imm_store_chain_info): Drop unnecessary struct keyword from
	struct store_immediate_info.
	(pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
	(pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
	struct keyword from struct store_immediate_info.
	(imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
	between stores as long as the surrounding bitregions have no gaps.
	Formatting fixes.
	(struct split_store): Add orig non-static data member.
	(split_store::split_store): Initialize orig to false.
	(find_constituent_stmts): Return store_immediate_info *, non-NULL
	if there is exactly a single original stmt.  Change stmts argument
	to pointer from reference, if NULL, don't push anything to it.  Add
	first argument, use it to optimize skipping over orig stmts that
	are known to be before bitpos already.  Simplify.
	(split_group): Return unsigned int count how many stores are or
	would be needed rather than a bool.  Add allow_unaligned argument.
	Change split_stores argument from reference to pointer, if NULL,
	only do a dry run computing how many stores would be produced.
	Rewritten algorithm to use both alignment and misalign if
	!allow_unaligned and handle bitfield stores with gaps.
	(imm_store_chain_info::output_merged_store): Set start_byte_pos
	from bitregion_start instead of start.  Compute allow_unaligned
	here, if true, do 2 split_group dry runs to compute which one
	produces fewer stores and prefer aligned if equal.  Punt if
	new count is bigger or equal than original before emitting any
	statements, rather than during that.  Remove no longer needed
	new_ssa_names tracking.  Replace num_stmts with
	split_stores.length ().  Use 32-bit stack allocated entries
	in split_stores auto_vec.  Try to reuse original store lhs/rhs1
	if possible.  Handle bitfields with gaps.
	(pass_store_merging::execute): Ignore bitsize == 0 stores.
	Compute bitregion_{start,end} for the stores and construct
	store_immediate_info with that.  Formatting fixes.

2017-10-30  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82725
	* config/i386/i386.c (legitimate_pic_address_disp_p): Allow
	UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.

2017-10-29  Jim Wilson  <wilson@tuliptree.org>

	* gimplify.c: Include tm_p.h.

	* common.opt (gcoff): Re-add as ignored option.
	(gcoff1, gcoff2, gcoff3): Likewise.

	* Makefile.in (OBJS): Delete sdbout.o.
	(GTFILES): Delete $(srcdir)/sdbout.c.
	* debug.h: Delete sdb_debug_hooks.
	* final.c: Delete sdbout.h include.
	(final_scan_insn): Delete SDB_DEBUG check.
	(rest_of_clean_state): Likewise.
	* output.h: Delete sdb_begin_function_line.
	* sdbout.c: Delete.
	* sdbout.h: Delete.
	* toplev.c: Delete sdbout.h include.
	(process_options): Delete SDB_DEBUG check.
	* tree-core.h (tree_type_common): Delete pointer field of
	tree_type_symtab.
	* tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
	TYPE_SYMTAB_POINTER.
	* tree.h (TYPE_SYMTAB_POINTER): Delete.
	(TYPE_SYMTAB_IS_POINTER): Delete.
	(TYPE_SYMTAB_IS_DIE): Renumber.
	* xcoffout.c: Refer to former sdbout.c file.
	(xcoffout_begin_prologue): Use past tense for sdbout.c reference.

	* doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
	* doc/invoke.texi (SEEALSO): Delete adb and sdb references.
	(Debugging Options): Delete -gcoff.
	(-gstabs): Delete SDB reference.
	(-gcoff): Delete.
	(-gcoff@var{level}): Delete.
	* doc/passes.texi (Debugging information output): Delete SDB and
	sdbout.c references.
	* doc/tm.texi: Regenerate.
	* doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
	(SDB and DWARF): Change node name to DWARF and delete SDB and COFF
	references.
	(DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
	(PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
	(SDB_DEBUGGING_INFO): Delete.
	(PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
	SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
	* target.def (output_source_filename): Delete COFF reference.

	* common.opt (gcoff): Delete.
	(gxcoff+): Update Negative chain.
	* defaults.h: Delete all references to SDB_DEBUGGING_INFO and
	SDB_DEBUG.
	* dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
	* flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
	* function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
	and SDB references.
	(expand_function_start): Change sdb reference to past tense.
	(expand_function_end): Change sdb reference to past tense.
	* gcc.c (cpp_unique_options): Delete gcoff3 reference.
	* opts.c (debug_type_names): Delete coff entry.
	(common_handle_option): Delete OPT_gcoff case.
	* system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.

	* config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
	* config/cris/cris.h: Delete SDB reference in comment.
	* config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
	(ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
	* config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
	* config/i386/i386.c (svr4_dbx_register_map): Change SDB references
	to past tense.
	(ix86_expand_prologue): Likewise.
	* config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
	* config/ia64/ia64.h: Likewise.
	* config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
	* config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
	support.
	* config/mmix/mmix.h: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/stormy/storym16.h: Likewise.
	* config/visium/visium.h: Likewise.
	* config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.

2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
	* config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
	FRAME_POINTER_REGNUM point at high end of local var area.

2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>

	* bb-reorder.c (find_traces_1_round): Fix off-by-one index.
	Move comment around.  Do not reset best_edge for a copiable
	destination if the copy would cause a partition change.
	(better_edge_p): Remove redundant check.

2017-10-27  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.

2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
	for math functions that have _Float<N> and _Float<N>X variants.
	(mathfn_built_in_2): Add support for math functions that have
	_Float<N> and _Float<N>X variants.
	(DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
	(expand_builtin_mathfn_ternary): Add support for fma with
	_Float<N> and _Float<N>X variants.
	(expand_builtin): Likewise.
	(fold_builtin_3): Likewise.
	* builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
	create math function _Float<N> and _Float<N>X variants as external
	library builtins.
	(BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
	DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
	the __builtin_ prefix and if not strict ansi, without the prefix.
	(BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
	(BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
	(BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
	(BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
	(BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
	(BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
	* builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
	function signatures for fma _Float<N> and _Float<N>X variants.
	(BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
	(BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
	(BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
	(BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
	(BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
	(BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
	* gencfn-macros.c (print_case_cfn): Add support for math functions
	that have _Float<N> and _Float<N>X variants.
	(print_define_operator_list): Likewise.
	(fltfn_suffixes): Likewise.
	(main): Likewise.
	* internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
	for math functions that have _Float<N> and _Float<N>X variants.
	(SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
	and _Float<N>X variants.
	(COPYSIGN): Likewise.
	(FMIN): Likewise.
	(FMAX): Likewise.
	* fold-const.c (tree_call_nonnegative_warnv_p): Add support for
	copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
	variants.
	(integer_valued_read_call_p): Likewise.
	* fold-const-call.c (fold_const_call_ss): Likewise.
	(fold_const_call_sss): Add support for copysign, fmin, and fmax
	_Float<N> and _Float<N>X variants.
	(fold_const_call_ssss): Add support for fma _Float<N> and
	_Float<N>X variants.
	* gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
	support for copysign and fma _Float<N> and _Float<N>X variants.
	(backprop::process_builtin_call_use): Likewise.
	* tree-call-cdce.c (can_test_argument_range); Add support for
	sqrt _Float<N> and _Float<N>X variants.
	(edom_only_function): Likewise.
	(get_no_error_domain): Likewise.
	* tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
	* tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
	copysign _Float<N> and _Float<N>X variants.
	* config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
	handled by machine independent code.
	(FMAF128): Likewise.
	* doc/cpp.texi (Common Predefined Macros): Document defining
	__FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
	fma _Float<N> and _Float<N>X variants.

2017-10-27  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82692
	* config/i386/i386-modes.def (CCFPU): Remove definition.
	* config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
	(ix86_cc_modes_compatible): Ditto.
	(ix86_expand_carry_flag_compare): Ditto.
	(ix86_expand_int_movcc): Ditto.
	(ix86_expand_int_addcc): Ditto.
	(ix86_reverse_condition): Ditto.
	(ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
	Return true/false for unordered/ordered fp comparisons.
	(ix86_cc_mode): Always return CCFPmode for float mode comparisons.
	(ix86_prepare_fp_compare_args): Update for rename.
	(ix86_expand_fp_compare): Update for rename.  Generate unordered
	compare RTXes wrapped with UNSPEC_NOTRAP unspec.
	(ix86_expand_sse_compare_and_jump): Ditto.
	* config/i386/predicates.md (fcmov_comparison_operator):
	Remove CCFPU mode handling.
	(ix86_comparison_operator): Ditto.
	(ix86_carry_flag_operator): Ditto.
	* config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
	(*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
	(*cmpu<mode>_cc_i387): Ditto.
	(FPCMP): Remove mode iterator.
	(unord): Remove mode attribute.
	(unord_subst): New define_subst transformation
	(unord): New define_subst attribute.
	(unordered): Ditto.
	(*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
	(*cmpi<unord>xf_i387): Ditto.
	* config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
	from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
	using unord_subst transformation.
	* config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
	(round_saeonly): Also handle CCFP mode.
	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
	Remove UNSPEC_SAHF unspec handling.

2017-10-27  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.

2017-10-27  Jeff Law  <law@redhat.com>

	* gimple-ssa-sprintf.c: Include domwalk.h.
	(class sprintf_dom_walker): New class, derived from dom_walker.
	(sprintf_dom_walker::before_dom_children): New function.
	(struct call_info): Moved into sprintf_dom_walker class
	(compute_formath_length, handle_gimple_call): Likewise.
	(sprintf_length::execute): Call the dominator walker rather
	than walking the statements.

	* tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
	gimple statement locations.
	(check_array_bounds): Corresponding changes.  Get the statement's
	location directly from wi->stmt.

2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>

	PR target/82717
	* doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.

2017-10-27  Jan Hubicka  <hubicka@ucw.cz>

	* config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
	X86_TUNE_MOVX): Disable for Haswell and newer CPUs.

2017-10-27  Jakub Jelinek  <jakub@redhat.com>

	PR target/82703
	* config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
	* config/i386/i386.c (maybe_get_pool_constant): Removed.
	(ix86_split_to_parts): Use avoid_constant_pool_reference instead of
	maybe_get_pool_constant.
	* config/i386/predicates.md (zero_extended_scalar_load_operand):
	Likewise.

2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
	2.26 caveat.  Update gas and gld versions.
	(Specific, *-*-solaris2*): Update binutils version.  Remove caveat
	reference.

2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* cgraph.h (set_malloc_flag): Declare.
	* cgraph.c (set_malloc_flag_1): New function.
	(set_malloc_flag): Likewise.
	* ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
	* ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
	false.
	(read_ipa_call_summary): Add support for reading is_return_callee.
	(write_ipa_call_summary): Stream is_return_callee.
	* ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
	* ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
	ipa-prop.h, ipa-fnsummary.h.
	(pure_const_names): Change to static.
	(malloc_state_e): Define.
	(malloc_state_names): Define.
	(funct_state_d): Add field malloc_state.
	(varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
	(check_retval_uses): New function.
	(malloc_candidate_p): Likewise.
	(analyze_function): Add support for malloc attribute.
	(pure_const_write_summary): Stream malloc_state.
	(pure_const_read_summary): Add support for reading malloc_state.
	(dump_malloc_lattice): New function.
	(propagate_malloc): New function.
	(warn_function_malloc): New function.
	(ipa_pure_const::execute): Call propagate_malloc and
	ipa_free_fn_summary.
	(pass_local_pure_const::execute): Add support for malloc attribute.
	* ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
	* doc/invoke.texi: Document Wsuggest-attribute=malloc.

2017-10-27  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/82457
	* doc/invoke.texi: Document that one needs a non-strict ISO mode
	for fork-like functions to be properly instrumented.

2017-10-27  Richard Biener  <rguenther@suse.de>

	PR middle-end/81659
	* tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
	info when we redirected EH.

2017-10-26  Michael Collison  <michael.collison@arm.com>

	* config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
	New pattern.
	(<optab>_trunchf<GPI:mode>2: New pattern.
	(<optab>_trunc<vgp><GPI:mode>2: New pattern.
	* config/aarch64/iterators.md (wv): New mode attribute.
	(vf, VF): New mode attributes.
	(vgp, VGP): New mode attributes.
	(s): Update attribute with SImode and DImode prefixes.

2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
	* config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
	* config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
	(nios2_option_overide): Initialize it.  Don't allow R0-relative
	addressing with PIC.
	(nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
	(nios2_symbolic_constant_p): Likewise.
	(nios2_legitimate_address_p): Likewise.
	(nios2_r0rel_section_name_p): New.
	(nios2_symbol_ref_in_r0rel_data_p): New.
	(nios2_emit_move_sequence): Handle r0rel_constant_p.
	(r0rel_constant_p): New.
	(nios2_print_operand_address): Handle r0rel_constant_p.
	(nios2_cdx_narrow_form_p): Likewise.
	* config/nios2/nios2.opt (mr0rel-sec=): New option.
	* doc/invoke.texi (Option Summary): Add -mr0rel-sec.
	(Nios II Options): Document -mr0rel-sec.

2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.c: Include xregex.h.
	(nios2_gprel_sec_regex): New.
	(nios2_option_overide): Initialize it.  Don't allow GP-relative
	addressing with PIC.
	(nios2_small_section_name_p): Check for regex match.
	* config/nios2/nios2.opt (mgprel-sec=): New option.
	* doc/invoke.texi (Option Summary): Add -mgprel-sec.
	(Nios II Options): Document -mgprel-sec.

2017-10-26  Jim Wilson  <wilson@tuliptree.org>

	* doc/invoke.texi (-fdebug-prefix-map): Expand documentation.

2017-10-26  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/82707
	* gimple.c (gimple_copy): Fix unsharing of
	GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.

2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>

	* config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
	_mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
	_mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
	_mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
	_mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
	_mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
	_mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
	_mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
	_mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
	_mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
	_mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
	_mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
	_mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
	_mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
	_mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
	_mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
	_mm512_mask_cmpunord_ps_mask): New intrinsics.

2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
	default to IBM.
	* config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
	* config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
	warning to rs6000.c.  Remove the Undocumented flag, since it has
	been documented.
	(-mabi=ibmlongdouble): Likewise.
	* config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
	already set, set the default format for long double.
	(rs6000_debug_reg_global): Print whether long double is IBM or
	IEEE.
	(rs6000_option_override_internal): Rework setting long double
	format.  Only warn if the user is changing the long double default
	and they did not use -Wno-psabi.
	* doc/invoke.texi (PowerPC options): Update the documentation for
	-mabi=ieeelongdouble and -mabi=ibmlongdouble.

2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* rtl.h (wider_subreg_mode): New function.
	* ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
	rather than an unsigned int *.
	* ira-color.c (regno_max_ref_width): Replace with...
	(regno_max_ref_mode): ...this new variable.
	(coalesced_pseudo_reg_slot_compare): Update accordingly.
	Use wider_subreg_mode.
	(ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
	rather than an unsigned int *.
	* lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
	(process_alt_operands): Likewise.
	(invariant_p): Likewise.
	* lra-spills.c (assign_mem_slot): Likewise.
	(add_pseudo_to_slot): Likewise.
	* lra.c (collect_non_operand_hard_regs): Likewise.
	(add_regs_to_insn_regno_info): Likewise.
	* reload1.c (regno_max_ref_width): Replace with...
	(regno_max_ref_mode): ...this new variable.
	(reload): Update accordingly.  Update call to
	ira_sort_regnos_for_alter_reg.
	(alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
	(init_eliminable_invariants): Update to use regno_max_ref_mode.
	(scan_paradoxical_subregs): Likewise.

2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
	(aarch64_frame): Add emit_frame_chain boolean.
	* config/aarch64/aarch64.c (aarch64_frame_pointer_required)
	Move eh_return case to aarch64_layout_frame.
	(aarch64_layout_frame): Initialize emit_frame_chain.
	(aarch64_expand_prologue): Use emit_frame_chain.

2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_layout_frame):
	Ensure LR is always stored at the bottom of the callee-saves.
	Remove rarely used frame layout which saves callee-saves at top of
	frame, so the store of LR can be used as a valid probe in all cases.

2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
	Improve unaligned TImode/TFmode base/offset split.

2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
	* combine.c (find_single_use_1): Likewise.
	(expand_field_assignment): Likewise.
	(move_deaths): Likewise.
	* lra-constraints.c (simplify_operand_subreg): Likewise.
	(curr_insn_transform): Likewise.
	* lra.c (collect_non_operand_hard_regs): Likewise.
	(add_regs_to_insn_regno_info): Likewise.
	* rtlanal.c (reg_referenced_p): Likewise.
	(covers_regno_no_parallel_p): Likewise.

2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>

	* wide-int-print.cc (print_hex): Loop based on extract_uhwi.
	Don't print any bits outside the precision of the value.
	* wide-int.cc (test_printing): Add some new tests.

2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
	supports -xbrace_comment option.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
	(ASM_CPU_SPEC): Use it.

2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>

	* target.def (static_rtx_alignment): New hook.
	* targhooks.h (default_static_rtx_alignment): Declare.
	* targhooks.c (default_static_rtx_alignment): New function.
	* doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
	* doc/tm.texi: Regenerate.
	* varasm.c (force_const_mem): Use targetm.static_rtx_alignment
	instead of targetm.constant_alignment.  Remove call to
	set_mem_attributes.
	* config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
	(cris_preferred_mininum_alignment): New function, split out from...
	(cris_constant_alignment): ...here.
	(cris_static_rtx_alignment): New function.
	* config/i386/i386.c (ix86_static_rtx_alignment): New function,
	split out from...
	(ix86_constant_alignment): ...here.
	(TARGET_STATIC_RTX_ALIGNMENT): Redefine.
	* config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
	(mmix_static_rtx_alignment): New function.
	* config/spu/spu.c (spu_static_rtx_alignment): New function.
	(TARGET_STATIC_RTX_ALIGNMENT): Redefine.

2017-10-26  Tamar Christina  <tamar.christina@arm.com>

	PR target/81800
	* config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
	Add flag_trapping_math and flag_fp_int_builtin_inexact.

2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>

	* config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
	* config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
	mark as a sign-extending load.
	(local_pic_load_u): Define.

2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>

	PR middle-end/82062
	* fold-const.c (operand_equal_for_comparison_p): Also return true
	if ARG0 is a simple variant of ARG1 with narrower precision.
	(fold_ternary_loc): Always pass unstripped operands to the predicate.

2017-10-25  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
	cost correctly.
	* i386.h (processor_costs): Add gather_static, gather_per_elt,
	scatter_static, scatter_per_elt.
	* x86-tune-costs.h: Add new cost entries.

2017-10-25  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (vn_eliminate): Declare.
	* tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
	class pass_fre): Move to ...
	* tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
	class pass_fre): ... here and adjust for statistics.

2017-10-25  Jakub Jelinek  <jakub@redhat.com>

	PR libstdc++/81706
	* attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
	for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
	(duplicate_one_attribute, copy_attributes_to_builtin): New functions.
	* attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
	declarations.

2017-10-25  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
	el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
	eliminate_push_avail, eliminate_insert): Move inside...
	(class eliminate_dom_walker): ... this class in preparation
	of move.
	(fini_eliminate): Remove by merging with ...
	(eliminate): ... this function.  Adjust for class changes.
	(pass_pre::execute): Remove fini_eliminate call.
	(pass_fre::execute): Likewise.

2017-10-24  Jakub Jelinek  <jakub@redhat.com>

	PR target/82460
	* config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
	(VPERMI2, VPERMI2I): New mode iterators.
	(<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
	(<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
	patterns.
	(<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
	mode iterator.  Remove 3 old define_insn patterns.
	(*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
	(<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
	VPERMI2 mode iterator, remove the other two expanders.
	(<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
	to use VPERMI2 mode iterator, add another alternative for vpermi2*
	instructions, remove the other two patterns.
	(<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
	mode iterator, remove the other two patterns.
	* config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
	(ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
	arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
	and adjust argument order accordingly.
	(ix86_expand_vec_perm): Adjust caller.
	(expand_vec_perm_1): Likewise.
	(expand_vec_perm_vpermi2_vpshub2): Rename to ...
	(expand_vec_perm_vpermt2_vpshub2): ... this.
	(ix86_expand_vec_perm_const_1): Adjust caller.
	(ix86_vectorize_vec_perm_const_ok): Adjust comments.

	PR target/82370
	* config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
	(VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
	(vec_shl_<mode>): Remove unused expander.
	(avx512bw_<shift_insn><mode>3): New define_insn.
	(<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
	(<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.

2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/82466
	* doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
	description.

2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>

	PR rtl-optimization/82396
	* gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
	(autopref_multipass_init): Simplify initialization.
	(autopref_rank_data): Simplify sort order.
	* gcc/sched-int.h (autopref_multipass_data_): Remove
	multi_mem_insn_p, min_offset and max_offset.

2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>

	PR middle-end/60580
	* config/aarch64/aarch64.c (aarch64_frame_pointer_required)
	Check special value of flag_omit_frame_pointer.
	(aarch64_can_eliminate): Likewise.
	(aarch64_override_options_after_change_1): Simplify handling of
	-fomit-frame-pointer and -fomit-leaf-frame-pointer.

2017-10-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82697
	* tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
	zero for conditional load and unconditional store.

2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>

	* doc/install.texi: Document bootstrap-cet.

2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/82659
	* config/i386/i386.c (rest_of_insert_endbranch): Don't insert
	ENDBR instruction at function entrance if function is only
	called directly.

2017-10-24  Jakub Jelinek  <jakub@redhat.com>

	PR target/82628
	* config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
	patterns to better describe from which operation the CF is computed.
	(addcarry<mode>_0, subborrow<mode>_0): New patterns.
	* config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
	one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
	is 0, use _0 suffixed expanders instead of emitting a comparison
	before it.

2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.md(*movsf_internal, *movdf_internal):
	Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.

2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>

	PR middle-end/82569
	* tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
	* expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
	* loop-iv.c (iv_get_reaching_def): Likewise.
	* cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
	variable is promoted and the partition contains undefined values.

2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.c (nios2_rtx_costs): Make costs better
	reflect reality.
	(nios2_address_cost): Define.
	(nios2_legitimize_address): Recognize (exp + constant) directly.
	(TARGET_ADDRESS_COST): Define.

2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
	(nios2_symbolic_memory_operand_p): Declare.
	(nios2_split_large_constant): Declare.
	(nios2_split_symbolic_memory_operand): Declare.
	* config/nios2/nios2.c: Adjust includes.
	(nios2_symbolic_constant_allowed): New.
	(nios2_symbolic_constant_p): New.
	(nios2_plus_symbolic_constant_p): New.
	(nios2_valid_addr_expr_p): Recognize addresses involving
	symbolic constants.
	(nios2_legitimate_address_p): Likewise, also LO_SUM.
	(nios2_symbolic_memory_operand_p): New.
	(nios2_large_constant_p): New.
	(nios2_split_large_constant): New.
	(nios2_split_plus_large_constant): New.
	(nios2_split_symbolic_memory_operand): New.
	(nios2_legitimize_address): Code refactoring.  Handle addresses
	involving symbolic constants.
	(nios2_emit_move_sequence): Likewise.
	(nios2_print_operand): Improve error output.
	(nios2_print_operand_address): Handle LO_SUM.
	(nios2_cdx_narrow_form_p): Likewise.
	* config/nios2/nios2.md (movqi_internal): Add splitter for memory
	operands involving symbolic constants.
	(movhi_internal, movsi_internal): Likewise.
	(zero_extendhisi2, zero_extendqi<mode>2): Likewise.
	(extendhisi2, extendqi<mode>2): Likewise.

2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>

	* tree-pass.h (PROP_rtl_split_insns): Define.
	* recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.

2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>

	* config/nios2/nios2.c (TARGET_LRA_P): Don't override.

2017-10-23  Jakub Jelinek  <jakub@redhat.com>

	PR debug/82630
	* target.def (const_not_ok_for_debug_p): Default to
	default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
	* targhooks.h (default_const_not_ok_for_debug_p): New declaration.
	* targhooks.c (default_const_not_ok_for_debug_p): New function.
	* dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
	which targetm.const_not_ok_for_debug_p returned true.
	* config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
	for UNSPECs.
	* config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
	* config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
	UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
	if !base_term_p.
	(ix86_const_not_ok_for_debug_p): New function.
	(i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
	(TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.

2017-10-23  David Malcolm  <dmalcolm@redhat.com>

	PR bootstrap/82610
	* system.h: Conditionally include "unique-ptr.h" if
	INCLUDE_UNIQUE_PTR is defined.
	* unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
	of defining INCLUDE_UNIQUE_PTR before including "system.h".

2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>

	* config/rl78/rl78.md: New define_expand "subdi3".

2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/82673
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
	DF_REF_INSN if DF_REF_INSN_INFO is false.

2017-10-23  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (dimode_scalar_chain::compute_convert_gain): Use
	xmm_move instead of sse_move.
	(sse_store_index): New function.
	(ix86_register_move_cost): Be more sensible about mismatch stall;
	model AVX moves correctly; make difference between sse->integer and
	integer->sse.
	(ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
	moves; make difference between SSE and AVX.
	* i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
	and zmm_move. Increase size of sse load and store tables;
	add unaligned load and store tables; add ssemmx_to_integer.
	* x86-tune-costs.h: Update all entries according to real
	move latencies from Agner Fog's manual and chip documentation.

2017-10-23  Jakub Jelinek  <jakub@redhat.com>

	PR target/82628
	* config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
	* config/i386/constraints.md (Wf): New constraint.
	* config/i386/i386.md (UNSPEC_SBB): New unspec.
	(cmp<dwi>_doubleword): Removed.
	(sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
	(sub<mode>3_carry_ccgz): Use unspec instead of compare.
	* config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
	expand with cmp<dwi>_doubleword.  For LTU and GEU use
	sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.

	* common.opt (gcolumn-info): Enable by default.
	* doc/invoke.texi (gcolumn-info): Document new default.

2017-10-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82672
	* graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
	Fold the stmt if we propagated into it.

2017-10-23  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
	(bitmap_remove_expr_from_set): ... this.  All callers call this
	for non-constant values.
	(bitmap_set_subtract): Rename to...
	(bitmap_set_subtract_expressions): ... this.  Adjust and
	optimize.
	(bitmap_set_contains_value): Remove superfluous check.
	(bitmap_set_replace_value): Inline into single caller ...
	(bitmap_value_replace_in_set): ... here and simplify.
	(dependent_clean): Merge into ...
	(clean): ... this using an overload.  Adjust.
	(prune_clobbered_mems): Adjust.
	(compute_antic_aux): Likewise.
	(compute_partial_antic_aux): Likewise.

2017-10-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82129
	Revert
	2017-08-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81181
	* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
	(compute_antic): ... end of iteration here.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>

	* target.def (starting_frame_offset): New hook.
	* doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
	(TARGET_STARTING_FRAME_OFFSET): ...this new hook.
	* doc/tm.texi.in: Regenerate.
	* hooks.h (hook_hwi_void_0): Declare.
	* hooks.c (hook_hwi_void_0): New function.
	* doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
	STARTING_FRAME_OFFSET.
	* builtins.c (expand_builtin_setjmp_receiver): Likewise.
	* reload1.c (reload): Likewise.
	* cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
	instead of STARTING_FRAME_OFFSET.
	* function.c (try_fit_stack_local): Likewise.
	(assign_stack_local_1): Likewise
	(instantiate_virtual_regs): Likewise.
	* rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
	* config/avr/avr.md (nonlocal_goto_receiver): Likewise.
	* config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
	* config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
	* config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
	* config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
	* config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
	* config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
	* config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
	* config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
	* config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
	* config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
	* config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
	* config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
	* config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
	* config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
	* config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
	* config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
	* config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
	* config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
	* config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
	* config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
	* config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
	* config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
	* config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
	* config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
	* config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
	* config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
	* config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
	* config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
	* config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
	* config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
	* config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
	* config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
	* config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
	* config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
	* config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
	* config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
	* config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
	* config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
	* config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
	* config/avr/avr.c (avr_starting_frame_offset): Make static and
	return a HOST_WIDE_INT.
	(avr_builtin_setjmp_frame_value): Use it instead of
	STARTING_FRAME_OFFSET.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
	* config/epiphany/epiphany.c (epiphany_starting_frame_offset):
	New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
	* config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
	* config/lm32/lm32.c (lm32_starting_frame_offset): New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
	* config/m32r/m32r.c (m32r_starting_frame_offset): New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
	* config/microblaze/microblaze.c (microblaze_starting_frame_offset):
	New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
	* config/mips/mips.c (mips_compute_frame_info): Refer to
	TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
	(mips_starting_frame_offset): New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
	* config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
	* config/mmix/mmix.c (mmix_starting_frame_offset): Make static
	and return a HOST_WIDE_INT.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	(mmix_initial_elimination_offset): Refer to
	TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
	* config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
	* config/pa/pa.c (pa_starting_frame_offset): New function.
	(pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
	(pa_expand_prologue): Likewise.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
	Redefine.
	(rs6000_starting_frame_offset): New function.
	* config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
	!FRAME_GROWS_DOWNWARD handling to...
	(RS6000_STARTING_FRAME_OFFSET): ...this new macro.
	* config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
	(rs6000_starting_frame_offset): New function.
	* config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
	* config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
	* config/vax/vax.c (vax_starting_frame_offset): New function.
	(vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
	* config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
	(TARGET_STARTING_FRAME_OFFSET): Redefine.
	* system.h (STARTING_FRAME_OFFSET): Poison.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vect-loop.c (vect_create_epilog_for_reduction): Use
	SCALAR_TYPE_MODE instead of TYPE_MODE.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.

2017-10-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82129
	* tree-ssa-pre.c (bitmap_set_and): Remove.
	(compute_antic_aux): Compute ANTIC_OUT intersection in a way
	canonicalizing expressions in the set to those with lowest
	ID rather than taking that from the first edge.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>

	* combine.c (rtx_equal_for_field_assignment_p): Use
	byte_lowpart_offset.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* internal-fn.c (expand_direct_optab_fn): Don't assign directly
	to a SUBREG_PROMOTED_VAR.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
	(expand_debug_source_expr): Likewise.
	* combine.c (combine_simplify_rtx): Likewise.
	* cse.c (fold_rtx): Likewise.
	* optabs.c (expand_float): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_binary_operation_1): Likewise.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
	(record_promoted_value): Likewise.
	* expr.c (expand_expr_real_2): Likewise.
	* ree.c (update_reg_equal_equiv_notes): Likewise.
	(combine_set_extension): Likewise.
	* rtlanal.c (low_bitmask_len): Likewise.
	* simplify-rtx.c (neg_const_int): Likewise.
	(simplify_binary_operation_1): Likewise.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
	* regcprop.c (maybe_mode_change): Likewise.
	* reload1.c (alter_reg): Likewise.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>

	* inchash.h (inchash::hash::add_wide_int): New function.
	* lto-streamer-out.c (hash_tree): Use it.

2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>

	* inchash.h (inchash::hash::add_wide_int): Rename to...
	(inchash::hash::add_hwi): ...this.
	* ipa-devirt.c (hash_odr_vtable): Update accordingly.
	(polymorphic_call_target_hasher::hash): Likewise.
	* ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
	(sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
	(sem_item_optimizer::update_hash_by_addr_refs): Likewise.
	* lto-streamer-out.c (hash_tree): Likewise.
	* optc-save-gen.awk: Likewise.
	* tree.c (add_expr): Likewise.

2017-10-22  Uros Bizjak  <ubizjak@gmail.com>

	PR target/52451
	* config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
	for ordered inequality comparisons even with TARGET_IEEE_FP.

2017-10-22  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82628
	* config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
	* config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
	Expand with cmp<dwi>_doubleword.

2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* extend.texi: Add x86 specific to 'nocf_check' attribute.
	List CET intrinsics.
	* invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
	specific to -fcf-protection option.

2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
	(OPTION_MASK_ISA_SHSTK_SET): Likewise.
	(OPTION_MASK_ISA_IBT_UNSET): Likewise.
	(OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
	(ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
	* config.gcc (extra_headers): Add cetintrin.h for x86 targets.
	(extra_objs): Add cet.o for Linux/x86 targets.
	(tmake_file): Add i386/t-cet for Linux/x86 targets.
	* config/i386/cet.c: New file.
	* config/i386/cetintrin.h: Likewise.
	* config/i386/t-cet: Likewise.
	* config/i386/cpuid.h (bit_SHSTK): New.
	(bit_IBT): Likewise.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect and
	pass IBT and SHSTK bits.
	* config/i386/i386-builtin-types.def
	(VOID_FTYPE_UNSIGNED_PVOID): New.
	(VOID_FTYPE_UINT64_PVOID): Likewise.
	* config/i386/i386-builtin.def: Add CET intrinsics.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add
	OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
	* config/i386/i386-passes.def: Add pass_insert_endbranch pass.
	* config/i386/i386-protos.h (make_pass_insert_endbranch): New
	prototype.
	* config/i386/i386.c (rest_of_insert_endbranch): New.
	(pass_data_insert_endbranch): Likewise.
	(pass_insert_endbranch): Likewise.
	(make_pass_insert_endbranch): Likewise.
	(ix86_notrack_prefixed_insn_p): Likewise.
	(ix86_target_string): Add -mibt, -mshstk flags.
	(ix86_option_override_internal): Add flag_cf_protection
	processing.
	(ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
	(ix86_print_operand): Add 'notrack' prefix output.
	(ix86_init_mmx_sse_builtins): Add CET intrinsics.
	(ix86_expand_builtin): Expand CET intrinsics.
	(x86_output_mi_thunk): Add 'endbranch' instruction.
	* config/i386/i386.h (TARGET_IBT): New.
	(TARGET_IBT_P): Likewise.
	(TARGET_SHSTK): Likewise.
	(TARGET_SHSTK_P): Likewise.
	* config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
	UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
	UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
	(builtin_setjmp_setup): New pattern.
	(builtin_longjmp): Likewise.
	(rdssp<mode>): Likewise.
	(incssp<mode>): Likewise.
	(saveprevssp): Likewise.
	(rstorssp): Likewise.
	(wrss<mode>): Likewise.
	(wruss<mode>): Likewise.
	(setssbsy): Likewise.
	(clrssbsy): Likewise.
	(nop_endbr): Likewise.
	* config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
	options.
	* config/i386/immintrin.h: Include <cetintrin.h>.
	* config/i386/linux-common.h
	(file_end_indicate_exec_stack_and_cet): New prototype.
	(TARGET_ASM_FILE_END): New.

2017-10-20  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
	latencies instead of having separate table; make difference between
	integer and float costs.
	* i386.h (processor_costs): Remove scalar_stmt_cost,
	scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
	scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
	vec_store_cost.
	* x86-tune-costs.h: Remove entries which has been removed in
	procesor_costs from all tables; make cond_taken_branch_cost
	and cond_not_taken_branch_cost COST_N_INSNS based.

2017-10-20  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.

2017-10-20  Jakub Jelinek  <jakub@redhat.com>

	* config/i386/i386.md (isa): Remove fma_avx512f.
	* config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
	<avx512>_fmadd_<mode>_mask3<round_name>,
	<avx512>_fmsub_<mode>_mask<round_name>,
	<avx512>_fmsub_<mode>_mask3<round_name>,
	<avx512>_fnmadd_<mode>_mask<round_name>,
	<avx512>_fnmadd_<mode>_mask3<round_name>,
	<avx512>_fnmsub_<mode>_mask<round_name>,
	<avx512>_fnmsub_<mode>_mask3<round_name>,
	<avx512>_fmaddsub_<mode>_mask<round_name>,
	<avx512>_fmaddsub_<mode>_mask3<round_name>,
	<avx512>_fmsubadd_<mode>_mask<round_name>,
	<avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
	(*vec_widen_umult_even_v16si<mask_name>,
	*vec_widen_smult_even_v16si<mask_name>): Likewise.
	(<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.

2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* extend.texi: Add 'nocf_check' documentation.
	* gimple.texi: Add second parameter to
	gimple_build_call_from_tree.
	* invoke.texi: Add -fcf-protection documentation.
	* rtl.texi: Add REG_CALL_NOTRACK documenation.

2017-10-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82473
	* tree-vect-loop.c (vectorizable_reduction): Properly get at
	the largest input type.

2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>

	* c-attribs.c (handle_nocf_check_attribute): New function.
	(c_common_attribute_table): Add 'nocf_check' handling.
	* gimple-parser.c: Add second argument NULL to
	gimple_build_call_from_tree.
	* attrib.c (comp_type_attributes): Check nocf_check attribute.
	* cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
	call insn.
	* combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
	* common.opt: Add fcf-protection flag.
	* emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
	* flag-types.h: Add enum cf_protection_level.
	* gimple.c (gimple_build_call_from_tree): Add second parameter.
	Add 'nocf_check' attribute propagation to gimple call.
	* gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
	(gimple_build_call_from_tree): Update prototype.
	(gimple_call_nocf_check_p): New function.
	(gimple_call_set_nocf_check): Likewise.
	* gimplify.c: Add second argument to gimple_build_call_from_tree.
	* ipa-icf.c: Add nocf_check attribute in statement hash.
	* recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
	* reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
	* toplev.c (process_options): Add flag_cf_protection handling.

2017-10-19  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.

2017-10-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82603
	* tree-if-conv.c (predicate_mem_writes): Make sure to only
	remove false predicated stores.

2017-10-20  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
	Remove return value and simplify, dump copied stmt after lhs
	adjustment.
	(translate_isl_ast_to_gimple::translate_isl_ast_node_user):
	Reduce dump verbosity.
	(gsi_insert_earliest): Likewise.
	(translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
	* graphite.c (print_global_statistics): Adjust dumping.
	(print_graphite_scop_statistics): Likewise.
	(print_graphite_statistics): Do not dump loops here.
	(graphite_transform_loops): But here.

2017-10-20  Nicolas Roche  <roche@adacore.com>

	* configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
	* configure: Regenerate.

2017-10-20  Jakub Jelinek  <jakub@redhat.com>

	PR target/82158
	* tree-cfg.c (pass_warn_function_return::execute): In noreturn
	functions when optimizing replace GIMPLE_RETURN stmts with
	calls to __builtin_unreachable ().

	PR sanitizer/82595
	* config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
	for -fsanitize=thread link of executables.
	(LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
	link of executables.

	PR target/82370
	* config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
	New mode iterators.
	(<shift_insn><mode>3<mask_name>): Change the last of the 3
	define_insns for logical vector shifts to use VI248_AVX512BW
	iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
	condition, useless isa and prefix attributes.  Change the first
	2 of these define_insns to ...
	(<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
	define_insn for avx512vl.
	(<shift_insn><mode>3): ... and this, new define_insn without
	masking for non-avx512vl.

	PR target/82370
	* config/i386/sse.md (*andnot<mode>3,
	<mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
	(=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
	and 256-bit vectors, the (=x,x,xm) alternative and when mask is
	not applied use empty suffix even for TARGET_AVX512VL.
	* config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
	is applied, supply evex,evex or evex,evex,evex instead of just
	evex.

2017-10-20  Julia Koval  <julia.koval@intel.com>

	* common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
	(OPTION_MASK_ISA_GFNI_UNSET): New.
	(ix86_handle_option): Handle OPT_mgfni.
	* config/i386/cpuid.h (bit_GFNI): New.
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
	* config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
	* config/i386/i386.c (ix86_target_string): Add -mgfni.
	(ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
	* config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
	* config/i386/i386.opt: Add mgfni.

2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>

	* config/msp430/msp430.c (msp430_option_override): Disable
	-fdelete-null-pointer-checks.
	* doc/invoke.text (-fdelete-null-pointer-checks): Document that.

2017-10-19  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune-costs.h (generic_cost, core_cost): Correct costs
	of x87 and SSE instructions.

2017-10-19  Jan Hubicka  <hubicka@ucw.cz>

	* asan.c (create_cond_insert_point): Do not update edge count.
	* auto-profile.c (afdo_propagate_edge): Update for edge count removal.
	(afdo_propagate_circuit): Likewise.
	(afdo_calculate_branch_prob): Likewise.
	(afdo_annotate_cfg): Likewise.
	* basic-block.h (struct edge_def): Remove count.
	(edge_def::count): New accessor.
	* bb-reorder.c (rotate_loop): Update.
	(find_traces_1_round): Update.
	(connect_traces): Update.
	(sanitize_hot_paths): Update.
	* cfg.c (unchecked_make_edge): Update.
	(make_single_succ_edge): Update.
	(check_bb_profile): Update.
	(dump_edge_info): Update.
	(update_bb_profile_for_threading): Update.
	(scale_bbs_frequencies_int): Update.
	(scale_bbs_frequencies_gcov_type): Update.
	(scale_bbs_frequencies_profile_count): Update.
	(scale_bbs_frequencies): Update.
	* cfganal.c (connect_infinite_loops_to_exit): Update.
	* cfgbuild.c (compute_outgoing_frequencies): Update.
	(find_many_sub_basic_blocks): Update.
	* cfgcleanup.c (try_forward_edges): Update.
	(try_crossjump_to_edge): Update
	* cfgexpand.c (expand_gimple_cond): Update
	(expand_gimple_tailcall): Update
	(construct_exit_block): Update
	* cfghooks.c (verify_flow_info): Update
	(redirect_edge_succ_nodup): Update
	(split_edge): Update
	(make_forwarder_block): Update
	(duplicate_block): Update
	(account_profile_record): Update
	* cfgloop.c (find_subloop_latch_edge_by_profile): Update.
	* cfgloopanal.c (expected_loop_iterations_unbounded): Update.
	* cfgloopmanip.c (scale_loop_profile): Update.
	(loopify): Update.
	(lv_adjust_loop_entry_edge): Update.
	* cfgrtl.c (try_redirect_by_replacing_jump): Update.
	(force_nonfallthru_and_redirect): Update.
	(purge_dead_edges): Update.
	(rtl_flow_call_edges_add): Update.
	* cgraphunit.c (init_lowered_empty_function): Update.
	(cgraph_node::expand_thunk): Update.
	* gimple-pretty-print.c (dump_probability): Update.
	(dump_edge_probability): Update.
	* gimple-ssa-isolate-paths.c (isolate_path): Update.
	* haifa-sched.c (sched_create_recovery_edges): Update.
	* hsa-gen.c (convert_switch_statements): Update.
	* ifcvt.c (dead_or_predicable): Update.
	* ipa-inline-transform.c (inline_transform): Update.
	* ipa-split.c (split_function): Update.
	* ipa-utils.c (ipa_merge_profiles): Update.
	* loop-doloop.c (add_test): Update.
	* loop-unroll.c (unroll_loop_runtime_iterations): Update.
	* lto-streamer-in.c (input_cfg): Update.
	(input_function): Update.
	* lto-streamer-out.c (output_cfg): Update.
	* modulo-sched.c (sms_schedule): Update.
	* postreload-gcse.c (eliminate_partially_redundant_load): Update.
	* predict.c (maybe_hot_edge_p): Update.
	(unlikely_executed_edge_p): Update.
	(probably_never_executed_edge_p): Update.
	(dump_prediction): Update.
	(drop_profile): Update.
	(propagate_unlikely_bbs_forward): Update.
	(determine_unlikely_bbs): Update.
	(force_edge_cold): Update.
	* profile.c (compute_branch_probabilities): Update.
	* reg-stack.c (better_edge): Update.
	* shrink-wrap.c (handle_simple_exit): Update.
	* tracer.c (better_p): Update.
	* trans-mem.c (expand_transaction): Update.
	(split_bb_make_tm_edge): Update.
	* tree-call-cdce.c: Update.
	* tree-cfg.c (gimple_find_sub_bbs): Update.
	(gimple_split_edge): Update.
	(gimple_duplicate_sese_region): Update.
	(gimple_duplicate_sese_tail): Update.
	(gimple_flow_call_edges_add): Update.
	(insert_cond_bb): Update.
	(execute_fixup_cfg): Update.
	* tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
	* tree-complex.c (expand_complex_div_wide): Update.
	* tree-eh.c (lower_resx): Update.
	(unsplit_eh): Update.
	(cleanup_empty_eh_move_lp): Update.
	* tree-inline.c (copy_edges_for_bb): Update.
	(freqs_to_counts): Update.
	(copy_cfg_body): Update.
	* tree-ssa-dce.c (remove_dead_stmt): Update.
	* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
	* tree-ssa-loop-im.c (execute_sm_if_changed): Update.
	* tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
	(unloop_loops): Update.
	* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
	* tree-ssa-loop-split.c (connect_loops): Update.
	(split_loop): Update.
	* tree-ssa-loop-unswitch.c (hoist_guard): Update.
	* tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
	* tree-ssa-reassoc.c (branch_fixup): Update.
	* tree-ssa-tail-merge.c (replace_block_by): Update.
	* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
	(compute_path_counts): Update.
	(update_profile): Update.
	(recompute_probabilities): Update.
	(update_joiner_offpath_counts): Update.
	(estimated_freqs_path): Update.
	(freqs_to_counts_path): Update.
	(clear_counts_path): Update.
	(ssa_fix_duplicate_block_edges): Update.
	(duplicate_thread_path): Update.
	* tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
	(case_bit_test_cmp): Update.
	(collect_switch_conv_info): Update.
	(gen_inbound_check): Update.
	(do_jump_if_equal): Update.
	(emit_cmp_and_jump_insns): Update.
	* tree-tailcall.c (decrease_profile): Update.
	(eliminate_tail_call): Update.
	* tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
	(vect_do_peeling): Update.
	* tree-vect-loop.c (scale_profile_for_vect_loop): Update.
	* ubsan.c (ubsan_expand_null_ifn): Update.
	(ubsan_expand_ptr_ifn): Update.
	* value-prof.c (gimple_divmod_fixed_value): Update.
	(gimple_mod_pow2): Update.
	(gimple_mod_subtract): Update.
	(gimple_ic): Update.
	(gimple_stringop_fixed_value): Update.

2017-10-19  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82618
	* config/i386/i386.md (sub to cmp): New peephole2 pattern.

2017-10-19  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/82395
	* ira-color.c (allocno_priority_compare_func): Fix comparison step
	based on non_spilled_static_chain_regno_p.

2017-10-19  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
	(ix86_emit_mode_set): Rewrite insn mnemonic construction.
	(ix86_prepare_fp_compare_args): Redefine is_sse as bool.

2017-10-19  Martin Sebor  <msebor@redhat.com>

	PR tree-optimization/82596
	* tree.c (array_at_struct_end_p): Handle STRING_CST.

2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>

	* asan.c (handle_builtin_alloca): Deal with all alloca variants.
	(get_mem_refs_of_builtin_call): Likewise.
	* builtins.c (expand_builtin_apply): Adjust call to
	allocate_dynamic_stack_space.
	(expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
	the third argument to allocate_dynamic_stack_space, otherwise -1.
	(expand_builtin): Deal with all alloca variants.
	(is_inexpensive_builtin): Likewise.
	* builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
	* calls.c (special_function_p): Deal with all alloca variants.
	(initialize_argument_information): Adjust call to
	allocate_dynamic_stack_space.
	(expand_call): Likewise.
	* cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
	* doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
	* explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
	use it for the stack usage computation.
	* explow.h (allocate_dynamic_stack_space): Adjust prototype.
	* function.c (gimplify_parameters): Call build_alloca_call_expr.
	* gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
	Take into account 3rd argument of __builtin_alloca_with_align_and_max.
	(in_loop_p): Remove first argument and useless check.
	(pass_walloca::execute): Remove useless test and adjust call to above.
	* gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
	* gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
	(gimplify_call_expr): Deal with all alloca variants.
	* hsa-gen.c (gen_hsa_alloca): Likewise.
	(gen_hsa_insns_for_call): Likewise.
	* ipa-pure-const.c (special_builtin_state): Likewise.
	* tree-chkp.c (chkp_build_returned_bound): Likewise.
	* tree-object-size.c (alloc_object_size): Likewise.
	* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
	(call_may_clobber_ref_p_1): Likewise.
	* tree-ssa-ccp.c (evaluate_stmt): Likewise.
	(ccp_fold_stmt): Likewise.
	(optimize_stack_restore): Likewise.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
	(mark_all_reaching_defs_necessary_1): Likewise.
	(propagate_necessity): Likewise.
	(eliminate_unnecessary_stmts): Likewise.
	* tree.c (build_common_builtin_nodes): Build
	BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
	(build_alloca_call_expr): New function.
	* tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
	(CASE_BUILT_IN_ALLOCA): Likewise.
	(build_alloca_call_expr): Declare.
	* varasm.c (incorporeal_function_p): Deal with all alloca variants.

2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>

	PR debug/82509
	* dwarf2out.c (new_die_raw): New static inline function.
	(new_die): Use it to create the DIE.
	(add_AT_external_die_ref): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(dwarf2out_vms_debug_main_pointer): Likewise.
	(base_type_die): Likewise.  Remove early return for corner cases.
	Do not call add_pubtype on the DIE here.
	(is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
	(modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
	typedefs for base types with DW_AT_endianity.  Make sure a DIE with
	native order exists for base types, attach the DIE manually and call
	add_pubtype on it.  Do not equate a reverse order DIE to the type.

2017-10-19  Richard Earnshaw  <rearnsha@arm.com>

	* config/arm/arm.c (align_ok_ldrd_strd): New function.
	(mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
	the mem into it.
	(gen_operands_ldrd_strd): Validate the alignment of the accesses.

2017-10-19  Jakub Jelinek  <jakub@redhat.com>

	* flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
	SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
	BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
	* opts.c (sanitizer_opts): Add builtin.
	* ubsan.c (instrument_builtin): New function.
	(pass_ubsan::execute): Call it.
	(pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
	* doc/invoke.texi: Document -fsanitize=builtin.

	* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
	builtins, store max (log2 (align), 0) into uchar field instead of
	align into uptr field.
	(ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
	store uchar 0 field instead of uptr 0 field.
	(instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
	instead of passing one address of struct with 2 locations pass
	two addresses of structs with 1 location each.
	* sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
	BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
	BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
	BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
	(BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
	BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
	BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
	BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.

2017-10-19  Martin Liska  <mliska@suse.cz>

	PR driver/81829
	* file-find.c (remove_prefix): Remove.
	* file-find.h (remove_prefix): Likewise.
	* gcc-ar.c: Remove smartness of lookup.

2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.md (*call_indirect_aix<mode>,
	*call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
	*call_value_indirect_elfv2<mode>): Add correct mode to the unspec.

2017-10-19  Jakub Jelinek  <jakub@redhat.com>

	PR target/82580
	* config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
	(setcc + and to xor + setcc): New peephole2.

2017-10-19  Tom de Vries  <tom@codesourcery.com>

	* doc/sourcebuild.texi (Test Directives, Variants of
	dg-require-support): Add dg-require-stack-size.

2017-10-19  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82517
	* gimplify.c (gimplify_decl_expr): Do not instrument variables
	that have a large alignment.
	(gimplify_target_expr): Likewise.

2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/82602
	* ira.c (rtx_moveable_p): Return false for volatile asm.

2017-10-18  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82580
	* config/i386/i386-modes.def (CCGZ): New CC mode.
	* config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
	* config/i386/predicates.md (ix86_comparison_operator):
	Handle CCGZmode.
	* config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
	Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
	with double-word subtraction.
	(put_condition_code): Handle CCGZmode.

2017-10-18  Aldy Hernandez  <aldyh@redhat.com>

	* wide-int.cc (debug (const wide_int &)): New.
	(debug (const wide_int *)): New.
	(debug (const widest_int &)): New.
	(debug (const widest_int *)): New.

2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>

	PR middle-end/82556
	* lra-constraints.c (curr_insn_transform): Use non-input operand
	instead of output one for matched reload.

2017-10-18  Bin Cheng  <bin.cheng@arm.com>

	* tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
	(tree-ssa-loop-ivopts.h): New header file.
	(struct builtin_info): New fields.
	(classify_builtin_1): Compute and record base and offset parts for
	memset builtin partition by calling strip_offset.
	(offset_cmp, fuse_memset_builtins): New functions.
	(finalize_partitions): Fuse adjacent memset partitions by calling
	above function.
	* tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
	Expose the interface.
	* tree-ssa-loop-ivopts.h (strip_offset): New declaration.

2017-10-18  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82574
	* tree-loop-distribution.c (find_single_drs): New parameter.  Check
	that data reference must be executed exactly once per iteration
	against the outermost loop in nest.
	(classify_partition): Update call to above function.

2017-10-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82591
	* graphite.c (graphite_transform_loops): Move code gen message
	printing ...
	* graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
	Here.  Handle scop_to_isl_ast failing.
	(scop_to_isl_ast): Limit the number of ISL operations.

2017-10-18  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::set_rename): Simplify.
	(translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
	(graphite_copy_stmts_from_block): ... here.
	(copy_bb_and_scalar_dependences): Simplify.
	(add_parameters_to_ivs_params): Canonicalize.
	(generate_entry_out_of_ssa_copies): Simplify.
	* graphite-sese-to-poly.c (extract_affine_name): Simplify
	by passing in ISL dimension.
	(parameter_index_in_region_1): Rename to ...
	(parameter_index_in_region): ... this.
	(extract_affine): Adjust assert, pass down parameter index.
	(add_param_constraints): Use range-info when available.
	(build_scop_context): Adjust.
	* sese.c (new_sese_info): Adjust.
	(free_sese_info): Likewise.
	* sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
	Remove unused typedefs.
	(struct sese_info_t): Simplify rename_map, remove incomplete_phis.

2017-10-18  Martin Liska  <mliska@suse.cz>

	* combine.c (simplify_compare_const): Add gcc_fallthrough.

2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
	(s390_sched_init): Do not reset s390_sched_state if we entered the
	current basic block via a fallthru edge and all others are unlikely.

2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>

	* config/s390/s390.c (NUM_SIDES): New variable.
	(LONGRUNNING_THRESHOLD): New variable.
	(LATENCY_FACTOR): New variable.
	(s390_sched_score): Decrease score for long-running instructions on
	wrong side.
	(s390_sched_variable_issue): Perform bookkeeping for long-running
	instructions.

2017-10-18  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
	Simplify with removal of the parameter rename map.
	(set_rename): Likewise.
	(should_copy_to_new_region): Likewise.
	(graphite_copy_stmts_from_block): Likewise.
	(copy_bb_and_scalar_dependences): Remove initialization of
	unused copied_bb_map.
	(copy_def): Remove.
	(copy_internal_parameters): Likewise.
	(graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
	* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
	Use INTEGRAL_TYPE_P.
	(parameter_index_in_region_1): Rename to ...
	(assign_parameter_index_in_region): ... this.  Assert we have
	a parameter we handle.
	(scan_tree_for_params): Adjust.
	* sese.h (parameter_rename_map_t): Remove.
	(struct sese_info_t): Remove unused parameter_rename_map and
	copied_bb_map members.
	* sese.c (new_sese_info): Adjust.
	(free_sese_info): Likewise.

2017-10-18  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82545
	* asan.c (asan_expand_poison_ifn): Do not put gimple stmt
	on an abnormal edge.

2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* doc/invoke.texi (ffunction-sections and fdata-sections):
	Update.

2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>

	* tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
	the use statement can throw internally.

2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>

	* config/visium/visium.c (visium_select_cc_mode): Return CCmode for
	any RTX present on the RHS of a SET.
	* compare-elim.c (try_eliminate_compare): Restore comment.

2017-10-17  Jakub Jelinek  <jakub@redhat.com>

	* langhooks.h (struct lang_hooks): Document that tree_size langhook
	may be also called on tcc_type nodes.
	* langhooks.c (lhd_tree_size): Likewise.

2017-10-17  David Malcolm  <dmalcolm@redhat.com>

	* gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
	format_warning_at_substring.
	(maybe_warn): Convert source_range * param to a location_t.  Pass
	UNKNOWN_LOCATION rather than NULL to fmtwarn.
	(format_directive): Remove code to extract source_ranges and
	source_range * in favor of just a location_t.
	(parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
	fmtwarn.
	* substring-locations.c (format_warning_va): Convert
	source_range * param to a location_t.
	(format_warning_at_substring): Likewise.
	* substring-locations.h (format_warning_va): Likewise.
	(format_warning_at_substring): Likewise.

2017-10-17  Jan Hubicka  <hubicka@ucw.cz>

	* target.h (enum vect_cost_for_stmt): Add vec_gather_load and
	vec_scatter_store
	* tree-vect-stmts.c (record_stmt_cost): Make difference between normal
	and scatter/gather ops.

	* aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
	vec_gather_load and vec_scatter_store.
	* arm/arm.c (arm_builtin_vectorization_cost): Likewise.
	* powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
	* rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
	* s390/s390.c (s390_builtin_vectorization_cost): Likewise.
	* spu/spu.c (spu_builtin_vectorization_cost): Likewise.
	* i386/i386.c (x86_builtin_vectorization_cost): Likewise.

2017-10-17  Uros Bizjak  <ubizjak@gmail.com>

	* reg-stack.c (compare_for_stack_reg): Add bool argument.
	Detect FTST instruction and handle its register pops.  Only pop
	second operand if can_pop_second_op is true.
	(subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
	set can_pop_second_op to false in the compare_for_stack_reg call.

	* config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
	output_fp_compare for stack register operands.
	* config/i386/i386.c (output_fp_compare): Do not output SSE compare
	instructions here.  Do not emit stack register pops here.  Assert
	that FCOMPP pops next to top stack register.  Rewrite function.

2017-10-17  Nathan Sidwell  <nathan@acm.org>

	PR middle-end/82577
	* alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
	use DECL_ASSEMBLER_NAME_RAW.

	PR middle-end/82546
	* tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
	TYPE nodes.

2017-10-17  Qing Zhao <qing.zhao@oracle.com>
	    Wilco Dijkstra <wilco.dijkstra@arm.com>

	* builtins.c (expand_builtin_update_setjmp_buf): Add a
	converstion to Pmode from the buf_addr.

2017-10-17  Richard Biener  <rguenther@suse.de>

	* graphite-dependences.c (scop_get_reads_and_writes): Change
	output parameters to references.

2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>

	PR 71026/tree-optimization
	* fold-const.c (distribute_real_division): Removed.
	(fold_binary_loc): Remove calls to distribute_real_divison.

2017-10-17  Richard Biener  <rguenther@suse.de>

	* graphite-scop-detection.c
	(scop_detection::stmt_has_simple_data_refs_p): Always use
	the full nest as region.
	(try_generate_gimple_bb): Likewise.
	* sese.c (scalar_evolution_in_region): Simplify now that
	SCEV can handle instantiation in regions.
	* tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
	in the non-loop part of a function if requested.

2017-10-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82563
	* graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
	New function.
	(graphite_regenerate_ast_isl): Call it.
	* graphite-scop-detection.c (build_scops): Remove entry edge split.

2017-10-17  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/82549
	* fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
	Formatting fixes.  Instead of calling make_bit_field_ref with negative
	bitpos return 0.

2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>

	* config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
	_mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
	_mm_maskz_reduce_ss): New.
	* config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
	__builtin_ia32_reducess_mask): Ditto..
	(__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
	* config/i386/sse.md (reduces<mode>): Renamed to ...
	(reduces<mode><mask_scalar_name>): ... this.
	(vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
	Changed to ...
	(vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
	%0<mask_scalar_operand4>, %1, %2, %3}): ... this.

2017-10-16  David Malcolm  <dmalcolm@redhat.com>

	* Makefile.in (OBJS): Add unique-ptr-tests.o.
	* selftest-run-tests.c (selftest::run_tests): Call
	selftest::unique_ptr_tests_cc_tests.
	* selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
	* unique-ptr-tests.cc: New file.

2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>

	PR sanitizer/82353
	* lra.c (collect_non_operand_hard_regs): Don't ignore operator
	locations.
	* lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
	(make_hard_regno_born, make_hard_regno_dead): Update
	bb_killed_pseudos and bb_gen_pseudos for fixed regs.

2017-10-16  Jeff Law  <law@redhat.com>

	* tree-ssa-dse.c (live_bytes_read): Fix thinko.

2017-10-16  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune-costs.h (znver1_cost): Fix move cost tables.

2017-10-16  Olivier Hainque  <hainque@adacore.com>

	* gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
	with_cpu if we were configured for an e500v2 target cpu name.

2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
	* doc/invoke.texi: Document +nodsp as a valid extension for
	-mcpu=cortex-m33.

2017-10-16  Martin Liska  <mliska@suse.cz>

	* sbitmap.c (bitmap_bit_in_range_p_checking): New function.
	(test_set_range): Likewise.
	(test_range_functions): Rename to ...
	(test_bit_in_range): ... this.
	(sbitmap_c_tests): Add new test.

2017-10-16  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
	New.
	(vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
	(vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.

2017-10-16  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64-builtins.c
	(aarch64_types_quadopu_lane_qualifiers): New.
	(TYPES_QUADOPU_LANE): New.
	* config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
	(<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
	(aarch64_<sur>dot_laneq<vsi2qi>): New.
	* config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
	(sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
	* config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
	(Vdottype, DOTPROD): New.
	(sur): Add SDOT and UDOT.

2017-10-16  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
	(AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
	* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
	Add TARGET_DOTPROD.
	* config/aarch64/aarch64-option-extensions.def (dotprod): New.
	* config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
	Enable TARGET_DOTPROD.
	(cortex-a75.cortex-a55): Likewise.
	* doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.

2017-10-16  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
	(UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
	New.
	* config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
	New.
	* config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
	(UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
	* config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
	(neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
	* config/arm/types.md (neon_dot, neon_dot_q): New.
	* config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.

2017-10-16  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm.h (TARGET_DOTPROD): New.
	* config/arm/arm.c (arm_arch_dotprod): New.
	(arm_option_reconfigure_globals): Add arm_arch_dotprod.
	* config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
	* config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
	(feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
	(ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
	* config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
	* doc/invoke.texi (armv8.2-a): Document dotprod

2017-10-14  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (ix86_vec_cost): New function.
	(ix86_rtx_costs): Handle vector operations better.
	* i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
	* x86-tune-costs.h: Add new costs to all tables.

2017-10-14  Jan Hubicka  <hubicka@ucw.cz>

	* i386.c (ix86_rtx_costs): Make difference between x87 and SSE
	operations.
	* i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
	divsd, sqrtss and sqrtsd
	* x86-tune-costs.h: Add new entries to all costs.
	(znver1_cost): Fix to match real instruction latencies.

2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
	    Michael Collison <michael.collison@arm.com>

	* compare-elim.c: Include emit-rtl.h.
	(can_merge_compare_into_arith): New function.
	(try_validate_parallel): Likewise.
	(try_merge_compare): Likewise.
	(try_eliminate_compare): Call the above when no previous clobber
	is available.
	(execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
	dataflow problems.

2017-10-14  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/62263
	PR middle-end/82498
	* tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
	up to 2 preparation statements for ASSIGN in MIDDLE_BB.

	PR middle-end/62263
	PR middle-end/82498
	* tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
	to be any operand_equal_p operands.  For & (B - 1) require
	B to be power of 2.  Recognize
	(X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.

2017-10-14  Uros Bizjak  <ubizjak@gmail.com>

	PR bootstrap/82553
	* optabs.c (expand_memory_blockage): Fix call of
	targetm.have_memory_blockage.

2017-10-14  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/82548
	* config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
	x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
	objects to extra_objs instead of overwriting it.

2017-10-14  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
	Use any_fp_register_operand as operand[3] predicate.  Simplify
	equality test for operands[2] and operands[4] memory location.
	(LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
	(FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
	(LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
	(FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
	any_fp_register_operand as operand[1] predicate.  Simplify
	equality test for operands[0] and operands[3] memory location.
	(LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
	(FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
	(LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.

2017-10-14  Uros Bizjak  <ubizjak@gmail.com>

	* target-insns.def: Add memory_blockage.
	* optabs.c (expand_memory_blockage): New function.
	(expand_asm_memory_barrier): Rename ...
	(expand_asm_memory_blockage): ... to this.
	(expand_mem_thread_fence): Call expand_memory_blockage
	instead of expand_asm_memory_barrier.
	(expand_mem_singnal_fence): Ditto.
	(expand_atomic_load): Ditto.
	(expand_atomic_store): Ditto.
	* doc/md.texi (Standard Pattern Names For Generation):
	Document memory_blockage instruction pattern.

2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>

	* config/rl78/rl78.c (rl78_emit_libcall): New function.
	* config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
	* config/rl78/rl78.md: New define_expand "adddi3".

2017-10-13  Jan Hubicka  <hubicka@ucw.cz>

	* cfghooks.c (verify_flow_info): Disable check that all probabilities
	are set correctly.

2017-10-13  Jeff Law  <law@redhat.com>

	* tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.

2017-10-13  Jakub Jelinek  <jakub@redhat.com>

	PR target/82274
	* internal-fn.c (expand_mul_overflow): If both operands have
	the same highpart of -1 or 0 and the topmost bit of lowpart
	is different, overflow is if res <= 0 rather than res < 0.

2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>

	* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
	TARGET_P9_VECTOR code for unaligned_load case.

2017-10-13  Jan Hubicka  <hubicka@ucw.cz>

	* cfghooks.c (verify_flow_info): Check that edge probabilities are set.

2017-10-13  Nathan Sidwell  <nathan@acm.org>

	* tree-core.h (tree_contains_struct): Make bool.
	* tree.c (tree_contains_struct): Likewise.
	* tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
	(MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
	MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
	MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
	MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.

2017-10-13  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
	parameters and dominance check.
	(translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
	(translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
	(translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
	Do not update SSA form here or do intermediate IL verification.
	* graphite.c: Include tree-ssa.h and tree-into-ssa.h.
	(graphite_initialize): Remove check on the number of loops in
	the function and inline into graphite_transform_loops.
	(graphite_finalize): Inline into graphite_transform_loops.
	(graphite_transform_loops): Perform SSA update and IL verification
	here.
	* params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.

2017-10-13  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (max_mode_int_precision,
	graphite_expression_type_precision): Avoid global constructor
	by moving ...
	(translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
	(translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
	(translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
	(translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
	(translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
	* graphite-sese-to-poly.c (build_original_schedule): Return nothing.

2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/82499
	* config/i386/i386.h (ix86_red_zone_size): New.
	* config/i386/i386.md (push peephole2s): Replace
	"!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* combine.c (can_change_dest_mode): Reject changes in
	REGMODE_NATURAL_SIZE.

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
	(expand_debug_source_expr): Likewise.
	* combine.c (combine_simplify_rtx): Likewise.
	* cse.c (fold_rtx): Likewise.
	* fwprop.c (canonicalize_address): Likewise.
	* targhooks.c (default_shift_truncation_mask): Likewise.

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
	(widened_mode): Likewise.
	(expand_unop): Likewise.
	* ree.c (transform_ifelse): Likewise.
	(merge_def_and_ext): Likewise.
	(combine_reaching_defs): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
	* combine.c (gen_lowpart_for_combine): Likewise.
	* dwarf2out.c (rtl_for_decl_location): Likewise.
	* final.c (alter_subreg): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	(gen_lowpart_if_possible): Likewise.

2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

	* calls.c (expand_call): Use subreg_lowpart_offset.
	* cse.c (cse_insn): Likewise.
	* regcprop.c (copy_value): Likewise.
	(copyprop_hardreg_forward_1): Likewise.

2017-10-13  Jakub Jelinek  <jakub@redhat.com>

	PR target/82524
	* config/i386/i386.md (addqi_ext_1, andqi_ext_1,
	*andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
	=Q constraints to +Q and into insn condition add check
	that operands[0] and operands[1] are equal.
	(*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
	=Q constraints to +Q and into insn condition add check
	that operands[0] is equal to either operands[1] or operands[2].

	PR target/82498
	* fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
	instead of handling MINUS_EXPR twice (once for each argument),
	canonicalize operand order and handle just once, use rtype where
	possible.  Handle (A << B) | (A >> (-B & (Z - 1))).

	PR target/82498
	* config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
	any values of __C while still being pattern recognizable as a simple
	rotate instruction.

2017-10-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82451
	Revert
	2017-10-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82355
	* graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
	a mapping for the enclosing loop but avoid generating one for
	the loop tree root.
	(copy_bb_and_scalar_dependences): Remove premature codegen
	error on PHIs in blocks duplicated into multiple places.
	* graphite-scop-detection.c
	(scop_detection::stmt_has_simple_data_refs_p): For a loop not
	in the region use it as loop and nest to analyze the DR in.
	(try_generate_gimple_bb): Likewise.
	* graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
	(add_loop_constraints): For blocks in a loop not in the region
	create a dimension with a single iteration.
	* sese.h (gbb_loop_at_index): Remove assert.

	* cfgloop.c (loop_preheader_edge): For the loop tree root
	return the single successor of the entry block.
	* graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
	Reset the SCEV hashtable and niters.
	* graphite-scop-detection.c
	(scop_detection::graphite_can_represent_scev): Add SCOP parameter,
	assert that we only have POLYNOMIAL_CHREC that vary in loops
	contained in the region.
	(scop_detection::graphite_can_represent_expr): Adjust.
	(scop_detection::stmt_has_simple_data_refs_p): For loops
	not in the region set loop to NULL.  The nest is now the
	entry edge to the region.
	(try_generate_gimple_bb): Likewise.
	* sese.c (scalar_evolution_in_region): Adjust for
	instantiate_scev change.
	* tree-data-ref.h (graphite_find_data_references_in_stmt):
	Make nest parameter the edge into the region.
	(create_data_ref): Likewise.
	* tree-data-ref.c (dr_analyze_indices): Make nest parameter an
	entry edge into a region and adjust instantiate_scev calls.
	(create_data_ref): Likewise.
	(graphite_find_data_references_in_stmt): Likewise.
	(find_data_references_in_stmt): Pass the loop preheader edge
	from the nest argument.
	* tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
	parameter the edge into the region.
	(instantiate_parameters): Use the loop preheader edge as entry.
	* tree-scalar-evolution.c (analyze_scalar_evolution): Handle
	NULL loop.
	(get_instantiated_value_entry): Make instantiate_below parameter
	the edge into the region.
	(instantiate_scev_name): Likewise.  Adjust dominance checks,
	when we cannot use loop-based instantiation instantiate by
	walking use-def chains.
	(instantiate_scev_poly): Adjust.
	(instantiate_scev_binary): Likewise.
	(instantiate_scev_convert): Likewise.
	(instantiate_scev_not): Likewise.
	(instantiate_array_ref): Remove.
	(instantiate_scev_3): Likewise.
	(instantiate_scev_2): Likewise.
	(instantiate_scev_1): Likewise.
	(instantiate_scev_r): Do not blindly handle N-operand trees.
	Do not instantiate array-refs.  Handle all constants and invariants.
	(instantiate_scev): Make instantiate_below parameter
	the edge into the region.
	(resolve_mixers): Use the loop preheader edge for the region
	parameter to instantiate_scev_r.
	* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.

2017-10-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82525
	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
	out from ...
	(translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
	Fail code generation when we cannot represent the isl integer.
	(binary_op_to_tree): Elide modulo operations that are no-ops
	in the type we code generate.  Remove now superfluous code
	generation errors.

2017-10-13  Richard Biener  <rguenther@suse.de>

	* graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
	(scop_detection::harmful_loop_in_region): Remove premature
	IV type restriction.
	(scop_detection::graphite_can_represent_scev): We can handle
	pointer IVs just fine.

2017-10-13  Alan Modra  <amodra@gmail.com>

	* doc/extend.texi (Extended Asm <Clobbers>): Rename to
	"Clobbers and Scratch Registers".  Add paragraph on
	alternative to clobbers for scratch registers and OpenBLAS
	example.

2017-10-13  Alan Modra  <amodra@gmail.com>

	* doc/extend.texi (Clobbers): Correct vax example.  Delete old
	example of a memory input for a string of known length.  Move
	commentary out of table.  Add a number of new examples
	covering array memory inputs.

2017-10-12  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/82493
	* sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
	(test_range_functions): New function.
	(sbitmap_c_tests): Likewise.
	* selftest-run-tests.c (selftest::run_tests): Run new tests.
	* selftest.h (sbitmap_c_tests): New function.

	* tree-ssa-dse.c (live_bytes_read): Fix thinko.

2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/amo.h: Fix spacing issue.

2017-10-12  Jakub Jelinek  <jakub@redhat.com>

	PR target/82498
	* config/i386/i386.md (*ashl<mode>3_mask_1,
	*<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
	*<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
	patterns.

2017-10-12  Jan Hubicka  <hubicka@ucw.cz>

	* profile-count.h (safe_scale_64bit): Fix GCC4.x path.
	(profile_probability): Set max_probability
	to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
	in temporaries.
	* profile-count.c (profile_probability::differs_from_p): Do not
	rely on max_probaiblity == 10000

2017-10-12  Jeff Law  <law@redhat.com>

	* tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
	negative offsets.

2017-10-12  Martin Sebor  <msebor@redhat.com>

	PR other/82301
	PR c/82435
	* cgraphunit.c (maybe_diag_incompatible_alias): New function.
	(handle_alias_pairs): Call it.
	* common.opt (-Wattribute-alias): New option.
	* doc/extend.texi (ifunc attribute): Discuss C++ specifics.
	* doc/invoke.texi (-Wattribute-alias): Document.

2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>

	Revert
	2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
	PR sanitizer/82353
	* lra.c (collect_non_operand_hard_regs): Don't ignore operator
	locations.
	* lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
	(make_hard_regno_born, make_hard_regno_dead): Update
	bb_killed_pseudos and bb_gen_pseudos.

2017-10-12  Jan Hubicka  <hubicka@ucw.cz>

	* config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.

2017-10-12  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_split_conditional_move):
	Use std::swap instead of manually swapping.
	(alpha_stdarg_optimize_hook): Ditto.
	(alpha_canonicalize_comparison): Ditto.

2017-10-12  Bin Cheng  <bin.cheng@arm.com>

	* tree-loop-distribution.c (struct builtin_info): New struct.
	(struct partition): Refactor fields into struct builtin_info.
	(partition_free): Free struct builtin_info.
	(build_size_arg_loc, build_addr_arg_loc): Delete.
	(generate_memset_builtin, generate_memcpy_builtin): Get memory range
	information from struct builtin_info.
	(find_single_drs): New function refactored from classify_partition.
	Also moved builtin validity checks to this function.
	(compute_access_range, alloc_builtin): New functions.