1. 03 May, 2017 12 commits
    • New fix-it printer · d1b5f5cc
      The existing fix-it printer can lead to difficult-to-read output
      when fix-it hints are near each other.  For example, in a recent
      patch to add fix-it hints to the C++ frontend's -Wold-style-cast,
      e.g. for:
      
        foo *f = (foo *)ptr->field;
                             ^~~~~
      
      the fix-it hints:
       replace the open paren with "const_cast<"
       replace the close paren with "> ("
       insert ")" after the "ptr->field"
      
      would be printed in this odd-looking way:
      
        foo *f = (foo *)ptr->field;
                             ^~~~~
                 -
                 const_cast<
                       -
                       > (        )
      
      class rich_location consolidates adjacent fix-it hints, which helps
      somewhat, but the underlying problem is that the existing printer
      simply walks through the list of hints printing them, starting newlines
      as necessary.
      
      This patch reimplements fix-it printing by introducing a planning
      stage: a new class line_corrections "plans" how to print the
      fix-it hints affecting a line, generating a vec of "correction"
      instances.  Hints that are sufficiently close to each other are
      consolidated at this stage.
      
      This leads to the much more reasonable output for the above case:
      
        foo *f = (foo *)ptr->field;
                             ^~~~~
                 -----------------
                 const_cast<foo *> (ptr->field);
      
      where the 3 hints are consolidated into one "correction" at printing.
      
      gcc/ChangeLog:
      	* diagnostic-show-locus.c (struct column_range): New struct.
      	(get_affected_columns): New function.
      	(get_printed_columns): New function.
      	(struct correction): New struct.
      	(correction::ensure_capacity): New function.
      	(correction::ensure_terminated): New function.
      	(struct line_corrections): New struct.
      	(line_corrections::~line_corrections): New dtor.
      	(line_corrections::add_hint): New function.
      	(layout::print_trailing_fixits): Reimplement in terms of the new
      	classes.
      	(selftest::test_overlapped_fixit_printing): New function.
      	(selftest::diagnostic_show_locus_c_tests): Call it.
      
      From-SVN: r247548
      David Malcolm committed
    • cp-tree.h (enum cp_tree_index, [...]): Move earlier, along with #defines, to… · 5bb64c41
      cp-tree.h (enum cp_tree_index, [...]): Move earlier, along with #defines, to before name-lookup include.
      
      	* cp-tree.h (enum cp_tree_index, cp_global_trees): Move earlier,
      	along with #defines, to before name-lookup include.
      
      From-SVN: r247547
      Nathan Sidwell committed
    • Canonicalize canonical type hashing · 6fe63fb4
      	Canonicalize canonical type hashing
      	gcc/
      	* tree.h (type_hash_canon_hash): Declare.
      	* tree.c (type_hash_list, attribute_hash_list): Move into
      	type_hash_canon_hash.
      	(build_type_attribute_qual_variant): Break out hash code calc into
      	type_hash_canon_hash.
      	(type_hash_canon_hash): New.  Generic type hash computation.
      	(build_range_type_1, build_array_type_1, build_function_type)
      	build_method_type_directly, build_offset_type, build_complex_type,
      	make_vector_type): Call it.
      	gcc/c-family/
      	* c-common.c (complete_array_type): Use type_hash_canon.
      (--This line, and those below, will be ignored--
      
      M    gcc/tree.c
      M    gcc/tree.h
      M    gcc/c-family/ChangeLog
      M    gcc/c-family/c-common.c
      M    gcc/ChangeLog
      
      From-SVN: r247546
      Nathan Sidwell committed
    • tree-vect-data-refs.c (vect_enhance_data_refs_alignment): When all DRs have… · 49ab4621
      tree-vect-data-refs.c (vect_enhance_data_refs_alignment): When all DRs have unknown misaligned do not always peel when...
      
      2017-05-03  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
      	When all DRs have unknown misaligned do not always peel
      	when there is a store but apply the same costing model as if
      	there were only loads.
      
      	* gcc.dg/vect/costmodel/x86_64/costmodel-alignpeel.c: New testcase.
      
      From-SVN: r247544
      Richard Biener committed
    • revert: re PR tree-optimization/80492 (Wrong code when unrolling a loop with… · 8d5f521a
      revert: re PR tree-optimization/80492 (Wrong code when unrolling a loop with inline asm and local regs)
      
      2017-05-03  Richard Biener  <rguenther@suse.de>
      
      	Revert
      	PR tree-optimization/80492
      	* tree-ssa-alias.c (decl_refs_may_alias_p): Handle
      	compare_base_decls returning dont-know properly.
      
      From-SVN: r247543
      Richard Biener committed
    • [ARM] Set mode for success result of atomic compare and swap · 3cff0135
      2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
      gcc/
          * config/arm/iterators.md (CCSI): New mode iterator.
          (arch): New mode attribute.
          * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
          (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
          (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
          code iterator for success result mode.
          * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
          the corresponding new insn generators.
      
      From-SVN: r247542
      Thomas Preud'homme committed
    • Revert r247509 2017-05-02 Bin Cheng <bin.cheng@arm.com> · 0ec5af39
      	Revert r247509
      	2017-05-02  Bin Cheng  <bin.cheng@arm.com>
      	* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
      
      From-SVN: r247541
      Bin Cheng committed
    • Wrap tree-data-ref.h macro arguments · 45d93414
      gcc/
      2016-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
      
      	* tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
      	(SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
      	(DDR_A): Wrap DDR argument in brackets.
      	(DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
      	(DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
      	(DDR_REVERSED_P): Likewise.
      
      From-SVN: r247539
      Richard Sandiford committed
    • re PR tree-optimization/79472 (x86-64: Switch table generation fails if default… · 18bfe940
      re PR tree-optimization/79472 (x86-64: Switch table generation fails if default case has different code)
      
      	PR tree-optimization/79472
      	* tree-switch-conversion.c (struct switch_conv_info): Add
      	contiguous_range and default_case_nonstandard fields.
      	(collect_switch_conv_info): Compute contiguous_range and
      	default_case_nonstandard fields, don't clear final_bb if
      	contiguous_range and only the default case doesn't have the required
      	structure.
      	(check_all_empty_except_final): Set default_case_nonstandard instead
      	of failing if contiguous_range and the default case doesn't have empty
      	block.
      	(check_final_bb): Add SWTCH argument, don't fail if contiguous_range
      	and only the default case doesn't have the required constants.  Skip
      	virtual phis.
      	(gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
      	if default_case_nonstandard.
      	(build_constructors): Build constant 1 just once.  Assert that default
      	values aren't inserted in between cases if contiguous_range.  Skip
      	virtual phis.
      	(build_arrays): Skip virtual phis.
      	(prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
      	(fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
      	Handle virtual phis.
      	(gen_inbound_check): Handle default_case_nonstandard case.
      	(process_switch): Adjust check_final_bb caller.  Call
      	gather_default_values with the first non-default case instead of
      	default case if default_case_nonstandard.
      
      	* gcc.dg/tree-ssa/vrp40.c: Add -fno-tree-switch-conversion to dg-options.
      	* gcc.dg/tree-ssa/vrp113.c: New test.
      	* gcc.dg/tree-ssa/cswtch-3.c: New test.
      	* gcc.dg/tree-ssa/cswtch-4.c: New test.
      	* gcc.dg/tree-ssa/cswtch-5.c: New test.
      
      From-SVN: r247538
      Jakub Jelinek committed
    • Replace absolute line numbers in c-c++-common · 53e62089
      2017-05-03  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* c-c++-common/Wshift-negative-value-1.c: Replace absolute line numbers.
      	* c-c++-common/Wshift-negative-value-2.c: Same.
      	* c-c++-common/Wshift-negative-value-3.c: Same.
      	* c-c++-common/Wshift-negative-value-4.c: Same.
      	* c-c++-common/cilk-plus/AN/pr57541.c: Same.
      	* c-c++-common/cpp/pr60400.c: Same.
      	* c-c++-common/fmax-errors.c: Same.
      	* c-c++-common/goacc/data-2.c: Same.
      	* c-c++-common/goacc/host_data-2.c: Same.
      	* c-c++-common/gomp/simd4.c: Same.
      	* c-c++-common/pr28656.c: Same.
      	* c-c++-common/pr43395.c: Same.
      	* c-c++-common/torture/pr57945.c: Same.
      
      From-SVN: r247537
      Tom de Vries committed
    • Add quotes to numerical comment arg of dg directive · 962913a5
      2017-05-03  Tom de Vries  <tom@codesourcery.com>
      
      	* c-c++-common/goacc/data-default-1.c: Add quotes to numerical comment
      	arg of dg directive.
      	* c-c++-common/goacc/routine-3.c: Same.
      	* c-c++-common/goacc/routine-4.c: Same.
      
      From-SVN: r247536
      Tom de Vries committed
    • Daily bump. · 3fe691c5
      From-SVN: r247533
      GCC Administrator committed
  2. 02 May, 2017 28 commits
    • ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i-- check. · 3608eff9
      	* ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
      	check.  Fix formatting.
      
      From-SVN: r247529
      Nathan Sidwell committed
    • ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff errors when… · 0e8d6eb7
      ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff errors when comparing specialized and unspecialized times.
      
      
      	* ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
      	errors when comparing specialized and unspecialized times.
      
      From-SVN: r247528
      Jan Hubicka committed
    • pt.c (is_auto_or_concept): Remove. · c3b73151
      2017-05-02  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	* pt.c (is_auto_or_concept): Remove.
      	(type_uses_auto_or_concept): Remove, unused.
      	(find_parameter_packs_r, extract_autos_r, is_auto_r): Adjust.
      	* parser.c (tree_type_is_auto_or_concept): Remove, unused.
      	* cp-tree.h (is_auto_or_concept): Remove.
      
      From-SVN: r247526
      Paolo Carlini committed
    • * es.po: Update. · 459d2f5a
      From-SVN: r247524
      Joseph Myers committed
    • Support fix-it hints that add new lines · ad53f123
      Previously fix-it hints couldn't contain newlines.  This is
      due to the need to print something user-readable for them
      within diagnostic-show-locus, and for handling them within
      edit-context for printing diffs and regenerating content.
      
      This patch enables limited support for fix-it hints with newlines,
      for suggesting adding new lines.
      Such a fix-it hint must have exactly one newline character, at the
      end of the content.  It must be an insertion at the beginning of
      a line (so that e.g. fix-its that split a pre-existing line are
      still rejected).
      
      They are printed by diagnostic-show-locus with a '+' in the
      left-hand margin, like this:
      
      test.c:42:4: note: suggest adding 'break;' here
      +      break;
           case 'b':
           ^~~~~~~~~
      
      and the printer injects "spans" if the insertion location is not
      near the primary range of the diagnostic e.g.:
      
      test.c:4:2: note: unrecognized 'putchar'; suggest including '<stdio.h>'
      test.c:1:1:
      +#include <stdio.h>
      
      test.c:4:2:
        putchar (ch);
        ^~~~~~~
      
      gcc/ChangeLog:
      	* diagnostic-show-locus.c
      	(layout::should_print_annotation_line_p): Make private.
      	(layout::print_annotation_line): Make private.
      	(layout::annotation_line_showed_range_p): Make private.
      	(layout::show_ruler): Make private.
      	(layout::print_source_line): Make private.  Pass in line and
      	line_width, rather than calling location_get_source_line.  Drop
      	returned value.
      	(layout::print_leading_fixits): New method.
      	(layout::print_any_fixits): Rename to...
      	(layout::print_trailing_fixits): ...this, and make private.
      	Don't print newline fixits.
      	(diagnostic_show_locus): Move logic for printing one row into...
      	(layout::print_line): ...this new function.  Move the
      	location_get_source_line call and error-handling from
      	print_source_line to here.  Call print_leading_fixits, and rename
      	print_any_fixits to print_trailing_fixits.
      	(selftest::test_fixit_insert_containing_newline): Update now that
      	newlines are partially supported.
      	(selftest::test_fixit_insert_containing_newline_2): New test.
      	(selftest::test_fixit_replace_containing_newline): Update comments.
      	(selftest::diagnostic_show_locus_c_tests): Call the new test.
      	* edit-context.c (class added_line): New class.
      	(class edited_line): Describe newline handling in comment.
      	(edited_line::actually_edited_p): New method.
      	(edited_line::print_content): Delete redundant decl.
      	(edited_line::m_predecessors): New field.
      	(edited_file::print_content): Call edited_line::print_content.
      	(edited_file::print_diff): Update to support newlines.
      	(edited_file::print_diff_hunk): Likewise.
      	(edited_file::print_run_of_changed_lines): New function.
      	(edited_file::print_diff_line): Convert to...
      	(print_diff_line): ...this.
      	(edited_file::get_effective_line_count): New function.
      	(edited_line::edited_line): Initialize new field m_predecessors.
      	(edited_line::~edited_line): Clean up m_predecessors.
      	(edited_line::apply_fixit): Handle newlines.
      	(edited_line::get_effective_line_count): New function.
      	(edited_line::print_content): New function.
      	(edited_line::print_diff_lines): New function.
      	(selftest::test_applying_fixits_insert_containing_newline): New
      	test.
      	(selftest::test_applying_fixits_replace_containing_newline): New
      	test.
      	(selftest::insert_line): New function.
      	(selftest::test_applying_fixits_multiple_lines): Add example of
      	inserting a line.
      	(selftest::edit_context_c_tests): Call the new tests.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/plugin/diagnostic-test-show-locus-bw.c
      	(test_fixit_insert_newline): New function.
      	* gcc.dg/plugin/diagnostic-test-show-locus-color.c
      	(test_fixit_insert_newline): New function.
      	* gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c
      	(test_fixit_insert_newline): New function.
      	* gcc.dg/plugin/diagnostic-test-show-locus-parseable-fixits.c
      	(test_fixit_insert_newline): New function.
      	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
      	(test_show_locus): Handle test_fixit_insert_newline.
      
      libcpp/ChangeLog:
      	* include/line-map.h (class rich_location): Update description of
      	newline handling.
      	(class fixit_hint): Likewise.
      	(fixit_hint::ends_with_newline_p): New decl.
      	* line-map.c (rich_location::maybe_add_fixit): Support newlines
      	in fix-it hints that are insertions of single lines at the start
      	of a line.  Don't consolidate into such fix-it hints.
      	(fixit_hint::ends_with_newline_p): New method.
      
      From-SVN: r247522
      David Malcolm committed
    • * fr.po: Update. · 19576ba7
      From-SVN: r247520
      Joseph Myers committed
    • tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete parameter cand. · 13fdeaaf
      	* tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
      	parameter cand.  Update dump information.
      	(get_computation_cost): Update uses.
      
      From-SVN: r247519
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (get_computation_aff_1): New. · db61fc7a
      	* tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
      	(get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
      	(get_computation_at, rewrite_use_address): Update use of
      	get_computation_aff.
      
      From-SVN: r247518
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters. · c7da0e81
      	* tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
      	(get_computation): Delete.
      	(get_computation_cost): Implement like get_computation_cost_at.
      	Use get_computation_at.
      	(get_computation_cost_at): Delete.
      	(rewrite_use_nonlinear_expr): Use get_computation_at.
      	(rewrite_use_compare, remove_unused_ivs): Ditto.
      
      From-SVN: r247517
      Bin Cheng committed
    • * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor. · d6176f72
      From-SVN: r247516
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs. · 1136cae4
      	* tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
      	(ivopts_global_cost_for_size): Rename parameter and update uses.
      	(iv_ca_recount_cost): Update uses.
      	(iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
      	candidates seperately in n_invs and n_cands.
      	(iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
      
      From-SVN: r247515
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (struct walk_tree_data): New. · 1c52c69f
      	* tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
      	(find_inv_vars_cb): New.
      	(find_depends): Renamed to ...
      	(find_inv_vars): ... this.
      	(add_candidate_1, force_var_cost): Call find_inv_vars.
      	(split_address_cost, determine_group_iv_cost_cond): Ditto.
      
      From-SVN: r247514
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to inv_vars. · 0ca91c77
      	* tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
      	inv_vars.  Add inv_exprs.
      	(struct iv_cand): Rename depends_on to inv_vars.
      	(struct ivopts_data): Rename max_inv_id/n_invariant_uses to
      	max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
      	Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
      	(dump_cand): Dump inv_vars.
      	(tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
      	(record_invariant, find_depends, add_candidate_1): Ditto.
      	(set_group_iv_cost, force_var_cost): Ditto.
      	(split_address_cost, ptr_difference_cost, difference_cost): Ditto.
      	(get_computation_cost_at, get_computation_cost): Ditto.
      	(determine_group_iv_cost_generic): Ditto.
      	(determine_group_iv_cost_address): Ditto.
      	(determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
      	(determine_group_iv_costs): Ditto.
      	(iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
      	(iv_ca_set_remove_invariants): Renamed to ...
      	(iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
      	(iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
      	(iv_ca_set_add_invariants):  Renamed to ...
      	(iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
      	(iv_ca_set_cp): Use iv_ca_set_add_invs.
      	(iv_ca_has_deps): Support inv_vars and inv_exprs.
      	(iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
      	(create_new_ivs): Remove useless dump.
      
      	gcc/testsuite
      	* g++.dg/tree-ssa/ivopts-3.C: Adjust test string.
      
      From-SVN: r247512
      Bin Cheng committed
    • tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo iv_cand code. · c1662028
      	* tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
      	iv_cand code.
      	(determine_group_iv_cost_cond, determine_iv_cost): Ditto.
      	(iv_ca_set_no_cp, create_new_iv): Ditto.
      
      From-SVN: r247510
      Bin Cheng committed
    • * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes. · 53685896
      From-SVN: r247509
      Bin Cheng committed
    • tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of function tree_check2. · 27c72a9b
      2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
      
      	* tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
      	function tree_check2.
      
      From-SVN: r247508
      Jeff Law committed
    • Fix documentation and a ctor in gcov.c · 4e8bfd79
      2017-05-02  Martin Liska  <mliska@suse.cz>
      
      	* doc/gcov.texi: Add missing preposition.
      	* gcov.c (function_info::function_info): Properly fill up
      	all member variables.
      
      From-SVN: r247507
      Martin Liska committed
    • expr.c (expand_expr_real_2): Re-cost if previous costs are the same. · 22677ff0
      2017-04-26  Tamar Christina  <tamar.christina@arm.com>
      
      	* expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
      
      From-SVN: r247505
      Tamar Christina committed
    • simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case. · cc5b8f3d
      gcc/
      2017-04-27  Tamar Christina  <tamar.christina@arm.com>
      
      	* simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
      
      gcc/testsuite/
      2017-04-27  Tamar Christina  <tamar.christina@arm.com>
      
      	* gcc.dg/lsr-div1.c: New testcase.
      
      From-SVN: r247504
      Tamar Christina committed
    • Make right PR. · c8429337
      From-SVN: r247503
      Martin Liska committed
    • re PR bootstrap/69506 (check-in 232454 seems to cause problems with cygwin builds) · 8a20a3c7
      2017-05-02  Hugo Beauzée-Luyssen <hugo@beauzee.fr>
      
      	PR libstdc++/69506
      	* config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.
      
      From-SVN: r247502
      Hugo Beauzée-Luyssen committed
    • Remove LTO_STREAMER_DEBUG (PR lto/79489). · c1a2a0b8
      2017-05-02  Martin Liska  <mliska@suse.cz>
      
      	PR lto/79489.
      	* lto-streamer-in.c (lto_read_tree_1): Remove
      	LTO_STREAMER_DEBUG.
      	* lto-streamer.c (struct tree_hash_entry): Likewise.
      	(struct tree_entry_hasher): Likewise.
      	(tree_entry_hasher::hash): Likewise.
      	(tree_entry_hasher::equal): Likewise.
      	(lto_streamer_init): Likewise.
      	(lto_orig_address_map): Likewise.
      	(lto_orig_address_get): Likewise.
      	(lto_orig_address_remove): Likewise.
      	* lto-streamer.h: Likewise.
      	* tree-streamer-in.c (streamer_alloc_tree): Likewise.
      	* tree-streamer-out.c (streamer_write_tree_header): Likewise.
      
      From-SVN: r247501
      Martin Liska committed
    • * config/i386/avx512fintrin.h (_mm_mask_add_round_sd) · 1853f5c7
      	(_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
      	(mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
      	(mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
      	(mm_maskz_sub_round_ss, _mm_mask_add_sd)
      	(mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
      	(mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
      	(mm_maskz_sub_ss): New intrinsics.
      	* config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
      	(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
      	* config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
      	(__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
      	(__builtin_ia32_subss_mask_round): New builtins.
      	* config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
      	(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
      	* config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
      	Renamed to ...
      	(<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
      	(v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
      	Changed to ...
      	(v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
      	... this.
      
      testsuite/ChangeLog:
      
      	* gcc.target/i386/avx512f-vaddsd-1.c (_mm_mask_add_sd)
      	(_mm_maskz_add_sd, _mm_mask_add_round_sd)
      	(_mm_maskz_add_round_sd): Test new intrinsics.
      	* gcc.target/i386/avx512f-vaddsd-2.c: New.
      	* gcc.target/i386/avx512f-vaddss-1.c (_mm_mask_add_ss)
      	(_mm_maskz_add_ss, _mm_mask_add_round_ss)
      	(_mm_maskz_add_round_ss): Test new intrinsics.
      	* gcc.target/i386/avx512f-vaddss-2.c: New.
      	* gcc.target/i386/avx512f-vsubsd-1.c (_mm_mask_sub_sd)
      	(_mm_maskz_sub_sd, _mm_mask_sub_round_sd)
      	(_mm_maskz_sub_round_sd): Test new intrinsics.
      	* gcc.target/i386/avx512f-vsubsd-2.c: New.
      	* gcc.target/i386/avx512f-vsubss-1.c (_mm_mask_sub_ss)
      	(_mm_maskz_sub_ss, _mm_mask_sub_round_ss)
      	(_mm_maskz_sub_round_ss): Test new intrinsics.
      	* gcc.target/i386/avx512f-vsubss-2.c: New.
      	* gcc.target/i386/avx-1.c (__builtin_ia32_addsd_mask_round)
      	(__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
      	(__builtin_ia32_subss_mask_round): Test new builtins.
      	* gcc.target/i386/sse-13.c: Ditto.
      	* gcc.target/i386/sse-23.c: Ditto.
      	* gcc.target/i386/sse-14.c (_mm_maskz_add_round_sd)
      	(_mm_maskz_add_round_ss, _mm_maskz_sub_round_sd)
      	(_mm_maskz_sub_round_ss, _mm_mask_add_round_sd)
      	(_mm_mask_add_round_ss, _mm_mask_sub_round_sd)
      	(_mm_mask_sub_round_ss): Test new intrinsics.
      	* gcc.target/i386/testround-1.c: Ditto.
      
      From-SVN: r247498
      Sebastian Peryt committed
    • [PR 78687] Set SRA grp_write lazily · 2bba7541
      2017-05-02  Martin Jambor  <mjambor@suse.cz>
      
      	PR tree-optimization/78687
      	* tree-sra.c (access): New field parent.
      	(process_subtree_disqualification): New function.
      	(disqualify_candidate): Call it.
      	(build_accesses_from_assign): Reset write flag if creating an
      	assighnment link.
      	(build_access_subtree): Fill in parent field and also prpagate
      	down grp_write flag.
      	(create_artificial_child_access): New parameter set_grp_write, set
      	grp_write to its value.
      	(propagate_subaccesses_across_link): Also propagate grp_write flag
      	values.
      	(propagate_all_subaccesses): Push the closest parent back to work
      	queue if add_access_to_work_queue returned true.
      
      testsuite/
      	* g++.dg/tree-ssa/pr78687.C: New test.
      
      From-SVN: r247497
      Martin Jambor committed
    • common.opt (fstrict-overflow): Alias negative to fwrapv. · 2bf54d93
      2017-05-02  Richard Biener  <rguenther@suse.de>
      
      	* common.opt (fstrict-overflow): Alias negative to fwrapv.
      	* doc/invoke.texi (fstrict-overflow): Remove all traces of
      	-fstrict-overflow documentation.
      	* tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
      	(POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
      	flag_strict_overflow.
      	* ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
      	* lto-opts.c (lto_write_options): Do not stream it.
      	* lto-wrapper.c (merge_and_complain): Do not handle it.
      	* opts.c (default_options_table): Do not set -fstrict-overflow.
      	(finish_options): Likewise do not clear it when sanitizing.
      	* simplify-rtx.c (simplify_const_relational_operation): Do not
      	test flag_strict_overflow.
      
      	ada/
      	* gcc-interface/misc.c (gnat_post_options): Do not set
      	-fstrict-overflow.
      
      	* c-c++-common/Wlogical-op-1.c: Add -fwrapv to restore previous
      	behavior.
      	* gcc.target/i386/pr46253.c: Make i unsigned to avoid warning.
      
      From-SVN: r247495
      Richard Biener committed
    • * gennews (files): Add files for GCC 7. · 03dc1f5f
      From-SVN: r247491
      Jakub Jelinek committed
    • alpha.md (*add<mode>3_ieee): Merge to add<mode>3 using enabled attribute. · e7c54c8e
      	* config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
      	using enabled attribute.
      	(*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
      	(*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
      	(*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
      	(*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
      	(*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
      	(*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
      	(*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
      	(*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
      	(*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
      	(*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
      
      From-SVN: r247490
      Uros Bizjak committed
    • i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG. · 0b1053b2
      	* config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
      
      From-SVN: r247489
      Uros Bizjak committed