1. 17 Jul, 2017 14 commits
    • re PR tree-optimization/81374 (ICE in bb_top_order_cmp, at tree-loop-distribution.c:391) · 3fb82452
      	PR tree-optimization/81374
      	* tree-loop-distribution.c (pass_loop_distribution::execute): Record
      	the max index of basic blocks, rather than number of basic blocks.
      
      From-SVN: r250268
      Bin Cheng committed
    • [ARC] Consolidate PIC implementation. · b6c354eb
      This patch refactors a number of functions and compiler hooks into using a
      single function which checks if a rtx is suited for pic or not. Removed
      functions are arc_legitimate_pc_offset_p and arc_legitimate_pic_operand_p
      beeing replaced by calls to arc_legitimate_pic_addr_p. Thus we have an
      unitary way of checking a rtx beeing pic.
      
      gcc/
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
      	proto.
      	(arc_legitimate_pic_operand_p): Likewise.
      	* config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
      	function.
      	(arc_needs_pcl_p): Likewise.
      	(arc_legitimate_pc_offset_p): Likewise.
      	(arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
      	function is also used in constrains.md.
      	(arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
      	validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
      	PLUS.  Only return true/false in known cases, otherwise assert.
      	(arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
      	is already called in arc_legitimate_constant_p.
      	* config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
      	pic addresses.
      	(LEGITIMATE_PIC_OPERAND_P): Use
      	arc_raw_symbolic_reference_mentioned_p function.
      	* config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
      	function.
      	(Cal): Likewise.
      	(C32): Likewise.
      
      gcc/testsuite
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/pr9000674901.c: New file.
      	* gcc.target/arc/pic-1.c: Likewise.
      	* gcc.target/arc/pr9001191897.c: Likewise.
      
      From-SVN: r250267
      Claudiu Zissulescu committed
    • [PATCH] [ARC] Add support for naked functions. · 1825c61e
      gcc/
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
                  Andrew Burgess  <andrew.burgess@embecosm.com>
      
              * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
              (arc_return_address_register): New function.
              * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
              (arc_handle_fndecl_attribute): Add naked attribute.
              (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
              (TARGET_WARN_FUNC_RETURN): Likewise.
              (arc_allocate_stack_slots_for_args): New function.
              (arc_warn_func_return): Likewise.
              (machine_function): Change type fn_type.
              (arc_compute_function_type): Consider new naked function type,
              change function return type.
              (arc_must_save_register): Adapt to handle new
              arc_compute_function_type's return type.
              (arc_expand_prologue): Likewise.
              (arc_expand_epilogue): Likewise.
              (arc_return_address_regs): Delete.
              (arc_return_address_register): New function.
              (arc_epilogue_uses): Use above function.
              * config/arc/arc.h (arc_return_address_regs): Delete prototype.
              (arc_function_type): Change encoding, add naked type.
              (ARC_INTERRUPT_P): Change to handle the new encoding.
              (ARC_FAST_INTERRUPT_P): Likewise.
              (ARC_NORMAL_P): Define.
              (ARC_NAKED_P): Likewise.
              (arc_compute_function_type): Delete prototype.
              * config/arc/arc.md (in_ret_delay_slot): Use
              arc_return_address_register function.
              (simple_return): Likewise.
              (p_return_i): Likewise.
      
      gcc/testsuite
      2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
                  Andrew Burgess  <andrew.burgess@embecosm.com>
      
              * gcc.target/arc/naked-1.c: New file.
              * gcc.target/arc/naked-2.c: Likewise.
      
      Co-Authored-By: Andrew Burgess <andrew.burgess@embecosm.com>
      
      From-SVN: r250266
      Claudiu Zissulescu committed
    • re PR tree-optimization/81428 (ICE: in build_one_cst, at tree.c:2079 with -O2.… · 9ebce098
      re PR tree-optimization/81428 (ICE: in build_one_cst, at tree.c:2079 with -O2. Fixed point division.)
      
      	PR tree-optimization/81428
      	* match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
      	can't be built for those types.
      
      	* gcc.dg/fixed-point/pr81428.c: New test.
      
      From-SVN: r250265
      Jakub Jelinek committed
    • Remove stuff dead since r239246. · f986e51e
      	* config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
      	* config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
      	(avr_inform_devices): Remove dead stuff.
      
      From-SVN: r250264
      Georg-Johann Lay committed
    • gcc_update (files_and_dependencies): Remove dead entry. · 8b99a6f7
      	* gcc_update (files_and_dependencies)
      	[gcc/config/avr/avr-tables.opt]: Remove dead entry.
      
      From-SVN: r250263
      Georg-Johann Lay committed
    • arm_neon.h: Fix softp typo. · c24920b2
      2017-07-17  Tamar Christina  <tamar.christina@arm.com>
      
      	* config/arm/arm_neon.h: Fix softp typo.
      
      From-SVN: r250262
      Tamar Christina committed
    • re PR tree-optimization/81365 (GCC miscompiles swap) · e8dd1313
      	PR tree-optimization/81365
      	* tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
      	aggregate moves onto bb predecessor edges, make sure there are no
      	loads that could alias the lhs in between the start of bb and the
      	loads from *phi.
      
      	* g++.dg/torture/pr81365.C: New test.
      
      From-SVN: r250261
      Jakub Jelinek committed
    • re PR middle-end/80929 (Division with constant no more optimized to mult highpart) · 764eec6c
      	PR 80929
      	* config/avr/avr.c (avr_mul_highpart_cost): New static function.
      	(avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
      	[LSHIFTRT, outer_code = TRUNCATE]: Same.
      
      From-SVN: r250258
      Georg-Johann Lay committed
    • re PR tree-optimization/81396 (Optimization of reading Little-Endian 64-bit… · 1f1e8aed
      re PR tree-optimization/81396 (Optimization of reading Little-Endian 64-bit number with portable code has a regression)
      
      	PR tree-optimization/81396
      	* tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
      	(init_symbolic_number): Initialize it to 1.
      	(perform_symbolic_merge): Add n_ops from both operands into the new
      	n_ops.
      	(find_bswap_or_nop): Don't consider n->n == cmpnop computations
      	without base_addr as useless if they need more than one operation.
      	(bswap_replace): Handle !bswap case for NULL base_addr.
      
      	* gcc.dg/tree-ssa/pr81396.c: New test.
      
      From-SVN: r250257
      Jakub Jelinek committed
    • Insert diverging jump alap in nvptx_single · ed9091b2
      2017-07-17  Tom de Vries  <tom@codesourcery.com>
      
      	PR target/81069
      	* config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
      	as possible.
      
      From-SVN: r250256
      Tom de Vries committed
    • [SPARC/RTEMS] Add __FIX_LEON3FT_B2BST · 42ec024b
      In case the LEON3FT back-to-back store workaround is active
      (sparc_fix_b2bst), then define the builtin define __FIX_LEON3FT_B2BST on
      RTEMS.  The intended use case for this is operating system code in
      assembly language.  See also:
      
      https://lists.rtems.org/pipermail/devel/2017-July/018463.html
      
      gcc/
      	*  gcc/config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
      	conditional builtin define __FIX_LEON3FT_B2BST.
      
      From-SVN: r250254
      Sebastian Huber committed
    • [RTEMS] Add multilibs for LEON3FT back-to-back store workaround · ecaf6857
      Replace MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED for readability.
      -mfix-gr712rc and -mfix-ut700 are currently equivalent.
      
      gcc/
      	* config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
      	MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
      	with -mfix-ut700.
      
      From-SVN: r250252
      Daniel Cederman committed
    • Daily bump. · 417e2a6a
      From-SVN: r250251
      GCC Administrator committed
  2. 16 Jul, 2017 15 commits
  3. 15 Jul, 2017 5 commits
  4. 14 Jul, 2017 6 commits
    • libgo: don't copy semt into runtime.inc · f30d2091
          
          https://gcc.gnu.org/PR81449 reports a problem with the definition semt
          in runtime.inc on some systems. Since the C code in libgo/runtime
          doesn't need semt, just don't copy it into runtime.inc.
          
          Reviewed-on: https://go-review.googlesource.com/48593
      
      From-SVN: r250217
      Ian Lance Taylor committed
    • cmd/go: use gccSupportsFlag for -fsplit-stack · b9d36a8d
          
          Don't assume that all (or only) 386/amd64 compilers support
          -fsplit-stack.
          
          Reviewed-on: https://go-review.googlesource.com/48592
      
      From-SVN: r250216
      Ian Lance Taylor committed
    • rs6000-c.c (altivec_overloaded_builtins): Add array entries to represent… · b70bb05b
      rs6000-c.c (altivec_overloaded_builtins): Add array entries to represent __ieee128 versions of the scalar_test_data_class...
      
      gcc/ChangeLog:
      
      2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
      	array entries to represent __ieee128 versions of the
      	scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
      	scalar_extract_sig, and scalar_insert_exp built-in functions.
      	(altivec_resolve_overloaded_builtin): Add special case handling
      	for the __builtin_scalar_insert_exp function, as represented by
      	the P9V_BUILTIN_VEC_VSIEDP constant.
      	* config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
      	exponent support for __ieee128 argument.
      	(VSESQP): Add scalar extract signature support for __ieee128
      	argument.
      	(VSTDCNQP): Add scalar test negative support for __ieee128
      	argument.
      	(VSIEQP): Add scalar insert exponent support for __int128 argument
      	with __ieee128 result.
      	(VSIEQPF): Add scalar insert exponent support for __ieee128
      	argument with __ieee128 result.
      	(VSTDCQP): Add scalar test data class support for __ieee128
      	argument.
      	(VSTDCNQP): Add overload support for scalar test negative with
      	__ieee128 argument.
      	(VSTDCQP): Add overload support for scalar test data class
      	__ieee128 argument.
      	* config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
      	UNSPEC_VSX_SXSIGDP.
      	(UNSPEC_VSX_SIEXPQP): New constant.
      	(xsxexpqp): New insn for VSX scalar extract exponent quad
      	precision.
      	(xsxsigqp): New insn for VSX scalar extract significand quad
      	precision.
      	(xsiexpqpf): New insn for VSX scalar insert exponent quad
      	precision with floating point argument.
      	(xststdcqp): New expand for VSX scalar test data class quad
      	precision.
      	(xststdcnegqp): New expand for VSX scalar test negative quad
      	precision.
      	(xststdcqp): New insn to match expansions for VSX scalar test data
      	class quad precision and VSX scalar test negative quad precision.
      	* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
      	special case operand checking to enforce that second operand of
      	VSX scalar test data class with quad precision argument is a 7-bit
      	unsigned literal.
      	* doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
      	prototypes and descriptions of __ieee128 versions of
      	scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
      	scalar_test_data_class, and scalar_test_neg built-in functions.
      
      gcc/testsuite/ChangeLog:
      
      2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
      
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-5.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-6.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-exp-7.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-3.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-5.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-6.c: New test.
      	* gcc.target/powerpc/bfp/scalar-extract-sig-7.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-11.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-12.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-13.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-14.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-15.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-6.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: New test.
      	* gcc.target/powerpc/bfp/scalar-insert-exp-9.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-10.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-12.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-13.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-14.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-15.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-8.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-data-class-9.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-neg-4.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-neg-6.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-neg-7.c: New test.
      	* gcc.target/powerpc/bfp/scalar-test-neg-8.c: New test.
      	* gcc.target/powerpc/bfp/vec-extract-exp-4.c: New test.
      	* gcc.target/powerpc/bfp/vec-extract-exp-5.c: New test.
      	* gcc.target/powerpc/bfp/vec-extract-sig-4.c: New test.
      	* gcc.target/powerpc/bfp/vec-extract-sig-5.c: New test.
      	* gcc.target/powerpc/bfp/vec-insert-exp-10.c: New test.
      	* gcc.target/powerpc/bfp/vec-insert-exp-11.c: New test.
      	* gcc.target/powerpc/bfp/vec-insert-exp-8.c: New test.
      	* gcc.target/powerpc/bfp/vec-insert-exp-9.c: New test.
      	* gcc.target/powerpc/bfp/vec-test-data-class-8.c: New test.
      	* gcc.target/powerpc/bfp/vec-test-data-class-9.c: New test.
      
      From-SVN: r250214
      Kelvin Nilsen committed
    • Constrain std::variant constructor for class template argument deduction · 20316b9b
      2017-07-14  Jason Merrill  <jason@redhat.com>
      	    Jonathan Wakely  <jwakely@redhat.com>
      
      	* include/std/variant (variant::variant(_Tp&&)): Constrain to remove
      	the constructor for empty variants from the candidate functions
      	during class template argument deduction.
      	* testsuite/20_util/variant/deduction.cc: New.
      
      Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
      
      From-SVN: r250213
      Jason Merrill committed
    • re PR tree-optimization/81162 (UBSAN switch triggers incorrect optimization in SLSR) · 3b805666
      [gcc]
      
      2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/81162
      	* gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
      	replace a negate with an add.
      
      [gcc/testsuite]
      
      2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	PR tree-optimization/81162
      	* gcc.dg/pr81162.c: New file.
      
      From-SVN: r250212
      Bill Schmidt committed
    • ssa-dse-30.c: Correct test to look for memmove that bcopy is expected to be transformed to. · bece580c
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/tree-ssa/ssa-dse-30.c: Correct test to look for memmove
      	that bcopy is expected to be transformed to.
      
      From-SVN: r250209
      Martin Sebor committed