178863 Commits

Author SHA1 Message Date
Roger Sayle
37a4c06f3d [PATCH] nvptx: Add support for PTX highpart multiplications (HI/SI)
This patch adds support for signed and unsigned, HImode and SImode highpart
multiplications to the nvptx backend.

This patch has been tested on nvptx-none hosted on x86_64-pc-linux-gnu
with a "make" and "make -k check" with no new failures with the
above patch.

2020-08-04  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog:

	* config/nvptx/nvptx.md (smulhi3_highpart, smulsi3_highpart)
	(umulhi3_highpart, umulsi3_highpart): New instructions.

gcc/testsuite/ChangeLog:

	* gcc.target/nvptx/mul-hi.c: New test.
	* gcc.target/nvptx/umul-hi.c: New test.
2020-08-05 00:44:10 +02:00
Marek Polacek
97def1f34c c++: Template keyword following :: [PR96082]
In r9-4235 I tried to make sure that the template keyword follows
a nested-name-specifier.  :: is a valid nested-name-specifier, so
I also have to check 'globalscope' before giving the error.

gcc/cp/ChangeLog:

	PR c++/96082
	* parser.c (cp_parser_elaborated_type_specifier): Allow
	'template' following ::.

gcc/testsuite/ChangeLog:

	PR c++/96082
	* g++.dg/template/template-keyword3.C: New test.
2020-08-04 13:41:36 -04:00
Ian Lance Taylor
acf83db025 compiler: delete lowered constant strings
If we lower a constant string operation in a Binary_expression,
delete the strings.  This is safe because constant strings are always
newly allocated.

This is a hack to use much less memory when compiling the new
time/tzdata package, which has a file that contains the sum of over
13,000 constant strings.  We don't do this for numeric expressions
because that could cause us to delete an Iota_expression.

We should have a cleaner approach to memory usage some day.

Fixes PR go/96450
2020-08-04 10:21:37 -07:00
Andrew Stubbs
1790d13dc8 amdgcn: Remove dead defines from gcn-run
Nothing uses these since the switch to HSACOv3.

gcc/ChangeLog:

	* config/gcn/gcn-run.c (R_AMDGPU_NONE): Delete.
	(R_AMDGPU_ABS32_LO): Delete.
	(R_AMDGPU_ABS32_HI): Delete.
	(R_AMDGPU_ABS64): Delete.
	(R_AMDGPU_REL32): Delete.
	(R_AMDGPU_REL64): Delete.
	(R_AMDGPU_ABS32): Delete.
	(R_AMDGPU_GOTPCREL): Delete.
	(R_AMDGPU_GOTPCREL32_LO): Delete.
	(R_AMDGPU_GOTPCREL32_HI): Delete.
	(R_AMDGPU_REL32_LO): Delete.
	(R_AMDGPU_REL32_HI): Delete.
	(reserved): Delete.
	(R_AMDGPU_RELATIVE64): Delete.
2020-08-04 17:51:05 +01:00
Omar Tahir
079b13f64c [Arm] Modify default tuning of armv8.1-m.main to use Cortex-M55
Previously, compiling with -march=armv8.1-m.main would tune for
Cortex-M7.
However, the Cortex-M7 only supports up to Armv7e-M. The Cortex-M55 is
the earliest CPU that supports Armv8.1-M Mainline so is more appropriate.
This also has the effect of changing the branch cost function used, which
will be necessary to correctly prioritise conditional instructions over branches
in the rest of this patch series.

Regression tested on arm-none-eabi.

gcc/ChangeLog

2020-08-04  Omar Tahir  <omar.tahir@arm.com>

	* config/arm/arm-cpus.in (armv8.1-m.main): Tune for Cortex-M55.
2020-08-04 17:37:01 +01:00
Hu Jiangping
03c547d665 aarch64: Delete unnecessary code
gcc/
	* config/aarch64/aarch64.c (aarch64_if_then_else_costs): Delete
	redundant extra_cost variable.
2020-08-04 17:35:12 +01:00
Nathan Sidwell
0f4f9bc122 c++: fix template parm count leak
I noticed that we could leak parser->num_template_parameter_lists with
erroneous specializations.  We'd increment, notice a problem and then
bail out.  This refactors cp_parser_explicit_specialization to avoid
that code path.  A couple of tests get different diagnostics because
of the fix.  pr39425 then goes to unbounded template instantiation
and exceeds the implementation limit.

	gcc/cp/
	* parser.c (cp_parser_explicit_specialization): Refactor
	to avoid leak of num_template_parameter_lists value.
	gcc/testsuite/
	* g++.dg/template/pr39425.C: Adjust errors, (unbounded
	template recursion).
	* g++.old-deja/g++.pt/spec20.C: Remove fallout diagnostics.
2020-08-04 09:32:18 -07:00
xiezhiheng
35ffd4d16d AArch64: Use FLOAT_MODE_P macro and add FLAG_AUTO_FP [PR94442]
Since all FP intrinsics are set by FLAG_FP by default, but not all FP intrinsics
raise FP exceptions or read FPCR register.  So we add a global flag FLAG_AUTO_FP
to suppress the flag FLAG_FP.

2020-08-04  Zhiheng Xie  <xiezhiheng@huawei.com>

gcc/ChangeLog:

	* config/aarch64/aarch64-builtins.c (aarch64_call_properties):
	Use FLOAT_MODE_P macro instead of enumerating all floating-point
	modes and add global flag FLAG_AUTO_FP.
2020-08-04 17:25:29 +01:00
Tobias Burnus
57dd9f3bfc Fortran/OpenMP: Fix detecting not perfectly nested loops
gcc/fortran/ChangeLog:

	* openmp.c (resolve_omp_do): Detect not perfectly
	nested loop with innermost collapse.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/collapse1.f90: Add dg-error.
	* gfortran.dg/gomp/collapse2.f90: New test.
2020-08-04 18:17:53 +02:00
Jakub Jelinek
73b7cb6dfc doc: Add @cindex to symver attribute
When looking at the symver attr documentation in html, I found there is no
name to refer to for it.

2020-08-04  Jakub Jelinek  <jakub@redhat.com>

	* doc/extend.texi (symver): Add @cindex for symver function attribute.
2020-08-04 18:16:23 +02:00
Roger Sayle
76eafcc395 Test case for PR rtl-optimization/60473
PR rtl-optimization/60473 is code quality regression that has
been cured by improvements to register allocation.  For the function
in the test case, GCC 4.4, 4.5 and 4.6 generated very poor code
requiring two mov instructions, and GCC 4.7 and 4.8 (when the PR was
filed) produced better but still poor code with one mov instruction.
Since GCC 4.9 (including current mainline), it generates optimal
code with no mov instructions, matching what used to be generated
in GCC 4.1.

2020-08-04  Roger Sayle  <roger@nextmovesoftware.com>

gcc/testsuite/ChangeLog
	PR rtl-optimization/60473
	* gcc.target/i386/pr60473.c: New test.
2020-08-04 16:57:34 +01:00
Marc Glisse
ca2b8c082c Simplify X * C1 == C2 with undefined overflow
this transformation is quite straightforward, without overflow, 3*X==15 is
the same as X==5 and 3*X==5 cannot happen. Adding a single_use restriction
for the first case didn't seem necessary, although of course it can
slightly increase register pressure in some cases.

2020-08-04  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/95433
	* match.pd (X * C1 == C2): New transformation.

	* gcc.c-torture/execute/pr23135.c: Add -fwrapv to avoid
	undefined behavior.
	* gcc.dg/tree-ssa/pr95433.c: New file.
2020-08-04 17:30:16 +02:00
Aldy Hernandez
c79d8335fd Adjust gimple-ssa-sprintf.c for irange API.
gcc/ChangeLog:

	* gimple-ssa-sprintf.c (get_int_range): Adjust for irange API.
	(format_integer): Same.
	(handle_printf_call): Same.
2020-08-04 17:11:24 +02:00
Iain Buclaw
2ac51bdf63 d: Fix struct literals that have non-deterministic hash values (PR96153)
Adds code generation for generating a temporary for, and pre-filling
struct and array literals with zeroes before assigning, so that
alignment holes don't cause objects to produce a non-deterministic hash
value.  A new field has been added to the expression visitor to track
whether the result is being generated for another literal, so that
memset() is only called once on the top-level literal expression, and
not for nesting struct or arrays.

gcc/d/ChangeLog:

	PR d/96153
	* d-tree.h (build_expr): Add literalp argument.
	* expr.cc (ExprVisitor): Add literalp_ field.
	(ExprVisitor::ExprVisitor): Initialize literalp_.
	(ExprVisitor::visit (AssignExp *)): Call memset() on blits where RHS
	is a struct literal.  Elide assignment if initializer is all zeroes.
	(ExprVisitor::visit (CastExp *)): Forward literalp_ to generation of
	subexpression.
	(ExprVisitor::visit (AddrExp *)): Likewise.
	(ExprVisitor::visit (ArrayLiteralExp *)): Use memset() to pre-fill
	object with zeroes.  Set literalp in subexpressions.
	(ExprVisitor::visit (StructLiteralExp *)): Likewise.
	(ExprVisitor::visit (TupleExp *)): Set literalp in subexpressions.
	(ExprVisitor::visit (VectorExp *)): Likewise.
	(ExprVisitor::visit (VectorArrayExp *)): Likewise.
	(build_expr): Forward literal_p to ExprVisitor.

gcc/testsuite/ChangeLog:

	PR d/96153
	* gdc.dg/pr96153.d: New test.
2020-08-04 17:02:56 +02:00
Andrew Stubbs
19fad46721 amdgcn: TImode shifts
Implement TImode shifts in the backend.

The middle-end support that does it for other architectures doesn't work for
GCN because BITS_PER_WORD==32, meaning that TImode is quad-word, not
double-word.

gcc/ChangeLog:

	* config/gcn/gcn.md ("<expander>ti3"): New.
2020-08-04 15:45:22 +01:00
Patrick Palka
843710c037 c++: Member initializer list diagnostic locations [PR94024]
This patch preserves the source locations of each node in a member
initializer list so that during processing of the list we can set
input_location appropriately for generally more accurate diagnostic
locations.  Since TREE_LIST nodes are tcc_exceptional, they can't have
source locations, so we instead store the location in a dummy
tcc_expression node within the TREE_TYPE of the list node.

gcc/cp/ChangeLog:

	PR c++/94024
	* init.c (sort_mem_initializers): Preserve TREE_TYPE of the
	member initializer list node.
	(emit_mem_initializers): Set input_location when performing each
	member initialization.
	* parser.c (cp_parser_mem_initializer): Attach the source
	location of this initializer to a dummy EMPTY_CLASS_EXPR
	within the TREE_TYPE of the list node.
	* pt.c (tsubst_initializer_list): Preserve TREE_TYPE of the
	member initializer list node.

gcc/testsuite/ChangeLog:

	PR c++/94024
	* g++.dg/diagnostic/mem-init1.C: New test.
2020-08-04 10:11:35 -04:00
Richard Biener
1af5cdd779 tree-optimization/88240 - stopgap for floating point code-hoisting issues
This adds a stopgap measure to avoid performing code-hoisting
on mixed type loads when the load we'd insert in the hoisting
position would be a floating point one.  This is because certain
targets (hello x87) cannot perform floating point loads without
possibly altering the bit representation and thus cannot be used
in place of integral loads.

2020-08-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/88240
	* tree-ssa-sccvn.h (vn_reference_s::punned): New flag.
	* tree-ssa-sccvn.c (vn_reference_insert): Initialize punned.
	(vn_reference_insert_pieces): Likewise.
	(visit_reference_op_call): Likewise.
	(visit_reference_op_load): Track whether a ref was punned.
	* tree-ssa-pre.c (do_hoist_insertion): Refuse to perform hoist
	insertion on punned floating point loads.

	* gcc.target/i386/pr88240.c: New testcase.
2020-08-04 15:29:19 +02:00
Tobias Burnus
7bd72dd5a3 Fortran: Fix for OpenMP's 'lastprivate(conditional:'
gcc/fortran/ChangeLog:

	* trans-openmp.c (gfc_trans_omp_do): Fix 'lastprivate(conditional:'.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/lastprivate-conditional-3.f90: Enable some
	previously disabled 'lastprivate(conditional:' dg-warnings.
2020-08-04 14:42:26 +02:00
Sudakshina Das
7cda9e0878 aarch64: Use Q-reg loads/stores in movmem expansion
This is my attempt at reviving the old patch
https://gcc.gnu.org/pipermail/gcc-patches/2019-January/514632.html

I have followed on Kyrill's comment upstream on the link above and I
am using the recommended option iii that he mentioned.
"1) Adjust the copy_limit to 256 bits after checking
    AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS in the tuning.
 2) Adjust aarch64_copy_one_block_and_progress_pointers to handle
    256-bit moves. by iii:
   iii) Emit explicit V4SI (or any other 128-bit vector mode) pairs
	ldp/stps. This wouldn't need any adjustments to MD patterns,
	but would make aarch64_copy_one_block_and_progress_pointers
	more complex as it would now have two paths, where one
	handles two adjacent memory addresses in one calls."

gcc/ChangeLog:

	* config/aarch64/aarch64.c (aarch64_gen_store_pair): Add case
	for E_V4SImode.
	(aarch64_gen_load_pair): Likewise.
	(aarch64_copy_one_block_and_progress_pointers): Handle 256 bit copy.
	(aarch64_expand_cpymem): Expand copy_limit to 256bits where
	appropriate.

gcc/testsuite/ChangeLog:

	* gcc.target/aarch64/cpymem-q-reg_1.c: New test.
	* gcc.target/aarch64/large_struct_copy_2.c: Update for ldp q regs.
2020-08-04 12:01:53 +01:00
Andrea Corallo
d2b86e14c1 aarch64: Add missing clobber for fjcvtzs
gcc/ChangeLog

2020-07-30  Andrea Corallo  <andrea.corallo@arm.com>

	* config/aarch64/aarch64.md (aarch64_fjcvtzs): Add missing
	clobber.
	* doc/sourcebuild.texi (aarch64_fjcvtzs_hw) Document new
	target supports option.

gcc/testsuite/ChangeLog

2020-07-30  Andrea Corallo  <andrea.corallo@arm.com>

	* gcc.target/aarch64/acle/jcvt_2.c: New testcase.
	* lib/target-supports.exp
	(check_effective_target_aarch64_fjcvtzs_hw): Add new check for
	FJCVTZS hw.
2020-08-04 12:22:41 +02:00
Tom de Vries
344f09a756 [nvptx] Handle V2DI/V2SI mode in nvptx_gen_shuffle
With the pr96628-part1.f90 source and -ftree-slp-vectorize, we run into an
ICE due to the fact that V2DI mode is not handled in nvptx_gen_shuffle.

Fix this by adding handling of V2DI as well as V2SI mode in
nvptx_gen_shuffle.

Build and reg-tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

	PR target/96428
	* config/nvptx/nvptx.c (nvptx_gen_shuffle): Handle V2SI/V2DI.

libgomp/ChangeLog:

	PR target/96428
	* testsuite/libgomp.oacc-fortran/pr96628-part1.f90: New test.
	* testsuite/libgomp.oacc-fortran/pr96628-part2.f90: New test.
2020-08-04 11:59:08 +02:00
Jakub Jelinek
95f5a3258d veclower: Don't ICE on .VEC_CONVERT calls with no lhs [PR96426]
.VEC_CONVERT is a const internal call, so normally if the lhs is not used,
we'd DCE it far before getting to veclower, but with -O0 (or perhaps
-fno-tree-dce and some other -fno-* options) it can happen.
But as the internal fn needs the lhs to know the type to which the
conversion is done (and I think that is a reasonable representation, having
some magic another argument and having to create constants with that type
looks overkill to me), we just should DCE those calls ourselves.
During veclower, we can't really remove insns, as the callers would be
upset, so this just replaces it with a GIMPLE_NOP.

2020-08-04  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/96426
	* tree-vect-generic.c (expand_vector_conversion): Replace .VEC_CONVERT
	call with GIMPLE_NOP if there is no lhs.

	* gcc.c-torture/compile/pr96426.c: New test.
2020-08-04 11:33:18 +02:00
Jakub Jelinek
fabe0ede9d gimple-fold: Fix ICE in maybe_canonicalize_mem_ref_addr on debug stmt [PR96354]
In debug stmts, we are less strict about what is and what is not accepted
there, so this patch just punts on optimization of a debug stmt rather than
ICEing.

2020-08-04  Jakub Jelinek  <jakub@redhat.com>

	PR debug/96354
	* gimple-fold.c (maybe_canonicalize_mem_ref_addr): Add IS_DEBUG
	argument.  Return false instead of gcc_unreachable if it is true and
	get_addr_base_and_unit_offset returns NULL.
	(fold_stmt_1) <case GIMPLE_DEBUG>: Adjust caller.

	* g++.dg/opt/pr96354.C: New test.
2020-08-04 11:31:44 +02:00
Aldy Hernandez
d79d9445d6 Add is_gimple_min_invariant dropped from previous patch.
gcc/ChangeLog:

	* vr-values.c (simplify_using_ranges::vrp_evaluate_conditional):
	Call is_gimple_min_invariant dropped from previous patch.
2020-08-04 11:25:11 +02:00
Jakub Jelinek
29e0ad452c openmp: Compute number of collapsed loop iterations more efficiently for some non-rectangular loops
2020-08-04  Jakub Jelinek  <jakub@redhat.com>

	* omp-expand.c (expand_omp_for_init_counts): For triangular loops
	compute number of iterations at runtime more efficiently.
	(expand_omp_for_init_vars): Adjust immediate dominators.
	(extract_omp_for_update_vars): Likewise.
2020-08-04 10:53:07 +02:00
Iain Buclaw
3a3fda1190 d: Fix PR96429: Pointer subtraction uses TRUNC_DIV_EXPR
gcc/d/ChangeLog:

	PR d/96429
	* expr.cc (ExprVisitor::visit (BinExp*)): Use EXACT_DIV_EXPR for
	pointer diff expressions.

gcc/testsuite/ChangeLog:

	PR d/96429
	* gdc.dg/pr96429.d: New test.
2020-08-04 10:25:22 +02:00
Paul Thomas
863de93218 Change testcase for pr96325 from run to compile.
2020-08-04  Paul Thomas  <pault@gcc.gnu.org>

gcc/testsuite/
	PR fortran/96325
	* gfortran.dg/pr96325.f90: Change from run to compile.
2020-08-04 07:53:50 +01:00
Aldy Hernandez
506bd24a5d Adjust two_valued_val_range_p for irange API.
gcc/ChangeLog:

	* vr-values.c (simplify_using_ranges::two_valued_val_range_p):
	Use irange API.
2020-08-04 07:25:02 +02:00
Aldy Hernandez
70be589565 Adjust simplify_conversion_using_ranges for irange API.
gcc/ChangeLog:

	* vr-values.c (simplify_conversion_using_ranges): Convert to irange API.
2020-08-04 07:23:43 +02:00
Aldy Hernandez
92877ab81b Use irange API in test_for_singularity.
gcc/ChangeLog:

	* vr-values.c (test_for_singularity): Use irange API.
	(simplify_using_ranges::simplify_cond_using_ranges_1): Do not
	special case VR_RANGE.
2020-08-04 07:23:42 +02:00
Aldy Hernandez
01aa5fcad2 Adjust vrp_evaluate_conditional for irange API.
gcc/ChangeLog:

	* vr-values.c (simplify_using_ranges::vrp_evaluate_conditional): Adjust
	for irange API.
2020-08-04 07:23:42 +02:00
Aldy Hernandez
5220219922 Adjust op_with_boolean_value_range_p for irange API.
gcc/ChangeLog:

	* vr-values.c (simplify_using_ranges::op_with_boolean_value_range_p): Adjust
	for irange API.
2020-08-04 07:23:42 +02:00
Aldy Hernandez
967c966f21 Adjust get_range_info to use the base irange class.
gcc/ChangeLog:

	* tree-ssanames.c (get_range_info): Use irange instead of value_range.
	* tree-ssanames.h (get_range_info): Same.
2020-08-04 07:23:42 +02:00
Aldy Hernandez
ab54c44fa6 Adjust expr_not_equal_to to use irange API.
gcc/ChangeLog:

	* fold-const.c (expr_not_equal_to): Adjust for irange API.
2020-08-04 07:23:42 +02:00
Aldy Hernandez
f21757eb8f Remove ad-hoc range canonicalization from determine_block_size.
Anti ranges of ~[MIN,X] are automatically canonicalized to [X+1,MAX],
at creation time.  There is no need to handle them specially.

Tested by adding a gcc_unreachable and bootstrapping/testing.

gcc/ChangeLog:

	* builtins.c (determine_block_size): Remove ad-hoc range canonicalization.
2020-08-04 07:23:41 +02:00
Xionghu Luo
265d817b1e dse: Remove partial load after full store for high part access[PR71309]
v5 update as comments:
1. Move const_rhs out of loop;
2. Iterate from int size for read_mode.

This patch could optimize(works for char/short/int/void*):

6: r119:TI=[r118:DI+0x10]
7: [r118:DI]=r119:TI
8: r121:DI=[r118:DI+0x8]

=>

6: r119:TI=[r118:DI+0x10]
16: r122:DI=r119:TI#8

Final ASM will be as below without partial load after full store(stxv+ld):
  ld 10,16(3)
  mr 9,3
  ld 3,24(3)
  std 10,0(9)
  std 3,8(9)
  blr

It could achieve ~25% performance improvement for typical cases on
Power9.  Bootstrap and regression tested on Power9-LE.

For AArch64, one ldr is replaced by mov with this patch:

ldp     x2, x3, [x0, 16]
stp     x2, x3, [x0]
ldr     x0, [x0, 8]

=>

mov     x1, x0
ldp     x2, x0, [x0, 16]
stp     x2, x0, [x1]

gcc/ChangeLog:

2020-08-04  Xionghu Luo  <luoxhu@linux.ibm.com>

	PR rtl-optimization/71309
	* dse.c (find_shift_sequence): Use subreg of shifted from high part
	register to avoid loading from address.

gcc/testsuite/ChangeLog:

2020-08-04  Xionghu Luo  <luoxhu@linux.ibm.com>

	PR rtl-optimization/71309
	* gcc.target/powerpc/pr71309.c: New test.
2020-08-03 22:09:15 -05:00
GCC Administrator
6a1ad710ad Daily bump. 2020-08-04 00:16:24 +00:00
Marek Polacek
49edfe6d71 c++: Remove unused declaration.
gcc/cp/ChangeLog:

	* cp-tree.h (after_nsdmi_defaulted_late_checks): Remove.
2020-08-03 19:17:41 -04:00
Ian Lance Taylor
2b6a53238f libgcc: increase required stack space for x86_64 -fsplit-stack
This accomodates increased space required by use of the xsavec
instruction in the dynamic linker trampoline.

libgcc/ChangeLog:

	* config/i386/morestack.S (BACKOFF) [x86_64]: Add 2048 bytes.
2020-08-03 16:01:59 -07:00
Segher Boessenkool
c004b383aa rs6000: Fix vector_float.c testcase for -m32
It should be skipped then.

2020-08-03  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
	* gcc.target/powerpc/vector_float.c: Skip if not lp64.
2020-08-03 22:18:10 +00:00
Marek Polacek
50bee766bc c++: Variable template and template parameter pack [PR96218]
This is DR 2032 which says that the restrictions regarding template
parameter packs and default arguments apply to variable templates as
well, but we weren't detecting that.

gcc/cp/ChangeLog:

	DR 2032
	PR c++/96218
	* pt.c (check_default_tmpl_args): Also consider variable
	templates.

gcc/testsuite/ChangeLog:

	DR 2032
	PR c++/96218
	* g++.dg/cpp1y/var-templ67.C: New test.
2020-08-03 17:43:05 -04:00
Jakub Jelinek
90b43856fd aarch64: Fix up __aarch64_cas16_acq_rel fallback
As mentioned in the PR, the fallback path when LSE is unavailable writes
incorrect registers to the memory if the previous content compares equal
to x0, x1 - it writes copy of x0, x1 from the start of function, but it
should write x2, x3.

2020-08-03  Jakub Jelinek  <jakub@redhat.com>

	PR target/96402
	* config/aarch64/lse.S (__aarch64_cas16_acq_rel): Use x2, x3 instead
	of x(tmp0), x(tmp1) in STXP arguments.

	* gcc.target/aarch64/pr96402.c: New test.
2020-08-03 22:55:28 +02:00
Jonathan Wakely
2ac7fe2769 cpp: Do not use @dots for ... tokens in code examples
This prevents a ... token in code examples from being turned into a
single HORIZONTAL ELLIPSIS glyph (e.g. via the HTML &hellip; entity).

gcc/ChangeLog:

	* doc/cpp.texi (Variadic Macros): Use the exact ... token in
	code examples.
2020-08-03 21:16:50 +01:00
Nathan Sidwell
73e8941488 Refer to C++20
I noticed a bunch of references to c++2a.

	gcc/
	* doc/invoke.texi: Refer to c++20
2020-08-03 13:07:23 -07:00
Julian Brown
f2f4212e20 openacc: No attach/detach present/release mappings for array descriptors
Standalone attach and detach clauses should not create present/release
mappings for Fortran array descriptors (e.g. used when we have a pointer
to an array), both because it is unnecessary and because those mappings
will be incorrectly subject to reference counting. Simply omitting the
mappings means we just use GOMP_MAP_TO_PSET and GOMP_MAP_{ATTACH,DETACH}
mappings for array descriptors.

That requires a tweak in gimplify.c, since we may now see GOMP_MAP_TO_PSET
without a preceding data-movement mapping.

2020-08-03  Julian Brown  <julian@codesourcery.com>
	    Thomas Schwinge  <thomas@codesourcery.com>

gcc/fortran/
	* trans-openmp.c (gfc_trans_omp_clauses): Don't create present/release
	mappings for array descriptors.

gcc/
	* gimplify.c (gimplify_omp_target_update): Allow GOMP_MAP_TO_PSET
	without a preceding data-movement mapping.

gcc/testsuite/
	* gfortran.dg/goacc/attach-descriptor.f90: Update pattern output. Add
	scanning of gimplify dump.

libgomp/
	* testsuite/libgomp.oacc-fortran/attach-descriptor-1.f90: Don't run for
	shared-memory devices.  Extend with further checking.

Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
2020-08-03 12:06:49 -07:00
Iain Sandoe
105fe3e0b8 Darwin: Guard two macros in darwin.h.
Work on the Arm64 port shows that these two macros can be declared
ahead of the version in darwin.h which needs to override (for X86
and PPC this wasn't needed).

gcc/ChangeLog:

	* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): UNDEF before
	use.
	(DEF_MIN_OSX_VERSION): Only define if there's no existing
	def.
2020-08-03 19:59:32 +01:00
Iain Sandoe
7ddee9cd99 Darwin: Handle poly_int machine_modes.
The common code that selects suitable sections for literals needs
to inspect the machine_mode.  For some sub-targets that might be
represented as a poly-int.

There was a workaround in place that allowed for cases where the poly
int had only one component.  This removes the workaround and handles
the cases where we care about the machine_mode size.

gcc/ChangeLog:

	* config/darwin.c (IN_TARGET_CODE): Remove.
	(darwin_mergeable_constant_section): Handle poly-int machine modes.
	(machopic_select_rtx_section): Likewise.
2020-08-03 19:48:08 +01:00
Ian Lance Taylor
76eb0434a4 internal/syscall/unix: correct ia64 syscall numbers
Per Andreas Schwab.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246264
2020-08-03 11:03:40 -07:00
Ian Lance Taylor
d8ea6acb5f internal/syscall/unix: define copyFileRangeTrap for all architectures
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/246363
2020-08-03 10:12:31 -07:00
Aldy Hernandez
6c4763fa5b Avoid shifting by amounts larger than target int in irange self-tests.
gcc/ChangeLog:

	PR tree-optimization/96430
	* range-op.cc (operator_tests): Do not shift by 31 on targets with
	integer's smaller than 32 bits.
2020-08-03 18:31:29 +02:00