Commit Graph

138282 Commits

Author SHA1 Message Date
Kyrylo Tkachov
7bd1191163 [AArch64][obvious] In aarch64_class_max_nregs use UNITS_PER_VREG and UNITS_PER_WORD
* config/aarch64/aarch64.c (aarch64_class_max_nregs):
	Use UNITS_PER_VREG and UNITS_PER_WORD instead of their direct
	values.

From-SVN: r223439
2015-05-20 11:41:45 +00:00
Robert Suchanek
ba57dd12d0 Add missing declaration.
gcc/
	* config/mips/mips.h (micromips_globals): Declare.

From-SVN: r223438
2015-05-20 10:35:21 +00:00
Marek Polacek
21b634ae9b c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
* c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
	* c-common.c: Likewise.

	* c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
	* c-typeck.c: Likewise.

From-SVN: r223437
2015-05-20 10:10:07 +00:00
David Malcolm
42242005dc Introduce TV_INITIALIZE_RTL
gcc/ChangeLog:
	* timevar.def (TV_INITIALIZE_RTL): New.
	* toplev.c (initialize_rtl): Use an auto_timevar to account this
	function's time to TV_INITIALIZE_RTL.

From-SVN: r223436
2015-05-20 09:23:36 +00:00
David Malcolm
c819ed29b3 libcpp: Eliminate most of the non-const/reference-returning inline fns
gcc/java/ChangeLog:
	* jcf-parse.c (set_source_filename): Replace write through
	ORDINARY_MAP_FILE_NAME with direct access to "to_file".

libcpp/ChangeLog:
	* include/line-map.h (MAP_START_LOCATION): Eliminate the non-const
	variant, and tweak comment for the const variant.
	(ORDINARY_MAP_STARTING_LINE_NUMBER): Drop the non-const variant.
	(ORDINARY_MAP_INCLUDER_FILE_INDEX): Likewise.
	(ORDINARY_MAP_IN_SYSTEM_HEADER_P): Likewise.
	(SET_ORDINARY_MAP_NUMBER_OF_COLUMN_BITS): Delete.
	(ORDINARY_MAP_FILE_NAME): Drop the non-const variant.
	(MACRO_MAP_MACRO): Likewise.
	(MACRO_MAP_NUM_MACRO_TOKENS): Likewise.
	(MACRO_MAP_LOCATIONS): Likewise.
	(MACRO_MAP_EXPANSION_POINT_LOCATION): Likewise.
	* line-map.c (linemap_add): Replace writes through macros with
	direct field accesses.
	(linemap_enter_macro): Likewise.
	(linemap_line_start): Likewise.

From-SVN: r223435
2015-05-20 09:13:19 +00:00
Ilya Enkovich
0ff4ddeb59 tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless gimple_build_nop calls.
* tree-chkp.c (chkp_maybe_copy_and_register_bounds): Remove useless
	gimple_build_nop calls.
	(chkp_find_bounds_for_elem): Likewise.
	(chkp_get_zero_bounds): Likewise.
	(chkp_get_none_bounds): Likewise.
	(chkp_get_bounds_by_definition): Likewise.
	(chkp_generate_extern_var_bounds): Likewise.
	(chkp_get_bounds_for_decl_addr): Likewise.
	(chkp_get_bounds_for_string_cst): Likewise.

From-SVN: r223434
2015-05-20 08:23:00 +00:00
Bin Cheng
a7e43c57fc re PR tree-optimization/65447 (AArch64: iv-opt causes bad addressing)
PR tree-optimization/65447
	* tree-ssa-loop-ivopts.c (struct iv_use): New fields.
	(dump_use, dump_uses): Support to dump sub use.
	(record_use): New parameters to support sub use.  Remove call to
	dump_use.
	(record_sub_use, record_group_use): New functions.
	(compute_max_addr_offset, split_all_small_groups): New functions.
	(group_address_uses, rewrite_use_address): New functions.
	(strip_offset): New declaration.
	(find_interesting_uses_address): Call record_group_use.
	(add_candidate): New assertion.
	(infinite_cost_p): Move definition forward.
	(add_costs): Check INFTY cost and return immediately.
	(get_computation_cost_at): Clear setup cost and dependent bitmap
	for sub uses.
	(determine_use_iv_cost_address): Compute cost for sub uses.
	(rewrite_use_address_1): Rename from old rewrite_use_address.
	(free_loop_data): Free sub uses.
	(tree_ssa_iv_optimize_loop): Call group_address_uses.

	gcc/testsuite
	PR tree-optimization/65447
	* gcc.dg/tree-ssa/pr65447.c: New test.

From-SVN: r223433
2015-05-20 05:15:56 +00:00
Kugan Vivekanandarajah
b6875aac2b aarch-common-protos.h (struct mem_cost_table): Added new fields loadv and storev.
gcc/ChangeLog:

2015-05-20  Kugan Vivekanandarajah  <kuganv@linaro.org>
	    Jim Wilson  <jim.wilson@linaro.org>

	* config/arm/aarch-common-protos.h (struct mem_cost_table): Added
	new  fields loadv and storev.
	* config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
	Initialize loadv and storev.
	* config/arm/aarch-cost-tables.h (generic_extra_costs): Likewise.
	(cortexa53_extra_costs): Likewise.
	(cortexa57_extra_costs): Likewise.
	(xgene1_extra_costs): Likewise.
	* config/aarch64/aarch64.c (aarch64_rtx_costs): Update vector
	rtx_costs.

2015-05-20  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* config/arm/arm.c (cortexa9_extra_costs): Initialize loadv and
	 storev.
	(cortexa8_extra_costs): Likewise.
	(cortexa5_extra_costs): Likewise.
	(cortexa7_extra_costs): Likewise.
	(cortexa12_extra_costs): Likewise.
	(cortexa15_extra_costs): Likewise.
	(v7m_extra_costs): Likewise.


Co-Authored-By: Jim Wilson <jim.wilson@linaro.org>

From-SVN: r223432
2015-05-20 03:05:10 +00:00
Jeff Law
c725e7f87b tree-ssa-threadupdate.c (thread_single_edge): Use delete_jump_thread instead of open-coded version.
* tree-ssa-threadupdate.c (thread_single_edge): Use delete_jump_thread
        instead of open-coded version.  Also delete the jump thread created
        within this function.

From-SVN: r223431
2015-05-19 20:21:29 -06:00
Nathan Sidwell
09b59d4de6 re PR c++/65954 (gcc segfaults on the following input with a syntax error)
cp/
	PR c++/65954
	* typeck.c (finish_class_member_access_expr): Diagnose failed
	lookup of enum class member.

	testsuite/
	* g++.dg/cpp0x/pr65954.C: New.

From-SVN: r223430
2015-05-20 01:54:09 +00:00
Alan Modra
261640d521 rs6000.c (rs6000_emit_allocate_stack): Return stack adjusting insn.
* config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Return
	stack adjusting insn.  Formatting.
	(rs6000_emit_prologue): Track stack adjusting insn, and use of
	r12.  If possible, emit first -fsplit-stack arg pointer insn
	before stack adjust.  Don't use r12 to save cr if split-stack.

From-SVN: r223427
2015-05-20 11:00:48 +09:30
Alan Modra
0f0fd74525 rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK): Define.
gcc/
	* common/config/rs6000/rs6000-common.c (TARGET_SUPPORTS_SPLIT_STACK):
	Define.
	(rs6000_supports_split_stack): New function.
	* gcc/config/rs6000/rs6000.c (machine_function): Add
	split_stack_arg_pointer.
	(TARGET_EXTRA_LIVE_ON_ENTRY, TARGET_INTERNAL_ARG_POINTER): Define.
	(setup_incoming_varargs): Use crtl->args.internal_arg_pointer
	rather than virtual_incoming_args_rtx.
	(rs6000_va_start): Likewise.
	(split_stack_arg_pointer_used_p): New function.
	(rs6000_emit_prologue): Set up arg pointer for -fsplit-stack.
	(morestack_ref): New var.
	(gen_add3_const, rs6000_expand_split_stack_prologue,
	rs6000_internal_arg_pointer, rs6000_live_on_entry,
	rs6000_split_stack_space_check): New functions.
	(rs6000_elf_file_end): Call file_end_indicate_split_stack.
	* gcc/config/rs6000/rs6000.md (UNSPEC_STACK_CHECK): Define.
	(UNSPECV_SPLIT_STACK_RETURN): Define.
	(split_stack_prologue, load_split_stack_limit,
	load_split_stack_limit_di, load_split_stack_limit_si,
	split_stack_return, split_stack_space_check): New expands and insns.
	* gcc/config/rs6000/rs6000-protos.h
	(rs6000_expand_split_stack_prologue): Declare.
	(rs6000_split_stack_space_check): Declare.
libgcc/
	* config/rs6000/morestack.S: New.
	* config/rs6000/t-stack-rs6000: New.
	* config.host (powerpc*-*-linux*): Add t-stack and t-stack-rs6000
	to tmake_file.
	* generic-morestack.c: Don't build for powerpc 32-bit.

From-SVN: r223426
2015-05-20 10:56:28 +09:30
Alan Modra
8a03f86937 rs6000.c (struct rs6000_stack): Correct comments.
* config/rs6000/rs6000.c (struct rs6000_stack): Correct comments.
	(rs6000_stack_info): Don't zero offsets when not saving registers.
	(debug_stack_info): Adjust to omit printing unused offsets,
	as before.
	(direct_return): Test vrsave_size rather than vrsave_mask.
	(rs6000_emit_prologue): Likewise.  Remove redundant altivec tests.
	(rs6000_emit_epilogue): Likewise.

From-SVN: r223425
2015-05-20 10:47:45 +09:30
Alan Modra
8b07bbe71b rs6000.c (rs6000_stack_info): Don't zero offsets when not saving registers.
* config/rs6000/rs6000.c (rs6000_stack_info): Don't zero offsets
	when not saving registers.
	(debug_stack_info): Adjust to omit printing unused offsets,
	as before.
	(rs6000_emit_epilogue): Adjust use_backchain_to_restore_sp
	expression.

From-SVN: r223424
2015-05-20 10:45:59 +09:30
Trevor Saunders
ca5db45b8a fixup hash table descriptor in winnt.c
gcc/ChangeLog:

2015-05-19  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR c++/65835
	* config/i386/winnt.c (struct wrapped_symbol_hasher): Change
	value_type to const char *.

From-SVN: r223423
2015-05-20 01:03:51 +00:00
GCC Administrator
42f47c6a51 Daily bump.
From-SVN: r223422
2015-05-20 00:16:17 +00:00
Sandra Loosemore
b9b1573b98 config.gcc [...]: Allow --enable-targets=all to build a biarch toolchain again.
2015-05-19  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config.gcc [powerpc*-*-linux*]: Allow --enable-targets=all
	to build a biarch toolchain again.

From-SVN: r223418
2015-05-19 20:02:13 -04:00
Oleg Endo
7b8311b591 pr64366.c: Remove -m4 -ml from dg-options.
gcc/testsuite/
	* gcc.target/sh/pr64366.c: Remove -m4 -ml from dg-options.

From-SVN: r223417
2015-05-19 22:30:19 +00:00
Jonathan Wakely
8e72571637 stl_list.h (_M_resize_pos(size_type&)): Declare.
* include/bits/stl_list.h (_M_resize_pos(size_type&)): Declare.
	(operator==(const list&, const list&)): If size() is O(1) compare
	sizes before comparing each element.
	* include/bits/list.tcc (list::_M_resize_pos(size_type&)): Define.
	(list::resize): Use _M_resize_pos.

From-SVN: r223416
2015-05-19 23:24:50 +01:00
Jan Hubicka
4d6eb35a6d ipa-devirt.c (type_in_anonymous_namespace_p): Return true or implicit declarations.
* ipa-devirt.c (type_in_anonymous_namespace_p): Return true
	or implicit declarations.
	(odr_type_p): Check that TYPE_NAME is TYPE_DECL before looking
	into it.
	(get_odr_type): Check type has linkage before adding bases.
	(register_odr_type): Check that type has linkage before adding it.
	(type_known_to_have_no_deriavations_p): Rename to ..
	(type_known_to_have_no_derivations_p): This one.
	* ipa-utils.h (type_known_to_have_no_deriavations_p): Rename to ..
	(type_known_to_have_no_derivations_p): This one.
	* ipa-polymorphic-call.c
	(ipa_polymorphic_call_context::restrict_to_inner_type): Check that
	type has linkage.

From-SVN: r223415
2015-05-19 21:02:06 +00:00
Marek Polacek
296a8c2f54 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
From-SVN: r223414
2015-05-19 20:08:21 +00:00
François Dumont
90f0d17641 66055.cc: Add constructor invocations.
2015-05-19  François Dumont  <fdumont@gcc.gnu.org>

	* testsuite/23_containers/unordered_map/cons/66055.cc: Add constructor
	invocations.
	* testsuite/23_containers/unordered_multimap/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_multiset/cons/66055.cc: Likewise.
	* testsuite/23_containers/unordered_set/cons/66055.cc: Likewise.

From-SVN: r223413
2015-05-19 19:57:09 +00:00
Eric Botcazou
515ae71b1c Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
* Makefile.in (LIBUNWIND): Move dependency for shared libgcc.
	Remove useless endif/ifneq ($(enable_shared),yes) pair.

From-SVN: r223412
2015-05-19 19:02:55 +00:00
Eric Botcazou
f819300fa7 stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P.
* stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P.
	(layout_type): Use RECORD_OR_UNION_TYPE_P.

From-SVN: r223407
2015-05-19 18:06:46 +00:00
Andreas Krebbel
cb4c41dd4d S/390 Invalid vector binary ops
This is a first try to implement at least some of the requirements
regarding the vector bool type documented for IBM XLC.

With this patch error messages will be issued for invalid uses of
vector bool types in binary operators.

vector bool types are being marked opaque in order to prevent the
front-end from complaining about "vector bool long" vs "vector bool
long long" combinations on 64 bit.  The opaque flag basically
suppresses any type checking. However, we still want vector bool to be
accepted only in contexts specified in the documentation (to be
published soon).  Implementing the invalid binary op hook does this
for binary operators at least.  But this is far from being complete :(

gcc/
	* config/s390/s390.c (s390_vector_bool_type_p): New function.
	(s390_invalid_binary_op): New function.
	(TARGET_INVALID_BINARY_OP): Define macro.

From-SVN: r223404
2015-05-19 17:41:21 +00:00
Andreas Krebbel
17521813e1 S/390 vector types are only 8 byte aligned.
gcc/testsuite/
	* lib/target-supports.exp: Vector do not always have natural
          alignment on s390*.

From-SVN: r223403
2015-05-19 17:39:42 +00:00
David Sherwood
315a349c27 loop-invariant.c (create_new_invariant): Don't calculate address cost if mode is not a scalar integer.
2015-05-19  David Sherwood  <david.sherwood@arm.com>

	* loop-invariant.c (create_new_invariant): Don't calculate address cost
	if mode is not a scalar integer.
	(get_inv_cost): Increase computational cost for unused invariants.

	* gcc.dg/loop-invariant.c: New testcase.

From-SVN: r223402
2015-05-19 11:37:45 -06:00
Andreas Krebbel
0aaaa54a73 These testcases require disabling hardware vector support on S/390.
gcc/testsuite/
	* gcc.dg/tree-ssa/gen-vect-11b.c: Disable vector
	  instructions on s390*.
	  * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise.

From-SVN: r223400
2015-05-19 17:36:19 +00:00
Andreas Krebbel
2f8fda1221 S/390 Add zvector testcases.
gcc/testsuite/
	* gcc.target/s390/zvector/vec-dbl-math-compile-1.c: New test.
	* gcc.target/s390/zvector/vec-genbytemask-1.c: New test.
	* gcc.target/s390/zvector/vec-genmask-1.c: New test.
	* gcc.target/s390/zvector/vec-lcbb-1.c: New test.
	* gcc.target/s390/zvector/vec-overloading-1.c: New test.
	* gcc.target/s390/zvector/vec-overloading-2.c: New test.
	* gcc.target/s390/zvector/vec-overloading-3.c: New test.
	* gcc.target/s390/zvector/vec-overloading-4.c: New test.
	* gcc.target/s390/zvector/vec-test-mask-1.c: New test.
	* gcc.target/s390/zvector/vec-elem-1.c: New test.

From-SVN: r223399
2015-05-19 17:35:08 +00:00
Andreas Krebbel
3af82a61fa S/390 zvector builtin support.
With this patch GCC implements an Altivec style set of builtins to
make use of vector instructions in C/C++ code.  This is provided for
compatibility with the IBM XL compiler.

gcc/
	* config.gcc: Add vecintrin.h to extra_headers.  Add s390-c.o to
	c_target_objs and cxx_target_objs.  Add t-s390 to tmake_file.
	* config/s390/s390-builtin-types.def: New file.
	* config/s390/s390-builtins.def: New file.
	* config/s390/s390-builtins.h: New file.
	* config/s390/s390-c.c: New file.
	* config/s390/s390-modes.def: Add modes CCVEQANY, CCVH,
	CCVHANY, CCVHU, CCVHUANY, CCVFHANY, CCVFHEANY.
	* config/s390/s390-protos.h (s390_expand_vec_compare_cc)
	(s390_cpu_cpp_builtins, s390_register_target_pragmas): Add
	prototypes.
	* config/s390/s390.c (s390-builtins.h, s390-builtins.def):
	Include.
	(flags_builtin, flags_overloaded_builtin_var, s390_builtin_types)
	(s390_builtin_fn_types, s390_builtin_decls, code_for_builtin): New
	variable definitions.
	(s390_const_operand_ok): New function.
	(s390_expand_builtin): Rewrite.
	(s390_init_builtins): New function.
	(s390_handle_vectorbool_attribute): New function.
	(s390_attribute_table): Add s390_vector_bool attribute.
	(s390_match_ccmode_set): Handle new cc modes CCVH, CCVHU.
	(s390_branch_condition_mask): Generate masks for new modes.
	(s390_expand_vec_compare_cc): New function.
	(s390_mangle_type): Add mangling for vector bool types.
	(enum s390_builtin): Remove.
	(s390_atomic_assign_expand_fenv): Rename constants for sfpc and
	efpc builtins.
	* config/s390/s390.h (TARGET_CPU_CPP_BUILTINS): Call
	s390_cpu_cpp_builtins.
	(REGISTER_TARGET_PRAGMAS): New macro.
	* config/s390/s390.md: Define more UNSPEC_VEC_* constants.
	(insn_cmp mode attribute): Add new CC modes.
	(s390_sfpc, s390_efpc): Rename patterns to sfpc and efpc.
	(lcbb): New pattern definition.
	* config/s390/s390intrin.h: Include vecintrin.h.
	* config/s390/t-s390: New file.
	* config/s390/vecintrin.h: New file.
	* config/s390/vector.md: Include vx-builtins.md.
	* config/s390/vx-builtins.md: New file.S/390 zvector builtin support.

From-SVN: r223398
2015-05-19 17:32:07 +00:00
Andreas Krebbel
6e5b5de88b S/390 Add vector scalar instruction support.
With this patch GCC makes use of the vector instruction which are
available in single element mode.  By using these instructions scalar
double operations can use 32 registers.

gcc/
	* config/s390/s390-modes.def: Add new modes CCVEQ, CCVFH, and
	CCVFHE.
	* config/s390/s390.c (s390_match_ccmode_set): Handle new modes.
	(s390_select_ccmode): Likewise.
	(s390_canonicalize_comparison): Swap operands if necessary.
	(s390_expand_vec_compare_scalar): Expand DFmode compare using
	single element vector instructions.
	(s390_emit_compare): Call s390_expand_vec_compare_scalar.
	(s390_branch_condition_mask): Generate CC masks for the new modes.
	* config/s390/s390.md (v0, vf, vd): New mode attributes.
	(VFCMP, asm_fcmp, insn_cmp): New mode iterator and attributes.
	(*vec_cmp<insn_cmp>df_cconly, *fixuns_truncdfdi2_z13)
	(*fix_trunc<BFP:mode><GPR:mode>2_bfp, *floatunsdidf2_z13)
	(*floatuns<GPR:mode><FP:mode>2, *extendsfdf2_z13)
	(*extend<DSF:mode><BFP:mode>2): New insn definition.
	(fix_trunc<BFP:mode><GPR:mode>2_bfp, loatuns<GPR:mode><FP:mode>2)
	(extend<DSF:mode><BFP:mode>2): Turn into expander.
	(floatdi<mode>2, truncdfsf2, add<mode>3, sub<mode>3, mul<mode>3)
	(div<mode>3, *neg<mode>2, *abs<mode>2, *negabs<mode>2)
	(sqrt<mode>2): Add vector instruction.

gcc/testsuite/
	* gcc.target/s390/vector/vec-scalar-cmp-1.c: New test.

From-SVN: r223397
2015-05-19 17:30:25 +00:00
Andreas Krebbel
91b019a388 S/390: Vector base support - testcases
gcc/testsuite/
	* gcc.target/s390/s390.exp
	(check_effective_target_vector): New check.
	* gcc.target/s390/vector/vec-abi-1.c: New test.
	* gcc.target/s390/vector/vec-abi-2.c: New test.
	* gcc.target/s390/vector/vec-abi-3.c: New test.
	* gcc.target/s390/vector/vec-abi-4.c: New test.
	* gcc.target/s390/vector/vec-abi-align-1.c: New test.
	* gcc.target/s390/vector/vec-abi-single-1.c: New test.
	* gcc.target/s390/vector/vec-abi-single-2.c: New test.
	* gcc.target/s390/vector/vec-abi-struct-1.c: New test.
	* gcc.target/s390/vector/vec-abi-vararg-1.c: New test.
	* gcc.target/s390/vector/vec-abi-vararg-2.c: New test.
	* gcc.target/s390/vector/vec-clobber-1.c: New test.
	* gcc.target/s390/vector/vec-cmp-1.c: New test.
	* gcc.target/s390/vector/vec-cmp-2.c: New test.
	* gcc.target/s390/vector/vec-dbl-math-compile-1.c: New test.
	* gcc.target/s390/vector/vec-genbytemask-1.c: New test.
	* gcc.target/s390/vector/vec-genbytemask-2.c: New test.
	* gcc.target/s390/vector/vec-genmask-1.c: New test.
	* gcc.target/s390/vector/vec-genmask-2.c: New test.
	* gcc.target/s390/vector/vec-init-1.c: New test.
	* gcc.target/s390/vector/vec-int-math-compile-1.c: New test.
	* gcc.target/s390/vector/vec-shift-1.c: New test.
	* gcc.target/s390/vector/vec-sub-1.c: New test.

From-SVN: r223396
2015-05-19 17:28:42 +00:00
Andreas Krebbel
085261c804 S/390 Vector base support.
gcc/
	* config/s390/constraints.md (j00, jm1, jxx, jyy, v): New
	constraints.
	* config/s390/predicates.md (const0_operand, constm1_operand)
	(constable_operand): Accept vector operands.
	* config/s390/s390-modes.def: Add supported vector modes.
	* config/s390/s390-protos.h (s390_cannot_change_mode_class)
	(s390_function_arg_vector, s390_contiguous_bitmask_vector_p)
	(s390_bytemask_vector_p, s390_expand_vec_strlen)
	(s390_expand_vec_compare, s390_expand_vcond)
	(s390_expand_vec_init): Add prototypes.
	* config/s390/s390.c (VEC_ARG_NUM_REG): New macro.
	(s390_vector_mode_supported_p): New function.
	(s390_contiguous_bitmask_p): Mask out the irrelevant bits.
	(s390_contiguous_bitmask_vector_p): New function.
	(s390_bytemask_vector_p): New function.
	(s390_split_ok_p): Vector regs don't work either.
	(regclass_map): Add VEC_REGS.
	(s390_legitimate_constant_p): Handle vector constants.
	(s390_cannot_force_const_mem): Handle CONST_VECTOR.
	(legitimate_reload_vector_constant_p): New function.
	(s390_preferred_reload_class): Handle CONST_VECTOR.
	(s390_reload_symref_address):  Likewise.
	(s390_secondary_reload): Vector memory instructions only support
	short displacements.  Rename reload*_nonoffmem* to reload*_la*.
	(s390_emit_ccraw_jump): New function.
	(s390_expand_vec_strlen): New function.
	(s390_expand_vec_compare): New function.
	(s390_expand_vcond): New function.
	(s390_expand_vec_init): New function.
	(s390_dwarf_frame_reg_mode): New function.
	(print_operand): Handle addresses with 'O' and 'R' constraints.
	(NR_C_MODES, constant_modes): Add vector modes.
	(s390_output_pool_entry): Handle vector constants.
	(s390_hard_regno_mode_ok): Handle vector registers.
	(s390_class_max_nregs): Likewise.
	(s390_cannot_change_mode_class): New function.
	(s390_invalid_arg_for_unprototyped_fn): New function.
	(s390_function_arg_vector): New function.
	(s390_function_arg_float): Remove size variable.
	(s390_pass_by_reference): Handle vector arguments.
	(s390_function_arg_advance): Likewise.
	(s390_function_arg): Likewise.
	(s390_return_in_memory): Vector values are returned in a VR if
	possible.
	(s390_function_and_libcall_value): Handle vector arguments.
	(s390_gimplify_va_arg): Likewise.
	(s390_call_saved_register_used): Consider the arguments named.
	(s390_conditional_register_usage): Disable v16-v31 for non-vec
	targets.
	(s390_preferred_simd_mode): New function.
	(s390_support_vector_misalignment): New function.
	(s390_vector_alignment): New function.
	(TARGET_STRICT_ARGUMENT_NAMING, TARGET_DWARF_FRAME_REG_MODE)
	(TARGET_VECTOR_MODE_SUPPORTED_P)
	(TARGET_INVALID_ARG_FOR_UNPROTOTYPED_FN)
	(TARGET_VECTORIZE_PREFERRED_SIMD_MODE)
	(TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT)
	(TARGET_VECTOR_ALIGNMENT): Define target macro.
	* config/s390/s390.h (FUNCTION_ARG_PADDING): Define macro.
	(FIRST_PSEUDO_REGISTER): Increase value.
	(VECTOR_NOFP_REGNO_P, VECTOR_REGNO_P, VECTOR_NOFP_REG_P)
	(VECTOR_REG_P): Define macros.
	(FIXED_REGISTERS, CALL_USED_REGISTERS)
	(CALL_REALLY_USED_REGISTERS, REG_ALLOC_ORDER)
	(HARD_REGNO_CALL_PART_CLOBBERED, REG_CLASS_NAMES)
	(FUNCTION_ARG_REGNO_P, FUNCTION_VALUE_REGNO_P, REGISTER_NAMES):
	Add vector registers.
	(CANNOT_CHANGE_MODE_CLASS): Call C function.
	(enum reg_class): Add VEC_REGS, ADDR_VEC_REGS, GENERAL_VEC_REGS.
	(SECONDARY_MEMORY_NEEDED): Allow SF<->SI mode moves without
	memory.
	(DBX_REGISTER_NUMBER, FIRST_VEC_ARG_REGNO, LAST_VEC_ARG_REGNO)
	(SHORT_DISP_IN_RANGE, VECTOR_STORE_FLAG_VALUE): Define macro.
	* config/s390/s390.md (UNSPEC_VEC_*): New constants.
	(VR*_REGNUM): New constants.
	(ALL): New mode iterator.
	(INTALL): Remove mode iterator.
	Include vector.md.
	(movti): Implement TImode moves for VRs.
	Disable TImode splitter for VR targets.
	Implement splitting TImode GPR<->VR moves.
	(reload*_tomem_z10, reload*_toreg_z10): Replace INTALL with ALL.
	(reload<mode>_nonoffmem_in, reload<mode>_nonoffmem_out): Rename to
	reload<mode>_la_in, reload<mode>_la_out.
	(*movdi_64, *movsi_zarch, *movhi, *movqi, *mov<mode>_64dfp)
	(*mov<mode>_64, *mov<mode>_31): Add vector instructions.
	(TD/TF mode splitter): Enable for GPRs only (formerly !FP).
	(mov<mode> SF SD): Prefer lder, lde for loading.
	Add lrl and strl instructions.
	Add vector instructions.
	(strlen<mode>): Rename old strlen<mode> to strlen_srst<mode>.
	Call s390_expand_vec_strlen on z13.
	(*cc_to_int): Change predicate to nonimmediate_operand.
	(addti3): Rename to *addti3.  New expander.
	(subti3): Rename to *subti3.  New expander.
	* config/s390/vector.md: New file.

From-SVN: r223395
2015-05-19 17:26:35 +00:00
Andreas Krebbel
55ac540cd6 S/390 Add -march/-mtune=z13 option.
gcc/
	* common/config/s390/s390-common.c (processor_flags_table): Add
	z13.
	* config.gcc: Add z13.
	* config/s390/s390-opts.h (enum processor_type): Add
	PROCESSOR_2964_Z13.
	* config/s390/s390.c (s390_adjust_priority): Check for
	PROCESSOR_2964_Z13.
	(s390_reorg): Likewise.
	(s390_sched_reorder): Likewise.
	(s390_sched_variable_issue): Likewise.
	(s390_loop_unroll_adjust): Likewise.
	(s390_option_override): Likewise. Default to -mvx when available.
	* config/s390/s390.h (enum processor_flags): Add PF_Z13 and PF_VX.
	(TARGET_CPU_Z13, TARGET_CPU_VX, TARGET_Z13, TARGET_VX)
	(TARGET_VX_ABI): Define macros.
	macros.
	(TARGET_DEFAULT): Add MASK_OPT_VX.
	* config/s390/s390.md ("cpu" attribute): Add z13.
	("cpu_facility" attribute): Add vec.
	* config/s390/s390.opt (processor_type): Add z13.
	(mvx): New options.
	* doc/invoke.texi: Add z13 option for -march.

From-SVN: r223393
2015-05-19 17:24:24 +00:00
Andreas Krebbel
9e8ea2fc16 S/390: Make shift_count_or_setmem_operand predicate to check for mode.
gcc/
	* config/s390/predicates.md (shift_count_or_setmem_operand):
        Add mode check to make sure that only scalar integer values
        are accepted.

From-SVN: r223392
2015-05-19 17:21:56 +00:00
Jan Hubicka
872d5034ba tree.c (verify_type_variant): Fix #undef.
* tree.c (verify_type_variant): Fix #undef.
	(gimple_canonical_types_compatible_p): Move here from lto.c
	(verify_type): Verify TYPE_CANONICAL compatibility.
	* tree.h (gimple_canonical_types_compatible_p): Declare.

	* lto.c (gimple_canonical_types_compatible_p): Move to tree.c

From-SVN: r223391
2015-05-19 17:17:21 +00:00
Jakub Jelinek
41b37d5ec1 re PR middle-end/66199 (lastprivate/linear clause issues on combined constructs)
PR middle-end/66199
	* tree.h (OMP_TEAMS_COMBINED): Define.
	* gimplify.c (enum gimplify_omp_var_data): Add
	GOVD_LINEAR_LASTPRIVATE_NO_OUTER.
	(enum omp_region_type): Add ORT_COMBINED_TEAMS.
	(omp_notice_variable): Accept both ORT_TEAMS
	and ORT_COMBINED_TEAMS.  Don't recurse if
	GOVD_LINEAR_LASTPRIVATE_NO_OUTER is set and either
	GOVD_LINEAR is set, or GOVD_LASTPRIVATE without
	GOVD_FIRSTPRIVATE.
	(omp_no_lastprivate): New function.
	(gimplify_scan_omp_clauses): For OMP_CLAUSE_LASTPRIVATE
	and OMP_CLAUSE_LINEAR, if omp_no_lastprivate, don't
	notice_outer and set appropriate bits, otherwise make
	sure default(none) combined constructs won't complain.
	(gimplify_adjust_omp_clauses): Remove OMP_CLAUSE_LINEAR
	outer special casing, for OMP_CLAUSE_LASTPRIVATE if
	omp_no_lastprivate either remove the clause or turn it
	into OMP_CLAUSE_PRIVATE.
	(gimplify_omp_for): Fix up handling of implicit
	lastprivate or linear iterators.
	(gimplify_omp_workshare): For OMP_TEAMS_COMBINED use
	ORT_COMBINED_TEAMS.
	* omp-low.c (lower_omp_for_lastprivate): For combined
	for simd use fd.loop.n2 from the for rather than simd.
gcc/c/
	* c-parser.c (c_parser_omp_for_loop): Don't add
	OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
	OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
	(c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
	constructs.
gcc/cp/
	* parser.c (cp_parser_omp_for_loop): Don't add
	OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
	OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
	(cp_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
	constructs.
gcc/fortran/
	* trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
	combined constructs.
	(gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
	BIND_EXPR_BLOCK.
libgomp/
	* testsuite/libgomp.c/pr66199-1.c: New test.
	* testsuite/libgomp.c/pr66199-2.c: New test.
	* testsuite/libgomp.c++/pr66199-1.C: New test.
	* testsuite/libgomp.c++/pr66199-2.C: New test.
	* testsuite/libgomp.fortran/pr66199-1.f90: New test.
	* testsuite/libgomp.fortran/pr66199-2.f90: New test.

From-SVN: r223387
2015-05-19 18:16:15 +02:00
Christophe Lyon
94c8e7abf6 vqshrun_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223386
2015-05-19 17:56:35 +02:00
Christophe Lyon
83846a5923 vqshrn_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223385
2015-05-19 17:55:19 +02:00
Christophe Lyon
72cdfda4fa vqshlu_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223384
2015-05-19 17:53:46 +02:00
Richard Sandiford
e5561c83d6 cris.c (cris_expand_prologue): Use gen_raw_REG instead of gen_rtx_raw_REG.
gcc/
	* config/cris/cris.c (cris_expand_prologue): Use gen_raw_REG
	instead of gen_rtx_raw_REG.
	(cris_expand_epilogue): Likewise.
	* config/microblaze/microblaze.c (microblaze_classify_address):
	Likewise.
	* config/sparc/sparc.md: Likewise.

From-SVN: r223383
2015-05-19 15:52:28 +00:00
Christophe Lyon
1b2cb3e725 vqshl_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223382
2015-05-19 17:52:01 +02:00
Christophe Lyon
09f8fc7fd0 vqshl.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223381
2015-05-19 17:50:39 +02:00
Christophe Lyon
fd2069df51 vqrshrun_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223380
2015-05-19 17:49:29 +02:00
Christophe Lyon
059a79e76a vqrshrn_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223379
2015-05-19 17:48:15 +02:00
Christophe Lyon
cace06d145 vqrshl.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223377
2015-05-19 17:46:48 +02:00
Christophe Lyon
396fa23a27 vqrdmulh_n.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223376
2015-05-19 17:45:15 +02:00
Christophe Lyon
4f24fac171 vqrdmulh_lane.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223375
2015-05-19 17:43:58 +02:00
Christophe Lyon
bb16a1349e vqrdmulh.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223374
2015-05-19 17:42:33 +02:00
Christophe Lyon
bdf3a527c6 vqmovun.c: New file.
2015-05-19  Christophe Lyon  <christophe.lyon@linaro.org>

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

From-SVN: r223373
2015-05-19 17:40:35 +02:00