]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
2 years agoDaily bump.
GCC Administrator [Mon, 17 Oct 2022 00:18:18 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 16 Oct 2022 00:17:48 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 15 Oct 2022 00:19:24 +0000 (00:19 +0000)] 
Daily bump.

2 years agolto/106540 - fix LTO tree input wrt dwarf2out_register_external_die
Richard Biener [Mon, 8 Aug 2022 07:07:23 +0000 (09:07 +0200)] 
lto/106540 - fix LTO tree input wrt dwarf2out_register_external_die

I've revisited the earlier two workarounds for dwarf2out_register_external_die
getting duplicate entries.  It turns out that r11-525-g03d90a20a1afcb
added dref_queue pruning to lto_input_tree but decl reading uses that
to stream in DECL_INITIAL even when in the middle of SCC streaming.
When that SCC then gets thrown away we can end up with debug nodes
registered which isn't supposed to happen.  The following adjusts
the DECL_INITIAL streaming to go the in-SCC way, using lto_input_tree_1,
since no SCCs are expected at this point, just refs.

PR lto/106540
PR lto/106334
* lto-streamer-in.c (lto_read_tree_1): Use lto_input_tree_1
to input DECL_INITIAL, avoiding to commit drefs.

(cherry picked from commit 4769ac6c5dfde2810a0266fe388211edc644e623)

2 years agotree-optimization/106513 - fix mistake in bswap symbolic number shifts
Richard Biener [Wed, 10 Aug 2022 13:45:22 +0000 (15:45 +0200)] 
tree-optimization/106513 - fix mistake in bswap symbolic number shifts

This fixes a mistake in typing a local variable in the symbolic
shift routine.

PR tree-optimization/106513
* gimple-ssa-store-merging.c (do_shift_rotate): Use uint64_t
for head_marker.

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

(cherry picked from commit f675afa4eeac9910a2c085a95aa04d6d9f2fd8d6)

2 years agomiddle-end/106331 - fix mem attributes for string op arguments
Richard Biener [Tue, 19 Jul 2022 07:57:22 +0000 (09:57 +0200)] 
middle-end/106331 - fix mem attributes for string op arguments

get_memory_rtx tries hard to come up with a MEM_EXPR to record
in the memory attributes but in the last fallback fails to properly
account for an unknown offset and thus, as visible in this testcase,
incorrect alignment computed from set_mem_attributes.  The following
rectifies both parts.

PR middle-end/106331
* builtins.c (get_memory_rtx): Compute alignment from
the original address and set MEM_OFFSET to unknown when
we create a MEM_EXPR from the base object of the address.

* gfortran.dg/pr106331.f90: New testcase.

(cherry picked from commit e4ff11a8f2e80adb8ada69bf35ee6a1ab18a9c85)

2 years agotree-optimization/106131 - wrong code with FRE rewriting
Richard Biener [Thu, 30 Jun 2022 08:33:40 +0000 (10:33 +0200)] 
tree-optimization/106131 - wrong code with FRE rewriting

The following makes sure to not use the original TBAA type for
looking up a value across an aggregate copy when we had to offset
the read.

2022-06-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/106131
* tree-ssa-sccvn.c (vn_reference_lookup_3): Force alias-set
zero when offsetting the read looking through an aggregate
copy.

* g++.dg/torture/pr106131.C: New testcase.

(cherry picked from commit 9701432ff79926a5dd3303be3417e0bd0c24140b)

2 years agotree-optimization/106112 - fix CSE from wider operation
Richard Biener [Tue, 28 Jun 2022 11:57:29 +0000 (13:57 +0200)] 
tree-optimization/106112 - fix CSE from wider operation

The following fixes a mistake in looking up an extended operand
in the CSE of a truncated operation.

2022-06-28  Richard Biener  <rguenther@suse.de>

PR tree-optimization/106112
* tree-ssa-sccvn.c (valueized_wider_op): Properly extend
a constant operand according to its type.

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

(cherry picked from commit 2dbb45d6dc0d20dc159b3d8e27ebb6825074827a)

2 years agoFix PR target/107248
Eric Botcazou [Fri, 14 Oct 2022 09:52:04 +0000 (11:52 +0200)] 
Fix PR target/107248

This is the infamous PR rtl-optimization/38644 rearing its ugly head for
leaf functions on SPARC more than a decade later...  Richard E.'s generic
solution has never been implemented so let's do as other RISC back-ends did.

gcc/
PR target/107248
* config/sparc/sparc.c (sparc_expand_prologue): Emit a frame
blockage for leaf functions.
(sparc_flat_expand_prologue): Emit frame instead of full blockage.
(sparc_expand_epilogue): Emit a frame blockage for leaf functions.
(sparc_flat_expand_epilogue): Emit frame instead of full blockage.

2 years agoDaily bump.
GCC Administrator [Fri, 14 Oct 2022 00:18:34 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 13 Oct 2022 00:20:35 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 12 Oct 2022 00:18:30 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 11 Oct 2022 00:18:04 +0000 (00:18 +0000)] 
Daily bump.

2 years agofortran: Move clobbers after evaluation of all arguments [PR106817]
Mikael Morin [Sat, 3 Sep 2022 09:58:47 +0000 (11:58 +0200)] 
fortran: Move clobbers after evaluation of all arguments [PR106817]

For actual arguments whose dummy is INTENT(OUT), we used to generate
clobbers on them at the same time we generated the argument reference
for the function call.  This was wrong if for an argument coming
later, the value expression was depending on the value of the just-
clobbered argument, and we passed an undefined value in that case.

With this change, clobbers are collected separatedly and appended
to the procedure call preliminary code after all the arguments have been
evaluated.

PR fortran/106817

gcc/fortran/ChangeLog:

* trans-expr.c (gfc_conv_procedure_call): Collect all clobbers
to their own separate block.  Append the block of clobbers to
the procedure preliminary block after the argument evaluation
codes for all the arguments.

gcc/testsuite/ChangeLog:

* gfortran.dg/intent_optimize_4.f90: New test.

(cherry picked from commit 29919bf3b6449bafd02e795abbb1966e3990c1fc)

2 years agofortran: Fix invalid function decl clobber ICE [PR105012]
Mikael Morin [Mon, 29 Aug 2022 09:19:29 +0000 (11:19 +0200)] 
fortran: Fix invalid function decl clobber ICE [PR105012]

The fortran frontend, as result symbol for a function without
declared result symbol, uses the function symbol itself.  This caused
an invalid clobber of a function decl to be emitted, leading to an
ICE, whereas the intended behaviour was to clobber the function result
variable.  This change fixes the problem by getting the decl from the
just-retrieved variable reference after the call to
gfc_conv_expr_reference, instead of copying it from the frontend symbol.

PR fortran/105012

gcc/fortran/ChangeLog:

* trans-expr.c (gfc_conv_procedure_call): Retrieve variable
from the just calculated variable reference.

gcc/testsuite/ChangeLog:

* gfortran.dg/intent_out_15.f90: New test.

(cherry picked from commit edaf1e005c90b311c39b46d85cea17befbece112)

2 years agofortran: Move the clobber generation code
Mikael Morin [Wed, 31 Aug 2022 09:00:45 +0000 (11:00 +0200)] 
fortran: Move the clobber generation code

This change inlines the clobber generation code from
gfc_conv_expr_reference to the single caller from where the add_clobber
flag can be true, and removes the add_clobber argument.

What motivates this is the standard making the procedure call a cause
for a variable to become undefined, which translates to a clobber
generation, so clobber generation should be closely related to procedure
call generation, whereas it is rather orthogonal to variable reference
generation.  Thus the generation of the clobber feels more appropriate
in gfc_conv_procedure_call than in gfc_conv_expr_reference.

Behaviour remains unchanged.

gcc/fortran/ChangeLog:

* trans.h (gfc_conv_expr_reference): Remove add_clobber
argument.
* trans-expr.c (gfc_conv_expr_reference): Ditto. Inline code
depending on add_clobber and conditions controlling it ...
(gfc_conv_procedure_call): ... to here.

(cherry picked from commit 2b393f6f83903cb836676bbd042c1b99a6e7e6f7)

2 years agoDaily bump.
GCC Administrator [Mon, 10 Oct 2022 00:18:01 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 9 Oct 2022 00:19:20 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]
José Rui Faustino de Sousa [Sun, 25 Sep 2022 20:48:55 +0000 (22:48 +0200)] 
Fortran: Fix ICE and wrong code for assumed-rank arrays [PR100029, PR100040]

gcc/fortran/ChangeLog:

PR fortran/100040
PR fortran/100029
* trans-expr.c (gfc_conv_class_to_class): Add code to have
assumed-rank arrays recognized as full arrays and fix the type
of the array assignment.
(gfc_conv_procedure_call): Change order of code blocks such that
the free of ALLOCATABLE dummy arguments with INTENT(OUT) occurs
first.

gcc/testsuite/ChangeLog:

PR fortran/100029
* gfortran.dg/PR100029.f90: New test.

PR fortran/100040
* gfortran.dg/PR100040.f90: New test.

(cherry picked from commit 5299155bb80e90df822e1eebc9f9a0c8e4505a46)

2 years agoDaily bump.
GCC Administrator [Sat, 8 Oct 2022 00:20:01 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 7 Oct 2022 00:18:51 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 6 Oct 2022 09:15:08 +0000 (09:15 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 5 Oct 2022 00:19:10 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 4 Oct 2022 00:19:37 +0000 (00:19 +0000)] 
Daily bump.

2 years agogcc/config/t-i386: add build dependencies on i386-builtin-types.inc
Sergei Trofimovich [Fri, 16 Sep 2022 17:33:11 +0000 (18:33 +0100)] 
gcc/config/t-i386: add build dependencies on i386-builtin-types.inc

i386-builtin-types.inc is included indirectly via i386-builtins.h
into 4 files: i386.cc i386-builtins.cc i386-expand.cc i386-features.cc

Only i386.cc dependency was present in gcc/config/t-i386 makefile.

As a result parallel builds occasionally fail as:

    g++ ... -o i386-builtins.o ... ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc
    In file included from ../../gcc-13-20220911/gcc/config/i386/i386-builtins.cc:92:
    ../../gcc-13-20220911/gcc/config/i386/i386-builtins.h:25:10:
     fatal error: i386-builtin-types.inc: No such file or directory
       25 | #include "i386-builtin-types.inc"
          |          ^~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    make[3]: *** [../../gcc-13-20220911/gcc/config/i386/t-i386:54: i386-builtins.o]
      Error 1 shuffle=1663349189

gcc/
PR target/107064
* config/i386/t-i386: Add build-time dependencies against
i386-builtin-types.inc to i386-builtins.o, i386-expand.o,
i386-features.o.

(cherry picked from commit ef3165736d9daafba88adb2db65b2e8ebf0024ca)

2 years agoDaily bump.
GCC Administrator [Mon, 3 Oct 2022 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 2 Oct 2022 00:19:14 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: Fix function attributes [PR100132]
José Rui Faustino de Sousa [Mon, 19 Sep 2022 20:00:45 +0000 (22:00 +0200)] 
Fortran: Fix function attributes [PR100132]

gcc/fortran/ChangeLog:

PR fortran/100132
* trans-types.c (create_fn_spec): Fix function attributes when
passing polymorphic pointers.

gcc/testsuite/ChangeLog:

PR fortran/100132
* gfortran.dg/PR100132.f90: New test.

(cherry picked from commit be60aa5b608b5f09fadfeff852a46589ac311a42)

2 years agoDaily bump.
GCC Administrator [Sat, 1 Oct 2022 00:19:22 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: error recovery while simplifying intrinsic UNPACK [PR107054]
Harald Anlauf [Tue, 27 Sep 2022 18:54:28 +0000 (20:54 +0200)] 
Fortran: error recovery while simplifying intrinsic UNPACK [PR107054]

gcc/fortran/ChangeLog:

PR fortran/107054
* simplify.c (gfc_simplify_unpack): Replace assert by condition
that terminates simplification when there are not enough elements
in the constructor of argument VECTOR.

gcc/testsuite/ChangeLog:

PR fortran/107054
* gfortran.dg/pr107054.f90: New test.

(cherry picked from commit 78bc6497fc61bbdacfb416ee0246a775360d9af6)

2 years agoFortran: fix ICE in generate_coarray_sym_init [PR82868]
Harald Anlauf [Wed, 21 Sep 2022 17:55:30 +0000 (19:55 +0200)] 
Fortran: fix ICE in generate_coarray_sym_init [PR82868]

gcc/fortran/ChangeLog:

PR fortran/82868
* trans-decl.c (generate_coarray_sym_init): Skip symbol
if attr.associate_var.

gcc/testsuite/ChangeLog:

PR fortran/82868
* gfortran.dg/associate_26a.f90: New test.

(cherry picked from commit bc71318a91286b5f00e88f07aab818ac82510692)

2 years agoFortran: NULL pointer dereference in invalid simplification [PR106985]
Harald Anlauf [Tue, 20 Sep 2022 20:23:43 +0000 (22:23 +0200)] 
Fortran: NULL pointer dereference in invalid simplification [PR106985]

gcc/fortran/ChangeLog:

PR fortran/106985
* expr.c (gfc_simplify_expr): Avoid NULL pointer dereference.

gcc/testsuite/ChangeLog:

PR fortran/106985
* gfortran.dg/pr106985.f90: New test.

(cherry picked from commit 8dbb15bc2d019488240c1e69d93121b0347ac092)

2 years agoFortran: improve error recovery while simplifying size of bad array [PR103694]
Harald Anlauf [Tue, 23 Aug 2022 20:16:14 +0000 (22:16 +0200)] 
Fortran: improve error recovery while simplifying size of bad array [PR103694]

gcc/fortran/ChangeLog:

PR fortran/103694
* simplify.c (simplify_size): The size expression of an array cannot
be simplified if an error occurs while resolving the array spec.

gcc/testsuite/ChangeLog:

PR fortran/103694
* gfortran.dg/pr103694.f90: New test.

(cherry picked from commit 55d8c5409325001c89c35c3d04d425dec9127146)

2 years agoDaily bump.
GCC Administrator [Fri, 30 Sep 2022 00:18:36 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 29 Sep 2022 00:18:23 +0000 (00:18 +0000)] 
Daily bump.

2 years agoaarch64: Add support for -mcpu=neoverse-v2
Kyrylo Tkachov [Wed, 28 Sep 2022 15:48:14 +0000 (16:48 +0100)] 
aarch64: Add support for -mcpu=neoverse-v2

This is a GCC 10 version of https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602105.html
There are no tuning structures to rename so the patch is (even) smaller than the GCC 12 and trunk
versions.

Bootstrapped and tested on aarch64-none-linux-gnu.

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (neoverse-v2): New entry.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document neoverse-v2.

2 years agoDaily bump.
GCC Administrator [Wed, 28 Sep 2022 00:18:52 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 27 Sep 2022 00:18:55 +0000 (00:18 +0000)] 
Daily bump.

2 years agoFortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]
Harald Anlauf [Tue, 20 Sep 2022 20:41:48 +0000 (22:41 +0200)] 
Fortran: error recovery on invalid ARRAY argument to FINDLOC [PR106986]

gcc/fortran/ChangeLog:

PR fortran/106986
* simplify.c (gfc_simplify_findloc): Do not try to simplify
intrinsic FINDLOC when the ARRAY argument has a NULL shape.

gcc/testsuite/ChangeLog:

PR fortran/106986
* gfortran.dg/pr106986.f90: New test.

(cherry picked from commit 5976fbf9d5dd9542fcb82eebb2185886fd52d000)

2 years agoDaily bump.
GCC Administrator [Mon, 26 Sep 2022 00:19:05 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 25 Sep 2022 00:18:54 +0000 (00:18 +0000)] 
Daily bump.

2 years agoFortran: Fix ICE with automatic reallocation [PR100245]
José Rui Faustino de Sousa [Fri, 2 Sep 2022 19:35:22 +0000 (21:35 +0200)] 
Fortran: Fix ICE with automatic reallocation [PR100245]

gcc/fortran/ChangeLog:

PR fortran/100245
* trans-expr.c (trans_class_assignment): Add if clause to handle
derived type in the LHS.

gcc/testsuite/ChangeLog:

PR fortran/100245
* gfortran.dg/PR100245.f90: New test.

(cherry picked from commit 504424f33771be0405454e7845219d5df1bb88bb)

2 years agoDaily bump.
GCC Administrator [Sat, 24 Sep 2022 00:18:06 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 23 Sep 2022 00:19:44 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFortran: catch NULL pointer dereferences while simplifying PACK [PR106857]
Harald Anlauf [Thu, 15 Sep 2022 20:39:24 +0000 (22:39 +0200)] 
Fortran: catch NULL pointer dereferences while simplifying PACK [PR106857]

gcc/fortran/ChangeLog:

PR fortran/106857
* simplify.c (gfc_simplify_pack): Check for NULL pointer dereferences
while walking through constructors (error recovery).

gcc/testsuite/ChangeLog:

PR fortran/106857
* gfortran.dg/pr106857.f90: New test.

(cherry picked from commit 2b75d5f533b9d6b39f4055949aff64ed0d22dd24)

2 years agoDaily bump.
GCC Administrator [Thu, 22 Sep 2022 00:20:45 +0000 (00:20 +0000)] 
Daily bump.

2 years agoaarch64: Fix GTY markup for arm_sve.h [PR106491]
Richard Sandiford [Wed, 21 Sep 2022 13:17:43 +0000 (14:17 +0100)] 
aarch64: Fix GTY markup for arm_sve.h [PR106491]

It turns out that GTY(()) markers in definitions like:

  GTY(()) tree scalar_types[NUM_VECTOR_TYPES];

are not effective and are silently ignored.  The GTY(()) has
to come after an extern or static.

The externs associated with the SVE ACLE GTY variables are in
aarch64-sve-builtins.h.  This file is not in tm_include_list because
we don't want every target-facing file to include it.  It therefore
isn't in the list of GC header files either.

In this case that's a blessing in disguise, since the variables
belong to a namespace and gengtype doesn't understand namespaces.
I think the fix is instead to add an extra extern before each
variable declaration, similarly to varasm.cc and vtable-verify.cc.
(This works due to a "using namespace" at the end of the file.)

gcc/
PR target/106491
* config/aarch64/aarch64-sve-builtins.cc (scalar_types)
(acle_vector_types, acle_svpattern, acle_svprfop): Add GTY
markup to (new) extern declarations instead of to the main
definition.

(cherry picked from commit 6bf5a704d36243c4c04b17a9408ebe881beb0051)

2 years agoDaily bump.
GCC Administrator [Wed, 21 Sep 2022 00:20:50 +0000 (00:20 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 20 Sep 2022 00:19:30 +0000 (00:19 +0000)] 
Daily bump.

2 years agoFix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints
Georg-Johann Lay [Mon, 19 Sep 2022 07:46:58 +0000 (09:46 +0200)] 
Fix PR target/99184: Wrong cast from double to 16-bit and 32-bit ints

this patch fixed PR target/99184 which incorrectly rounded during 64-bit
(long) double to 16-bit and 32-bit integers.

The patch just removes the respective roundings from
libf7-asm.sx::to_integer and ::to_unsigned.  Luckily, LibF7 does nowhere
use respective functions internally, the only user is in libf7.c::f7_exp

which reads

   f7_round (qq, qq);
   int16_t q = f7_get_s16 (qq);

so that f7_get_s16() operates on an already rounded value, and therefore
this code works unaltered with or without rounding in to_integer.

PR target/99184
libgcc/config/avr/libf7/
* libf7-asm.sx (to_integer, to_unsigned): Don't round 16-bit
and 32-bit integers.

(cherry picked from commit 0b5b8ac5cb7fe92dd17ae8bd7de84640daa59e84)

2 years agoDaily bump.
GCC Administrator [Mon, 19 Sep 2022 00:19:39 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 18 Sep 2022 00:18:54 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 17 Sep 2022 00:19:54 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 16 Sep 2022 00:18:34 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 15 Sep 2022 00:20:34 +0000 (00:20 +0000)] 
Daily bump.

2 years ago[nvptx] Add uniform_warp_check insn
Tom de Vries [Fri, 28 Jan 2022 09:28:59 +0000 (10:28 +0100)] 
[nvptx] Add uniform_warp_check insn

On a GT 1030, with driver version 470.94 and -mptx=3.1 I run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \
  -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \
  -O2 execution test
...
which minimizes to the same test-case as listed in commit "[nvptx]
Update default ptx isa to 6.3".

The problem is again that the first diverging branch is not handled as such in
SASS, which causes problems with a subsequent shfl insn, but given that we
have -mptx=3.1 we can't use the bar.warp.sync insn.

Given that the default is now -mptx=6.3, and consequently -mptx=3.1 is of a
lesser importance, implement the next best thing: abort when detecting
non-convergence using this insn:
...
  { .reg.b32 act;
    vote.ballot.b32 act,1;
    .reg.pred uni;
    setp.eq.b32 uni,act,0xffffffff;
    @ !uni trap;
    @ !uni exit;
  }
...

Interestingly, the effect of this is that rather than aborting, the test-case
now passes.

Tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

2022-01-31  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.c (nvptx_single): Use nvptx_uniform_warp_check.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add
UNSPECV_UNIFORM_WARP_CHECK.
(define_insn "nvptx_uniform_warp_check"): New define_insn.

(cherry picked from commit f32f74c2e8cef5fe37af6d4e8d7e8f6b4c8ae9a8)

2 years ago[nvptx] Add bar.warp.sync
Tom de Vries [Thu, 27 Jan 2022 14:03:59 +0000 (15:03 +0100)] 
[nvptx] Add bar.warp.sync

On a GT 1030 (sm_61), with driver version 470.94 I run into:
...
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/parallel-dims.c \
  -DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none \
  -O2 execution test
...
which minimizes to the same test-case as listed in commit "[nvptx] Update
default ptx isa to 6.3".

The first divergent branch looks like:
...
  {
    .reg .u32 %x;
    mov.u32 %x,%tid.x;
    setp.ne.u32 %r59,%x,0;
  }
  @ %r59 bra $L15;
  mov.u64 %r48,%ar0;
  mov.u32 %r22,2;
  ld.u64 %r53,[%r48];
  mov.u32 %r55,%r22;
  mov.u32 %r54,1;
 $L15:
...
and when inspecting the generated SASS, the branch is not setup as a divergent
branch, but instead as a regular branch.

This causes us to execute a shfl.sync insn in divergent mode, which is likely
to cause trouble given a remark in the ptx isa version 6.3, which mentions
that for .target sm_6x or below, all threads must excute the same
shfl.sync instruction in convergence.

Fix this by placing a "bar.warp.sync 0xffffffff" at the desired convergence
point (in the example above, after $L15).

Tested on x86_64 with nvptx accelerator.

gcc/ChangeLog:

2022-01-31  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.c (nvptx_single): Use nvptx_warpsync.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add
UNSPECV_WARPSYNC.
(define_insn "nvptx_warpsync"): New define_insn.

(cherry picked from commit bba61d403d05202deb698b352a4faef3feb1f04d)

2 years agonvptx: Define (dummy) 'TARGET_PTX_6_0'
Thomas Schwinge [Tue, 13 Sep 2022 15:26:33 +0000 (17:26 +0200)] 
nvptx: Define (dummy) 'TARGET_PTX_6_0'

'TARGET_PTX_*' not applicable before GCC 12, but makes it easier to cherry-pick
patches.

gcc/
* config/nvptx/nvptx.h (TARGET_PTX_6_0): '#define' to 'false'.

2 years agoDaily bump.
GCC Administrator [Wed, 14 Sep 2022 00:19:43 +0000 (00:19 +0000)] 
Daily bump.

2 years agors6000: Don't ICE when we disassemble an MMA variable [PR101322]
Peter Bergner [Thu, 1 Sep 2022 02:14:36 +0000 (21:14 -0500)] 
rs6000: Don't ICE when we disassemble an MMA variable [PR101322]

When we expand an MMA disassemble built-in with C++ using a pointer that
is cast to a valid MMA type, the type isn't passed down to the expand
machinery and we end up using the base type of the pointer which leads to
an ICE.  This patch enforces we always use the correct MMA type regardless
of the pointer type being used.

2022-08-31  Peter Bergner  <bergner@linux.ibm.com>

gcc/
PR target/101322
* config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin):
Enforce the use of a valid MMA pointer type.

gcc/testsuite/
PR target/101322
* g++.target/powerpc/pr101322.C: New test.

(cherry picked from commit 2985049049f12b0aa3366ca244d387820385b9e8)

2 years agors6000/test: Fix empty TU in some cases of effective targets [PR106345]
Kewen Lin [Wed, 7 Sep 2022 01:37:57 +0000 (20:37 -0500)] 
rs6000/test: Fix empty TU in some cases of effective targets [PR106345]

As the failure of test case gcc.target/powerpc/pr92398.p9-.c in
PR106345 shows, some test sources for some powerpc effective
targets use empty translation unit wrongly.  The test sources
could go with options like "-ansi -pedantic-errors", then those
effective target checkings will fail unexpectedly with the
error messages like:

  error: ISO C forbids an empty translation unit [-Wpedantic]

This patch is to fix empty TUs with one dummy function definition
accordingly.

PR testsuite/106345

gcc/testsuite/ChangeLog:

* lib/target-supports.exp (check_effective_target_has_arch_pwr5): Add
a function definition to avoid pedwarn about empty translation unit.
(check_effective_target_has_arch_pwr6): Likewise.
(check_effective_target_has_arch_pwr7): Likewise.
(check_effective_target_has_arch_pwr8): Likewise.
(check_effective_target_has_arch_pwr9): Likewise.
(check_effective_target_has_arch_ppc64): Likewise.
(check_effective_target_ppc_float128): Likewise.
(check_effective_target_ppc_float128_insns): Likewise.
(check_effective_target_powerpc_vsx): Likewise.

(cherry picked from commit 7a43e52a48b6403a99d3e8ab3105869b4b3c081e)

2 years agoDaily bump.
GCC Administrator [Tue, 13 Sep 2022 00:19:51 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 12 Sep 2022 00:19:16 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 11 Sep 2022 00:18:58 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 10 Sep 2022 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 9 Sep 2022 00:19:41 +0000 (00:19 +0000)] 
Daily bump.

2 years agoRTEMS: Add -mvrsave multilibs
Sebastian Huber [Thu, 1 Sep 2022 08:22:47 +0000 (10:22 +0200)] 
RTEMS: Add -mvrsave multilibs

gcc/ChangeLog:

* config/rs6000/rtems.h (CPP_OS_DEFAULT_SPEC): Define __PPC_VRSAVE__ if
-mvrsave is present.
* config/rs6000/t-rtems: Add -mvrsave multilib variants for
-mcpu=e6500.

2 years agoDaily bump.
GCC Administrator [Thu, 8 Sep 2022 00:19:55 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 7 Sep 2022 00:19:12 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 6 Sep 2022 00:18:24 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 5 Sep 2022 00:18:24 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 4 Sep 2022 00:18:43 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 3 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 2 Sep 2022 00:17:55 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 1 Sep 2022 00:18:39 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Wed, 31 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Allow conversions of MMA pointer types [PR106017]
Peter Bergner [Sun, 28 Aug 2022 00:44:16 +0000 (19:44 -0500)] 
rs6000: Allow conversions of MMA pointer types [PR106017]

GCC incorrectly disables conversions between MMA pointer types, which
are allowed with clang.  The original intent was to disable conversions
between MMA types and other other types, but pointer conversions should
have been allowed.  The fix is to just remove the MMA pointer conversion
handling code altogether.

gcc/
PR target/106017
* config/rs6000/rs6000.c (rs6000_invalid_conversion): Remove handling
of MMA pointer conversions.

gcc/testsuite/
PR target/106017
* gcc.target/powerpc/pr106017.c: New test.

(cherry picked from commit 1ae1325f24cea1698b56e4299d95446a1f7b90a2)

2 years agoDaily bump.
GCC Administrator [Tue, 30 Aug 2022 00:18:08 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 29 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 28 Aug 2022 00:17:39 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 27 Aug 2022 00:17:56 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 26 Aug 2022 00:17:34 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 25 Aug 2022 00:17:42 +0000 (00:17 +0000)] 
Daily bump.

2 years agors6000: Adjust mov optabs for opaque modes [PR103353]
Kewen Lin [Tue, 23 Aug 2022 08:31:17 +0000 (03:31 -0500)] 
rs6000: Adjust mov optabs for opaque modes [PR103353]

As PR103353 shows, we may want to continue to expand built-in
function __builtin_vsx_lxvp, even if we have already emitted
error messages about some missing required conditions.  As
shown in that PR, without one explicit mov optab on OOmode
provided, it would call emit_move_insn recursively.

So this patch is to allow the mov pattern to be generated during
expanding phase if compiler has already seen errors.

PR target/103353

gcc/ChangeLog:

* config/rs6000/mma.md (define_expand movpoi): Move TARGET_MMA condition
check to preparation statements and add handlings for !TARGET_MMA.
(define_expand movpxi): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/powerpc/pr103353.c: New test.

(cherry picked from commit 9367e3a65f874dffc8f8a3b6760e77fd9ed67117)

2 years agoDaily bump.
GCC Administrator [Wed, 24 Aug 2022 00:17:41 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Tue, 23 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 22 Aug 2022 00:17:47 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 21 Aug 2022 00:22:06 +0000 (00:22 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 20 Aug 2022 00:17:43 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Fri, 19 Aug 2022 00:18:05 +0000 (00:18 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Thu, 18 Aug 2022 00:18:25 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Make the has_arch target selectors actually work
Segher Boessenkool [Tue, 26 Apr 2022 11:26:09 +0000 (11:26 +0000)] 
rs6000: Make the has_arch target selectors actually work

2022-04-26  Segher Boessenkoool  <segher@kernel.crashing.org>

gcc/testsuite/
PR target/105349
* lib/target-supports.exp (check_effective_target_has_arch_pwr5): Use
the specified dg-options.
(check_effective_target_has_arch_pwr6): Ditto.
(check_effective_target_has_arch_pwr7): Ditto.
(check_effective_target_has_arch_pwr8): Ditto.
(check_effective_target_has_arch_pwr9): Ditto.
(check_effective_target_has_arch_ppc64): Ditto.

(cherry picked from commit ad56a60f58c1ed662deaf60d5736c332ec2caabb)

2 years agors6000: Add effective target has_arch_ppc64
Segher Boessenkool [Thu, 21 Apr 2022 18:32:48 +0000 (18:32 +0000)] 
rs6000: Add effective target has_arch_ppc64

This is true if we have -mpowerpc64.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_has_arch_ppc64): New.

(cherry picked from commit fc9deca632c2eb246c54cfd13cb616bf3fcbd21a)

2 years agoDaily bump.
GCC Administrator [Wed, 17 Aug 2022 00:18:56 +0000 (00:18 +0000)] 
Daily bump.

2 years agors6000: Disparage lfiwzx and similar
Segher Boessenkool [Sun, 2 Jan 2022 14:08:35 +0000 (14:08 +0000)] 
rs6000: Disparage lfiwzx and similar

RA now chooses GEN_OR_VSX_REGS in most cases.  This is great in most
cases, but we often (or always?) use {l,st}{f,xs}iwzx now, which is
problematic because the integer load and store insns can use cheaper
addressing modes.  We can fix that by putting a small penalty on the
instruction alternatives for those.

2022-04-21  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/103197
PR target/102146
* config/rs6000/rs6000.md (zero_extendqi<mode>2 for EXTQI): Disparage
the "Z" alternatives in {l,st}{f,xs}iwzx.
(zero_extendhi<mode>2 for EXTHI): Ditto.
(zero_extendsi<mode>2 for EXTSI): Ditto.
(*movsi_internal1): Ditto.
(*mov<mode>_internal1 for QHI): Ditto.
(movsd_hardfloat): Ditto.

(cherry picked from commit 26fa464f42622c60d6929720dd37143a21054ede)

2 years agod: Update DIP links in gdc documentation to point at upstream repository
Iain Buclaw [Tue, 16 Aug 2022 10:22:10 +0000 (12:22 +0200)] 
d: Update DIP links in gdc documentation to point at upstream repository

The wiki links probably worked at some point in the distant past, but
now the official location of tracking all D Improvement Proposals is on
the upstream dlang/DIPs GitHub repository.

PR d/106638

gcc/d/ChangeLog:

* gdc.texi: Update DIP links to point at upstream dlang/DIPs
repository.

(cherry picked from commit e56b695aa3aed3c0c80616bba569bbeb4a06b5e5)

2 years agoDaily bump.
GCC Administrator [Tue, 16 Aug 2022 00:19:21 +0000 (00:19 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Mon, 15 Aug 2022 00:17:32 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sun, 14 Aug 2022 00:17:58 +0000 (00:17 +0000)] 
Daily bump.

2 years agoDaily bump.
GCC Administrator [Sat, 13 Aug 2022 00:17:48 +0000 (00:17 +0000)] 
Daily bump.