Commit Graph

157339 Commits

Author SHA1 Message Date
Uros Bizjak
fa97b067e1 re PR target/80425 (Extra inter-unit register move with zero-extension)
PR target/80425
	* config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
	and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
	(zero-extendsidi peephole2): Remove peephole.

testsuite/ChangeLog:

	PR target/80425
	* gcc.target/i386/pr80425-3.c: New test.

From-SVN: r254505
2017-11-07 19:51:22 +01:00
Ian Lance Taylor
8b36a25018 compiler: don't double count "." in nested_function_num
Nested functions are named "outerfunc.$nestedN", where N is a
    number. nested_function_num extracts that number. The name is
    first passed to unpack_hidden_name, which handles the "." and
    should result "$nestedN". Don't expect the "." again.
    
    This fixes assertion failure when escape analysis is enabled
    and -fgo-debug-escape is on. The failure looks
    
    go1: internal compiler error: in nested_function_num, at go/gofrontend/names.cc:241
    0x7bd7d3 Gogo::nested_function_num(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)
    
    Reviewed-on: https://go-review.googlesource.com/76213

From-SVN: r254504
2017-11-07 18:19:19 +00:00
Eric Botcazou
02d7065ff4 re PR c/53037 (warn_if_not_aligned(X))
PR c/53037
	* stor-layout.c: Include attribs.h.
	(handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
	explicit lookup of "aligned" attribute.

From-SVN: r254503
2017-11-07 17:37:29 +00:00
Andreas Schwab
15ad44e7ec * g++.dg/pr50763-3.C (evalPoint): Return a value.
From-SVN: r254502
2017-11-07 17:27:46 +00:00
Andrew Waterman
6ed01e6b28 RISC-V: Implement movmemsi
Without this we aren't getting proper memcpy inlining on RISC-V systems,
which is particularly disastrous for Dhrystone performance on RV32IM
systems.

gcc/ChangeLog

2017-11-07  Andrew Waterman  <andrew@sifive.com>

        * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New
        prototype.
        (riscv_expand_block_move): Likewise.
        gcc/config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
        implementation.
        (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
        (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
        gcc/config/riscv/riscv.c (riscv_block_move_straight): New
        function.
        (riscv_adjust_block_mem): Likewise.
        (riscv_block_move_loop): Likewise.
        (riscv_expand_block_move): Likewise.
        gcc/config/riscv/riscv.md (movmemsi): New pattern.

From-SVN: r254501
2017-11-07 17:09:39 +00:00
Michael Clark
4d30a85ece RISC-V: Define MUSL_DYNAMIC_LINKER
Use no suffix at all in the musl dynamic linker name for hard
float ABI. Use -sf and -sp suffixes in musl dynamic linker name
for soft float and single precision ABIs. The following table
outlines the musl interpreter names for the RISC-V ABI names.

musl interpreter        | RISC-V ABI
----------------------- | -------------
ld-musl-riscv32.so.1    | riscv32-ilp32d
ld-musl-riscv64.so.1    | riscv64-lp64d
ld-musl-riscv32-sf.so.1 | riscv32-ilp32
ld-musl-riscv64-sf.so.1 | riscv64-lp64
ld-musl-riscv32-sp.so.1 | riscv32-ilp32f
ld-musl-riscv64-sp.so.1 | riscv64-lp64f

gcc/ChangeLog

2017-11-06  Michael Clark  <michaeljclark@mac.com>

        * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
        (MUSL_DYNAMIC_LINKER): Likewise.

From-SVN: r254500
2017-11-07 16:58:37 +00:00
Richard Sandiford
f32c3adb8d [AArch64] Use aarch64_reg_or_imm instead of nonmemory_operand
Some of the shift expanders accepted nonmemory_operands but were only
able to handle register_operands or CONST_INTs.  This is probably
academic without SVE, since we're not likely to see shifts by other
types of constant (const_wide_ints, consts, etc).  But for SVE,
it's possible for a vectorised shift induction to have a CONST_POLY_INT
shift amount.

This patch makes the expanders use aarch64_reg_or_imm instead.

2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
	* config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
	(rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
	nonmmory_operand.

From-SVN: r254499
2017-11-07 16:08:47 +00:00
Richard Biener
56ccfbd608 match.pd: Fix build.
2017-11-07  Richard Biener  <rguenther@suse.de>

	* match.pd: Fix build.

From-SVN: r254498
2017-11-07 12:52:35 +00:00
Wilco Dijkstra
6a43531492 PR71026: Canonicalize negates in division
Canonicalize x / (- y) into (-x) / y.

This moves negates out of the RHS of a division in order to
allow further simplifications and potentially more reciprocal CSEs.

2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
	    Jackson Woodruff  <jackson.woodruff@arm.com>

    gcc/
	PR tree-optimization/71026
	* match.pd: Canonicalize negate in division.

    testsuite/
	PR 71026/tree-optimization/71026
	* gcc.dg/div_neg: New test.

From-SVN: r254497
2017-11-07 12:38:55 +00:00
Sudakshina Das
4349b15f97 PR80131: Simplification of 1U << (31 - x)
Currently the code A << (B - C) is not simplified.
However at least a more specific case of 1U << (C -x) where
C = precision(type) - 1 can be simplified to (1 << C) >> x.

This is done by adding a new simplification rule in match.pd.

2017-11-07  Sudakshina Das  <sudi.das@arm.com>

    gcc/
	PR middle-end/80131
	* match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.

    testsuite/
	PR middle-end/80131
	* testsuite/gcc.dg/pr80131-1.c: New Test.

From-SVN: r254496
2017-11-07 12:23:38 +00:00
Marc Glisse
e268a77b59 More bitop simplifications in match.pd
2017-11-07  Marc Glisse  <marc.glisse@inria.fr>

gcc/
	* match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
	(a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.

gcc/testsuite/
	* gcc.dg/tree-ssa/bitops-1.c: New file.

From-SVN: r254495
2017-11-07 11:08:06 +00:00
Marc Glisse
81bd903a6a More fold_negate in match.pd
gcc/ChangeLog:

2017-11-07  Marc Glisse  <marc.glisse@inria.fr>

	* fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
	non-scalar integral types.
	* match.pd (negate_expr_p): Handle MINUS_EXPR.
	(-(A-B), -(~A)): New transformations.

gcc/testsuite/ChangeLog:

2017-11-07  Marc Glisse  <marc.glisse@inria.fr>

	* gcc.dg/tree-ssa/negminus.c: New test.

From-SVN: r254494
2017-11-07 11:04:14 +00:00
Tom de Vries
13792cce5f [powerpcspe] Remove semicolon after do {} while (0) in SUBTARGET_OVERRIDE_OPTIONS
2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
	semicolon after "do {} while (0)".
	* config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.

From-SVN: r254493
2017-11-07 11:00:46 +00:00
Tom de Vries
e73d717bc3 [rs6000] Remove semicolon after do {} while (0) in SUBTARGET_OVERRIDE_OPTIONS
2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
	after "do {} while (0)".
	* config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
	* config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.

From-SVN: r254492
2017-11-07 09:22:11 +00:00
Tom de Vries
65f480c76f [libgcc, rs6000] Remove semicolon after do {} while (0) in REGISTER_CFA_OFFSET_FOR
2017-11-07  Tom de Vries  <tom@codesourcery.com>

	* config/rs6000/aix-unwind.h (REGISTER_CFA_OFFSET_FOR): Remove semicolon
	after "do {} while (0)".

From-SVN: r254491
2017-11-07 09:21:40 +00:00
Tom de Vries
aac11893d4 [arm] Remove semicolon after while {} do (0) in HANDLE_NARROW_SHIFT_ARITH
2017-11-07  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
	"while {} do (0)".
	(arm_rtx_costs_internal): Add missing semicolon after
	HANDLE_NARROW_SHIFT_ARITH call.

From-SVN: r254490
2017-11-07 08:11:54 +00:00
Tom de Vries
2a321acb02 [libgcc] Remove semicolon after do {} while (0) in FP_HANDLE_EXCEPTIONS
2017-11-07  Tom de Vries  <tom@codesourcery.com>

	PR other/82784
	* config/aarch64/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Remove
	semicolon after "do {} while (0)".
	* config/i386/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Same.
	* config/ia64/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Same.
	* config/mips/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Same.
	* config/rs6000/sfp-machine.h (FP_HANDLE_EXCEPTIONS): Same.

From-SVN: r254489
2017-11-07 08:11:43 +00:00
Jason Merrill
96d155c696 P0704R1 - fixing const-qualified pointers to members
* typeck2.c (build_m_component_ref): Also accept in lower stds with
	a pedwarn.

From-SVN: r254487
2017-11-07 00:30:40 -05:00
Alan Modra
2d041117f1 Require ngettext in test of system gettext implementation
gcc currently uses ngettext in a number of places (gcc/cp/pt.c,
gcc/diagnostic.c, gcc/collect2.c).  Apparently there are (or used to
be) gettext implementations that lack ngettext.  See config/gettext.m4.

This patch arranges for intl/ to be compiled when the system gettext
lacks ngettext.

	* configure.ac: Invoke AM_GNU_GETTEXT with need_ngettext.
	* configure: Regenerate.

From-SVN: r254486
2017-11-07 15:24:01 +10:30
Segher Boessenkool
0ed1b4890a rs6000: Don't clear TARGET_ISEL implicitly
We want to actually use isel, so we shouldn't disable it.  It is
already not set by default on CPUs that don't have it, or where we
do not want to use it.


	* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
	disable isel if it was not set explicitly.

From-SVN: r254485
2017-11-07 04:45:50 +01:00
James Bowman
a297ccb52e FT32 makes use of multiple address spaces.
FT32 makes use of multiple address spaces. When trying to inspect
objects in GDB, GDB was treating them as a straight "const". The cause
seems to be in GCC DWARF2 output.

This output is handled in gcc/gcc/dwarf2out.c, where modified_type_die()
checks that TYPE has qualifiers CV_QUALS. However while TYPE has
ADDR_SPACE qualifiers, the modified_type_die() explicitly discards the
ADDR_SPACE qualifiers.

This patch retains the ADDR_SPACE qualifiers as modified_type_die()
outputs the DWARF type tree.  This allows the types to match, and correct
type information for the object is emitted.

[gcc]

2017-11-06  James Bowman  <james.bowman@ftdichip.com>

	* gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE
	qualifiers.
        (add_type_attribute) likewise.

From-SVN: r254484
2017-11-07 01:10:18 +00:00
GCC Administrator
853c0dfba2 Daily bump.
From-SVN: r254483
2017-11-07 00:16:15 +00:00
H.J. Lu
9f8760ed72 i386: Use reference of struct ix86_frame to avoid copy
When there is no need to make a copy of ix86_frame, we can use reference
of struct ix86_frame to avoid copy.

Tested on x86-64.

	* config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
	of struct ix86_frame.
	(ix86_initial_elimination_offset): Likewise.
	(ix86_expand_split_stack_prologue): Likewise.

From-SVN: r254480
2017-11-06 15:04:15 -08:00
Jeff Law
53d855e09d stack-check-12.c: Revert to initial version.
* gcc.target/i386/stack-check-12.c: Revert to initial version.  Then..
	Add -fomit-frame-pointer.

From-SVN: r254479
2017-11-06 15:44:39 -07:00
Marc Glisse
e52781dce0 Update comment in tree-vrp.h
2017-11-06  Marc Glisse  <marc.glisse@inria.fr>

	* tree-vrp.h (enum value_range_type): Update stale comment.

From-SVN: r254478
2017-11-06 21:43:00 +00:00
François Dumont
187e8ee733 tr1.cc: Compile with -O0.
2017-11-06  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/libstdc++-prettyprinters/tr1.cc:  Compile with -O0.

From-SVN: r254477
2017-11-06 21:15:48 +00:00
Ian Lance Taylor
b78e2e5238 compiler: disable escape analysis for runtime
Currently the runtime is hard-coded to non-escape in various places.
    Don't run escape analysis for runtime.
    
    Reviewed-on: https://go-review.googlesource.com/76210

From-SVN: r254476
2017-11-06 21:00:32 +00:00
Ian Lance Taylor
ce995d1cc2 libgo: pass flags to recursive make
"make check" runs make recursively to check each package. Pass
    the flags through. So it is possible to run "make check" with
    different settings easily.
    
    Reviewed-on: https://go-review.googlesource.com/76029

From-SVN: r254475
2017-11-06 20:59:32 +00:00
Richard Sandiford
8094001759 [AArch64] Pass number of units to aarch64_expand_vec_perm(_const)
This patch passes the number of units to aarch64_expand_vec_perm
and aarch64_expand_vec_perm_const, which avoids a to_constant ()
once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
	(aarch64_expand_vec_perm_const): Take the number of units too.
	* config/aarch64/aarch64.c (aarch64_expand_vec_perm)
	(aarch64_expand_vec_perm_const): Likewise.
	* config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
	(vec_perm<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r254469
2017-11-06 20:02:49 +00:00
Richard Sandiford
f5cbabc1cc [AArch64] Pass number of units to aarch64_simd_vect_par_cnst_half
This patch passes the number of units to aarch64_simd_vect_par_cnst_half,
which avoids a to_constant () once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
	Take the number of units too.
	* config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
	(aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
	but check for a vector mode before rather than after the call.
	* config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
	(move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
	(vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
	(vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
	(vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
	(aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
	(widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
	(aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
	(aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
	(aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
	(aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
	(aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
	(aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
	(aarch64_sqdmull2_n<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r254468
2017-11-06 20:02:35 +00:00
Richard Sandiford
73e3da5163 [AArch64] Pass number of units to aarch64_reverse_mask
This patch passes the number of units to aarch64_reverse_mask,
which avoids a to_constant () once GET_MODE_NUNITS is variable.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
	the number of units too.
	* config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
	* config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
	(vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
	(vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
	(vec_store_lanesxi<mode>): Update accordingly.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r254467
2017-11-06 20:02:27 +00:00
Richard Sandiford
7ac29c0fa0 [AArch64] Add an endian_lane_rtx helper routine
Later patches turn the number of vector units into a poly_int.
We deliberately don't support applying GEN_INT to those (except
in target code that doesn't distinguish between poly_ints and normal
constants); gen_int_mode needs to be used instead.

This patch therefore replaces instances of:

  GEN_INT (ENDIAN_LANE_N (builtin_mode, INTVAL (op[opc])))

with uses of a new endian_lane_rtx function.

2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	* config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
	* config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
	* config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
	of units rather than the mode.
	* config/aarch64/iterators.md (nunits): New mode attribute.
	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
	Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
	* config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
	(aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
	(*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
	(*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
	(*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
	(*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
	(*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
	(*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
	(*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
	(*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
	(reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
	(reduc_<maxmin_uns>_scal_<mode>): Likewise.
	(*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
	(*aarch64_get_lane_zero_extendsi<mode>): Likewise.
	(aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
	(*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
	(aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
	(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
	(aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
	(aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
	(aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
	(aarch64_sqdmull2_lane<mode>_internal): Likewise.
	(aarch64_sqdmull2_laneq<mode>_internal): Likewise.
	(aarch64_vec_load_lanesoi_lane<mode>): Likewise.
	(aarch64_vec_store_lanesoi_lane<mode>): Likewise.
	(aarch64_vec_load_lanesci_lane<mode>): Likewise.
	(aarch64_vec_store_lanesci_lane<mode>): Likewise.
	(aarch64_vec_load_lanesxi_lane<mode>): Likewise.
	(aarch64_vec_store_lanesxi_lane<mode>): Likewise.
	(aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
	(aarch64_simd_vec_setv2di): Likewise.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r254466
2017-11-06 20:02:10 +00:00
Richard Sandiford
6e601f26f2 Fix ChangeLog entry
From-SVN: r254465
2017-11-06 19:40:43 +00:00
Carl Love
fc504349a6 rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8 definitions.
gcc/ChangeLog:

2017-11-06  Carl Love  <cel@us.ibm.com>

	* config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
	definitions.
	(P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
	* config/rs6000/altivec.h (vec_revb): Change the #define from power 9
	to power 8.
	* config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
	extern declaration.
	* config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
	* config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
	Add power 8 macro expansions.
	(BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
	* config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
	power 8 instructions.  (VSX_XXBR): Add iterator.

gcc/testsuite/ChangeLog:

2017-11-06  Carl Love  <cel@us.ibm.com>

	* gcc.target/powerpc/builtins-revb-runnable.c: New runnable test file.

From-SVN: r254464
2017-11-06 19:35:55 +00:00
Wilco Dijkstra
113c53c3b8 [Arm] Cleanup IT attributes
A recent change to remove the movdi_vfp_cortexa8 meant that ldrd was used in
ITs block even when arm_restrict_it was enabled.  Rather than just fixing this
latent issue, change the default of predicable_short_it to "no" so that only
16-bit instructions need to be marked with it.  As a result there are far fewer
patterns that need the attribute, and omitting predicable_short_it is no longer
causing issues.

	* config/arm/arm.md (predicable_short_it): Change default to "no",
	improve documentation, remove uses that are identical to the default.
	(enabled_for_depr_it): Rename to enabled_for_short_it.
	* gcc/config/arm/arm-fixed.md (predicable_short_it): Remove default uses.
	* gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
	* gcc/config/arm/sync.md (predicable_short_it): Likewise.
	* gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
	* gcc/config/arm/vfp.md (predicable_short_it): Likewise.

From-SVN: r254463
2017-11-06 19:26:27 +00:00
Michael Meissner
aeed6d61ef re PR target/82748 (ICE with __builtin_fabsq and __float128 in copy_to_mode_reg, at explow.c:612)
[gcc]
2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/82748
	* config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
	float128 helper macros, which are no longer used after deleting
	the old 'q' built-in functions, and moving the round to odd
	built-in functions to being special built-in functions.
	(BU_FLOAT128_2): Likewise.
	(BU_FLOAT128_1_HW): Likewise.
	(BU_FLOAT128_2_HW): Likewise.
	(BU_FLOAT128_3_HW): Likewise.
	(FABSQ): Delete old 'q' built-in functions.
	(COPYSIGNQ): Likewise.
	(SQRTF128_ODD): Move round to odd built-in functions to be
	special built-in functions, so that we can handle
	-mabi=ieeelongdouble.
	(TRUNCF128_ODD): Likewise.
	(ADDF128_ODD): Likewise.
	(SUBF128_ODD): Likewise.
	(MULF128_ODD): Likewise.
	(DIVF128_ODD): Likewise.
	(FMAF128_ODD): Likewise.
	* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
	built-in names to 'f128'.
	* config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
	old 'q' built-in functions, as the machine independent code for
	'f128' built-in functions handles this.
	(rs6000_expand_builtin): Add expansion for float128 round to odd
	functions, keying off on -mabi=ieeelongdouble of whether to use
	the KFmode or TFmode variant.
	(rs6000_init_builtins): Initialize the _Float128 round to odd
	built-in functions.
	* doc/extend.texi (PowerPC Built-in Functions): Document the old
	_Float128 'q' built-in functions are now mapped into the new
	'f128' built-in functions.

[gcc/testsuite]
2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/82748
	* gcc.target/powerpc/pr82748-1.c: New test.
	* gcc.target/powerpc/pr82748-2.c: Likewise.

From-SVN: r254462
2017-11-06 18:31:48 +00:00
Paolo Carlini
65371a7edd re PR c++/65579 ([C++11] gcc requires definition of a static constexpr member even though it is not odr-used)
/cp
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65579
	* decl2.c (finish_static_data_member_decl): If there's an initializer,
	complete the type and re-apply the quals.

/testsuite
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/65579
	* g++.dg/cpp0x/constexpr-template11.C: New.

From-SVN: r254461
2017-11-06 17:45:55 +00:00
David Edelsohn
d3722bf732 collect2.c (add_lto_object): Compile for OBJECT_COFF.
* collect2.c (add_lto_object): Compile for OBJECT_COFF.
(scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.

From-SVN: r254460
2017-11-06 12:24:57 -05:00
Eric Botcazou
86907740aa * gcc-interface/misc.c (gnat_post_options): Clear warn_return_type.
From-SVN: r254459
2017-11-06 17:23:08 +00:00
David Malcolm
de4381a4e9 ipa-fnsummary.c: fix use-after-free crash (PR jit/82826)
gcc/ChangeLog:
	PR jit/82826
	* ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
	* ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
	* toplev.c: Include "ipa-fnsummary.h".
	(toplev::finalize): Call ipa_fnsummary_c_finalize.

From-SVN: r254458
2017-11-06 16:31:04 +00:00
Jakub Jelinek
3e2927a1b0 re PR tree-optimization/82838 (ICE in verify_ssa failed w/ store-merging)
PR tree-optimization/82838
	* gimple-ssa-store-merging.c
	(imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
	on a separate gimple_seq which is then appended to seq.

	* gcc.c-torture/compile/pr82838.c: New test.

From-SVN: r254457
2017-11-06 17:29:11 +01:00
Jeff Law
7a1bdd662b re PR target/82788 (wrong code with -fstack-clash-protection --param=stack-clash-protection-probe-interval=10 on simple code)
PR target/82788
	* config/i386/i386.c (PROBE_INTERVAL): Remove.
	(get_probe_interval): New functions.
	(ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
	(ix86_adjust_stack_and_probe): Likewise.
	(output_adjust_stack_and_probe): Likewise.
	(ix86_emit_probe_stack_range): Likewise.
	(ix86_expand_prologue): Likewise.

	PR target/82788
	* gcc.dg/pr82788.c: New test.

From-SVN: r254456
2017-11-06 08:51:16 -07:00
Jeff Law
5422b1f0bd Check in right version of stack-check-12.c
From-SVN: r254455
2017-11-06 08:49:59 -07:00
Richard Sandiford
9134df2c6c PR82816: Widening multiplies of bitfields
In this PR we tried to create a widening multiply of two 3-bit numbers,
but that isn't a widening multiply at the optab/rtl level, since both
the input and output still have the same mode.

We could trap this either in is_widening_mult_p or (as the patch does)
in the routines that actually ask for an optab.  The latter seemed
more natural since is_widening_mult_p doesn't otherwise care about modes.

2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
	    Alan Hayward  <alan.hayward@arm.com>
	    David Sherwood  <david.sherwood@arm.com>

gcc/
	PR tree-optimization/82816
	* tree-ssa-math-opts.c (convert_mult_to_widen): Return false
	if the modes of the two types are the same.
	(convert_plusminus_to_widen): Likewise.

gcc/testsuite/
	* gcc.c-torture/compile/pr82816.c: New test.

Co-Authored-By: Alan Hayward <alan.hayward@arm.com>
Co-Authored-By: David Sherwood <david.sherwood@arm.com>

From-SVN: r254454
2017-11-06 14:47:43 +00:00
Bill Schmidt
962b966886 [gcc]
2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
	p9_vadu<mode>3.
	(usadv16qi): New define_expand.
	(usadv8hi): New define_expand.

[gcc/testsuite]

2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/sad-vectorize-1.c: New file.
	* gcc.target/powerpc/sad-vectorize-2.c: New file.
	* gcc.target/powerpc/sad-vectorize-3.c: New file.
	* gcc.target/powerpc/sad-vectorize-4.c: New file.

From-SVN: r254453
2017-11-06 13:47:46 +00:00
Jan Hubicka
8e7d1486f6 re PR bootstrap/82832 (Broken PGO LTO bootstrap on x86_64 after r254379)
PR bootstrap/82832
	* ipa-inline-transform.c (update_noncloned_frequencies): Always
	scale.
	(inline_transform): Likewise.
	* predict.c (counts_to_freqs): Remove useless conditional.
	* profile-count.h (profile_count::apply_scale): Move sanity check.
	* tree-inline.c (copy_bb): Always scale.
	(copy_cfg_body): Likewise.

From-SVN: r254452
2017-11-06 13:45:41 +00:00
Martin Liska
454f8b2b0c Fix -Wreturn-type fallout.
2017-11-06  Martin Liska  <mliska@suse.cz>

	* c-c++-common/cilk-plus/AN/pr57541-2.c (foo1): Return a value
	for functions with non-void return type, or change type to void,
	or add -Wno-return-type for test.
	(foo2): Likewise.
	* c-c++-common/cilk-plus/AN/pr57541.c (foo): Likewise.
	(foo1): Likewise.
	* c-c++-common/cilk-plus/CK/errors.c: Likewise.
	* c-c++-common/cilk-plus/CK/pr60197.c: Likewise.
	* c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise.
	* c-c++-common/fold-masked-cmp-1.c (test_pic): Likewise.
	(test_exe): Likewise.
	* c-c++-common/fold-masked-cmp-2.c (test_exe): Likewise.
	* g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc (my_func): Likewise.
	* g++.dg/cilk-plus/CK/pr68997.cc (fa2): Likewise.
	* g++.dg/eh/sighandle.C (dosegv): Likewise.
	* g++.dg/ext/vector14.C (foo): Likewise.
	(main): Likewise.
	* g++.dg/graphite/pr41305.C: Likewise.
	* g++.dg/graphite/pr42930.C: Likewise.
	* g++.dg/opt/pr46640.C (struct QBasicAtomicInt): Likewise.
	(makeDir): Likewise.
	* g++.dg/other/i386-8.C (foo): Likewise.
	* g++.dg/pr45788.C: Likewise.
	* g++.dg/pr64688.C (at_c): Likewise.
	* g++.dg/pr65032.C (G::DecodeVorbis): Likewise.
	* g++.dg/pr71633.C (c3::fn2): Likewise.
	* g++.dg/stackprotectexplicit2.C (A): Likewise.
	* g++.old-deja/g++.law/weak.C (main): Likewise.
2017-11-06  Martin Liska  <mliska@suse.cz>

	* testsuite/libgomp.c++/loop-2.C: Return a value
	for functions with non-void return type, or change type to void,
	or add -Wno-return-type for test.
	* testsuite/libgomp.c++/loop-4.C: Likewise.
	* testsuite/libgomp.c++/parallel-1.C: Likewise.
	* testsuite/libgomp.c++/shared-1.C: Likewise.
	* testsuite/libgomp.c++/single-1.C: Likewise.
	* testsuite/libgomp.c++/single-2.C: Likewise.
2017-11-06  Martin Liska  <mliska@suse.cz>

	* testsuite/27_io/basic_fstream/cons/char/path.cc (main):
	  Return a value for functions with non-void return type,
	  or change type to void, or add -Wno-return-type for test.
	* testsuite/27_io/basic_ifstream/cons/char/path.cc (main):
	Likewise.
	* testsuite/27_io/basic_ofstream/open/char/path.cc (main):
	Likewise.

From-SVN: r254451
2017-11-06 13:41:35 +00:00
Paolo Carlini
98910bc2b9 deduction.cc: Avoid -Wreturn-type warnings.
2017-11-06  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type
	warnings.
	* testsuite/20_util/pair/cons/deduction.cc: Likewise.
	* testsuite/20_util/pair/traits.cc: Likewise.
	* testsuite/20_util/tuple/cons/deduction.cc: Likewise.
	* testsuite/20_util/variant/compile.cc: Likewise.
	* testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
	* testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
	Likewise.

From-SVN: r254450
2017-11-06 12:55:35 +00:00
Eric Botcazou
6b6b9e5b90 gcov: New directory.
* gnat.dg/gcov: New directory.
	* gnat.dg/gcov/gcov.exp: New driver.
	* gnat.dg/gcov/check.adb: New test.

From-SVN: r254447
2017-11-06 11:41:49 +00:00
Christophe Lyon
d276dc3174 [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated part 2
2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>

	PR target/67591
	* config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
	attribute.
	(*cmp_ite0): Add enabled_for_depr_it attribute.
	(*cmp_ite1): Likewise.

From-SVN: r254446
2017-11-06 11:43:19 +01:00