1. 08 May, 2017 7 commits
  2. 07 May, 2017 4 commits
  3. 06 May, 2017 14 commits
    • re PR tree-optimization/78496 (Missed opportunities for jump threading) · 10dfbcba
      	PR tree-optimization/78496
      	* tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
      	code.
      
      From-SVN: r247722
      Jeff Law committed
    • re PR tree-optimization/78496 (Missed opportunities for jump threading) · 973dfbb4
      	PR tree-optimization/78496
      	* tree-vrp.c (simplify_assert_expr_using_ranges): New function.
      	(simplify_stmt_using_ranges): Call it.
      	(vrp_dom_walker::before_dom_children): Extract equivalences
      	from an ASSERT_EXPR with an equality comparison against a
      	constant.
      
      	PR tree-optimization/78496
      	* gcc.dg/tree-ssa/ssa-thread-16.c: New test.
      	* gcc.dg/tree-ssa/ssa-thread-17.c: New test.
      
      From-SVN: r247721
      Jeff Law committed
    • Record equivalences for spill registers · 8ffa3150
      If we decide to allocate a call-clobbered register R to a value that
      is live across a call, LRA will create a new spill register TMPR,
      insert:
      
         TMPR <- R
      
      before the call and
      
         R <- TMPR
      
      after it.  But if we then failed to allocate a register to TMPR, we would
      always spill it to the stack, even if R was known to be equivalent to
      a constant or to some existing memory location.  And on AArch64, we'd
      always fail to allocate such a register for 128-bit Advanced SIMD modes,
      since no registers of those modes are call-preserved.
      
      This patch avoids the problem by copying the equivalence information
      from the original pseudo to the spill register.  It means that the
      code for the testcase is as good with -O2 as it is with -O,
      whereas previously the -O code was better.
      
      [Based on the code ARM contributed in branches/ARM/sve-branch@247248]
      
      2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	* lra-constraints.c (lra_copy_reg_equiv): New function.
      	(split_reg): Use it to copy equivalence information from the
      	original register to the spill register.
      
      gcc/testsuite/
      	* gcc.target/aarch64/spill_1.c: New test.
      
      From-SVN: r247720
      Richard Sandiford committed
    • PR 75964: Invalid integer ABS handling in simplify-rtx.c · 2a3f7997
      RTL has no distinction between signed and unsigned values, so it
      doesn't make sense to test for signed overflow.
      
      2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
      
      gcc/
      	PR rtl-optimization/75964
      	* simplify-rtx.c (simplify_const_relational_operation): Remove
      	invalid handling of comparisons of integer ABS.
      
      gcc/testsuite/
      	PR rtl-optimization/75964
      	* gcc.dg/torture/pr75964.c: New test.
      
      From-SVN: r247719
      Richard Sandiford committed
    • Remove default_packed lines from i386/avx-vtestp{d,s}* · d554bf23
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80606
      	* gcc.target/i386/avx-vtestpd-1.c: Remove default_packed lines.
      	* gcc.target/i386/avx-vtestpd-2.c: Same.
      	* gcc.target/i386/avx-vtestpd-256-1.c: Same.
      	* gcc.target/i386/avx-vtestpd-256-2.c: Same.
      	* gcc.target/i386/avx-vtestpd-256-3.c: Same.
      	* gcc.target/i386/avx-vtestpd-3.c: Same.
      	* gcc.target/i386/avx-vtestps-1.c: Same.
      	* gcc.target/i386/avx-vtestps-2.c: Same.
      	* gcc.target/i386/avx-vtestps-256-1.c: Same.
      	* gcc.target/i386/avx-vtestps-256-2.c: Same.
      	* gcc.target/i386/avx-vtestps-256-3.c: Same.
      	* gcc.target/i386/avx-vtestps-3.c: Same.
      
      From-SVN: r247718
      Tom de Vries committed
    • Add absolute line number comment in gcc.target/avr/progmem-error-1.cpp · 7a976fe7
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	* gcc.target/avr/progmem-error-1.cpp: Add abolute line number comment.
      
      From-SVN: r247717
      Tom de Vries committed
    • Replace absolute line numbers in gcc.target/powerpc · 0e852c66
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* gcc.target/powerpc/altivec-macros.c: Replace absolute line numbers.
      	* gcc.target/powerpc/altivec-types-1.c: Same.
      
      From-SVN: r247716
      Tom de Vries committed
    • Replace absolute line numbers in gcc.target/spu · 63c40d92
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* gcc.target/spu/Wmain.c: Replace absolute line numbers.
      	* gcc.target/spu/intrinsics-1.c: Same.
      
      From-SVN: r247715
      Tom de Vries committed
    • Replace absolute line numbers in gcc.target/arm · b25b8f91
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* gcc.target/arm/pr69180.c: Replace absolute line numbers.
      
      From-SVN: r247714
      Tom de Vries committed
    • Replace absolute line numbers in gcc.target/aarch64 · 6df13491
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* gcc.target/aarch64/spellcheck_1.c: Replace absolute line numbers.
      	* gcc.target/aarch64/spellcheck_2.c: Same.
      	* gcc.target/aarch64/spellcheck_3.c: Same.
      
      From-SVN: r247713
      Tom de Vries committed
    • Replace absolute line numbers in g++.dg/{debug,goacc} · e01261fe
      2017-05-06  Tom de Vries  <tom@codesourcery.com>
      
      	PR testsuite/80557
      	* g++.dg/debug/dwarf2/dwarf2-1.C: Replace absolute line numbers.
      	* g++.dg/debug/dwarf2/dwarf2-2.C: Same.
      	* g++.dg/debug/dwarf2/pr46123-2.C: Same.
      	* g++.dg/debug/dwarf2/typedef5.C: Same.
      	* g++.dg/goacc/data-1.C: Same.
      
      From-SVN: r247712
      Tom de Vries committed
    • i386.c (ext_80387_constant_init): Do not explicitly initialize to zero. · 9f36390d
      	* config/i386/i386.c (ext_80387_constant_init): Do not explicitly
      	initialize to zero.
      	(init_regs): Remove declaration.
      	(function_arg_advance_32): Initialize error_p as boolean variable.
      
      From-SVN: r247711
      Uros Bizjak committed
    • Add fuchsia support to libgcc · 7ab8766a
      	* config/arm/unwind-arm.h (_Unwind_decode_typeinfo_ptr): Use
      	pc-relative indirect handling for fuchsia.
      	* config/t-slibgcc-fuchsia: New file.
      	* config.host (*-*-fuchsia*, aarch64*-*-fuchsia*, arm*-*-fuchsia*,
      	x86_64-*-fuchsia*): Add definitions.
      
      From-SVN: r247710
      Joshua Conner committed
    • Daily bump. · 08dd548e
      From-SVN: r247709
      GCC Administrator committed
  4. 05 May, 2017 15 commits
    • store-motion.c (remove_reachable_equiv_notes): Reformat long lines. · 5cf5c9da
      	* store-motion.c (remove_reachable_equiv_notes): Reformat long
      	lines.  Use for (;;).
      
      From-SVN: r247705
      Nathan Sidwell committed
    • rs6000.c (rs6000_vect_nonmem): New static var. · 9945596c
      [gcc]
      
      2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
      	(rs6000_init_cost): Initialize rs6000_vect_nonmem.
      	(rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
      	(rs6000_finish_cost): Avoid vectorizing simple copy loops with
      	VF=2 that require versioning.
      
      [gcc/testsuite]
      
      2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* gcc.target/powerpc/versioned-copy-loop.c: New file.
      
      From-SVN: r247671
      Bill Schmidt committed
    • Convert CARET_LINE_MARGIN to const int · ba82e6b5
      gcc/ChangeLog:
      	* diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
      	int.
      
      From-SVN: r247666
      David Malcolm committed
    • Convert diagnostic_override_option_index from macro to inline function · 62a77bdf
      gcc/ChangeLog:
      	* diagnostic.h (diagnostic_override_option_index): Convert from
      	macro to inline function.
      
      From-SVN: r247665
      David Malcolm committed
    • Get rid of macros for diagnostic_report_current_module · 26d5ed6c
      diagnostic.h has a couple of macros (diagnostic_last_module_changed
      and diagnostic_set_last_module) which are only used within
      diagnostic_report_current_module.
      
      This patch eliminates the macros in favor of static functions within
      diagnostic.c.
      
      No functional change intended.
      
      gcc/ChangeLog:
      	* diagnostic.c (last_module_changed_p): New function.
      	(set_last_module): New function.
      	(diagnostic_report_current_module): Convert macro usage to
      	the above functions.
      	* diagnostic.h (diagnostic_context::last_module): Strengthen
      	from const line_map * to const line_map_ordinary *.
      	(diagnostic_last_module_changed): Delete macro.
      	(diagnostic_set_last_module): Delete macro.
      
      From-SVN: r247664
      David Malcolm committed
    • Eliminate report_diagnostic macro · 56d35585
      This patch eliminates the report_diagnostic macro, manually
      expanding it in all sites in the code.
      
      No functional change intended.
      
      gcc/c-family/ChangeLog:
      	* c-common.c (c_cpp_error): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      
      gcc/c/ChangeLog:
      	* c-decl.c (warn_defaults_to): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      	* c-errors.c (pedwarn_c99): Likewise.
      	(pedwarn_c90): Likewise.
      
      gcc/cp/ChangeLog:
      	* error.c (pedwarn_cxx98): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      
      gcc/ChangeLog:
      	* diagnostic.c (diagnostic_impl): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      	(diagnostic_n_impl_richloc): Likewise.
      	* diagnostic.h (report_diagnostic): Delete macro.
      	* rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      	* substring-locations.c (format_warning_va): Likewise.
      
      gcc/fortran/ChangeLog:
      	* cpp.c (cb_cpp_error): Replace report_diagnostic
      	with diagnostic_report_diagnostic.
      	* error.c (gfc_warning): Likewise.
      	(gfc_warning_now_at): Likewise.
      	(gfc_warning_now): Likewise.
      	(gfc_warning_internal): Likewise.
      	(gfc_error_now): Likewise.
      	(gfc_fatal_error): Likewise.
      	(gfc_error_opt): Likewise.
      	(gfc_internal_error): Likewise.
      
      From-SVN: r247663
      David Malcolm committed
    • diagnostic.c: add print_option_information · 80ceac09
      This patch simplifies diagnostic_report_diagnostic by moving
      option-printing to a new subroutine.
      
      Doing so required a slight rewrite.  In both the old and new
      code, context->option_name returns a malloc-ed string.
      The old behavior was to then use ACONCAT to manipulate the
      format_spec, appending the option metadata.
      ACONCAT calcs the buffer size, then uses alloca, and then copies the
      data to the on-stack buffer.
      
      Given the alloca, this needs rewriting when moving the printing to
      a subroutine.  In the new version, the metadata is simply printed
      using pp_* calls (so it's hitting the obstack within the
      pretty_printer).
      
      This means we can get rid of the save/restore of format_spec: I don't
      believe anything else in the code modifies it.
      
      It also seems inherently simpler; it seems odd to me to be
      appending metadata to the formatting string, rather than simply
      printing the metadata after the formatted string is printed
      (the old code also assumed that no option name contained a '%').
      
      No functional change intended.
      
      gcc/ChangeLog:
      	* diagnostic.c (diagnostic_report_diagnostic): Eliminate
      	save/restor of format_spec.  Move option-printing code to...
      	(print_option_information): ...this new function, and
      	reimplement by simply printing to the pretty_printer,
      	rather than appending to the format string.
      
      From-SVN: r247661
      David Malcolm committed
    • diagnostic_report_diagnostic: refactor pragma-handling · dc41c9b0
      This patch simplifies diagnostic_report_diagnostic by moving the
      pragma-handling logic into a subroutine.
      
      No functional change intended.
      
      gcc/ChangeLog:
      	* diagnostic.c (diagnostic_report_diagnostic): Split out pragma
      	handling logic into...
      	(update_effective_level_from_pragmas): ...this new function.
      
      From-SVN: r247660
      David Malcolm committed
    • RISC-V: Add -mstrict-align option · 82285692
      The RISC-V user ISA permits misaligned accesses, but they may trap
      and be emulated.  That emulation software needs to be compiled assuming
      strict alignment.
      
      Even when strict alignment is not required, set SLOW_UNALIGNED_ACCESS
      based upon -mtune to avoid a performance pitfall.
      
      gcc/ChangeLog:
      
      2017-05-04  Andrew Waterman  <andrew@sifive.com>
      
      	* config/riscv/riscv.opt (mstrict-align): New option.
      	* config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
      	(SLOW_UNALIGNED_ACCESS): Define.
      	(riscv_slow_unaligned_access): Declare.
      	* config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
      	field.
      	(riscv_slow_unaligned_access): New variable.
      	(rocket_tune_info): Set slow_unaligned_access to true.
      	(optimize_size_tune_info): Set slow_unaligned_access to false.
      	(riscv_cpu_info_table): Add entry for optimize_size_tune_info.
      	(riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
      	(riscv_option_override): Set riscv_slow_unaligned_access.
              * doc/invoke.texi: Add -mstrict-align to RISC-V.
      
      From-SVN: r247659
      Andrew Waterman committed
    • RISC-V: Unify indention in riscv.md · 248710c4
      This contains only whitespace changes.
      
      gcc/ChangeLog
      
      2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
      
      	* config/riscv/riscv.md: Unify indentation.
      
      From-SVN: r247658
      Kito Cheng committed
    • re PR target/79038 (Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128) · 8acb8575
      [gcc]
      2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/79038
      	PR target/79202
      	PR target/79203
      	* config/rs6000/rs6000.md (u code attribute): Add FIX and
      	UNSIGNED_FIX.
      	(extendsi<mode>2): Add support for doing sign extension via
      	VUPKHSW and XXPERMDI if the value is in Altivec registers and we
      	don't have ISA 3.0 instructions.
      	(extendsi<mode>2 splitter): Likewise.
      	(fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
      	generate the normal insns since SImode can now go in vector
      	registers.  Disallow the special UNSPECs needed for previous
      	machines to hide SImode being used.  Add new insns
      	fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
      	(fix_trunc<mode>si2_stfiwx): Likewise.
      	(fix_trunc<mode>si2_internal): Likewise.
      	(fixuns_trunc<mode>si2): Likewise.
      	(fixuns_trunc<mode>si2_stfiwx): Likewise.
      	(fctiw<u>z_<mode>_smallint): Likewise.
      	(fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
      	of floating point to 32-bit integer from doing a direct move to
      	the GPR registers to do a store.
      	(fctiwz_<mode>): Break long line.
      
      [gcc/testsuite]
      2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	PR target/79038
      	PR target/79202
      	PR target/79203
      	* gcc.target/powerpc/ppc-round3.c: New test.
      	* gcc.target/powerpc/ppc-round2.c: Update expected code.
      
      From-SVN: r247657
      Michael Meissner committed
    • cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value. · 4b4b2e58
      	* cp-tree.h (IDENTIFIER_GLOBAL_VALUE): Use get_namespace_value.
      	(SET_IDENTIFIER_GLOBAL_VALUE): Use set_global_value.
      	(IDENTIFIER_NAMESPACE_VALUE): Delete.
      	* name-lookup.h (namespace_binding, set_namespace_binding):
      	Replace
      	with ...
      	(get_namespace_value, set_global_value): ... these.
      	(get_global_value_if_present, is_typename_at_global_scope):
      	Delete.
      	* decl.c (poplevel): Use get_namespace_value.
      	(grokdeclarator): Use IDENTIFIER_GLOBAL_VALUE.
      	* class.c (build_vtbl_initializer): Stash library decl in
      	static var. Use IDENTIFIER_GLOBAL_VALUE.
      	* except.c (do_get_exception_ptr, do_begin_catch, do_end_catch)
      	do_allocate_exception, do_free_exception, build_throw): Likewise.
      	* init.c (throw_bad_array_new_length): Likewise.
      	* rtti.c (throw_bad_cast, throw_bad_typeid): Likewise.
      	* name-lookup.c (arg_assoc_namespace, pushdecl_maybe_friend_1)
      	check_for_our_of_scope_variable, push_overloaded_decl_1): Use
      	get_namespace_value.
      	(set_namespace_binding_1): Rename to
      	(set_namespace_binding): ... here.
      	(set_global_value): New.
      	(lookup_name_innermost_nonclass_level_1, push_namespace): Use
      	get_namespace_value.
      	* pt.c (listify): Use get_namespace_value.
      ((--This line, and those below, will be ignored--
      
      M    cp/name-lookup.c
      M    cp/name-lookup.h
      M    cp/ChangeLog
      M    cp/except.c
      M    cp/class.c
      M    cp/pt.c
      M    cp/init.c
      M    cp/cp-tree.h
      M    cp/decl.c
      M    cp/rtti.c
      
      From-SVN: r247654
      Nathan Sidwell committed
    • Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c. · 359b060e
      	* Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
      	* tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
      	(addr_list, addr_offset_valid_p): New.
      	(split_address_groups): Check offset validity with above function.
      	(gt-tree-ssa-loop-ivopts.h): Include header file.
      
      From-SVN: r247653
      Bin Cheng committed
    • builtins.c (check_sizes, [...]): Fix typos introduced during merge conflict resolution. · 13c5654f
      gcc/ChangeLog:
      	* builtins.c (check_sizes, check_strncat_sizes): Fix typos
      	introduced during merge	conflict resolution.
      	(expand_builtin_strncat): Same.
      
      gcc/testsuite/ChangeLog:
      	* gcc.dg/pr78138.c: Adjust text of expected diagnostics.
      	* gcc.dg/pr79214.c: Same.
      	* gcc.dg/pr79222.c: Same.
      	* gcc.dg/pr79223.c: Same.
      	* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c: Expect warnings.
      
      From-SVN: r247652
      Martin Sebor committed
    • * config.gcc (arm*-*-*): Add missing 'fi'. · 2d66253d
      From-SVN: r247650
      Nathan Sidwell committed