Commit Graph

169991 Commits

Author SHA1 Message Date
Segher Boessenkool
2d94f7dea9 rs6000: Always output .machine
We now can always output .machine (if we output it at all for the
current target).


	PR target/91050
	* config/rs6000/rs6000.c (rs6000_file_start): Never skip emitting a
	.machine directive.

From-SVN: r273498
2019-07-15 22:57:53 +02:00
Uros Bizjak
ea298f7ad0 i386.md (@test<mode>_ccno_1): Rename from test<mode>_ccno_1.
* config/i386/i386.md (@test<mode>_ccno_1):
	Rename from test<mode>_ccno_1.
	(*testdi_1): Remove redundant alternatives.  Remove modrm attribute.
	(*testqi_1_maybe_si): Remove modrm attribute.
	(*test<mode>_1): Ditto.
	* config/i386/i386-expand.c (ix86_split_idivmod): Use
	gen_test_ccno_1 and gen_extend_insn.

From-SVN: r273496
2019-07-15 22:26:43 +02:00
Jan Hubicka
c559f3ef4e tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p to 0.
* tree-ssa-alias.c (aliasing_component_refs_walk): Initialize same_p
	to 0.

From-SVN: r273495
2019-07-15 19:21:36 +00:00
Richard Biener
5e79b14766 re PR tree-optimization/91162 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in useless_type_conversion_p, at gimple-expr.c:86 (error: invalid 'PHI' argument))
2019-07-15  Richard Biener  <rguenther@suse.de>

	PR middle-end/91162
	* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
	node make sure to replace all uses with something valid.

	* gcc.dg/autopar/pr91162.c: New testcase.

From-SVN: r273492
2019-07-15 12:48:47 +00:00
Kewen Lin
6c2833e74e re PR tree-optimization/88497 (Improve Accumulation in Auto-Vectorized Code)
gcc/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * tree-ssa-reassoc.c (reassociate_bb): Swap the positions of
    GIMPLE_BINARY_RHS check and gimple_visited_p check, call new
    function undistribute_bitref_for_vector.
    (undistribute_bitref_for_vector): New function.
    (cleanup_vinfo_map): Likewise.
    (sort_by_mach_mode): Likewise.

gcc/testsuite/ChangeLog

2019-07-15  Kewen Lin  <linkw@gcc.gnu.org>

    PR tree-optimization/88497
    * gcc.dg/tree-ssa/pr88497-1.c: New test.
    * gcc.dg/tree-ssa/pr88497-2.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-3.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-4.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-5.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-6.c: Likewise.
    * gcc.dg/tree-ssa/pr88497-7.c: Likewise.

From-SVN: r273490
2019-07-15 05:12:05 +00:00
GCC Administrator
3126c241af Daily bump.
From-SVN: r273488
2019-07-15 00:16:18 +00:00
Jerry DeLisle
1b034a958d re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))
2019-07-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/87233
	* expr.c (check_restricted): Relax constraint C1279 which was
	removed from F2008 and above.

	* gfortran.dg/initialization_14.f90: Modify to now pass by
	removing two dg-error commands. Added comments.
	* gfortran.dg/initialization_30.f90: New test that includes the
	two tests removed above with the 'dg-options -std=f95'.

From-SVN: r273484
2019-07-14 22:52:58 +00:00
Uros Bizjak
c5e02838af pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.
* gcc.dg/tree-ssa/pr84512.c (dg-final): Remove XFAIL on alpha*-*-*.

From-SVN: r273483
2019-07-14 22:27:25 +02:00
Uros Bizjak
3e4ceed077 i386.md (nonmemory_szext_operand): New mode attribute.
* config/i386/i386.md (nonmemory_szext_operand): New mode attribute.
	(test<mode>_ccno_1): Macroize insn pattern from testsi_ccno_1
	and testdi_ccno_1 using SWI48 mode attribute.
	(*testdi_1): Use x86_64_szext_nonmemory_operand instead of
	x86_64_szext_general_operand.
	(*testqi_1_maybe_si): Use nonmemory_operand instead of general_operand.
	(*test<mode>_1): Use nonmemory_szext_operand mode attribute
	instead of genera_operand mode attribute.

From-SVN: r273482
2019-07-14 20:52:16 +02:00
Vladislav Ivanishin
cbfde6ee68 gdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose
Work around the following

    (gdb) Python Exception <class 'gdb.error'> 'fclose@@GLIBC_2.2.5' has
    unknown return type; cast the call to its declared return type:
    (gdb) Error occurred in Python: 'fclose@@GLIBC_2.2.5' has unknown
    return type; cast the call to its declared return type

This is due to GDB not being able to pick up and use the return types from
debug info for external declarations.

2019-07-14  Vladislav Ivanishin <vlad@ispras.ru>

        * gdbhooks.py (DumpFn.invoke): Add explicit casts of return values of
        fopen and fclose to their respective types.
        (DotFn.invoke): Ditto.

From-SVN: r273480
2019-07-14 13:19:29 +00:00
Jan Hubicka
a20f263ba1 ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
* ipa-fnsummary.c (ipa_dump_hints): Do not dump array_index.
	(ipa_fn_summary::~ipa_fn_summary): Do not destroy array_index.
	(ipa_fn_summary_t::duplicate): Do not duplicate array_index.
	(array_index_predicate): Remove.
	(analyze_function_body): Account cost for variable ofsetted array
	indexing.
	(estimate_node_size_and_time): Do not compute array index hint.
	(ipa_merge_fn_summary_after_inlining): Do not merge array index hint.
	(inline_read_section): Do not read array index hint.
	(ipa_fn_summary_write): Do not write array index hint.
	* doc/invoke.texi (ipa-cp-array-index-hint-bonus): Remove.
	* ipa-cp.c (hint_time_bonus): Remove.
	* ipa-fnsummary.h (ipa_hints_vals): Remove array_index.
	(ipa_fnsummary): Remove array_index.
	* ipa-inline.c (want_inline_small_function_p): Do not use
	array_index.
	(edge_badness): Likewise.
	* params.def (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Remove.

From-SVN: r273479
2019-07-14 11:57:10 +00:00
Segher Boessenkool
d67dfb85ba rs6000: Shut up -Wformat-diag a little more
PR target/91148
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Remove
	superfluous "builtin function" phrasing.

gcc/testsuite/
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
	* gcc.target/powerpc/byte-in-set-2.c: Adjust.
	* gcc.target/powerpc/cmpb-3.c: Adjust.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.

From-SVN: r273475
2019-07-14 10:24:38 +02:00
GCC Administrator
0d67fe7e00 Daily bump.
From-SVN: r273474
2019-07-14 00:16:17 +00:00
Iain Sandoe
8028dd3f2f [Darwin, PPC, testsuite] Require stabs support for a test.
The test fails if the assembler doesn't support stabs.

2019-07-13  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
	support.

From-SVN: r273470
2019-07-13 21:21:43 +00:00
Jan Hubicka
e2bc581fca tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p): Break out from ...
* tree-ssa-alias.c (component_ref_to_zero_sized_trailing_array_p):
	Break out from ...
	(aliasing_component_refs_walk): Break out from ...
	(aliasing_component_refs_p): ... here.

From-SVN: r273469
2019-07-13 18:46:40 +00:00
Segher Boessenkool
5c695c29de rs6000: Shut up -Wformat-diag somewhat
We currently get lot of build warnings like
/home/segher/src/gcc/gcc/config/rs6000/rs6000-c.c:7039:12: warning: misspelled term 'builtin function' in format; use 'built-in function' instead [-Wformat-diag]
 7039 |    error ("builtin function %qs not supported in this compiler "
      |            ^~~~~~~~~~~~~~~~

That would print something like
  builtin function '__builtin_example' not supported in this compiler

Changing that to "built-in" as suggested only makes this worse.
Instead, let's just remove the whole "builtin function" phrase.


	PR target/91148
	* config/rs6000/rs6000.c (rs6000_invalid_builtin): Remove superfluous
	"builtin function" phrasing.

gcc/testsuite/
	* gcc.target/powerpc/bfp/scalar-cmp-exp-eq-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-gt-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-lt-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-cmp-exp-unordered-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-exp-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-extract-sig-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-1.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-10.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-7.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-insert-exp-8.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-11.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Adjust.
	* gcc.target/powerpc/bfp/scalar-test-neg-5.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-3.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-6.c: Adjust.
	* gcc.target/powerpc/bfp/vec-insert-exp-7.c: Adjust.
	* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Adjust.
	* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Adjust.
	* gcc.target/powerpc/byte-in-either-range-1.c: Adjust.
	* gcc.target/powerpc/byte-in-range-1.c: Adjust.
	* gcc.target/powerpc/byte-in-set-1.c: Adjust.
	* gcc.target/powerpc/byte-in-set-2.c: Adjust.
	* gcc.target/powerpc/cmpb-3.c: Adjust.
	* gcc.target/powerpc/crypto-builtin-2.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-1.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-11.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-16.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-21.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-26.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-31.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-36.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-41.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-46.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-51.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-56.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-6.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-61.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-66.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-71.c: Adjust.
	* gcc.target/powerpc/dfp/dtstsfi-76.c: Adjust.
	* gcc.target/powerpc/vsu/vec-all-nez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-any-eqz-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cmpnez-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cntlz-lsbb-2.c: Adjust.
	* gcc.target/powerpc/vsu/vec-cnttz-lsbb-2.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-12.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xl-len-13.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xlx-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xrx-7.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-12.c: Adjust.
	* gcc.target/powerpc/vsu/vec-xst-len-13.c: Adjust.

From-SVN: r273468
2019-07-13 17:57:21 +02:00
Andreas Schwab
544a74f051 * Makefile.rtl: Use g-sercom__linux.adb for all linuxes.
From-SVN: r273467
2019-07-13 12:03:29 +00:00
Prathamesh Kulkarni
f2b29269c4 re PR target/90723 (pr88598-2.c segfaults with -msve-vector-bits=256)
2019-07-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	PR target/90723
	* recog.h (temporary_volatile_ok): New class.
	* config/aarch64/aarch64.c (aarch64_emit_sve_pred_move): Set
	volatile_ok temporarily to true using temporary_volatile_ok.
	* expr.c (emit_block_move_via_cpymem): Likewise.
	* optabs.c (maybe_legitimize_operand): Likewise.

From-SVN: r273466
2019-07-13 08:28:33 +00:00
Jakub Jelinek
1a888209de re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction-modifier on target parallel combined construct)
PR c/91149
	* c-omp.c (c_omp_split_clauses): Fix a pasto in
	OMP_CLAUSE_REDUCTION_TASK handling.

	* c-c++-common/gomp/reduction-task-3.c: New test.

From-SVN: r273465
2019-07-13 08:29:46 +02:00
Jakub Jelinek
704686049d gimplify.c (struct gimplify_omp_ctx): Add order_concurrent member.
* gimplify.c (struct gimplify_omp_ctx): Add order_concurrent member.
	(omp_notice_threadprivate_variable): Diagnose threadprivate variable
	uses inside of order(concurrent) constructs.
	(gimplify_scan_omp_clauses): Set ctx->order_concurrent if
	OMP_CLAUSE_ORDER is seen.
	* omp-low.c (struct omp_context): Add order_concurrent member.
	(scan_sharing_clauses): Set ctx->order_concurrent if
	OMP_CLAUSE_ORDER is seen.
	(check_omp_nesting_restrictions): Diagnose ordered or atomic inside
	of simd order(concurrent).  Diagnose constructs not allowed inside of
	for order(concurrent).
	(setjmp_or_longjmp_p): Add a context and TREE_PUBLIC check to avoid
	complaining about static double setjmp (double); or class static
	methods or non-global namespace setjmps.
	(omp_runtime_api_call): New function.
	(scan_omp_1_stmt): Diagnose OpenMP runtime API calls inside of
	order(concurrent) loops.

	* c-c++-common/gomp/order-3.c: New test.
	* c-c++-common/gomp/order-4.c: New test.

From-SVN: r273464
2019-07-13 08:25:04 +02:00
GCC Administrator
bf85a0385f Daily bump.
From-SVN: r273463
2019-07-13 00:16:24 +00:00
Bill Seurer
d64c6837a7 [PATCH] Fix typo in test case.
The test case has a typo in the big endian section that reversed two digits.

Fix committed as obvious.


2019-07-12  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* gcc.dg/tree-ssa/vector-7.c: Fix typo.

From-SVN: r273459
2019-07-12 21:57:07 +00:00
Iain Sandoe
61fba2674f [Darwin, testsuite] Remove unused test.
During GCC-9, the codegen for unreachable switch case statements changed
such that the (undefined) behaviour of reaching such statements is directed
to one of the existing switch cases.  This means that the testcase which
deals with the old behaviour can no longer work (and there is nothing to test
with it).  The [Darwin-specific] test is now redundant and can be removed.

gcc/testsuite/

2019-07-12  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.dg/pr57438-2.c: Remove.

From-SVN: r273457
2019-07-12 18:38:33 +00:00
Martin Sebor
5dd47cb75d invoke.texi (ssa-name-def-chain-limit): Document new --param.
gcc/ChangeLog:

	* doc/invoke.texi (ssa-name-def-chain-limit): Document new --param.
	* params.def (PARAM_SSA_NAME_DEF_CHAIN_LIMIT): Add new --param.
	* tree-vrp.c (vrp_prop::check_mem_ref): Use
	PARAM_SSA_NAME_DEF_CHAIN_LIMIT.

gcc/testsuite/ChangeLog:

	* gcc.dg/Warray-bounds-43.c: New test.

From-SVN: r273454
2019-07-12 11:36:45 -06:00
Jan Hubicka
d132c59b10 tree-ssa-alias.c (same_tmr_indexing_p): Break out from ...
* tree-ssa-alias.c (same_tmr_indexing_p): Break out from ...
	(indirect_refs_may_alias_p): ... here.
	(nonoverlapping_component_refs_since_match_p): Support also non-trivial
	mem refs in the access paths.

	* gcc.dg/tree-ssa/alias-access-path-9.c: New testcase.

From-SVN: r273451
2019-07-12 16:56:57 +00:00
Jiangning Liu
b9ef6a2e04 re PR tree-optimization/89430 (A missing ifcvt optimization to generate csel)
2019-07-12  Jiangning Liu  <jiangning.liu@amperecomputing.com>

	PR tree-optimization/89430
	* tree-ssa-phiopt.c (cond_store_replacement): Support conditional
	store elimination for local variable without address escape.

	PR tree-optimization/89430
	* gcc.dg/tree-ssa/pr89430-1.c: New test.
	* gcc.dg/tree-ssa/pr89430-2.c: New test.
	* gcc.dg/tree-ssa/pr89430-3.c: New test.
	* gcc.dg/tree-ssa/pr89430-4.c: New test.
	* gcc.dg/tree-ssa/pr89430-5.c: New test.
	* gcc.dg/tree-ssa/pr89430-6.c: New test.

From-SVN: r273449
2019-07-12 10:28:43 -06:00
Jonathan Wakely
b979ca0ffd Fix inaccurate comment in new test
* testsuite/29_atomics/atomic_float/1.cc: Fix comment.

From-SVN: r273448
2019-07-12 16:45:16 +01:00
Jeff Law
c3a7a7b8ab c6x.c (c6x_section_type): Clear SECTION_NOTYPE for the ".far" section.
* config/c6x/c6x.c (c6x_section_type): Clear SECTION_NOTYPE
	for the ".far" section.

From-SVN: r273447
2019-07-12 09:40:39 -06:00
Richard Biener
cf91b5997d re PR tree-optimization/91145 (ICE: in vect_build_slp_tree_2, at tree-vect-slp.c:1143 with -march=skylake-avx512 -O3)
2019-07-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91145
	* tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction
	chain check.

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

From-SVN: r273445
2019-07-12 14:36:50 +00:00
Alexandre Oliva
b847405ade allow EH to escape from GIMPLE_EH_ELSE ELSE block
The only preexisting use of GIMPLE_EH_ELSE, for transactional memory
commits, did not allow exceptions to escape from the ELSE path.  The
trick it uses to allow the ELSE path to see the propagating exception
does not work very well if the exception cleanup raises further
exceptions: the ELSE block is configured to handle exceptions in
itself.  This confuses the heck out of CFG and EH cleanups.

Basing the lowering context for the ELSE block on outer_state, rather
than this_state, gets us the expected enclosing handler.


for  gcc/ChangeLog

	* tree-eh.c (honor_protect_cleanup_actions): Use outer_
	rather than this_state as the lowering context for the ELSE
	seq in a GIMPLE_EH_ELSE.

for  gcc/testsuite/ChangeLog

	* gcc.dg/gimplefe-44.c: New.

From-SVN: r273444
2019-07-12 13:51:00 +00:00
Alexandre Oliva
fdc1f34302 introduce try/finally/else in gimplefe
for  gcc/c/ChangeLog

	* gimple-parser.c (c_parser_gimple_try_stmt): New.
	(c_parser_compound_statement): Call it.

for  gcc/testsuite/ChangeLog

	* gcc.dg/gimplefe-43.c: New.

From-SVN: r273443
2019-07-12 13:50:49 +00:00
Jonathan Wakely
0d67cd380d Define __type_identity_t alias and use for string_view
This defines the equivalent of C++2a's std::type_identity_t alias but
for use in C++11 and later. This can be used to replace __detail::__idt
in the string_view headers, which previously used common_type_t because
the one argument specialization of common_type_t was simply the identity
transform (which is no longer true).

	* include/experimental/string_view (__detail::__idt): Remove.
	(operator==, operator!=, operator<, operator>, operator<=, operator>=):
	Use __type_identity_t instead of __detail::__idt;
	* include/std/string_view (__detail::__idt): Remove.
	(operator==, operator!=, operator<, operator>, operator<=, operator>=):
	Use __type_identity_t instead of __detail::__idt;
	* include/std/type_traits (__type_identity_t): New alias template.

From-SVN: r273442
2019-07-12 12:43:22 +01:00
Jonathan Wakely
804e2d0631 Update C++2a library status table
* doc/xml/manual/status_cxx2020.xml: Update status for atomic_ref
	and floating point atomics.

From-SVN: r273441
2019-07-12 12:43:17 +01:00
Richard Sandiford
72ab1c51b6 Relax vector_builder::elt sanity check
I'd made it a precondition of vector_builder::elt that the encoding
must have been fully populated and that all implicit elements are
therefore defined.  But for one of the AArch64 patches I'm working on,
it'd be convenient to be able to look back at previous elements while
building up the encoding.  This patch therefore makes the assert
specific to implicit elements only.

2019-07-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* vector-builder.h (vector_builder::elt): Allow already-supplied
	elements to be read back before building is complete.

From-SVN: r273440
2019-07-12 10:33:52 +00:00
Eric Botcazou
49dbd6a032 re PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes application crash in exception handling)
PR rtl-optimization/91136
	* df-core.c (ACCESSING REFS): Fix typos in comment.
	* resource.c (mark_target_live_reg): Add artificial defs that occur at
	the beginning of the block to the initial set of live registers.

From-SVN: r273436
2019-07-12 10:15:39 +00:00
Richard Biener
831e688af5 fold-const.h (get_array_ctor_element_at_index): Adjust.
2019-07-12  Richard Biener  <rguenther@suse.de>

	* fold-const.h (get_array_ctor_element_at_index): Adjust.
	* fold-const.c (get_array_ctor_element_at_index): Add
	ctor_idx output parameter informing the caller where in
	the constructor the element was (not) found.  Add early exit
	for when the ctor is sorted.
	* gimple-fold.c (fold_array_ctor_reference): Support constant
	folding across multiple array elements.

	* gcc.dg/tree-ssa/vector-7.c: New testcase.

From-SVN: r273435
2019-07-12 10:03:10 +00:00
Eric Botcazou
e067f9924b cfgexpand.c (expand_gimple_stmt_1): If the statement doesn't have location...
* cfgexpand.c (expand_gimple_stmt_1) <GIMPLE_RETURN>: If the statement
	doesn't have location, set the current location to the function's end

From-SVN: r273434
2019-07-12 09:35:21 +00:00
Richard Sandiford
e7ba492a04 [arch64] Fix ambiguous .md attribute uses
This patch is part of a series that fixes ambiguous attribute
uses in .md files, i.e. cases in which attributes didn't use
<ITER:ATTR> to specify an iterator, and in which <ATTR> could
have different values depending on the iterator chosen.

No behavioural change except for dropping the unused SVE
divide permutations.

2019-07-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* config/aarch64/aarch64.md (*compare_condjump<mode>)
	(loadwb_pair<GPI:mode>_<P:mode>, loadwb_pair<GPF:mode>_<P:mode>)
	(storewb_pair<GPI:mode>_<P:mode>, storewb_pair<GPF:mode>_<P:mode>)
	(*ands<mode>_compare0): Fix ambiguous uses of .md attributes.
	* config/aarch64/aarch64-simd.md
	(*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
	(*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): Likewise.
	* config/aarch64/aarch64-sve.md
	(while_ult<GPI:mode><PRED_ALL:mode>): Likewise.
	(*cond_<optab><mode>_any): Fix SVE_I/SVE_SDI typo.

From-SVN: r273433
2019-07-12 08:14:34 +00:00
Richard Sandiford
d281492de8 Support multiple operand counts for .md @ patterns
This patch extends the support for "@..." pattern names so that
the patterns can have different numbers of operands.  This allows
things like binary and ternary operations to be handled in a
consistent way, a bit like optabs.  The generators assert that
the number of operands passed is correct for the underlying
instruction.

Also, replace_operands_with_dups iterated over the old rtx format
even after having decided to do a replacement, which broke with
match_operator.

2019-07-12  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* doc/md.texi: Document that @ patterns can have different
	numbers of operands.
	* genemit.c (handle_overloaded_gen): Handle this case.
	* genopinit.c (handle_overloaded_gen): Likewise.
	* gensupport.c (replace_operands_with_dups): Iterate over
	the new rtx's format rather than the old one's.

From-SVN: r273432
2019-07-12 07:54:23 +00:00
Jakub Jelinek
1fdd6f0412 tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_ORDER.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_ORDER.
	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
	order clause entries.
	(walk_tree_1): Handle OMP_CLAUSE_ORDER.
	* tree-pretty-print.c (dump_omp_clause): Likewise.
	* gimplify.c (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses):
	Likewise.
	* omp-low.c (scan_sharing_clauses): Likewise.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Likewise.
c-family/
	* c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
	* c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
c/
	* c-parser.c (c_parser_omp_clause_name): Handle order clause.
	(c_parser_omp_clause_order): New function.
	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
	(OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
	PRAGMA_OMP_CLAUSE_ORDER.
	* c-typeck.c (c_finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
cp/
	* parser.c (cp_parser_omp_clause_name): Handle order clause.
	(cp_parser_omp_clause_order): New function.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_ORDER.
	(OMP_SIMD_CLAUSE_MASK, OMP_FOR_CLAUSE_MASK): Add
	PRAGMA_OMP_CLAUSE_ORDER.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_ORDER.
	* pt.c (tsubst_omp_clauses): Likewise.
testsuite/
	* c-c++-common/gomp/order-1.c: New test.
	* c-c++-common/gomp/order-2.c: New test.

From-SVN: r273431
2019-07-12 09:49:51 +02:00
Kewen Lin
3362737705 Add hint if the fallthrough target of current BB isn't the one
placed closely next.

2019-07-12  Kewen Lin  <linkw@gcc.gnu.org>

    * gcc/cfgrtl.c (print_rtl_with_bb): Emit a hint if the
    fallthrough target of current basic block isn't the placed
    right next.

From-SVN: r273430
2019-07-12 05:07:35 +00:00
GCC Administrator
e63f834983 Daily bump.
From-SVN: r273429
2019-07-12 00:16:23 +00:00
Ian Lance Taylor
a8b9ee6feb compiler: ensure evaluation order in type hash/eq functions
The type hash and equality functions are generated after the
    order_evaluations pass. They may contain shortcut operators and
    Set_and_use_temporary_expressions (e.g. from lowering a
    Binary_exprssion) that need to be ordered. Run order_evaluations
    and remove_shortcuts on these functions. (The hash functions
    may be fine, but to be on the safe side we run on them anyway.
    We do need to run on the equality functions.)
    
    A Set_and_use_temporary_expression is effectively an assignment,
    so it needs to be ordered. Otherwise if we insert a temporary
    statement before it, we may get wrong evaluation order.
    
    A test case is CL 185818.
    
    Fixes golang/go#33062.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185817

From-SVN: r273425
2019-07-11 21:37:33 +00:00
Uros Bizjak
bee60edc26 ChangeLog: Fix whitespace.
* ChangeLog: Fix whitespace.
	* testsuite/ChangeLog: Ditto.

From-SVN: r273424
2019-07-11 23:01:25 +02:00
Jonathan Wakely
f6822be73a Improve docs for --enable-libstdcxx-time=rt
* doc/xml/manual/configure.xml: Improve documentation of
	--enable-libstdcxx-time option.

From-SVN: r273421
2019-07-11 20:43:32 +01:00
Jonathan Wakely
a90fe12c80 Define std::atomic_ref and std::atomic<floating-point> for C++20
This adds the new atomic types from C++2a, as proposed by P0019 and
P0020. To reduce duplication the calls to the compiler's atomic
built-ins are wrapped in new functions in the __atomic_impl namespace.
These functions are currently only used by std::atomic<floating-point>
and std::atomic_ref but could also be used for all other specializations
of std::atomic.

	* include/bits/atomic_base.h (__atomic_impl): New namespace for
	wrappers around atomic built-ins.
	(__atomic_float, __atomic_ref): New class templates for use as base
	classes.
	* include/std/atomic (atomic<float>, atomic<double>)
	(atomic<long double>): New explicit specializations.
	(atomic_ref): New class template.
	(__cpp_lib_atomic_ref): Define.
	* include/std/version (__cpp_lib_atomic_ref): Define.
	* testsuite/29_atomics/atomic/60695.cc: Adjust dg-error.
    	* testsuite/29_atomics/atomic_float/1.cc: New test.
    	* testsuite/29_atomics/atomic_float/requirements.cc: New test.
    	* testsuite/29_atomics/atomic_ref/deduction.cc: New test.
    	* testsuite/29_atomics/atomic_ref/float.cc: New test.
    	* testsuite/29_atomics/atomic_ref/generic.cc: New test.
    	* testsuite/29_atomics/atomic_ref/integral.cc: New test.
    	* testsuite/29_atomics/atomic_ref/pointer.cc: New test.
    	* testsuite/29_atomics/atomic_ref/requirements.cc: New test.

From-SVN: r273420
2019-07-11 20:43:25 +01:00
Sunil K Pandey
4c98bdadcb i386: Add AVX512 unaligned intrinsics
__m512i _mm512_loadu_epi64( void * sa);
void _mm512_storeu_epi64(void * d, __m512i a);
__m512i _mm512_loadu_epi32( void * sa);
void _mm512_storeu_epi32(void * d, __m512i a);
void _mm256_storeu_epi64(void * d, __m256i a);
void _mm_storeu_epi64(void * d, __m128i a);
void _mm256_storeu_epi32(void * d, __m256i a);
void _mm_storeu_epi32(void * d, __m128i a);

Tested on x86-64.

2019-07-11  Sunil K Pandey  <sunil.k.pandey@intel.com>

gcc/

	PR target/90980
	* config/i386/avx512fintrin.h (_mm512_loadu_epi64): New.
	(_mm512_storeu_epi64): Likewise.
	(_mm512_loadu_epi32): Likewise.
	(_mm512_storeu_epi32): Likewise.
	* config/i386/avx512vlintrin.h (_mm256_storeu_epi64): New.
	(_mm_storeu_epi64): Likewise.
	(_mm256_storeu_epi32): Likewise.
	(_mm_storeu_epi32): Likewise.

gcc/testsuite/

	PR target/90980
	* gcc.target/i386/pr90980-1.c: New test.
	* gcc.target/i386/pr90980-2.c: Likewise.
	* gcc.target/i386/pr90980-3.c: Likewise.

From-SVN: r273416
2019-07-11 12:09:37 -07:00
Segher Boessenkool
998175f646 rs6000: Adjust comment for the Modula-2 traceback lang
* config/rs6000/rs6000-logue.c: Add Modula-2 to comment.

From-SVN: r273413
2019-07-11 20:51:23 +02:00
Segher Boessenkool
e617512f4a rs6000: Handle Modula-2 in the traceback table
This patch recognises Modula-2 as language for the traceback table,
fixing the problem shown in
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .


	* config/rs6000/rs6000-logue.c (rs6000_output_function_epilogue):
	Handle Modula-2.

From-SVN: r273411
2019-07-11 20:36:48 +02:00
Jakub Jelinek
946732df90 re PR target/91124 (gcc.target/i386/avx512vl-vpshldvd-2.c etc. FAIL)
PR target/91124
	* config/i386/sse.md (sse2_cvtpd2dq<mask_name>): Change into ...
	(sse2_cvtpd2dq): ... this.  Remove mask substitution macros.
	(sse2_cvtpd2dq_mask, sse2_cvtpd2dq_mask_1): New define_insns.
	(ufix_notruncv2dfv2si2<mask_name>): Change into ...
	(ufix_notruncv2dfv2si2): ... this.  Remove mask substitution macros.
	(ufix_notruncv2dfv2si2_mask, ufix_notruncv2dfv2si2_mask_1): New
	define_insns.
	(ufix_truncv2dfv2si2<mask_name>): Change into ...
	(ufix_truncv2dfv2si2): ... this.  Remove mask substitution macros.
	(ufix_truncv2dfv2si2_mask, ufix_truncv2dfv2si2_mask_1): New
	define_insns.
	(sse2_cvttpd2dq<mask_name>): Change into ...
	(sse2_cvttpd2dq): ... this.  Remove mask substitution macros.
	(sse2_cvttpd2dq_mask, sse2_cvttpd2dq_mask_1): New define_insns.
	(*sse2_cvtpd2dq<mask_name>): Change into ...
	(*sse2_cvtpd2dq): ... this.  Remove mask substitution macros.
	Add "C" constraint to const0_operand.
	(*sse2_cvtpd2dq_mask, *sse2_cvtpd2dq_mask_1): New define_insns.
	(sse2_cvtpd2ps_mask): Adjust expand to match *sse2_cvtpd2ps_mask
	changes.

From-SVN: r273409
2019-07-11 10:31:51 +02:00