Commit Graph

155048 Commits

Author SHA1 Message Date
Richard Biener
d629ab4496 re PR tree-optimization/81303 (410.bwaves regression caused by r249919)
2017-07-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81303
	* tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
	in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
	(vect_peeling_hash_get_lowest_cost): Adjust.
	(vect_enhance_data_refs_alignment): Likewise.  Use
	vect_get_peeling_costs_all_drs to compute the penalty for no
	peeling to match up costs.

From-SVN: r250424
2017-07-21 11:32:39 +00:00
Richard Biener
9af7f3731b re PR tree-optimization/81500 (ICE with -O3 in process_use, at tree-vect-stmts.c:506)
2017-06-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81500
	* tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
	we didn't identify a reduction path.

	* gcc.dg/torture/pr81500.c: New testcase.

From-SVN: r250423
2017-07-21 11:32:01 +00:00
Tom de Vries
8c38aed722 Add missing edge probabilities in nvptx_goacc_reduction_init
2017-07-21  Tom de Vries  <tom@codesourcery.com>
	    Cesar Philippidis  <cesar@codesourcery.com>

	PR gcov-profile/81442
	* config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
	probabilities.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r250422
2017-07-21 09:46:22 +00:00
Tom de Vries
967a353a72 Add nvptx_override_options_after_change
2017-07-21  Tom de Vries  <tom@codesourcery.com>

	PR lto/81430
	* config/nvptx/nvptx.c (nvptx_override_options_after_change): New
	function.
	(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
	nvptx_override_options_after_change.

From-SVN: r250421
2017-07-21 09:46:05 +00:00
Ulrich Drepper
4bb3f8b53f dwarf2out.c (output_file_names): Avoid double testing for dwarf_version >= 5.
gcc/
	* dwarf2out.c (output_file_names): Avoid double testing for
	dwarf_version >= 5.

From-SVN: r250420
2017-07-21 08:57:04 +00:00
Georg-Johann Lay
74360f142c invoke.texi (AVR Built-in Functions): Re-layout section.
gcc/
	* doc/invoke.texi (AVR Built-in Functions): Re-layout section.

From-SVN: r250419
2017-07-21 08:20:51 +00:00
Jan Hubicka
ba61fc5308 cfgcleanup.c (flow_find_cross_jump): Do not crossjump across hot/cold regions.
* cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
	hot/cold regions.
	(try_crossjump_to_edge): Do not punt on partitioned functions.

From-SVN: r250418
2017-07-21 07:17:57 +00:00
Jan Hubicka
d9af4feaf0 bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges): Put all BBs reachable only via paths crossing cold region to cold region.
* bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
	Put all BBs reachable only via paths crossing cold region to cold
	region.
	* cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.

From-SVN: r250417
2017-07-21 07:17:22 +00:00
Richard Biener
1dae21ad97 re PR tree-optimization/81303 (410.bwaves regression caused by r249919)
2016-07-21  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/81303
	* tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
	into account prologue and epilogue iterations when raising
	min_profitable_iters to sth at least covering one vector iteration.

From-SVN: r250416
2017-07-21 07:13:57 +00:00
Tamar Christina
ac48cd5e89 arm.c (arm_test_cpu_arch_dat): Check for overlap.
2017-07-21  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/arm.c (arm_test_cpu_arch_dat):
	Check for overlap.

From-SVN: r250415
2017-07-21 06:46:05 +00:00
Nathan Sidwell
5aaa8fb406 Remove TYPE_METHODS.
gcc/
	Remove TYPE_METHODS.
	* tree.h (TYPE_METHODS): Delete.
	* dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
	* dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
	(dbxout_type_methods): Scan TYPE_FIELDS.
	(dbxout_type): Don't check TYPE_METHODS here.
	* function.c (use_register_for_decl): Always ignore register for
	class types when not optimizing.
	* ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
	* tree.c (free_lang_data_in_type): Stitch out member functions and
	templates from TYPE_FIELDS.
	(build_distinct_type_copy, verify_type_variant,
	verify_type): Member fns are on TYPE_FIELDS.
	* tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
	* tree-pretty-print.c (dump_generic_node): Likewise.

	gcc/cp/
	Remove TYPE_METHODS.
	* class.c (maybe_warn_about_overly_private_class,
	finish_struct_methods, one_inheriting_sig, count_fields,
	add_fields_to_record_type, check_field_decls, check_methods,
	clone_function_decl, set_method_tm_attributes,
	finalize_literal_type_property, check_bases_and_members,
	create_vtable_ptr, determine_key_method,
	unreverse_member_declarations, finish_struct,
	add_vcall_offset_vtbl_entries_1): Member fns are on TYPE_FIELDS.
	* decl.c (fixup_anonymous_aggr): Likewise.
	* decl2.c (reset_type_linkage_2): Likewise.
	* method.c (after_nsdmi_defaulted_late_checks,
	lazily_declare_fn): Likewise.
	* optimize.c (maybe_thunk_body, maybe_clone_body): Likewise.
	* pt.c (instantiate_class_template_1, tsubst_expr,
	do_type_instantiation, instantiate_pending_templates): Likewise.
	* search.c (lookup_field_1): Likewise.
	* semantics.c (finish_member_declaration,
	finish_omp_declare_simd_methods): Likewise.

	gcc/c-family/
	Remove TYPE_METHODS.
	* c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
	dump_ada_template, print_ada_methods,
	print_ada_declaration): Member fns are on TYPE_FIELDS.

	gcc/objc/
	Remove TYPE_METHODS.
	* objc-runtime-shared-support.c (build_ivar_list_initializer):
	Don't presume first item is a FIELD_DECL.

	gcc/testsuite/
	* g++.dg/ext/anon-struct6.C: Adjust diag.
	* g++.old-deja/g++.other/anon4.C: Adjust diag.

	libcc1/
	Remove TYPE_METHODS.
	* libcp1plugin.cc (plugin_build_decl): Member fns are on TYPE_FIELDS.

From-SVN: r250413
2017-07-21 00:27:51 +00:00
GCC Administrator
61612fa5da Daily bump.
From-SVN: r250412
2017-07-21 00:16:34 +00:00
Ian Lance Taylor
033e96a263 compiler: add explicit convert in Type_guard_expression::do_get_backend
The current recipe in Type_guard_expression for creating a Bexpression
    performs a type conversion at the Type level, but doesn't invoke
    Backend::convert_expression to capture the conversion for the back
    end. Add code to create a BE type conversion operation.
    
    Reviewed-on: https://go-review.googlesource.com/50373

From-SVN: r250400
2017-07-20 19:53:54 +00:00
Jakub Jelinek
2953b72fdd re PR target/80846 (auto-vectorized AVX2 horizontal sum should narrow to 128b right away, to be more efficient for Ryzen and Intel)
PR target/80846
	* config/i386/i386.c (ix86_expand_vector_init_general): Handle
	V2TImode and V4TImode.
	(ix86_expand_vector_extract): Likewise.
	* config/i386/sse.md (VMOVE): Enable V4TImode even for just
	TARGET_AVX512F, instead of only for TARGET_AVX512BW.
	(ssescalarmode): Handle V4TImode and V2TImode.
	(VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
	(*vec_extractv2ti, *vec_extractv4ti): New insns.
	(VEXTRACTI128_MODE): New mode iterator.
	(splitter for *vec_extractv?ti first element): New.
	(VEC_INIT_MODE): New mode iterator.
	(vec_init<mode>): Consolidate 3 expanders into one using
	VEC_INIT_MODE mode iterator.

	* gcc.target/i386/avx-pr80846.c: New test.
	* gcc.target/i386/avx2-pr80846.c: New test.
	* gcc.target/i386/avx512f-pr80846.c: New test.

From-SVN: r250397
2017-07-20 18:36:18 +02:00
Alexander Monakov
f0a404561c lra-assigns.c: fix pseudo_compare_func
* lra-assigns.c (pseudo_compare_func): Fix comparison step based on
	non_spilled_static_chain_regno_p.

From-SVN: r250395
2017-07-20 18:15:55 +03:00
Alexander Monakov
109cca3b53 gimple-ssa-store-merging.c: fix sort_by_bitpos
* gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.

From-SVN: r250394
2017-07-20 18:13:56 +03:00
Jan Hubicka
584bafb66d bb-reorder.c (connect_traces): Allow copying of blocks within single partition.
* bb-reorder.c (connect_traces): Allow copying of blocks within
	single partition.

From-SVN: r250390
2017-07-20 14:27:41 +00:00
Eric Botcazou
0574d9aeac Minor tweaks
From-SVN: r250386
2017-07-20 12:54:42 +00:00
Richard Biener
3fa4fad497 gimple.h (gimple_phi_result): Add gphi * overload.
2017-07-20  Richard Biener  <rguenther@suse.de>

	* gimple.h (gimple_phi_result): Add gphi * overload.
	(gimple_phi_result_ptr): Likewise.
	(gimple_phi_arg): Likewise.  Adjust index assert to only
	allow actual argument accesses rather than all slots available
	by capacity.
	(gimple_phi_arg_def): Add gphi * overload.
	* tree-phinodes.c (make_phi_node): Initialize only actual
	arguments.
	(resize_phi_node): Clear memory not covered by old node,
	do not initialize excess argument slots.
	(reserve_phi_args_for_new_edge): Initialize new argument slot
	completely.

From-SVN: r250385
2017-07-20 12:37:14 +00:00
Bin Cheng
73c4b4df26 re PR tree-optimization/81388 (Incorrect code generation with -O1)
PR tree-optimization/81388
	Revert r238585:
	2016-07-21  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
	by removing computation of may_be_zero.

	gcc/testsuite
	PR tree-optimization/81388
	* gcc.dg/tree-ssa/pr81388-1.c: New test.
	* gcc.dg/tree-ssa/pr81388-2.c: New test.

From-SVN: r250384
2017-07-20 12:02:19 +00:00
Jan Hubicka
77e5edafaf re PR middle-end/81030 (ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed)
PR middle-end/81030
	* cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
	when gimple level profile disagrees with what RTL expander did.
	* gcc.dg/pr81030.c: New test.

From-SVN: r250383
2017-07-20 11:27:31 +00:00
Richard Biener
891ad31c7b re PR tree-optimization/61171 (vectorization fails for a reduction in presence of subtraction)
2017-07-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/61171
	* tree-vectorizer.h (slp_instance): Add reduc_phis member.
	(vect_analyze_stmt): Add slp instance parameter.
	(vectorizable_reduction): Likewise.
	* tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
	(vect_is_simple_reduction): Deal with chains not detected
	as SLP reduction chain, specifically not properly associated
	chains containing a mix of plus/minus.
	(get_reduction_op): Remove.
	(get_initial_defs_for_reduction): Simplify, pass in whether
	this is a reduction chain, pass in the SLP node for the PHIs.
	(vect_create_epilog_for_reduction): Get the SLP instance as
	arg and adjust.
	(vectorizable_reduction): Get the SLP instance as arg.
	During analysis remember the SLP node with the PHIs in the
	instance.  Simplify getting at the vectorized reduction PHIs.
	* tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
	through SLP instance.
	(vect_slp_analyze_operations): Likewise.
	* tree-vect-stms.c (vect_analyze_stmt): Likewise.
	(vect_transform_stmt): Likewise.

	* g++.dg/vect/pr61171.cc: New testcase.
	* gfortran.dg/vect/pr61171.f: Likewise.
	* gcc.dg/vect/vect-reduc-11.c: Likewise.

From-SVN: r250382
2017-07-20 11:17:21 +00:00
Richard Biener
f971b2813d slp-43.c: Increase loop count to enable vectorization with V64QImode.
2017-07-20  Richard Biener  <rguenther@suse.de>

	* gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization
	with V64QImode.
	* gcc.dg/vect/slp-45.c: Likewise.

From-SVN: r250380
2017-07-20 10:03:34 +00:00
Tom de Vries
c9930ecd9c Fix phi arg location in find_implicit_erroneous_behavior
2017-07-20  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/81489
	* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
	read of phi arg location to before loop that modifies phi.

From-SVN: r250378
2017-07-20 07:16:01 +00:00
Naveen H.S
2071f8f980 match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0): New pattern.
gcc
	* match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
	New pattern.

gcc/testsuite
	* gcc.dg/tree-ssa/vrp116.c: New Test.

From-SVN: r250377
2017-07-20 03:57:48 +00:00
GCC Administrator
b882559a11 Daily bump.
From-SVN: r250376
2017-07-20 00:16:24 +00:00
Jan Hubicka
205b602693 re PR regression/81331 (missed Eh delivery in partitioned function)
PR middle-end/81331
	* except.c (execute): Fix ordering issue.

From-SVN: r250370
2017-07-19 21:06:55 +00:00
Gerald Pfeifer
a8d6055a56 * math/powq.c (powq): Use uint32_t instead of u_int32_t.
From-SVN: r250367
2017-07-19 19:53:58 +00:00
Jonathan Wakely
304a15ec64 PR libstdc++/81476 Optimise vector insertion from input iterators
PR libstdc++/81476
	* include/bits/vector.tcc (vector::_M_range_insert<_InputIterator>):
	Only insert elements one-by-one when inserting at the end.
	* testsuite/performance/23_containers/insert/81476.cc: New.

From-SVN: r250366
2017-07-19 20:32:15 +01:00
Segher Boessenkool
6cdcce60ff combine: Fix for PR81423
We here have an AND of a SUBREG of an LSHIFTRT.  If that SUBREG is
paradoxical, the extraction we form is the length of the size of the
inner mode, which includes some bits that should not be in the result.
Just give up in that case.


	PR rtl-optimization/81423
	* combine.c (make_compound_operation_int): Don't try to optimize
	the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.

From-SVN: r250365
2017-07-19 21:31:26 +02:00
Michael Meissner
a6722e5bf2 cpu-builtin-1.c: Change test to use #ifdef __BUILTIN_CPU_SUPPORTS to see if...
2017-07-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/cpu-builtin-1.c: Change test to use #ifdef
	__BUILTIN_CPU_SUPPORTS to see if the GLIBC is new enough that
	__builtin_cpu_is and __builtin_cpu_supports are supported.

From-SVN: r250364
2017-07-19 19:29:16 +00:00
Segher Boessenkool
3d50b6045a simplify-rtx: The truncation of an IOR can have all bits set (PR81423)
... if it is an IOR with a constant with all bits set in the mode
that is truncated to, for example.  Handle that case.


	PR rtl-optimization/81423
	* simplify-rtx.c (simplify_truncation): Handle truncating an IOR
	with a constant that is -1 in the truncated to mode.

From-SVN: r250363
2017-07-19 21:28:41 +02:00
Steven Munroe
ccfa843f67 Fix up plafform testes in check headers.
Fix up plafform testes in check headers. After a resent GCC change
the previously submitted BMI/BMI2 intrinsic test started to fail
with a warning/error.

[gcc/testsuite]

2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

	* gcc.target/powerpc/bmi-check.h (main): Skip unless
	__BUILTIN_CPU_SUPPORTS__ defined.
	* gcc.target/powerpc/bmi2-check.h (main): Skip unless
	__BUILTIN_CPU_SUPPORTS__ defined.

From-SVN: r250362
2017-07-19 19:04:50 +00:00
Jan Hubicka
8b5d71cd61 predict.c (propagate_unlikely_bbs_forward): Break out from ...
* predict.c (propagate_unlikely_bbs_forward): Break out from ...
	(determine_unlikely_bbs): ... here.
	* predict.h (propagate_unlikely_bbs_forward): Declare.
	* cfgexpand.c (pass_expand::execute): Use it.
	* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
	unlikely edges.
	(find_rarely_executed_basic_blocks_and_crossing_edges): Use
	propagate_unlikely_bbs_forward.

From-SVN: r250360
2017-07-19 18:09:39 +00:00
Jan Hubicka
95a60a5c8c predict.c (propagate_unlikely_bbs_forward): Break out from ...
* predict.c (propagate_unlikely_bbs_forward): Break out from ...
	(determine_unlikely_bbs): ... here.
	* predict.h (propagate_unlikely_bbs_forward): Declare.
	* cfgexpand.c (pass_expand::execute): Use it.
	* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
	unlikely edges.
	(find_rarely_executed_basic_blocks_and_crossing_edges): Use
	propagate_unlikely_bbs_forward.

From-SVN: r250359
2017-07-19 18:08:53 +00:00
Jan Hubicka
3fa410c082 re PR regression/81331 (missed Eh delivery in partitioned function)
PR middle-end/81331
	* except.c (maybe_add_nop_after_section_switch): New function.
	(execute): Use it.

From-SVN: r250358
2017-07-19 18:08:07 +00:00
Volker Reichelt
57c51668ee new (bad_array_new_length): Remove redundant semicolon after in-class member function definition.
* libsupc++/new (bad_array_new_length): Remove redundant
        semicolon after in-class member function definition.
        * include/bits/locale_facets.h (ctype_byname, num_put): Likewise.
        * include/bits/locale_facets_nonio.h (time_put_byname): Likewise.
        * include/bits/random.h (mersenne_twister_engine): Likewise.
        * include/tr1/random.h (mersenne_twister): Likewise
        * include/ext/random (simd_fast_mersenne_twister_engine): Likewise.
        * include/ext/rope (char_producer, _Rope_char_consumer,
        _Rope_self_destruct_ptr, _Rope_const_iterator, _Rope_iterator):
        Likewise.
        * include/ext/ropeimpl.h (_Rope_flatten_char_consumer,
        _Rope_insert_char_consumer): Likewise.

From-SVN: r250357
2017-07-19 16:59:00 +00:00
Jakub Jelinek
77011afe7f ada-tree.h (TYPE_OBJECT_RECORD_TYPE, [...]): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
	TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
	(TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.

From-SVN: r250355
2017-07-19 17:55:47 +02:00
John Marino
de7422048e Fix Unwind support on DragonFly BSD after sigtramp move
2017-07-19  John Marino  <gnugcc@marino.st>

	* config/i386/dragonfly-unwind.h: Handle sigtramp relocation.

From-SVN: r250354
2017-07-19 16:55:11 +01:00
Jonathan Wakely
e020783cd6 Fix indentation in std::basic_filebuf member functions
* include/bits/fstream.tcc (basic_filebuf::xsgetn)
	(basic_filebuf::xsputn, basic_filebuf::seekoff): Fix indentation.

From-SVN: r250353
2017-07-19 16:46:04 +01:00
Tom de Vries
8f860bca00 Fix assert in gimple_phi_set_arg
2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* gimple.h (gimple_phi_set_arg): Make assert more strict.

From-SVN: r250352
2017-07-19 15:33:50 +00:00
Tom de Vries
a6e07e27e7 Fix assert in gimple_phi_arg
2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* gimple.h (gimple_phi_arg): Make assert more strict.

From-SVN: r250351
2017-07-19 15:33:40 +00:00
Steven Munroe
a85492f3cd Now adding the mmintrin.h intrinsic headers. The DG tests will follow.
2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

	* config.gcc (powerpc*-*-*): Add mmintrin.h.
	* config/rs6000/mmintrin.h: New file.
	* config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.

From-SVN: r250350
2017-07-19 15:24:42 +00:00
Jonathan Wakely
4e66b02bc1 Fix indentation in libstdc++ testsuite utils
* testsuite/util/testsuite_iterators.h: Fix indentation.

From-SVN: r250349
2017-07-19 15:49:00 +01:00
Nathan Sidwell
4a18c06666 class.c (add_implicitly_declared_members): Use classtype_has_move_assign_or_move_ctor_p.
* class.c (add_implicitly_declared_members): Use
	classtype_has_move_assign_or_move_ctor_p.
	(classtype_has_move_assign_or_move_ctor,
	classtype_has_user_move_assign_or_move_ctor_p): Merge into ...
	(classtype_has_move_assign_or_move_ctor_p): ... this new function.
	* cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p):
	Replace with ...
	(classtype_has_move_assign_or_move_ctor_p): ... this.
	* method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust.
	* tree.c (type_has_nontrivial_copy_init): Adjust.

From-SVN: r250344
2017-07-19 13:28:21 +00:00
Jakub Jelinek
1eba086706 re PR libquadmath/65757 (gfortran gives incorrect result for anint with real*16 argument)
PR libquadmath/65757
	* quadmath-imp.h (math_opt_barrier, math_force_eval,
	math_narrow_eval, math_check_force_underflow,
	math_check_force_underflow_nonneg): Define.
	* math/ceilq.c: Backport changes from upstream glibc
	between 2012-11-01 and 2017-07-13.
	* math/remquoq.c: Likewise.
	* math/expq.c: Likewise.
	* math/llroundq.c: Likewise.
	* math/logq.c: Likewise.
	* math/atanq.c: Likewise.
	* math/nearbyintq.c: Likewise.
	* math/scalblnq.c: Likewise.
	* math/finiteq.c: Likewise.
	* math/atanhq.c: Likewise.
	* math/expm1q.c: Likewise.
	* math/sinhq.c: Likewise.
	* math/log10q.c: Likewise.
	* math/rintq.c: Likewise.
	* math/roundq.c: Likewise.
	* math/fmaq.c: Likewise.
	* math/erfq.c: Likewise.
	* math/log2q.c: Likewise.
	* math/lroundq.c: Likewise.
	* math/j1q.c: Likewise.
	* math/scalbnq.c: Likewise.
	* math/truncq.c: Likewise.
	* math/frexpq.c: Likewise.
	* math/sincosq.c: Likewise.
	* math/tanhq.c: Likewise.
	* math/asinq.c: Likewise.
	* math/coshq.c: Likewise.
	* math/j0q.c: Likewise.
	* math/asinhq.c: Likewise.
	* math/floorq.c: Likewise.
	* math/sinq_kernel.c: Likewise.
	* math/powq.c: Likewise.
	* math/hypotq.c: Likewise.
	* math/sincos_table.c: Likewise.
	* math/rem_pio2q.c: Likewise.
	* math/nextafterq.c: Likewise.
	* math/log1pq.c: Likewise.
	* math/sincosq_kernel.c: Likewise.
	* math/tanq.c: Likewise.
	* math/acosq.c: Likewise.
	* math/lrintq.c: Likewise.
	* math/llrintq.c: Likewise.

From-SVN: r250343
2017-07-19 15:12:58 +02:00
Jakub Jelinek
564e405c13 re PR tree-optimization/81346 (Missed constant propagation into comparison)
PR tree-optimization/81346
	* match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.

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

From-SVN: r250342
2017-07-19 15:10:05 +02:00
Tom de Vries
3717fbe35e Add v2di support for nvptx
2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* config/nvptx/nvptx-modes.def: Add V2DImode.
	* config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
	* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
	(nvptx_output_mov_insn): Handle lack of mov.b128.
	(nvptx_print_operand): Handle 'H' and 'L' codes.
	(nvptx_vector_mode_supported): Allow V2DImode.
	(nvptx_preferred_simd_mode): New function.
	(nvptx_data_alignment): New function.
	(TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
	nvptx_preferred_simd_mode.
	* config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
	64 to 128 bits.
	(DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.

	* config/nvptx/nvptx.md (VECIM): Add V2DI.

	* gcc.target/nvptx/decl-init.c: Update alignment.
	* gcc.target/nvptx/slp-2-run.c: New test.
	* gcc.target/nvptx/slp-2.c: New test.
	* gcc.target/nvptx/v2di.c: New test.

	* testsuite/libgomp.oacc-c/vec.c: New test.

From-SVN: r250341
2017-07-19 13:05:35 +00:00
Tom de Vries
b98b34b708 Add v2si support for nvptx
2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
	* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
	(nvptx_vector_mode_supported): New function.  Allow V2SImode.
	(TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
	* config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
	(mov<VECIM>_insn): New define_insn.
	(define_expand "mov<VECIM>): New define_expand.

	* gcc.target/nvptx/slp-run.c: New test.
	* gcc.target/nvptx/slp.c: New test.
	* gcc.target/nvptx/v2si-cvt.c: New test.
	* gcc.target/nvptx/v2si-run.c: New test.
	* gcc.target/nvptx/v2si.c: New test.
	* gcc.target/nvptx/vec.inc: New test.

From-SVN: r250340
2017-07-19 13:05:21 +00:00
Tom de Vries
1310ff035d Add generic v2 vector mode support for nvptx
2017-07-19  Tom de Vries  <tom@codesourcery.com>

	* config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.

From-SVN: r250339
2017-07-19 13:05:09 +00:00