Commit Graph

153733 Commits

Author SHA1 Message Date
Paolo Carlini
59fbddcfff re PR c++/70538 (ICE on a deprecated access declaration in instantiate_template_1, at cp/pt.c:17310)
2017-05-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/70538
	* g++.dg/cpp0x/pr70538.C: New.

From-SVN: r247917
2017-05-11 17:13:42 +00:00
Nathan Sidwell
c24e924f92 dumpfle.h (dump_function): Declare here ...
* dumpfle.h (dump_function): Declare here ...
	* tree-dump.h (dump_function): ... not here.
	* dumpfile.c: #include tree-cfg.h.
	(dump_function): Move here from ...
	* tree-dump.c (dump_function): ... here.
	* gimplify.c: #include splay-tree.h, not tree-dump.h.
	* graphite-poly.c: Don't include tree-dump.h.
	* cgraphclones.c: Include dumpfile.h not tree-dump.h.
	* print-tree.c: Likewise.
	* stor-layout.c: Likewise.
	* tree-nested.c: Likewise.

	c/
	* gimple-parser.c: Don't #include tree-dump.h.

	fortran/
	* trans-decl.c: Include dumpfile.h not tree-dump.h,

From-SVN: r247916
2017-05-11 15:48:51 +00:00
Nathan Sidwell
2e3757e78a Revert pushdecl_top_level_and_finish name change.
* name-lookup.h (pushdecl_top_level_and_finish): Resurrect old
	name.
	* name-lookup.c (pushdecl_top_level_and_finish): Likewise.
	* decl.c (cp_make_fname_decl): Adjust.
	* decl2.c (get_guard, handle_tls_init):  Adjust.
	* rtti.c (get_tinfo_decl, tinfo_base_init):  Adjust.

From-SVN: r247915
2017-05-11 15:46:48 +00:00
Uros Bizjak
cc09ff603b pr22152.c: Fix undefined testcase.
* gcc.target/i386/pr22152.c: Fix undefined testcase.  Remove
	unnecessary loop.  Run on 32-bit targets only.
	(dg-options): Remove -fno-tree-sink.

From-SVN: r247914
2017-05-11 17:41:50 +02:00
Steven Munroe
75ad901a7a As I will be working on X86 intrinsic equivalents for PowerPC64LE
adding myself to Write After Approval list.

2017-05-11  Steven Munroe  <munroesj@gcc.gnu.org>

	* MAINTAINERS: Add myself to Write After Approval section.

From-SVN: r247913
2017-05-11 15:41:24 +00:00
Jonathan Wakely
395ec8f30c Fix ViewCVS URLs in libstdc++ manual
* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
	* doc/xml/manual/mt_allocator.xml: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r247911
2017-05-11 16:01:10 +01:00
Nathan Sidwell
c8634a1a24 name-lookup.c (pushdecl_outermost_localscope): Always conditionally stop timer.
* name-lookup.c (pushdecl_outermost_localscope): Always
	conditionally stop timer.

From-SVN: r247910
2017-05-11 14:51:07 +00:00
Nathan Sidwell
c443f3d51e decl.c (xref_tag_1): Don't frob ts_lambda scope here.
* decl.c (xref_tag_1): Don't frob ts_lambda scope here.
	* name-lookup.c (pushtag_1): Deal with ts_lambda scope.

From-SVN: r247909
2017-05-11 14:40:28 +00:00
Nathan Sidwell
2cd470921f dumpfile.h (TDF_FLAGS): New.
* dumpfile.h (TDF_FLAGS): New.
	* dumpfile.c (dump_start): Use TDF_FLAGS.
	(dump_enable_all): Fix TDF_KIND check thinko.

From-SVN: r247908
2017-05-11 14:23:16 +00:00
Kelvin Nilsen
4fd18c782d cmpb-1.c: New test.
gcc/testsuite/ChangeLog:

2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* gcc.target/powerpc/cmpb-1.c: New test.
	* gcc.target/powerpc/cmpb-2.c: New test.
	* gcc.target/powerpc/cmpb-3.c: New test.
	* gcc.target/powerpc/cmpb32-1.c: New test.
	* gcc.target/powerpc/cmpb32-2.c: New test.

gcc/ChangeLog:

2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	array entries to represent two legal parameterizations of the
	overloaded __builtin_cmpb function, as represented by the
	P6_OV_BUILTIN_CMPB constant.
	(altivec_resolve_overloaded_builtin): Add special case handling
	for the __builtin_cmpb function, as represented by the
	P6_OV_BUILTIN_CMPB constant.
	* config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
	(BU_P6_64BIT_2): New macro.
	(BU_P6_OVERLOAD_2): New macro
	(CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
	(CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
	(CMPB): Add overload support to represent both 32-bit and 64-bit
	compare-bytes function.
	* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
	support for TARGET_CMPB.
	* config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
	* doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
	documentation of the __builtin_cmpb overloaded built-in function.

From-SVN: r247907
2017-05-11 14:13:31 +00:00
Richard Biener
43b883a990 re PR tree-optimization/80705 (Incorrect code generated for profile counter updates due to SLP+LIM)
2017-05-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/80705
	* tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
	bases are not vectorizable.

	* gcc.dg/vect/bb-slp-pr80705.c: New testcase.

From-SVN: r247906
2017-05-11 14:08:07 +00:00
Jonathan Wakely
f8cba3aaae PR libstdc++/80285 optimize std::make_shared for -fno-rtti
PR libstdc++/80285
	* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Define
	function to get unique fake std::type_info reference.
	(_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Compare to
	_S_ti() fake reference.
	(__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Share
	single implementation with or without RTTI enable.
	[!__cpp_rtti]: Pass fake reference to _M_get_deleter.
	* testsuite/20_util/shared_ptr/creation/alloc.cc: Change expected
	allocation and deallocation counts.
	* testsuite/20_util/shared_ptr/creation/single_allocation.cc: New.
	* testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
	New.

From-SVN: r247905
2017-05-11 14:21:07 +01:00
Nathan Sidwell
29b871ec5e scanlang.exp: New.
* lib/scanlang.exp: New.
	* lib/gcc-dg.exp: Load scanlang.exp.
	* g++.dg/inherit/covariant7.C: Use scan-lang-dump.

From-SVN: r247904
2017-05-11 13:09:42 +00:00
Mikhail Maltsev
c587104e11 GIMPLEFE: Handle invalid SSA names
gcc/testsuite/

	PR testsuite/80580
	* gcc.dg/gimplefe-error-6.c: New test.

gcc/c/

	PR testsuite/80580
	* gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.

From-SVN: r247903
2017-05-11 12:27:37 +00:00
Nathan Sidwell
056a17ee6c cp-tree.h (pushdecl, [...]): Move declarations to ...
* cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag)
	pushtag_top_level_maybe_friend,
	pushdecl_top_level_and_finish):	Move declarations to ...
	* name-lookup.h: ... here.  Group pushdecl variants.
	(pushdecl_top_level_and_finish): Rename to ...
	(pushdecl_top_level_with_init): ... here.
	* decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init.
	* decl2.c (get_guard, handle_tls_init): Likewise.
	* rtti.c (get_tinfo_decl, tinfo_base_init): Likewise.
	* lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p.
	* method.c (implicitly_declare_fn): Likewise.
	* searchc (node_debug_info_needed): Likewise.
	* name-lookup.c (pushdecl_top_level_and_finish): Rename to ...
	(pushdecl_top_level_with_init): ... here.
	(pop_everything): Use namespace_bindings_p.
(--This line, and those below, will be ignored--

M    cp/ChangeLog
M    cp/method.c
M    cp/cp-tree.h
M    cp/decl.c
M    cp/lambda.c
M    cp/rtti.c
M    cp/name-lookup.c
M    cp/decl2.c
M    cp/name-lookup.h
M    cp/search.c

From-SVN: r247902
2017-05-11 11:57:01 +00:00
Nathan Sidwell
9c82d7b68e name-lookup.h (pop_binding): Rename to pop_local_binding.
* name-lookup.h (pop_binding): Rename to pop_local_binding.
	(getdecls): Rename to get_local_decls.
	* name-lookup.c (pop_binding): Rename to ...
	(pop_local_binding): ... here.
	(pop_bindings_and_leave_scope): Adjust.
	(getdecls): Rename to ...
	(get_local_decls): ... here.  Assert local scope.
	* decl.c (poplevel): Assert not namespace.  Adjust and simplify
	logic.
	(store_parm_decls): Adjust get_local_decls call.
	(parser.c (synthesize_implicit_template_parm): Likewise.

From-SVN: r247901
2017-05-11 11:06:26 +00:00
Mikhail Maltsev
67ac9a9db1 GIMPLEFE: handle invalid __MEM
gcc/c/

	PR testsuite/80580
	* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
	incorrect __MEM syntax.

gcc/testsuite/

	PR testsuite/80580
	* gcc.dg/gimplefe-error-5.c: New test.

From-SVN: r247900
2017-05-11 10:55:52 +00:00
Mikhail Maltsev
ac4eb40f5c GIMPLEFE: Handle invalid unary "*" operand type
gcc/c/

	PR testsuite/80580
	* gimple-parser.c (c_parser_gimple_unary_expression): Check argument
	type of unary '*'.

gcc/testsuite/

	PR testsuite/80580
	* gcc.dg/gimplefe-error-4.c: New test.

From-SVN: r247899
2017-05-11 10:48:54 +00:00
Bin Cheng
ab9e91f9fc tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger when counting register pressure.
* tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
	when counting register pressure.

From-SVN: r247898
2017-05-11 09:57:06 +00:00
Bin Cheng
e292d60603 tree-ssa-loop-ivopts.c (compare_cost_pair): New.
* tree-ssa-loop-ivopts.c (compare_cost_pair): New.
	(iv_ca_more_deps): Renamed to ...
	(iv_ca_compare_deps): ... this.
	(iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.

From-SVN: r247897
2017-05-11 09:55:56 +00:00
Bin Cheng
e97cac0271 tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump to ...
* tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
	to ...
	(determine_group_iv_costs): ... here.
	(find_inv_vars_cb): Record inv var if it's not recorded before.

From-SVN: r247896
2017-05-11 09:54:30 +00:00
Bin Cheng
ac5344e0be tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
* tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
	(get_shiftadd_cost): Ditto.

From-SVN: r247895
2017-05-11 09:52:52 +00:00
Bin Cheng
7a89b97a01 tree-ssa-address.c: Include header file.
* tree-ssa-address.c: Include header file.
	(move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
	address.
	(add_to_parts): Refactor.
	(addr_to_parts): New parameter.  Update use of move_hint_to_base.
	(create_mem_ref): Update use of addr_to_parts.  Re-associate addr
	in new order.

From-SVN: r247894
2017-05-11 09:51:41 +00:00
Bin Cheng
80ca1cfad4 re PR tree-optimization/53090 (suboptimal ivopt)
PR tree-optimization/53090
	* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
	COMP_IV_EXPR_2.
	(extract_cond_operands): Detect condition with IV on both sides
	and return COMP_IV_EXPR_2.
	(find_interesting_uses_cond): Add iv_use for both IVs in condition.
	(rewrite_use_compare): Simplify by removing call to function
	extract_cond_operands.

From-SVN: r247893
2017-05-11 09:50:15 +00:00
Bin Cheng
b6a2258fda tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
	(extract_cond_operands): Detect condition comparing against non-
	invariant bound and return appropriate enum value.
	(find_interesting_uses_cond): Update use of extract_cond_operands.
	Handle its return value accordingly.
	(determine_group_iv_cost_cond, rewrite_use_compare): Ditto.

From-SVN: r247892
2017-05-11 09:48:55 +00:00
Bin Cheng
014ef6e132 tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate nonlinear iv_use computation in loop invariant sensitive way.
* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
	nonlinear iv_use computation in loop invariant sensitive way.

From-SVN: r247891
2017-05-11 09:47:24 +00:00
Bin Cheng
06fd3160aa tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
	(find_iv_candidates): Call relate_compare_use_with_all_cands.

From-SVN: r247890
2017-05-11 09:42:36 +00:00
Bin Cheng
4c11bdff4d tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
* tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
	(dump_cand): Support iv_cand.inv_exprs.
	(add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
	for candidates.
	(iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
	iv_cand.inv_exprs.

From-SVN: r247889
2017-05-11 09:40:48 +00:00
Bin Cheng
3df50a9490 tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move from ...
* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
	from ...
	* tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
	as local function.  Include necessary header files.
	* tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.

From-SVN: r247888
2017-05-11 09:38:22 +00:00
Bin Cheng
3770871408 * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
From-SVN: r247887
2017-05-11 09:36:05 +00:00
Bin Cheng
c544114fde tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more operators...
* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
	operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
	RSHIFT_EXPR and BIT_NOT_EXPR.

From-SVN: r247886
2017-05-11 09:33:49 +00:00
Bin Cheng
f9f69dd651 tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
* tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
	(adjust_setup_cost): New parameter supporting round up adjustment.
	(struct address_cost_data): Delete.
	(force_expr_to_var_cost): Don't bound cost with spill_cost.
	(split_address_cost, ptr_difference_cost): Delete.
	(difference_cost, compare_aff_trees, record_inv_expr): Delete.
	(struct ainc_cost_data): New struct.
	(get_address_cost_ainc): New function.
	(get_address_cost, get_computation_cost): Reimplement.
	(determine_group_iv_cost_address): Record inv_expr for all uses of
	a group.
	(determine_group_iv_cost_cond): Call get_loop_invariant_expr.
	(iv_ca_has_deps): Reimplemented to ...
	(iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
	than OLD_CP.
	(iv_ca_extend): Call iv_ca_more_deps.

From-SVN: r247885
2017-05-11 09:31:18 +00:00
Bin Cheng
c2b64ceab2 tree-ssa-address.c (struct mem_address): Move to header file.
* tree-ssa-address.c (struct mem_address): Move to header file.
	(valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
	* tree-ssa-address.h (struct mem_address): Move from C file.
	(valid_mem_ref_p, move_fixed_address_to_symbol): Declare.

From-SVN: r247884
2017-05-11 09:27:55 +00:00
Bin Cheng
b7b5203d98 tree-affine.h (aff_combination_type): New interface.
* tree-affine.h (aff_combination_type): New interface.
	(aff_combination_zero_p): Remove static.
	(aff_combination_const_p): New interface.
	(aff_combination_singleton_var_p): New interfaces.

From-SVN: r247883
2017-05-11 09:25:30 +00:00
Richard Biener
7581ce9a1a tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks and destinations.
2017-05-11  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Skip unreachable blocks and destinations.
	(eliminate): Move stmt removal and fixup ...
	(fini_eliminate): ... here.  Skip inserted exprs.
	(pass_pre::execute): Move fini_pre after fini_eliminate.
	* tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
	(tail_merge_optimize): Run cleanup_tree_cfg if requested by
	PRE to get rid of dead code that has invalid SSA form and
	split critical edges again.

From-SVN: r247882
2017-05-11 09:16:00 +00:00
Bin Cheng
86b001e001 * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
From-SVN: r247881
2017-05-11 09:10:01 +00:00
Ville Voutilainen
e81c832812 re PR c++/80682 (__is_trivially_constructible(void, int) returns true.)
PR c++/80682

cp/

PR c++/80682
* method.c (is_trivially_xible): Reject void types.

testsuite/

PR c++/80682
* g++.dg/ext/is_trivially_constructible1.C: Add tests for void target.

From-SVN: r247880
2017-05-11 10:44:29 +03:00
Richard Biener
687aed9cc8 passes.c (execute_function_todo): Verify loops if they are said to be up-to-date.
2017-05-11  Richard Biener  <rguenther@suse.de>

	* passes.c (execute_function_todo): Verify loops if they are
	said to be up-to-date.
	* cfgexpand.c (pass_expand::execute): Discard loops for -dx.
	* trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.

From-SVN: r247879
2017-05-11 07:26:32 +00:00
GCC Administrator
eb5095f83f Daily bump.
From-SVN: r247878
2017-05-11 00:16:37 +00:00
John David Anglin
686048e48a re PR target/80090 (Incorrect assembler - output_addr_const may generate visibility output between op and address constant)
PR target/80090
	* config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
	handle calling assemble_external ourself.

From-SVN: r247872
2017-05-10 23:54:58 +00:00
John David Anglin
212b7e9cf3 re PR target/79027 (fold-const.c:11104:1: internal compiler error: Floating point exception)
PR target/79027
	* config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
	modes with zero size.  Enhance comment.

From-SVN: r247869
2017-05-10 22:54:07 +00:00
Nathan Sidwell
3aa0a770a4 class.c (handle_using_decl): Always use OVL_CURRENT.
* class.c (handle_using_decl): Always use OVL_CURRENT.
	(resolve_address_of_overloaded_function): Move iterator decl into
	for scope.  Don't strip anticipated decls here.

From-SVN: r247864
2017-05-10 20:53:32 +00:00
Nathan Sidwell
3dd836179a pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD printing.
* pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD
	printing.
	(print_candidates): Adjust.

From-SVN: r247863
2017-05-10 20:47:16 +00:00
Nathan Sidwell
268de039e3 cp-tree.h (build_new_function_call): Lose koenig_p arg.
* cp-tree.h (build_new_function_call): Lose koenig_p arg.  Fix
	line breaking.
	* call.c (build_new_function_call): Lose koenig_p arg.  Remove
	koenig_p handling here.
	* pt.c (push_template_decl_real): Unconditionally
	retrofit_lang_decl.
	(tsubst_omp_clauses): Likewise.
	(do_class_deduction): Adjust buld_new_function_call calls.
	* semantics.c (finish_call_expr): Likewise.

From-SVN: r247860
2017-05-10 20:43:09 +00:00
François Dumont
87c7063d68 Bump version namespace.
2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

	Bump version namespace.
	* config/abi/pre/gnu-versioned-namespace.ver: Bump version namespace
	from __7 to __8. Bump GLIBCXX_7.0 to GLIBCXX_8.0.
	* acinclude.m4 (libtool_VERSION): Bump to 8:0:0.
	* include/bits/c++config: Adapt.
	* include/bits/regex.h: Adapt.
	* include/experimental/bits/fs_fwd.h: Adapt.
	* include/experimental/bits/lfts_config.h: Adapt.
	* include/std/variant: Adapt.
	* python/libstdcxx/v6/printers.py: Adapt.
	* testsuite/libstdc++-prettyprinters/48362.cc: Adapt.
	* include/bits/stl_tree.h (_Rb_tree_impl<>): Remove _Is_pod_comparator
	template parameter when version namespace is active.

From-SVN: r247858
2017-05-10 20:40:28 +00:00
Jason Merrill
dd54ca5649 Have other unify failure functions call unify_invalid.
* pt.c (unify_parameter_deduction_failure, unify_cv_qual_mismatch)
	(unify_type_mismatch, unify_parameter_pack_mismatch)
	(unify_ptrmem_cst_mismatch, unify_expression_unequal)
	(unify_parameter_pack_inconsistent, unify_inconsistency)
	(unify_vla_arg, unify_method_type_error, unify_arity)
	(unify_arg_conversion, unify_no_common_base)
	(unify_inconsistent_template_template_parameters)
	(unify_template_deduction_failure)
	(unify_template_argument_mismatch)
	(unify_overload_resolution_failure): Call unify_invalid.

From-SVN: r247857
2017-05-10 16:20:18 -04:00
Jason Merrill
00e08b0f48 CWG 1847 - Clarifying compatibility during partial ordering
* pt.c (more_specialized_fn): No order between two non-deducible
	parameters.

From-SVN: r247856
2017-05-10 16:07:22 -04:00
François Dumont
e5795ce493 stl_algobase.h (std::__iter_swap<false>): Remove _GLIBCXX_MOVE usage.
2017-05-10  François Dumont  <fdumont@gcc.gnu.org>

	* include/bits/stl_algobase.h (std::__iter_swap<false>): Remove
	_GLIBCXX_MOVE usage.

From-SVN: r247855
2017-05-10 20:05:26 +00:00
Bill Schmidt
d45d628294 rs6000.c (altivec_init_builtins): Define POWER8 built-ins for vec_xl and vec_xst with short and char pointer...
[gcc]

2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
	built-ins for vec_xl and vec_xst with short and char pointer
	arguments.

[gcc/testsuite]

2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/p8-vec-xl-xst.c: New file.

From-SVN: r247854
2017-05-10 19:40:17 +00:00
Uros Bizjak
f4ee3a9e2a * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
(_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
	(_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
	(_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
	(_mm_maskz_min_round_ss): New intrinsics.
	* config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
	(V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
	* config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
	(__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
	(__builtin_ia32_minss_mask_round): New builtins.
	* config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
	(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
	* config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
	Rename to ...
	(<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
	(v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
	Change to ...
	(v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
	... this.

	* config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
	(_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
	(_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
	(_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
	(_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
	(_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
	(_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
	* config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
	(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
	* config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
	(__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
	(__builtin_ia32_mulss_mask_round): New builtins.
	* config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
	(V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
	* config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
	Rename to ...
	(<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
	(v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
	Change to ...
	(v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
	... this.

	* config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
	(_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
	(_mm256_setr_m128i): New intrinsics.

	* config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
	(_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
	(_mm_maskz_rcp14_ss): New intrinsics.
	* config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
	(__builtin_ia32_rcp14ss_mask): New builtins.
	* config/i386/sse.md (srcp14<mode>_mask): New pattern.

testsuite/ChangeLog:

	* gcc.target/i386/avx512f-vmaxsd-1.c (_mm_mask_max_round_sd)
	(_mm_maskz_max_round_sd): Test new intrinsics.
	* gcc.target/i386/avx512f-vmaxsd-2.c: New.
	* gcc.target/i386/avx512f-vmaxss-1.c (_mm_mask_max_round_ss)
	(_mm_maskz_max_round_ss): Test new intrinsics.
	* gcc.target/i386/avx512f-vmaxss-2.c: New.
	* gcc.target/i386/avx512f-vminsd-1.c (_mm_mask_min_round_sd)
	(_mm_maskz_min_round_sd): Test new intrinsics.
	* gcc.target/i386/avx512f-vminsd-2.c: New.
	* gcc.target/i386/avx512f-vminss-1.c (_mm_mask_min_round_ss)
	(_mm_maskz_min_round_ss): Test new intrinsics.
	* gcc.target/i386/avx512f-vminss-2.c: New.
	* gcc.target/i386/avx-1.c (__builtin_ia32_maxsd_mask_round)
	(__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
	(__builtin_ia32_minss_mask_round): Test new builtins.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/sse-14.c (_mm_maskz_max_round_sd)
	(_mm_maskz_max_round_ss, _mm_maskz_min_round_sd)
	(_mm_maskz_min_round_ss, _mm_mask_max_round_sd)
	(_mm_mask_max_round_ss, _mm_mask_min_round_sd)
	(_mm_mask_min_round_ss): Test new intrinsics.
	* gcc.target/i386/testround-1.c: Ditto.

	* gcc.target/i386/avx512f-vdivsd-1.c (_mm_mask_div_sd)
	(_mm_maskz_div_sd, _mm_mask_div_round_sd)
	(_mm_maskz_div_round_sd): Test new intrinsics.
	* gcc.target/i386/avx512f-vdivsd-2.c: New.
	* gcc.target/i386/avx512f-vdivss-1.c (_mm_mask_div_ss)
	(_mm_maskz_div_ss, _mm_mask_div_round_ss)
	(_mm_maskz_div_round_ss): Test new intrinsics.
	* gcc.target/i386/avx512f-vdivss-2.c: New.
	* gcc.target/i386/avx512f-vmulsd-1.c (_mm_mask_mul_sd)
	(_mm_maskz_mul_sd, _mm_mask_mul_round_sd)
	(_mm_maskz_mul_round_sd): Test new intrinsics.
	* gcc.target/i386/avx512f-vmulsd-2.c: New.
	* gcc.target/i386/avx512f-vmulss-1.c (_mm_mask_mul_ss)
	(_mm_maskz_mul_ss, _mm_mask_mul_round_ss)
	(_mm_maskz_mul_round_ss): Test new intrinsics.
	* gcc.target/i386/avx512f-vmulss-2.c: New.
	* gcc.target/i386/avx-1.c (__builtin_ia32_divsd_mask_round)
	(__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
	(__builtin_ia32_mulss_mask_round): Test new builtins.
	* gcc.target/i386/sse-13.c: Ditto.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/sse-14.c (_mm_maskz_div_round_sd)
	(_mm_maskz_div_round_ss, _mm_maskz_mul_round_sd)
	(_mm_maskz_mul_round_ss): Test new intrinsics.
	* gcc.target/i386/testround-1.c: Ditto.

	* gcc.target/i386/avx-vinsertf128-256-1: Test new intrinsics.
	* gcc.target/i386/avx-vinsertf128-256-2: Ditto.
	* gcc.target/i386/avx-vinsertf128-256-3: Ditto.

	* gcc.target/i386/avx512f-vrcp14sd-1.c: Test new intrinsics.
	* gcc.target/i386/avx512f-vrcp14sd-2.c: Ditto.
	* gcc.target/i386/avx512f-vrcp14ss-1.c: Ditto.
	* gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.

From-SVN: r247851
2017-05-10 20:04:44 +02:00