1. 18 Dec, 2017 12 commits
  2. 17 Dec, 2017 9 commits
  3. 16 Dec, 2017 17 commits
    • PR tree-optimization/78918 - missing -Wrestrict on memcpy copying over self · cc8bea0a
      gcc/c-family/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-common.c (check_function_restrict): Avoid checking built-ins.
      	* c.opt (-Wrestrict): Include in -Wall.
      
      gcc/ChangeLog:
      
      	PR tree-optimization/78918
      	* Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
      	* builtins.c (check_sizes): Rename...
      	(check_access): ...to this.  Rename function arguments for clarity.
      	(check_memop_sizes): Adjust names.
      	(expand_builtin_memchr, expand_builtin_memcpy): Same.
      	(expand_builtin_memmove, expand_builtin_mempcpy): Same.
      	(expand_builtin_strcat, expand_builtin_stpncpy): Same.
      	(check_strncat_sizes, expand_builtin_strncat): Same.
      	(expand_builtin_strncpy, expand_builtin_memset): Same.
      	(expand_builtin_bzero, expand_builtin_memcmp): Same.
      	(expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
      	(maybe_emit_sprintf_chk_warning): Same.
      	(expand_builtin_strcpy): Adjust.
      	(expand_builtin_stpcpy): Same.
      	(expand_builtin_with_bounds): Detect out-of-bounds accesses
      	in pointer-checking forms of memcpy, memmove, and mempcpy.
      	(gcall_to_tree_minimal, max_object_size): Define new functions.
      	* builtins.h (max_object_size): Declare.
      	* calls.c (alloc_max_size): Call max_object_size instead of
      	hardcoding ssizetype limit.
      	(get_size_range): Handle new argument.
      	* calls.h (get_size_range): Add a new argument.
      	* cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
      	* doc/invoke.texi (-Wrestrict): Adjust, add example.
      	* gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
      	operations.
      	(gimple_fold_builtin_memory_chk): Same.
      	(gimple_fold_builtin_stxcpy_chk): New function.
      	* gimple-ssa-warn-restrict.c: New source.
      	* gimple-ssa-warn-restrict.h: New header.
      	* gimple.c (gimple_build_call_from_tree): Propagate location.
      	* passes.def (pass_warn_restrict): Add new pass.
      	* tree-pass.h (make_pass_warn_restrict): Declare.
      	* tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
      	operations.
      	(handle_builtin_strcat): Same.
      	(strlen_optimize_stmt): Rename...
      	(strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
      	stpncpy, strncpy, and their checking forms.
      
      gcc/testsuite/ChangeLog:
      
      	PR tree-optimization/78918
      	* c-c++-common/Warray-bounds.c: New test.
      	* c-c++-common/Warray-bounds-2.c: New test.
      	* c-c++-common/Warray-bounds-3.c: New test.
      	* c-c++-common/Warray-bounds-4.c: New test.
      	* c-c++-common/Warray-bounds-5.c: New test.
      	* c-c++-common/Wrestrict-2.c: New test.
      	* c-c++-common/Wrestrict.c: New test.
      	* c-c++-common/Wrestrict.s: New test.
      	* c-c++-common/Wsizeof-pointer-memaccess1.c: Adjust
      	* c-c++-common/Wsizeof-pointer-memaccess2.c: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same.
      	* g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same.
      	* gcc.dg/range.h: New header.
      	* gcc.dg/memcpy-6.c: New test.
      	* gcc.dg/pr69172.c: Adjust.
      	* gcc.dg/pr79223.c: Same.
      	* gcc.dg/pr81345.c: Adjust.
      	* gcc.dg/Wobjsize-1.c: Same.
      	* gcc.dg/Wrestrict-2.c: New test.
      	* gcc.dg/Wrestrict.c: New test.
      	* gcc.dg/Wsizeof-pointer-memaccess1.c: Adjust.
      	* gcc.dg/builtin-stpncpy.c: Same.
      	* gcc.dg/builtin-stringop-chk-1.c: Same.
      	* gcc.target/i386/chkp-stropt-17.c: New test.
      	* gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Adjust.
      
      From-SVN: r255755
      Martin Sebor committed
    • PR tree-optimization/83239 - False positive from -Wstringop-overflow · d4356822
      PR tree-optimization/83239 - False positive from -Wstringop-overflow
      on simple std::vector code
      
      libstdc++/CHangeLog:
      	* include/bits/vector.tcc (vector::_M_default_append): Assert
              invariant to generate better code.
      
      gcc/testsuite/ChangeLog:
      	* g++.dg/pr83239.C: New test case.
      
      From-SVN: r255753
      Martin Sebor committed
    • re PR libfortran/81937 (stack-buffer-overflow on memcpy in libgfortran/io/unix.c… · 1eaa31d8
      re PR libfortran/81937 (stack-buffer-overflow on memcpy in libgfortran/io/unix.c on character(kind=4))
      
      2017-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
      
              PR libgfortran/81937
              * io/list_read.c (next_char_internal): Don't attempt to read
              from the internal unit stream if no bytes are left. Decrement
              bytes_left in the right place.
      
      From-SVN: r255750
      Jerry DeLisle committed
    • re PR target/82767 (gcc.target/i386/pr71321.c scan-assembler-times fail) · c16c06da
      	PR testsuite/82767
      	 * gcc.target/i386/pr71321.c: Test with -mtune=generic
      
      From-SVN: r255749
      Sebastian Peryt committed
    • re PR rtl-optimization/82849 (ICE on valid code since r254379) · a9007865
      2017-12-16  Jan Hubicka  <hubicka@ucw.cz>
      
      	PR rtl-optimization/82849
      	* modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
      	and get_max_loop_iterations_int.
      
      From-SVN: r255748
      Jan Hubicka committed
    • poly_int: mode query functions · b4d43553
      This patch changes the bit size and vector count arguments to the
      machmode.h functions from unsigned int to poly_uint64.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
      	(smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
      	size as a poly_uint64.
      	(mode_for_vector, mode_for_int_vector): Take the number of vector
      	elements as a poly_uint64.
      	* stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
      	size as a poly_uint64.
      	(mode_for_vector, mode_for_int_vector): Take the number of vector
      	elements as a poly_uint64.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255747
      Richard Sandiford committed
    • Revert accidental commit · b4ddce36
      From-SVN: r255746
      Richard Sandiford committed
    • Add a gen_int_shift_amount helper function · 7e594332
      This patch adds a helper routine that constructs rtxes
      for constant shift amounts, given the mode of the value
      being shifted.  As well as helping with the SVE patches, this
      is one step towards allowing CONST_INTs to have a real mode.
      
      One long-standing problem has been to decide what the mode
      of a shift count should be for arbitrary rtxes (as opposed to those
      directly tied to a target pattern).  Realistic choices would be
      the mode of the shifted elements, word_mode, QImode, or the same
      mode as the shift optabs (in which case what should the mode
      be when the target doesn't have a pattern?)
      
      For now the patch picks the mode of the shifted elements,
      but with a ??? comment.
      
      2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* emit-rtl.h (gen_int_shift_amount): Declare.
      	* emit-rtl.c (gen_int_shift_amount): New function.
      	* asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
      	instead of GEN_INT.
      	* calls.c (shift_return_value): Likewise.
      	* cse.c (fold_rtx): Likewise.
      	* dse.c (find_shift_sequence): Likewise.
      	* expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
      	(expand_shift, expand_smod_pow2): Likewise.
      	* lower-subreg.c (shift_cost): Likewise.
      	* optabs.c (expand_superword_shift, expand_doubleword_mult)
      	(expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
      	(expand_vec_perm_var): Likewise.
      	* simplify-rtx.c (simplify_unary_operation_1): Likewise.
      	(simplify_binary_operation_1): Likewise.
      	* combine.c (try_combine, find_split_point, force_int_to_mode)
      	(simplify_shift_const_1, simplify_shift_const): Likewise.
      	(change_zero_ext): Likewise.  Use simplify_gen_binary.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255745
      Richard Sandiford committed
    • poly_int: MACRO_MODE · 05210ba6
      This patch uses a MACRO_MODE wrapper for the target macro invocations
      in targhooks.c and address.h, so that macros for non-AArch64 targets
      can continue to treat modes as fixed-size.
      
      It didn't seem worth converting the address macros to hooks since
      (a) they're heavily used, (b) they should be probably be replaced
      with a different interface rather than converted to hooks as-is,
      and most importantly (c) addresses.h already localises the problem.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* machmode.h (MACRO_MODE): New macro.
      	* addresses.h (base_reg_class, ok_for_base_p_1): Use it.
      	* targhooks.c (default_libcall_value, default_secondary_reload)
      	(default_memory_move_cost, default_register_move_cost)
      	(default_class_max_nregs): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255744
      Richard Sandiford committed
    • poly_int: IN_TARGET_CODE · 8fcc61f8
      This patch makes each target-specifc TU define an IN_TARGET_CODE macro,
      which is used to decide whether poly_int<1, C> should convert to C.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/sourcebuild.texi: Document IN_TARGET_CODE.
      	* genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
      	target C file.
      	* genautomata.c (main): Likewise.
      	* genconditions.c (write_header): Likewise.
      	* genemit.c (main): Likewise.
      	* genextract.c (print_header): Likewise.
      	* genopinit.c (main): Likewise.
      	* genoutput.c (output_prologue): Likewise.
      	* genpeep.c (main): Likewise.
      	* genpreds.c (write_insn_preds_c): Likewise.
      	* genrecog.c (writer_header): Likewise.
      	* config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
      	* config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
      	* config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
      	* config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
      	* config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
      	* config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
      	* config/arc/arc.c (IN_TARGET_CODE): Likewise.
      	* config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
      	* config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
      	* config/arm/arm.c (IN_TARGET_CODE): Likewise.
      	* config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
      	* config/avr/avr.c (IN_TARGET_CODE): Likewise.
      	* config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
      	* config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
      	* config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
      	* config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
      	* config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
      	* config/cris/cris.c (IN_TARGET_CODE): Likewise.
      	* config/darwin.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
      	* config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
      	* config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
      	* config/frv/frv.c (IN_TARGET_CODE): Likewise.
      	* config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
      	* config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
      	* config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
      	* config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
      	* config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
      	* config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
      	* config/i386/i386.c (IN_TARGET_CODE): Likewise.
      	* config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
      	* config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
      	* config/i386/winnt.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
      	* config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
      	* config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
      	* config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
      	* config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
      	* config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
      	* config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
      	* config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
      	* config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
      	* config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
      	* config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
      	* config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
      	* config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
      	* config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
      	* config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
      	* config/mips/mips.c (IN_TARGET_CODE): Likewise.
      	* config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
      	* config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
      	* config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
      	* config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
      	* config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
      	* config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
      	* config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
      	* config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
      	* config/pa/pa.c (IN_TARGET_CODE): Likewise.
      	* config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
      	* config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
      	* config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
      	* config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
      	* config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
      	* config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
      	* config/rx/rx.c (IN_TARGET_CODE): Likewise.
      	* config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
      	* config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
      	* config/s390/s390.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
      	* config/sh/sh.c (IN_TARGET_CODE): Likewise.
      	* config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
      	* config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
      	* config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
      	* config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
      	* config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
      	* config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
      	* config/spu/spu.c (IN_TARGET_CODE): Likewise.
      	* config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
      	* config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
      	* config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
      	* config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
      	* config/v850/v850.c (IN_TARGET_CODE): Likewise.
      	* config/vax/vax.c (IN_TARGET_CODE): Likewise.
      	* config/visium/visium.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
      	* config/vms/vms.c (IN_TARGET_CODE): Likewise.
      	* config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255743
      Richard Sandiford committed
    • Minor vn_reference_lookup_3 tweak · 7a667e64
      The repeated checks for MEM_REF made this code hard to convert to
      poly_ints as-is.  Hopefully the new structure also makes it clearer
      at a glance what the two cases are.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
      	checks for MEM_REF.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255742
      Richard Sandiford committed
    • Add VEC_SERIES_EXPR and associated optab · 9adab579
      Similarly to the VEC_DUPLICATE_EXPR, this patch adds a tree code
      equivalent of the VEC_SERIES rtx code: VEC_SERIES_EXPR.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hayward@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/generic.texi (VEC_SERIES_EXPR): Document.
      	* doc/md.texi (vec_series@var{m}): Document.
      	* tree.def (VEC_SERIES_EXPR): New tree code.
      	* tree.h (build_vec_series): Declare.
      	* tree.c (build_vec_series): New function.
      	* cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* gimple-pretty-print.c (dump_binary_rhs): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* expr.c (expand_expr_real_2): Likewise.
      	* optabs-tree.c (optab_for_tree_code): Likewise.
      	* tree-cfg.c (verify_gimple_assign_binary): Likewise.
      	* fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
      	* expmed.c (make_tree): Handle VEC_SERIES.
      	* optabs.def (vec_series_optab): New optab.
      	* optabs.h (expand_vec_series_expr): Declare.
      	* optabs.c (expand_vec_series_expr): New function.
      	* tree-vect-generic.c (expand_vector_operations_1): Check that
      	the operands also have vector type.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255741
      Richard Sandiford committed
    • Add VEC_DUPLICATE_EXPR and associated optab · be4c1d4a
      SVE needs a way of broadcasting a scalar to a variable-length vector.
      This patch adds VEC_DUPLICATE_EXPR for when CONSTRUCTOR would be used
      for fixed-length vectors; this is the tree equivalent of the existing
      rtl code VEC_DUPLICATE.
      
      The patch also adds a vec_duplicate_optab to go with VEC_DUPLICATE_EXPR.
      
      2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
      	    Alan Hayward  <alan.hawyard@arm.com>
      	    David Sherwood  <david.sherwood@arm.com>
      
      gcc/
      	* doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
      	(VEC_COND_EXPR): Add missing @tindex.
      	* doc/md.texi (vec_duplicate@var{m}): Document.
      	* tree.def (VEC_DUPLICATE_EXPR): New tree codes.
      	* tree.c (build_vector_from_val): Add stubbed-out handling of
      	variable-length vectors, using VEC_DUPLICATE_EXPR.
      	(uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
      	* cfgexpand.c (expand_debug_expr): Likewise.
      	* tree-cfg.c (verify_gimple_assign_unary): Likewise.
      	* tree-inline.c (estimate_operator_cost): Likewise.
      	* tree-pretty-print.c (dump_generic_node): Likewise.
      	* tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
      	* fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
      	(test_vec_duplicate_folding): New function.
      	(fold_const_c_tests): Call it.
      	* optabs.def (vec_duplicate_optab): New optab.
      	* optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
      	* optabs.h (expand_vector_broadcast): Declare.
      	* optabs.c (expand_vector_broadcast): Make non-static.  Try using
      	vec_duplicate_optab.
      	* expr.c (store_constructor): Try using vec_duplicate_optab for
      	uniform vectors.
      	(expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.
      
      Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
      Co-Authored-By: David Sherwood <david.sherwood@arm.com>
      
      From-SVN: r255740
      Richard Sandiford committed
    • re PR target/83358 (division not converted with Intel tuning since r253934) · 02308bd3
      2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>
      
      	PR target/83358
      	* config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
      	div/mod latencies a bit.
      
              PR target/83358
      	* gcc.target/i386/pr83358-1.c: New test.
      	* gcc.target/i386/pr83358-2.c: New test.
      
      From-SVN: r255739
      Markus Trippelsdorf committed
    • os: pass -s to hostname on AIX · be528ae9
          
          Reviewed-on: https://go-review.googlesource.com/79375
      
      From-SVN: r255738
      Ian Lance Taylor committed
    • syscall: emulate Flock on AIX · fe6272cc
          
          Reviewed-on: https://go-review.googlesource.com/79095
      
      From-SVN: r255737
      Ian Lance Taylor committed
    • Daily bump. · dead5b99
      From-SVN: r255734
      GCC Administrator committed
  4. 15 Dec, 2017 2 commits