Commit Graph

140850 Commits

Author SHA1 Message Date
Ian Lance Taylor 055db850c6 runtime: Fix recent lfstack change on Solaris.
Reviewed-on: https://go-review.googlesource.com/14922

From-SVN: r228087
2015-09-24 13:33:20 +00:00
Segher Boessenkool f08e13f110 rs6000: Fix -mdebug=stack code for spe_gp_offset
2015-09-23  Segher Boessenkool  <segher@kernel.crashing.org>

	* config/rs6000/rs6000.c (debug_stack_info): Invert the test
	for info->spe_gp_size.

From-SVN: r228086
2015-09-24 14:43:43 +02:00
Richard Biener 760e1bb7e2 re PR lto/67699 (ICE (segfault) compiling a const array with -flto)
2015-09-24  Richard Biener  <rguenther@suse.de>

	PR lto/67699
	* lto-cgraph.c (compute_ltrans_boundary): Do not stream
	abstract origins.

	* g++.dg/pr67699.C: New testcase.

From-SVN: r228084
2015-09-24 11:01:14 +00:00
Richard Earnshaw 4dfe21acc2 ARM: fp16 Fix PR 67624 - Incorrect conversion of float Infinity to __fp16
PR libgcc/67624
	libgcc:
	* config/arm/fp16.c (__gnu_f2h_internal): Handle infinity correctly.
	gcc/testsuite:
	* gcc.target/arm/fp16-inf.c: New test.

From-SVN: r228082
2015-09-24 09:40:06 +00:00
Thomas Schwinge 60dd79ca89 Additional changes to switch from gimple to gimple *
gcc/
	* tree-object-size.c (plus_stmt_object_size)
	(cond_expr_object_size): Change the formal parameters from gimple
	to gimple *.
	* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Likewise.
	* tree-ssa-sccvn.c (vn_nary_op_insert_stmt): Make it static.
	* tree-ssa-sccvn.h (vn_nary_op_insert_stmt): Don't declare.

From-SVN: r228080
2015-09-24 11:27:12 +02:00
Kirill Yukhin bc6e483f76 avx512vbmi-check.h (main): Fix register name while checking for AVX-512VBMI presence.
gcc/testsuite/
	* gcc.target/i386/avx512vbmi-check.h (main): Fix register
	name while checking for AVX-512VBMI presence.

From-SVN: r228079
2015-09-24 09:03:57 +00:00
Rainer Orth df2a1cc48b Support PIE on Solaris
gcc/testsuite:
	* lib/target-supports.exp (check_effective_target_pie): Check for
	PIE support on Solaris 11.x and 12.

	libgcc:
	* config.host (*-*-solaris2*): Add t-crtstuff-pic to tmake_file.
	Add crtbeginS.o, crtendS.o to extra_parts if libgcc_cv_solaris_crts.
	* config/sol2/gmon.c: (monstartup): Don't write trailing NUL of
	messages.
	(internal_mcount): Likewise.
	* config/sol2/t-sol2 (crtp.o, crtpg.o, gmon.o): Compile with
	crt_compile, add CRTSTUFF_T_CFLAGS_S.

	gcc:
	* configure.ac (gcc_cv_ld_pie): Check for gld >= 2.26 on Solaris.
	Check for ld -type pie on Solaris 11.x and 12.
	* configure: Regenerate.
	* config.in: Regenerate.

	* gcc.c (LD_PIE_SPEC): Allow redefinition.

	* config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Define.
	(STARTFILE_SPEC): Use it.
	(ENDFILE_CRTEND_SPEC): Define.
	(ENDFILE_SPEC): Use it and ENDFILE_ARCH_SPEC.
	(SUBTARGET_EXTRA_SPECS): Add STARTFILE_CRTBEGIN_SPEC,
	ENDFILE_ARCH_SPEC, ENDFILE_CRTEND_SPEC.
	[HAVE_LD_PIE && HAVE_SOLARIS_CRTS] (LD_PIE_SPEC): Define.
	(!(HAVE_LD_PIE && HAVE_SOLARIS_CRTS)] (LINK_PIE_SPEC): Define.
	* config/i386/sol2.h (ENDFILE_SPEC): Remove.
	(ENDFILE_ARCH_SPEC): Define.
	* config/sparc/sol2.h (ENDFILE_ARCH_SPEC): Define.

From-SVN: r228078
2015-09-24 09:00:22 +00:00
Rainer Orth 2d11044217 Use CRTs provided by Solaris
gcc:
	* configure.ac (gcc_cv_solaris_crts): New test.
	* configure. Regenerate.
	* config.in: Regenerate.
	* config/sol2.h (STARTFILE_SPEC): Simplify, provide
	HAVE_SOLARIS_CRTS variant.

	libgcc:
	* configure.ac (libgcc_cv_solaris_crts): New test.
	* configure: Regenerate.
	* config.in: Regenerate.
	* config/sol2/crtp.c, config/sol2/crtpg.c: New files.
	* config/gmon-sol2.c: Rename to ...
	* config/sol2/gmon.c: ... this.
	Include auto-target.h.
	(internal_mcount): Wrap setup handling in !HAVE_SOLARIS_CRTS.
	* config/t-sol2: Rename to ...
	* config/sol2/t-sol2: ... this.
	(gmon.o): Reflect renaming.
	(crtp.o, crtpg.o): New rules.
	* config.host (*-*-solaris2*): Reflect renaming.
	Use system CRTs if present.
	Remove default CRT case.

From-SVN: r228077
2015-09-24 08:51:39 +00:00
Kyrylo Tkachov fcb901cdfa [tree-inline][obvious] Delete redundant count_insns_seq
* tree-inline.h (count_insns_seq): Delete prototype.
	(estimate_num_insns_seq): Define prototype.
	* tree-inline.c (count_insns_seq): Delete.
	(estimate_num_insns_seq): Remove static qualifier.
	* tree-eh.c (decide_copy_try_finally): Replace use of count_insns_seq
	with estimate_num_insns_seq.

From-SVN: r228075
2015-09-24 08:25:13 +00:00
Richard Biener 1fefbb66c8 tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base members.
2015-09-24  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.h (vn_reference_op_struct): Add clique and base
	members.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Record clique
	and base for MEM_REF and TARGET_MEM_REF.  Handle BIT_FIELD_REF
	offset.
	(ao_ref_init_from_vn_reference): Record clique and base in the
	built base.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise

	* g++.dg/tree-ssa/restrict3.C: New testcase.

From-SVN: r228074
2015-09-24 07:35:55 +00:00
Richard Biener 0a28fdcaf7 re PR c/48885 (missed optimization with restrict qualifier?)
2015-09-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/48885
	* tree-ssa-structalias.c (visit_loadstore): Handle default defs
	as not including any restrict tags from other pointers.

	* gcc.dg/tree-ssa/restrict-6.c: New testcase.

From-SVN: r228073
2015-09-24 07:34:47 +00:00
Uros Bizjak 761d6f4eec ChangeLog: Fix whitespace.
* ChangeLog: Fix whitespace.
	* testsuite/ChangeLog: Ditto.

From-SVN: r228072
2015-09-24 08:30:52 +02:00
Patrick Palka 6b95d7cc2d Fix a -Wmisleading-indentation false-negative
gcc/c-family/ChangeLog:

	* c-indentation.c (should_warn_for_misleading_indentation):
	Compare next_stmt_vis_column with guard_line_first_nws instead
	of with guard_line_vis_column.

gcc/testsuite/ChangeLog:

	* c-c++-common/Wmisleading-indentation.c: Augment test.

From-SVN: r228071
2015-09-24 01:55:59 +00:00
GCC Administrator 3d5cda1290 Daily bump.
From-SVN: r228070
2015-09-24 00:16:15 +00:00
John David Anglin d572e4397d linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Reorder error checks.
	(__sync_fetch_and_##OP##_##WIDTH): Change result to match type of
	__kernel_cmpxchg2.
	(__sync_##OP##_and_fetch_##WIDTH): Likewise.
	(__sync_val_compare_and_swap_##WIDTH): Likewise.
	(__sync_bool_compare_and_swap_##WIDTH): Likewise.
	(__sync_lock_test_and_set_##WIDTH): Likewise.
	(__sync_lock_release_##WIDTH): Likewise.
	(__sync_fetch_and_##OP##_4): Change result to match type of
	__kernel_cmpxchg.
	(__sync_##OP##_and_fetch_4): Likewise.
	(__sync_val_compare_and_swap_4): Likewise.
	(__sync_bool_compare_and_swap_4): likewise.
	(__sync_lock_test_and_set_4): Likewise.
	(__sync_lock_release_4): Likewise.
	(FETCH_AND_OP_2): Add long long variants.
	(OP_AND_FETCH_2): Likewise.
	(COMPARE_AND_SWAP_2 ): Likewise.
	(SYNC_LOCK_TEST_AND_SET_2): Likewise.
	(SYNC_LOCK_RELEASE_2): Likewise.
	(__sync_bool_compare_and_swap_##WIDTH): Correct return.

From-SVN: r228065
2015-09-23 23:27:15 +00:00
Ian Lance Taylor 9f59bddfbf re PR go/67695 (Please improve POSIX shell compatibility of libgo/mksysinfo.sh)
PR go/67695
    mksysinfo.sh: Use = with test rather than ==.
    
    Fixes GCC PR 67695.

    Reviewed-on: https://go-review.googlesource.com/14858

From-SVN: r228064
2015-09-23 20:43:46 +00:00
Ville Voutilainen 99474f812e Fix small typos in the coding rule enforcement warnings.
/cp
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Fix small typos in the coding rule enforcement warnings.
	* parser.c (cp_parser_namespace_definition): Replace 'namepace'
	with 'namespace'.

/testsuite
2015-09-23  Ville Voutilainen  <ville.voutilainen@gmail.com>

	Fix small typos in the coding rule enforcement warnings.
	* g++.dg/diagnostic/disable.C: Replace 'namepace'
	with 'namespace'.

From-SVN: r228061
2015-09-23 21:22:21 +03:00
Ian Lance Taylor 46efdbbc01 runtime: rewrite lfstack packing/unpacking to look more like that in Go
Reviewed-on: https://go-review.googlesource.com/13037

From-SVN: r228057
2015-09-23 17:07:15 +00:00
Thomas Schwinge a9c238108b Fix --enable-offload-targets/-foffload handling, pt. 2
gcc/
	* gcc.c (handle_foffload_option): Don't lose the trailing NUL
	character when appending to offload_targets.

From-SVN: r228054
2015-09-23 16:52:57 +02:00
Thomas Schwinge 64186aad5a Fix --enable-offload-targets/-foffload handling, pt. 1
gcc/
	* configure.ac (offload_targets, OFFLOAD_TARGETS): Separate
	offload targets by commas, not colons.
	* config.in: Regenerate.
	* configure: Likewise.
	* gcc.c (driver::maybe_putenv_COLLECT_LTO_WRAPPER): Due to that,
	instead of setting up the default offload targets here...
	(process_command): ..., do it here.
	libgomp/
	* plugin/configfrag.ac (OFFLOAD_TARGETS): Clarify that offload
	targets are separated by commas.
	* config.h.in: Regenerate.

From-SVN: r228053
2015-09-23 16:52:50 +02:00
Thomas Schwinge f2c9f71da9 Refactor omp_reduction_init: omp_reduction_init_op
gcc/
	* omp-low.h (omp_reduction_init_op): Declare.
	* omp-low.c (omp_reduction_init_op): New, broken out of ...
	(omp_reduction_init): ... here.  Call it.
	* tree-parloops.c (initialize_reductions): Use
	omp_reduction_init_op.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>

From-SVN: r228052
2015-09-23 16:46:55 +02:00
Richard Biener ef537cc859 re PR middle-end/67662 (-fsanitize=undefined cries wolf for X - 1 + X when X is 2**30)
2015-09-23   Richard Biener  <rguenther@suse.de>

	PR middle-end/67662
	* fold-const.c (fold_binary_loc): Do not reassociate two vars with
	undefined overflow unless they will cancel out.

	* gcc.dg/ubsan/pr67662.c: New testcase.

From-SVN: r228051
2015-09-23 14:09:48 +00:00
Kirill Yukhin 9e07d08d78 AVX-512. Fix emit in '*<mshift><mode>3' pattern.
gcc/
	 * config/i386/i386.md (define_insn "*<mshift><mode>3"): Fix
	 insn emit.

From-SVN: r228050
2015-09-23 13:28:12 +00:00
Manuel López-Ibáñez c1822f9c9b [c-family/49654/49655] reject invalid options in pragma diagnostic
Use find_opt instead of linear search through options in
handle_pragma_diagnostic (PR 49654) and reject non-warning options and
options not valid for the current language (PR 49655).

gcc/testsuite/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c/49655
	* gcc.dg/pragma-diag-6.c: New test.

gcc/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c/49655
	* opts.h (write_langs): Declare.
	* opts-global.c (write_langs): Make it extern.

gcc/c-family/ChangeLog:

2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c/49654
	PR c/49655
	* c-pragma.c (handle_pragma_diagnostic): Detect non-warning
	options and options not valid for the current language.

From-SVN: r228049
2015-09-23 13:07:07 +00:00
Oleg Endo 9ea4e88f17 re PR target/67391 ([SH] Convert clrt addc to normal add insn)
gcc/
	PR target/67391
	* config/sh/sh.md (addsi3, *addsi3_compact): Don't check for overlapping
	regs when matching the pattern.

From-SVN: r228046
2015-09-23 11:55:45 +00:00
James Greenhalgh d5d27976c8 [AArch64] Fix vcvt_high_f64_f32 and vcvt_figh_f32_f64 intrinsics.
gcc/

	* config/aarch64/aarch64-simd.md
	(aarch64_float_truncate_hi_v4sf): Rewrite as an expand.
	(aarch64_float_truncate_hi_v4sf_le): New.
	(aarch64_float_truncate_hi_v4sf_be): Likewise.

gcc/testsuite/

	* gcc.target/aarch64/advsimd-intrinsics/vcvt_high_1.c: New.

From-SVN: r228044
2015-09-23 11:39:48 +00:00
Jonathan Wakely 07dc170b6f Limit number of symlinks that canonical() will resolve
* src/filesystem/ops.cc (canonical): Simplify error handling and
	limit number of symlinks that can be resolved.

From-SVN: r228043
2015-09-23 12:26:50 +01:00
Jonathan Wakely 429ee11aa3 Fix semantics of Filesystem TS directory iterators
[class.directory_iterator] p4 and [directory_iterator.members] p4
require that only the default constructor and ignored permission denied
errors can create the end iterator.

	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Remove _GLIBCXX_
	prefix from HAVE_STRUCT_DIRENT_D_TYPE.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* include/experimental/fs_dir.h (operator==, operator==):
	Use owner_before instead of pointer equality.
	(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
	* src/filesystem/dir.cc (ErrorCode): Remove.
	(_Dir::advance): Change ErrorCode parameter to error_code*, add
	directory_options parameter and check it on error.
	(opendir): Rename to open_dir to avoid clashing with macro. Change
	ErrorCode parameter to error_code*.
	(make_shared_dir): Remove.
	(native_readdir) [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Don't set errno.
	(directory_iterator(std::shared_ptr<_Dir>, error_code*)): Remove.
	(directory_iterator(const path&, directory_options, error_code*)):
	Pass options to _Dir::advance and create non-end iterator on error.
	(recursive_directory_iterator(const path&, directory_options,
	error_code*)): Clear error_code on ignored error, create non-end
	iterator otherwise.
	(recursive_directory_iterator::increment): Pass _M_options to
	_Dir::advance.
	(recursive_directory_iterator::pop): Likewise.
	* testsuite/experimental/filesystem/iterators/directory_iterator.cc:
	New.
	* testsuite/experimental/filesystem/iterators/
	recursive_directory_iterator.cc: New.

From-SVN: r228042
2015-09-23 12:26:45 +01:00
Jonathan Wakely 366703118c Fix filesystem::create_directories() function
* src/filesystem/ops.cc (is_dot, is_dotdot): Define new helpers.
	(create_directories): Fix error handling.
	* testsuite/experimental/filesystem/operations/create_directories.cc:
	New.

From-SVN: r228041
2015-09-23 12:25:59 +01:00
Richard Biener be6e26f995 tree-ssa-structalias.c (intra_create_variable_infos): Build representatives for all restrict qualified pointer destinations.
2015-09-23  Richard Biener  <rguenther@suse.de>

	* tree-ssa-structalias.c (intra_create_variable_infos): Build
	representatives for all restrict qualified pointer destinations.

	* g++.dg/tree-ssa/restrict2.C: Un-XFAIL testcase.

From-SVN: r228040
2015-09-23 11:11:48 +00:00
Kirill Yukhin 40f1d2ab26 AVX-512. Add kshift[lr][bwdq]. Fix iterator.
gcc/
	* config/i386/i386.md (define_code_attr mshift): New.
	(define_mode_iterator SWI1248_AVX512BW): Rename ...
	(SWI1248_AVX512BW): ... to this. Make QI enabled for TARGET_AVX512DQ
	only.
	(define_insn "*k<logic><mode>"): Use new iterator name.
	(define_insn "*<mshift><mode>3"): New.

From-SVN: r228034
2015-09-23 07:08:56 +00:00
Mikhail Maltsev 0c6126b47d Fix use of valgrind API
gcc/
	PR middle-end/67649
	* memory-block.h (memory_block_pool::allocate): Use valgrind API to
	mark the block as accessible.

From-SVN: r228033
2015-09-23 02:31:14 +00:00
GCC Administrator dbfc22a470 Daily bump.
From-SVN: r228031
2015-09-23 00:16:13 +00:00
Patrick Palka d53980585b Fix -Wmisleading-indentation false-positive
gcc/c-family/ChangeLog:

	* c-indentation.c (should_warn_for_misleading_indentation):
	Float out and consolidate the calls to get_visual_column that
	are passed guard_exploc as an argument.  Compare
	next_stmt_vis_column with guard_line_first_nws instead of with
	body_line_first_nws.

gcc/testsuite/ChangeLog:

	* c-c++-common/Wmisleading-indentation.c: Augment test.

From-SVN: r228027
2015-09-22 23:06:31 +00:00
Segher Boessenkool 6c98d4995c shrink-wrap: Handle multiple predecessors of prologue
The caller of try_shrink_wrapping wants to be returned a single edge to
put the prologue on.  To make that work even if there are multiple edges
(all pointing to the PRO block) that need the prologue, add a new block
that becomes the destination of all such edges, and then jumps to PRO.

In the general case, some edges to PRO will need to be redirected, and
not all edges *can* be redirected.  This adds a can_get_prologue function
that detects such cases.  This then happily can also handle the "prologue
clobbers some reg that is live on the edge we want to insert it on" case.

Not all EDGE_CROSSING edges can be redirected, so handle those the same
as EDGE_COMPLEX edges.


2015-09-22  Segher Boessenkool  <segher@kernel.crashing.org>

	* function.c (thread_prologue_and_epilogue_insns): Delete
	orig_entry_edge argument to try_shrink_wrapping.
	* shrink-wrap.c (can_get_prologue): New function.
	(can_dup_for_shrink_wrapping): Also handle EDGE_CROSSING.
	(try_shrink_wrapping): Delete orig_entry_edge argument.  Use
	can_get_prologue where needed.  Remove code that finds a single
	edge for the prologue.  Remove code that tests if any reg clobbered
	by the prologue is live on the prologue edge.  Remove code that finds
	the new prologue edge after duplicating blocks.  Make a new prologue
	block and edge.
	* shrink-wrap.h (try_shrink_wrapping): Delete orig_entry_edge argument.

From-SVN: r228022
2015-09-22 22:50:38 +02:00
Jeff Law 50fa47d916 [PATCH] Remove undefined behaviour from hppa backend
* config/pa/pa.h (MIN_LEGIT_64BIT_CONST_INT: Avoid undefined
	behavior.

From-SVN: r228021
2015-09-22 12:39:10 -06:00
Nathan Sidwell 6b333269be c.opt (Wmultiple-inheritance, [...]): New C++ warnings.
c-family/
	* c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
	Wnamespaces): New C++ warnings.

	cp/
	* decl.c (xref_basetypes): Check virtual and/or multiple
	inheritance warning.
	* parser.c (cp_parser_namespace_definition): Check namespaces
	warning.
	* pt.c (push_template_decl_real): Check templates warning.

	* doc/invoke.texi  (-Wmultiple-inheritance, -Wvirtual-inheritance,
	-Wtemplates, -Wnamespaces): Document.

	testsuite/
	* g++.dg/diagostic/disable.C: New.

From-SVN: r228019
2015-09-22 15:34:49 +00:00
Jason Merrill a75f15742a Disconnect -Wabi=<n> from -fabi-compat-version=<n>.
gcc/c-family/
	* c-common.h (abi_compat_version_crosses): New.
	(warn_abi_version): Declare.
	* c-common.c: Define it.
	* c-opts.c (c_common_post_options): Handle it.
	flag_abi_compat_version defaults to 8.
gcc/cp/
	* mangle.c (abi_warn_or_compat_version_crosses): New.
	Use it instead of abi_version_crosses.
	(mangle_decl): Deal with -fabi-compat-version and -Wabi separately.

From-SVN: r228017
2015-09-22 11:18:26 -04:00
Tom de Vries 8013b816cc Handle restrict pointer references as restrict in AA
2015-09-22  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/67671
	* tree-ssa-structalias.c (create_variable_info_for_1): Handle restrict
	pointer references as restrict.

	* g++.dg/pr67671.C: New test.

From-SVN: r228015
2015-09-22 14:14:56 +00:00
Jason Merrill 0854c7f115 Update Andrew Cagney's address.
From-SVN: r228014
2015-09-22 09:31:20 -04:00
Chung-Lin Tang b062ae0549 nios2.c (nios2_legitimize_address): When handling 'reg + reloc' cases...
2015-09-22  Chung-Lin Tang  <cltang@codesourcery.com>

	* config/nios2/nios2.c (nios2_legitimize_address): When handling
	'reg + reloc' cases, allow first operand to be non-REG, and use
	force_reg() to enforce address pattern.

From-SVN: r228012
2015-09-22 12:19:27 +00:00
Alexander Fomin 01c102a6de re PR target/67480 (AVX512 bitwise logic operations pattern is incorrect)
PR target/67480

gcc/
	* config/i386/sse.md (define_mode_iterator VI48_AVX_AVX512F): New.
	(define_mode_iterator VI12_AVX_AVX512F): New.
	(define_insn "<mask_codefor><code><mode>3<mask_name>"): Change
	all iterators to VI48_AVX_AVX512F. Extract remaining modes ...
	(define_insn "*<code><mode>3"): ... Into new pattern using
	VI12_AVX_AVX512F iterators without masking.

gcc/testsuite/
	* gcc.target/i386/pr67480.c: New test.

From-SVN: r228010
2015-09-22 11:14:25 +00:00
Kirill Yukhin 06caf59d7f AVX-512. Introduce SKylake server CPU.
gcc/
	* config.gcc: Support "skylake-avx512".
        * config/i386/i386-c.c (ix86_target_macros_internal): Handle
        PROCESSOR_SKYLAKE_AVX512.
        * config/i386/i386.c (m_SKYLAKE_AVX512): Define.
        (processor_target_table): Add "skylake-avx512".
        (PTA_SKYLAKE_AVX512): Define.
	(ix86_option_override_internal): Add "skylake_avx512".
        (fold_builtin_cpu): Handle "skylake_avx512", add F_AVX512VL
	F_AVX512BW, F_AVX512DQ, F_AVX512ER, F_AVX512PF, F_AVX512CD.
        * config/i386/i386.h (TARGET_SKYLAKE_AVX512): Define.
        (processor_type): Add PROCESSOR_SKYLAKE_AVX512.
	* doc/invoke.texi (skylake-avx512): New.

libgcc/
	* libgcc/config/i386/cpuinfo.c (enum processor_features): Add
	FEATURE_AVX512VL, FEATURE_AVX512BW, FEATURE_AVX512DQ,
	FEATURE_AVX512CD, FEATURE_AVX512ER, FEATURE_AVX512PF.
	(get_available_features): Habdle new features.

gcc/testsuite/
        * gcc.target/i386/funcspec-5.c: Test avx512vl, avx512bw,
	avx512dq, avx512cd, avx512er, avx512pf and skylake-avx512.
	* gcc.target/i386/builtin_target.c: Test  avx512vl, avx512bw,
	avx512dq, avx512cd, avx512er and avx512pf.

From-SVN: r228009
2015-09-22 11:10:21 +00:00
Kirill Yukhin 7095d6f2eb AVX-512. Fix patterns for kunpck insns.
gcc/
	* gcc/config/i386/i386.md (define_insn "kunpckhi"): Fix
	operand in pattern.
	(define_insn "kunpcksi"): Ditto. 
	(define_insn "kunpckdi"): Ditto.

From-SVN: r228005
2015-09-22 09:47:39 +00:00
Kirill Yukhin 5febdf54ab AVX-512. Fix kxnor insn split.
gcc/
	* gcc/config/i386/i386.md (define_split not/xor SWI1248x): Use
	iterator instead of fixed modes.

From-SVN: r228003
2015-09-22 09:42:26 +00:00
Matthew Wahab 68729b062d [AArch64] Use atomic load-operate instructions for update-fetch patterns.
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
	Adjust declaration.
	* config/aarch64/aarch64.c (aarch64_emit_bic): New.
	(aarch64_gen_atomic_ldop): Adjust comment.  Add parameter
	out_result.  Update to support update-fetch operations.
	* config/aarch64/atomics.md (aarch64_atomic_exchange<mode>_lse):
	Adjust for change to aarch64_gen_atomic_ldop.
	(aarch64_atomic_<atomic_optab><mode>_lse): Likewise.
	(aarch64_atomic_fetch_<atomic_optab><mode>_lse): Likewise.
	(atomic_<atomic_optab>_fetch<mode>): Change to an expander.
	(aarch64_atomic_<atomic_optab>_fetch<mode>): New.
	(aarch64_atomic_<atomic_optab>_fetch<mode>_lse): New.

gcc/testsuite
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* gcc.target/aarch64/atomic-inst-ldadd.c: Add tests for
	update-fetch operations.
	* gcc.target/aarch64/atomic-inst-ldlogic.c: Likewise.

From-SVN: r228002
2015-09-22 09:41:15 +00:00
Matthew Wahab 641c2f8b69 [AArch64] Use atomic load-operate instructions for fetch-update patterns.
gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64-protos.h
	(aarch64_atomic_ldop_supported_p): Declare.
	* config/aarch64/aarch64.c (aarch64_atomic_ldop_supported_p): New.
	(enum aarch64_atomic_load_op_code): New.
	(aarch64_emit_atomic_load_op): New.
	(aarch64_gen_atomic_ldop): Update to support load-operate
	patterns.
	* config/aarch64/atomics.md (atomic_<atomic_optab><mode>): Change
	to an expander.
	(aarch64_atomic_<atomic_optab><mode>): New.
	(aarch64_atomic_<atomic_optab><mode>_lse): New.
	(atomic_fetch_<atomic_optab><mode>): Change to an expander.
	(aarch64_atomic_fetch_<atomic_optab><mode>): New.
	(aarch64_atomic_fetch_<atomic_optab><mode>_lse): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* gcc.target/aarch64/atomic-inst-ldadd.c: New.
	* gcc.target/aarch64/atomic-inst-ldlogic.c: New.

From-SVN: r228001
2015-09-22 09:35:17 +00:00
Matthew Wahab 6380d2bc38 [AArch64] Add atomic load-operate instructions.
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64/atomics.md (UNSPECV_ATOMIC_LDOP): New.
	(UNSPECV_ATOMIC_LDOP_OR): New.
	(UNSPECV_ATOMIC_LDOP_BIC): New.
	(UNSPECV_ATOMIC_LDOP_XOR): New.
	(UNSPECV_ATOMIC_LDOP_PLUS): New.
	(ATOMIC_LDOP): New.
	(atomic_ldop): New.
	(aarch64_atomic_load<atomic_ldop><mode>): New.

From-SVN: r228000
2015-09-22 09:30:51 +00:00
Matthew Wahab cc05c2c3e0 [AArch64] Make BIC, other logical instructions, available.
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64.md
	(<LOGICAL:optab>_one_cmpl_<SHIFT:optab><mode>3): Make a named
	pattern.

From-SVN: r227999
2015-09-22 09:24:47 +00:00
Matthew Wahab 9cd7b72071 [AArch64] Use atomic instructions for swap and fetch-update operations.
gcc/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* config/aarch64/aarch64-protos.h (aarch64_gen_atomic_ldop):
	Declare.
	* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): New.
	(aarch64_gen_atomic_ldop): New.
	(aarch64_split_atomic_op): Fix whitespace and add a comment.
	* config/aarch64/atomics.md (UNSPECV_ATOMIC_SWP): New.
	(aarch64_compare_and_swap<mode>_lse): Fix some whitespace.
	(atomic_exchange<mode>): Replace with an expander.
	(aarch64_atomic_exchange<mode>): New.
	(aarch64_atomic_exchange<mode>_lse): New.
	(aarch64_atomic_<atomic_optab><mode>): Fix some whitespace.
	(aarch64_atomic_swp<mode>): New.

gcc/testsuite/
2015-09-22  Matthew Wahab  <matthew.wahab@arm.com>

	* gcc.target/aarch64/atomic-inst-ops.inc: (TEST_MODEL): New.
	(TEST_ONE): New.
        * gcc.target/aarch64/atomic-inst-swap.c: New.

From-SVN: r227998
2015-09-22 09:19:55 +00:00