view gcc/ChangeLog @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
line wrap: on
line source

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.
	(classify_builtin_st, classify_builtin_ldst): New functions.
	(classify_partition): Refactor code into functions find_single_drs,
	classify_builtin_st and classify_builtin_ldst.
	(distribute_loop): Don't do runtime alias check when distributing
	loop nest.
	(find_seed_stmts_for_distribution): New function.
	(pass_loop_distribution::execute): Refactor code finding seed
	stmts into above function.  Support distribution for the innermost
	two-level loop nest.  Adjust dump information.

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

	* tree-loop-distribution.c: Adjust the general comment.
	(NUM_PARTITION_THRESHOLD): New macro.
	(ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
	(classify_partition): Skip builtin pattern of loop nest's inner loop.
	(merge_dep_scc_partitions): New parameter ignore_alias_p and use it
	in call to build_partition_graph.
	(finalize_partitions): New parameter.  Make loop distribution more
	conservative by fusing more partitions.
	(distribute_loop): Don't do runtime alias check in case of loop nest
	distribution.
	(find_seed_stmts_for_distribution): New function.
	(prepare_perfect_loop_nest): New function.
	(pass_loop_distribution::execute): Refactor code finding seed stmts
	and loop nest into above functions.  Support loop nest distribution.
	Adjust dump information accordingly.

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

	* tree-loop-distribution.c (break_alias_scc_partitions): Add comment
	and set PTYPE_SEQUENTIAL for merged partition.

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

	PR tree-optimization/69728
	Revert
	2017-09-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69728
	* graphite-sese-to-poly.c (schedule_error): New global.
	(add_loop_schedule): Handle empty domain by failing the
	schedule.
	(build_original_schedule): Handle schedule_error.

	* graphite-sese-to-poly.c (add_loop_schedule): Handle empty
	domain by returning an unchanged schedule.

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

	* genrecog.c (validate_pattern): For VEC_SELECT verify that
	CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.

2017-10-12  Aldy Hernandez  <aldyh@redhat.com>

	* Makefile.in (TAGS): Merge all the *.def files into one pattern.
	Handle params.def.

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

	PR c++/82159
	* expr.c (store_field): Don't optimize away bitsize == 0 store
	from CALL_EXPR with addressable return type.

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

	* config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
	* config/rs6000/rs6000.md (sel): Delete mode attribute.
	(mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
	*isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
	TARGET_ISEL instead of TARGET_ISEL<sel>.

2017-10-11  David Edelsohn  <dje.gcc@gmail.com>

	* config/rs6000/rs6000.c
	(rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.

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

	* config/rs6000/predicates.md (zero_constant, all_ones_constant):
	Move up in file.
	(reg_or_cint_operand): Fix comment.
	(reg_or_zero_operand): New predicate.
	* config/rs6000/rs6000-protos.h (output_isel): Delete.
	* config/rs6000/rs6000.c (output_isel): Delete.
	* config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
	instead of reg_or_cint_operand.  Output instruction directly (not via
	output_isel).
	(isel_unsigned_<mode>): Ditto.
	(*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
	gpc_reg_operand.  Add an instruction alternative for this.  Output
	instruction directly.
	(*isel_reversed_unsigned_<mode>): Ditto.

2017-10-11  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_canonicalize_comparison): New function.
	(TARGET_CANONICALIZE_COMPARISON): Define.

2017-10-11  Qing Zhao  <qing.zhao@oracle.com>

	PR target/81422
	* config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
	Check whether the dest is REG before adding REG_EQUIV note.

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-11  Nathan Sidwell  <nathan@acm.org>

	* incpath.h (enum incpath_kind): Name enum, prefix values.
	(add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
	* incpath.c (heads, tails): Use INC_MAX.
	(add_env_var_paths, add_standard_paths): Use incpath_kind.
	(merge_include_chains, split_quote_chain,
	register_include_chains): Update incpath_kind names.
	(add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
	* config/darwin-c.c (add_system_framework_path): Update incpath_kind
	names.
	(add_framework_path, darwin_register_objc_includes): Likewise.
	* config/vms/vms-c.c (vms_c_register_includes): Likewise.

2017-10-11  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
	Do not use float_operator operator predicate.
	(*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
	* config/i386/predicates.md (float_operator): Remove predicate.

2017-10-11  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
	(*jccxf_i387): Ditto.
	(*jcc<mode>_i387): Ditto.
	(*jccu<mode>_i387): Ditto.
	(*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
	(*jcc_*_i387 splitters): Remove.
	* config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
	* config/i386/i386.c (ix86_split_fp_branch): Remove.
	* config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
	Remove predicate.

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

	* profile-count.h (slow_safe_scale_64bit): New function.
	(safe_scale_64bit): New inline.
	(profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
	* profile-count.c: Include wide-int.h
	(slow_safe_scale_64bit): New.

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

	* tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
	HAS_DECL_ASSEMBLER_NAME_P.
	* gimple-expr.c (gimple_decl_printable_name: Check
	HAS_DECL_ASSEMBLER_NAME_P too.
	* ipa-utils.h (type_in_anonymous_namespace_p): Check
	DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
	(odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
	* passes.c (rest_of_decl_compilation): Check
	HAS_DECL_ASSEMBLER_NAME_P too.
	* recog.c (verify_changes): Likewise.
	* tree-pretty-print.c (dump_decl_name): Likewise.
	* tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.

	* tree.h (DECL_ASSEMBLER_NAME_RAW): New.
	(SET_DECL_ASSEMBLER_NAME): Use it.
	(DECL_ASSEMBLER_NAME_SET_P): Likewise.
	(COPY_DECL_ASSEMBLER_NAME): Likewise.
	* tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.

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

	* config.gcc (i386, x86_64): Add extra objects.
	* config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
	(ix86_min_insn_size): Declare.
	(ix86_issue_rate): Declare.
	(ix86_adjust_cost): Declare.
	(ia32_multipass_dfa_lookahead): Declare.
	(ix86_macro_fusion_p): Declare.
	(ix86_macro_fusion_pair_p): Declare.
	(ix86_bd_has_dispatch): Declare.
	(ix86_bd_do_dispatch): Declare.
	(ix86_core2i7_init_hooks): Declare.
	(ix86_atom_sched_reorder): Declare.
	* config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
	(COSTS_N_BYTES): Move to x86-tune-costs.h.
	(DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
	(rip_relative_addr_p): Rename to ...
	(ix86_rip_relative_addr_p): ... this one; export.
	(memory_address_length): Update.
	(ix86_issue_rate): Move to x86-tune-sched.c.
	(ix86_flags_dependent): Move to x86-tune-sched.c.
	(ix86_agi_dependent): Move to x86-tune-sched.c.
	(exact_dependency_1): Move to x86-tune-sched.c.
	(exact_store_load_dependency): Move to x86-tune-sched.c.
	(ix86_adjust_cost): Move to x86-tune-sched.c.
	(ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
	(ix86_macro_fusion_p): Move to x86-tune-sched.c.
	(ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
	(do_reorder_for_imul): Move to x86-tune-sched-atom.c.
	(swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
	(ix86_sched_reorder): Move to x86-tune-sched-atom.c.
	(core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
	(core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
	(min_insn_size): Rename to ...
	(ix86_min_insn_size): ... this one; export.
	(core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
	(core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
	(core2i7_first_cycle_multipass_backtrack): Move to
	x86-tune-sched-core.c.
	(core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
	(core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
	(ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
	(ix86_avoid_jump_mispredicts): Update.
	(TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
	(TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
	(TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
	(DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
	(MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
	(MAX_INSN): Move to ix86-tune-sched-bd.c.
	(MAX_IMM): Move to ix86-tune-sched-bd.c.
	(MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
	(MAX_IMM_32): Move to ix86-tune-sched-bd.c.
	(MAX_IMM_64): Move to ix86-tune-sched-bd.c.
	(MAX_LOAD): Move to ix86-tune-sched-bd.c.
	(MAX_STORE): Move to ix86-tune-sched-bd.c.
	(BIG): Move to ix86-tune-sched-bd.c.
	(enum dispatch_group): Move to ix86-tune-sched-bd.c.
	(enum insn_path): Move to ix86-tune-sched-bd.c.
	(get_mem_group): Move to ix86-tune-sched-bd.c.
	(is_cmp): Move to ix86-tune-sched-bd.c.
	(dispatch_violation): Move to ix86-tune-sched-bd.c.
	(is_branch): Move to ix86-tune-sched-bd.c.
	(is_prefetch): Move to ix86-tune-sched-bd.c.
	(init_window): Move to ix86-tune-sched-bd.c.
	(allocate_window): Move to ix86-tune-sched-bd.c.
	(init_dispatch_sched): Move to ix86-tune-sched-bd.c.
	(is_end_basic_block): Move to ix86-tune-sched-bd.c.
	(process_end_window): Move to ix86-tune-sched-bd.c.
	(allocate_next_window): Move to ix86-tune-sched-bd.c.
	(find_constant): Move to ix86-tune-sched-bd.c.
	(get_num_immediates): Move to ix86-tune-sched-bd.c.
	(has_immediate): Move to ix86-tune-sched-bd.c.
	(get_insn_path): Move to ix86-tune-sched-bd.c.
	(get_insn_group): Move to ix86-tune-sched-bd.c.
	(count_num_restricted): Move to ix86-tune-sched-bd.c.
	(fits_dispatch_window): Move to ix86-tune-sched-bd.c.
	(add_insn_window): Move to ix86-tune-sched-bd.c.
	(add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
	(debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
	(debug_dispatch_window): Move to ix86-tune-sched-bd.c.
	(debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
	(debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
	(do_dispatch): Move to ix86-tune-sched-bd.c.
	(has_dispatch): Move to ix86-tune-sched-bd.c.
	* config/i386/t-i386: Add new object files.
	* config/i386/x86-tune-costs.h: New file.
	* config/i386/x86-tune-sched-atom.c: New file.
	* config/i386/x86-tune-sched-bd.c: New file.
	* config/i386/x86-tune-sched-core.c: New file.
	* config/i386/x86-tune-sched.c: New file.

2017-10-11  Liu Hao  <lh_mouse@126.com>

	* pretty-print.c [_WIN32] (colorize_init): Remove.  Use
	the generic version below instead.
	(should_colorize): Recognize Windows consoles as terminals
	for MinGW targets.
	* pretty-print.c [__MINGW32__] (write_all): New function.
	[__MINGW32__] (find_esc_head): Likewise.
	[__MINGW32__] (find_esc_terminator): Likewise.
	[__MINGW32__] (eat_esc_sequence): Likewise.
	[__MINGW32__] (mingw_ansi_fputs): New function that handles
	ANSI escape codes.
	(pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
	for MinGW targets.

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

	* tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
	Properly call analyze_scalar_evolution with the loop of the stmt.

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

	* tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
	* tree-core.h (tree_base): Add chrec_var union member.
	* tree.h (CHREC_VAR): Remove.
	(CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
	* tree-chrec.h (build_polynomial_chrec): Adjust.
	* tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
	* tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.

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

	* fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
	* match.pd: ... here.
	((T) X == (T) Y): Relax condition.

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

	PR tree-optimization/82472
	* tree-loop-distribution.c (sort_partitions_by_post_order): Refine
	comment.
	(break_alias_scc_partitions): Update postorder number.

2017-10-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82490
	* opts.c (parse_no_sanitize_attribute): Do not use error_value
	variable.
	* opts.h (parse_no_sanitize_attribute): Remove last argument.

2017-10-11  Martin Liska  <mliska@suse.cz>

	* print-rtl.c (print_insn): Move declaration of idbuf
	to same scope as name.

2017-10-11  Martin Liska  <mliska@suse.cz>

	Revert r253637:

	PR sanitizer/82484
	* sanopt.c (sanitize_rewrite_addressable_params): Do not handle
	volatile arguments.

2017-10-11  Martin Liska  <mliska@suse.cz>

	PR sanitizer/82484
	* sanopt.c (sanitize_rewrite_addressable_params): Do not handle
	volatile arguments.

2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>

	* config.gcc (default_gnu_indirect_function): Default to yes for
	arm*-*-linux* with glibc.

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

	* tree-scalar-evolution.c (get_scalar_evolution): Handle
	default-defs and types we do not want to analyze.
	(interpret_loop_phi): Replace unreachable code with an assert.
	(compute_scalar_evolution_in_loop): Remove and inline ...
	(analyze_scalar_evolution_1): ... here, replacing condition with
	what makes the intent clearer.  Remove handling of cases
	get_scalar_evolution now handles.

2017-10-10  Jim Wilson  <wilson@tuliptree.org>

	PR rtl-optimization/81434
	* haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
	comment for main loop.  In sched_group_found if, also add checks for
	pass and min_cost_group.

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

	* config/rs6000/rs6000.c (TARGET_INSN_COST): New.
	(rs6000_insn_cost): New function.
	* config/rs6000/rs6000.md (cost): New attribute.

2017-10-10  Jakub Jelinek  <jakub@redhat.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR target/79565
	PR target/82483
	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
	OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
	__builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
	(ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
	to OPTION_MASK_ISA_AVX512VL - builtins that have both
	OPTION_MASK_ISA_MMX and some other bit set require both
	mmx and the ISAs without the mmx bit.
	* config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
	__builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
	__builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
	__builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
	__builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
	__builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
	__builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
	__builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
	__builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
	__builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
	__builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
	__builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
	__builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
	__builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
	Add OPTION_MASK_ISA_MMX.

2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>

	* config.gcc (armv7*-*-freebsd*): New target.
	(armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.

2017-10-10  Jan Hubicka  <hubicka@ucw.cz>

	* x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
	X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
	spot in the file.

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

	* wide-int.h (wide_int_ref_storage): Make host_dependent_precision
	a template parameter.
	(WIDE_INT_REF_FOR): Update accordingly.
	* tree.h (wi::int_traits <const_tree>): Delete.
	(wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
	(wi::to_widest, wi::to_offset): Use them.  Expand commentary.
	(wi::tree_to_wide_ref): New typedef.
	(wi::to_wide): New function.
	* calls.c (get_size_range): Use wi::to_wide when operating on
	trees as wide_ints.
	* cgraph.c (cgraph_node::create_thunk): Likewise.
	* config/i386/i386.c (ix86_data_alignment): Likewise.
	(ix86_local_alignment): Likewise.
	* dbxout.c (stabstr_O): Likewise.
	* dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
	* expr.c (const_vector_from_tree): Likewise.
	* fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
	* fold-const.c (may_negate_without_overflow_p, negate_expr_p)
	(fold_negate_expr_1, int_const_binop_1, const_binop)
	(fold_convert_const_int_from_real, optimize_bit_field_compare)
	(all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
	(fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
	(pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
	(fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
	(fold_not_const, round_up_loc): Likewise.
	* gimple-fold.c (gimple_fold_indirect_ref): Likewise.
	* gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
	(alloca_call_type): Likewise.
	* gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
	* godump.c (go_output_typedef): Likewise.
	* graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
	* internal-fn.c (get_min_precision): Likewise.
	* ipa-cp.c (ipcp_store_vr_results): Likewise.
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
	* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
	(ipa_modify_call_arguments): Likewise.
	* match.pd: Likewise.
	* omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* stmt.c (expand_case): Likewise.
	* stor-layout.c (layout_type): Likewise.
	* tree-affine.c (tree_to_aff_combination): Likewise.
	* tree-cfg.c (group_case_labels_stmt): Likewise.
	* tree-data-ref.c (dr_analyze_indices): Likewise.
	(prune_runtime_alias_test_list): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
	* tree-predcom.c (is_inv_store_elimination_chain): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
	(simple_iv_with_niters): Likewise.
	* tree-ssa-address.c (addr_for_mem_ref): Likewise.
	* tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
	* tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
	* tree-ssa-loop-niter.c (split_to_var_and_offset)
	(refine_value_range_using_guard, number_of_iterations_ne_max)
	(number_of_iterations_lt_to_ne, number_of_iterations_lt)
	(get_cst_init_from_scev, record_nonwrapping_iv)
	(scev_var_range_cant_overflow): Likewise.
	* tree-ssa-phiopt.c (minmax_replacement): Likewise.
	* tree-ssa-pre.c (compute_avail): Likewise.
	* tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
	(vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
	* tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
	* tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
	* tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
	* tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
	(dump_case_nodes, try_switch_expansion): Likewise.
	* tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
	(vect_do_peeling): Likewise.
	* tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
	* tree-vect-stmts.c (vectorizable_load): Likewise.
	* tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
	(zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
	(extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
	(overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
	(is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
	(vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
	(range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
	(evrp_dom_walker::before_dom_children): Likewise.
	* tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
	(integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
	(tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
	(tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
	(get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
	(get_range_pos_neg): Likewise.
	* ubsan.c (ubsan_expand_ptr_ifn): Likewise.
	* config/darwin.c (darwin_mergeable_constant_section): Likewise.
	* config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
	* config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
	* config/avr/avr.c (avr_fold_builtin): Likewise.
	* config/bfin/bfin.c (bfin_local_alignment): Likewise.
	* config/msp430/msp430.c (msp430_attr): Likewise.
	* config/nds32/nds32.c (nds32_insert_attributes): Likewise.
	* config/powerpcspe/powerpcspe-c.c
	(altivec_resolve_overloaded_builtin): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
	(rs6000_expand_ternop_builtin): Likewise.
	* config/rs6000/rs6000-c.c
	(altivec_resolve_overloaded_builtin): Likewise.
	* config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
	(rs6000_expand_ternop_builtin): Likewise.
	* config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.

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

	* tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
	when copying loop nest with only one inner loop.

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

	* tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
	blocks if SCEV is active.
	* tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
	dead code.
	(analyze_scalar_evolution): Handle cached evolutions the obvious way.
	(scev_initialize): Assert we are not yet initialized.

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

	* tree-loop-distribution.c (generate_loops_for_partition): Remove
	inner loop's exit stmt by making it always exit the loop, otherwise
	we would generate an infinite empty loop.

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

	* tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
	renaming variables in new preheader if it's deleted.

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

	* tree-loop-distribution.c (struct partition): Remove unused field
	loops of the structure.
	(partition_alloc, partition_free): Ditto.
	(build_rdg_partition_for_vertex): Ditto.

2017-10-09  Jeff Law  <law@redhat.com>

	* targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
	return type to match prototype and documentation.

2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (processor_costs): Move to ...
	* config/rs6000/rs6000.h: ... here.
	(rs6000_cost): Declare.

2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>

	* except.c (setjmp_fn): New global variable.
	(init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
	(sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
	if DONT_USE_BUILTIN_SETJMP is defined.

2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>

	* target.def (insn_cost): New hook.
	* doc/tm.texi.in (TARGET_INSN_COST): New hook.
	* doc/tm.texi: Regenerate.
	* rtlanal.c (insn_cost): Use the new hook.

2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>

	* combine.c (combine_validate_cost): Compute the new insn_cost,
	not just pattern_cost.
	(try_combine): Adjust comment.

2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>

	* cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
	insn_cost.
	* combine.c (uid_insn_cost): Adjust comment.
	(combine_validate_cost): Adjust comment.  Use pattern_cost instead
	of insn_rtx_cost
	(combine_instructions): Use insn_cost instead of insn_rtx_cost.
	* dse.c (find_shift_sequence): Ditto.
	* ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
	(bb_valid_for_noce_process_p): Use pattern_cost.
	* rtl.h (insn_rtx_cost): Delete.
	(pattern_cost): New prototype.
	(insn_cost): New prototype.
	* rtlanal.c (insn_rtx_cost): Rename to...
	(pattern_cost): ... this.
	(insn_cost): New.

2017-10-09  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*jcc_2): Remove insn pattern.
	(*jcc<mode>_0_r_i387): Ditto.
	(*jccxf_r_i387): Ditto.
	(*jcc<mode>_r_i387): Ditto.
	(*jccu<mode>_r_i387): Ditto.
	(*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
	(*jcc): Rename from *jcc_1.

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

	* config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
	deferred rescans after the lvx/stvx recombination pre-pass.

2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
	memory operation instruction support.
	* config.gcc (powerpc*-*-*): Include amo.h as an extra header.
	(rs6000-ibm-aix[789]*): Likewise.
	* doc/extend.texi (PowerPC Atomic Memory Operation Functions):
	Document new functions.

2017-10-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82397
	* tree-data-ref.c (data_ref_compare_tree): Make sure to return
	equality only for semantically equal trees.

2017-10-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82449
	* sese.c (scev_analyzable_p): Check whether the SCEV is linear.
	* tree-chrec.h (evolution_function_is_constant_p): Adjust to
	allow constant addresses.
	* tree-chrec.c (scev_is_linear_expression): Constant evolutions
	are linear.

2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
	flags.

2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/82463
	* config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
	definitions.

2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/82465
	* config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.

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

	PR target/82464
	* config/s390/s390-builtins.def (s390_vec_xor_flt_a,
	s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.

2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>

	* wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
	(WI_BINARY_PREDICATE_RESULT): Likewise.
	(wi::binary_traits::operator_result): New type.
	(wi::binary_traits::predicate_result): Likewise.
	(generic_wide_int::operator~, unary generic_wide_int::operator-)
	(generic_wide_int::operator==, generic_wide_int::operator!=)
	(generic_wide_int::operator&, generic_wide_int::and_not)
	(generic_wide_int::operator|, generic_wide_int::or_not)
	(generic_wide_int::operator^, generic_wide_int::operator+
	(binary generic_wide_int::operator-, generic_wide_int::operator*):
	Delete.
	(operator~, unary operator-, operator==, operator!=, operator&)
	(operator|, operator^, operator+, binary operator-, operator*): New
	functions.
	* expr.c (get_inner_reference): Use wi::bit_and_not.
	* fold-const.c (fold_binary_loc): Likewise.
	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
	* tree-ssa-ccp.c (get_value_from_alignment): Likewise.
	(bit_value_binop): Likewise.
	* tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
	* tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
	(extract_range_from_binary_expr_1): Likewise.
	(masked_increment): Likewise.
	(simplify_bit_ops_using_ranges): Likewise.

2017-10-09  Martin Jambor  <mjambor@suse.cz>

	PR hsa/82416
	* hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
	* hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
	(hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
	COMPLEX types.
	(hsa_fixup_mov_insn_type): New function.
	(hsa_op_with_type::get_in_type): Use it.
	(hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
	immediates in an assert.
	(hsa_op_with_type::extend_int_to_32bit): New method.
	(gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
	types.  Convert to dest type if necessary.
	(gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
	(reg_for_gimple_ssa): Pass false as min32int to
	hsa_type_for_scalar_tree_type.
	(gen_hsa_addr): Fixup type when creating addresable temporary.
	(gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
	(gen_hsa_unary_operation): Extend operands and convert to dest type if
	necessary.  Call hsa_fixup_mov_insn_type.
	(gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
	extend operands and convert to dest type if necessary.
	(gen_hsa_insns_for_operation_assignment): Extend operands and convert
	to dest type if necessary.
	(set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
	if conversion nt necessary and size matches.
	(gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
	to dest type if necessary.
	(gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
	(gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
	necessary.
	(gen_hsa_clrsb): Likewise.
	(gen_hsa_ffs): Likewise.
	(gen_hsa_divmod): Extend operands and convert to dest type if
	necessary.
	(gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.

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

	* config/rs6000/rs6000.md (conditional branch): Clean up formatting.
	Remove empty default arguments.  Use a brace block as output
	statement.
	(conditional return): Ditto.
	(jump): Ditto.
	(indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
	(tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
	Ditto.
	(group_ending_nop): Ditto.
	(doloop_end): Ditto.
	(ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
	(splitters for those): Ditto.

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

	* config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
	a conditional jump (and the compare for it) so that pc_rtx is the
	last operand.
	* config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
	for the deleted and renamed ctr<mode>_internal[234] patterns.
	* config/rs6000/rs6000.md: Delete second conditional branch pattern.
	Delete second conditional return pattern.
	(ctr<mode>_internal2): Delete this second bdnz pattern.
	(ctr<mode>_internal3): Rename to ctr<mode>_internal2.
	(ctr<mode>_internal4): Delete this second bdz pattern.

2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>

	* tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
	(always_initialized_rtx_for_ssa_name_p): New predicate.
	* tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
	(finish_out_of_ssa): Free new field of SA.
	* tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
	* tree-ssa-coalesce.c: Include tree-ssa.h.
	(get_parm_default_def_partitions): Remove extern keyword.
	(get_undefined_value_partitions): New function.
	* expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
	not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
	uninitialized bits.
	* loop-iv.c (iv_get_reaching_def): Disqualify all subregs.

2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>

	* builtins.def (BUILT_IN_SETJMP): Revert latest change.

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

	* config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
	for targets that preffer 128bit.

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

	* config/i386/i386.c (has_dispatch): Disable for Ryzen.

2017-10-08  Olivier Hainque  <hainque@adacore.com>

	* config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
	on the target mem instead of RTX_FRAME_RELATED_P on the insn to
	prevent DSE.
	(thumb_set_return_address): Likewise.

2017-10-08  Olivier Hainque  <hainque@adacore.com>

	* common/config/arm/arm-common.c (arm_except_unwind_info):
	Handle DWARF2_UNWIND_INFO.

2017-10-07  Michael Collison <michael.collison@arm.com>

	* config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
	New pattern.

2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>

	* builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
	of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
	* except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
	defined, force the creation of a new block for a dispatch label.

2017-10-07  Jan Hubicka  <hubicka@ucw.cz>

	* invoke.texi (Wsuggest-attribute=cold): Document.
	* common.opt (Wsuggest-attribute=cold): New
	* ipa-pure-const.c (warn_function_cold): New function.
	* predict.c (compute_function_frequency): Use it.
	* predict.h (warn_function_cold): Declare.

2017-10-06  Jan Hubicka  <hubicka@ucw.cz>

	* tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
	Update profile.

2017-10-06  Martin Liska  <mliska@suse.cz>

	* sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
	keyword for member functions.
	(struct sanopt_tree_couple): New struct.
	(struct sanopt_tree_couple_hash): New function.
	(struct sanopt_ctx): Add new hash_map.
	(has_dominating_ubsan_ptr_check): New function.
	(record_ubsan_ptr_check_stmt): Likewise.
	(maybe_optimize_ubsan_ptr_ifn): Likewise.
	(sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
	(pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.

2017-10-06  Sudakshina Das  <sudi.das@arm.com>

	PR target/82440
	* config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
	aarch64_simd_valid_immediate on CONST_VECTORs.
	(aarch64_reg_or_bic_imm): Likewise.

2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>

	PR rtl-optimization/82396
	* haifa-sched.c (ready_sort_real): Disable qsort checking.

2017-10-06  Sebastian Pop  <sebpop@gmail.com>

	* graphite-dependences.c (scop_get_reads): Move code to...
	(scop_get_must_writes): Move code to...
	(scop_get_may_writes): Move code to...
	(scop_get_reads_and_writes): ... here.
	(scop_get_dependences): Call scop_get_reads_and_writes.

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

	PR tree-optimization/82434
	* fold-const.h (can_native_encode_type_p,
	can_native_encode_string_p): Remove.
	* fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
	don't encode anything, just return what would be otherwise returned.
	(native_encode_fixed, native_encode_complex, native_encode_vector):
	Likewise.
	(native_encode_string): Likewise.  Inline by hand
	can_native_encode_string_p.
	(can_native_encode_type_p): Remove.
	(can_native_encode_string_p): Remove.
	* tree-vect-stmts.c (vectorizable_store): Instead of testing just
	STRING_CSTs using can_native_encode_string_p, test all
	CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
	* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
	argument from native_encode_expr.
	(rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
	(pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
	but just 2.

2017-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82397
	* tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
	operand_equal_p but rely on data_ref_compare_tree for detecting
	equalities.
	(vect_analyze_data_ref_accesses): Use data_ref_compare_tree
	to match up with dr_group_sort_cmp.

2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/82322
	* config/s390/s390-builtins.def (s390_vfi): Define new overloaded
	builtin.
	* config/s390/s390-builtin-types.def: Regenerate.

2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/82317
	* config/s390/s390-builtin-types.def: Regenerate.
	* config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
	Change flag from B_VXE to B_VX.
	(s390_vec_min_dbl): Remove B_VXE flag.

2017-10-06  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
	(translate_isl_ast_to_gimple::translate_pending_phi_nodes,
	translate_isl_ast_to_gimple::is_valid_rename,
	translate_isl_ast_to_gimple::get_rename,
	translate_isl_ast_to_gimple::get_def_bb_for_const,
	translate_isl_ast_to_gimple::get_new_name,
	translate_isl_ast_to_gimple::collect_all_ssa_names,
	translate_isl_ast_to_gimple::copy_loop_phi_args,
	translate_isl_ast_to_gimple::collect_all_ssa_names,
	translate_isl_ast_to_gimple::copy_loop_phi_args,
	translate_isl_ast_to_gimple::copy_loop_phi_nodes,
	translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
	translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
	translate_isl_ast_to_gimple::copy_loop_close_phi_args,
	translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
	translate_isl_ast_to_gimple::copy_cond_phi_args,
	translate_isl_ast_to_gimple::copy_cond_phi_nodes,
	translate_isl_ast_to_gimple::edge_for_new_close_phis,
	translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
	translate_isl_ast_to_gimple::rename_uses,
	translate_isl_ast_to_gimple::rename_all_uses): Remove.
	(translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
	(set_rename_for_each_def): Likewise.
	(graphite_copy_stmts_from_block): Handle debug stmt resetting
	here.  Handle rewriting SCEV analyzable uses here.
	(copy_bb_and_scalar_dependences): Generate code for PHI
	copy-in/outs.
	(graphite_regenerate_ast_isl): Adjust.
	* graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
	(add_write, add_read): New functions.
	(build_cross_bb_scalars_def): Use it and simplify.
	(build_cross_bb_scalars_use): Likewise.
	(graphite_find_cross_bb_scalar_vars): Inline into...
	(try_generate_gimple_bb): ...here.  Add dependences for PHIs,
	simulating out-of-SSA.  Compute liveout and add dependencies.
	(build_scops): Force an empty entry block.
	* sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
	members.
	(sese_build_liveouts): Declare.
	(sese_trivially_empty_bb_p): Likewise.
	* sese.c (sese_build_liveouts_bb): Properly handle PHIs,
	compute liveout and debug_liveout.
	(sese_bad_liveouts_use): Remove.
	(sese_reset_debug_liveouts_bb): Likewise.
	(sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
	(sese_build_liveouts): Build liveout and debug_liveout and store
	it in region.
	(new_sese_info): Adjust.
	(free_sese_info): Likewise.
	(sese_insert_phis_for_liveouts): Reset debug stmts from here,
	do not build liveout here.
	(move_sese_in_condition): Adjust region entry.
	(scev_analyzable_p): Match up with chrec_apply requirements.
	(sese_trivially_empty_bb_p): New.
	* tree-into-ssa.c (get_reaching_def): Properly support generating
	default-defs for incremental rewrite of anonymous names.

2017-10-06  Richard Biener  <rguenther@suse.de>

	* graphite-sese-to-poly.c (extract_affine): For casts increasing
	precision do not perform modulo reduction.

2017-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82436
	* tree-vect-slp.c (vect_supported_load_permutation_p): More
	conservatively choose the vectorization factor when checking
	whether we can perform the required load permutation.
	(vect_transform_slp_perm_load): Assert when we may not fail.

2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
	message for incompatible -msdata=* and -mcall-* options.

2017-10-05  Jan Hubicka <hubicka@ucw.cz>

	* config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
	rate for post-reload scheduling.

2017-10-05  Tamar Christina  <tamar.christina@arm.com>

	* doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.

2017-10-05  Jan Hubicka <hubicka@ucw.cz>

	* config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
	to improve monte carlo in scimark.

2017-10-05  Jan Hubicka <hubicka@ucw.cz>

	* config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
	pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
	athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
	pentium4_cost, nocona_cost): Set reassociation width to 1.
	(bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
	width to 2 for fp operations and 1 otherwise.
	(znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
	for int and fp.
	(atom_cost): Set reassociation width to 2.
	(slm_cost, generic_cost): Set fp reassociation width
	to 2 and 1 otherwise.
	(intel_cost): Set fp reassociation width to 4 and 1 otherwise.
	(core_cost): Set fp reassociation width to 4 and vector to 2.
	(ix86_reassociation_width): Rewrite using cost table; special case
	plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
	and TARGET_AVX128_OPTIMAL.
	* config/i386/i386.h (processor_costs): Add
	reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
	(TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
	TARGET_REASSOC_FP_TO_PARALLEL): Remove.
	* x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
	(X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
	(X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.

2017-10-05  Nathan Sidwell  <nathan@acm.org>

	* doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.

2017-10-05  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm.c (arm_test_fpu_data): New.
	(arm_run_selftests): Call arm_test_fpu_data.

2017-10-04  Nathan Sidwell  <nathan@acm.org>

	* toplev.c (toplev::main): Remove excess parens on pretty_printer
	decl.
	* caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.

2017-10-04  Sudakshina Das  <sudi.das@arm.com>

	* config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
	check type for aarch64_simd_valid_immediate.
	(aarch64_output_simd_mov_immediate): Update prototype.
	(aarch64_simd_valid_immediate): Update prototype.
	* config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
	support for ORR-immediate.
	(and<mode>3): modified pattern to add support for BIC-immediate.
	* config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
	now checks for valid immediate for BIC and ORR based on new enum
	argument.
	(aarch64_output_simd_mov_immediate): Function now used to output
	BIC/ORR imm as well based on new enum argument.
	* config/aarch64/constraints.md (Do): New vector immediate constraint.
	(Db) : Likewise.
	* config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
	(aarch64_reg_or_bic_imm): Likewise.

2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vx-builtins.md ("vec_mergeh<mode>")
	("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.

2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>

	Revert r253399:

	PR rtl-optimization/82396
	* haifa-sched.c (autopref_multipass_init): Simplify
	initialization.
	(autopref_rank_data): Simplify sort order.
	* sched-int.h (autopref_multipass_data_): Remove
	multi_mem_insn_p, min_offset and max_offset.

2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* doc/sourcebuild.texi: Document vect_peeling_profitable.

2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* doc/sourcebuild.texi: Document vect_intdouble_cvt and
	vect_doubleint_cvt.

2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* doc/sourcebuild.texi: Document vect_long_mult.

2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/82413
	* fold-const.c (build_range_check): Use widest_int when comparing
	the maximum ETYPE value with HIGH.

2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>

	PR rtl-optimization/82396
	* haifa-sched.c (autopref_multipass_init): Simplify
	initialization.
	(autopref_rank_data): Simplify sort order.
	* sched-int.h (autopref_multipass_data_): Remove
	multi_mem_insn_p, min_offset and max_offset.

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

	PR tree-optimization/82381
	* tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
	oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
	is not.

	PR tree-optimization/82374
	* omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
	DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
	DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
	current_function_decl to the new decl.

2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
	helper macro for IEEE float128 hardware built-in functions.
	(SQRTF128_ODD): Add built-in functions with the round-to-odd
	semantics.
	(TRUNCF128_ODD): Likewise.
	(ADDF128_ODD): Likewise.
	(SUBF128_ODD): Likewise.
	(MULF128_ODD): Likewise.
	(DIVF128_ODD): Likewise.
	(FMAF128_ODD): Likewise.
	* config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
	UNSPEC_TRUNC_ROUND_TO_ODD.
	(UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
	(UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
	floating point round to odd instructions.
	(UNSPEC_SUB_ROUND_TO_ODD): Likewise.
	(UNSPEC_MUL_ROUND_TO_ODD): Likewise.
	(UNSPEC_DIV_ROUND_TO_ODD): Likewise.
	(UNSPEC_FMA_ROUND_TO_ODD): Likewise.
	(UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
	(trunc<mode>sf2_hw): Change the truncate with round to odd
	expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
	(add<mode>3_odd): Add insns for IEEE 128-bit floating point round
	to odd hardware instructions.
	(sub<mode>3_odd): Likewise.
	(mul<mode>3_odd): Likewise.
	(div<mode>3_odd): Likewise.
	(sqrt<mode>2_odd): Likewise.
	(fma<mode>4_odd): Likewise.
	(fms<mode>4_odd): Likewise.
	(nfma<mode>4_odd): Likewise.
	(nfms<mode>4_odd): Likewise.
	(trunc<mode>df2_odd): Change the truncate with round to odd
	expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
	function.
	* doc/extend.texi (PowerPC built-in functions): Update documentation
	for existing IEEE float128-bit built-in functions.  Add built-in
	functions that generate the IEEE 128-bit floating point round to
	odd instructions.

2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>

	PR rtl-optimization/77729
	* simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
	to (X&(C1&~C2))|C2 transformations.

2017-10-03  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/82363
	* tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
	mismatch, mark lacc written regardless of racc.

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

	PR tree-optimization/82381
	* tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
	stmt_to_insert nor wheather SSA_NAMEs are default defs.
	Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
	fallthrough into reassoc_stmt_dominates_stmt_p.

	PR target/82386
	* combine.c (combine_instructions): Don't combine in unreachable
	basic blocks.

2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/80210
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
	function to not use the have_cpu variable.  Do not set cpu_index,
	rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
	or the default cpu.
	(rs6000_valid_attribute_p): Remove duplicate initializations of
	old_optimize and func_optimize.
	(rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
	(rs6000_activate_target_options): Make global.
	* config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
	prototype.

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

	* tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
	if *poffset + *pmax_size overflows in HOST_WIDE_INT.
	Set *poffset to 0 and *psize and *pmax_size to -1 if
	*poffset + *psize overflows in HOST_WIDE_INT.

	PR tree-optimization/82387
	PR tree-optimization/82388
	PR tree-optimization/82389
	* tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
	instead of live_bytes non-NULL.

2017-10-02  Georg-Johann Lay  <avr@gjlay.de>

	PR target/41076
	* confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
	alternative.

2017-10-02  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (set_codegen_error): With
	-fchecking and --param graphite-allow-codegen-errors=0 ICE.
	* params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.

2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree.h (wi::int_traits <const_tree>::decompose): Assert that the
	requested precision matches the type's.
	* calls.c (alloc_max_size): Calculate the new candidate size as
	a widest_int and use wi::to_widest when comparing it with the
	current candidate size.
	* gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
	zero rather than integer_zero_node.
	* match.pd: Check for a no-op conversion before using wi::add
	rather than after.  Use tree_to_uhwi when summing small shift
	counts into an unsigned int.

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

	PR target/71307
	* config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
	(REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
	* config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
	POINTER_AND_FP_REGS.

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.

2017-10-01  Kevin Buettner  <kevinb@redhat.com>

	* omp-expand.c (adjust_context_scope): New function.
	(expand_parallel_call): Call adjust_context_scope.

2017-10-01  Jeff Law  <law@redhat.com>

	* tree-ssa-dom.c (optimize_stmt): Make this a method within the
	dom_opt_dom_walker class with direct access to private members.
	Add comments.  Call test_for_singularity.
	(dom_opt_dom_walker::before_dom_children): Corresponding changes.
	(dom_opt_dom_walker::after_dom_children): Do not lazily initialize
	m_dummy_cond anymore.
	(class dom_opt_dom_walker): Initialize m_dummy_cond member in the
	class ctor.
	(pass_dominator:execute): Build the dummy_cond here and pass it
	to the dom_opt_dom_walker ctor.
	(test_for_singularity): New function.

2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
	    Maya Rashish  <coypu@sdf.org>

	* config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
	netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
	(alpha*-*-netbsd*) Use nbsd_tm_file.
	(arm*-*-netbsdelf*) Likewise.
	(i[34567]86-*-netbsdelf*) Likewise.
	(x86_64-*-netbsd*) Likewise.
	(mips*-*-netbsd*) Likewise.
	(powerpc-*-netbsd*) Likewise.
	(sh*-*-netbsd*) Likewise.
	(sparc-*-netbsdelf*) Likewise.
	(sparc64-*-netbsd*) Likewise.
	(m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
	to tm_defines.
	(vax-*-netbsdelf*) Likewise.
	* config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
	(UINT_FAST8_TYPE) Likewise.
	(INT_FAST16_TYPE) Check CHAR_FAST16.
	(UINT_FAST16_TYPE) Likewise.

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

	PR target/82361
	* config/i386/i386.md
	(TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
	(divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
	*divmodsi4_zext_2): New define_insn_and_split.
	(*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
	(TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
	(udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
	*udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
	New define_insn_and_split.
	(*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
	* config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
	operands[1] having DImode when mode is SImode.

	* config/i386/i386.c (ix86_split_idivmod): Use mode instead of
	always SImode for DIV and MOD in REG_EQUAL notes.

2017-09-29  Yury Gribov  <tetra2005@gmail.com>

	PR middle-end/82319
	* match.pd: Fix handling of NaNs in pattern.

2017-09-29  Jeff Law  <law@redhat.com>

	* sbitmap.c (bitmap_bit_in_range_p): New function.
	* sbitmap.h (bitmap_bit_in_range_p): Prototype.
	* tree-ssa-dse.c (live_bytes_read): New function.
	(dse_classify_store): Ignore reads of dead bytes.

	* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
	typos and whitespace errors.
	* config/i386/predicates.md (address_no_seg_operand): Likewise.
	* config/s390/s390.c (s390_emit_prologue): Likewise.

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

	PR target/81481
	* ira-costs.c (scan_one_insn): Don't take into account PIC equiv
	with a symbol for LRA.

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

	PR rtl-optimization/82338
	* lra-constraints.c (inherit_in_ebb): Check usage_insns check.

2017-09-29  Alexander Monakov  <amonakov@ispras.ru>

	* genmodes.c (calc_wider_mode): Suppress qsort macro.
	* system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
	(qsort_chk): Declare.
	* vec.c [CHECKING_P] (qsort_chk_error): New static function.
	(qsort_chk): New function.

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

	PR tree-optimization/82337
	* gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
	phi definition if the PHI result appears in an abnormal PHI.
	(find_basis_for_base_expr): Don't record a basis if the LHS of the
	basis appears in an abnormal PHI.

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

	* graphite-isl-ast-to-gimple.c
	(translate_isl_ast_to_gimple::set_codegen_error): New function.
	(binary_op_to_tree): Use it.
	(get_rename_from_scev): Likewise.
	(copy_loop_phi_nodes): Likewise.
	(copy_bb_and_scalar_dependences): Likewise.
	(translate_pending_phi_nodes): Likewise.

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

	PR target/82339
	* config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
	for movabsq $(i32 << shift), r64.

2017-09-28  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_print_operand_address_as): Do not check
	index when encoding %esp as %rsp to avoid 0x67 prefix.

2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>

	* config/i386/i386.md (*movsf_internal, *movdf_internal):
	Return 256-bit AVX modes for TARGET_PREFER_AVX256.

2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
	Extensions with more than 16 double VFP registers.
	(cmse_nonsecure_entry_clear_before_return): Remove second entry of
	to_clear_mask and all code related to it.  Replace the remaining
	entry by a sbitmap and adapt code accordingly.

2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>

	* brig-builtins.def: Change pure attributes to const.

2017-09-28  Joseph Myers  <joseph@codesourcery.com>

	* config.gcc (default_gnu_indirect_function): Default to yes for
	sparc*-*-linux* with glibc.

2017-09-28  Joseph Myers  <joseph@codesourcery.com>

	* config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
	(aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
	when creating .init_array and .fini_array sections with priority
	specified.

2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/71727
	* config/aarch64/aarch64.c
	(aarch64_builtin_support_vector_misalignment): Always return false
	when misalignment is unknown.

2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
	this function to return false if the definition used by the swap
	instruction is artificial, or if the memory address from which the
	constant value is loaded is not represented by a base address held
	in a register or if the base address register is a frame or stack
	pointer.  Additionally, return false if the base address of the
	loaded constant is a SYMBOL_REF but is not considered to be a
	constant.
	(replace_swapped_load_constant): New function.
	(rs6000_analyze_swaps): Add a new pass to replace a swap of a
	loaded constant vector with a load of a swapped constant vector.

2017-09-27  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
	(FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
	* config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
	fctiw instruction.

2017-09-27  Alexander Monakov  <amonakov@ispras.ru>

	* haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
	first, always call autopref_rank_data otherwise.

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

	* graphite-scop-detection.c (find_scop_parameters): Move
	loop bound handling ...
	(gather_bbs::before_dom_children): ... here, avoiding the need
	to build scop_info->loop_nest.
	(record_loop_in_sese): Remove.
	* sese.h (sese_info_t::loop_nest): Remove.
	* sese.c (new_sese_info): Do not allocate loop_nest.
	(free_sese_info): Do not free loop_nest.

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

	PR c++/82159
	* gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
	lhs from calls if the lhs has addressable type.

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

	* graphite.h (scop::max_alias_set): New member.
	* graphite-scop-detection.c: Remove references to non-existing
	--param in comments.
	(build_alias_sets): Record the maximum alias set used for drs.
	(build_scops): Support zero as unlimited for
	--param graphite-max-arrays-per-scop.
	* graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
	and inline into ...
	(build_poly_sr_1): ... here.  Compute alias set based on the
	maximum alias set used for drs rather than
	PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP

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

	* graphite-optimize-isl.c (get_schedule_for_node_st): Allow
	--param loop-block-tile-size=0 to disable tiling.

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

	* doc/invoke.texi (graphite-max-bbs-per-function): Remove.
	(graphite-max-nb-scop-params): Document special value zero.
	* domwalk.h (dom_walker::STOP): New symbolical constant.
	(dom_walker::dom_walker): Add optional parameter for bb to
	RPO mapping.
	(dom_walker::~dom_walker): Declare.
	(dom_walker::before_dom_children): Document STOP return value.
	(dom_walker::m_user_bb_to_rpo): New member.
	(dom_walker::m_bb_to_rpo): Likewise.
	* domwalk.c (dom_walker::dom_walker): Compute bb to RPO
	mapping here if not provided by the user.
	(dom_walker::~dom_walker): Free bb to RPO mapping if not
	provided by the user.
	(dom_walker::STOP): Define.
	(dom_walker::walk): Do not compute bb to RPO mapping here.
	Support STOP return value from before_dom_children to stop
	walking.
	* graphite-optimize-isl.c (optimize_isl): If the schedule
	is the same still generate code if -fgraphite-identity
	or -floop-parallelize-all are given.
	* graphite-scop-detection.c: Include cfganal.h.
	(gather_bbs::gather_bbs): Get and pass through bb to RPO
	mapping.
	(gather_bbs::before_dom_children): Return STOP for BBs
	not in the region.
	(build_scops): Compute bb to RPO mapping and pass it to
	the domwalk.  Treat --param graphite-max-nb-scop-params=0
	as not limiting the number of params.
	* graphite.c (graphite_initialize): Remove limit on the
	number of basic-blocks in a function.
	* params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
	(PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
	default value of 10.

2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
	Adjust code to eliminate needing to do the shift right 32-bits
	operation after XSCVDPSPN.

2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* match.pd ((X / Y) == 0 -> X < Y): New pattern.
	((X / Y) != 0 -> X >= Y): Likewise.

2017-09-26  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
	P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
	vector unsigned char vec_xl_len_r (unsigned char *, size_t);
	void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
	* config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
	* config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
	definitions and overloading.
	* config/rs6000/rs6000.c (altivec_expand_builtin): Add case
	statement for P9V_BUILTIN_XST_LEN_R.
	(altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
	* config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
	define_expand and define_insn for the instructions and builtins.
	* doc/extend.texi: Update the built-in documentation file for the new
	built-in functions.
	* config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
	define_insn for the instructions

2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>

	PR target/39570
	* gcc/config/netbsd-protos.h: New file.
	* gcc/config/netbsd.c: New file.
	* gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
	* gcc/config/t-netbsd: New file.
	* gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
	(tmake_file) Add t-netbsd.
	(extra_objs) Add netbsd.o.

2017-09-26  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/82143
	PR fortran/82324
	* doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.

2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
	sign extension from a vector register to a GPR by doing a 32-bit
	direct move and then an EXTSW.
	(extendsi<mode>2 splitter): Likewise.
	(movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
	right or vector extract after doing XSCVDPSPN.  Use
	zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
	the GPRs.
	(movdi_from_sf_zero_ext): Likewise.
	(reload_gpr_from_vsxsf): Likewise.
	(p8_mfvsrd_4_disf): Delete, no longer used.
	(movsi_from_df): Optimize converting a DFmode to a SFmode, and
	then needing to move the SFmode to a GPR to use the XSCVDPSP
	instruction instead of FRSP and XSCVDPSPN.
	* config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
	it is adjacent to the other XSCVSPDP insns.
	(vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
	SFmode to be in traditional Altivec registers.
	(vsx_xscvdpspn): Eliminate useless alternative constraint.
	(vsx_xscvspdpn): Likewise.
	(vsx_xscvspdpn_scalar): Likewise.

2017-09-26  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c (compare_access_positions): Put integral types first,
	stabilize sorting of integral types, remove conditions putting
	non-full-precision integers last.
	(sort_and_splice_var_accesses): Disable scalarization if a
	non-integert would be represented by a non-full-precision integer.

2017-09-26  Joseph Myers  <joseph@codesourcery.com>

	* config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
	* config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
	* config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
	* config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
	Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
	conditionals inside the function instead of around it.  Call
	file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
	(TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.

2017-09-26  Richard Biener  <rguenther@suse.de>

	* graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
	fold in ...
	(scop_detection::build_scop_breadth): ... this.  Removed.
	(scop_detection::loop_is_valid_in_scop): Fold into single caller.
	(scop_detection::harmful_stmt_in_bb): Likewise.
	(scop_detection::graphite_can_represent_stmt): Likewise.
	(scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
	(scop_detection::can_represent_loop): Remove recursion, fold in ...
	(scop_detection::can_represent_loop_1): ... this.  Removed.
	(scop_detection::harmful_loop_in_region): Simplify after inlining
	the above and remove more quadraticness.
	(build_scops): Adjust.
	* tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
	quadraticness.

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

	PR target/82267
	* config/i386/i386.c (ix86_print_operand_address_as): Only test
	REGNO (base) == SP_REG if base is a REG.

	PR middle-end/35691
	* tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
	if it is different SSA_NAME.
	(optimize_range_tests_cmp_bitwise): New function.
	(optimize_range_tests): Call it.

2017-09-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82321
	* graphite.c (canonicalize_loop_closed_ssa): Properly check
	for the def being inside the loop.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vx-builtins.md ("vmslg"): Add missing operand in
	assembler output.
	* config/s390/s390-builtins.def: Fix constraint on op4.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_expand_vec_compare): Use the new mode
	independent expanders.
	* config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
	("vec_ordered", "vec_unordered"): New expanders.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
	for SFmode.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
	vec_unpacks_lo_v16qi.
	("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vector.md ("vec_unpacks_lo_v4sf")
	("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
	("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/predicates.md ("const_shift_by_byte_operand"): New
	predicate.
	* config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
	and V16QI.
	("*vec_slb<mode>"): New insn pattern.
	("vec_shr_<mode>"): New expander.
	* config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
	and force the shift count operand to V16QImode.
	("vec_srb<mode>"): Set shift count mode to V16QI.

2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config/s390/vector.md ("vec_widen_umult_lo_<mode>")
	("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
	("vec_widen_smult_hi_<mode>"): New expander definitions.

2017-09-26  Richard Earnshaw  <rearnsha@arm.com>

	PR target/82175
	* config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.

2017-09-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82320
	* tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
	isn't a change.

2017-09-25  Jeff Law  <law@redhat.com>

	* config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
	prototype for new argument.
	* config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
	mostly extracted from rs6000_emit_allocate_stack.
	(rs6000_emit_probe_stack_range_stack_clash): New function.
	(rs6000_emit_allocate_stack): Call
	rs6000_emit_probe_stack_range_stack_clash as needed.
	(rs6000_emit_probe_stack_range): Add additional argument
	to call to gen_probe_stack_range{si,di}.
	(output_probe_stack_range): New.
	(output_probe_stack_range_1): Renamed from output_probe_stack_range.
	(output_probe_stack_range_stack_clash): New.
	(rs6000_emit_prologue): Emit notes into dump file as requested.
	* rs6000.md (allocate_stack): Handle -fstack-clash-protection.
	(probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
	Add additional operand and pass it to output_probe_stack_range.

2017-09-25  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/82163
	* tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
	(checking_verify_loop_closed_ssa): New parameter.
	* tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
	(check_loop_closed_ssa_stmt): Delete.
	(check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
	(verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
	(tree_transform_and_unroll_loop): Check loop closed ssa form only for
	changed loops.

2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>

	* brig-builtins.def: Treat HSAIL barrier builtins as
	setjmp/longjump style functions.

2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>

	* target.def (constant_alignment): New hook.
	* defaults.h (CONSTANT_ALIGNMENT): Delete.
	* doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
	(TARGET_CONSTANT_ALIGNMENT): ...this new hook.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_constant_alignment): Declare.
	(constant_alignment_word_strings): Likewise.
	* targhooks.c (default_constant_alignment): New function.
	(constant_alignment_word_strings): Likewise.
	* builtins.c (get_object_alignment_2): Use targetm.constant_alignment
	instead of CONSTANT_ALIGNMENT.
	* varasm.c (align_variable, get_variable_align, build_constant_desc)
	(force_const_mem): Likewise.
	* config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
	* config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
	(aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
	definition.
	* config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
	* config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
	(CONSTANT_ALIGNMENT): Likewise.
	* config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(arm_constant_alignment): New function.
	* config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
	* config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
	* config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
	* config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(cris_constant_alignment): New function.
	* config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
	* config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(epiphany_constant_alignment): New function.
	* config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
	* config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
	* config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
	* config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
	* config/i386/i386-protos.h (ix86_constant_alignment): Delete.
	* config/i386/i386.c (ix86_constant_alignment): Make static.
	Use the same interface as the target hook.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
	* config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
	* config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
	* config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
	* config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
	* config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
	* config/microblaze/microblaze.c (microblaze_constant_alignment):
	New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
	* config/mips/mips.c (mips_constant_alignment): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
	* config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
	* config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(mmix_constant_alignment): Make static.  Use the same interface
	as the target hook.
	* config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
	* config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
	* config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
	* config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
	* config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(rs6000_constant_alignment): New function.
	* config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
	* config/riscv/riscv.c (riscv_constant_alignment): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
	* config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(rs6000_constant_alignment): New function.
	* config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
	* config/s390/s390.c (s390_constant_alignment): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
	* config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
	* config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(sparc_constant_alignment): New function.
	* config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
	* config/spu/spu.c (spu_constant_alignment): New function.
	(TARGET_CONSTANT_ALIGNMENT): Redefine.
	* config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
	* config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
	* config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
	* config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
	constant_alignment_word_strings.
	* config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
	* config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(visium_constant_alignment): New function.
	* config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
	* config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
	(xtensa_constant_alignment): New function.
	* system.h (CONSTANT_ALIGNMENT): Poison.

2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
	for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
	(rs6000_builtin_valid_without_lhs): New helper function.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.

2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>

	* target.h (vec_perm_indices): Use unsigned short rather than
	unsigned char.
	(auto_vec_perm_indices): Likewise.
	* config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
	Use unsigned int rather than unsigned char.
	* config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.

2017-09-25  Richard Biener  <rguenther@suse.de>

	* cfgloop.h (sort_sibling_loops): Declare.
	* cfgloop.c (sort_sibling_loops_cmp): New helper.
	(sort_sibling_loops): New function sorting the sibling loop list
	in RPO order.
	* graphite.c (graphite_transform_loops): Sort sibling loops.

2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>

	* target.def (vec_perm_const_ok): Change sel parameter to
	vec_perm_indices.
	* optabs-query.c (can_vec_perm_p): Update accordingly.
	* doc/tm.texi: Regenerate.
	* config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
	auto_vec_perm_indices and remove separate nelt field.
	(aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
	(aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
	(aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
	(aarch64_expand_vec_perm_const): Update accordingly.
	(aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
	to vec_perm_indices.
	* config/arm/arm.c (expand_vec_perm_d): Change perm to
	auto_vec_perm_indices and remove separate nelt field.
	(arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
	(arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
	(arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
	accordingly.
	(arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
	to vec_perm_indices.
	* config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
	sel to vec_perm_indices.
	* config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
	* config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
	Likewise.

2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>

	PR debug/82155
	* dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
	on the FUNCTION_DECL function context if it has a DIE that is a
	declaration.

2017-09-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82285
	* tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
	enumeral types.

2017-09-25  Tom de Vries  <tom@codesourcery.com>

	PR target/80035
	PR target/81069
	* config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
	noreturn function.

2017-09-25  Richard Biener  <rguenther@suse.de>

	* graphite-optimize-isl.c (optimize_isl): Fail and dump if
	ISL errors other than isl_error_quota happen.  Dump if the
	schedule is the same.
	* graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
	errors instead of aborting inside ISL.

2017-09-25  Iain Sandoe  <iain@codesourcery.com>

	PR target/80556
	* config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
	of libgcc_eh for m64.
	* config/i386/darwin64.h: Likewise.

2017-09-25  Richard Biener  <rguenther@suse.de>

	PR middle-end/82144
	* dwarf2out.c (gen_enumeration_type_die): Do not add alignment
	attribute for incomplete types nor twice for complete ones.

2017-09-24  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82267
	* config/i386/i386.c (ix86_print_operand_address_as): Encode
	%esp as %rsp to avoid 0x67 prefix if there is no index or base
	register.

2017-09-23  Uros Bizjak  <ubizjak@gmail.com>

	PR bootstrap/82306
	* config/i386/i386.opt (mprefer-avx256): Use
	ix86_target_flags variable.
	* config/i386/i386.c (ix86_target_string): Move
	-mprefer-avx256 to flag2_opts.

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

	PR middle-end/35691
	* match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
	and x != -1 | y != -1 into (x & y) != -1.

2017-09-22  Steve Ellcey  <sellcey@cavium.com>

	* config.gcc: Add new case statement to set
	default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
	i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
	s390x-*-linux* case statements.   Added aarch64 to the list of
	supported architectures.

2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/82289
	* tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
	STMT_VINFO_RELEVANT_P.

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

	* tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
	for VR_RANGE only; don't allow VR_ANTI_RANGE.
	(extract_range_from_binary_expr_1): Don't call
	extract_range_from_multiplicative_op_1 if !range_int_cst_p.

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

	* target.def (preferred_vector_alignment): New hook.
	* doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
	hook.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_preferred_vector_alignment): Declare.
	* targhooks.c (default_preferred_vector_alignment): New function.
	* tree-vectorizer.h (dataref_aux): Add a target_alignment field.
	Expand commentary.
	(DR_TARGET_ALIGNMENT): New macro.
	(aligned_access_p): Update commentary.
	(vect_known_alignment_in_bytes): New function.
	* tree-vect-data-refs.c (vect_calculate_required_alignment): New
	function.
	(vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
	Calculate the misalignment based on the target alignment rather than
	the vector size.
	(vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
	rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
	(vect_enhance_data_refs_alignment): Mask the byte misalignment with
	the target alignment, rather than masking the element misalignment
	with the number of elements in a vector.  Also use the target
	alignment when calculating the maximum number of peels.
	(vect_find_same_alignment_drs): Use vect_calculate_required_alignment
	instead of TYPE_ALIGN_UNIT.
	(vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
	Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
	(vect_create_addr_base_for_vector_ref): Update call accordingly.
	(vect_create_data_ref_ptr): Likewise.
	(vect_setup_realignment): Realign by ANDing with
	-DR_TARGET_MISALIGNMENT.
	* tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
	the number of peels based on DR_TARGET_ALIGNMENT.
	* tree-vect-stmts.c (get_group_load_store_type): Compare the gap
	with the guaranteed alignment boundary when deciding whether
	overrun is OK.
	(vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
	relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
	(ensure_base_align): Remove stmt_info parameter.  Get the
	target base alignment from DR_TARGET_ALIGNMENT.
	(vectorizable_store): Update call accordingly.   Interpret
	DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
	TYPE_ALIGN_UNIT.
	(vectorizable_load): Likewise.

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

	* tree-vectorizer.h (vect_get_scalar_dr_size): New function.
	* tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
	(vect_enhance_data_refs_alignment): Likewise.

2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>

	* config/arm/parsecpu.awk (fatal): Note that we've encountered an
	error.  Only quit immediately if parsing is complete.
	(BEGIN): Initialize fatal_err and parse_done.
	(begin fpu, end fpu): Check number of arguments.
	(begin arch, end arch): Likewise.
	(begin cpu, end cpu): Likewise.
	(cname, tune for, tune flags, architecture, fpu, option): Likewise.
	(optalias): Likewise.

2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>

	* config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
	* config/arm/arm-isa.h: Delete.  Move definitions to ...
	* arm-cpus.in: ... here.  Use new feature and fgroup values.
	* config/arm/arm.c (arm_option_override): Use lower case for feature
	bit names.
	* config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
	(TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
	* config/arm/parsecpu.awk (END): Add new command 'isa'.
	(isa_pfx): Delete.
	(print_isa_bits_for): New function.
	(gen_isa): New function.
	(gen_comm_data): Use print_isa_bits_for.
	(define feature): New keyword.
	(define fgroup): New keyword.
	* config/arm/t-arm (TM_H): Remove.
	(GTM_H): Add arm-isa.h.
	(arm-isa.h): Add rule to generate file.
	* common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
	case for feature bit names.

2017-09-22  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
	single caller.
	(graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
	print of no dependency loops ...
	* graphite.c (graphite_transform_loops): ... here.
	(canonicalize_loop_closed_ssa_form): Work from inner to outer
	loops.
	(same_close_phi_node, remove_duplicate_close_phi,
	make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
	(canonicalize_loop_closed_ssa): ... here and simplify.
	* graphite-optimize-isl.c: Include tree-vectorizer.h.
	(optimize_isl): Use dump_printf_loc to tell when we stopped
	optimizing because of an ISL timeout.

2017-09-22  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82291
	* tree-if-conv.c (predicate_mem_writes): Make sure to
	remove writes in blocks predicated with false.

2017-09-22  Richard Biener  <rguenther@suse.de>

	* sese.c: Include cfganal.h.
	(if_region_set_false_region): Remove.
	(create_if_region_on_edge): Likewise.
	(move_sese_in_condition): Re-implement without destroying
	dominators.

2017-09-22  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
	Verify both BBs contain loop PHI nodes before dispatching to
	copy_loop_phi_args.
	(graphite_regenerate_ast_isl): Do not recompute dominators,
	do not verify three times.  Restructure for clarity.
	* graphite-scop-detection.c (same_close_phi_node,
	remove_duplicate_close_phi, make_close_phi_nodes_unique,
	defined_in_loop_p, canonicalize_loop_closed_ssa,
	canonicalize_loop_closed_ssa_form): Simplify, remove excess
	checking and SSA rewrite, move to ...
	* graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
	(graphite_initialize): Do not pass in ctx, do not reset the
	SCEV cache, compute only dominators.
	(graphite_transform_loops): Allocate ISL ctx after
	graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
	Maintain post-dominators only around build_scops.
	* sese.c (if_region_set_false_region): Make static.  Free
	and recompute dominators.
	(move_sese_in_condition): Assert we don't get called with
	post-dominators computed.
	* sese.h (if_region_set_false_region): Remove.

2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>

	* config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
	mode attribute for TARGET_AVX512VL.

2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>

	* config/i386/i386.opt (mprefer-avx256): New option.
	* config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
	to flag_opts.
	(ix86_preferred_simd_mode): Return 256-bit AVX modes
	for TARGET_PREFER_AVX256.
	* doc/invoke.texi (x86 Options): Document -mprefer-avx256.

2017-09-21  Jeff Law  <law@redhat.com>

	* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
	Fix dump output if the only stack space is for pushed registers.

2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
	of insn_cost.

2017-09-21  Martin Sebor  <msebor@redhat.com>

	PR c/81882
	* doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
	code (in C++) or code that triggers warnings.

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

	* stor-layout.c (bit_from_pos): Do not distribute the conversion.

2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>

	* haifa-sched.c: Rename insn_cost to insn_sched_cost.
	* sched-rgn.c: Ditto.
	* sel-sched-ir.c: Ditto.

2017-09-21  Alexander Monakov  <amonakov@ispras.ru>

	* toplev.h (set_random_seed): Adjust return type.
	* toplev.c (init_local_tick): Move eager initialization of random_seed
	to get_random_seed.  Adjust comment.
	(init_random_seed): Inline to get_random_seed, delete.
	(get_random_seed): Initialize random_seed lazily.
	(set_random_seed): Do not return previous value.
	(print_switch_value): Do not call get_random_seed.

2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>

	* cgraph.c (delete_function_version): New, broken out from...
	(cgraph_node::delete_function_version): ...here.  Rename to
	cgraph_node::delete_function_version_by_decl.  Update all uses.
	(cgraph_node::remove): Call delete_function_version.

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

	PR sanitizer/81715
	* tree-inline.c (expand_call_inline): Emit clobber stmts for
	VAR_DECLs to which addressable non-volatile parameters are mapped
	and for id->retvar after the return value assignment.  Clear
	id->retval and id->retbnd after inlining.

2017-09-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82276
	PR tree-optimization/82244
	* tree-vrp.c (build_assert_expr_for): Set
	SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
	has it set.
	(remove_range_assertions): Revert earlier change.

2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>

	PR target/71951
	* config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.

2017-09-21  Richard Biener  <rguenther@suse.de>

	* graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
	Restore valid IL after code generation errors.
	* graphite.c (graphite_transform_loops): Diagnose code
	generation issues as MSG_MISSED_OPTIMIZATION and continue
	with processing SCOPs.

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

	* calls.c (compute_argument_addresses): Use simplify_gen_binary
	rather than choosing between plus_constant and gen_rtx_<CODE>.
	* expr.c (emit_push_insn): Likewise.
	(expand_expr_real_2): Likewise.

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

	* loop-unroll.c (split_iv): Call copy_rtx on the step.

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

	* tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
	calling tree_to_uhwi.

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

	* tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
	INTEGER_CST rather than a negative test for ADDR_EXPR.

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

	* tree-vrp.c (extract_range_from_binary_expr_1): Check
	int_cst_rangeN before calling value_range_constant_singleton (&vrN).

2017-09-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71351
	* graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
	graphite_create_new_loop_guard): Remove, fold remaining parts
	into caller ...
	(translate_isl_ast_node_for): ... here and simplify.

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

	PR target/82260
	* config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
	with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
	latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
	alternative always use QI mode, for -Os imov (=R,R) alternative
	always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
	ignore -Os.

2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
	    Jeff Law  <law@redhat.com>

	* config/s390/s390.c (MIN_UNROLL_PROBES): Define.
	(allocate_stack_space): New function, partially extracted from
	s390_emit_prologue.
	(s390_emit_prologue): Track offset to most recent stack probe.
	Code to allocate space moved into allocate_stack_space.
	Dump actions when no stack is allocated.
	(s390_prologue_plus_offset): New function.
	(s390_emit_stack_probe): Likewise.

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

	* common.opt (Wa, Wl, Wp, g, gz=): Add
	RejectNegative.
	(gno-column-info): Remove.
	(gcolumn-info): Drop RejectNegative.
	(gno-): New prefix.
	(gno-record-gcc-switches): Remove.
	(grecord-gcc-switches): Drop RejectNegative.
	(gno-split-dwarf): Remove.
	(gsplit-dwarf): Drop RejectNegative.
	(gno-strict-dwarf): Remove.
	(gstrict-dwarf): Drop RejectNegative.
	* config/darwin.opt (gfull, gused): Add RejectNegative.
	* dwarf2out.c (gen_producer_string): Drop
	gno-record-gcc-switches handler.
	* optc-gen.awk: Add g to prefixes with negative forms.
	* opts-common.c (remapping_prefix_p): New.
	(find_opt): Check it.
	(generate_canonical_option): Test g prefix.
	(option_map): Add -gno- mapping.
	(add_misspelling_candidates): Check remapping_prefix_p.

2017-09-20  Jeff Law  <law@redhat.com>

	* config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
	thinko in stack clash protection support.

	* explow.c (compute_stack_clash_protection_loop_data): Use
	CONST_INT_P instead of explicit test.  Verify object is a
	CONST_INT_P before looking at INTVAL.
	(anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
	instead of explicit test.

2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/77687
	* config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
	address instead of to r1 and r11.

2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>

	* config.gcc: Support "knm".
	* config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
	* config/i386/i386-c.c (ix86_target_macros_internal): Handle
	PROCESSOR_KNM.
	* config/i386/i386.c (m_KNM): Define.
	(processor_target_table): Add "knm".
	(PTA_KNM): Define.
	(ix86_option_override_internal): Add "knm".
	(ix86_issue_rate): Add PROCESSOR_KNM.
	(ix86_adjust_cost): Ditto.
	(ia32_multipass_dfa_lookahead): Ditto.
	(get_builtin_code_for_version): Handle PROCESSOR_KNM.
	(fold_builtin_cpu): Add M_INTEL_KNM.
	* config/i386/i386.h (processor_costs): Define TARGET_KNM.
	(processor_type): Add PROCESSOR_KNM.
	* config/i386/x86-tune.def: Add m_KNM.
	* doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.

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

	PR tree-optimization/80213
	* graphite-scop-detection.c (trivially_empty_bb_p): Labels
	are allowed in empty BBs as well.
	(canonicalize_loop_closed_ssa): Also look for other complex
	edges.
	(scop_detection::get_sese): Include the loop-closed PHI block
	in loop SESEs.
	(scop_detection::merge_sese): Remove code adding extra blocks.
	(scop_detection::region_has_one_loop): Adjust for get_sese changes.
	(build_scops): Assert the final returned scop is invalid.

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

	PR tree-optimization/82264
	* tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
	for GIMPLE_CONDs.
	(vn_phi_lookup): Likewise.
	(vn_phi_insert): Likewise.

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

	* dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
	that fits into uhwi or shwi, add DW_AT_const_value regardless
	of early_dwarf without going through RTL, using add_AT_unsigned
	or add_AT_int.

	* dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
	(DEBUG_LTO_ABBREV_SECTION): Likewise.
	(DEBUG_LTO_MACINFO_SECTION): Likewise.
	(DEBUG_MACRO_SECTION): Likewise.
	(DEBUG_LTO_MACRO_SECTION): Likewise.
	(DEBUG_STR_DWO_SECTION): Likewise.
	(DEBUG_LTO_STR_DWO_SECTION): Likewise.
	(DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
	(DEBUG_LTO_DWO_LINE_SECTION): Define.
	(DEBUG_LTO_LINE_STR_SECTION): Define.
	(init_sections_and_labels): Initialize debug_line_str_section
	variable.  Initialize debug_loc_section for -gdwarf-5 to
	DEBUG_LOCLISTS_SECTION.  Formatting fixes.

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

	* graphite-sese-to-poly.c (extract_affine): Properly handle
	POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.

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

	PR tree-optimization/81373
	* graphite-scop-detection.c (build_cross_bb_scalars_def):
	Force SESE live-out defs to be handled even if they are
	scev_analyzable_p.

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

	* combine-stack-adj.c (combine_stack_adjustments_for_block): Do
	nothing for stack adjustments with REG_STACK_CHECK.
	* sched-deps.c (parse_add_or_inc): Reject insns with
	REG_STACK_CHECK from dependency breaking.
	* config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
	(ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
	* reg-notes.def (STACK_CHECK): New note.

	* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
	(ix86_expand_prologue): Dump stack clash info as needed.
	Call ix86_adjust_stack_and_probe_stack_clash as needed.

	* function.c (dump_stack_clash_frame_info): New function.
	* function.h (dump_stack_clash_frame_info): Prototype.
	(enum stack_clash_probes): New enum.

	* config/alpha/alpha.c (alpha_expand_prologue): Also check
	flag_stack_clash_protection.
	* config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
	(arm_expand_prologue, thumb1_expand_prologue): Likewise.
	(arm_frame_pointer_required): Likewise.
	* config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
	(ia64_expand_prologue): Likewise.
	* config/mips/mips.c (mips_expand_prologue): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
	(sparc_flat_expand_prologue): Likewise.
	* config/spu/spu.c (spu_expand_prologue): Likewise.

	* explow.c: Include "params.h".
	(anti_adjust_stack_and_probe_stack_clash): New function.
	(get_stack_check_protect): Likewise.
	(compute_stack_clash_protection_loop_data): Likewise.
	(emit_stack_clash_protection_loop_start): Likewise.
	(emit_stack_clash_protection_loop_end): Likewise.
	(allocate_dynamic_stack_space): Use get_stack_check_protect.
	Use anti_adjust_stack_and_probe_stack_clash.
	* explow.h (compute_stack_clash_protection_loop_data): Prototype.
	(emit_stack_clash_protection_loop_start): Likewise.
	(emit_stack_clash_protection_loop_end): Likewise.
	* rtl.h (get_stack_check_protect): Prototype.
	* target.def (stack_clash_protection_final_dynamic_probe): New hook.
	* targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
	* targhooks.h (default_stack_clash_protection_final_dynamic_probe):
	Prototype.
	* doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
	Add @hook.
	* doc/tm.texi: Rebuilt.
	* config/aarch64/aarch64.c (aarch64_expand_prologue): Use
	get_stack_check_protect.
	* config/alpha/alpha.c (alpha_expand_prologue): Likewise.
	* config/arm/arm.c (arm_expand_prologue): Likewise.
	(arm_frame_pointer_required): Likewise.
	* config/i386/i386.c (ix86_expand_prologue): Likewise.
	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
	* config/mips/mips.c (mips_expand_prologue): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
	(sparc_flat_expand_prologue): Likewise.

	* common.opt (-fstack-clash-protection): New option.
	* flag-types.h (enum stack_check_type): Note difference between
	-fstack-check= and -fstack-clash-protection.
	* params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
	(PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
	* toplev.c (process_options): Issue warnings/errors for cases
	not handled with -fstack-clash-protection.
	* doc/invoke.texi (-fstack-clash-protection): Document new option.
	(-fstack-check): Note additional problem with -fstack-check=generic.
	Note that -fstack-check is primarily for Ada and refer users
	to -fstack-clash-protection for stack-clash-protection.
	Document new params for stack clash protection.

2017-09-19  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_split_long_move): Do not handle
	address used for LEA in a special way.

2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>

	* simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.

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

	PR c/81854
	* cgraphunit.c (handle_alias_pairs): Reject aliases between functions
	of incompatible types.

2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
	for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.

2017-09-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82244
	* tree-vrp.c (remove_range_assertions): Do not propagate
	a constant to abnormals but replace the assert with a copy.

2017-09-19  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/57878
	PR rtl-optimization/68988
	* lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
	avoidance test involving non_reload_pseudos.  Move frequency test
	below the general fragmentation avoidance test.

2017-09-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69728
	* graphite-sese-to-poly.c (schedule_error): New global.
	(add_loop_schedule): Handle empty domain by failing the
	schedule.
	(build_original_schedule): Handle schedule_error.

2017-09-19  Richard Biener  <rguenther@suse.de>

	* graphite-scop-detection.c (scop_detection::can_represent_loop):
	Do not iterate to sibling loops but only to siblings of inner
	loops.

2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>

	PR target/81613
	* config/m68k/m68k.md (moveq feeding equality comparison): Check
	that the registers are different.

2017-09-18  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
	to processor_model and "amdfam17h" to arch_names_table.
	* doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.

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

	PR c/82234
	* doc/extend.texi: Add @findex entry for __builtin_shuffle.

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

	* tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
	with a vec_info *.
	* tree-vect-loop.c (vect_analyze_loop_operations): Update call
	accordingly.
	* tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
	parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
	vect_schedule_slp_instance.
	(vect_slp_analyze_operations): Replace parameters with a vec_info *.
	Update call to vect_slp_analyze_node_operations.  Simplify return
	value.
	(vect_slp_analyze_bb_1): Update call accordingly.
	(vect_schedule_slp_instance): Remove vectorization_factor parameter.
	Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
	(vect_schedule_slp): Update call accordingly.

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

	* tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
	with types that aren't in fact scalar.

2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vect-slp.c (vect_record_max_nunits): New function,
	split out from...
	(vect_build_slp_tree_1): ...here.
	(vect_build_slp_tree_2): Call it for phis too.

2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
	to vect_get_vec_def_for_operand when getting the mask operand.

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

	* tree-vect-loop.c (vectorizable_live_operation): Fix type of
	bitstart.

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

	* tree-vect-loop.c (vectorizable_live_operation): Fix element size
	calculation for vector booleans.

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

	* tree-vect-stmts.c (can_vectorize_live_stmts): New function,
	split out from...
	(vect_transform_stmt): ...here.
	(vect_analyze_stmt): Use it instead of calling
	vectorizable_live_operation directly.

2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>

	* omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
	non-SIMT targets in acc vector loops.

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

	* configure.ac: Add arc and check if assembler supports gdwarf2.
	* configure: Regenerate.

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

	PR tree-optimization/82220
	* tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
	epilogue niters from the min_profitable_iters compute.

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

	PR target/82145
	* config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
	changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
	(ix86_init_pic_reg): Revert 2017-09-01 changes.

2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/81361
	* dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
	switching to a new text section.

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

	* graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
	Simplify.
	(build_alias_set): Reject aliases with no access function.

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

	PR tree-optimization/79622
	* graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
	handle PHIs.
	(build_cross_bb_scalars_use): Likewise.

2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>

	* cgraph.h (cgraph_thunk_info): Fix a typo in a comment.

2017-09-18  Alan Modra  <amodra@gmail.com>

	PR target/81996
	* gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
	stack_pointer_rtx for count 0.  Update comments.  Break up
	large rtl expression.

2017-09-17  Daniel Santos  <daniel.santos@pobox.com>

	* config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
	Increase to 20 bytes.
	(xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
	(xlogue_layout::get_stub_name): Modify to select the appropairate sse
	or avx version of the stub.

2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/82166
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
	compute the minimum stack alignment.  Also update preferred stack
	boundary for leaf functions.

2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/82228
	* tree-vect-loop.c (vectorizable_live_operation): Move initialization
	of ncopies.

2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>

	* common/config/nds32/nds32-common.c
	(nds32_option_optimization_table): Refine formatting.
	(nds32_option_optimization_table): Use -fsched-pressure and
	-fomit-frame-pointer for specific optimization level.

2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>

	* config/nds32/nds32.c: Refine formatting and comments.
	* config/nds32/nds32.h: Likewise.
	* config/nds32/nds32.md: Likewise.
	* config/nds32/nds32-cost.c: Likewise.
	* config/nds32/nds32-isr.c: Likewise.
	* config/nds32/nds32-md-auxiliary.c: Likewise.
	* config/nds32/nds32-multiple.md: Likewise.
	* config/nds32/nds32-predicates.c: Likewise.

2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
	    Jakub Jelinek  <jakub@redhat.com>

	Add support for -std=c++2a.
	* doc/cpp.texi (__cplusplus): Document value for -std=c++2a
	or -std=gnu+2a.
	* doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.

2017-09-15  Steve Ellcey  <sellcey@cavium.com>

	PR target/82066
	* doc/extend.texi (Common Function Attributes): Add 
	references to ARM, AArch64, and S/390 specific attributes.
	(Function Specific Option Pragmas): Add AArch64 and S/390
	to list of back ends that support the target pragma.

2017-09-15  Nathan Sidwell  <nathan@acm.org>

	* doc/standards.texi: Fix C++17 description.  Update URLs for
	C++11 & 14.

2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	* common.opt (Wcast-align=strict): New warning option.
	* doc/invoke.texi: Document -Wcast-align=strict. 

2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>

	* cgraph.h (cgraph_thunk_info): Add comments.
	* cgraph.c (cgraph_node::create_thunk): Adjust comment, make
	assert for VIRTUAL_* arguments stricter.

2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>

	PR tree-optimization/71026
	* match.pd: Move RDIV patterns from fold-const.c
	* fold-const.c (distribute_real_division): Removed.
	(fold_binary_loc): Remove calls to distribute_real_divison.

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

	* doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
	c++1z and gnu++1z as deprecated.  Change other references to
	-std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
	Change -Wc++1z-compat to -Wc++17-compat.
	* doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
	* dwarf2out.c (highest_c_language): Handle C++17.
	(gen_compile_unit_die): Likewise.

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

	PR rtl-optimization/82192
	* combine.c (make_extraction): Don't look through non-paradoxical
	SUBREGs or TRUNCATE if pos + len is or might be bigger than
	inner's mode.

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

	* target.def (function_arg_offset): New hook.
	* targhooks.h (default_function_arg_offset): Declare.
	* targhooks.c (default_function_arg_offset): New function.
	* function.c (locate_and_pad_parm): Use
	targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
	* doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
	(TARGET_FUNCTION_ARG_OFFSET): ...this.
	* doc/tm.texi: Regenerate.
	* config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
	* config/spu/spu.c (spu_function_arg_offset): New function.
	(TARGET_FUNCTION_ARG_OFFSET): Redefine.
	* system.h (FUNCTION_ARG_OFFSET): Poison.

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

	* target.def (truly_noop_truncation): New hook.
	(mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
	than TRULY_NOOP_TRUNCATION.
	* hooks.h (hook_bool_uint_uint_true): Declare.
	* hooks.c (hook_bool_uint_uint_true): New function.
	* doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
	(TARGET_TRULY_NOOP_TRUNCATION): ...this.
	* doc/tm.texi: Regenerate.
	* combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
	rather than TRULY_NOOP_TRUNCATION in comments.
	(simplify_comparison): Likewise.
	(record_truncated_value): Likewise.
	* expmed.c (extract_bit_field_1): Likewise.
	(extract_split_bit_field): Likewise.
	* convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
	instead of TRULY_NOOP_TRUNCATION.
	* function.c (assign_parm_setup_block): Likewise.
	* machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
	* rtlhooks.c: Include target.h.
	* config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/mips/mips.c (mips_truly_noop_truncation): New function.
	(TARGET_TRULY_NOOP_TRUNCATION): Redefine.
	* config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
	rather than TRULY_NOOP_TRUNCATION in comments.
	* config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
	rather than TRULY_NOOP_TRUNCATION in comments.
	* config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
	TRULY_NOOP_TRUNCATION condition.
	(MAYBE_INDEX_REGISTER_RTX_P): Likewise.
	(TRULY_NOOP_TRUNCATION): Delete.
	* config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/spu/spu.c (spu_truly_noop_truncation): New function.
	(TARGET_TRULY_NOOP_TRUNCATION): Redefine.
	* config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
	(TARGET_TRULY_NOOP_TRUNCATION): Redefine.
	* config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
	rather than TRULY_NOOP_TRUNCATION in comments.
	* config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
	* config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
	* system.h (TRULY_NOOP_TRUNCATION): Poison.

2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/67591
	* config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
	(*cmp_ior): Likewise.
	(*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
	(*ior_scc_scc_cmp): Likewise.
	(*and_scc_scc): Likewise.
	(*and_scc_scc_cmp): Likewise.

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

	* target.def (can_change_mode_class): New hook.
	(mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
	(hard_regno_nregs): Likewise.
	* hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
	* hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
	* doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
	(TARGET_CAN_CHANGE_MODE_CLASS): ...this.
	(LOAD_EXTEND_OP): Update accordingly.
	* doc/tm.texi: Regenerate.
	* doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
	CANNOT_CHANGE_MODE_CLASS.
	* hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
	(REG_CAN_CHANGE_MODE_P): ...this new macro.
	* combine.c (simplify_set): Update accordingly.
	* emit-rtl.c (validate_subreg): Likewise.
	* recog.c (general_operand): Likewise.
	* regcprop.c (mode_change_ok): Likewise.
	* reload1.c (choose_reload_regs): Likewise.
	(inherit_piecemeal_p): Likewise.
	* rtlanal.c (simplify_subreg_regno): Likewise.
	* postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
	instead of CANNOT_CHANGE_MODE_CLASS.
	(reload_cse_simplify_operands): Likewise.
	* reload.c (push_reload): Use targetm.can_change_mode_class
	instead of CANNOT_CHANGE_MODE_CLASS.
	(push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
	REG_CANNOT_CHANGE_MODE_P.
	* config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/alpha/alpha.c (alpha_can_change_mode_class): New function.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(arm_can_change_mode_class): New function.
	* config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
	than CANNOT_CHANGE_MODE_CLASS in comments.
	* config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
	* config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
	(ix86_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(ia64_can_change_mode_class): New function.
	* config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
	* config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
	(m32c_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
	* config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
	(mips_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(msp430_can_change_mode_class): New function.
	* config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
	* config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(pa_cannot_change_mode_class): Replace with...
	(pa_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
	than CANNOT_CHANGE_MODE_CLASS in comments.
	* config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
	* config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(pdp11_cannot_change_mode_class): Replace with...
	(pdp11_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	* config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/powerpcspe/powerpcspe-protos.h
	(rs6000_cannot_change_mode_class_ptr): Delete.
	* config/powerpcspe/powerpcspe.c
	(rs6000_cannot_change_mode_class_ptr): Delete.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.can_change_mode_class instead of
	rs6000_cannot_change_mode_class_ptr.
	(rs6000_cannot_change_mode_class): Replace with...
	(rs6000_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(rs6000_debug_cannot_change_mode_class): Replace with...
	(rs6000_debug_can_change_mode_class): ...this new function.
	* config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/riscv/riscv.c (riscv_can_change_mode_class): New function.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
	Delete.
	* config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.can_change_mode_class instead of
	rs6000_cannot_change_mode_class_ptr.
	(rs6000_cannot_change_mode_class): Replace with...
	(rs6000_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(rs6000_debug_cannot_change_mode_class): Replace with...
	(rs6000_debug_can_change_mode_class): ...this new function.
	* config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
	* config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
	(s390_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
	* config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(sh_cannot_change_mode_class): Replace with...
	(sh_can_change_mode_class): ...this new function, inverting the
	sense of the return value.
	* config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(sparc_can_change_mode_class): New function.
	* config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/spu/spu.c (spu_can_change_mode_class): New function.
	(TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	* config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
	* config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
	(visium_can_change_mode_class): New function.
	* system.h (CANNOT_CHANGE_MODE_CLASS): Poison.

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

	PR tree-optimization/82217
	* tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
	but not undefined case.

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

	PR target/82145
	* postreload.c (reload_cse_simplify_operands): Skip
	NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.

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

	PR tree-optimization/68823
	* graphite-scop-detection.c (build_alias_set): If we have a
	possible dependence check whether we can handle them by just
	looking at the DRs DR_ACCESS_FNs.
	(build_scops): If build_alias_set fails, fail the SCOP.

2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
	to support float128 built-in functions that require the ISA 3.0
	hardware.
	(BU_FLOAT128_3_HW): Likewise.
	(SQRTF128): Add support for the IEEE 128-bit square root and fma
	built-in functions.
	(FMAF128): Likewise.
	(FMAQ): Likewise.
	* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
	support for built-in functions that need the ISA 3.0 IEEE 128-bit
	floating point instructions.
	(rs6000_invalid_builtin): Likewise.
	(rs6000_builtin_mask_names): Likewise.
	* config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
	(RS6000_BTM_FLOAT128_HW): Likewise.
	(RS6000_BTM_COMMON): Likewise.
	* config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
	function.
	* doc/extend.texi (RS/6000 built-in functions): Document the
	IEEE 128-bit floating point square root and fused multiply-add
	built-in functions.

2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>

	* config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
	reg (r2) isn't in the set of registers defined in the prologue.

2017-09-14  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 max_vectorization_factor.
	(LOOP_VINFO_MAX_VECT_FACTOR): New macro.
	(LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
	(LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
	* tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
	accordingly.
	* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
	max_vectorization_factor.
	(vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.

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

	* tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
	(vect_worthwhile_without_simd_p): Declare.
	* tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
	(vectorizable_reduction): Use it.
	* tree-vect-stmts.c (vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.

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

	* tree-vectorizer.h (vect_get_num_copies): New function.
	* tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
	* tree-vect-loop.c (vectorizable_reduction): Likewise.
	(vectorizable_induction): Likewise.
	(vectorizable_live_operation): Likewise.
	* tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
	(vectorizable_bswap): Likewise.
	(vectorizable_call): Likewise.
	(vectorizable_conversion): Likewise.
	(vectorizable_assignment): Likewise.
	(vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	(vectorizable_condition): Likewise.
	(vectorizable_comparison): Likewise.
	(vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.

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

	* tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
	of vect_init_vector.

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

	* gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
	an inline wrapper that provides a location.
	(gimple_build_vector): Likewise.
	* gimple-fold.c (gimple_build_vector_from_val): New function.
	(gimple_build_vector): Likewise.
	* tree-vect-loop.c (get_initial_def_for_reduction): Use the new
	functions to build the initial value.  Always return a gimple value.
	(get_initial_defs_for_reduction): Likewise.  Only compute
	neutral_vec once.
	(vect_create_epilog_for_reduction): Don't call force_gimple_operand or
	vect_init_vector on the results from get_initial_def(s)_for_reduction.
	(vectorizable_induction): Use gimple_build_vector rather than
	vect_init_vector.

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

	* target.h (vec_perm_indices): New typedef.
	(auto_vec_perm_indices): Likewise.
	* optabs-query.h: Include target.h
	(can_vec_perm_p): Take a vec_perm_indices *.
	* optabs-query.c (can_vec_perm_p): Likewise.
	(can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
	* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
	* tree-vect-generic.c (lower_vec_perm): Likewise.
	* tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
	(vect_grouped_load_supported): Likewise.
	(vect_shift_permute_load_chain): Likewise.
	(vect_permute_store_chain): Use auto_vec_perm_indices.
	(vect_permute_load_chain): Likewise.
	* fold-const.c (fold_vec_perm): Take vec_perm_indices.
	(fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
	Update uses of can_vec_perm_p.
	* tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
	mode with a number of elements.  Take a vec_perm_indices *.
	(vect_create_epilog_for_reduction): Update accordingly.
	Use auto_vec_perm_indices.
	(have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
	* tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
	(vect_transform_slp_perm_load): Likewise.
	(vect_schedule_slp_instance): Use auto_vec_perm_indices.
	* tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
	(vect_gen_perm_mask_checked): Likewise.
	* tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
	(vect_gen_perm_mask_checked): Likewise.
	(vectorizable_mask_load_store): Use auto_vec_perm_indices.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	(perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
	(vectorizable_bswap): Likewise.

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

	* tree.h (build_vector): Take a vec<tree> instead of a tree *.
	* tree.c (build_vector): Likewise.
	(build_vector_from_ctor): Update accordingly.
	(build_vector_from_val): Likewise.
	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
	* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
	* tree-vect-generic.c (add_rshift): Likewise.
	(expand_vector_divmod): Likewise.
	(optimize_vector_constructor): Likewise.
	* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
	(vect_transform_slp_perm_load): Likewise.
	(vect_schedule_slp_instance): Likewise.
	* tree-vect-stmts.c (vectorizable_bswap): Likewise.
	(vectorizable_call): Likewise.
	(vect_gen_perm_mask_any): Likewise.  Add elements in order.
	* expmed.c (make_tree): Likewise.
	* fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
	a vector passed to build_vector.
	(fold_convert_const): Likewise.
	(exact_inverse): Likewise.
	(fold_ternary_loc): Likewise.
	(fold_relational_const): Likewise.
	(const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
	on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
	(const_unop): Likewise.  Store the reduction accumulator in a
	variable rather than an array.
	(vec_cst_ctor_to_array): Take the number of elements as a parameter.
	(fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
	the new vector, rather than constructing it after the input arrays.
	(native_interpret_vector): Use auto_vec<tree> when building
	a vector passed to build_vector.  Add elements in order.
	* tree-vect-loop.c (get_initial_defs_for_reduction): Use
	auto_vec<tree> when building a vector passed to build_vector.
	(vect_create_epilog_for_reduction): Likewise.
	(vectorizable_induction): Likewise.
	(get_initial_def_for_reduction): Likewise.  Fix indentation of
	case statements.
	* config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
	to a vec<tree> *.
	(sparc_fold_builtin): Use auto_vec<tree> when building a vector
	passed to build_vector.

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

	* tree-core.h (tree_base::u): Add an "nelts" field.
	(tree_vector): Use VECTOR_CST_NELTS as the length.
	* tree.c (tree_size): Likewise.
	(make_vector): Initialize VECTOR_CST_NELTS.
	* tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
	* cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
	TYPE_VECTOR_SUBPARTS.
	* expr.c (const_vector_mask_from_tree): Consistently use "units"
	as the number of units, setting it from VECTOR_CST_NELTS.
	(const_vector_from_tree): Likewise.
	* fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
	TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
	(fold_negate_expr_1): Likewise.
	(fold_convert_const): Likewise.
	(const_binop): Likewise.  Differentiate the number of output and
	input elements.
	(const_unop): Likewise.
	(fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
	in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
	in cases that did the opposite.

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

	* tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
	to VN_TOP.

2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>

	* dwarf2out.c (dwarf2out_source_line): Remove superfluous test.

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

	PR target/81325
	* cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
	if and where to split a bb, except for splitting before debug insn
	sequences followed by non-label real insn.  Delete debug insns
	in between basic blocks.

	* combine.c (make_compound_operation_int): Formatting fixes.

	* config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
	* config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	* config/netbsd.h (LINK_EH_SPEC): Likewise.
	* config/sol2.h (LINK_EH_SPEC): Likewise.
	* config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	* config/s390/linux.h (LINK_SPEC): Likewise.
	* config/freebsd.h (LINK_EH_SPEC): Likewise.
	* config/openbsd.h (LINK_EH_SPEC): Likewise.
	* config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	* config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
	* config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
	* config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	* config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
	* config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.

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

	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
	support.
	(ENDFILE_LINUX_SPEC): Likewise.
	(LINK_EH_SPEC): Likewise.
	* config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
	(LINK_OS_LINUX_SPEC32): Likewise.
	(LINK_OS_LINUX_SPEC64): Likewise.
	* config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
	(LINK_OS_LINUX_SPEC): Likewise.

2017-09-13  Martin Liska  <mliska@suse.cz>

	PR middle-end/82154
	* stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
	CASE_HIGH is NULL_TREE.

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

	* target.def (secondary_memory_needed): New hook.
	(secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
	instead of SECONDARY_MEMORY_NEEDED.
	(secondary_memory_needed_mode): Likewise.
	* hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
	* hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
	* doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
	(TARGET_SECONDARY_MEMORY_NEEDED): ...this.
	(SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
	* doc/tm.texi: Regenerate.
	* config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
	* config/i386/i386.c (inline_secondary_memory_needed): Put the
	mode argument first and change the reg_class arguments to reg_class_t.
	(ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
	Make static.  Update the call to inline_secondary_memory_needed.
	(ix86_register_move_cost): Update the call to
	inline_secondary_memory_needed.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
	definition.
	* config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	* config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
	* config/mips/mips.c (mips_secondary_memory_needed): Make static
	and match hook interface.  Add comment from mips.h.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/mmix/mmix.md (truncdfsf2): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	* config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
	(PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
	* config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(pa_secondary_memory_needed): New function.
	* config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
	* config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(pdp11_secondary_memory_needed): Make static and match hook interface.
	* config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/powerpcspe/powerpcspe-protos.h
	(rs6000_secondary_memory_needed_ptr): Delete.
	* config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
	Delete.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.secondary_memory_needed rather than
	rs6000_secondary_memory_needed_ptr.
	(rs6000_secondary_memory_needed): Match hook interface.
	(rs6000_debug_secondary_memory_needed): Likewise.
	* config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
	(riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
	Delete.
	* config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(rs6000_option_override_internal): Assign to
	targetm.secondary_memory_needed rather than
	rs6000_secondary_memory_needed_ptr.
	(rs6000_secondary_memory_needed): Match hook interface.
	(rs6000_debug_secondary_memory_needed): Likewise.
	* config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/s390/s390.c (s390_secondary_memory_needed): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
	* config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
	(sparc_secondary_memory_needed): New function.
	* lra-constraints.c (check_and_process_move): Refer to
	TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
	in comment.
	(curr_insn_transform): Likewise.
	(process_alt_operands): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(check_secondary_memory_needed_p): Likewise.
	(choose_split_class): Likewise.
	* reload.c: Unconditionally include code that was previously
	conditional on SECONDARY_MEMORY_NEEDED.
	(push_secondary_reload): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(push_reload): Likewise.
	* reload1.c: Unconditionally include code that was previously
	conditional on SECONDARY_MEMORY_NEEDED.
	(choose_reload_regs): Use targetm.secondary_memory_needed
	instead of TARGET_SECONDARY_MEMORY_NEEDED.
	(gen_reload): Likewise.
	* system.h (SECONDARY_MEMORY_NEEDED): Poison.

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

	* target.def (secondary_memory_needed_mode): New hook:
	* targhooks.c (default_secondary_memory_needed_mode): Declare.
	* targhooks.h (default_secondary_memory_needed_mode): New function.
	* doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
	(TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
	* doc/tm.texi: Regenerate.
	* lra-constraints.c (check_and_process_move): Use
	targetm.secondary_memory_needed_mode instead of
	TARGET_SECONDARY_MEMORY_NEEDED_MODE.
	(curr_insn_transform): Likewise.
	* reload.c (get_secondary_mem): Likewise.
	* config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
	* config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
	function.
	(TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
	* config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
	* config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
	* config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
	Delete.
	* config/powerpcspe/powerpcspe-protos.h
	(rs6000_secondary_memory_needed_mode): Delete.
	* config/powerpcspe/powerpcspe.c
	(TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
	(rs6000_secondary_memory_needed_mode): Make static.
	* config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
	Delete.
	* config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
	Redefine.
	(rs6000_secondary_memory_needed_mode): Make static.
	* config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
	* config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
	(TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
	* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
	* config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
	Redefine.
	(sparc_secondary_memory_needed_mode): New function.
	* system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.

2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>

	* config/aarch64/constraints.md (Umq): New constraint.
	* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
	Change to use Umq.
	(mov<mode>): Update condition.

2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
	when bitposition is the same.

2017-09-13  Richard Biener  <rguenther@suse.de>

	* dwarf2out.c (output_die_symbol): Remove.
	(output_die): Do not output a DIEs symbol.

2017-09-13  Richard Biener  <rguenther@suse.de>

	PR middle-end/82128
	* gimple-fold.c (gimple_fold_call): Update SSA name in-place to
	default-def to avoid breaking iterator update with the weird
	interaction with cgraph_update_edges_for_call_stmt_node.

2017-09-13  Richard Biener  <rguenther@suse.de>

	* tree-cfg.c (verify_gimple_assign_binary): Add verification
	for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
	VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
	(verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.

2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
	Disable pc relative literal load irrespective of
	TARGET_FIX_ERR_A53_84341 for default.

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

	* config/sparc/sparc.c (output_return): Output the source location of
	the insn in the delay slot, if any.
	(output_sibcall): Likewise.

2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR driver/81498
	* common.opt (-static-pie): New alias.
	(shared): Negate static-pie.
	(-no-pie): Update help text.
	(-pie): Likewise.
	(static-pie): New option.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
	-static-pie support.
	(GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
	(LINK_EH_SPEC): Likewise.
	(LINK_GCC_C_SEQUENCE_SPEC): Likewise.
	* config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
	* config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
	* gcc.c (LINK_COMMAND_SPEC): Likewise.
	(init_gcc_specs): Likewise.
	(init_spec): Likewise.
	(display_help): Update help message for -pie.
	* doc/invoke.texi: Update -pie, -no-pie and -static.  Document
	-static-pie.

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

	* config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
	(movdi_aarch64): Likewise.
	(movti_aarch64): Likewise.

2017-09-12 Simon Wright <simon@pushface.org>

	PR target/80204
	* config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
	calculation of the minor version, always output as 0.

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

	PR target/82112
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
	ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
	on it early, rather than manual conversion late.  For
	ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
	instead of performing manual conversion.

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

	* config/rs6000/altivec.md (vec_widen_umult_even_v4si,
	vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
	vmulouw, vmulosw.
	* config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
	VMULOSW): Add definitions.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
	ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
	* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
	builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.

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

	* config/aarch64/aarch64.md (movdi_aarch64): Set load/store
	types correctly.
	(movti_aarch64): Likewise.
	(movdf_aarch64): Likewise.
	(movtf_aarch64): Likewise.
	(load_pairdi): Likewise.
	(store_pairdi): Likewise.
	(load_pairdf): Likewise.
	(store_pairdf): Likewise.
	(loadwb_pair<GPI:mode>_<P:mode>): Likewise.
	(storewb_pair<GPI:mode>_<P:mode>): Likewise.
	(ldr_got_small_<mode>): Likewise.
	(ldr_got_small_28k_<mode>): Likewise.
	(ldr_got_tiny): Likewise.
	* config/aarch64/iterators.md (ldst_sz): New.
	(ldpstp_sz): Likewise.
	* config/aarch64/thunderx.md (thunderx_storepair): Split store_8
	to store_16.
	(thunderx_load): Split load_8 to load_16.
	* config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
	load_8 to load_16.
	(thunderx2t99_storepair_basic): Split store_8 to store_16.
	* config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
	(xgene1_store_pair): Split store_8 to store_16.
	* config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
	(falkor_st_0_st_sd): Split store_8 to store_16.

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

	* config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
	and store1/2/3/4 to store_4/8/12/16.
	* config/aarch64/aarch64.md: Update for rename.
	* config/arm/arm.md: Likewise.: Likewise.
	* config/arm/arm.c: Likewise.
	* config/arm/thumb1.md: Likewise.
	* config/arm/thumb2.md: Likewise.
	* config/arm/vfp.md: Likewise.
	* config/arm/arm-generic.md: Likewise.
	* config/arm/arm1020e.md: Likewise.
	* config/arm/arm1026ejs.md: Likewise.
	* config/arm/arm1136jfs.md: Likewise.
	* config/arm/arm926ejs.md: Likewise.
	* config/arm/cortex-a15.md: Likewise.
	* config/arm/cortex-a17.md: Likewise.
	* config/arm/cortex-a5.md: Likewise.
	* config/arm/cortex-a53.md: Likewise.
	* config/arm/cortex-a57.md: Likewise.
	* config/arm/cortex-a7.md: Likewise.
	* config/arm/cortex-a8.md: Likewise.
	* config/arm/cortex-a9.md: Likewise.
	* config/arm/cortex-m4.md: Likewise.
	* config/arm/cortex-m7.md: Likewise.
	* config/arm/cortex-r4.md: Likewise.
	* config/arm/exynos-m1.md: Likewise.
	* config/arm/fa526.md: Likewise.
	* config/arm/fa606te.md: Likewise.
	* config/arm/fa626te.md: Likewise.
	* config/arm/fa726te.md: Likewise.
	* config/arm/fmp626.md: Likewise.
	* config/arm/iwmmxt.md: Likewise.
	* config/arm/ldmstm.md: Likewise.
	* config/arm/marvell-pj4.md: Likewise.
	* config/arm/xgene1.md: Likewise.
	* config/aarch64/thunderx.md: Likewise.
	* config/aarch64/thunderx2t99.md: Likewise.
	* config/aarch64/falkor.md: Likewise.

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

	* attribs.c (private_lookup_attribute): New function.
	* attribs.h (private_lookup_attribute): Declared here.
	(lookup_attribute): Called from this place.

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

	PR tree-optimization/82157
	* tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
	stmts with side-effects.

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

	* target.def (hard_regno_nregs): New hook.
	(class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
	* targhooks.h (default_hard_regno_nregs): Declare.
	* targhooks.c (default_hard_regno_nregs): New function.
	* doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
	(TARGET_HARD_REGNO_NREGS): ...this hook.
	(HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
	(CLASS_MAX_NREGS): Likewise.
	* doc/tm.texi: Regenerate.
	* reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
	instead of HARD_REGNO_NREGS.
	* rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
	HARD_REGNO_NREGS in the comment.
	* config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
	* config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
	* config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
	Return an unsigned int.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
	* config/arc/arc.h (HARD_REGNO_NREGS): Delete.
	* config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(arc_hard_regno_nregs): New function.
	* config/arm/arm.h (HARD_REGNO_NREGS): Delete.
	* config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(arm_hard_regno_nregs): New function.
	* config/avr/avr.h (HARD_REGNO_NREGS): Delete.
	* config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
	* config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
	* config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
	(HARD_REGNO_NREGS): Delete.
	* config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(cr16_hard_regno_nregs): New function.
	(cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
	* config/cris/cris.h (HARD_REGNO_NREGS): Delete.
	* config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(cris_hard_regno_nregs): New function.
	* config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
	* config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
	(CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
	* config/frv/frv.h (HARD_REGNO_NREGS): Delete.
	(CLASS_MAX_NREGS): Remove outdated copy of documentation.
	* config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
	* config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(frv_hard_regno_nregs): Make static.  Take and return an
	unsigned int.
	(frv_class_max_nregs): Remove outdated copy of documentation.
	* config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
	* config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
	* config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
	* config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
	* config/i386/i386.h (HARD_REGNO_NREGS): Delete.
	* config/i386/i386.c (ix86_hard_regno_nregs): New function.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
	(CLASS_MAX_NREGS): Update comment.
	* config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(ia64_hard_regno_nregs): New function.
	* config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
	* config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
	* config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
	* config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
	* config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
	an unsigned int.
	(m32c_hard_regno_nregs): Likewise.  Make static.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
	* config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
	* config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(m68k_hard_regno_nregs): New function.
	* config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
	* config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
	* config/mips/mips.h (HARD_REGNO_NREGS): Delete.
	* config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
	* config/mips/mips.c (mips_hard_regno_nregs): Make static.
	Take and return an unsigned int.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
	(CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
	* config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
	* config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
	* config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
	* config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
	* config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(msp430_hard_regno_nregs): Make static.  Take and return an
	unsigned int.
	* config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
	* config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
	* config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
	(nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
	* config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
	* config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
	* config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
	(PA_HARD_REGNO_NREGS): ...this.
	* config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
	(PA_HARD_REGNO_NREGS): ...this.
	* config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(pa_hard_regno_nregs): New function.
	* config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
	* config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(pdp11_hard_regno_nregs): New function.
	* config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
	* config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(rs6000_hard_regno_nregs_hook): New function.
	* config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
	* config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
	* config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
	Take and return an unsigned int.  Move earlier in file.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
	* config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
	* config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
	(rl78_hard_regno_nregs): Make static.  Take and return an
	unsigned int.
	* config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
	* config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(rs6000_hard_regno_nregs_hook): New function.
	* config/rx/rx.h (HARD_REGNO_NREGS): Delete.
	* config/rx/rx.c (rx_hard_regno_nregs): New function.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/s390/s390.h (HARD_REGNO_NREGS): Delete.
	* config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
	instead of HARD_REGNO_NREGS.
	(s390_hard_regno_nregs): New function.
	(s390_hard_regno_mode_ok): Add comment from s390.h.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/sh/sh.h (HARD_REGNO_NREGS): Delete.
	* config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(sh_hard_regno_nregs): New function.
	(sh_pass_in_reg_p): Use it.
	* config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
	* config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(sparc_hard_regno_nregs): New function.
	* config/spu/spu.h (HARD_REGNO_NREGS): Delete.
	* config/spu/spu.c (spu_hard_regno_nregs): New function.
	(spu_function_arg_advance): Use it, supplying a valid register number.
	(TARGET_HARD_REGNO_NREGS): Redefine.
	* config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
	* config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
	* config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
	* config/v850/v850.h (HARD_REGNO_NREGS): Delete.
	* config/vax/vax.h (HARD_REGNO_NREGS): Delete.
	* config/visium/visium.h (HARD_REGNO_NREGS): Delete.
	(CLASS_MAX_NREGS): Remove copy of old documentation.
	* config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
	(visium_hard_regno_nregs): New function.
	(visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
	* config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
	* config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
	xtensa_hard_regno_nregs): New function.
	* system.h (HARD_REGNO_NREGS): Poison.

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

	* config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
	hard_regno_nregs instead of HARD_REGNO_NREGS.
	(THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
	* config/c6x/c6x.c (c6x_expand_prologue): Likewise.
	(c6x_expand_epilogue): Likewise.
	* config/frv/frv.c (frv_alloc_temp_reg): Likewise.
	(frv_read_iacc_argument): Likewise.
	* config/sh/sh.c: Include regs.h.
	(sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
	(regs_used): Likewise.
	(output_stack_adjust): Likewise.
	* config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
	* expmed.c: Include regs.h.
	(store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
	* ree.c: Include regs.h.
	(combine_reaching_defs): Use hard_regno_nregs instead of
	HARD_REGNO_NREGS.
	(add_removable_extension): Likewise.

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

	* regs.h (hard_regno_nregs): Turn into a function.
	(end_hard_regno): Update accordingly.
	* caller-save.c (setup_save_areas): Likewise.
	(save_call_clobbered_regs): Likewise.
	(replace_reg_with_saved_mem): Likewise.
	(insert_restore): Likewise.
	(insert_save): Likewise.
	* combine.c (can_change_dest_mode): Likewise.
	(move_deaths): Likewise.
	(distribute_notes): Likewise.
	* config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
	(rs6000_split_multireg_move): Likewise.
	(rs6000_register_move_cost): Likewise.
	(rs6000_memory_move_cost): Likewise.
	* config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
	(rs6000_split_multireg_move): Likewise.
	(rs6000_register_move_cost): Likewise.
	(rs6000_memory_move_cost): Likewise.
	* cselib.c (cselib_reset_table): Likewise.
	(cselib_lookup_1): Likewise.
	* emit-rtl.c (set_mode_and_regno): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* ira-color.c (setup_profitable_hard_regs): Likewise.
	(check_hard_reg_p): Likewise.
	(calculate_saved_nregs): Likewise.
	(assign_hard_reg): Likewise.
	(improve_allocation): Likewise.
	(calculate_spill_cost): Likewise.
	* ira-emit.c (modify_move_list): Likewise.
	* ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
	(ira_hard_reg_in_set_p): Likewise.
	* ira.c (setup_reg_mode_hard_regset): Likewise.
	(clarify_prohibited_class_mode_regs): Likewise.
	(check_allocation): Likewise.
	* lra-assigns.c (find_hard_regno_for_1): Likewise.
	(lra_setup_reg_renumber): Likewise.
	(setup_try_hard_regno_pseudos): Likewise.
	(spill_for): Likewise.
	(assign_hard_regno): Likewise.
	(setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
	* lra-constraints.c (in_class_p): Likewise.
	(lra_constraint_offset): Likewise.
	(simplify_operand_subreg): Likewise.
	(lra_constraints): Likewise.
	(split_reg): Likewise.
	(split_if_necessary): Likewise.
	(invariant_p): Likewise.
	(inherit_in_ebb): Likewise.
	* lra-lives.c (process_bb_lives): Likewise.
	* lra-remat.c (reg_overlap_for_remat_p): Likewise.
	(get_hard_regs): Likewise.
	(do_remat): Likewise.
	* lra-spills.c (assign_spill_hard_regs): Likewise.
	* mode-switching.c (create_pre_exit): Likewise.
	* postreload.c (reload_combine_recognize_pattern): Likewise.
	* recog.c (peep2_find_free_register): Likewise.
	* regcprop.c (kill_value_regno): Likewise.
	(set_value_regno): Likewise.
	(copy_value): Likewise.
	(maybe_mode_change): Likewise.
	(find_oldest_value_reg): Likewise.
	(copyprop_hardreg_forward_1): Likewise.
	* regrename.c (check_new_reg_p): Likewise.
	(regrename_do_replace): Likewise.
	* reload.c (push_reload): Likewise.
	(combine_reloads): Likewise.
	(find_dummy_reload): Likewise.
	(operands_match_p): Likewise.
	(find_reloads): Likewise.
	(find_equiv_reg): Likewise.
	(reload_adjust_reg_for_mode): Likewise.
	* reload1.c (count_pseudo): Likewise.
	(count_spilled_pseudo): Likewise.
	(find_reg): Likewise.
	(clear_reload_reg_in_use): Likewise.
	(free_for_value_p): Likewise.
	(allocate_reload_reg): Likewise.
	(choose_reload_regs): Likewise.
	(reload_adjust_reg_for_temp): Likewise.
	(emit_reload_insns): Likewise.
	(delete_output_reload): Likewise.
	* rtlanal.c (subreg_get_info): Likewise.
	* sched-deps.c (sched_analyze_reg): Likewise.
	* sel-sched.c (init_regs_for_mode): Likewise.
	(mark_unavailable_hard_regs): Likewise.
	(choose_best_reg_1): Likewise.
	(verify_target_availability): Likewise.
	* valtrack.c (dead_debug_insert_temp): Likewise.
	* var-tracking.c (track_loc_p): Likewise.
	(emit_note_insn_var_location): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	* reginfo.c (choose_hard_reg_mode): Likewise.
	(init_reg_modes_target): Refer directly to
	this_target_regs->x_hard_regno_nregs.

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

	* ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
	instead of hard_regno_nregs.

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

	* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
	end_hard_regno instead of hard_regno_nregs.
	* config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
	* config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
	* config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
	* ira-color.c (improve_allocation): Likewise.
	* lra-assigns.c (find_hard_regno_for_1): Likewise.
	* lra-lives.c (mark_regno_live): Likewise.
	(mark_regno_dead): Likewise.
	* lra-remat.c (operand_to_remat): Likewise.
	* lra.c (collect_non_operand_hard_regs): Likewise.
	* postreload.c (reload_combine_note_store): Likewise.
	(move2add_valid_value_p): Likewise.
	* reload.c (regno_clobbered_p): Likewise.

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

	* config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
	hard_regno_nregs.
	* config/v850/v850.c (v850_reorg): Likewise.
	* reload.c (refers_to_regno_for_reload_p): Likewise.
	(find_equiv_reg): Likewise.
	* reload1.c (reload_reg_reaches_end_p): Likewise.

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

	* caller-save.c (add_used_regs): Use REG_NREGS instead of
	hard_regno_nregs.
	* config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
	* config/arm/arm.c (output_move_neon): Likewise.
	(arm_attr_length_move_neon): Likewise.
	(neon_split_vcombine): Likewise.
	* config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
	(c6x_mark_reg_written): Likewise.
	(c6x_dwarf_register_span): Likewise.
	* config/i386/i386.c (ix86_save_reg): Likewise.
	* config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
	(rws_access_reg): Likewise.
	* config/s390/s390.c (s390_call_saved_register_used): Likewise.
	* mode-switching.c (create_pre_exit): Likewise.
	* ree.c (combine_reaching_defs): Likewise.
	(add_removable_extension): Likewise.
	* regcprop.c (find_oldest_value_reg): Likewise.
	(copyprop_hardreg_forward_1): Likewise.
	* reload.c (reload_inner_reg_of_subreg): Likewise.
	(push_reload): Likewise.
	(combine_reloads): Likewise.
	(find_dummy_reload): Likewise.
	(reload_adjust_reg_for_mode): Likewise.
	* reload1.c (find_reload_regs): Likewise.
	(forget_old_reloads_1): Likewise.
	(reload_reg_free_for_value_p): Likewise.
	(reload_adjust_reg_for_temp): Likewise.
	(emit_reload_insns): Likewise.
	(delete_output_reload): Likewise.
	* sel-sched.c (choose_best_reg_1): Likewise.
	(choose_best_pseudo_reg): Likewise.

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

	* defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
	* target.def (slow_unaligned_access): New hook.
	* targhooks.h (default_slow_unaligned_access): Declare.
	* targhooks.c (default_slow_unaligned_access): New function.
	* doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
	(TARGET_SLOW_UNALIGNED_ACCESS): ...this.
	* doc/tm.texi: Regenerate.
	* config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
	* config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
	* config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
	definition.
	* config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
	* config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
	Redefine.
	(rs6000_slow_unaligned_access): New function.
	(rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
	(expand_block_compare): Likewise.
	(expand_strn_compare): Likewise.
	(rs6000_rtx_costs): Likewise.
	* config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
	(riscv_slow_unaligned_access): Likewise.
	* config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
	(riscv_slow_unaligned_access_p): ...this and make static.
	(riscv_option_override): Update accordingly.
	(riscv_slow_unaligned_access): New function.
	(TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
	* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
	* config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
	(rs6000_slow_unaligned_access): New function.
	(rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
	(rs6000_rtx_costs): Likewise.
	* config/rs6000/rs6000-string.c (expand_block_compare)
	(expand_strn_compare): Use targetm.slow_unaligned_access instead
	of SLOW_UNALIGNED_ACCESS.
	* config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
	* config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
	* calls.c (expand_call): Use targetm.slow_unaligned_access instead
	of SLOW_UNALIGNED_ACCESS.
	* expmed.c (simple_mem_bitfield_p): Likewise.
	* expr.c (alignment_for_piecewise_move): Likewise.
	(emit_group_load_1): Likewise.
	(emit_group_store): Likewise.
	(copy_blkmode_from_reg): Likewise.
	(emit_push_insn): Likewise.
	(expand_assignment): Likewise.
	(store_field): Likewise.
	(expand_expr_real_1): Likewise.
	* gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
	* lra-constraints.c (simplify_operand_subreg): Likewise.
	* stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
	* gimple-ssa-store-merging.c: Likewise in block comment at start
	of file.
	* tree-ssa-strlen.c: Include target.h.
	(handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
	of SLOW_UNALIGNED_ACCESS.
	* system.h (SLOW_UNALIGNED_ACCESS): Poison.

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

	PR rtl-optimization/82185
	* expmed.c (emit_store_flag_int): Only test tem if it has been
	initialized.

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

	PR middle-end/82149
	* match.pd ((FTYPE) N CMP CST): Fix typo.

2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>

	* config/mips/mips.c (mips_attribute_table): Add 'short_call'
	attribute.
	(mips_near_type_p): Add 'short_call' attribute as a synonym
	for 'near'.
	* doc/extend.texi (short_call): Document new function attribute.

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

	PR target/82112
	* c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
	assertion check that in the condition.
	(get_atomic_generic_size): Likewise.  Before testing if parameter
	has pointer type, if it has array type, call for C++
	default_conversion to perform array-to-pointer conversion.

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

	* tree-vect-generic.c (expand_vector_operations_1): Do nothing
	for operations we cannot scalarize.

2017-09-12  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
	vectors heap vectors.  Clean up comments.
	Make visited_bbs a reference.
	(profitable_jump_thread_path): Make GC
	vectors heap vectors.  Clean up comments.
	Misc cleanups.
	(convert_and_register_jump_thread_path): Make GC vectors heap
	vectors.
	(check_subpath_and_update_thread_path): Same.  Clean up comments.
	Make visited_bbs a reference.
	(handle_phi): Abstract common code to to
	register_jump_thread_path_if_profitable.
	Rename VAR_BB to DEF_BB.
	Update comments.
	Make GC vectors heap vectors.
	Make visited_bbs a reference.
	(handle_assignment): Same.
	(register_jump_thread_path_if_profitable): New.
	(fsm_find_control_statement_thread_paths): Rename VAR_BB to
	DEF_BB.
	Make GC	vectors heap vectors.  Clean up comments.
	Make visited_bbs a reference.
	(find_jump_threads_backwards): Make visited_bbs live in the stack.
	* tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
	comment.

2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>

	PR target/82181
	* config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
	words of E_DImode object are reachable by xtensa_uimm8x4 access.

2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>

	Revert r251800 and r251799.

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

	PR hsa/82119
	* hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
	arguments in advance.
	* hsa-regalloc.c (naive_process_phi): New parameter predecessors,
	use it to find predecessor edges.
	(naive_outof_ssa): Collect vector of predecessors.

2017-09-08  Jason Merrill  <jason@redhat.com>

	PR c++/70029 - ICE with ref-qualifier and -flto
	* langhooks.h (struct lang_hooks_for_types): Add
	copy_lang_qualifiers.
	* attribs.c (build_type_attribute_qual_variant): Use it.
	* langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
	NULL.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	* tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.

2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/81988
	* config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
	(*mulsi3_sp64): New instruction.
	(mulsi3): New expander.

2017-09-08  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.

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

	* sancov.c: Include memmodel.h.

2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>

	PR target/80897
	* config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
	large offsets.

2017-09-07  Carl Love  <cel@us.ibm.com>

	* config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
	the sldi instruction.

2017-09-07  David Edelsohn  <dje.gcc@gmail.com>

	* sancov.c: Include tm_p.h.

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

	PR target/81979
	* output.h (switch_to_other_text_partition): New declaration.
	* varasm.c (switch_to_other_text_partition): New function.
	* config/rs6000/rs6000.c (uses_TOC): Return 2 if
	NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
	(rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
	to the other text partition before emitting LCL label and switch back
	after emitting the word after it.

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

	* passes.def (pass_split_crit_edges): Remove instance before PRE.
	* tree-ssa-pre.c (pass_pre::execute): Instead manually split
	critical edges here, after loop init.
	(pass_data_pre): Remove PROP_no_crit_edges flags.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
	for valueization of call args to avoid leaking VN_TOP.
	(visit_use): Assert we do not visit default defs.
	(init_scc_vn): Use build_decl for VN_TOP to make name nicer.
	Use error_mark_node to more easily detect leaking VN_TOP.
	All default-defs are varying, not VN_TOP.  Mark them visited.
	(run_scc_vn): Make code match comment.

2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
	OPTION_MASK_FLOAT128_KEYWORD.
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
	support for the -mfloat128-type option, and make -mfloat128
	default on PowerPC Linux systems.  Define or undefine
	__FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
	Define __float128 to be __ieee128 if IEEE 128-bit support is
	enabled, or undefine it.
	(rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
	Delete defining __FLOAT128_TYPE__.
	* config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
	-mfloat128-type option and make -mfloat128 default on PowerPC
	Linux systems.
	(TARGET_FLOAT128_TYPE): Likewise.
	(-mfloat128-type): Likewise.
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Delete the -mfloat128-type option and make -mfloat128 default on
	PowerPC Linux systems.  Always use __ieee128 to be the keyword for
	the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
	128-bit floating point is enabled.  Change tests from using
	-mfloat128-type to -mfloat128.
	(rs6000_mangle_type): Use the correct mangling for the __float128
	type even if normal long double is restricted to 64-bits.
	(floatn_mode): Enable the _Float128 type by default on VSX Linux
	systems.
	* config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
	(MASK_FLOAT128_KEYWORD): Define new shortcut macro.
	(RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
	-mfloat128-type.
	* doc/invoke.texi (RS/6000 and PowerPC Options): Update
	documentation for -mfloat128.

2017-09-06  Olivier Hainque  <hainque@adacore.com>

	* config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.

2017-09-06  Wish Wu  <wishwu007@gmail.com>
	    Jakub Jelinek  <jakub@redhat.com>

	* asan.c (initialize_sanitizer_builtins): Add
	BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
	BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
	BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
	BT_FN_VOID_UINT64_PTR variables.
	* builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
	(BT_FN_VOID_UINT16_UINT16): Likewise.
	(BT_FN_VOID_UINT32_UINT32): Likewise.
	(BT_FN_VOID_FLOAT_FLOAT): Likewise.
	(BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
	(BT_FN_VOID_UINT64_PTR): Likewise.
	* common.opt (flag_sanitize_coverage): New variable.
	(fsanitize-coverage=trace-pc): Remove.
	(fsanitize-coverage=): Add.
	* flag-types.h (enum sanitize_coverage_code): New enum.
	* fold-const.c (fold_range_test): Disable non-short-circuit
	optimization if flag_sanitize_coverage.
	(fold_truth_andor): Likewise.
	* tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
	* opts.c (COVERAGE_SANITIZER_OPT): Define.
	(coverage_sanitizer_opts): New array.
	(get_closest_sanitizer_option): Add OPTS argument, handle also
	OPT_fsanitize_coverage_.
	(parse_sanitizer_options): Adjusted to also handle
	OPT_fsanitize_coverage_.
	(common_handle_option): Add OPT_fsanitize_coverage_.
	* sancov.c (instrument_comparison, instrument_switch): New function.
	(sancov_pass): Add trace-cmp support.
	* sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
	BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
	BUILT_IN_SANITIZER_COV_TRACE_CMP8,
	BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
	BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
	BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
	BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
	BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
	BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
	* doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.

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

	* config/arm/parsecpu.awk (fatal): Note that we've encountered an
	error.  Only quit immediately if parsing is complete.
	(BEGIN): Initialize fatal_err and parse_done.
	(begin fpu, end fpu): Check number of arguments.
	(begin arch, end arch): Likewise.
	(begin cpu, end cpu): Likewise.
	(cname, tune for, tune flags, architecture, fpu, option): Likewise.
	(optalias): Likewise.

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

	* config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
	* config/arm/arm-isa.h: Delete.  Move definitions to ...
	* arm-cpus.in: ... here.  Use new feature and fgroup values.
	* config/arm/arm.c (arm_option_override): Use lower case for feature
	bit names.
	* config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
	(TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
	* config/arm/parsecpu.awk (END): Add new command 'isa'.
	(isa_pfx): Delete.
	(print_isa_bits_for): New function.
	(gen_isa): New function.
	(gen_comm_data): Use print_isa_bits_for.
	(define feature): New keyword.
	(define fgroup): New keyword.
	* config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
	(arm-isa.h): Add rule to generate file.
	* common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
	case for feature bit names.

2017-09-06  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (NECESSARY): Remove.
	(create_expression_by_pieces): Do not touch pass-local flags.
	(insert_into_preds_of_block): Likewise.
	(do_pre_regular_insertion): Likewise.
	(eliminate_insert): Likewise.
	(eliminate_dom_walker::before_dom_children): Likewise.
	(fini_eliminate): Do not look at inserted_exprs.
	(mark_operand_necessary): Remove.
	(remove_dead_inserted_code): Replace with simple work-list
	algorithm based on inserted_exprs and SSA uses.
	(pass_pre::execute): Re-order fini_eliminate and
	remove_dead_inserted_code.

2017-09-06  Olivier Hainque  <hainque@adacore.com>

	* config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
	for VxWorks 7.  Adjust surrounding comments.

2017-09-06  Richard Biener  <rguenther@suse.de>

	* gimple-ssa-strength-reduction.c
	(find_candidates_dom_walker::before_dom_children): Also allow
	pointer types.

2017-09-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/82108
	* tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
	for gap in the non-permutation SLP case.

2017-09-06  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/82078
	* tree-sra.c (sort_and_splice_var_accesses): Move call to
	add_access_to_work_queue...
	(build_accesses_from_assign): ...here.
	(propagate_all_subaccesses): Make sure racc is the group
	representative, if there is one.

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

	PR middle-end/82095
	* varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
	NULL DECL_INITIAL.

2017-09-06  Richard Biener  <rguenther@suse.de>

	* gimple-ssa-strength-reduction.c
	(find_candidates_dom_walker::before_doom_children): Use a
	type and not a mode check.

2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR target/77308
	* config/arm/predicates.md (arm_general_adddi_operand): Create new
	non-vfp predicate.
	* config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.

2017-09-05  Jeff Law  <law@redhat.com>

	PR tree-optimization/64910
	* tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
	cases where we have 3 or more operands.

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

	PR middle-end/81768
	* omp-low.c (lower_omp_for): Recompute tree invariant if
	gimple_omp_for_initial/final is ADDR_EXPR.

	PR middle-end/81768
	* omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
	into gimple val before gimplification fo the COND_EXPR.

2017-09-05  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
	REGION_COPY argument.
	(thread_through_all_blocks): Remove unused argument to
	duplicate_thread_path.

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

	* config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
	Take a scalar_mode rather than a machine_mode.
	(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
	* config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
	(aarch64_operands_adjust_ok_for_ldpstp): Likewise.
	(aarch64_gen_adjusted_ldpstp): Likewise.
	(aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.

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

	* config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
	Take a scalar_int_mode instead of a machine_mode.
	(aarch64_mask_and_shift_for_ubfiz_p): Likewise.
	(aarch64_output_scalar_simd_mov_immediate): Likewise.
	(aarch64_simd_scalar_immediate_valid_for_move): Likewise.
	(aarch64_simd_attr_length_rglist): Delete.
	* config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
	a scalar_int_mode instead of a machine_mode.
	(aarch64_add_offset): Likewise.
	(aarch64_internal_mov_immediate): Likewise
	(aarch64_add_constant_internal): Likewise.
	(aarch64_add_constant): Likewise.
	(aarch64_movw_imm): Likewise.
	(aarch64_rtx_arith_op_extract_p): Likewise.
	(aarch64_mask_and_shift_for_ubfiz_p): Likewise.
	(aarch64_simd_scalar_immediate_valid_for_move): Likewise.
	Remove assert that the mode isn't a vector.
	(aarch64_output_scalar_simd_mov_immediate): Likewise.
	(aarch64_expand_mov_immediate): Update calls after above changes.
	(aarch64_output_casesi): Use as_a <scalar_int_mode>.
	(aarch64_and_bitmask_imm): Check for scalar integer modes.
	(aarch64_move_imm): Likewise.
	(aarch64_can_const_movi_rtx_p): Likewise.
	(aarch64_strip_extend): Likewise.
	(aarch64_extr_rtx_p): Likewise.
	(aarch64_rtx_costs): Likewise, using wode_mode as the mode of
	a CONST_INT when the mode parameter is VOIDmode.
	(aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.

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

	* machmode.h (bitwise_mode_for_mode): Return opt_mode.
	* stor-layout.c (bitwise_mode_for_mode): Likewise.
	(bitwise_type_for_mode): Update accordingly.

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

	* stor-layout.h (mode_for_size_tree): Return an opt_mode.
	* stor-layout.c (mode_for_size_tree): Likewise.
	(mode_for_array): Update accordingly.
	(layout_decl): Likewise.
	(compute_record_mode): Likewise.  Only set the mode once.

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

	* target.def (get_mask_mode): Change return type to opt_mode.
	Expand commentary.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_get_mask_mode): Return an opt_mode.
	* targhooks.c (default_get_mask_mode): Likewise.
	* config/i386/i386.c (ix86_get_mask_mode): Likewise.
	* optabs-query.c (can_vec_mask_load_store_p): Update use of
	targetm.get_mask_mode.
	* tree.c (build_truth_vector_type): Likewise.

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

	* machmode.h (mode_for_vector): Return an opt_mode.
	* stor-layout.c (mode_for_vector): Likewise.
	(mode_for_int_vector): Update accordingly.
	(layout_type): Likewise.
	* config/i386/i386.c (emit_memmov): Likewise.
	(ix86_expand_set_or_movmem): Likewise.
	(ix86_expand_vector_init): Likewise.
	(ix86_get_mask_mode): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
	* expmed.c (extract_bit_field_1): Likewise.
	* expr.c (expand_expr_real_2): Likewise.
	* optabs-query.c (can_vec_perm_p): Likewise.
	(can_vec_mask_load_store_p): Likewise.
	* optabs.c (expand_vec_perm): Likewise.
	* targhooks.c (default_get_mask_mode): Likewise.
	* tree-vect-stmts.c (vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	(get_vectype_for_scalar_type_and_size): Likewise.

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

	* machmode.h (mode_for_int_vector): New function.
	* stor-layout.c (mode_for_int_vector): Likewise.
	* config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
	* config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
	* config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
	* config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
	(s390_expand_vcond): Likewise.

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

	* machmode.h (opt_machine_mode): New type.
	(opt_mode<T>): Allow construction from anything that can be
	converted to a T.
	(is_a, as_a, dyn_cast): Add overloads for opt_mode.
	(mode_for_size): Return an opt_machine_mode.
	* stor-layout.c (mode_for_size): Likewise.
	(mode_for_size_tree): Update call accordingly.
	(bitwise_mode_for_mode): Likewise.
	(make_fract_type): Likewise.
	(make_accum_type): Likewise.
	* caller-save.c (replace_reg_with_saved_mem): Update call
	accordingly.
	* config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
	* config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
	* config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
	* config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
	* expmed.c (extract_bit_field_1): Likewise.
	* reload.c (get_secondary_mem): Likewise.
	* varasm.c (assemble_integer): Likewise.
	* lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
	early-out.

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

	* machmode.h (decimal_float_mode_for_size): New function.
	* real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
	(REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
	(REAL_VALUE_TO_TARGET_SINGLE): Likewise.
	(REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
	(REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
	(REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.

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

	* builtins.c (expand_builtin_powi): Use int_mode_for_size.
	(get_builtin_sync_mode): Likewise.
	(expand_ifn_atomic_compare_exchange): Likewise.
	(expand_builtin_atomic_clear): Likewise.
	(expand_builtin_atomic_test_and_set): Likewise.
	(fold_builtin_atomic_always_lock_free): Likewise.
	* calls.c (compute_argument_addresses): Likewise.
	(emit_library_call_value_1): Likewise.
	(store_one_arg): Likewise.
	* combine.c (combine_instructions): Likewise.
	* config/aarch64/aarch64.c (aarch64_function_value): Likewise.
	* config/arm/arm.c (arm_function_value): Likewise.
	(aapcs_allocate_return_reg): Likewise.
	* config/c6x/c6x.c (c6x_expand_movmem): Likewise.
	* config/i386/i386.c (construct_container): Likewise.
	(ix86_gimplify_va_arg): Likewise.
	(ix86_expand_sse_cmp): Likewise.
	(emit_memmov): Likewise.
	(emit_memset): Likewise.
	(expand_small_movmem_or_setmem): Likewise.
	(ix86_expand_pextr): Likewise.
	(ix86_expand_pinsr): Likewise.
	* config/lm32/lm32.c (lm32_block_move_inline): Likewise.
	* config/microblaze/microblaze.c (microblaze_block_move_straight):
	Likewise.
	* config/mips/mips.c (mips_function_value_1) Likewise.
	(mips_block_move_straight): Likewise.
	(mips_expand_ins_as_unaligned_store): Likewise.
	* config/powerpcspe/powerpcspe.c
	(rs6000_darwin64_record_arg_advance_flush): Likewise.
	(rs6000_darwin64_record_arg_flush): Likewise.
	* config/rs6000/rs6000.c
	(rs6000_darwin64_record_arg_advance_flush): Likewise.
	(rs6000_darwin64_record_arg_flush): Likewise.
	* config/sparc/sparc.c (sparc_function_arg_1): Likewise.
	(sparc_function_value_1): Likewise.
	* config/spu/spu.c (adjust_operand): Likewise.
	(spu_emit_branch_or_set): Likewise.
	(arith_immediate_p): Likewise.
	* emit-rtl.c (gen_lowpart_common): Likewise.
	* expr.c (expand_expr_real_1): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
	* reload1.c (alter_reg): Likewise.
	* stor-layout.c (mode_for_vector): Likewise.
	(layout_type): Likewise.

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

	* config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
	(spu_convert_move): Likewise.
	* lower-subreg.c (resolve_simple_move): Likewise.

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

	PR target/81833
	* config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
	define_insn to a define_expand.
	(altivec_vsum2sws_direct): New define_insn.
	(altivec_vsumsws): Convert from a define_insn to a define_expand.

2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/arm/arm.c (arm_option_params_internal): Improve setting of
	max_insns_skipped.

2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/59501
	PR target/81624
	PR target/81769
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
	realign stack if stack alignment needed is less than incoming
	stack boundary.

2017-09-05  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/82072
	* convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
	check earlier.

2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>

	* explow.c (get_dynamic_stack_size): Improve dynamic alignment.

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

	PR tree-optimization/82084
	* fold-const.c (can_native_encode_string_p): Handle wide characters.

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

	PR tree-optimization/82102
	* tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.

2017-09-05  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/82032
	* tree-cfg.c (generate_range_test): New function.
	* tree-cfg.h (generate_range_test): Declared here.
	* tree-cfgcleanup.c (convert_single_case_switch): New function.
	(cleanup_control_expr_graph): Use it.
	* tree-switch-conversion.c (try_switch_expansion): Remove
	assert.
	(emit_case_nodes): Use generate_range_test.

2017-09-04  Uros Bizjak  <ubizjak@gmail.com>

	PR target/82098
	* config/i386/i386.md (*<btsc><mode>_mask): Add
	TARGET_USE_BT to insn constraint.
	(*btr<mode>_mask): Ditto.

2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/arm/arm.c (arm_legitimate_index_p): Add comment.
	(thumb2_legitimate_index_p): Use correct range for DI/DF mode.

2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR target/77308
	* config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
	TARGET_NEON and TARGET_IWMMXT.
	(anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
	TARGET_NEON and TARGET_IWMMXT.
	(*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.

2017-09-04  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
	(ix86_rewrite_tls_address): Ditto.
	* config/i386/i386.c (ix86_tls_address_pattern_p) New function.
	(ix86_rewrite_tls_address_1): Ditto.
	(ix86_rewrite_tls_address): Ditto.
	* config/i386/predicates.md (tls_address_pattern): New predicate.
	* config/i386/i386.md (TLS address splitter): New splitter.

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

	PR tree-optimization/82084
	* fold-const.h (can_native_encode_string_p): Declare.
	* fold-const.c (can_native_encode_string_p): Factor out from ...
	(native_encode_string): ... here.
	* tree-vect-stmts.c (vectorizable_store): Call it to avoid
	vectorizing stores from constants we later cannot handle.

2017-09-04  Marek Polacek  <polacek@redhat.com>

	PR c/81783
	* doc/invoke.texi: Update -Wtautological-compare documentation.

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

	PR tree-optimization/64910
	* tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
	swap the first and last operand if the last is a constant.

2017-09-04  Marek Polacek  <polacek@redhat.com>

	PR sanitizer/82072
	* convert.c (do_narrow): When sanitizing signed integer overflows,
	bail out for signed types.
	(convert_to_integer_1) <case NEGATE_EXPR>: Likewise.

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

	PR tree-optimization/82060
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Move devirtualization after stmt folding and before EH/AB/noreturn
	cleanup to get the stmt refs canonicalized.  Use a bool instead
	of gimple_modified_p since that doesn't work for NOPs.  Schedule
	NOPs generated by folding for removal.

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

	* coretypes.h (pad_direction): New enum.
	* defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
	(FUNCTION_ARG_PADDING): Likewise.
	* target.def (function_arg_padding): New hook.
	* targhooks.h (default_function_arg_padding): Declare.
	* targhooks.c (default_function_arg_padding): New function.
	* doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
	(TARGET_FUNCTION_ARG_PADDING): ...this.
	* doc/tm.texi: Regenerate.
	* calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
	instead of direction.
	(compute_argument_addresses): Likewise.
	(load_register_parameters): Likewise.
	(emit_library_call_value_1): Likewise.
	(store_one_arg): Use targetm.calls.function_arg_padding instead
	of FUNCTION_ARG_PADDING.
	(must_pass_in_stack_var_size_or_pad): Likewise.
	* expr.c (emit_group_load_1): Use pad_direction instead of direction.
	(emit_group_store): Likewise.
	(emit_single_push_insn_1): Use targetm.calls.function_arg_padding
	instead of FUNCTION_ARG_PADDING.
	(emit_push_insn): Likewise, and propagate enum change throughout
	function.
	* function.h (direction): Delete.
	(locate_and_pad_arg_data::where_pad): Use pad_direction instead
	of direction.
	* function.c (assign_parm_find_stack_rtl): Likewise.
	(assign_parm_setup_block_p): Likewise.
	(assign_parm_setup_block): Likewise.
	(gimplify_parameters): Likewise.
	(locate_and_pad_parm): Use targetm.calls.function_arg_padding
	instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
	function.
	* config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
	(BLOCK_REG_PADDING): Use pad_direction instead of direction.
	* config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
	* config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
	(aarch64_function_arg_padding): ...this new function.
	(aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
	(TARGET_FUNCTION_ARG_PADDING): Redefine.
	* config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
	(BLOCK_REG_PADDING): Use pad_direction instead of direction.
	* config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
	* config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(arm_pad_arg_upward): Replace with...
	(arm_function_arg_padding): ...this new function.
	* config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
	of direction.
	* config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
	* config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
	* config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(ia64_hpux_function_arg_padding): Replace with...
	(ia64_function_arg_padding): ...this new function.  Use pad_direction
	instead of direction.  Check for TARGET_HPUX.
	* config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
	* config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(iq2000_function_arg_padding): New function.
	* config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
	* config/mips/mips.c (mips_pad_arg_upward): Replace with...
	(mips_function_arg_padding): ...this new function.
	(mips_pad_reg_upward): Update accordingly.
	(TARGET_FUNCTION_ARG_PADDING): Redefine.
	* config/mips/mips.h (PAD_VARARGS_DOWN): Use
	targetm.calls.function_arg_padding.
	(FUNCTION_ARG_PADDING): Delete.
	(BLOCK_REG_PADDING): Use pad_direction instead of direction.
	* config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
	(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
	* config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
	(nios2_block_reg_padding): Return pad_direction instead of direction.
	* config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
	instead of direction.
	(nios2_function_arg_padding): Likewise.  Make static.
	(TARGET_FUNCTION_ARG_PADDING): Redefine.
	* config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
	(BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
	* config/pa/pa-protos.h (pa_function_arg_padding): Delete.
	* config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(pa_function_arg_padding): Make static.  Return pad_direction instead
	of direction.
	* config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
	(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
	* config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
	instead of direction.  Use targetm.calls.function_arg_padding.
	* config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
	* config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
	* config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
	* config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
	* config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
	Redefine.
	(function_arg_padding): Rename to...
	(rs6000_function_arg_padding): ...this.  Make static.  Return
	pad_direction instead of direction.
	(rs6000_return_in_msb): Use rs6000_function_arg_padding.
	* config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
	(PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
	* config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
	instead of direction.  Use targetm.calls.function_arg_padding.
	* config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
	* config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
	* config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
	* config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
	* config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(function_arg_padding): Rename to...
	(rs6000_function_arg_padding): ...this.  Make static.  Return
	pad_direction instead of direction.
	(rs6000_return_in_msb): Use rs6000_function_arg_padding.
	* config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
	* config/s390/s390.c (s390_function_arg_padding): New function.
	(TARGET_FUNCTION_ARG_PADDING): Redefine.
	* config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
	* config/sparc/sparc-protos.h (function_arg_padding): Delete.
	* config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
	(function_arg_padding): Rename to...
	(sparc_function_arg_padding): ...this.  Make static.  Return
	pad_direction instead of direction.
	* config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
	* config/spu/spu.c (spu_function_arg_padding): New function.
	(TARGET_FUNCTION_ARG_PADDING): Redefine.
	* system.h (FUNCTION_ARG_PADDING): Poison.

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

	* target.def (modes_tieable_p): New hook.
	* doc/tm.texi (MODES_TIEABLE_P): Replace with...
	(TARGET_MODES_TIEABLE_P): ...this.
	* doc/tm.texi.in: Regenerate.
	* hooks.h (hook_bool_mode_mode_true): Declare.
	* hooks.c (hook_bool_mode_mode_true): New function.
	* combine.c (subst): Use targetm.modes_tieable_p instead of
	MODES_TIEABLE_P.
	* dse.c (find_shift_sequence): Likewise.
	* expmed.c (extract_low_bits): Likewise.
	* lower-subreg.c: Include target.h.
	(find_decomposable_subregs): Use targetm.modes_tieable_p instead of
	MODES_TIEABLE_P.
	* rtlanal.c (rtx_cost): Likewise.
	* config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
	* config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
	* config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
	* config/alpha/alpha.c (alpha_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/arc/arc.h (MODES_TIEABLE_P): Delete.
	* config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
	(arc_modes_tieable_p): New function.
	* config/arm/arm.h (MODES_TIEABLE_P): Delete.
	* config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
	* config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
	(arm_modes_tieable_p): Make static.
	* config/avr/avr.h (MODES_TIEABLE_P): Delete.
	* config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
	* config/bfin/bfin.c (bfin_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
	* config/c6x/c6x.c (c6x_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
	* config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
	(cr16_modes_tieable_p): New function.
	* config/cris/cris.h (MODES_TIEABLE_P): Delete.
	* config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
	* config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
	(TRULY_NOOP_TRUNCATION): Update comment.
	* config/frv/frv.h (MODES_TIEABLE_P): Delete.
	(TRULY_NOOP_TRUNCATION): Update comment.
	* config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
	(frv_modes_tieable_p): New function.
	* config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
	* config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
	* config/h8300/h8300.c (h8300_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/i386/i386.h (MODES_TIEABLE_P): Delete.
	* config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
	* config/i386/i386.c (ix86_modes_tieable_p): Make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
	* config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
	(ia64_modes_tieable_p): New function.
	* config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
	* config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
	(iq2000_modes_tieable_p): New function.
	* config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
	* config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
	(lm32_modes_tieable_p): New function.
	* config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
	* config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
	* config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
	* config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
	(m32r_modes_tieable_p): New function.
	* config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
	* config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
	(m68k_modes_tieable_p): New function.
	* config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
	* config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
	(mcore_modes_tieable_p): New function.
	* config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
	* config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
	function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/mips/mips.h (MODES_TIEABLE_P): Delete.
	* config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
	* config/mips/mips.c (mips_modes_tieable_p): Make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
	* config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
	* config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
	* config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
	(mn10300_modes_tieable_p): ...this and make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
	* config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
	* config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
	* config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
	(msp430_modes_tieable_p): Make static.
	* config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
	* config/nds32/nds32.c (nds32_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
	* config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
	* config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/pa/pa.h (MODES_TIEABLE_P): Delete.
	* config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
	* config/pa/pa.c (pa_modes_tieable_p): Make static.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
	* config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
	(pdp11_modes_tieable_p): New function.
	* config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
	* config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
	(rs6000_modes_tieable_p): New function.
	(rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
	* config/powerpcspe/powerpcspe.md: Update comment.
	* config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
	* config/riscv/riscv.c (riscv_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
	* config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
	(rl78_modes_tieable_p): New function.
	* config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
	* config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
	(rs6000_modes_tieable_p): New function.
	(rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
	* config/rs6000/rs6000.md: Update comment.
	* config/rx/rx.h (MODES_TIEABLE_P): Delete.
	* config/rx/rx.c (rx_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/s390/s390.h (MODES_TIEABLE_P): Delete.
	* config/s390/s390.c (s390_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/sh/sh.h (MODES_TIEABLE_P): Delete.
	* config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
	(sh_modes_tieable_p): New function.
	* config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
	* config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
	* config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
	(sparc_modes_tieable_p): Make static.
	* config/spu/spu.h (MODES_TIEABLE_P): Delete.
	* config/spu/spu.c (spu_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
	* config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
	* config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
	* config/v850/v850.h (MODES_TIEABLE_P): Delete.
	* config/v850/v850.c (v850_modes_tieable_p): New function.
	(TARGET_MODES_TIEABLE_P): Redefine.
	* config/vax/vax.h (MODES_TIEABLE_P): Delete.
	* config/visium/visium.h (MODES_TIEABLE_P): Delete.
	* config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
	(visium_modes_tieable_p): New function.
	* config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
	* config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
	(xtensa_modes_tieable_p): New function.
	* system.h (MODES_TIEABLE_P): Poison.

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

	* target.def (hard_regno_mode_ok): New hook.
	* doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
	(TARGET_HARD_REGNO_MODE_OK): ...this.
	* doc/tm.texi.in: Regenerate.
	* hooks.h (hook_bool_uint_mode_true): Declare.
	* hooks.c (hook_bool_uint_mode_true): New function.
	* doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* genpreds.c (write_insn_preds_c): Add an include of target.h.
	* alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
	instead of HARD_REGNO_MODE_OK.
	* caller-save.c: Include target.h.
	(reg_save_code): Use targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* combine.c (can_combine_p): Likewise.
	(combinable_i3pat): Likewise.
	(can_change_dest_mode): Likewise.
	* expr.c (init_expr_target): Likewise.
	(convert_move): Likewise.
	(convert_modes): Likewise.
	* ira.c (setup_prohibited_class_mode_regs): Likewise.
	(setup_prohibited_mode_move_regs): Likewise.
	* ira.h (target_ira): Likewise.
	* lra-assigns.c (find_hard_regno_for_1): Likewise.
	* lra-constraints.c (process_alt_operands): Likewise.
	(split_reg): Likewise.
	* recog.c (peep2_find_free_register): Likewise.
	* ree.c (combine_reaching_defs): Likewise.
	* regcprop.c (maybe_mode_change): Likewise.
	* reginfo.c (init_reg_sets_1): Likewise.
	(choose_hard_reg_mode): Likewise.
	(simplifiable_subregs): Likewise.
	* regrename.c (check_new_reg_p): Likewise.
	* reload.c (find_valid_class): Likewise.
	(find_valid_class_1): Likewise.
	(reload_inner_reg_of_subreg): Likewise.
	(push_reload): Likewise.
	(combine_reloads): Likewise.
	(find_dummy_reload): Likewise.
	(find_reloads): Likewise.
	* reload1.c (find_reg): Likewise.
	(set_reload_reg): Likewise.
	(allocate_reload_reg): Likewise.
	(choose_reload_regs): Likewise.
	(reload_adjust_reg_for_temp): Likewise.
	* rtlanal.c (subreg_size_offset_from_lsb): Likewise.
	(simplify_subreg_regno): Likewise.
	* sel-sched.c (init_regs_for_mode): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	* config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
	(MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
	* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
	* config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
	(arc_mode_class): Delete.
	(HARD_REGNO_MODE_OK): Delete.
	* config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(arc_hard_regno_mode_ok): Rename old array to...
	(arc_hard_regno_mode_ok_modes): ...this.
	(arc_conditional_register_usage): Update accordingly.
	(arc_mode_class): Make static.
	(arc_hard_regno_mode_ok): New function.
	* config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
	* config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
	* config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(arm_hard_regno_mode_ok): Make static.
	* config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
	* config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
	* config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
	return a bool.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
	* config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
	* config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
	(bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/bfin/predicates.md (valid_reg_operand): Use
	targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
	* config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
	* config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
	* config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
	* config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(cr16_hard_regno_mode_ok): Make static and return a bool.
	* config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
	* config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(cris_hard_regno_mode_ok): New function.
	* config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
	(epiphany_mode_class): Delete.
	(HARD_REGNO_MODE_OK): Delete.
	* config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
	* config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(hard_regno_mode_ok): Rename to...
	(epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
	* config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
	* config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
	* config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
	* config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(frv_hard_regno_mode_ok): Make static and return a bool.
	* config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
	HARD_REGNO_MODE_OK.
	* config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
	* config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
	* config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
	* config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
	and return a bool.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
	* config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
	* config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
	return a bool.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
	* config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(ia64_hard_regno_mode_ok): New function.
	* config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
	* config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(iq2000_hard_regno_mode_ok): New function.
	* config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
	* config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(lm32_hard_regno_mode_ok): New function.
	* config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
	* config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
	* config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
	instead of HARD_REGNO_MODE_OK.
	(m32c_hard_regno_ok): Rename to...
	(m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
	(m32c_cannot_change_mode_class): Update accordingly.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
	(m32r_mode_class): Delete.
	(HARD_REGNO_MODE_OK): Delete.
	* config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(m32r_hard_regno_mode_ok): Rename to...
	(m32r_hard_regno_modes): ...this.
	(m32r_mode_class): Make static.
	(m32r_hard_regno_mode_ok): New function.
	* config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
	* config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
	* config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(m68k_hard_regno_mode_ok): Make static.
	* config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
	* config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(mcore_hard_regno_mode_ok): New function.
	* config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
	(HARD_REGNO_MODE_OK): Delete.
	* config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
	Rename to...
	(microblaze_hard_regno_mode_ok_p): ...this and make static.
	(microblaze_hard_regno_mode_ok): New function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
	(mips_hard_regno_mode_ok): Delete.
	* config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
	(mips_hard_regno_mode_ok_p): ...this and make static.
	(mips_hard_regno_mode_ok_p): Rename to...
	(mips_hard_regno_mode_ok_uncached): ...this.
	(mips_hard_regno_mode_ok): New function.
	(mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
	of HARD_REGNO_MODE_OK.
	(mips_option_override): Update after above name changes.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
	* config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
	* config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
	* config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
	* config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
	* config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
	* config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(msp430_hard_regno_mode_ok): Make static and return a bool.
	* config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
	* config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
	* config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
	and return a bool.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
	* config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
	* config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
	* config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
	(PA_HARD_REGNO_MODE_OK): ...this
	* config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
	(PA_HARD_REGNO_MODE_OK): ...this.
	* config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(pa_hard_regno_mode_ok): New function.
	* config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
	* config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(pdp11_hard_regno_mode_ok): New function.
	* config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
	* config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
	Delete.
	* config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
	Make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	(rs6000_hard_regno_mode_ok): Rename to...
	(rs6000_hard_regno_mode_ok_uncached): ...this.
	(rs6000_init_hard_regno_mode_ok): Update accordingly.
	(rs6000_hard_regno_mode_ok): New function.
	* config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
	* config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
	* config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
	(riscv_hard_regno_mode_ok): ...this and make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
	* config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
	* config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(rl78_hard_regno_mode_ok): Make static and return bool.
	* config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
	* config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
	Delete.
	* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	(rs6000_hard_regno_mode_ok): Rename to...
	(rs6000_hard_regno_mode_ok_uncached): ...this.
	(rs6000_init_hard_regno_mode_ok): Update accordingly.
	(rs6000_hard_regno_mode_ok): New function.
	* config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
	* config/rx/rx.c (rx_hard_regno_mode_ok): New function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
	* config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
	* config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
	* config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
	* config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(sh_hard_regno_mode_ok): Make static.
	* config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
	instead of HARD_REGNO_MODE_OK.
	* config/sparc/sparc.h (hard_regno_mode_classes): Delete.
	(sparc_mode_class): Delete.
	(HARD_REGNO_MODE_OK): Delete.
	* config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(hard_regno_mode_classes): Make static.
	(sparc_mode_class): Likewise.
	(sparc_hard_regno_mode_ok): New function.
	* config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
	* config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
	* config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
	function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
	* config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
	* config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
	* config/v850/v850.c (v850_hard_regno_mode_ok): New function.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	* config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
	* config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
	* config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
	(visium_hard_regno_mode_ok): New function.
	* config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
	instead of HARD_REGNO_MODE_OK.
	* config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
	(HARD_REGNO_MODE_OK): Delete.
	* config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
	(xtensa_hard_regno_mode_ok_p): ...this and make static.
	(xtensa_option_override): Update accordingly.
	(TARGET_HARD_REGNO_MODE_OK): Redefine.
	(xtensa_hard_regno_mode_ok): New function.
	* system.h (HARD_REGNO_MODE_OK): Poison.

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

	* target.def (hard_regno_call_part_clobbered): New hook.
	* doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
	* doc/tm.texi: Regenerate.
	* hooks.h (hook_bool_uint_mode_false): Declare.
	* hooks.c (hook_bool_uint_mode_false): New function.
	* regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* cselib.c (cselib_process_insn): Use
	targetm.hard_regno_call_part_clobbered instead of
	HARD_REGNO_CALL_PART_CLOBBERED.
	* ira-conflicts.c (ira_build_conflicts): Likewise.
	* ira-costs.c (ira_tune_allocno_costs): Likewise.
	* lra-constraints.c (need_for_call_save_p): Likewise.
	* lra-lives.c: Include target.h.
	(check_pseudos_live_through_calls): Use
	targetm.hard_regno_call_part_clobbered instead of
	HARD_REGNO_CALL_PART_CLOBBERED.
	* regcprop.c: Include target.h.
	(copyprop_hardreg_forward_1): Use
	targetm.hard_regno_call_part_clobbered instead of
	HARD_REGNO_CALL_PART_CLOBBERED.
	* reginfo.c (choose_hard_reg_mode): Likewise.
	* regrename.c (check_new_reg_p): Likewise.
	* reload.c (find_equiv_reg): Likewise.
	* reload1.c (emit_reload_insns): Likewise.
	* sched-deps.c (deps_analyze_insn): Likewise.
	* sel-sched.c (init_regs_for_mode): Likewise.
	(mark_unavailable_hard_regs): Likewise.
	* targhooks.c (default_dwarf_frame_reg_mode): Likewise.
	* config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
	New function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
	Delete.
	* config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
	and return a bool.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
	function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
	function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
	Delete.
	* config/powerpcspe/powerpcspe.c
	(rs6000_hard_regno_call_part_clobbered): New function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
	New function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
	function.
	(TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
	* config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
	* system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.

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

	* rtl.h (subreg_memory_offset): Declare.
	* emit-rtl.c (subreg_memory_offset): New function.
	* expmed.c (store_bit_field_1): Use it.
	* expr.c (undefined_operand_subword_p): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.

2017-09-04  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/57448
	PR target/67458
	PR target/81316
	* optabs.c (expand_atomic_load): Place compiler memory barriers if
	using atomic_load pattern.
	(expand_atomic_store): Likewise.

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

	PR sanitizer/81981
	* gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
	and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
	handling.  Use replace_call_with_value with NULL instead of
	gsi_replace, unlink_stmt_vdef and release_defs.

	* gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
	instead of tab.

	* lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.

2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>

	PR bootstrap/82045
	* rtl.h (emit_library_call_value_1): Declare.
	(emit_library_call): Replace declaration with a series of overloads.
	Remove the parameter count argument.
	(emit_library_call_value): Likewise.
	* calls.c (emit_library_call_value_1): Make global.  Replace varargs
	with an "rtx_mode_t *".
	(emit_library_call_value): Delete.
	(emit_library_call): Likewise.
	* asan.c (asan_emit_stack_protection): Update calls accordingly.
	(asan_emit_allocas_unpoison): Likewise.
	* builtins.c (expand_builtin_powi): Likewise.
	(expand_asan_emit_allocas_unpoison): Likewise.
	* cfgexpand.c (expand_main_function): Likewise.
	* config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
	* config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
	* config/alpha/alpha.c (alpha_trampoline_init): Likewise.
	* config/arm/arm.c (arm_trampoline_init): Likewise.
	(arm_call_tls_get_addr): Likewise.
	(arm_expand_divmod_libfunc): Likewise.
	* config/bfin/bfin.md (umulsi3_highpart): Likewise.
	(smulsi3_highpart): Likewise.
	* config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
	(c6x_expand_compare): Likewise.
	(c6x_expand_movmem): Likewise.
	* config/frv/frv.c (frv_trampoline_init): Likewise.
	* config/i386/i386.c (ix86_trampoline_init): Likewise.
	(ix86_expand_divmod_libfunc): Likewise.
	* config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
	(ia64_expand_compare): Likewise.
	(ia64_profile_hook): Likewise.
	* config/ia64/ia64.md (save_stack_nonlocal): Likewise.
	(nonlocal_goto): Likewise.
	(restore_stack_nonlocal): Likewise.
	* config/m32r/m32r.c (block_move_call): Likewise.
	(m32r_trampoline_init): Likewise.
	* config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
	* config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
	(m68k_call_m68k_read_tp): Likewise.
	* config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
	(microblaze_expand_divide): Likewise.
	* config/mips/mips.h (mips_args): Likewise.
	* config/mips/sdemtk.h (mips_sync_icache): Likewise.
	(MIPS_ICACHE_SYNC): Likewise.
	* config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
	(nios2_trampoline_init): Likewise.
	* config/pa/pa.c (hppa_tls_call): Likewise.
	(pa_trampoline_init): Likewise.
	* config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
	(expand_strn_compare): Likewise.
	(rs6000_generate_compare): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(output_profile_hook): Likewise.
	(rs6000_trampoline_init): Likewise.
	* config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
	* config/riscv/riscv.h (PROFILE_HOOK): Likewise.
	* config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
	(rs6000_generate_compare): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(output_profile_hook): Likewise.
	(rs6000_trampoline_init): Likewise.
	* config/rs6000/rs6000.md (neg<mode>2): Likewise.
	* config/sh/sh.c (sh_trampoline_init): Likewise.
	* config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
	(sparc_emit_float_lib_cmp): Likewise.
	(sparc32_initialize_trampoline): Likewise.
	(sparc64_initialize_trampoline): Likewise.
	(sparc_profile_hook): Likewise.
	* config/spu/spu.c (ea_load_store): Likewise.
	* config/spu/spu.md (floatunssidf2): Likewise.
	* config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
	* config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
	* config/visium/visium.c (expand_block_move_4): Likewise.
	(expand_block_move_2): Likewise.
	(expand_block_move_1): Likewise.
	(expand_block_set_4): Likewise.
	(expand_block_set_2): Likewise.
	(expand_block_set_1): Likewise.
	(visium_trampoline_init): Likewise.
	(visium_profile_hook): Likewise.
	* config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
	(xtensa_setup_frame_addresses): Likewise.
	(xtensa_trampoline_init): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	(sjlj_emit_function_exit): Likewise.
	* explow.c (allocate_dynamic_stack_space): Likewise.
	(probe_stack_range): Likewise.
	* expr.c (convert_mode_scalar): Likewise.
	* optabs.c (expand_binop): Likewise.
	(expand_twoval_binop_libfunc): Likewise.
	(expand_unop): Likewise.
	(prepare_cmp_insn): Likewise.
	(prepare_float_lib_cmp): Likewise.
	(expand_float): Likewise.
	(expand_fix): Likewise.
	(expand_fixed_convert): Likewise.
	(maybe_emit_sync_lock_test_and_set): Likewise.
	(expand_atomic_compare_and_swap): Likewise.
	(expand_mem_thread_fence): Likewise.
	(expand_atomic_fetch_op): Likewise.

2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/generic.texi (OpenACC): Adjust URL.
	* doc/invoke.texi (C Dialect Options): Ditto.

2017-09-03  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
	predicate for operand 1.  Add (m,<S>) constraint.
	(*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
	Prevent memory operand 1 with register operand 2.

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

	PR rtl-optimization/82024
	* combine.c (try_combine): If the combination result is a PARALLEL,
	and we only need to retain the SET in there that would be placed
	at I2, check that we can place that at I3 instead, before doing so.

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

	PR target/81766
	* config/i386/i386.c (ix86_init_large_pic_reg): Return label
	instead of void.
	(ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
	if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
	and label.

2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
	    Jeff Law  <law@redhat.com>

	* varasm.c (bss_initializer_p): Do not put constants into .bss
	(categorize_decl_for_section): Handle bss_initializer_p returning
	false when DECL_INITIAL is NULL.

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

	PR target/82012
	* config/s390/s390.c (s390_can_inline_p): New function.

2017-09-01  Jeff Law  <law@redhat.com>

	PR tree-optimization/82052
	* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
	Always initialize the returned slot after a hash table miss
	when INSERT is true.

2017-09-01  Alexander Monakov  <amonakov@ispras.ru>

	* config/s390/s390.md (mem_signal_fence): Remove.
	* doc/md.texi (mem_signal_fence): Remove.
	* optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
	Update comments.
	* target-insns.def (mem_signal_fence): Remove.

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

	PR sanitizer/81902
	* doc/invoke.texi: Document -fsanitize=pointer-overflow.

	PR sanitizer/81923
	* asan.c (create_odr_indicator): Strip name encoding from assembler
	name before appending it after __odr_asan_.

2017-09-01  Martin Liska  <mliska@suse.cz>

	PR tree-optimization/82059
	* gimple-ssa-isolate-paths.c (isolate_path): Add profile and
	frequency only when an edge is redirected.

2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
	* config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
	(arc_conditional_register_usage): Remove ARC600 lp_count
	exception.
	(arc_file_start): Emit Tag_ARC_CPU_variation.
	(arc_can_use_doloop_p): New conditions to use ZOLs.
	(hwloop_fail): New function.
	(hwloop_optimize): Likewise.
	(hwloop_pattern_reg): Likewise.
	(arc_doloop_hooks): New struct, to be used with reorg_loops.
	(arc_reorg_loops): New function, calls reorg_loops.
	(arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
	(arc600_corereg_hazard): Remove ZOL checking, case handled by
	hwloop_optimize.
	(arc_loop_hazard): Remove function, functionality moved into
	hwloop_optimize.
	(arc_hazard): Remove arc_loop_hazard call.
	(arc_adjust_insn_length): Remove ZOL handling, functionality moved
	into hwloop_optimize.
	(arc_label_align): Remove ZOL handling.
	* config/arc/arc.h (LOOP_ALIGN): Changed to 0.
	* config/arc/arc.md (doloop_begin): Remove pattern.
	(doloop_begin_i): Likewise.
	(doloop_end_i): Likewise.
	(doloop_fallback): Likewise.
	(doloop_fallback_m): Likewise.
	(doloop_end): Reimplement expand.
	(arc_lp): New pattern for LP instruction.
	(loop_end): New pattern.
	(loop_fail): Likewise.
	(decrement_and_branch_until_zero): Likewise.
	* config/arc/arc.opt (mlpc-width): New option.
	* doc/invoke.texi (mlpc-width): Document option.

2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
	(arc_ccfsm_advance): Fix checking for delay slots.
	(arc_reorg): Add rtl dump after each call to arc_ifcvt.

2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.md (movqi_insn): Add stores to save constant long
	immediates.
	(movhi_insn): Update store instruction constraint which are saving
	6-bit short immediates.
	(movsi_insn): Consider also short scaled load operations.
	(zero_extendhisi2_i): Use Usd constraint instead of T.
	(extendhisi2_i): Add q constraint.
	(arc_clzsi2): Add type and length attributes.
	(arc_ctzsi2): Likewise.
	* config/arc/constraints.md (Usc): Update constraint, the
	assembler can parse two relocations for a single instruction.

2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.

2017-08-31  Olivier Hainque  <hainque@adacore.com>

	* config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
	match as powerpc-wrs-vxworks*.

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

	* config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
	register constraint for by-element operand.
	(aarch64_mls_elt_merge<mode>): Likewise.

2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_can_follow_jump): Check for short
	branches.

2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>

	* config.gcc: Use g.opt for arc.
	* config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
	functionality moved to ...
	(legitimate_scaled_address_p): New function, ...here.
	(LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
	(LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
	(legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
	condition.
	(arc_override_options): Handle G option.
	(arc_output_pic_addr_const): Correct function definition.
	(arc_legitimate_address_p): Use legitimate_scaled_address_p.
	(arc_decl_anon_ns_mem_p): Delete.
	(arc_in_small_data_p): Overhaul this function to take into
	consideration the value given via G option.
	(arc_rewrite_small_data_1): Renamed and corrected old
	arc_rewrite_small_data function.
	(arc_rewrite_small_data): New function.
	(small_data_pattern): Don't use pic_offset_table_rtx.
	* config/arc/arc.h (CC1_SPEC): Recognize G option.
	* config/arc/simdext.md (movmisalignv2hi): Use
	prepare_move_operands function.
	(mov*): Likewise.
	(movmisalign*): Likewise.
	* doc/invoke.texi (ARC options): Document -G option.

2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (compact_sda_memory_operand): Update
	prototype.
	* config/arc/arc.c (arc_print_operand): Output scalled address for
	sdata whenever is possible.
	(arc_in_small_data_p): Allow sdata for 64bit datum when double
	load/stores are available.
	(compact_sda_memory_operand): Check for the alignment required by
	code density instructions.
	* config/arc/arc.md (movsi_insn): Use newly introduced Us0
	constraint.
	* config/arc/constraints.md (Usd): Update constraint.
	(Us0): New constraint.
	(Usc): Update constraint.

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

	PR middle-end/82054
	* dwarf2out.c (dwarf2out_early_global_decl): Process each
	function only once.

2017-08-31  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
	Resize type_signature.

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

	* config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
	subregs whose inner modes can be stored in GPRs.
	(aarch64_classify_index): Likewise.

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

	* config/aarch64/iterators.md (V_cmp_result): Rename to...
	(V_INT_EQUIV): ...this.
	(v_cmp_result): Rename to...
	(v_int_equiv): ...this.
	* config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
	* config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
	(copysign<mode>3): Likewise.
	(aarch64_simd_bsl<mode>_internal): Likewise.
	(aarch64_simd_bsl<mode>): Likewise.
	(vec_cmp<mode><mode>): Likewise.
	(vcond<mode><mode>): Likewise.
	(vcond<v_cmp_mixed><mode>): Likewise.
	(vcondu<mode><v_cmp_mixed>): Likewise.
	(aarch64_cm<optab><mode>): Likewise.
	(aarch64_cmtst<mode>): Likewise.
	(aarch64_fac<optab><mode>): Likewise.
	(vec_perm_const<mode>): Likewise.
	(vcond_mask_<mode><v_cmp_result>): Rename to...
	(vcond_mask_<mode><v_int_equiv>): ...this.
	(vec_cmp<mode><v_cmp_result>): Rename to...
	(vec_cmp<mode><v_int_equiv>): ...this.

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

	* config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
	vector modes.
	* config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
	* config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
	(UNSPEC_LD4_DREG): New unspecs.
	* config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
	(aarch64_ld2<mode>_dreg_be): Replace with...
	(aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
	unspec.
	(aarch64_ld3<mode>_dreg_le)
	(aarch64_ld3<mode>_dreg_be): Replace with...
	(aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
	unspec.
	(aarch64_ld4<mode>_dreg_le)
	(aarch64_ld4<mode>_dreg_be): Replace with...
	(aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
	unspec.

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

	PR tree-optimization/81987
	* gimple-ssa-strength-reduction.c (insert_initializers): Don't
	insert an initializer in a location not dominated by the stride
	definition.

2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>

	* tree-eh.c (lower_try_finally_switch): Set the location of the finally
	on the entire header of the finally block in the fallthru case.

2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>

	* varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.

2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>

	* config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
	rs6000_emit_move_from_cr and call renamed function.
	(rs6000_emit_prologue): Call renamed functions.
	* config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
	movesi_from_cr, remove volatile CRs.

2017-08-30  Jon Beniston  <jon@beniston.com>
	    Richard Biener  <rguenther@suse.de>

	* tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
	of VECTOR_MODE_P check.
	* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
	element vector types.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>

	* df.h (df_read_modify_subreg_p): Remove in favor of...
	* rtl.h (read_modify_subreg_p): ...this new function.  Take a
	const_rtx instead of an rtx.
	* cprop.c (local_cprop_find_used_regs): Update accordingly.
	* df-problems.c (df_word_lr_mark_ref): Likewise.
	* ira-lives.c (mark_pseudo_reg_live): Likewise.
	(mark_pseudo_reg_dead): Likewise.
	(mark_ref_dead): Likewise.
	* reginfo.c (init_subregs_of_mode): Likewise.
	* sched-deps.c (sched_analyze_1): Likewise.
	* df-scan.c (df_def_record_1): Likewise.
	(df_uses_record): Likewise.
	(df_read_modify_subreg_p): Remove in favor of...
	* rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
	const_rtx instead of an rtx.

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

	* rtl.h (partial_subreg_p): New function.
	* caller-save.c (save_call_clobbered_regs): Use it.
	* calls.c (expand_call): Likewise.
	* combine.c (combinable_i3pat): Likewise.
	(simplify_set): Likewise.
	(make_extraction): Likewise.
	(make_compound_operation_int): Likewise.
	(gen_lowpart_or_truncate): Likewise.
	(force_to_mode): Likewise.
	(make_field_assignment): Likewise.
	(reg_truncated_to_mode): Likewise.
	(record_truncated_value): Likewise.
	(move_deaths): Likewise.
	* cse.c (record_jump_cond): Likewise.
	(cse_insn): Likewise.
	* cselib.c (cselib_lookup_1): Likewise.
	* expmed.c (extract_bit_field_using_extv): Likewise.
	* function.c (assign_parm_setup_reg): Likewise.
	* ifcvt.c (noce_convert_multiple_sets): Likewise.
	* ira-build.c (create_insn_allocnos): Likewise.
	* lra-coalesce.c (merge_pseudos): Likewise.
	* lra-constraints.c (match_reload): Likewise.
	(simplify_operand_subreg): Likewise.
	(curr_insn_transform): Likewise.
	* lra-lives.c (process_bb_lives): Likewise.
	* lra.c (new_insn_reg): Likewise.
	(lra_substitute_pseudo): Likewise.
	* regcprop.c (mode_change_ok): Likewise.
	(maybe_mode_change): Likewise.
	(copyprop_hardreg_forward_1): Likewise.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.
	(find_reloads_subreg_address): Likewise.
	* reload1.c (alter_reg): Likewise.
	(eliminate_regs_1): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.

2017-08-30  David Edelsohn  <dje.gcc@gmail.com>

	* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
	back to if statements, including unpack.

2017-08-30  Martin Liska  <mliska@suse.cz>

	PR inline-asm/82001
	* ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
	Rename to ...
	(func_checker::compare_asm_inputs_outputs): ... this function.
	(func_checker::compare_gimple_asm): Use the function to compare
	also ASM constrains.
	* ipa-icf-gimple.h: Rename the function.

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

	* coretypes.h (complex_mode): New type.
	* gdbhooks.py (build_pretty_printer): Handle it.
	* machmode.h (complex_mode): New class.
	(complex_mode::includes_p): New function.
	(is_complex_int_mode): Likewise.
	(is_complex_float_mode): Likewise.
	* genmodes.c (get_mode_class): Handle complex mode classes.
	* function.c (expand_function_end): Use is_complex_int_mode.

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

	* coretypes.h (scalar_mode_pod): New typedef.
	* gdbhooks.py (build_pretty_printer): Handle it.
	* machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
	* fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
	* fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
	* tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
	as_a <scalar_mode>.

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

	* machmode.h (mode_for_vector): Take a scalar_mode instead
	of a machine_mode.
	* stor-layout.c (mode_for_vector): Likewise.
	* explow.c (promote_mode): Use as_a <scalar_mode>.
	* sdbout.c (sdbout_parms): Use is_a <scalar_mode>.

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

	* target.def (preferred_simd_mode): Take a scalar_mode
	instead of a machine_mode.
	* targhooks.h (default_preferred_simd_mode): Likewise.
	* targhooks.c (default_preferred_simd_mode): Likewise.
	* config/arc/arc.c (arc_preferred_simd_mode): Likewise.
	* config/arm/arm.c (arm_preferred_simd_mode): Likewise.
	* config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
	* config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
	* config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
	* config/mips/mips.c (mips_preferred_simd_mode): Likewise.
	* config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
	* config/s390/s390.c (s390_preferred_simd_mode): Likewise.
	* config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
	* config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
	(aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
	* doc/tm.texi: Regenerate.
	* optabs-query.c (can_vec_mask_load_store_p): Return false for
	non-scalar modes.

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

	* target.def (scalar_mode_supported_p): Take a scalar_mode
	instead of a machine_mode.
	* targhooks.h (default_scalar_mode_supported_p): Likewise.
	* targhooks.c (default_scalar_mode_supported_p): Likewise.
	* config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
	* config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
	* config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
	* config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
	* config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
	* config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
	* config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
	* config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
	* config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
	* config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
	* config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
	* config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
	* config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
	* config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
	* config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
	Likewise.
	* doc/tm.texi: Regenerate.

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

	* coretypes.h (opt_scalar_mode): New typedef.
	* gdbhooks.py (build_pretty_printers): Handle it.
	* machmode.h (mode_iterator::get_2xwider): Add overload for
	opt_mode<T>.
	* emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
	over scalar modes.
	* expr.c (convert_mode_scalar): Likewise.
	* omp-low.c (omp_clause_aligned_alignment): Likewise.
	* optabs.c (expand_float): Likewise.
	(expand_fix): Likewise.
	* tree-vect-stmts.c (vectorizable_conversion): Likewise.

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

	* optabs.c (expand_float): Explicitly check for scalars before
	using a branching expansion.
	(expand_fix): Likewise.

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

	* expr.c (convert_mode): Split scalar handling out into...
	(convert_mode_scalar): ...this new function.  Treat the modes
	as scalar_modes.

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

	* omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
	and scalar_mode.
	* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.

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

	* fixed-value.h (fixed_from_double_int): Take a scalar_mode
	rather than a machine_mode.
	(fixed_from_string): Likewise.
	(fixed_convert): Likewise.
	(fixed_convert_from_int): Likewise.
	(fixed_convert_from_real): Likewise.
	(real_convert_from_fixed): Likewise.
	* fixed-value.c (fixed_from_double_int): Likewise.
	(fixed_from_string): Likewise.
	(fixed_convert): Likewise.
	(fixed_convert_from_int): Likewise.
	(fixed_convert_from_real): Likewise.
	(real_convert_from_fixed): Likewise.
	* config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.

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

	* emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
	of separate mode class checks.  Do not allow vector modes here.
	(immed_wide_int_const): Use as_a <scalar_mode>.
	* explow.c (trunc_int_for_mode): Likewise.
	* rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
	(wi::shwi): Likewise.
	(wi::min_value): Likewise.
	(wi::max_value): Likewise.
	* dwarf2out.c (loc_descriptor): Likewise.
	* simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
	for CONST_WIDE_INT.

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

	* tree.h (SCALAR_TYPE_MODE): New macro.
	* expr.c (expand_expr_addr_expr_1): Use it.
	(expand_expr_real_2): Likewise.
	* fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
	(fold_convert_const_fixed_from_int): Likewise.
	(fold_convert_const_fixed_from_real): Likewise.
	(native_encode_fixed): Likewise
	(native_encode_complex): Likewise
	(native_encode_vector): Likewise.
	(native_interpret_fixed): Likewise.
	(native_interpret_real): Likewise.
	(native_interpret_complex): Likewise.
	(native_interpret_vector): Likewise.
	* omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
	(simd_clone_adjust_argument_types): Likewise.
	(simd_clone_init_simd_arrays): Likewise.
	(simd_clone_adjust): Likewise.
	* stor-layout.c (layout_type): Likewise.
	* tree.c (build_minus_one_cst): Likewise.
	* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
	* tree-inline.c (estimate_move_cost): Likewise.
	* tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
	(vectorizable_reduction): Likewise.
	* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
	(vect_recog_mixed_size_cond_pattern): Likewise.
	(check_bool_pattern): Likewise.
	(adjust_bool_pattern): Likewise.
	(search_type_for_mask_1): Likewise.
	* tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
	* tree-vect-stmts.c (vectorizable_conversion): Likewise.
	(vectorizable_load): Likewise.
	(vectorizable_store): Likewise.
	* ubsan.c (ubsan_encode_value): Likewise.
	* varasm.c (output_constant): Likewise.

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

	* coretypes.h (scalar_mode): New class.
	* machmode.h (scalar_mode): Likewise.
	(scalar_mode::includes_p): New function.
	(mode_to_inner): Return a scalar_mode rather than a machine_mode.
	* gdbhooks.py (build_pretty_printers): Handle scalar_mode.
	* genmodes.c (get_mode_class): Handle remaining scalar modes.
	* cfgexpand.c (expand_debug_expr): Use scalar_mode.
	* expmed.c (store_bit_field_1): Likewise.
	(extract_bit_field_1): Likewise.
	* expr.c (write_complex_part): Likewise.
	(read_complex_part): Likewise.
	(emit_move_complex_push): Likewise.
	(expand_expr_real_2): Likewise.
	* function.c (assign_parm_setup_reg): Likewise.
	(assign_parms_unsplit_complex): Likewise.
	* optabs.c (expand_binop): Likewise.
	* rtlanal.c (subreg_get_info): Likewise.
	* simplify-rtx.c (simplify_immed_subreg): Likewise.
	* varasm.c (output_constant_pool_2): Likewise.

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

	* expmed.c (extract_high_half): Use scalar_int_mode and remove
	assertion.
	(expmed_mult_highpart_optab): Likewise.
	(expmed_mult_highpart): Likewise.

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

	* builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
	instead of a machine_mode.
	(builtin_memset_read_str): Likewise.
	* builtins.c (c_readstr): Likewise.
	(builtin_memcpy_read_str): Likewise.
	(builtin_strncpy_read_str): Likewise.
	(builtin_memset_read_str): Likewise.
	(builtin_memset_gen_str): Likewise.
	(expand_builtin_signbit): Use scalar_int_mode for local variables.
	* cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
	instead of a machine_mode.
	* combine.c (simplify_if_then_else): Use scalar_int_mode for local
	variables.
	(make_extraction): Likewise.
	(try_widen_shift_mode): Take and return scalar_int_modes instead
	of machine_modes.
	* config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
	a scalar_int_mode instead of a machine_mode.
	* config/avr/avr.c (avr_addr_space_address_mode): Likewise.
	(avr_addr_space_pointer_mode): Likewise.
	* config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
	* config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
	(msp430_unwind_word_mode): Likewise.
	* config/spu/spu.c (spu_unwind_word_mode): Likewise.
	(spu_addr_space_pointer_mode): Likewise.
	(spu_addr_space_address_mode): Likewise.
	(spu_libgcc_cmp_return_mode): Likewise.
	(spu_libgcc_shift_count_mode): Likewise.
	* config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
	(rl78_addr_space_pointer_mode): Likewise.
	(fl78_unwind_word_mode): Likewise.
	(rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
	machine_mode.
	* config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
	* config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
	* config/mips/mips.c (mips_mode_rep_extended): Likewise.
	(mips_valid_pointer_mode): Likewise.
	* config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
	* config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
	(ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
	of a machine_mode.
	(ft32_addr_space_address_mode): Likewise.
	* config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
	scalar_int_mode instead of a machine_mode.
	(m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
	of a machine_mode.
	(m32c_addr_space_address_mode): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
	(rs6000_eh_return_filter_mode): Likewise.
	* config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
	(rs6000_eh_return_filter_mode): Likewise.
	* config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
	(s390_libgcc_shift_count_mode): Likewise.
	(s390_unwind_word_mode): Likewise.
	(s390_valid_pointer_mode): Take a scalar_int_mode rather than a
	machine_mode.
	* target.def (mode_rep_extended): Likewise.
	(valid_pointer_mode): Likewise.
	(addr_space.valid_pointer_mode): Likewise.
	(eh_return_filter_mode): Return a scalar_int_mode rather than
	a machine_mode.
	(libgcc_cmp_return_mode): Likewise.
	(libgcc_shift_count_mode): Likewise.
	(unwind_word_mode): Likewise.
	(addr_space.pointer_mode): Likewise.
	(addr_space.address_mode): Likewise.
	* doc/tm.texi: Regenerate.
	* dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
	a machine_mode.
	(do_jump): Use scalar_int_mode for local variables.
	* dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
	rather than a machine_mode.
	* dwarf2out.c (convert_descriptor_to_mode): Likewise.
	(scompare_loc_descriptor_wide): Likewise.
	(scompare_loc_descriptor_narrow): Likewise.
	* emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
	variables.
	* except.c (sjlj_emit_dispatch_table): Likewise.
	(expand_builtin_eh_copy_values): Likewise.
	* explow.c (convert_memory_address_addr_space_1): Likewise.
	Take a scalar_int_mode rather than a machine_mode.
	(convert_memory_address_addr_space): Take a scalar_int_mode rather
	than a machine_mode.
	(memory_address_addr_space): Use scalar_int_mode for local variables.
	* expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
	rather than a machine_mode.
	* expmed.c (mask_rtx): Likewise.
	(init_expmed_one_conv): Likewise.
	(expand_mult_highpart_adjust): Likewise.
	(extract_high_half): Likewise.
	(expmed_mult_highpart_optab): Likewise.
	(expmed_mult_highpart): Likewise.
	(expand_smod_pow2): Likewise.
	(expand_sdiv_pow2): Likewise.
	(emit_store_flag_int): Likewise.
	(adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
	variables.
	(extract_low_bits): Likewise.
	* expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
	a machine_mode.
	* expr.c (pieces_addr::adjust):  Likewise.
	(can_store_by_pieces): Likewise.
	(store_by_pieces): Likewise.
	(clear_by_pieces_1): Likewise.
	(expand_expr_addr_expr_1): Likewise.
	(expand_expr_addr_expr): Use scalar_int_mode for local variables.
	(expand_expr_real_1): Likewise.
	(try_casesi): Likewise.
	* final.c (shorten_branches): Likewise.
	* fold-const.c (fold_convert_const_int_from_fixed): Change the
	type of "mode" to machine_mode.
	* internal-fn.c (expand_arith_overflow_result_store): Take a
	scalar_int_mode rather than a machine_mode.
	(expand_mul_overflow): Use scalar_int_mode for local variables.
	* loop-doloop.c (doloop_modify): Likewise.
	(doloop_optimize): Likewise.
	* optabs.c (expand_subword_shift): Take a scalar_int_mode rather
	than a machine_mode.
	(expand_doubleword_shift_condmove): Likewise.
	(expand_doubleword_shift): Likewise.
	(expand_doubleword_clz): Likewise.
	(expand_doubleword_popcount): Likewise.
	(expand_doubleword_parity): Likewise.
	(expand_absneg_bit): Use scalar_int_mode for local variables.
	(prepare_float_lib_cmp): Likewise.
	* rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
	rather than a machine_mode.
	(convert_memory_address_addr_space): Likewise.
	(get_mode_bounds): Likewise.
	(get_address_mode): Return a scalar_int_mode rather than a
	machine_mode.
	* rtlanal.c (get_address_mode): Likewise.
	* stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
	than a machine_mode.
	* targhooks.c (default_mode_rep_extended): Likewise.
	(default_valid_pointer_mode): Likewise.
	(default_addr_space_valid_pointer_mode): Likewise.
	(default_eh_return_filter_mode): Return a scalar_int_mode rather
	than a machine_mode.
	(default_libgcc_cmp_return_mode): Likewise.
	(default_libgcc_shift_count_mode): Likewise.
	(default_unwind_word_mode): Likewise.
	(default_addr_space_pointer_mode): Likewise.
	(default_addr_space_address_mode): Likewise.
	* targhooks.h (default_eh_return_filter_mode): Likewise.
	(default_libgcc_cmp_return_mode): Likewise.
	(default_libgcc_shift_count_mode): Likewise.
	(default_unwind_word_mode): Likewise.
	(default_addr_space_pointer_mode): Likewise.
	(default_addr_space_address_mode): Likewise.
	(default_mode_rep_extended): Take a scalar_int_mode rather than
	a machine_mode.
	(default_valid_pointer_mode): Likewise.
	(default_addr_space_valid_pointer_mode): Likewise.
	* tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
	local variables.
	* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
	rather than a machine_mode.
	* tree-switch-conversion.c (array_value_type): Use scalar_int_mode
	for local variables.
	* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
	* var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
	than a machine_mode.

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

	* dojump.c (do_jump_by_parts_greater_rtx): Change the type of
	the mode argument to scalar_int_mode.
	(do_jump_by_parts_zero_rtx): Likewise.
	(do_jump_by_parts_equality_rtx): Likewise.
	(do_jump_by_parts_greater): Take a mode argument.
	(do_jump_by_parts_equality): Likewise.
	(do_jump_1): Update calls accordingly.

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

	* is-a.h (safe_dyn_cast): New function.
	* rtl.h (rtx_jump_table_data::get_data_mode): New function.
	(jump_table_for_label): Likewise.
	* final.c (final_addr_vec_align): Take an rtx_jump_table_data *
	instead of an rtx_insn *.
	(shorten_branches): Use dyn_cast instead of LABEL_P and
	JUMP_TABLE_DATA_P.  Use jump_table_for_label and
	rtx_jump_table_data::get_data_mode.
	(final_scan_insn): Likewise.

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

	* combine.c (try_combine): Use is_a <scalar_int_mode> when
	trying to combine a full-register integer set with a subreg
	integer set.

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

	* expr.c (expand_expr_addr_expr): Add a new_tmode local variable
	that is always either address_mode or pointer_mode.

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

	* expr.c (expand_expr_real_2): Use word_mode instead of innermode
	when the two are known to be equal.

2017-08-30  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
	is_a <scalar_int_mode> instead of checking for a nonzero
	precision.  Forcibly convert op_mode to a scalar_int_mode
	in that case.  More clearly differentiate the operand and
	result modes and use the former when deciding what the value
	of a count-bits operation should be.  Use is_int_mode instead
	of checking for a MODE_INT.  Remove redundant check for whether
	this mode has a zero precision.

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

	* optabs.c (widen_leading): Change the type of the mode argument
	to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
	(widen_bswap): Likewise.
	(expand_parity): Likewise.
	(expand_ctz): Change the type of the mode argument to scalar_int_mode.
	(expand_ffs): Likewise.
	(epand_unop): Check for scalar integer modes before calling the
	above routines.

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

	* expr.c (const_scalar_mask_from_tree): Add a mode argument.
	Expand commentary.
	(expand_expr_real_1): Update call accordingly.

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

	* expmed.c (store_bit_field_using_insv): Add op0_mode and
	value_mode arguments.  Use scalar_int_mode internally.
	(store_bit_field_1): Rename the new integer mode from imode
	to op0_mode and use it instead of GET_MODE (op0).  Update calls
	to store_split_bit_field, store_bit_field_using_insv and
	store_fixed_bit_field.
	(store_fixed_bit_field): Add op0_mode and value_mode arguments.
	Use scalar_int_mode internally.  Use a bit count rather than a mode
	when calculating the largest bit size for get_best_mode.
	Update calls to store_split_bit_field and store_fixed_bit_field_1.
	(store_fixed_bit_field_1): Add mode and value_mode arguments.
	Remove assertion that OP0 has a scalar integer mode.
	(store_split_bit_field): Add op0_mode and value_mode arguments.
	Update calls to extract_fixed_bit_field.
	(extract_bit_field_using_extv): Add an op0_mode argument.
	Use scalar_int_mode internally.
	(extract_bit_field_1): Rename the new integer mode from imode to
	op0_mode and use it instead of GET_MODE (op0).  Update calls to
	extract_split_bit_field, extract_bit_field_using_extv and
	extract_fixed_bit_field.
	(extract_fixed_bit_field): Add an op0_mode argument.  Update calls
	to extract_split_bit_field and extract_fixed_bit_field_1.
	(extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
	that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
	on the target mode.
	(extract_split_bit_field): Add an op0_mode argument.  Update call
	to extract_fixed_bit_field.

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

	* cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
	* explow.c (hard_function_value): Likewise.
	* expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
	convert_to_mode call outside the loop.
	* expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
	for the mode iterator.  Require the mode specified by max_pieces
	to exist.
	(emit_block_move_via_movmem): Use opt_scalar_int_mode for the
	mode iterator.
	(copy_blkmode_to_reg): Likewise.
	(set_storage_via_setmem): Likewise.
	* optabs.c (prepare_cmp_insn): Likewise.
	* rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
	* stor-layout.c (finish_bitfield_representative): Likewise.

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

	* rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
	* expr.c (convert_move): Use them.
	(convert_modes): Likewise.
	(store_expr_with_bounds): Likewise.

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

	* rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
	parameter for the mode of "x".  Remove the "known_x", "known_mode"
	and "known_ret" arguments.  Change the type of the mode argument
	to scalar_int_mode.
	(rtl_hooks:reg_num_sign_bit_copies): Likewise.
	* combine.c (reg_nonzero_bits_for_combine): Update accordingly.
	(reg_num_sign_bit_copies_for_combine): Likewise.
	* rtlanal.c (nonzero_bits1): Likewise.
	(num_sign_bit_copies1): Likewise.
	* rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
	(reg_num_sign_bit_copies_general): Likewise.
	* rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
	(reg_nonzero_bits_general): Likewise.

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

	* rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
	than in subroutines.  Return 1 for non-integer modes.
	(cached_num_sign_bit_copies): Change the type of the mode parameter
	to scalar_int_mode.
	(num_sign_bit_copies1): Likewise.  Remove early exit for other mode
	classes.  Handle CONST_INT_P first and then check whether X also
	has a scalar integer mode.  Check the same thing for inner registers
	of a SUBREG and for values that are being extended or truncated.

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

	* rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
	in subroutines.  Return the mode mask for non-integer modes.
	(cached_nonzero_bits): Change the type of the mode parameter
	to scalar_int_mode.
	(nonzero_bits1): Likewise.  Remove early exit for other mode
	classes.  Handle CONST_INT_P first and then check whether X
	also has a scalar integer mode.

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

	* expr.c (widest_int_mode_for_size): Make the comment match the code.
	Return a scalar_int_mode and assert that the size is greater than
	one byte.
	(by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
	(op_by_pieces_d::op_by_pieces_d): Likewise.
	(op_by_pieces_d::run): Likewise.
	(can_store_by_pieces): Likewise.

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

	* combine.c (extract_left_shift): Add a mode argument and update
	recursive calls.
	(make_compound_operation_int): Change the type of the mode parameter
	to scalar_int_mode and update the call to extract_left_shift.

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

	* combine.c (simplify_and_const_int): Change the type of the mode
	parameter to scalar_int_mode.
	(simplify_and_const_int_1): Likewise.  Update recursive call.

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

	* combine.c (simplify_compare_const): Check that the mode is a
	scalar_int_mode (rather than VOIDmode) before testing its
	precision.
	(simplify_comparison): Move COMPARISON_P handling out of the
	loop and restrict the latter part of the loop to scalar_int_modes.
	Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
	and when considering SUBREG_REGs.  Use is_int_mode instead of
	checking GET_MODE_CLASS against MODE_INT.

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

	* combine.c (try_widen_shift_mode): Move check for equal modes to...
	(simplify_shift_const_1): ...here.  Use scalar_int_mode for
	shift_unit_mode and for modes involved in scalar shifts.

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

	* combine.c (force_int_to_mode): New function, split out from...
	(force_to_mode): ...here.  Keep xmode up-to-date and use it
	instead of GET_MODE (x).

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

	* optabs-query.h (extraction_insn::struct_mode): Change type to
	opt_scalar_int_mode and update comment.
	(extraction_insn::field_mode): Change type to scalar_int_mode.
	(extraction_insn::pos_mode): Likewise.
	* combine.c (make_extraction): Update accordingly.
	* optabs-query.c (get_traditional_extraction_insn): Likewise.
	(get_optab_extraction_insn): Likewise.
	* recog.c (simplify_while_replacing): Likewise.
	* expmed.c (narrow_bit_field_mem): Change the type of the mode
	parameter to opt_scalar_int_mode.

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

	* machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
	to a scalar_int_mode instead of a machine_mode.
	(bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
	(get_best_mode): Return a boolean and use a pointer argument to store
	the selected mode.  Replace the limit mode parameter with a bit limit.
	* expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
	for the values returned by bit_field_mode_iterator::next_mode.
	(store_bit_field): Update call to get_best_mode.
	(store_fixed_bit_field): Likewise.
	(extract_fixed_bit_field): Likewise.
	* expr.c (optimize_bitfield_assignment_op): Likewise.
	* fold-const.c (optimize_bit_field_compare): Likewise.
	(fold_truth_andor_1): Likewise.
	* stor-layout.c (bit_field_mode_iterator::next_mode): As above.
	Update for new type of m_mode.
	(get_best_mode): As above.

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

	* expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
	to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
	(store_bit_field): Check is_a <scalar_int_mode> before calling
	strict_volatile_bitfield_p.
	(extract_bit_field): Likewise.

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

	* target.def (cstore_mode): Return a scalar_int_mode.
	* doc/tm.texi: Regenerate.
	* config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
	* targhooks.h (default_cstore_mode): Likewise.
	* targhooks.c (default_cstore_mode): Likewise, using a forced
	conversion.
	* expmed.c (emit_cstore): Expect the target of the cstore to be
	a scalar_int_mode.

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

	* cfgloop.h (rtx_iv): Change type of extend_mode and mode to
	scalar_int_mode.
	(niter_desc): Likewise mode.
	(iv_analyze): Add a mode parameter.
	(biv_p): Likewise.
	(iv_analyze_expr): Pass the mode paraeter before the rtx it describes
	and change its type to scalar_int_mode.
	* loop-iv.c: Update commentary at head of file.
	(iv_constant): Pass the mode paraeter before the rtx it describes
	and change its type to scalar_int_mode.  Remove VOIDmode handling.
	(iv_subreg): Change the type of the mode parameter to scalar_int_mode.
	(iv_extend): Likewise.
	(shorten_into_mode): Likewise.
	(iv_add): Use scalar_int_mode.
	(iv_mult): Likewise.
	(iv_shift): Likewise.
	(canonicalize_iv_subregs): Likewise.
	(get_biv_step_1): Pass the outer_mode parameter before the rtx
	it describes and change its mode to scalar_int_mode.   Also change
	the type of the returned inner_mode to scalar_int_mode.
	(get_biv_step): Likewise, turning outer_mode from a pointer
	into a direct parameter.  Update call to get_biv_step_1.
	(iv_analyze_biv): Add an outer_mode parameter.  Update calls to
	iv_constant and get_biv_step.
	(iv_analyze_expr): Pass the mode parameter before the rtx it describes
	and change its type to scalar_int_mode.  Don't initialise iv->mode
	to VOIDmode and remove later checks for its still being VOIDmode.
	Update calls to iv_analyze_op and iv_analyze_expr.  Check
	is_a <scalar_int_mode> when changing the mode under consideration.
	(iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
	Update call to iv_analyze_expr.
	(iv_analyze_op): Add a mode parameter.  Reject subregs whose
	inner register is not also a scalar_int_mode.  Update call to
	iv_analyze_biv.
	(iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
	(biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
	(iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
	separate mode class checks.  Update calls to iv_analyze.  Remove
	fix-up of VOIDmodes after iv_analyze_biv.
	* loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
	don't have a scalar_int_mode.  Update call to biv_p.

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

	* cfgexpand.c (convert_debug_memory_address): Use
	as_a <scalar_int_mode>.
	* combine.c (expand_compound_operation): Likewise.
	(make_extraction): Likewise.
	(change_zero_ext): Likewise.
	(simplify_comparison): Likewise.
	* cse.c (cse_insn): Likewise.
	* dwarf2out.c (minmax_loc_descriptor): Likewise.
	(mem_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	* expmed.c (init_expmed_one_mode): Likewise.
	(synth_mult): Likewise.
	(emit_store_flag_1): Likewise.
	(expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
	of a comparison with size.
	* expr.c (expand_assignment): Use as_a <scalar_int_mode>.
	(reduce_to_bit_field_precision): Likewise.
	* function.c (expand_function_end): Likewise.
	* internal-fn.c (expand_arith_overflow_result_store): Likewise.
	* loop-doloop.c (doloop_modify): Likewise.
	* optabs.c (expand_binop): Likewise.
	(expand_unop): Likewise.
	(expand_copysign_absneg): Likewise.
	(prepare_cmp_insn): Likewise.
	(maybe_legitimize_operand): Likewise.
	* recog.c (const_scalar_int_operand): Likewise.
	* rtlanal.c (get_address_mode): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_cond_clz_ctz): Likewise.
	* tree-nested.c (get_nl_goto_field): Likewise.
	* tree.c (build_vector_type_for_mode): Likewise.
	* var-tracking.c (use_narrower_mode): Likewise.

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

	* tree.h (SCALAR_INT_TYPE_MODE): New macro.
	* builtins.c (expand_builtin_signbit): Use it.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* dojump.c (do_jump): Likewise.
	(do_compare_and_jump): Likewise.
	* dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
	* expmed.c (make_tree): Likewise.
	* expr.c (expand_expr_real_2): Likewise.
	(expand_expr_real_1): Likewise.
	(try_casesi): Likewise.
	* fold-const-call.c (fold_const_call_ss): Likewise.
	* fold-const.c (unextend): Likewise.
	(extract_muldiv_1): Likewise.
	(fold_single_bit_test): Likewise.
	(native_encode_int): Likewise.
	(native_encode_string): Likewise.
	(native_interpret_int): Likewise.
	* gimple-fold.c (gimple_fold_builtin_memset): Likewise.
	* internal-fn.c (expand_addsub_overflow): Likewise.
	(expand_neg_overflow): Likewise.
	(expand_mul_overflow): Likewise.
	(expand_arith_overflow): Likewise.
	* match.pd: Likewise.
	* stor-layout.c (layout_type): Likewise.
	* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
	* tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
	* tree-ssanames.c (get_range_info): Likewise.
	* tree-switch-conversion.c (array_value_type) Likewise.
	* tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
	(vect_recog_divmod_pattern): Likewise.
	(vect_recog_mixed_size_cond_pattern): Likewise.
	* tree-vrp.c (extract_range_basic): Likewise.
	(simplify_float_conversion_using_ranges): Likewise.
	* tree.c (int_fits_type_p): Likewise.
	* ubsan.c (instrument_bool_enum_load): Likewise.
	* varasm.c (mergeable_string_section): Likewise.
	(narrowing_initializer_constant_valid_p): Likewise.
	(output_constant): Likewise.

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

	* machmode.h (NARROWEST_INT_MODE): New macro.
	* expr.c (alignment_for_piecewise_move): Use it instead of
	GET_CLASS_NARROWEST_MODE (MODE_INT).
	(push_block): Likewise.
	* stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
	Likewise.
	* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.

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

	* postreload.c (move2add_valid_value_p): Change the type of the
	mode parameter to scalar_int_mode.
	(move2add_use_add2_insn): Add a mode parameter and use it instead
	of GET_MODE (reg).
	(move2add_use_add3_insn): Likewise.
	(reload_cse_move2add): Update accordingly.

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

	* expr.c (expand_expr_real_2): Use scalar_int_mode for the
	double-word mode.
	* lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
	* optabs.c (expand_unop): Likewise.

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

	* dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
	(clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
	(popcount_loc_descriptor): Likewise.
	(bswap_loc_descriptor): Likewise.
	(rotate_loc_descriptor): Likewise.
	(mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
	calling the functions above.

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

	* combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
	checks.
	(try_combine): Likewise.
	(simplify_if_then_else): Likewise.
	* cse.c (cse_insn): Likewise.
	* dwarf2out.c (mem_loc_descriptor): Likewise.
	* emit-rtl.c (gen_lowpart_common): Likewise.
	* simplify-rtx.c (simplify_truncation): Likewise.
	(simplify_binary_operation_1): Likewise.
	(simplify_const_relational_operation): Likewise.
	(simplify_ternary_operation): Likewise.
	* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.

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

	* cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.

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

	* combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
	(make_compound_operation_int): Likewise.
	(change_zero_ext): Likewise.
	* expr.c (convert_move): Likewise.
	(convert_modes): Likewise.
	* fwprop.c (forward_propagate_subreg): Likewise.
	* loop-iv.c (get_biv_step_1): Likewise.
	* optabs.c (widen_operand): Likewise.
	* postreload.c (move2add_valid_value_p): Likewise.
	* recog.c (simplify_while_replacing): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_binary_operation_1): Likewise.  Remove redundant
	mode equality check.

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

	* combine.c (combine_simplify_rtx): Add checks for
	is_a <scalar_int_mode>.
	(simplify_if_then_else): Likewise.
	(make_field_assignment): Likewise.
	(simplify_comparison): Likewise.
	* ifcvt.c (noce_try_bitop): Likewise.
	* loop-invariant.c (canonicalize_address_mult): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.

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

	* gimple-fold.c (gimple_fold_builtin_memory_op): Use
	is_a <scalar_int_mode> instead of != BLKmode.

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

	* cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
	instead of != VOIDmode.
	* combine.c (if_then_else_cond): Likewise.
	(change_zero_ext): Likewise.
	* dwarf2out.c (mem_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	* rtlanal.c (canonicalize_condition): Likewise.
	* simplify-rtx.c (simplify_relational_operation_1): Likewise.

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

	* simplify-rtx.c (simplify_binary_operation_1): Use
	is_a <scalar_int_mode> instead of !VECTOR_MODE_P.

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

	* wide-int.h (int_traits<unsigned char>) New class.
	(int_traits<unsigned short>) Likewise.
	* cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
	Use GET_MODE_UNIT_PRECISION and remove redundant test for
	SCALAR_INT_MODE_P.
	* combine.c (set_nonzero_bits_and_sign_copies): Use
	is_a <scalar_int_mode>.
	(find_split_point): Likewise.
	(combine_simplify_rtx): Likewise.
	(simplify_logical): Likewise.
	(expand_compound_operation): Likewise.
	(expand_field_assignment): Likewise.
	(make_compound_operation): Likewise.
	(extended_count): Likewise.
	(change_zero_ext): Likewise.
	(simplify_comparison): Likewise.
	* dwarf2out.c (scompare_loc_descriptor): Likewise.
	(ucompare_loc_descriptor): Likewise.
	(minmax_loc_descriptor): Likewise.
	(mem_loc_descriptor): Likewise.
	(loc_descriptor): Likewise.
	* expmed.c (init_expmed_one_mode): Likewise.
	* lra-constraints.c (lra_constraint_offset): Likewise.
	* optabs.c (prepare_libcall_arg): Likewise.
	* postreload.c (move2add_note_store): Likewise.
	* reload.c (operands_match_p): Likewise.
	* rtl.h (load_extend_op): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* simplify-rtx.c (simplify_truncation): Likewise.
	(simplify_unary_operation_1): Likewise.
	(simplify_binary_operation_1): Likewise.
	(simplify_const_binary_operation): Likewise.
	(simplify_const_relational_operation): Likewise.
	(simplify_subreg): Likewise.
	* stor-layout.c (bitwise_mode_for_mode): Likewise.
	* var-tracking.c (adjust_mems): Likewise.
	(prepare_call_arguments): Likewise.

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

	* machmode.h (is_int_mode): New fuction.
	* combine.c (find_split_point): Use it.
	(combine_simplify_rtx): Likewise.
	(simplify_if_then_else): Likewise.
	(simplify_set): Likewise.
	(simplify_shift_const_1): Likewise.
	(simplify_comparison): Likewise.
	* config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
	* cse.c (notreg_cost): Likewise.
	(cse_insn): Likewise.
	* cselib.c (cselib_lookup_1): Likewise.
	* dojump.c (do_jump_1): Likewise.
	(do_compare_rtx_and_jump): Likewise.
	* dse.c (get_call_args): Likewise.
	* dwarf2out.c (rtl_for_decl_init): Likewise.
	(native_encode_initializer): Likewise.
	* expmed.c (emit_store_flag_1): Likewise.
	(emit_store_flag): Likewise.
	* expr.c (convert_modes): Likewise.
	(store_field): Likewise.
	(expand_expr_real_1): Likewise.
	* fold-const.c (fold_read_from_constant_string): Likewise.
	* gimple-ssa-sprintf.c (get_format_string): Likewise.
	* optabs-libfuncs.c (gen_int_libfunc): Likewise.
	* optabs.c (expand_binop): Likewise.
	(expand_unop): Likewise.
	(expand_abs_nojump): Likewise.
	(expand_one_cmpl_abs_nojump): Likewise.
	* simplify-rtx.c (mode_signbit_p): Likewise.
	(val_signbit_p): Likewise.
	(val_signbit_known_set_p): Likewise.
	(val_signbit_known_clear_p): Likewise.
	(simplify_relational_operation_1): Likewise.
	* tree.c (vector_type_mode): Likewise.

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

	* machmode.h (smallest_mode_for_size): Fix formatting.
	(smallest_int_mode_for_size): New function.
	* cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
	instead of smallest_mode_for_size.
	* combine.c (make_extraction): Likewise.
	* config/arc/arc.c (arc_expand_movmem): Likewise.
	* config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
	* config/i386/i386.c (ix86_get_mask_mode): Likewise.
	* config/s390/s390.c (s390_expand_insv): Likewise.
	* config/sparc/sparc.c (assign_int_registers): Likewise.
	* config/spu/spu.c (spu_function_value): Likewise.
	(spu_function_arg): Likewise.
	* coverage.c (get_gcov_type): Likewise.
	(get_gcov_unsigned_t): Likewise.
	* dse.c (find_shift_sequence): Likewise.
	* expmed.c (store_bit_field_1): Likewise.
	* expr.c (convert_move): Likewise.
	(store_field): Likewise.
	* internal-fn.c (expand_arith_overflow): Likewise.
	* optabs-query.c (get_best_extraction_insn): Likewise.
	* optabs.c (expand_twoval_binop_libfunc): Likewise.
	* stor-layout.c (layout_type): Likewise.
	(initialize_sizetypes): Likewise.
	* targhooks.c (default_get_mask_mode): Likewise.
	* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.

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

	* machmode.h (opt_mode::else_blk): New function.
	(int_mode_for_mode): Declare.
	* stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
	* builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
	return type.
	* cfgexpand.c (expand_debug_expr): Likewise.
	* combine.c (gen_lowpart_or_truncate): Likewise.
	(gen_lowpart_for_combine): Likewise.
	* config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
	* config/avr/avr.c (avr_to_int_mode): Likewise.
	(avr_out_plus_1): Likewise.
	(avr_out_plus): Likewise.
	(avr_out_round): Likewise.
	* config/i386/i386.c (ix86_split_to_parts): Likewise.
	* config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
	(s390_expand_vcond): Likewise.
	* config/spu/spu.c (spu_split_immediate): Likewise.
	(spu_expand_mov): Likewise.
	* dse.c (get_stored_val): Likewise.
	* expmed.c (store_bit_field_1): Likewise.
	(convert_extracted_bit_field): Use int_mode_for_mode instead of
	int_mode_for_size.
	(extract_bit_field_1): Adjust for new int_mode_for_mode return type.
	(extract_low_bits): Likewise.
	* expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
	handling rather than repeating the check.
	(emit_group_store): Likewise.
	(emit_move_via_integer): Adjust for new int_mode_for_mode return type.
	* optabs.c (expand_absneg_bit): Likewise.
	(expand_copysign_absneg): Likewise.
	(expand_copysign_bit): Likewise.
	* tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
	* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
	* tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
	* var-tracking.c (prepare_call_arguments):  Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
	int_mode_for_mode instead of mode_for_size.
	* config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.

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

	* machmode.h (int_mode_for_size): New function.
	* builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
	instead of mode_for_size.
	* calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
	explicit.
	* combine.c (expand_field_assignment): Use int_mode_for_size
	instead of mode_for_size.
	(make_extraction): Likewise.
	(simplify_shift_const_1): Likewise.
	(simplify_comparison): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (mem_loc_descriptor): Likewise.
	* emit-rtl.c (init_derived_machine_modes): Likewise.
	* expmed.c (flip_storage_order): Likewise.
	(convert_extracted_bit_field): Likewise.
	* expr.c (copy_blkmode_from_reg): Likewise.
	* graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
	* internal-fn.c (expand_mul_overflow): Likewise.
	* lower-subreg.c (simple_move): Likewise.
	* optabs-libfuncs.c (init_optabs): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	* tree.c (vector_type_mode): Likewise.
	* tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
	* tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
	* tree-vect-generic.c (expand_vector_parallel): Likewise.
	* tree-vect-stmts.c (vectorizable_load): Likewise.
	(vectorizable_store): Likewise.

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

	* coretypes.h (pod_mode): New type.
	(scalar_int_mode_pod): New typedef.
	* machmode.h (pod_mode): New class.
	(int_n_data_t::m): Change type to scalar_int_mode_pod.
	* genmodes.c (emit_mode_int_n): Update accordingly.
	* lower-subreg.h (target_lower_subreg): Change type to
	scalar_int_mode_pod.
	* gdbhooks.py (build_pretty_printer): Handle pod_mode and
	scalar_int_mode_pod.

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

	* config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
	machine_mode to scalar_int_mode.
	* config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
	(rs6000_option_override_internal): Remove cast to int.
	* config/rs6000/rs6000.h (rs6000_pmode): Change type from
	machine_mode to scalar_int_mode.
	* config/rs6000/rs6000.c (rs6000_pmode): Likewise.
	(rs6000_option_override_internal): Remove cast to int.
	* config/s390/s390.h (Pmode): Remove cast to machine_mode.
	* config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
	to machine_mode.
	* config/s390/s390.c (s390_expand_builtin): Likewise.
	* coretypes.h (scalar_int_mode): New type.
	(opt_scalar_int_mode): New typedef.
	* machmode.h (scalar_int_mode): New class.
	(scalar_int_mode::includes_p): New function.
	(byte_mode): Change type to scalar_int_mode.
	(word_mode): Likewise.
	(ptr_mode): Likewise.
	* emit-rtl.c (byte_mode): Likewise.
	(word_mode): Likewise.
	(ptr_mode): Likewise.
	(init_derived_machine_modes): Update accordingly.
	* genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
	and MODE_PARTIAL_INT.
	* gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
	opt_scalar_int_mode.

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

	* target.def (libgcc_floating_mode_supported_p): Take a
	scalar_float_mode.
	* doc/tm.texi: Regenerate.
	* targhooks.h (default_libgcc_floating_mode_supported_p): Take a
	scalar_float_mode.
	* targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
	* config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
	Likewise.

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

	* target.def (default_floatn_mode): Return an opt_scalar_float_mode.
	* doc/tm.texi: Regenerate.
	* config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
	* config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
	* config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
	* targhooks.h (default_floatn_mode): Likewise.
	* targhooks.c (default_floatn_mode): Likewise.
	* tree.c (build_common_tree_nodes): Update accordingly.

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

	* machmode.h (mode_iterator::start): Provide overload for opt_modes.
	(mode_iterator::iterate_p): Likewise.
	(mode_iterator::get_wider): Likewise.
	* expr.c (init_expr_target): Use opt_scalar_float_mode.

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

	* coretypes.h (opt_scalar_float_mode): New typedef.
	* machmode.h (float_mode_for_size): New function.
	* emit-rtl.c (double_mode): Delete.
	(init_emit_once): Use float_mode_for_size.
	* stor-layout.c (layout_type): Likewise.
	* gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.

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

	* output.h (assemble_real): Take a scalar_float_mode.
	* config/arm/arm.c (arm_assemble_integer): Update accordingly.
	* config/arm/arm.md (consttable_4): Likewise.
	(consttable_8): Likewise.
	(consttable_16): Likewise.
	* config/mips/mips.md (consttable_float): Likewise.
	* config/s390/s390.c (s390_output_pool_entry): Likewise.
	* varasm.c (assemble_real): Take a scalar_float_mode.
	(output_constant_pool_2): Update accordingly.
	(output_constant): Likewise.

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

	* tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
	* builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
	* fold-const.c (fold_convert_const_real_from_fixed): Likewise.
	(native_encode_real): Likewise.
	(native_interpret_real): Likewise.
	* hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
	* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.

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

	* optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
	<scalar_float_mode>.  Simplify.
	(gen_extend_conv_libfunc): Likewise.

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

	* coretypes.h (scalar_float_mode): New type.
	* machmode.h (mode_traits::from_int): Use machine_mode if
	USE_ENUM_MODES is defined.
	(is_a): New function.
	(as_a): Likewise.
	(dyn_cast): Likewise.
	(scalar_float_mode): New class.
	(scalar_float_mode::includes_p): New function.
	(is_float_mode): Likewise.
	* gdbhooks.py (MachineModePrinter): New class.
	(build_pretty_printer): Use it for scalar_float_mode.
	* real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
	(format_helper::format_helper): Turn into a template.
	* genmodes.c (get_mode_class): New function.
	(emit_insn_modes_h): Give modes the class returned by get_mode_class,
	or machine_mode if none.
	* config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
	as_a <scalar_float_mode>.
	* dwarf2out.c (mem_loc_descriptor): Likewise.
	(insert_float): Likewise.
	(add_const_value_attribute): Likewise.
	* simplify-rtx.c (simplify_immed_subreg): Likewise.
	* optabs.c (expand_absneg_bit): Take a scalar_float_mode.
	(expand_unop): Update accordingly.
	(expand_abs_nojump): Likewise.
	(expand_copysign_absneg): Take a scalar_float_mode.
	(expand_copysign_bit): Likewise.
	(expand_copysign): Update accordingly.

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

	* coretypes.h (opt_mode): New class.
	* machmode.h (opt_mode): Likewise.
	(opt_mode::else_void): New function.
	(opt_mode::require): Likewise.
	(opt_mode::exists): Likewise.
	(GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
	(GET_MODE_2XWIDER_MODE): Likewise.
	(mode_iterator::get_wider): Update accordingly.
	(mode_iterator::get_2xwider): Likewise.
	(mode_iterator::get_known_wider): Likewise, turning into a template.
	* combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
	forcing a wider mode to exist.
	* config/cr16/cr16.h (LONG_REG_P): Likewise.
	* rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
	* config/c6x/c6x.c (c6x_rtx_costs): Update use of
	GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
	* lower-subreg.c (init_lower_subreg): Likewise.
	* optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
	on the final iteration.
	* config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
	a wider mode exists before asking for a move pattern.
	(get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
	forcing a wider mode to exist.
	(expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
	returning false if no such mode exists.
	* config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
	* config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
	* expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
	Avoid checking for a MODE_INT if we already know the mode is not a
	SCALAR_INT_MODE_P.
	(extract_high_half): Update use of GET_MODE_WIDER_MODE,
	forcing a wider mode to exist.
	(expmed_mult_highpart_optab): Likewise.
	(expmed_mult_highpart): Likewise.
	* expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
	using else_void.
	* lto-streamer-in.c (lto_input_mode_table): Likewise.
	* optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
	* stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
	* internal-fn.c (expand_mul_overflow): Update use of
	GET_MODE_2XWIDER_MODE.
	* omp-low.c (omp_clause_aligned_alignment): Likewise.
	* tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
	GET_MODE_WIDER_MODE.
	(convert_plusminus_to_widen): Likewise.
	* tree-switch-conversion.c (array_value_type): Likewise.
	* var-tracking.c (emit_note_insn_var_location): Likewise.
	* tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
	Return false inside rather than outside the loop if no wider mode
	exists
	* optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
	and GET_MODE_2XWIDER_MODE
	(can_compare_p): Use else_void.
	* gdbhooks.py (OptMachineModePrinter): New class.
	(build_pretty_printer): Use it for opt_mode.

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

	* tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
	once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.

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

	* machmode.h (mode_traits): New structure.
	(get_narrowest_mode): New function.
	(mode_iterator::start): Likewise.
	(mode_iterator::iterate_p): Likewise.
	(mode_iterator::get_wider): Likewise.
	(mode_iterator::get_known_wider): Likewise.
	(mode_iterator::get_2xwider): Likewise.
	(FOR_EACH_MODE_IN_CLASS): New mode iterator.
	(FOR_EACH_MODE): Likewise.
	(FOR_EACH_MODE_FROM): Likewise.
	(FOR_EACH_MODE_UNTIL): Likewise.
	(FOR_EACH_WIDER_MODE): Likewise.
	(FOR_EACH_2XWIDER_MODE): Likewise.
	* builtins.c (expand_builtin_strlen): Use new mode iterators.
	* combine.c (simplify_comparison): Likewise
	* config/i386/i386.c (type_natural_mode): Likewise.
	* cse.c (cse_insn): Likewise.
	* dse.c (find_shift_sequence): Likewise.
	* emit-rtl.c (init_derived_machine_modes): Likewise.
	(init_emit_once): Likewise.
	* explow.c (hard_function_value): Likewise.
	* expmed.c (extract_fixed_bit_field_1): Likewise.
	(extract_bit_field_1): Likewise.
	(expand_divmod): Likewise.
	(emit_store_flag_1): Likewise.
	* expr.c (init_expr_target): Likewise.
	(convert_move): Likewise.
	(alignment_for_piecewise_move): Likewise.
	(widest_int_mode_for_size): Likewise.
	(emit_block_move_via_movmem): Likewise.
	(copy_blkmode_to_reg): Likewise.
	(set_storage_via_setmem): Likewise.
	(compress_float_constant): Likewise.
	* omp-low.c (omp_clause_aligned_alignment): Likewise.
	* optabs-query.c (get_best_extraction_insn): Likewise.
	* optabs.c (expand_binop): Likewise.
	(expand_twoval_unop): Likewise.
	(expand_twoval_binop): Likewise.
	(widen_leading): Likewise.
	(widen_bswap): Likewise.
	(expand_parity): Likewise.
	(expand_unop): Likewise.
	(prepare_cmp_insn): Likewise.
	(prepare_float_lib_cmp): Likewise.
	(expand_float): Likewise.
	(expand_fix): Likewise.
	(expand_sfix_optab): Likewise.
	* postreload.c (move2add_use_add2_insn): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	* reginfo.c (choose_hard_reg_mode): Likewise.
	* rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
	* stor-layout.c (mode_for_size): Likewise.
	(smallest_mode_for_size): Likewise.
	(mode_for_vector): Likewise.
	(finish_bitfield_representative): Likewise.
	* tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
	* tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
	* tree-vect-stmts.c (vectorizable_conversion): Likewise.
	* var-tracking.c (prepare_call_arguments): Likewise.

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

	* genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
	* genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
	USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
	* machmode.h (mode_size): Move earlier in file.
	(mode_precision): Likewise.
	(mode_inner): Likewise.
	(mode_nunits): Likewise.
	(mode_unit_size): Likewise.
	(unit_unit_precision): Likewise.
	(mode_wider): Likewise.
	(mode_2xwider): Likewise.
	(machine_mode): New class.
	(mode_to_bytes): New function.
	(mode_to_bits): Likewise.
	(mode_to_precision): Likewise.
	(mode_to_inner): Likewise.
	(mode_to_unit_size): Likewise.
	(mode_to_unit_precision): Likewise.
	(mode_to_nunits): Likewise.
	(GET_MODE_SIZE): Use mode_to_bytes.
	(GET_MODE_BITSIZE): Use mode_to_bits.
	(GET_MODE_PRECISION): Use mode_to_precision.
	(GET_MODE_INNER): Use mode_to_inner.
	(GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
	(GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
	(GET_MODE_NUNITS): Use mode_to_nunits.
	* system.h (ALWAYS_INLINE): New macro.
	* config/powerpcspe/powerpcspe-c.c
	(altivec_resolve_overloaded_builtin): Use machine_mode instead of
	int for arg1_mode and arg2_mode.

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

	* config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
	Prefix mode names with E_ in case statements.
	* config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
	(aarch64_split_simd_move): Likewise.
	(aarch64_gen_storewb_pair): Likewise.
	(aarch64_gen_loadwb_pair): Likewise.
	(aarch64_gen_store_pair): Likewise.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_get_condition_code_1): Likewise.
	(aarch64_constant_pool_reload_icode): Likewise.
	(get_rsqrte_type): Likewise.
	(get_rsqrts_type): Likewise.
	(get_recpe_type): Likewise.
	(get_recps_type): Likewise.
	(aarch64_gimplify_va_arg_expr): Likewise.
	(aarch64_simd_container_mode): Likewise.
	(aarch64_emit_load_exclusive): Likewise.
	(aarch64_emit_store_exclusive): Likewise.
	(aarch64_expand_compare_and_swap): Likewise.
	(aarch64_gen_atomic_cas): Likewise.
	(aarch64_emit_bic): Likewise.
	(aarch64_emit_atomic_swap): Likewise.
	(aarch64_emit_atomic_load_op): Likewise.
	(aarch64_evpc_trn): Likewise.
	(aarch64_evpc_uzp): Likewise.
	(aarch64_evpc_zip): Likewise.
	(aarch64_evpc_ext): Likewise.
	(aarch64_evpc_rev): Likewise.
	(aarch64_evpc_dup): Likewise.
	(aarch64_gen_ccmp_first): Likewise.
	(aarch64_gen_ccmp_next): Likewise.
	* config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
	(alpha_emit_xfloating_libcall): Likewise.
	(emit_insxl): Likewise.
	(alpha_arg_type): Likewise.
	* config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
	(arc_preferred_simd_mode): Likewise.
	(arc_secondary_reload): Likewise.
	(get_arc_condition_code): Likewise.
	(arc_print_operand): Likewise.
	(arc_legitimate_constant_p): Likewise.
	* config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/arc/arc.md (casesi_load): Likewise.
	(casesi_compact_jump): Likewise.
	* config/arc/predicates.md (proper_comparison_operator): Likewise.
	(cc_use_register): Likewise.
	* config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
	(arm_init_iwmmxt_builtins): Likewise.
	* config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
	(neon_expand_vector_init): Likewise.
	(arm_attr_length_move_neon): Likewise.
	(maybe_get_arm_condition_code): Likewise.
	(arm_emit_vector_const): Likewise.
	(arm_preferred_simd_mode): Likewise.
	(arm_output_iwmmxt_tinsr): Likewise.
	(thumb1_output_casesi): Likewise.
	(thumb2_output_casesi): Likewise.
	(arm_emit_load_exclusive): Likewise.
	(arm_emit_store_exclusive): Likewise.
	(arm_expand_compare_and_swap): Likewise.
	(arm_evpc_neon_vuzp): Likewise.
	(arm_evpc_neon_vzip): Likewise.
	(arm_evpc_neon_vrev): Likewise.
	(arm_evpc_neon_vtrn): Likewise.
	(arm_evpc_neon_vext): Likewise.
	(arm_validize_comparison): Likewise.
	* config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
	* config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
	* config/avr/avr.c (avr_rtx_costs_1): Likewise.
	* config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
	(c6x_preferred_simd_mode): Likewise.
	* config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
	(epiphany_rtx_costs): Likewise.
	* config/epiphany/predicates.md (proper_comparison_operator):
	Likewise.
	* config/frv/frv.c (condexec_memory_operand): Likewise.
	(frv_emit_move): Likewise.
	(output_move_single): Likewise.
	(output_condmove_single): Likewise.
	(frv_hard_regno_mode_ok): Likewise.
	(frv_matching_accg_mode): Likewise.
	* config/h8300/h8300.c (split_adds_subs): Likewise.
	(h8300_rtx_costs): Likewise.
	(h8300_print_operand): Likewise.
	(compute_mov_length): Likewise.
	(output_logical_op): Likewise.
	(compute_logical_op_length): Likewise.
	(compute_logical_op_cc): Likewise.
	(h8300_shift_needs_scratch_p): Likewise.
	(output_a_shift): Likewise.
	(compute_a_shift_length): Likewise.
	(compute_a_shift_cc): Likewise.
	(expand_a_rotate): Likewise.
	(output_a_rotate): Likewise.
	* config/i386/i386.c (classify_argument): Likewise.
	(function_arg_advance_32): Likewise.
	(function_arg_32): Likewise.
	(function_arg_64): Likewise.
	(function_value_64): Likewise.
	(ix86_gimplify_va_arg): Likewise.
	(ix86_legitimate_constant_p): Likewise.
	(put_condition_code): Likewise.
	(split_double_mode): Likewise.
	(ix86_avx256_split_vector_move_misalign): Likewise.
	(ix86_expand_vector_logical_operator): Likewise.
	(ix86_split_idivmod): Likewise.
	(ix86_expand_adjust_ufix_to_sfix_si): Likewise.
	(ix86_build_const_vector): Likewise.
	(ix86_build_signbit_mask): Likewise.
	(ix86_match_ccmode): Likewise.
	(ix86_cc_modes_compatible): Likewise.
	(ix86_expand_branch): Likewise.
	(ix86_expand_sse_cmp): Likewise.
	(ix86_expand_sse_movcc): Likewise.
	(ix86_expand_int_sse_cmp): Likewise.
	(ix86_expand_vec_perm_vpermi2): Likewise.
	(ix86_expand_vec_perm): Likewise.
	(ix86_expand_sse_unpack): Likewise.
	(ix86_expand_int_addcc): Likewise.
	(ix86_split_to_parts): Likewise.
	(ix86_vectorize_builtin_gather): Likewise.
	(ix86_vectorize_builtin_scatter): Likewise.
	(avx_vpermilp_parallel): Likewise.
	(inline_memory_move_cost): Likewise.
	(ix86_tieable_integer_mode_p): Likewise.
	(x86_maybe_negate_const_int): Likewise.
	(ix86_expand_vector_init_duplicate): Likewise.
	(ix86_expand_vector_init_one_nonzero): Likewise.
	(ix86_expand_vector_init_one_var): Likewise.
	(ix86_expand_vector_init_concat): Likewise.
	(ix86_expand_vector_init_interleave): Likewise.
	(ix86_expand_vector_init_general): Likewise.
	(ix86_expand_vector_set): Likewise.
	(ix86_expand_vector_extract): Likewise.
	(emit_reduc_half): Likewise.
	(ix86_emit_i387_round): Likewise.
	(ix86_mangle_type): Likewise.
	(ix86_expand_round_sse4): Likewise.
	(expand_vec_perm_blend): Likewise.
	(canonicalize_vector_int_perm): Likewise.
	(ix86_expand_vec_one_operand_perm_avx512): Likewise.
	(expand_vec_perm_1): Likewise.
	(expand_vec_perm_interleave3): Likewise.
	(expand_vec_perm_even_odd_pack): Likewise.
	(expand_vec_perm_even_odd_1): Likewise.
	(expand_vec_perm_broadcast_1): Likewise.
	(ix86_vectorize_vec_perm_const_ok): Likewise.
	(ix86_expand_vecop_qihi): Likewise.
	(ix86_expand_mul_widen_hilo): Likewise.
	(ix86_expand_sse2_abs): Likewise.
	(ix86_expand_pextr): Likewise.
	(ix86_expand_pinsr): Likewise.
	(ix86_preferred_simd_mode): Likewise.
	(ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
	* config/i386/sse.md (*andnot<mode>3): Likewise.
	(<mask_codefor><code><mode>3<mask_name>): Likewise.
	(*<code><mode>3): Likewise.
	* config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
	(ia64_expand_atomic_op): Likewise.
	(ia64_arg_type): Likewise.
	(ia64_mode_to_int): Likewise.
	(ia64_scalar_mode_supported_p): Likewise.
	(ia64_vector_mode_supported_p): Likewise.
	(expand_vec_perm_broadcast): Likewise.
	* config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
	(iq2000_function_arg_advance): Likewise.
	(iq2000_function_arg): Likewise.
	* config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
	* config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
	(m68k_libcall_value): Likewise.
	(m68k_function_value): Likewise.
	(sched_attr_op_type): Likewise.
	* config/mcore/mcore.c (mcore_output_move): Likewise.
	* config/microblaze/microblaze.c (microblaze_function_arg_advance):
	Likewise.
	(microblaze_function_arg): Likewise.
	* config/mips/mips.c (mips16_build_call_stub): Likewise.
	(mips_print_operand): Likewise.
	(mips_mode_ok_for_mov_fmt_p): Likewise.
	(mips_vector_mode_supported_p): Likewise.
	(mips_preferred_simd_mode): Likewise.
	(mips_expand_vpc_loongson_even_odd): Likewise.
	(mips_expand_vec_unpack): Likewise.
	(mips_expand_vi_broadcast): Likewise.
	(mips_expand_vector_init): Likewise.
	(mips_expand_vec_reduc): Likewise.
	(mips_expand_msa_cmp): Likewise.
	* config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
	* config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
	(cc_flags_for_mode): Likewise.
	* config/msp430/msp430.c (msp430_print_operand): Likewise.
	* config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
	(nds32_output_casesi_pc_relative): Likewise.
	* config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
	(nvptx_gen_unpack): Likewise.
	(nvptx_gen_pack): Likewise.
	(nvptx_gen_shuffle): Likewise.
	(nvptx_gen_wcast): Likewise.
	(nvptx_preferred_simd_mode): Likewise.
	* config/pa/pa.c (pa_secondary_reload): Likewise.
	* config/pa/predicates.md (base14_operand): Likewise.
	* config/powerpcspe/powerpcspe-c.c
	(altivec_resolve_overloaded_builtin): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
	Likewise.
	(rs6000_preferred_simd_mode): Likewise.
	(output_vec_const_move): Likewise.
	(rs6000_expand_vector_extract): Likewise.
	(rs6000_split_vec_extract_var): Likewise.
	(reg_offset_addressing_ok_p): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_emit_set_const): Likewise.
	(rs6000_const_vec): Likewise.
	(rs6000_emit_move): Likewise.
	(spe_build_register_parallel): Likewise.
	(rs6000_darwin64_record_arg_recurse): Likewise.
	(swap_selector_for_mode): Likewise.
	(spe_init_builtins): Likewise.
	(paired_init_builtins): Likewise.
	(altivec_init_builtins): Likewise.
	(do_load_for_compare): Likewise.
	(rs6000_generate_compare): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(emit_load_locked): Likewise.
	(emit_store_conditional): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_function_value): Likewise.
	(emit_fusion_gpr_load): Likewise.
	(emit_fusion_p9_load): Likewise.
	(emit_fusion_p9_store): Likewise.
	* config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
	(fusion_gpr_mem_load): Likewise.
	(fusion_addis_mem_combo_load): Likewise.
	(fusion_addis_mem_combo_store): Likewise.
	* config/rs6000/predicates.md (easy_fp_constant): Likewise.
	(fusion_gpr_mem_load): Likewise.
	(fusion_addis_mem_combo_load): Likewise.
	(fusion_addis_mem_combo_store): Likewise.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Likewise.
	* config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
	* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
	(rs6000_preferred_simd_mode): Likewise.
	(output_vec_const_move): Likewise.
	(rs6000_expand_vector_extract): Likewise.
	(rs6000_split_vec_extract_var): Likewise.
	(reg_offset_addressing_ok_p): Likewise.
	(rs6000_legitimate_offset_address_p): Likewise.
	(rs6000_legitimize_address): Likewise.
	(rs6000_emit_set_const): Likewise.
	(rs6000_const_vec): Likewise.
	(rs6000_emit_move): Likewise.
	(rs6000_darwin64_record_arg_recurse): Likewise.
	(swap_selector_for_mode): Likewise.
	(paired_init_builtins): Likewise.
	(altivec_init_builtins): Likewise.
	(rs6000_expand_float128_convert): Likewise.
	(emit_load_locked): Likewise.
	(emit_store_conditional): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_function_value): Likewise.
	(emit_fusion_gpr_load): Likewise.
	(emit_fusion_p9_load): Likewise.
	(emit_fusion_p9_store): Likewise.
	* config/rx/rx.c (rx_gen_move_template): Likewise.
	(flags_from_mode): Likewise.
	* config/s390/predicates.md (s390_alc_comparison): Likewise.
	(s390_slb_comparison): Likewise.
	* config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
	(s390_vector_mode_supported_p): Likewise.
	(s390_cc_modes_compatible): Likewise.
	(s390_match_ccmode_set): Likewise.
	(s390_canonicalize_comparison): Likewise.
	(s390_emit_compare_and_swap): Likewise.
	(s390_branch_condition_mask): Likewise.
	(s390_rtx_costs): Likewise.
	(s390_secondary_reload): Likewise.
	(__SECONDARY_RELOAD_CASE): Likewise.
	(s390_expand_cs): Likewise.
	(s390_preferred_simd_mode): Likewise.
	* config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
	* config/sh/sh.c (sh_print_operand): Likewise.
	(dump_table): Likewise.
	(sh_secondary_reload): Likewise.
	* config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/sh/sh.md (casesi_worker_1): Likewise.
	(casesi_worker_2): Likewise.
	* config/sparc/predicates.md (icc_comparison_operator): Likewise.
	(fcc_comparison_operator): Likewise.
	* config/sparc/sparc.c (sparc_expand_move): Likewise.
	(emit_soft_tfmode_cvt): Likewise.
	(sparc_preferred_simd_mode): Likewise.
	(output_cbranch): Likewise.
	(sparc_print_operand): Likewise.
	(sparc_expand_vec_perm_bmask): Likewise.
	(vector_init_bshuffle): Likewise.
	* config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
	(spu_vector_mode_supported_p): Likewise.
	(spu_expand_insv): Likewise.
	(spu_emit_branch_or_set): Likewise.
	(spu_handle_vector_attribute): Likewise.
	(spu_builtin_splats): Likewise.
	(spu_builtin_extract): Likewise.
	(spu_builtin_promote): Likewise.
	(spu_expand_sign_extend): Likewise.
	* config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
	(tilegx_simd_int): Likewise.
	* config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
	(tilepro_simd_int): Likewise.
	* config/v850/v850.c (const_double_split): Likewise.
	(v850_print_operand): Likewise.
	(ep_memory_offset): Likewise.
	* config/vax/vax.c (vax_rtx_costs): Likewise.
	(vax_output_int_move): Likewise.
	(vax_output_int_add): Likewise.
	(vax_output_int_subtract): Likewise.
	* config/visium/predicates.md (visium_branch_operator): Likewise.
	* config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
	(visium_print_operand_address): Likewise.
	* config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
	* config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
	(xtensa_expand_conditional_branch): Likewise.
	(xtensa_copy_incoming_a7): Likewise.
	(xtensa_output_literal): Likewise.
	* dfp.c (decimal_real_maxval): Likewise.
	* targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.

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

	* genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
	(mode_nunits_inline): Likewise.
	(mode_inner_inline): Likewise.
	(mode_unit_size_inline): Likewise.
	(mode_unit_precision_inline): Likewise.
	(emit_insn_modes_h): Likewise.  Also emit a #define of the
	unprefixed name.
	(emit_mode_wider): Add an E_ prefix to mode names.
	(emit_mode_complex): Likewise.
	(emit_mode_inner): Likewise.
	(emit_mode_adjustments): Likewise.
	(emit_mode_int_n): Likewise.
	* config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
	(v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
	(v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
	(si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
	(CRC32_BUILTIN, ENTRY): Likewise.
	* config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
	(aarch64_pop_regs): Likewise.
	(aarch64_process_components): Likewise.
	* config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
	* config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
	(v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
	(v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
	* config/arm/arm.c (arm_init_libfuncs): Likewise.
	* config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
	Likewise.
	* config/i386/i386-builtin.def (pcmpestr): Likewise.
	(pcmpistr): Likewise.
	* config/microblaze/microblaze.c (double_memory_operand): Likewise.
	* config/mmix/mmix.c (mmix_output_condition): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
	Likewise.
	* config/rl78/rl78.c (mduc_regs): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
	(htm_expand_builtin): Likewise.
	* config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
	* config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
	* config/xtensa/xtensa.c (print_operand): Likewise.
	* expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
	(NUM_MODE_VECTOR_INT): Likewise.
	* genoutput.c (null_operand): Likewise.
	(output_operand_data): Likewise.
	* genrecog.c (print_parameter_value): Likewise.
	* lra.c (debug_operand_data): Likewise.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>

	* dwarf2out.c (scompare_loc_descriptor_wide)
	(scompare_loc_descriptor_narrow): New functions, split out from...
	(scompare_loc_descriptor): ...here.
	* expmed.c (emit_store_flag_int): New function, split out from...
	(emit_store_flag): ...here.

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

	* dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
	(dwarf2out_early_finish): Move setting of AT_pubnames from
	early debug output to early finish.

2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>

	* gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
	and -mdata-region to the assembler.

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

	* dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
	attributes.
	(gen_subprogram_die): Add DW_AT_object_pointer only early.
	(dwarf2out_early_global_decl): Only generate a DIE for the
	abstract origin if it doesn't already exist or is a declaration DIE.
	(resolve_addr): Do not add the linkage name twice when
	generating a stub DIE for the DW_TAG_GNU_call_site target.

2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>

	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Use machine_mode rather than int for arg1_mode.

2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/82015
	* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
	that the second argument of the built-in functions to unpack
	128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
	switch statement instead a lot of if statements.
	* config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
	Allow 64-bit values to be in Altivec registers as well as
	traditional floating point registers.
	(pack<mode>, FMOVE128_VSX iterator): Likewise.

2017-08-29  Alexander Monakov  <amonakov@ispras.ru>

	* ira-costs.c (record_address_regs): Handle both operands of PLUS for
	MAX_REGS_PER_ADDRESS == 1.

2017-08-29  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.opt (flag_fentry): Do not init to -1.
	* config/i386/i386.c (ix86_option_override_internal): Simplify
	setting of opts->x_flag_entry.

2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
	    Jakub Jelinek  <jakub@redhat.com>
	    Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81503
	* gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
	folded constant fits in the target type; reorder tests for clarity.

2017-08-29  Martin Liska  <mliska@suse.cz>

	* passes.def: Include pass_lower_switch.
	* stmt.c (dump_case_nodes): Remove and move to
	tree-switch-conversion.
	(case_values_threshold): Likewise.
	(expand_switch_as_decision_tree_p): Likewise.
	(emit_case_decision_tree): Likewise.
	(expand_case): Likewise.
	(balance_case_nodes): Likewise.
	(node_has_low_bound): Likewise.
	(node_has_high_bound): Likewise.
	(node_is_bounded): Likewise.
	(emit_case_nodes): Likewise.
	(struct simple_case_node): New struct.
	(add_case_node): Remove.
	(emit_case_dispatch_table): Use vector instead of case_list.
	(reset_out_edges_aux): Remove.
	(compute_cases_per_edge): Likewise.
	(expand_case): Build list of simple_case_node.
	(expand_sjlj_dispatch_table): Use it.
	* tree-switch-conversion.c (struct case_node): Moved from
	stmt.c and adjusted.
	(emit_case_nodes): Likewise.
	(node_has_low_bound): Likewise.
	(node_has_high_bound): Likewise.
	(node_is_bounded): Likewise.
	(case_values_threshold): Likewise.
	(reset_out_edges_aux): Likewise.
	(compute_cases_per_edge): Likewise.
	(add_case_node): Likewise.
	(dump_case_nodes): Likewise.
	(balance_case_nodes): Likewise.
	(expand_switch_as_decision_tree_p): Likewise.
	(emit_jump): Likewise.
	(emit_case_decision_tree): Likewise.
	(try_switch_expansion): Likewise.
	(do_jump_if_equal): Likewise.
	(emit_cmp_and_jump_insns): Likewise.
	(fix_phi_operands_for_edge): New function.
	(record_phi_operand_mapping): Likewise.
	(class pass_lower_switch): New pass.
	(pass_lower_switch::execute): New function.
	(make_pass_lower_switch): Likewise.
	(conditional_probability):
	* timevar.def: Add TV_TREE_SWITCH_LOWERING.
	* tree-pass.h: Add make_pass_lower_switch.

2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>

	PR target/80993
	* gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
	handlers as used.

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

	* dwarf2out.c (add_dwarf_attr): When checking is enabled verify
	we do not add a DW_AT_inline attribute twice.
	(gen_subprogram_die): Remove code setting DW_AT_inline on
	DECL_ABSTRACT_P nodes.

2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>

	* gimplify.c (gimplify_call_expr): Copy the nothrow flag to
	calls to internal functions.
	(gimplify_modify_expr): Likewise.
	* tree-call-cdce.c (use_internal_fn): Likewise.
	* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
	(convert_to_divmod): Set the nothrow flag.
	* tree-if-conv.c (predicate_mem_writes):  Likewise.
	* tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
	(vectorizable_call): Likewise.
	(vectorizable_store): Likewise.
	(vectorizable_load): Likewise.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
	(vect_recog_mask_conversion_pattern): Likewise.

2017-08-29  Martin Liska  <mliska@suse.cz>

	PR other/39851
	* gcc.c (driver_handle_option): Add new argument.
	* opts-common.c (handle_option): Pass
	target_option_override_hook.
	* opts-global.c (lang_handle_option): Add new option.
	(set_default_handlers):  Add new argument.
	(decode_options): Likewise.
	* opts.c (target_handle_option): Likewise.
	(common_handle_option): Call target_option_override_hook.
	* opts.h (struct cl_option_handler_func): Add hook for
	target option override.
	(struct cl_option_handlers): Likewise.
	(set_default_handlers): Add new argument.
	(decode_options): Likewise.
	(common_handle_option): Likewise.
	(target_handle_option): Likewise.
	* toplev.c (toplev::main): Pass targetm.target_option.override
	hook.

2017-08-29  Richard Biener  <rguenther@suse.de>
	Dominik Infuehr <dominik.infuehr@theobroma-systems.com>

	* tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
	life to the active subtree.

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

	* tree-ssa-dom.c (edge_info::record_simple_equiv): Call
	derive_equivalences.
	(derive_equivalences_from_bit_ior, record_temporary_equivalences):
	Code moved into....
	(edge_info::derive_equivalences): New private member function

	* tree-ssa-dom.c (class edge_info): Changed from a struct
	to a class.  Add ctor/dtor, methods and data members.
	(edge_info::edge_info): Renamed from allocate_edge_info.
	Initialize additional members.
	(edge_info::~edge_info): New.
	(free_dom_edge_info): Delete the edge info.
	(record_edge_info): Use new class & associated member functions.
	Tighten forms for testing for edge equivalences.
	(record_temporary_equivalences): Iterate over the simple
	equivalences rather than assuming there's only one per edge.
	(cprop_into_successor_phis): Iterate over the simple
	equivalences rather than assuming there's only one per edge.
	(optimize_stmt): Use operand_equal_p rather than pointer
	equality for mini-DSE code.

2017-08-28  Nathan Sidwell  <nathan@acm.org>

	* gcc.c (execute): Fold SIGPIPE handling into switch
	statement.  Adjust internal error message.

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

	PR debug/81993
	* dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
	Do nothing for removed DIEs.

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

	PR tree-optimization/81977
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
	memcpy.

2017-08-28  Alexander Monakov  <amonakov@ispras.ru>

	PR target/80640
	* doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
	* optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
	using targetm.gen_mem_thread_fence.

2017-08-27  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81995
	* config/i386/i386.md (*<btsc><mode>): Change operand 2
	predicate to register_operand.  Reorder operands.
	(*btr<mode>): Ditto.
	(*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
	(*btr<mode>_mask): Ditto.

2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>

	* config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
	* config/rs6000/xmmintrin.h: New file.
	* config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.

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

	PR target/81504
	* config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
	parameter and_insn and return it.
	(recombine_lvx_pattern): Insert a copy to ensure availability of
	the base register of the copied masking operation at the point of
	the instruction replacement.
	(recombine_stvx_pattern): Likewise.

2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
	undocumented switches.
	(-mpower9-dform-vector): Likewise.
	(-mpower9-dform): Likewise.
	* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
	comments to delete references to -mpower9-dform* switches.
	* config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
	Delete reference to -mpower9-dform* switches, test for
	-mpower9-vector instead.
	* config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
	(OTHER_P9_VECTOR_MASKS): Likewise.
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
	tests against -mpower9-dform* to -mpower9-vector.  Delete code
	that checked for -mpower9-dform* consistancy with other options.
	Add test for -mpower9-misc to enable other power9 switches.
	(rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_option_override_internal): Likewise.
	(rs6000_emit_prologue): Likewise.
	(rs6000_emit_epilogue): Likewise.
	(rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
	(rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
	(emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
	-mpower9-vector.
	(emit_fusion_p9_store): Likewise.
	* config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
	resetting these macros if the assembler does not support ISA 3.0
	instructions.
	(TARGET_P9_DFORM_VECTOR): Likewise.
	* config/rs6000/rs6000.md (peepholes to optimize altivec memory):
	Change to use -mpower9-vector instead of -mpower9-dform-scalar.

2017-08-25  Alan Modra  <amodra@gmail.com>

	PR rtl-optimization/81747
	* cse.c (cse_extended_basic_block): Don't attempt to record
	equivalences for degenerate conditional branches that branch
	to their fall-through.

2017-08-24  Martin Sebor  <msebor@redhat.com>

	PR middle-end/81908
	* gimple-fold.c (size_must_be_zero_p): New function.
	(gimple_fold_builtin_memory_op): Call it.

2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>

	* config/rs6000/mm_malloc.h: New file.

2017-08-24  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/81913
	* tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
	analysis when either IVs in condition can wrap.

2017-08-24  Uros Bizjak  <ubizjak@gmail.com>

	* dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
	* dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.

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

	PR target/81921
	* targhooks.c (default_target_can_inline_p): Properly
	use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
	is present and always compare.
	* config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
	infer -mfpmath=sse from TARGET_SSE_P.
	(ix86_can_inline_p): Properly use target_option_default_node when
	no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.

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

	PR debug/81936
	* dwarf2out.c (output_die): Handle flag_generate_offload like
	flag_generate_lto.
	(output_comp_unit): Likewise.
	(gen_array_type_die): Likewise.
	(dwarf2out_early_finish): Likewise.
	(note_variable_value_in_expr): Likewise.
	(dwarf2out_finish): Likewise.  Adjust assert.
	* cgraphunit.c (symbol_table::compile): Move setting of
	flag_generate_offload earlier ...
	(symbol_table::finalize_compilation_unit): ... here, before
	early debug finalization.

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

	* config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
	and ipa-fnsummary.h.
	(ix86_can_inline_p): When ix86_fpmath flags do not match
	check whether the callee uses FP math at all.

2017-08-24  Aldy Hernandez  <aldyh@redhat.com>

	PR middle-end/81931
	* tree-ssanames.c (get_nonzero_bits): Use element_precision
	instead of TYPE_PRECISION.

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

	* combine.c (make_extraction): Use subreg_offset_from_lsb.

2017-08-23  Daniel Santos  <daniel.santos@pobox.com>

	* config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
	Remove field.
	(ix86_frame::stack_realign_allocate): New field.
	(struct machine_frame_state): Modify comments.
	(machine_frame_state::sp_realigned_fp_end): New field.
	* config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
	layout calculation.
	(sp_valid_at): Add assertion to assure no attempt to access invalid
	offset of a realigned stack.
	(fp_valid_at): Likewise.
	(choose_baseaddr): Modify comments.
	(ix86_emit_outlined_ms2sysv_save): Adjust to changes in
	ix86_expand_prologue.
	(ix86_expand_prologue): Modify stack realignment and allocation.
	(ix86_expand_epilogue): Modify comments.
	* doc/sourcebuild.texi: Add documentation for target selectors avx2,
	avx2_runtime, avx512f, and avx512f_runtime.

2017-08-23  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.opt: Remove unneeded Init(0) initializations.
	(mstackrealign): Do not init to -1.
	* config/i386/i386.c (ix86_option_override_internal):
	Check opts_set, not opts when setting default value of
	opts->x_ix86_force_align_arg_pointer.

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

	* function.c (fndecl_name): Use verbosity 1 (no arguments) for
	lang_hooks.decl_printable_name.
	* print-rtl-function.c (print_rtx_function): Likewise.
	* tree-pretty-print.c (dump_function_header): Likewise.

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

	PR lto/81940
	* dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
	-g0 at compile-time.

2017-08-23  Tamar Christina  <tamar.christina@arm.com>

	PR middle-end/19706
	* doc/sourcebuild.texi (Other hardware attributes):
	Document xorsign.

2017-08-23  Tamar Christina  <tamar.christina@arm.com>

	PR middle-end/19706
	* tree-ssa-math-opts.c (convert_expand_mult_copysign):
	Fix single-use check.

2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.

2017-08-22  Daniel Santos  <daniel.santos@pobox.com>

	* doc/install.texi: Modify to add more details on running selected
	tests.

2017-08-22  Daniel Santos  <daniel.santos@pobox.com>

	* config/i386/i386.c (ix86_option_override_internal): Error when -mx32
	is combined with -mabi=ms.
	(ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
	ms_abi.

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

	PR tree-optimization/81488
	* gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
	and cached_basis fields.
	(MAX_SPREAD): New constant.
	(alloc_cand_and_find_basis): Initialize new fields.
	(clear_visited): New function.
	(create_phi_basis_1): Rename from create_phi_basis, set visited
	and cached_basis fields.
	(create_phi_basis): New wrapper function.
	(phi_add_costs_1): Rename from phi_add_costs, add spread
	parameter, set visited field, short-circuit when limits reached.
	(phi_add_costs): New wrapper function.
	(record_phi_increments_1): Rename from record_phi_increments, set
	visited field.
	(record_phi_increments): New wrapper function.
	(phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
	(phi_incr_cost): New wrapper function.
	(all_phi_incrs_profitable_1): Rename from
	all_phi_incrs_profitable, set visited field.
	(all_phi_incrs_profitable): New wrapper function.

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

	* rtl.h (paradoxical_subreg_p): Define inline, and add a version
	that takes the outer and inner modes.
	* doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
	comparison as the canonical test for a paradoxical subreg.
	* combine.c (simplify_set): Use paradoxical_subreg_p.
	(make_extraction): Likewise.
	(force_to_mode): Likewise.
	(rtx_equal_for_field_assignment_p): Likewise.
	(gen_lowpart_for_combine): Likewise.
	(simplify_comparison): Likewise.
	* cse.c (equiv_constant): Likewise.
	* expmed.c (store_bit_field_1): Likewise.
	* final.c (alter_subreg): Likewise.
	* fwprop.c (propagate_rtx): Likewise.
	(forward_propagate_subreg): Likewise.
	* ira-conflicts.c (ira_build_conflicts): Likewise.
	* lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
	* lra-constraints.c (curr_insn_transform): Likewise.
	(split_reg): Likewise.
	* lra-eliminations.c (move_plus_up): Likewise.
	(lra_eliminate_regs_1): Likewise.
	* recog.c (general_operand): Likewise.
	* ree.c (combine_reaching_defs): Likewise.
	* reload.c (push_reload): Likewise.
	(find_reloads): Likewise.
	* reload1.c (elimination_effects): Likewise.
	(compute_reload_subreg_offset): Likewise.
	(choose_reload_regs): Likewise.
	* rtlanal.c (subreg_lsb_1): Likewise.
	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
	(simplify_subreg): Likewise.
	* var-tracking.c (track_loc_p): Likewise.
	* emit-rtl.c (byte_lowpart_offset): Likewise.
	(paradoxical_subreg_p): Delete out-of-line definition.

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

	PR tree-optimization/81741
	PR tree-optimization/71947
	* tree-ssa-dom.c: Include tree-inline.h.
	(record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
	equivalences if one is more expensive to compute than the other.
	* tree-ssa-scopedtables.h (class const_or_copies): Make
	record_const_or_copy_raw method private.
	(class avail_exprs_stack): New method simplify_binary_operation.
	* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
	avail_exprs_stack::simplify_binary_operation as needed.
	(avail_exprs_stack::simplify_binary_operation): New function.

2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	* config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
	* config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
	(DOT_SYMBOLS): Likewise.
	(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
	(RELOCATABLE_NEEDS_FIXUP): Likewise.
	(RS6000_ABI_NAME): Likewise.
	(TARGET_CMODEL): Likewise.
	(TOC_SECTION_ASM_OP): Likewise.
	(SET_CMODEL): New macro.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.

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

	* tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
	to allow for free-lang-data replacements similar to verify_type_variant.

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

	* config/aarch64/aarch64.md (casesi): Use DImode rather than
	VOIDmode for the LABEL_REF.

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

	* tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.

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

	* common.opt (feliminate-dwarf2-dups): Ignore.
	* doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
	* dwarf2out.c (push_new_compile_unit, pop_compile_unit,
	same_die_p_wrap, compute_section_prefix,
	is_symbol_die, assign_symbol_names, break_out_includes): Remove.
	(comdat_symbol_id, comdat_symbol_number): Likewise.
	(cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
	Likewise.
	(check_duplicate_cu, record_comdat_symbol_number): Likewise.
	(output_die): Mark unreachable path unreachable.
	(dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
	(dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
	(dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
	(dwarf2out_early_finish): Likewise.

2017-08-22  Aldy Hernandez  <aldyh@redhat.com>

	* wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.

2017-08-22  Georg-Johann Lay  <avr@gjlay.de>

	PR target/81910
	* config/avr/avr.c (avr_handle_addr_attribute): Early return if
	not VAR_P. Filter attribute warnings with OPT_Wattributes.
	(avr_attribute_table) <io, io_low, address>: Initialize
	.decl_required with true.

2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
	undocumented debugging options.
	(-mvsx-scalar-double): Likewise.
	(-mallow-df-permute): Likewise.
	(-mvectorize-builtins): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
	(rs6000_builtin_vectorized_function): Likewise.
	(rs6000_builtin_md_vectorized_function): Likewise.
	(rs6000_opt_vars): Likewise.

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

	PR target/46091
	* config/i386/i386.md (*btsq_imm): Rename from *btsq.
	(*btrq_imm): Rename from *btrq.
	(*btcq_imm): Rename from *btcq.
	(btsc): New code attribute.
	(*<btsc><mode>): New insn pattern.
	(*btr<mode>): Ditto.
	(*<btsc><mode>_mask): New insn_and_split pattern.
	(*btr<mode>_mask): Ditto.

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

	* function.c (pad_below): Simplify padding calculation.

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

	* target.def (function_prologue): Remove frame size argument.
	(function_epilogue): Likewise.
	* doc/tm.texi: Regenerate.
	* final.c (final_start_function): Update call to function_prologue.
	(final_end_function): Update call to function_epilogue.
	(default_function_pro_epilogue): Remove frame size argument.
	* output.h (default_function_pro_epilogue): Likewise.
	* config/arm/arm.c (arm_output_function_epilogue): Likewise.
	(arm_output_function_prologue): Likewise.
	* config/frv/frv.c (frv_function_prologue): Likewise.
	(frv_function_epilogue): Likewise.
	* config/i386/i386.c (ix86_output_function_epilogue): Likewise.
	* config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
	(ia64_output_function_epilogue): Likewise.
	* config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
	(m32r_output_function_epilogue): Likewise.
	* config/microblaze/microblaze.c (microblaze_function_prologue)
	(microblaze_function_epilogue): Likewise.
	* config/mips/mips.c (mips_output_function_prologue): Likewise.
	(mips_output_function_epilogue): Likewise.
	* config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
	(mmix_target_asm_function_epilogue): Likewise.
	* config/msp430/msp430.c (msp430_start_function): Likewise.
	* config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
	(nds32_asm_function_epilogue): Likewise.
	* config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
	* config/pa/pa.c (pa_output_function_prologue): Likewise.
	(pa_output_function_epilogue): Likewise.
	* config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
	(rs6000_output_function_epilogue): Likewise.
	* config/rl78/rl78.c (rl78_start_function): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
	(rs6000_output_function_epilogue): Likewise.
	* config/rx/rx.c (rx_output_function_prologue): Likewise.
	* config/sh/sh.c (sh_output_function_epilogue): Likewise.
	* config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
	(sparc_asm_function_epilogue): Likewise.

2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree.h (type_has_mode_precision_p): New function.
	* convert.c (convert_to_integer_1): Use it.
	* expr.c (expand_expr_real_2): Likewise.
	(expand_expr_real_1): Likewise.
	* fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
	* match.pd: Likewise.
	* tree-ssa-forwprop.c (simplify_rotate): Likewise.
	* tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
	* tree-tailcall.c (process_assignment): Likewise.
	* tree-vect-loop.c (vectorizable_reduction): Likewise.
	* tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
	(vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
	* tree-vect-stmts.c (vectorizable_conversion): Likewise.
	(vectorizable_assignment): Likewise.
	(vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.
	* tree-vrp.c (register_edge_assert_for_2): Likewise.

2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>

	* match.pd: Add pow (C, x) simplification.

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

	PR tree-optimization/81900
	* tree-ssa-pre.c (compute_antic_aux): Properly compute changed
	for blocks with abnormal predecessors.
	(compute_antic): Do not set visited flag prematurely.

2017-08-21  Georg-Johann Lay  <avr@gjlay.de>

	PR target/79883
	* config/avr/avr.c (avr_set_current_function): Typo in diagnostic.

2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>

	* stor-layout.h (vector_type_mode): Move to...
	* tree.h (vector_type_mode): ...here.
	* stor-layout.c (vector_type_mode): Move to...
	* tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.

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

	* debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
	register_external_die hooks.
	(debug_false_tree_charstarstar_uhwistar): Declare.
	(debug_nothing_tree_charstar_uhwi): Likewise.
	* debug.c (do_nothing_debug_hooks): Adjust.
	(debug_false_tree_charstarstar_uhwistar): New do nothing.
	(debug_nothing_tree_charstar_uhwi): Likewise.
	* dbxout.c (dbx_debug_hooks): Adjust.
	(xcoff_debug_hooks): Likewise.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* dwarf2out.c (macinfo_label_base): New global.
	(dwarf2out_register_external_die): New function for the
	register_external_die hook.
	(dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
	(dwarf2_debug_hooks): Use them.
	(dwarf2_lineno_debug_hooks): Adjust.
	(struct die_struct): Add with_offset flag.
	(DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
	DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
	DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
	DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
	DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
	DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
	defining section names for the early LTO debug variants.
	(reset_indirect_string): New helper.
	(add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
	(print_dw_val): Add support for offsetted symbol references.
	(get_ultimate_context): Split out from is_cxx.
	(is_cxx): Use get_ultimate_context.
	(is_fortran): Add decl overload.
	(compute_comp_unit_symbol): Split out worker from
	compute_section_prefix.
	(compute_section_prefix): Call compute_comp_unit_symbol and
	set comdat_type_p here.
	(output_die): Skip DIE symbol output for the LTO added one.
	Handle DIE symbol references with offset.
	(output_comp_unit): Guard section name mangling properly.
	For LTO debug sections emit a symbol at the section beginning
	which we use to refer to its DIEs.
	(add_abstract_origin_attribute): For DIEs registered via
	dwarf2out_register_external_die directly refer to the early
	DIE rather than indirectly through the shadow one we created.
	Remove obsolete call to dwarf2out_abstract_function for
	non-function/block origins.
	(gen_array_type_die): When generating early LTO debug do
	not emit DW_AT_string_length.
	(gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
	late when in LTO.  As suggested place a gcc_unreachable for
	the DECL_ABSTRACT_P case.
	(gen_subprogram_die): Avoid another specification DIE
	for early built declarations/definitions for the late LTO case.
	(gen_variable_die): Add type references for late duplicated VLA dies
	when in late LTO.
	(gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
	we have the abstract instance already.
	(process_scope_var): Adjust decl DIE contexts in LTO which
	first puts them in limbo.
	(gen_decl_die): Do not generate type DIEs late apart from
	types for VLAs or for decls we do not yet have a DIE.  Do not
	call dwarf2out_abstract_function late.
	(dwarf2out_early_global_decl): Make sure to create DIEs
	for abstract instances of a decl first.
	(dwarf2out_late_global_decl): Adjust comment.
	(output_macinfo_op): With multiple macro sections use
	macinfo_label_base to distinguish labels.
	(output_macinfo): Likewise.  Update macinfo_label_base.
	Pass in the line info label.
	(note_variable_value_in_expr): When generating LTO resolve
	all variable values here by generating DIEs as needed.
	(init_sections_and_labels): Add early LTO debug flag parameter
	and generate different sections and names if set.  Add generation
	counter for the labels so we can have multiple of them.
	(reset_dies): Helper to allow DIEs to be output multiple times.
	(dwarf2out_finish): When outputting DIEs to the fat part of an
	LTO object first reset DIEs.
	(dwarf2out_early_finish): Output early DIEs when generating LTO.
	(modified_type_die): Check for decl_ultimate_origin being self
	before recursing.
	(gen_type_die_with_usage): Likewise.
	(gen_typedef_die): Allow decl_ultimate_origin being self.
	(set_decl_abstract_flags): Remove.
	(set_block_abstract_flags): Likewise.
	(dwarf2out_abstract_function): Treat the early generated DIEs
	as the abstract copy and only add DW_AT_inline and
	DW_AT_artificial here and call set_decl_origin_self.
	If the DIE has an abstract origin don't do anything.
	* tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
	if we have none yet (Go fails to build one, PR78628).
	(variably_modified_type_p): Prevent endless recursion for Ada
	cyclic pointer types.
	* lto-streamer-in.c: Include debug.h.
	(dref_queue): New global.
	(lto_read_tree_1): Stream in DIE references.
	(lto_input_tree): Register DIE references.
	(input_function): Stream DECL_DEBUG_ARGS.
	* lto-streamer-out.c: Include debug.h.
	(lto_write_tree_1): Output DIE references.
	(DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
	Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
	(output_function): Stream DECL_DEBUG_ARGS.
	* tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
	Stream DECL_ABSTRACT_ORIGIN.
	* tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
	(write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
	DECL_CONTEXT for file-scope decls.
	* lto-streamer.h (struct dref_entry): Declare.
	(dref_queue): Likewise.
	* cfgexpand.c (pass_expand::execute): Do not call the
	outlining_inline_function hook here.
	* lto-wrapper.c (debug_obj): New global.
	(tool_cleanup): Unlink it if required.
	(debug_objcopy): New function.
	(run_gcc): Handle early debug sections in the IL files by
	extracting them to separate files, partially linkin them and
	feeding the result back as result to the linker.
	* config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
	DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
	DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
	sections into a separate segment.
	* config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
	segments.
	(darwin_asm_dwarf_section): Likewise.
	(darwin_asm_output_dwarf_offset): Likewise.
	* config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.

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

	* read-md.h (md_reader::record_potential_iterator_use): Replace
	pointer argument with an rtx and an index.
	* read-rtl.c (iterator_group::apply_iterator): Likewise.
	(apply_mode_iterator): Likewise.
	(apply_code_iterator): Likewise.
	(apply_int_iterator): Likewise.
	(apply_subst_iterator): Likewise.
	(record_iterator_use): Likewise.
	(record_attribute_use): Likewise.
	(md_reader::record_potential_iterator_use): Likewise.  Update calls
	to record_iterator_use and apply_iterator.
	(iterator_use): Replace ptr with x and index.
	(attribute_use): Likewise.
	(apply_attribute_uses): Update calls to apply_iterator.
	(apply_iterators): Likewise.  Update initialization of iterator_use.
	(rtx_reader::read_rtx_code): Update calls to record_iterator_use
	and record_potential_iterator_use.
	(rtx_reader::read_rtx_operand): Likewise.

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

	* varasm.c (const_rtx_hash_1): Don't hash in the mode of a
	CONST_WIDE_INT.

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

	PR middle-end/81884
	* tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
	at struct end conservatively when comparing common bases.

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

	* tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
	(mem_ref_in_stmt): Remove.
	(determine_max_movement): Use ref index to get at the reference.
	(invariantness_dom_walker::before_dom_children): Deal with
	lim data already initialized.
	(gather_mem_refs_stmt): Initialize lim data and record ref index.

2017-08-19  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
	(TARGET_ISA_ROUND): Ditto.
	(TARGET_ROUND): Ditto.
	* config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
	* config/i386/i386.md: Ditto.
	* config/i386/sse.md: Ditto.
	* config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
	with OPTION_MASK_ISA_SSE4_1.

2017-08-19  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81894
	* doc/extend.texi (x86 Built-in Functions): Correct the name of
	__builtin_ia32_lzcnt_u16.

2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/80210
	* config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
	(rs6000_set_current_function): Rewrite function to use it.

2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR c/53037
	* print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
	and TYPE_WARN_IF_NOT_ALIGN.
	* stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
	(handle_warn_if_not_align): New.
	(place_union_field): Call handle_warn_if_not_align.
	(place_field): Call handle_warn_if_not_align.
	Copy TYPE_WARN_IF_NOT_ALIGN.
	(finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
	(layout_type): Likewise.
	* tree-core.h (tree_type_common): Add warn_if_not_align.  Set
	spare to 18.
	(tree_decl_common): Add warn_if_not_align.
	* tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
	* tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
	(SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
	(DECL_WARN_IF_NOT_ALIGN): Likewise.
	(SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
	* doc/extend.texi: Document warn_if_not_aligned attribute.
	* doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.

2017-08-17  Martin Liska  <mliska@suse.cz>

	PR bootstrap/81864
	* tree-loop-distribution.c (ddrs_table): Change type to pointer type.
	(get_data_dependence): Use it as pointer type.
	(distribute_loop): Likewise.

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

	* config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
	(p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
	(p8_vmrgow_<mode>_direct): New define_insn.
	* config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
	handle endianness for vmrgew and vmrgow permute patterns.

2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	* config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
	* config/rs6000/rs6000-cpus.def: Remove comment.
	(ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
	(POWERPC_MASKS): Likewise.
	* config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
	use of TARGET_VSX_TIMODE.
	(rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
	(rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
	TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
	(rs6000_option_override_internal): Remove dead code.
	(rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
	(rs6000_legitimize_reload_address): Likewise.
	(rs6000_legitimate_address_p): Likewise.
	(rs6000_opt_masks): Delete "vsx-timode".
	(rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
	from function comment.
	* config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
	* config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
	(V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
	condition.
	* config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
	* config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
	* config/rs6000/vsx.md (VSX_LE_128): Likewise.
	(VSX_TI): Likewise.
	(VSX_M): Likewise.
	(define_peephole2): Likewise.

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

	PR c/81859
	* pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
	past the end of an array.
	(test_pp_format): Add test cases.

2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>

	* internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
	missing ECF_NOTHROW flags.

2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>

	PR target/72804
	* config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
	operands residing in integer registers.
	(*vsx_le_perm_load_<mode>): Likewise.
	(*vsx_le_perm_store_<mode>): Likewise.
	(define_peephole2): Add peepholes to optimize the above.

2017-08-17  Marek Polacek  <polacek@redhat.com>

	PR middle-end/81814
	* fold-const.c (operand_equal_for_comparison_p): Remove code that used
	to mimic what shorten_compare did.  Change the return type to bool.
	(fold_cond_expr_with_comparison): Update call to
	operand_equal_for_comparison_p.
	(fold_ternary_loc): Likewise.

2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>

	* aarch64-simd.md (mov<mode>): No longer force zero immediate into
	register.
	(*aarch64_simd_mov<mode>): Add new case for stp	using zero immediate.

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

	* tree-ssa-structalias.c (solve_graph): When propagating
	to successors update the graphs succ edges and avoid duplicate work.

2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR target/81861
	* config/i386/i386.c (ix86_option_override_internal): Save target
	specific options after ix86_stack_protector_guard_reg was changed.

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

	PR tree-optimization/81827
	* tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
	(new_var_info): Initialize it conservatively.
	(get_call_vi): Mark register vars.
	(new_scalar_tmp_constraint_exp): Likewise.
	(handle_rhs_call): Likewise.
	(handle_const_call): Likewise.
	(create_function_info_for): Likewise.
	(solve_constraints): Sort varinfos to separate register from
	non-register vars to pack points-to solution bitmaps during
	iteration.

2017-08-17  Marek Polacek  <polacek@redhat.com>

	* gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.

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

	* tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
	to true when overflow is undefined and we saturated the result.

2017-08-17  Alan Modra  <amodra@gmail.com>

	PR target/80938
	* config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
	Don't use store multiple if only one reg needs saving.
	(interesting_frame_related_regno): New function.
	(rs6000_frame_related): Don't emit frame info for regs that
	don't need saving.
	(rs6000_emit_epilogue): Likewise.

2017-08-16  Nathan Sidwell  <nathan@acm.org>

	* tree-core.h (tree_type_non_common): Rename binfo to lang_1.
	* tree.h (TYPE_BINFO): Use type_non_common.maxval.
	(TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
	* tree.c (free_lang_data_in_type): Use else-if chain.  Always
	clear TYPE_LANG_1.  Remove obsolete member-function stripping.
	(find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
	(verify_type): Adjust for TYPE_BINFO move.
	* lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
	process TYPE_BINFO directly.
	(hash_tree): Likewise.
	* tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
	Likewise.
	* tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
	Likewise.

2017-08-16  David Malcolm  <dmalcolm@redhat.com>

	* diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.

2017-08-16  Uros Bizjak  <ubizjak@gmail.com>

	PR target/46091
	* config/i386/i386.md (*anddi_1_btr): Change predicates of
	operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
	Add ix86_binary_operator_ok to insn constraint.
	(*iordi_1_bts): Ditto.
	(*xordi_1_btc): Ditto.
	(*btsq): Change predicate of operand 0 to nonimmediate_operand.
	Update corresponding peephole2 pattern.
	(*btrq): Ditto.
	(*btcq): Ditto.

2017-08-16  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/81832
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
	copy loop header which has IFN_LOOP_DIST_ALIAS call.

2017-08-16  Marek Polacek  <polacek@redhat.com>

	PR middle/81695
	* fold-const.c (fold_indirect_ref_1): Restore original behavior
	regarding size_zero_node.

2017-08-16  Martin Liska  <mliska@suse.cz>

	PR target/81753
	* config.gcc: Respect previously set extra_objs in case
	of darwin target.

2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/81835
	* tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
	the phi SSA_NAME.  Check that the condition in a COND_EXPR does
	not depend on the phi.

2017-08-16  Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
	dead code.

2017-08-16  Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
	(save_reg_p): ..into this.  Update all callers.
	(first_reg_to_save): Simplify.

2017-08-16  Alan Modra  <amodra@gmail.com>

	* config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
	fixed regs.

2017-08-15  Joseph Myers  <joseph@codesourcery.com>

	PR target/78460
	PR target/67712
	* config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
	constant count if that count is less than 32.

2017-08-15  Nathan Sidwell  <nathan@acm.org>

	* gcc.c (execute): Emit friendlier message if inferior is killed
	by an external cause.

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

	PR tree-optimization/81790
	* tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
	CONSTRUCTORs from simplifying and VN.

2017-08-14  Martin Sebor  <msebor@redhat.com>

	* builtin-attrs.def: Add comments.

2017-08-14  Martin Sebor  <msebor@redhat.com>

	PR c/81117
	* doc/extend.texi (attribute nonstring): Document new attribute.

2017-08-14  Martin Sebor  <msebor@redhat.com>

	PR c/81117
	* tree-diagnostic.c (default_tree_printer): Handle %G.
	* gimple-pretty-print.h (percent_G_format): Declare new function.
	* gimple-pretty-print.c (percent_G_format): Define.
	* tree-pretty-print.c (percent_K_format): Add argument.

2017-08-14  Martin Sebor  <msebor@redhat.com>

	PR translation/79998
	* gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
	Remove a stray space.

2017-08-14  Uros Bizjak  <ubizjak@gmail.com>

	PR target/46091
	* config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
	(*iordi_1_bts): Ditto.
	(*xordi_1_btc): Ditto.

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

	PR target/79845
	* config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
	quoted strings, and make more translator-friendly.
	(darwin_rs6000_override_options): Likewise.
	(rs6000_option_override_internal): Likewise.
	(rs6000_return_in_memory): Fix overlong line.
	(init_cmulative_args): Use quoted strings, and make more
	translator-friendly.
	(rs6000_pass_by_reference): Fix overlong line.
	(def_builtin): Use quoted strings.
	(altivec_expand_predicate_builtin): Use quoted strings, and make
	more translator-friendly.
	(htm_expand_builtin): Use quoted strings.
	(cpu_expand_builtin): Use quoted strings, and make more
	translator-friendly.
	(altivec_expand_builtin): Likewise.
	(paired_expand_predicate_builtin): Likewise.
	(rs6000_invalid_builtin): Likewise.
	(builtin_function_type): Use quoted strings.
	(rs6000_expand_split_stack_prologue): Use quoted strings, and make
	more translator-friendly.
	(rs6000_trampoline_init): Likewise.
	(rs6000_handle_altivec_attribute): Likewise.
	(rs6000_inner_target_options): Use quoted strings.
	(rs6000_disable_incompatible_switches): Likewise.
	* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
	strings, and make more translator-friendly.
	(SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.

2017-08-14  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/81799
	* tree-loop-distribution.c (version_loop_by_alias_check): Force
	cond_expr to simple gimple operand.

2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>

	PR middle-end/46932
	* doc/sourcebuild.texi (autoincdec): Add autoincdec description.

2017-08-14  Georg-Johann Lay  <avr@gjlay.de>

	PR target/81754
	PR target/81268
	* config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
	* config/avr/avr.md (gasisr, *gasisr): Use it instead of
	TARGET_GASISR_PROLOGUES.
	* config/avr/avr.c (avr_option_override): Same.
	(avr_pass_pre_proep::execute): Same.

2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/81820
	* config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
	frame pointer with stack pointer - UNITS_PER_WORD in debug insns.

2017-08-13  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*load_tp_<mode>): Redefine as
	define_insn_and_split.  Split to a memory load from 0 in
	DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
	using PTR mode iterator.
	(*load_tp_x32_zext"): Redefine as define_insn_and_split.
	Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
	(*add_tp_<mode>): Redefine as define_insn_and_split.
	Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
	address space.  Merge with *add_tp_x32 using PTR mode iterator.
	(*add_tp_x32_zext"): Redefine as define_insn_and_split.
	Split to an add with a  memory load from 0 in
	DEFAULT_TLS_SEG_REG address space.

2017-08-12  Andrew Pinski  <apinski@cavium.com>

	* config/aarch64/aarch64-option-extensions.def (rdma):
	Fix feature string to what Linux prints out in /proc/cpuinfo.

2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>

	PR ada/79542
	* dwarf2out.c (modified_type_die): For C typedef types that have
	an ultimate origin, process the ultimate origin instead of the
	input type.
	(gen_typedef_die): Assert that input DECLs have no ultimate
	origin.
	(gen_type_die_with_usage): For typedef variants that have an
	ultimate origin, just call gen_decl_die on the original DECL.
	(process_scope_var): Avoid creating DIEs for local typedefs and
	concrete static variables.

2017-08-12  Alan Modra  <amodra@gmail.com>

	PR target/81170
	PR target/81295
	* config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
	match gnu-user.h startfile.
	(ENDFILE_LINUX_SPEC): Similarly.

2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>

	PR lto/81430
	* config/nvptx/nvptx.c (nvptx_override_options_after_change):
	Remove function.
	(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.

2017-08-11  Tamar Christina  <tamar.christina@arm.com>
	* config/aarch64/aarch64.md (mov<mode>): Change.
	(*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
	aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
	* config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.

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

	* tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
	for storage order barriers.

2017-08-11  Martin Liska  <mliska@suse.cz>

	PR tree-opt/79987
	* tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
	variables of void type.

2017-08-11  Martin Liska  <mliska@suse.cz>

	* asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
	TARGET_SUPPORTS_ALIASES.
	* cgraph.c (cgraph_node::create_same_body_alias): Likewise.
	* ipa-visibility.c (can_replace_by_local_alias): Likewise.
	(optimize_weakref): Likewise.
	* symtab.c (symtab_node::noninterposable_alias): Likewise.
	* varpool.c (varpool_node::create_extra_name_alias): Likewise.
	* defaults.h: Introduce TARGET_SUPPORTS_ALIASES.

2017-08-11  Martin Liska  <mliska@suse.cz>

	PR ipa/81213
	* config/i386/i386.c (make_resolver_func): Do complete
	refactoring of the function.

2017-08-10  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81708
	* config/i386/i386.opt (mstack-protector-guard-symbol=): New option
	* config/i386/i386.c (ix86_stack_protect_guard): Use
	ix86_stack_protect_guard_symbol_str to generate varible declaration.
	* doc/invoke.texi (x86 Options): Document
	-mstack-protector-guard-symbol= option.

2017-08-10  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
	* config/i386/i386.c (ix86_split_stack_guard): New function.
	(ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
	(ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
	(i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
	(optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
	* config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
	(split_stack_space_check): Call ix86_split_stack_guard.

2017-08-10  Martin Sebor  <msebor@redhat.com>

	* print-tree.c (print_node): Print location using the established
	format %s:%i%i.
	Replace spaces with colons.
	(debug_raw, debug): Ditto.

2017-08-10  Martin Sebor  <msebor@redhat.com>

	PR c++/81586
	* pretty-print.c (pp_format): Correct the handling of %s precision.

2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/81736
	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
	to ...
	(ix86_finalize_stack_frame_flags): This.  Also clear
	frame_pointer_needed if -fno-omit-frame-pointer is used without
	stack access.
	(ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
	with ix86_finalize_stack_frame_flags.
	(ix86_expand_epilogue): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.
	* doc/invoke.texi: Add a note for -fno-omit-frame-pointer.

2017-08-10  Martin Liska  <mliska@suse.cz>

	PR c++/81355
	* c-attribs.c (handle_target_attribute):
	Report warning for an empty string argument of target attribute.

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

	PR c/81687
	* omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
	LABEL_DECLs.
	* tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels.
	(move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
	or DECL_NONLOCAL labels here.

2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
	to indicate when early gimple folding has been disabled.
	(rs6000_gimple_fold_builtin): Add debug content.
	(rs6000_invalid_builtin): Fix whitespace.
	(rs6000_expand_builtin): Fix whitespace.
	* config/rs6000/rs6000.opt: Add option for -mfold-gimple.

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

	PR target/80938
	* config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
	SAVE_MULTIPLE if not all the registers that saves, should be saved.

2017-08-09  Jim Wilson  <jim.wilson@linaro.org>

	* config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
	(qdf24xx): Likewise.
	* config/aarch64/aarch64.md: Include falkor.md.
	* config/aarch64/falkor.md: New.

2017-08-09  Marek Polacek  <polacek@redhat.com>

	PR c/81233
	* diagnostic-core.h (emit_diagnostic_valist): Add declaration.
	* diagnostic.c (emit_diagnostic): Add a comment.
	(emit_diagnostic_valist): New function.

2017-08-09  Marek Polacek  <polacek@redhat.com>

	PR c/81417
	* input.c (make_location): New overload.
	* input.h (make_location): Declare.

2017-08-08  Alan Modra  <amodra@gmail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR driver/81523
	* gcc.c (NO_PIE_SPEC): Delete.
	(PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
	exclusion..
	(LINK_PIE_SPEC): ..to here.
	(LINK_COMMAND_SPEC): Support -no-pie.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
	chain of crtbegin*.o selection, update for PIE_SPEC changes and
	format.
	(GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
	(ENDFILE_CRTEND_SPEC): Similarly.

2017-08-08  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81708
	* config/i386/i386.opt (mstack-protector-guard-reg=): New option
	(mstack-protector-guard-offset=): Ditto.
	* config/i386/i386.c (ix86_option_override): Handle
	-mstack-protector-guard-reg= and -mstack-protector-guard-offset=
	options.
	(ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
	ix86_stack_protect_guard_offset variables.
	(TARGET_STACK_PROTECT_GUARD): Always define.
	* doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
	and -mstack-protector-guard-offset= options.

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

	* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
	boundary case for the last candidate.

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

	* doc/invoke.texi: Document -ftree-loop-distribution for O3.
	* opts.c (default_options_table): Add OPT_ftree_loop_distribution.

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

	PR middle-end/19706
	* config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
	* config/aarch64/aarch64-builtins.c
	(aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
	* config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
	* config/aarch64/aarch64-simd.md: Added xorsign<mode>3

2017-08-08  Tamar Christina  <tamar.christina@arm.com>
	    Andrew Pinski <pinskia@gmail.com>

	PR middle-end/19706
	* internal-fn.def (XORSIGN): New.
	* optabs.def (xorsign_optab): New.
	* tree-ssa-math-opts.c (is_copysign_call_with_1): New.
	(convert_expand_mult_copysign): New.
	(pass_optimize_widening_mul::execute): Call
	convert_expand_mult_copysign.

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

	PR tree-optimization/81354
	* gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
	Insert on edges rather than explicitly creating landing pads.
	(analyze_candidates_and_replace): Commit edge inserts.

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

	PR middle-end/81719
	* tree-ssa-loop-niter.c: Include tree-dfa.h.
	(expand_simple_operations): Also look through ADDR_EXPRs with
	MEM_REF bases treating them as POINTER_PLUS_EXPR.

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

	PR tree-optimization/81723
	* tree-vect-slp.c (struct bst_traits): New hash traits.
	(bst_fail): New global.
	(vect_build_slp_tree_2): New worker, split out from ...
	(vect_build_slp_tree): ... this now wrapping it with using
	bst_fail set to cache SLP tree build fails.  Properly handle
	max_tree_size.
	(vect_analyze_slp_instance): Allocate and free bst_fail.

2017-08-08  Martin Liska  <mliska@suse.cz>

	PR tree-opt/81696
	* ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
	LABEL_DECLs that can be from a different function.

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

	PR tree-optimization/81744
	* tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
	loop's number of iterations.

2017-08-08  Martin Liska  <mliska@suse.cz>

	* asan.c: Include header files.
	* attribs.c (build_decl_attribute_variant): New function moved
	from tree.[ch].
	(build_type_attribute_qual_variant): Likewise.
	(cmp_attrib_identifiers): Likewise.
	(simple_cst_list_equal): Likewise.
	(omp_declare_simd_clauses_equal): Likewise.
	(attribute_value_equal): Likewise.
	(comp_type_attributes): Likewise.
	(build_type_attribute_variant): Likewise.
	(lookup_ident_attribute): Likewise.
	(remove_attribute): Likewise.
	(merge_attributes): Likewise.
	(merge_type_attributes): Likewise.
	(merge_decl_attributes): Likewise.
	(merge_dllimport_decl_attributes): Likewise.
	(handle_dll_attribute): Likewise.
	(attribute_list_equal): Likewise.
	(attribute_list_contained): Likewise.
	* attribs.h (lookup_attribute): New function moved from tree.[ch].
	(lookup_attribute_by_prefix): Likewise.
	* bb-reorder.c: Include header files.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfgexpand.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphunit.c: Likewise.
	* convert.c: Likewise.
	* dwarf2out.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimplify.c: Likewise.
	* hsa-common.c: Likewise.
	* hsa-gen.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-fnsummary.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* lto-cgraph.c: Likewise.
	* omp-expand.c: Likewise.
	* omp-general.c: Likewise.
	* omp-low.c: Likewise.
	* omp-offload.c: Likewise.
	* omp-simd-clone.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* sancov.c: Likewise.
	* sanopt.c: Likewise.
	* symtab.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vrp.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* tree.c: Remove functions moved to attribs.[ch].
	* tree.h: Likewise.
	* config/aarch64/aarch64.c: Add attrs.h header file.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/cr16/cr16.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/darwin.c: Likewise.
	* config/epiphany/epiphany.c: Likewise.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/ft32/ft32.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32r/m32r.c: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/microblaze/microblaze.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/msp430/msp430.c: Likewise.
	* config/nds32/nds32-isr.c: Likewise.
	* config/nds32/nds32.c: Likewise.
	* config/nios2/nios2.c: Likewise.
	* config/nvptx/nvptx.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/powerpcspe/powerpcspe.c: Likewise.
	* config/riscv/riscv.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sol2.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/visium/visium.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/81593
	* config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
	constraints since the -mupper-regs-* switches have been
	eliminated.
	(vsx_concat_<mode>_1): New combiner insns to recognize inserting
	into a vector from a double word element that was extracted from
	another vector, and eliminate extra XXPERMDI instructions.
	(vsx_concat_<mode>_2): Likewise.
	(vsx_concat_<mode>_3): Likewise.
	(vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
	concat to allow optimizing inserts from previous extracts.

2017-08-07  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.c (ix86_stack_protect_guard): Generate
	memory reference to a SSP offset in TLS address space.
	(ix86_print_operand) <case '@'>: Remove.
	(ix86_print_operand_punct_valid_p): Remove '@' code.
	* config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
	UNSPEC_SP_TLS_TEST.
	(stack_tls_protect_set_<mode>): Remove.
	(stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
	(stack_tls_protect_test_<mode>): Remove.
	(stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.

2017-08-07  Olivier Hainque  <hainque@adacore.com>

	PR target/81755
	* config/vxworksae.h (VXWORKS_HAVE_TLS): Define.

2017-08-07  Douglas Rupp  <rupp@adacore.com>

	* Makefile.in (install-mkheaders): Fix typo, where the multi_dir
	variable was referenced as multidir in command.

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

	PR c/69389
	* gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
	BIT_FIELD_REF.

2017-08-07  Martin Liska  <mliska@suse.cz>

	* config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
	* config/rl78/rl78.c: Add include of attribs.h.
	* config/sh/sh.c: Likewise.
	* config/v850/v850.c: Likewise.

2017-08-07  Tom de Vries  <tom@codesourcery.com>

	PR middle-end/78266
	* omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.

2017-08-07  Martin Liska  <mliska@suse.cz>

	* config/mips/mips.c: Include attribs.h.

2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/68829
	* doc/invoke.texi: Document change in behvaior for -Ofast for
	Fortran.

2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>

	* config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
	Use gen_frame_mem.
	(aarch64_pop_regs): Likewise.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_save_callee_saves): Likewise.
	(aarch64_restore_callee_saves): Likewise.

2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c: Revert the last change.

2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/81736
	* config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
	to ...
	(ix86_finalize_stack_frame_flags): This.  Also clear
	frame_pointer_needed if -fno-omit-frame-pointer is used without
	stack access.
	(ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
	with ix86_finalize_stack_frame_flags.
	(ix86_expand_epilogue): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/81743
	* config/i386/i386.c (get_builtin_code_for_version): Set priority
	to P_AES for Westmere.

2017-08-07  Jonathan Yong  <10walls@gmail.com>

	* config/i386/mingw.opt (fset-stack-executable): Removed.
	* config/i386/cygming.opt (fset-stack-executable): Moved
	from mingw.opt.
	* config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.

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

	* print-rtl.c (print_exp): Print NOT as "~" instead of as "!".

2017-08-07  Marek Polacek  <polacek@redhat.com>

	PR middle-end/81737
	* fold-const.c (fold_indirect_ref_1): Check type_domain.

2017-08-07  Martin Liska  <mliska@suse.cz>

	* attribs.h (canonicalize_attr_name): New function.
	(cmp_attribs): Move from c-format.c and adjusted.
	(is_attribute_p): Moved from tree.h.
	* tree-inline.c: Add new includes.
	* tree.c (cmp_attrib_identifiers): Use cmp_attribs.
	(private_is_attribute_p): Remove.
	(private_lookup_attribute): Likewise.
	(private_lookup_attribute_by_prefix): Simplify.
	(remove_attribute): Use is_attribute_p.
	* tree.h: Remove removed declarations.

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

	PR middle-end/81698
	* stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
	instead of computing it in the function.  Formatting fix.
	(expand_case): Don't rely on default_edge being the first edge,
	clear it if removing it, pass default_edge to
	emit_case_dispatch_table.
	(expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
	fix.

2017-08-06  Uros Bizjak  <ubizjak@gmail.com>

	* config/alpha/alpha.c (alpha_reorg): If trap is the last active
	insn in the function, emit NOP after the insn.

2017-08-06  Tom de Vries  <tom@codesourcery.com>

	* omp-expand.c (expand_oacc_for): Add missing edge probability for tile
	and element loops.

2017-08-06  Tom de Vries  <tom@codesourcery.com>

	* omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
	loop.

2017-08-04  Yury Gribov  <tetra2005@gmail.com>

	PR tree-optimization/57371
	* match.pd: New pattern.

2017-08-04  Marek Polacek  <polacek@redhat.com>

	PR middle-end/81695
	* fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
	perform the computation in offset_int.

2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>

	PR tree-optimization/81136
	* tree-vectorizer.h: Include tree-hash-traits.h.
	(vec_base_alignments): New typedef.
	(vec_info): Add a base_alignments field.
	(vect_record_base_alignments): Declare.
	* tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
	field.
	(DR_IS_CONDITIONAL_IN_STMT): New macro.
	(create_data_ref): Add an is_conditional_in_stmt argument.
	* tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
	the is_conditional_in_stmt field.
	(data_ref_loc): Add an is_conditional_in_stmt field.
	(get_references_in_stmt): Set the is_conditional_in_stmt field.
	(find_data_references_in_stmt): Update call to create_data_ref.
	(graphite_find_data_references_in_stmt): Likewise.
	* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
	(vect_record_base_alignment): New function.
	(vect_record_base_alignments): Likewise.
	(vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
	for nested statements even if we fail to compute a misalignment.
	Use pooled base alignments for unconditional references.
	(vect_find_same_alignment_drs): Compare base addresses instead
	of base objects.
	(vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
	* tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.

2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-vectorizer.h (vec_info): Add a constructor and destructor.
	Add an explicit name for the enum.  Use auto_vec for slp_instances
	and grouped_stores.
	(_loop_vec_info): Add a constructor and destructor.  Use auto_vec
	for all vectors.
	(_bb_vec_info): Add a constructor and destructor.
	(vinfo_for_stmt): Return NULL for uids of -1 as well.
	(destroy_loop_vec_info): Delete.
	(vect_destroy_datarefs): Likewise.
	* tree-vectorizer.c (vect_destroy_datarefs): Delete.
	(vec_info::vec_info): New function.
	(vec_info::~vec_info): Likewise.
	(vectorize_loops): Use delete instead of destroy_loop_vec_info.
	* tree-parloops.c (gather_scalar_reductions): Use delete instead of
	destroy_loop_vec_info.
	* tree-vect-loop.c (new_loop_vec_info): Replace with...
	(_loop_vec_info::_loop_vec_info): ...this.
	(destroy_loop_vec_info): Replace with...
	(_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
	the stmt_vec_infos.  Leave handling of vec_info information to its
	destructor.  Remove explicit vector releases.
	(vect_analyze_loop_form): Use new instead of new_loop_vec_info.
	(vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
	* tree-vect-slp.c (new_bb_vec_info): Replace with...
	(_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
	BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
	(destroy_bb_vec_info): Replace with...
	(_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
	information to its destructor.
	(vect_slp_analyze_bb_1): Use new and delete instead of
	new_bb_vec_info and destroy_bb_vec_info.
	(vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
	single delete.

2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>

	* tree-data-ref.h (subscript): Add access_fn field.
	(data_dependence_relation): Add could_be_independent_p.
	(SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
	(same_access_functions): Move to tree-data-ref.c.
	* tree-data-ref.c (ref_contains_union_access_p): New function.
	(access_fn_component_p): Likewise.
	(access_fn_components_comparable_p): Likewise.
	(dr_analyze_indices): Add a reference to access_fn_component_p.
	(dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
	DR_ACCESS_FN.
	(constant_access_functions): Likewise.
	(add_other_self_distances): Likewise.
	(same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
	(initialize_data_dependence_relation): Use XCNEW and remove
	explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
	of access functions that have the same type.  Allow the
	subsequence to end with different bases in some circumstances.
	Record the chosen access functions in SUB_ACCESS_FN.
	(build_classic_dist_vector_1): Replace ddr_a and ddr_b with
	a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
	(subscript_dependence_tester_1): Likewise dra and drb.
	(build_classic_dist_vector): Update calls accordingly.
	(subscript_dependence_tester): Likewise.
	* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
	DDR_COULD_BE_INDEPENDENT_P.
	* tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
	comp_alias_ddrs instead of may_alias_ddrs.
	* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
	New function.
	(vect_analyze_data_ref_dependence): Use it if
	DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
	distance vectors if that fails.
	(dependence_distance_ge_vf): New function.
	(vect_prune_runtime_alias_test_list): Use it.  Don't clear
	LOOP_VINFO_MAY_ALIAS_DDRS.

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

	PR middle-end/81705
	* fold-const.c (fold_binary_loc): Properly restrict
	minus_var0 && minus_var1 case when associating undefined overflow
	entities.

2017-08-04  Tom de Vries  <tom@codesourcery.com>

	* omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.

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

	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Don't start diagnostic messages with a capital letter.
	* config/rs6000/rs6000.c (rs6000_option_override_internal):
	Likewise.
	(rs6000_invalid_builtin): Likewise.
	(rs6000_trampoline_init): Likewise.

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

	PR target/81621
	* bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
	after setting changeable df flags.

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

	* tree-ssa-reassoc.c (should_break_up_subtract): Also break
	up if the use is in USE - X.

2017-08-03  Alexander Monakov  <amonakov@ispras.ru>

	* toplev.c (dumpfile.h): New include.
	(internal_error_reentered): New static function.  Use it...
	(internal_error_function): ...here to handle reentered internal_error.

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

	PR middle-end/81148
	* fold-const.c (split_tree): Add minus_var and minus_con
	arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
	here but always use minus_*.
	(associate_trees): Assert we never associate with MINUS_EXPR
	and NULL first operand.  Do not recurse for PLUS_EXPR operands
	when associating as MINUS_EXPR either.
	(fold_binary_loc): Track minus_var and minus_con.

2017-08-03  Tom de Vries  <tom@codesourcery.com>

	PR lto/81430
	* tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
	ACCEL_COMPILER, apply finish_options on
	DECL_FUNCTION_SPECIFIC_OPTIMIZATION.

2017-08-03  Tom de Vries  <tom@codesourcery.com>

	PR target/81662
	* config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
	function_entry_patch_area_size > 0.

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

	PR driver/81650
	* calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
	instead of 10??LU, perform unit multiplication in wide_int,
	don't change alloc_object_size_limit if the limit is larger
	than SSIZE_MAX.

	PR tree-optimization/81655
	PR tree-optimization/81588
	* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
	the case when ranges[i].low and high are 1 for unsigned type with
	precision 1.

	PR middle-end/81052
	* omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
	(pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.

2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* tree-vrp.h: Add include guard.

2017-08-02  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81644
	* config/i386/i386.md (unspecv): Add UNSPECV_UD2.
	(ud2): New insn pattern.
	* config/i386/i386.c (ix86_expand_epilogue):
	For naked functions, generate ud2 instead of trap insn.

2017-08-02  Marek Polacek  <polacek@redhat.com>

	PR other/81667
	* alloc-pool.h (base_pool_allocator): Initialize m_elt_size.

2017-08-02  Tom de Vries  <tom@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
	Add missing edge probabilities.

2017-08-02  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
	Correct endianness.

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

	PR middle-end/79499
	* function.c (thread_prologue_and_epilogue_insns): Determine blocks
	for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
	of first NONDEBUG_INSN_P in each of the split_prologue_seq and
	prologue_seq sequences - if any.

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

	* tree-vect-stmts.c (vectorizable_store): Perform vector extracts
	via vectors if supported, integer extracts via punning if supported
	or otherwise vector extracts.

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

	* tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
	into ...
	(bitmap_insert_into_set): ... this.

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

	PR tree-optimization/81633
	Revert
	2015-08-17  Alan Hayward  <alan.hayward@arm.com>

	PR tree-optimization/71752
	* tree-vect-slp.c (vect_get_slp_defs): Handle null operands.

2017-08-01  Daniel Santos  <daniel.santos@pobox.com>

	* config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
	(machine_function::call_ms2sysv_pad_out): Remove field.
	* config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
	(ix86_compute_frame_layout): Likewise.

2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/81654
	* config/i386/i386.c (ix86_set_func_type): Disallow naked
	attribute with interrupt attribute.

2017-08-01  Andrew Pinski  <apinski@cavium.com>

	* tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
	BIT_INSERT_EXPR's operand 1
	to see if the types precision matches.

2017-08-01  Martin Liska  <mliska@suse.cz>

	PR middle-end/70140
	* builtins.c (expand_builtin_memcpy_args): Remove.
	(expand_builtin_memcpy): Call newly added function
	expand_builtin_memory_copy_args.
	(expand_builtin_memcpy_with_bounds): Likewise.
	(expand_builtin_mempcpy): Remove last argument.
	(expand_builtin_mempcpy_with_bounds): Likewise.
	(expand_builtin_memory_copy_args): New function created from
	expand_builtin_mempcpy_args with small modifications.
	(expand_builtin_mempcpy_args): Remove.
	(expand_builtin_stpcpy): Remove unused argument.
	(expand_builtin): Likewise.
	(expand_builtin_with_bounds): Likewise.

2017-08-01  Martin Liska  <mliska@suse.cz>

	Revert r250771
	Make mempcpy more optimal (PR middle-end/70140).

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

	PR target/81622
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
	__builtin_vec_cmpne verify both arguments are compatible vectors
	before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
	verify arg1_type is a pointer or array type.  For __builtin_vec_st,
	move computation of aligned to after checking the argument types.
	Formatting fixes.

	PR target/80846
	* config/rs6000/vsx.md (vextract_fp_from_shorth,
	vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
	calls.

2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
	    Doug Rupp  <rupp@adacore.com>
	    Olivier Hainque  <hainque@adacore.com>

	* config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
	well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
	arm8 (arch v4).
	* config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
	for TARGET_OS_CPP_BUILTIN.
	(TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
	refine CPU definitions for arm_arch5 and add those for arm_arch6 and
	arm_arch7.
	(MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
	passing required abi options to the assembler for EABI configurations.
	(EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
	of .text.hot and .text.unlikely sections for kernel modules when
	using ARM style exceptions.
	(CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
	options. Add EXTRA_CC1_SPEC.
	(VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
	toolchain options.
	(DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
	transition.
	(ARM_TARGET2_DWARF_FORMAT): Define.
	* config/arm/t-vxworks: Adjust multilib control to removal of the
	Diab command line options.

2017-08-01  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/81561
	* gcov.c (unblock): Make unblocking safe as we need to preserve
	index correspondence of blocks and block_lists.

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-08-01  James Greenhalgh  <james.greenhalgh@arm.com>

	* common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
	(ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
	(ftree-slp-vectorize): Likewise.
	* omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
	can no longer be set independent of flag_tree_loop_vectorize.
	* omp-general.c (emp_max_vf): Likewise.
	* opts.c (enable_fdo_optimizations): Remove references to
	flag_tree_vectorize, these are now implicit.
	(common_handle_option): Remove handling for OPT_ftree_vectorize,
	and leave it for the options machinery.

2017-08-01  Martin Liska  <mliska@suse.cz>

	PR middle-end/70140
	* builtins.c (expand_builtin_memcpy_args): Remove.
	(expand_builtin_memcpy): Call newly added function
	expand_builtin_memory_copy_args.
	(expand_builtin_memcpy_with_bounds): Likewise.
	(expand_builtin_mempcpy): Remove last argument.
	(expand_builtin_mempcpy_with_bounds): Likewise.
	(expand_builtin_memory_copy_args): New function created from
	expand_builtin_mempcpy_args with small modifications.
	(expand_builtin_mempcpy_args): Remove.
	(expand_builtin_stpcpy): Remove unused argument.
	(expand_builtin): Likewise.
	(expand_builtin_with_bounds): Likewise.

2017-08-01  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81641
	* config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
	print "ds:" only for immediates in generic address space.

2017-08-01  Uros Bizjak  <ubizjak@gmail.com>

	PR target/81639
	* config/i386/i386.c (ix86_funciton_naked): New prototype.
	(ix86_function_ok_for_sibcall): Return false for naked functions.

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

	* tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
	(compute_antic): Seed worklist with exit block predecessors.
	* cfganal.c (dfs_find_deadend): For a cycle return the source
	of the edge closing it.

2017-08-01  Tamar Christina  <tamar.christina@arm.com>

	* config/aarch64/aarch64.c
	(aarch64_can_const_movi_rtx_p): Move 0 check.

2017-08-01  Bin Cheng  <bin.cheng@arm.com>

	* tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
	* fold-const.c (fold_comparison, fold_binary_loc): Delete use of
	above macro.
	* match.pd: Ditto in address comparison pattern.

2017-08-01  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/81627
	* tree-predcom.c (prepare_finalizers): Always rewrite into loop
	closed ssa form for store-store chain.

2017-08-01  Bin Cheng  <bin.cheng@arm.com>

	PR tree-optimization/81620
	* tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
	for store-store chain.

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

	PR tree-optimization/81588
	* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
	ranges[i].in_p, invert comparison code ccode.  For >/>=,
	swap rhs1 and rhs2 and comparison code unconditionally,
	for </<= don't do that.  Don't swap rhs1/rhs2 again if
	ranges[i].in_p, instead invert comparison code ccode if
	opcode or oe->rank is BIT_IOR_EXPR.

	PR target/80846
	* optabs.def (vec_extract_optab, vec_init_optab): Change from
	a direct optab to conversion optab.
	* optabs.c (expand_vector_broadcast): Use convert_optab_handler
	with GET_MODE_INNER as last argument instead of optab_handler.
	* expmed.c (extract_bit_field_1): Likewise.  Use vector from
	vector extraction if possible and optab is available.
	* expr.c (store_constructor): Use convert_optab_handler instead
	of optab_handler.  Use vector initialization from smaller
	vectors if possible and optab is available.
	* tree-vect-stmts.c (vectorizable_load): Likewise.
	* doc/md.texi (vec_extract, vec_init): Document that the optabs
	now have two modes.
	* config/i386/i386.c (ix86_expand_vector_init): Handle expansion
	of vec_init from half-sized vectors with the same element mode.
	* config/i386/sse.md (ssehalfvecmode): Add V4TI case.
	(ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
	(reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
	reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
	reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
	after mode in gen_vec_extract* calls.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><ssescalarmodelower>): ... this.
	(vec_extract<mode><ssehalfvecmodelower>): New expander.
	(rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
	element mode after mode in gen_vec_init* calls.
	(VEC_INIT_HALF_MODE): New mode iterator.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><ssescalarmodelower>): ... this.
	(vec_init<mode><ssehalfvecmodelower>): New expander.
	* config/i386/mmx.md (vec_extractv2sf): Renamed to ...
	(vec_extractv2sfsf): ... this.
	(vec_initv2sf): Renamed to ...
	(vec_initv2sfsf): ... this.
	(vec_extractv2si): Renamed to ...
	(vec_extractv2sisi): ... this.
	(vec_initv2si): Renamed to ...
	(vec_initv2sisi): ... this.
	(vec_extractv4hi): Renamed to ...
	(vec_extractv4hihi): ... this.
	(vec_initv4hi): Renamed to ...
	(vec_initv4hihi): ... this.
	(vec_extractv8qi): Renamed to ...
	(vec_extractv8qiqi): ... this.
	(vec_initv8qi): Renamed to ...
	(vec_initv8qiqi): ... this.
	* config/rs6000/vector.md (VEC_base_l): New mode attribute.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><VEC_base_l>): ... this.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><VEC_base_l>): ... this.
	* config/rs6000/paired.md (vec_initv2sf): Renamed to ...
	(vec_initv2sfsf): ... this.
	* config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
	vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
	vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
	element mode after mode in gen_vec_init* calls.
	* config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
	(vec_init<mode><Vel>): ... this.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><Vel>): ... this.
	* config/aarch64/iterators.md (Vel): New mode attribute.
	* config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
	Add element mode after mode in gen_vec_extract* calls.
	* config/s390/vector.md (non_vec_l): New mode attribute.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><non_vec_l>): ... this.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><non_vec_l>): ... this.
	* config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
	s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
	vec_extract mode.
	* config/arm/iterators.md (V_elem_l): New mode attribute.
	* config/arm/neon.md (vec_extract<mode>): Renamed to ...
	(vec_extract<mode><V_elem_l>): ... this.
	(vec_extractv2di): Renamed to ...
	(vec_extractv2didi): ... this.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><V_elem_l>): ... this.
	(reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
	reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
	reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
	Add element mode after gen_vec_extract* calls.
	* config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
	(vec_init<mode><unitmode>): ... this.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><unitmode>): ... this.
	* config/mips/loongson.md (vec_init<mode>): Renamed to ...
	(vec_init<mode><unitmode>): ... this.
	* config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
	(vec_initv2sfsf): ... this.
	(vec_extractv2sf): Renamed to ...
	(vec_extractv2sfsf): ... this.
	(reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
	Add element mode after gen_vec_extract* calls.
	* config/mips/mips.md (unitmode): New mode iterator.
	* config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
	spu_builtin_extract): Add element mode after gen_vec_extract* calls.
	* config/spu/spu.md (inner_l): New mode attribute.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><inner_l>): ... this.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><inner_l>): ... this.
	* config/sparc/sparc.md (veltmode): New mode iterator.
	(vec_init<VMALL:mode>): Renamed to ...
	(vec_init<VMALL:mode><VMALL:veltmode>): ... this.
	* config/ia64/vect.md (vec_initv2si): Renamed to ...
	(vec_initv2sisi): ... this.
	(vec_initv2sf): Renamed to ...
	(vec_initv2sfsf): ... this.
	(vec_extractv2sf): Renamed to ...
	(vec_extractv2sfsf): ... this.
	* config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
	(vec_init<mode>): Renamed to ...
	(vec_init<mode><VEC_base_l>): ... this.
	(vec_extract<mode>): Renamed to ...
	(vec_extract<mode><VEC_base_l>): ... this.
	* config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
	(vec_initv2sfsf): ... this.
	* config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
	vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
	vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
	gen_vec_init* calls.

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

	PR tree-optimization/81297
	* tree-vrp.c (get_single_symbol): Remove assert, instead drop
	TREE_OVERFLOW from INTEGER_CSTs.

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

	* config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.

2017-07-31  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c: Add support for built-in functions
	vector signed char vec_xl_be (signed long long, signed char *);
	vector unsigned char vec_xl_be (signed long long, unsigned char *);
	vector signed int vec_xl_be (signed long long, signed int *);
	vector unsigned int vec_xl_be (signed long long, unsigned int *);
	vector signed long long vec_xl_be (signed long long, signed long long *);
	vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
	vector signed short vec_xl_be (signed long long, signed short *);
	vector unsigned short vec_xl_be (signed long long, unsigned short *);
	vector double vec_xl_be (signed long long, double *);
	vector float vec_xl_be (signed long long, float *);
	* config/rs6000/altivec.h (vec_xl_be): Add #define.
	* config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
	XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
	for the builtins.
	* config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
	(altivec_expand_builtin): Add switch statement to call
	altivec_expand_xl_be for each builtin.
	(altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
	__builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
	__builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
	__builtin_vsx_le_be_v16qi.
	* doc/extend.texi: Update the built-in documentation file for the
	new built-in functions.

2017-07-31  Uros Bizjak  <ubizjak@gmail.com>

	PR target/25967
	* config/i386/i386.c (ix86_allocate_stack_slots_for_args):
	New function.
	(TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.

2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* config.gcc: Add z14.
	* config/s390/driver-native.c (s390_host_detect_local_cpu): Add
	CPU model numbers for z13s and z14.
	* config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
	arch12 with z14.
	* config/s390/s390-opts.h (enum processor_type): Rename
	PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
	* config/s390/s390.c (processor_table): Add field for CPU name to
	be passed to Binutils.
	(s390_asm_output_machine_for_arch): Use the new field in
	processor_table for Binutils.
	(s390_expand_builtin): Replace arch12 with z14.
	(s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
	(s390_get_sched_attrmask): Likewise.
	(s390_get_unit_mask): Likewise.
	* config/s390/s390.opt: Add z14 to processor_type enum.

2017-07-31  Martin Jambor  <mjambor@suse.cz>

	PR hsa/81477
	* ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
	regardless of optimization level.

2017-07-31  Jan Hubicka <hubicka@ucw.cz>