1. 17 Oct, 2019 29 commits
  2. 16 Oct, 2019 11 commits
    • decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup... · 606358fa
      	* decl.c (cxx_maybe_build_cleanup): When clearing location of cleanup,
      	if cleanup is a nop, clear location of its operand too.
      
      From-SVN: r277084
      Jakub Jelinek committed
    • tree-ssa-strlen.c (maybe_invalidate): Use HOST_WIDE_INT_PRINT_UNSIGNED instead of "%zu". · e5b04038
      	* tree-ssa-strlen.c (maybe_invalidate): Use
      	HOST_WIDE_INT_PRINT_UNSIGNED instead of "%zu".
      
      From-SVN: r277083
      Jakub Jelinek committed
    • RISC-V: Include more registers in SIBCALL_REGS. · 3599dfba
      This finishes the part 1 of 2 patch submitted by Andrew Burgess on Aug 19.
      This adds the argument registers but not t0 (aka x5) to SIBCALL_REGS.  It
      also adds the missing riscv_regno_to_class change.
      
      Tested with cross riscv32-elf and riscv64-linux toolchain build and check.
      There were no regressions.  I see about a 0.01% code size reduction for the
      C and libstdc++ libraries.
      
      	gcc/
      	* config/riscv/riscv.h (REG_CLASS_CONTENTS): Add argument passing
      	regs to SIBCALL_REGS.
      	* config/riscv/riscv.c (riscv_regno_to_class): Change argument
      	passing regs to SIBCALL_REGS.
      
      Co-Authored-By: Jim Wilson <jimw@sifive.com>
      
      From-SVN: r277082
      Andrew Burgess committed
    • PR tree-optimization/83821 - local aggregate initialization defeats strlen optimization · 2fcb55d1
      gcc/ChangeLog:
      
      	PR tree-optimization/83821
      	* tree-ssa-strlen.c (maybe_invalidate): Add argument.  Consider
      	the length of a string when available.
      	(handle_builtin_memset) Add argument.
      	(handle_store, strlen_check_and_optimize_call): Same.
      	(check_and_optimize_stmt): Same.  Pass it to callees.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/83821
      	* c-c++-common/Warray-bounds-4.c: Remove XFAIL.
      	* gcc.dg/strlenopt-82.c: New test.
      	* gcc.dg/strlenopt-83.c: Same.
      	* gcc.dg/strlenopt-84.c: Same.
      	* gcc.dg/strlenopt-85.c: Same.
      	* gcc.dg/strlenopt-86.c: Same.
      	* gcc.dg/tree-ssa/calloc-4.c: Same.
      	* gcc.dg/tree-ssa/calloc-5.c: Same.
      
      From-SVN: r277080
      Martin Sebor committed
    • PR tree-optimization/91996 - fold non-constant strlen relational expressions · 27c14dbc
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/91996
      	* gcc.dg/strlenopt-80.c: New test.
      	* gcc.dg/strlenopt-81.c: New test.
      
      gcc/ChangeLog:
      
      	PR tree-optimization/91996
      	* tree-ssa-strlen.c (maybe_warn_pointless_strcmp): Improve location
      	information.
      	(compare_nonzero_chars): Add an overload.
      	(count_nonzero_bytes): Add an argument.  Call overload above.
      	Handle non-constant lengths in some range.
      	(handle_store): Add an argument.
      	(check_and_optimize_stmt): Pass an argument to handle_store.
      
      From-SVN: r277076
      Martin Sebor committed
    • [arm] fix bootstrap failure due to uninitialized warning · b7bfd3c5
      The Arm port is failing bootstrap because GCC is now warning about an
      unitialized array.
      
      The code is complex enough that I certainly can't be sure the compiler
      is wrong, so perhaps the best fix here is just to memset the entire
      array before use.
      
      	* config/arm/arm.c (neon_valid_immediate): Clear bytes before use.
      
      From-SVN: r277073
      Richard Earnshaw committed
    • mips.c (mips_expand_builtin_insn): Force the operands which correspond to the… · c32ffa8d
      mips.c (mips_expand_builtin_insn): Force the operands which correspond to the same input-output register to have...
      
      	* config/mips/mips.c (mips_expand_builtin_insn): Force the
      	operands which correspond to the same input-output register to
      	have the same pseudo assigned to them.
      
      	* gcc.target/mips/msa-dpadd-dpsub.c: New test.
      
      From-SVN: r277071
      Mihailo Stojanovic committed
    • find_partition_fixes: remove unused bbs_in_cold_partition variable · 26e7516a
      gcc/ChangeLog:
      
      2019-10-16  Ilya Leoshkevich  <iii@linux.ibm.com>
      
      	* cfgrtl.c (find_partition_fixes): Remove bbs_in_cold_partition.
      
      From-SVN: r277070
      Ilya Leoshkevich committed
    • [AArch64] Fix symbol offset limit · 7d3b27ff
      In aarch64_classify_symbol symbols are allowed large offsets on relocations. 
      This means the offset can use all of the +/-4GB offset, leaving no offset
      available for the symbol itself.  This results in relocation overflow and
      link-time errors for simple expressions like &global_array + 0xffffff00.
      
      To avoid this, unless the offset_within_block_p is true, limit the offset
      to +/-1MB so that the symbol needs to be within a 3.9GB offset from its
      references.  For the tiny code model use a 64KB offset, allowing most of
      the 1MB range for code/data between the symbol and its references.
      
          gcc/
      	* config/aarch64/aarch64.c (aarch64_classify_symbol):
      	Apply reasonable limit to symbol offsets.
      
          testsuite/
      	* gcc.target/aarch64/symbol-range.c: Improve testcase.
      	* gcc.target/aarch64/symbol-range-tiny.c: Likewise.
      
      From-SVN: r277068
      Wilco Dijkstra committed
    • tree-vect-loop.c (vect_valid_reduction_input_p): Remove. · aab8c2fd
      2019-10-16  Richard Biener  <rguenther@suse.de>
      
      	* tree-vect-loop.c (vect_valid_reduction_input_p): Remove.
      	(vect_is_simple_reduction): Delay checking to
      	vectorizable_reduction and relax the checking.
      	(vectorizable_reduction): Check we have a simple use.  Check
      	for bogus condition reductions.
      	* tree-vect-stmts.c (vect_transform_stmt): Make sure we
      	are looking at the last stmt in a pattern sequence when
      	filling in backedge PHI values.
      
      	* gcc.dg/vect/vect-cond-reduc-3.c: New testcase.
      	* gcc.dg/vect/vect-cond-reduc-4.c: Likewise.
      
      From-SVN: r277067
      Richard Biener committed
    • In PR70010, a function is marked with target(no-vsx) to disable VSX code generation. · 1624d351
      In PR70010, a function is marked with target(no-vsx) to disable VSX code
      generation.  To avoid VSX code generation, this function should not be
      inlined into VSX function.  To fix the bug, in the current logic when
      checking whether the caller's ISA flags supports the callee's ISA flags, we
      just need to add a test that enforces that the caller's ISA flags match
      exactly the callee's flags, for those flags that were explicitly set in the
      callee.  If caller without target attribute then using options from command
      line.
      
      gcc/
      2019-10-16  Peter Bergner <bergner@linux.ibm.com>
      	    Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR target/70010
      	* config/rs6000/rs6000.c (rs6000_can_inline_p): Prohibit inlining if
      	the callee explicitly disables some isa_flags the caller is using.
      
      gcc.testsuite/
      2019-10-16  Peter Bergner <bergner@linux.ibm.com>
      	    Jiufu Guo  <guojiufu@linux.ibm.com>
      
      	PR target/70010
      	* gcc.target/powerpc/pr70010.c: New test.
      	* gcc.target/powerpc/pr70010-1.c: New test.
      	* gcc.target/powerpc/pr70010-2.c: New test.
      	* gcc.target/powerpc/pr70010-3.c: New test.
      	* gcc.target/powerpc/pr70010-4.c: New test.
      
      Co-Authored-By: Jiufu Guo <guojiufu@linux.ibm.com>
      
      From-SVN: r277065
      Peter Bergner committed