Commit Graph

143513 Commits

Author SHA1 Message Date
Jakub Jelinek
5a32af0ec5 fold-const.c (fold_convertible_p): Don't return true for conversion of VECTOR_TYPE to same sized integral type.
* fold-const.c (fold_convertible_p): Don't return true
	for conversion of VECTOR_TYPE to same sized integral type.
	(fold_convert_loc): Fix up formatting.  Fold conversion of
	VECTOR_TYPE to same sized integral type using VIEW_CONVERT_EXPR
	instead of NOP_EXPR.

From-SVN: r232236
2016-01-11 18:57:43 +01:00
Jakub Jelinek
1ebd5558eb re PR tree-optimization/69214 (ICE (segfault) at -Os on x86_64-linux-gnu in "fail_abnormal_edge_coalesce")
PR tree-optimization/69214
	* tree-vrp.c (simplify_cond_using_ranges): Don't propagate
	innerop into a comparison if SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
	Formatting fix.

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

From-SVN: r232235
2016-01-11 18:56:39 +01:00
Ian Lance Taylor
de41ebf5dd re PR go/68980 (ps -o cmd in gotest isn't portable)
PR 68980
    libgo/testsuite: portable ps usage in gotest
    
    gotest is using "ps" to list descendant sleep
    processes in its timeout handling, grepping
    the command name.
    
    We are currently using the "cmd" ps output
    formatter, which is non-portable. We should
    use "comm" which is part of the POSIX
    standard, and outputs only the command name
    and not the arguments.
    
    Fixes https://gcc.gnu.org/PR68980
    
    Reviewed-on: https://go-review.googlesource.com/18426

From-SVN: r232234
2016-01-11 17:55:39 +00:00
Jakub Jelinek
7c285ab9ae re PR tree-optimization/69207 (gcc.target/aarch64/vldN_1.c ICEs at -O3)
PR tree-optimization/69207
	* tree-vect-slp.c (vect_get_constant_vectors): For
	VECTOR_BOOLEAN_TYPE_P, assert op has integral type instead of
	fold_convertible_p to vector_type's element type, and always
	use VCE for non-VECTOR_BOOLEAN_TYPE_P.

From-SVN: r232233
2016-01-11 18:55:38 +01:00
Jonathan Wakely
1517bc3008 allocator_traits<allocator<T>> partial specialization
PR libstdc++/60976
	* include/bits/alloc_traits.h (allocator_traits<allocator<_Tp>>):
	Define partial specialization.
	* testsuite/20_util/shared_ptr/cons/58659.cc: Add construct and
	destroy members to std::allocator explicit specialization.

From-SVN: r232232
2016-01-11 16:47:58 +00:00
Uros Bizjak
8c18c836db pr66232-10.c: Do not compile on ia32 target.
* gcc.target/i386/pr66232-10.c: Do not compile on ia32 target.
	* gcc.target/i386/pr66232-11.c: Ditto.
	* gcc.target/i386/pr66232-12.c: Ditto.
	* gcc.target/i386/pr66232-13.c: Ditto.

From-SVN: r232231
2016-01-11 17:31:55 +01:00
Richard Biener
62446e6e25 re PR tree-optimization/69173 (ICE (segfault) in vinfo_for_stmt)
2016-01-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69173
	* tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Only
	fixup the cycle if all stmts are in a pattern.

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

From-SVN: r232230
2016-01-11 16:02:23 +00:00
Uros Bizjak
3a28db463b re PR middle-end/68999 (FAIL: gfortran.fortran-torture/execute/save_1.f90 execution)
PR middle-end/68999
	* alias.c (base_alias_check): Move check for addresses with
	alignment ANDs before the call for compare_base_decls.
	(memrefs_conflict_p): Return -1 for different decls
	that went through alignment adjustments.

From-SVN: r232229
2016-01-11 16:48:40 +01:00
Kyrylo Tkachov
2b8568fe56 [AArch64] PR rtl-optimization/68796: Add patterns for QImode and HImode comparison with zero
PR rtl-optimization/68796
	* config/aarch64/aarch64.md (*and<mode>_compare0): New pattern.
	* config/aarch64/aarch64.c (aarch64_select_cc_mode): Handle HImode
	and QImode comparisons against zero with CC_NZmode.
	* config/aarch64/iterators.md (short_mask): New mode_attr.

	* gcc.target/aarch64/tst_5.c: New test.
	* gcc.target/aarch64/tst_6.c: Likewise.

From-SVN: r232228
2016-01-11 14:44:22 +00:00
Alexander Monakov
0d58938ed7 nvptx plugin: do not force JIT target SM version
When link_ptx runs, a CUDA device is already bound to current thread, so the
driver library knows the target architecture.  There isn't any benefit from
forcing a specific target here; on the contrary, hardcoding sm_30 breaks
offloading on later (Maxwell, sm_5x) devices.
    
	* plugin/plugin-nvptx.c (link_ptx): Do not set CU_JIT_TARGET.

From-SVN: r232227
2016-01-11 15:55:31 +03:00
H.J. Lu
b34b1c3436 Remove snprintf from <avx512>_(load|store)<mode>_mask
This patch removes snprintf from <avx512>_(load|store)<mode>_mask
patterns.

	* config/i386/sse.md (<avx512>_load<mode>_mask): Remove
	snprintf.
	(<avx512>_store<mode>_mask): Likewise.

From-SVN: r232225
2016-01-11 04:33:25 -08:00
Kyrylo Tkachov
5baf45323b [RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other
PR rtl-optimization/68841
        * ifcvt.c (struct noce_if_info): Add orig_x field.
        (bbs_ok_for_cmove_arith): Add to_rename parameter.
        Don't record conflicts on to_rename if it's present.
        Allow memory destinations in sets.
        (noce_try_cmove_arith): Call bbs_ok_for_cmove_arith even on simple
        blocks, passing orig_x to the checks.
        (noce_process_if_block): Set if_info->orig_x appropriately.

        * gcc.dg/pr68841.c: New test.
        * gcc.c-torture/execute/pr68841.c: New test.

From-SVN: r232223
2016-01-11 12:13:50 +00:00
Tom de Vries
1c5211b13c Add missing phi args in create_parallel_loop
2016-01-11  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69069
	* tree-parloops.c (create_parallel_loop): Add missing phi args.

From-SVN: r232221
2016-01-11 12:08:38 +00:00
Yuri Rumyantsev
ca90b1ed9a re PR rtl-optimization/68920 (Undesirable if-conversion for a rarely taken branch)
gcc/

2016-01-11  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR rtl-optimization/68920
	* config/i386/i386.c (ix86_option_override_internal): Restrict number
	of conditional moves for  RTL if-conversion to 1 for
	TARGET_ONE_IF_CONV_INSN.
	* config/i386/i386.h (TARGET_ONE_IF_CONV_INSN): New macros.
	* config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): New macros.
	* params.def (PARAM_MAX_RTL_IF_CONVERSION_INSNS) : Introduce new
	parameter to restirct number of conditional moves for
	RTL if-conversion.
	* doc/invoke.texi (max-rtl-if-conversion-insns): Document it.
	* ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Limit number of
	conditionl moves.

gcc/testsuite/

2016-01-11  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR rtl-optimization/68920
	* gcc.dg/ifcvt-4.c: Add "--param max-rtl-if-conversion-insns=3" option
	for ix86 targets.
	* gcc.dg/ifcvt-5.c: New test.

From-SVN: r232220
2016-01-11 12:07:31 +00:00
Alexandre Oliva
b4934671ae [PR69123] fix handling of MEMs in VTA to avoid dataflow oscillation
The problem arises because we used to drop overwritten MEMs from loc
lists of VALUEs, but not of other onepart variables, and it just so
happens that, by doing so, block 6 in the testcase has no D#5 in its
output in the first pass, because the MEM holding its (previous) value
was correctly dropped from value 88:88, but gains it in the second
pass because D#5 has the MEM location incoming directly in its loc
list, rather than indirectly in a VALUE.

This incorrect binding enables other blocks to believe they have a
tentative binding for D#5 in some cycles, but others, still operating
on the early conclusion, believe there isn't, and they oscillate from
that.

Since we check for escaping MEMs in clobbers, we won't lose anything
relevant by dropping call-clobbered or overwritten MEMs in all onepart
variables, and this ensures the loc intersection operation in onepart
vars won't let a MEM through that wasn't present in earlier
iterations.

for  gcc/ChangeLog

	PR bootstrap/69123
	* var-tracking.c (drop_overlapping_mem_locs): Operate on all
	onepart vars.  Fix typo in comment.  Fix reversed condition in
	unshare test.
	(dataflow_set_remove_mem_locs): Operate on all onepart vars.

for gcc/testsuite/ChangeLog

	PR bootstrap/69123
	* g++.dg/pr69123.C: New.

From-SVN: r232218
2016-01-11 10:40:33 +00:00
Alexandre Oliva
4708731cce [PR69123] make dataflow_set_different details more verbose
for  gcc/ChangeLog

	PR bootstrap/69123
	* var-tracking.c (dump_onepart_variable_differences): New.
	(dataflow_set_different): If a detailed dump is requested,
	delay early returns and dump differences between onepart
	variables present before and after, and added variables.

From-SVN: r232217
2016-01-11 10:40:12 +00:00
Ilya Enkovich
83834c0942 re PR target/69010 (Boolean vector constant with a scalar mode is expanded incorrectly)
gcc/

	PR target/69010
	* expr.c (expand_expr_real_1): For boolean vector constants
	with a scalar mode use const_scalar_mask_from_tree.
	(const_scalar_mask_from_tree): New.
	* optabs.c (expand_vec_cond_mask_expr): Use mask mode
	assigned to a mask type to handle constants.

gcc/testsuite/

	PR target/69010
	* gcc.target/i386/pr69010.c: New test.

From-SVN: r232216
2016-01-11 10:27:17 +00:00
Martin Jambor
dcf89d5780 [PR ipa/69044] Do not clone for param removal when not possible
2016-01-11  Martin Jambor  <mjambor@suse.cz>

	PR ipa/69044
	* ipa-cp.c (estimate_local_effects): Do not clone for removal of
	useless parameters if we cannot change function signature.

testsuite/
	* gcc.target/i386/chkp-pr69044.c: New test.

From-SVN: r232215
2016-01-11 11:09:17 +01:00
Martin Jambor
fa59e957b4 [PR ipa/66616] Copy can_change_signature flag to artificial thunks
2016-01-11  Martin Jambor  <mjambor@suse.cz>

	PR ipa/66616
	* cgraphclones.c (duplicate_thunk_for_node): Copy can_change_signature
	flag.

From-SVN: r232214
2016-01-11 11:03:44 +01:00
Tom de Vries
d95167eef4 Don't allow latch with phi in try_transform_to_exit_first_loop_alt
2016-01-11  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69109
	* tree-parloops.c (try_transform_to_exit_first_loop_alt): Don't allow
	latch with phi.

	* gcc.dg/autopar/pr69109-2.c: New test.
	* gcc.dg/autopar/pr69109.c: New test.

From-SVN: r232212
2016-01-11 09:38:28 +00:00
Tom de Vries
4f6403a8ce Handle case that outer phi res is not used in a phi in gather_scalar_reductions
2016-01-11  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69108
	* tree-parloops.c (gather_scalar_reductions): Handle case that outer phi
	res is not used in a phi.

	* gcc.dg/autopar/pr69108.c: New test.

From-SVN: r232211
2016-01-11 09:19:33 +00:00
Yury Gribov
4bfede854f Fix docs for -frandom-seed.
2016-01-11  Yury Gribov  <y.gribov@samsung.com>

	PR 67425
	* common.opt (frandom-seed): Fix parameter name.
	* doc/invoke.texi (frandom-seed): Ditto and describe parameter.

From-SVN: r232209
2016-01-11 09:06:14 +00:00
Tom de Vries
e9ff08b28d Don't parallelize loops if libgomp not supported
2016-01-11  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69058
	* tree-parloops.c (pass_parallelize_loops::execute): Return 0 if libgomp
	not supported.

From-SVN: r232208
2016-01-11 08:55:16 +00:00
Andrew Burgess
8064654176 arc.opt (mdiv-rem): Add period to the end.
2016-01-11  Andrew Burgess  <andrew.burgess@embecosm.com>

        * config/arc/arc.opt (mdiv-rem): Add period to the end.
        (mcode-density): Likewise.

From-SVN: r232207
2016-01-11 04:11:19 +00:00
GCC Administrator
fecad594f7 Daily bump.
From-SVN: r232206
2016-01-11 00:16:14 +00:00
Patrick Palka
21efdd809b Fix -Wmisleading indentation false-positive for do-while statement
gcc/c-family/ChangeLog:

	PR c++/69029
	* c-indentation.c (should_warn_for_misleading_indentation):
	Don't warn about do-while statements.

gcc/testsuite/ChangeLog:

	PR c++/69029
	* c-c++-common/Wisleading-indentation.c: Augment test.

From-SVN: r232202
2016-01-10 16:39:39 +00:00
Thomas Koenig
fd42eed899 re PR fortran/69154 (ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux)
2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69154
	* frontend-passes.c (in_where):  New variable.
	(inline_matmul_assign):  Don't try this if we are within
	a WHERE statement.
	(gfc_code_walker):  Keep track of in_where.

2016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/69154
	* gfortran.dg/inline_matmul_12.f90:  New test.

From-SVN: r232201
2016-01-10 13:18:54 +00:00
Paul Thomas
4f90ee6c77 re PR fortran/67779 (Strange ordering with strings in extended object)
2016-01-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67779
	* trans_array.c (gfc_conv_scalarized_array_ref): Add missing
	se->use_offset from condition for calculation of 'base'.

2016-01-10  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67779
	* gfortran.dg/actual_array_offset_1: New test.

From-SVN: r232200
2016-01-10 12:56:28 +00:00
Tom de Vries
3907c6cf93 Don't parallelize loops containing phis with addr_exprs
2016-01-10  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69062
	* tree-parloops.c (loop_has_phi_with_address_arg): New function.
	(parallelize_loops): Don't paralelize loop that has phi with address
	arg.

	* gcc.dg/autopar/pr69062.c: New test.

From-SVN: r232199
2016-01-10 12:44:57 +00:00
Thomas Schwinge
b07b236e84 Fix scan-tree-dump syntax
gcc/testsuite/
	* gcc.dg/vect/slp-perm-1.c: Fix scan-tree-dump syntax.
	* gcc.dg/vect/slp-perm-2.c: Likewise.
	* gcc.dg/vect/slp-perm-3.c: Likewise.
	* gcc.dg/vect/slp-perm-5.c: Likewise.
	* gcc.dg/vect/slp-perm-6.c: Likewise.
	* gcc.dg/vect/slp-perm-7.c: Likewise.
	* gcc.dg/vect/slp-perm-8.c: Likewise.

From-SVN: r232197
2016-01-10 13:12:38 +01:00
Tom de Vries
23fab8aee7 Only allow single exit phi for reduction in try_create_reduction_list
2016-01-10  Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/69039
	* tree-parloops.c (try_create_reduction_list): Only allow single exit
	phi for reduction.

	* gcc.dg/autopar/pr69039.c: New test.

From-SVN: r232196
2016-01-10 09:12:03 +00:00
GCC Administrator
34b85c6437 Daily bump.
From-SVN: r232194
2016-01-10 00:16:13 +00:00
John David Anglin
5dac7dbda2 re PR middle-end/68743 (FAIL: gfortran.dg/aint_anint_1.f90 -O0 execution test)
PR middle-end/68743
	* match.pd: Require target has function_c99_misc before doing
	truncl(extend(x)) and trunc(extend(x)) -> extend(truncf(x)), etc.

From-SVN: r232191
2016-01-09 18:13:44 +00:00
Gerald Pfeifer
72665d8d49 configure.ac (isl_options_set_schedule_serialize_sccs): Also use GMPINC.
* configure.ac (isl_options_set_schedule_serialize_sccs): Also
	use GMPINC.
	* configure: Regenerate.

From-SVN: r232190
2016-01-09 13:25:22 +00:00
Marek Polacek
73f0dae2a4 re PR c++/69113 (ICE: in vague_linkage_p, at cp/decl2.c:1875 with -fno-weak)
PR c++/69113
	* decl2.c (comdat_linkage): Only set DECL_COMDAT if TREE_PUBLIC is set.

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

From-SVN: r232189
2016-01-09 11:15:26 +00:00
Jakub Jelinek
20b8d7342c re PR middle-end/50865 (Invalid code generation for INT64_MIN % 1 on x86_64)
PR middle-end/50865
	PR tree-optimization/69097
	* fold-const.h (expr_not_equal_to): New prototype.
	* fold-const.c: Include stringpool.h and tree-ssanames.h.
	(expr_not_equal_to): New function.
	* match.pd (X % -Y is the same as X % Y): Don't optimize
	unless X is known not to be equal to minimum or Y is known
	not to be equal to -1.
	* tree-vrp.c (simplify_div_or_mod_using_ranges): Add GSI argument.
	fold TRUNC_MOD_EXPR if the second argument is not a power of two.
	(simplify_stmt_using_ranges): Adjust caller.
	(vrp_finalize): Call set_value_range on SSA_NAMEs before calling
	substitute_and_fold.

	* gcc.c-torture/execute/pr50865.c: New test.
	* gcc.c-torture/execute/pr69097-1.c: New test.
	* gcc.c-torture/execute/pr69097-2.c: New test.
	* gcc.dg/pr69097-1.c: New test.
	* gcc.dg/pr69097-2.c: New test.

From-SVN: r232188
2016-01-09 08:37:04 +01:00
Jakub Jelinek
c50e614be6 re PR tree-optimization/69164 (ICE in create_tmp_var, at gimple-expr.c:468)
PR c++/69164
	* class.c (layout_class_type): Use copy_node to copy FIELD_DECLs.

	* g++.dg/opt/pr69164.C: New test.

From-SVN: r232187
2016-01-09 08:34:41 +01:00
Jason Merrill
fe71aa4ea5 re PR c++/69158 (ICE in in cxx_eval_indirect_ref, at cp/constexpr.c:2598)
PR c++/69158

	* constexpr.c (cxx_fold_indirect_ref): Handle array type differing
	in completion.

From-SVN: r232186
2016-01-09 00:12:03 -05:00
GCC Administrator
1090913901 Daily bump.
From-SVN: r232184
2016-01-09 00:16:11 +00:00
Jan Hubicka
78fcec3fee ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL w/o DECL_NAME.
* ipa-icf.c (sem_item_optimizer::merge_classes): Do not ICE on VAR_DECL
	w/o DECL_NAME.

From-SVN: r232179
2016-01-08 21:19:04 +00:00
Jakub Jelinek
e0237993b6 re PR tree-optimization/69167 (internal compiler error: SSA corruption)
PR tree-optimization/69167
        * gimple-fold.c (replace_stmt_with_simplification): Also punt if
	new SSA_NAME_OCCURS_IN_ABNORMAL_PHI SSA_NAMEs appear in operands of
	ops[0] comparison.
	* gimple-match-head.c (maybe_push_res_to_seq): Likewise.

	* gcc.dg/pr69167.c: New test.

From-SVN: r232178
2016-01-08 21:50:24 +01:00
Marek Polacek
bd8f5bb297 re PR c++/68449 (ICE in cxx_eval_constant_expression on atomic_load in C++)
PR c++/68449
	* constexpr.c (cxx_eval_constant_expression): Handle NULL initializer.

	* g++.dg/pr68449.C: New.

From-SVN: r232176
2016-01-08 19:08:37 +00:00
Alan Lawrence
bb0f5ca786 [PATCH] Fix PR68707
gcc/:
	* tree-vect-slp.c (vect_analyze_slp_instance): Cancel permuted SLP
	instances that can be handled via vect_load_lanes.

gcc/testsuite/:

	* lib/target-supports.exp (check_effective_target_vect_load_lanes): New.
	* gcc.dg/vect/slp-perm-1.c: Look for vect_load_lanes instead of SLP
	on platforms supporting it.
	* gcc.dg/vect/slp-perm-2.c: Likewise.
	* gcc.dg/vect/slp-perm-3.c: Likewise.
	* gcc.dg/vect/slp-perm-5.c: Likewise.
	* gcc.dg/vect/slp-perm-7.c: Likewise.
	* gcc.dg/vect/slp-perm-8.c: Likewise.
	* gcc.dg/vect/slp-perm-6.c: Look for vect_load_lanes in addition to SLP
	on platforms supporting it.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r232174
2016-01-08 18:02:35 +00:00
Uros Bizjak
5c07bed61d symtab.c (symtab_node::equal_address_to): Return -1 instead of 2 if we can't determine address equivalence.
* symtab.c (symtab_node::equal_address_to): Return -1 instead of 2
	if we can't determine address equivalence.
	* alias.c (compare_base_decl): Update for changed return value of
	symtab_node::equal_address_to.

From-SVN: r232172
2016-01-08 17:13:18 +01:00
Jason Merrill
550c5f8a7e constexpr.c (cxx_eval_call_expression): Remove convert_to_void workaround.
* constexpr.c (cxx_eval_call_expression): Remove convert_to_void
	workaround.

From-SVN: r232168
2016-01-08 11:01:17 -05:00
Jason Merrill
451773378f PR c++/68983 (BE)
PR c++/67557
gcc/
	* function.c (assign_temp): Guard against TREE_ADDRESSABLE types here.
	* expr.c (store_field): Not here.
	* tree-cfgcleanup.c (fixup_noreturn_call): Don't clear LHS of a
	call with TREE_ADDRESSABLE type.
	* tree-cfg.c (verify_gimple_call): Adjust.
gcc/cp/
	* cvt.c (convert_to_void): Don't strip a TARGET_EXPR of
	TREE_ADDRESSABLE type.

From-SVN: r232167
2016-01-08 11:01:12 -05:00
Jason Merrill
0795b6f262 PR c++/68983 (FE)
PR c++/67557
	* call.c (unsafe_copy_elision_p): Look through COMPOUND_EXPR.

From-SVN: r232166
2016-01-08 11:01:05 -05:00
Jonathan Wakely
8babc12b22 Use -std option in test for C99 macros in <cmath>
* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++98.cc: Here and add -std=gnu++98.
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++0x.cc: Rename to ...
	* testsuite/26_numerics/headers/cmath/
	c99_classification_macros_c++11.cc: Here.

From-SVN: r232165
2016-01-08 14:59:36 +00:00
Olivier Hainque
b464ba1051 vxworks.h (VXWORKS_LIBGCC_SPEC): Don't link shared RTPs with libc_internal.
* config/vxworks.h (VXWORKS_LIBGCC_SPEC): Don't link shared RTPs with
	libc_internal.

From-SVN: r232164
2016-01-08 14:34:08 +00:00
Jonathan Wakely
32a8c97f5c Fix PR number in previous commit
From-SVN: r232163
2016-01-08 13:19:25 +00:00