[PATCH] i386: Fix up V2DI and V1TI inequality comparisons [PR105613]

2022-05-17 Thread Jakub Jelinek via Gcc-patches
Hi! The recent r13-458 change to introduce vec_cmpeqv1tiv1ti and add TARGET_SSE2 support to vec_cmpeqv2div2di works nicely for equality comparisons, but as the testcase shows doesn't work for inequality comparisons. For EQ if we perform comparison with twice as many half-sized elemenets, the resul

[committed] forwprop: Fix a typo and comment formatting

2022-05-17 Thread Jakub Jelinek via Gcc-patches
Hi! When looking around the spot of the PR105591 fix, I've noticed a typo and incorrectly formatted comment. Bootstrapped/regtested on x86_64-linux and i668-linux, committed to trunk as obvious. 2022-05-17 Jakub Jelinek * tree-ssa-forwprop.cc (simplify_bitfield_ref): Spelling fix:

Re: [Patch] OpenMP: Add omp_all_memory support to Fortran

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Fri, May 13, 2022 at 10:51:56PM +0200, Tobias Burnus wrote: > This adds omp_all_memory handling to Fortran, following C/C++ and shamelessly > coping > the C testcases and adapting them to Fortran. > > OK? > > Tobias > - > Siemens Electronic Design Automation GmbH; Anschrift: A

Re: [Patch] libgomp.texi: Add OpenMP 5.2 implementation status

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Sat, May 14, 2022 at 11:33:52PM +0200, Tobias Burnus wrote: > libgomp/ > * libgomp.texi (OpenMP Implementation Status): Add 5.2 table. > > diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi > index b5e5fbb8cca..903b3cc8904 100644 > --- a/libgomp/libgomp.texi > +++ b/libgomp/libgomp.

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Gerald Pfeifer
On Mon, 16 May 2022, Tobias Burnus wrote: > PPS: I think we should consider to further cleanup/consolidate both the > generic gomp landing page and the http://gcc.gnu.org/wiki/openmp wiki. > Current the information is too far spread and too difficult to find. Yes, that sounds like a great idea, to

RE: [PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-17 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: Monday, May 16, 2022 5:48 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de; > jeffreya...@gmail.com > Subject: Re: [PATCH 1/3]middle-end: Add the ability to let the target decide > the method of argument

Re: [Patch] gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Mon, May 16, 2022 at 12:28:45PM +0200, Tobias Burnus wrote: > While 'vendor' and 'kind' is well defined, 'arch' and 'isa' isn't. > > When looking at an 'metadirective' testcase (which oddly uses 'arch(amd)'), > I noticed that LLVM uses 'arch(amdgcn)' while we use 'gcn', cf. e.g. > 'clang/lib/He

Re: [PATCH 15/40] graphite: Extend SCoP detection dump output

2022-05-17 Thread Richard Biener via Gcc-patches
On Mon, 16 May 2022, Tobias Burnus wrote: > As requested by Richard: Rediffed patch. > > Changes: s/.c/.cc/ + some whitespace changes. > (At least in my email reader, some were lost. I also fixed too-long line > issues.) > > In addition, FOR_EACH_LOOP was replaced by 'for (auto loop : ...' > (m

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Mon, May 16, 2022 at 11:42:03AM +0200, Tobias Burnus wrote: > small update (interdiff): s/s/S/ for consistency, missed one GCC 13 commit, > and > improved wording of the enter/exit change. (New wording better captures the > effect; I was thinking too much of the changed spec wording not of the

Re: [PATCH 16/40] graphite: Rename isl_id_for_ssa_name

2022-05-17 Thread Richard Biener via Gcc-patches
On Mon, 16 May 2022, Tobias Burnus wrote: > Rediffed Frederik's patch. Actual change is just s/.c/.cc/ but also a > missing space ? tab. > > On 15.12.21 16:54, Frederik Harwath wrote: > > The SSA names for which this function gets used are always SCoP > > parameters and hence "isl_id_for_paramete

Re: [PATCH 17/40] graphite: Fix minor mistakes in comments

2022-05-17 Thread Richard Biener via Gcc-patches
On Mon, 16 May 2022, Tobias Burnus wrote: > Another comment-only change. > > Otherwise, just re-diffed Frederik's patch. Mostly s/.c/.cc/, but I > added one '. ' that got lost. > > On 15.12.21 16:54, Frederik Harwath wrote: > > * graphite-sese-to-poly.c (build_poly_sr_1): Fix a typo and

Re: [committed] forwprop: Fix a typo and comment formatting

2022-05-17 Thread Hongtao Liu via Gcc-patches
thanks. On Tue, May 17, 2022 at 3:09 PM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > When looking around the spot of the PR105591 fix, I've noticed a typo > and incorrectly formatted comment. > > Bootstrapped/regtested on x86_64-linux and i668-linux, committed to > trunk as obvious. > > 2022-

[Ada] Enable current value propagation within pragma expressions

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes an odd incomplete optimization within pragma expressions. For example, in this code: X := True; pragma Assert (X = True); pragma Assert (X); the first assertion was eliminated by the frontend (regardless of the optimization switches), while the second assertion was only

[Ada] Check token to be "access", reject it if not

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The parser skips the token without verifying it is indeed "access". So any token is accepted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * par-ch3.adb (P_Access_Type_Definition): Outputs an error if token is not "access".diff --git a/gcc/ada/par-ch3.adb b/gcc/ada

[Ada] Fix documentation of using attribute Loop_Entry in pragmas

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Attribute Loop_Entry was initially only allowed to appear in pragmas Loop_Variant and Loop_Invariant. Then it was also allowed to appear in pragmas Assert, Assert_And_Cut and Assume, but this change was not reflected in the GNAT RM. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Implement calls to abstract subprograms in class-wide pre/post-conditions

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
In some special cases involving class-wide pre/post conditions, Ada allows a non-dispatching call to an abstract function (which is usually illegal). Fix a bug in the implementation of Ada's rules about the run-time behavior of such a call. Thanks to Javier Miranda for producing this patch. Teste

[Ada] Use Actions field of freeze nodes for subprograms

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
This has a couple of advantages: 1) the actions are analyzed with checks disabled and 2) they are considered elaboration code by Sem_Elab. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch13.adb (Expand_N_Freeze_Entity): Delete freeze nodes for subprograms only

[Ada] Crash freezing declaration that will raise constraint error

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
When the compiler is built with assertions enabled and processes the following declarations: type Vector_Boolean_Array is array (1 .. 10) of Boolean; O2 : constant Vector_Boolean_Array := [for J in 2 => True]; The expression is rewritten by the frontend with an N_Raise_CE node, which leads

[Ada] Remove superfluous call to Original_Node

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The function Same_Object starts by taking the Original_Node of its arguments. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Remove superfluous call to Original_Node.diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb --- a/gcc/a

[Ada] Streamline implementation of Has_Compatible_Representation

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The predicate is only concerned with the internal representation of types and this representation is shared by the subtypes of a given type, so the implementation can directly look into the (implementation) base types. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/

[Ada] Deal with derived record types in Has_Compatible_Representation

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
More precisely, untagged record types, as tagged record types are already handled by the predicate. If the derived type has not been given its own representation clause, then the representations are the same. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Has

[Ada] Initialize Compiler_State to avoid Constraint_Error

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
When building gnat1 with `-gnatVa` as we do locally, rules like: `gcc -c -gnatyM79 ` will throw a constraint error as `lib.compiler_state` is initialized by par.adb, ie after scanning. Therefore any error_msg thrown during scanning will perform this uninitialized read (which raises a Constraint_Err

[Ada] Typo fix in finalization comment

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Add missing 's' and reformat the comment block. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch7.adb: Fix typo.diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb --- a/gcc/ada/exp_ch7.adb +++ b/gcc/ada/exp_ch7.adb @@ -157,14 +157,14 @@ package body Exp_Ch7 is

[Ada] Don't create calls to Abort_Undefer when not Abort_Allowed

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Prevent creation of references to Abort_Undefer when aborts aren't allowed. Another solution could have been an early return at Expand_N_Asynchronous_Select's beginning, but this would break backends that currently expect trees that do not contain any N_Asynchronous_Selects in their AST (e.g. CodeP

[Ada] Allow 'Reduce with -gnat2022

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
After a period of experimentation, allow 'Reduce in Ada 2022 mode. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_attr.adb (Analyze_Attribute [Attribute_Reduce]): Allow 'Reduce for Ada 2022 and above. * sem_attr.ads (Attribute_Impl_Def): 'Reduce is no lo

[Ada] Take full view of private type

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
This allows to resolve the following: type Rec (<>) is private; type Arr (<>) is private; private type Arr is array (Positive range <>) of Natural; type Rec (L : Natural) is record F1 : Integer; F2 : Arr (1 .. L); end record; Tested on x86_64-pc-

[Ada] Fix bogus visibility error with partially parameterized formal package

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The problem comes from the special instantiation (abbreviated instantiation in GNAT parlance) done to check conformance between a formal package and its corresponding actual in a generic instantiation: the compiler instantiates the formal package, in the context of the generic instantiation, so tha

[Ada] Generic binary search implementation

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Allows binary search in sorted anonymous array (or array-like container). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-binsea.ads, libgnat/g-binsea.adb (GNAT.Binary_Search): New package. * Makefile.rtl (GNATRTL_NONTASKING_OBJS): New item in list.

[Ada] Output.w always writes to stderr

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
There are several debugging procedures called Output.w, and some output-redirection features. This patch modifies Output.w so their output is not redirected; it always goes to standard error. Otherwise, debugging output can get mixed in with some "real" output (perhaps to a file), which causes conf

[Ada] Requires_Cleanup_Actions and N_Protected_Body

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
This patch disallows N_Protected_Body from being passed to Requires_Cleanup_Actions. Protected bodies never need cleanup, and are never passed to Requires_Cleanup_Actions, which is a good thing, because it would blow up on Handled_Statement_Sequence, which doesn't exist for N_Protected_Body. Teste

[Ada] Fix small glitch in Expand_N_Full_Type_Declaration

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The original node is not guaranteed to also be an N_Full_Type_Declaration, so the code needs to look into the node itself. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Expand_N_Full_Type_Declaration): Look into N.diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp

[Ada] Fix Forced sign flag in formatted string

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Fix the Forced sign flag that is incorrectly ignored for scientific notation and shortest representation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/g-forstr.adb (Is_Number): Add scientific notation and shortest representation.diff --git a/gcc/ada/libgna

[Ada] Fix insertion of declaration inside quantified expression

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
When the evaluation of the subtype_indication for the iterator_specification of a quantified_expression leads to the insertion of a type declaration, this should be done with Insert_Action instead of Insert_Before. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch5.adb

[Ada] GNAT.Binary_Search is not internal

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Put package GNAT.Binary_Search to predefined units list. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * impunit.adb: Add "g-binsea" to Non_Imp_File_Names_95 list.diff --git a/gcc/ada/impunit.adb b/gcc/ada/impunit.adb --- a/gcc/ada/impunit.adb +++ b/gcc/ada/impunit.adb @@ -2

[Ada] Cleanups related to front-end SJLJ

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
This patch cleans up some code that is left over from the front-end SJLJ exception handling mechanism, which has been removed. This is in preparation for fixing a finalization-related bug. Most importantly: The documentation is changed: a Handled_Sequence_Of_Statements node CAN contain bo

[Ada] Provide allocation subtype for allocators of a Designated_Storage_Model type

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
When an allocator is for an access type that has a Designated_Storage_Model aspect, and the designated type is an unconstrained record type with discriminants, and the subtype associated with the allocator is constrained, a dereference of the new access value can be passed to the designated type's

[Ada] Allow inlining for proof inside generics

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
For local subprograms without contracts inside generics, allow their inlining for proof in GNATprove mode. This requires forbidding the inlining of subprograms which contain references to object renamings, which would be replaced in the SPARK expansion and violate assumptions of the inlining code.

[Ada] Enhance the warning on C enum with size clause for size /= 32

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
Improve the warning message and silence warning when size > 32, this is likely intentional and does not warrant a warning. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Freeze_Enumeration_Type): Fix comment, enhance message and silence warning for size

[Ada] CUDA: remove code performing kernel registration

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
A previous commit implemented a new kernel registration scheme, using the binder to generate registration code rather than inserting registration code in packages. Now that this new approach has had time to be thoroughly tested, it is time to remove the old approach. Tested on x86_64-pc-linux-gnu

[Ada] Restore defensive guard in checks for volatile actuals

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
When flagging names of volatile objects occurring in actual parameters it is safer to guard against identifiers without entity. This is redundant (because earlier in the resolution of actual parameters we already guard against actuals with Any_Type), but perhaps such identifiers will become allowed

[Ada] Subprogram renaming fails to hide homograph

2022-05-17 Thread Pierre-Marie de Rodat via Gcc-patches
The compiler failed to detect an error where the first prefix of an expanded name given as the renamed subprogram in a subprogram renaming declaration denotes a unit with the same name as the name given for the subprogram renaming. Such a unit must be hidden by the renaming itself. An error check i

[PATCH] tree-optimization/105618 - restore load sinking

2022-05-17 Thread Richard Biener via Gcc-patches
The PR97330 fix caused some missed sinking of loads out of loops the following patch re-instantiates. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2022-05-17 Richard Biener PR tree-optimization/105618 * tree-ssa-sink.cc (statement_sink_location): For virtual

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Tobias Burnus
Hi Jakub & Gerald, first, thanks for all the suggestions! I have now followed Gerald's suggestion to place the table into the main GOMP page. I then also decided to make it more GCC-user orientated than GCC-developer orientated by re-writing the intro (but keeping the old one as background), al

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Tue, May 17, 2022 at 10:49:42AM +0200, Tobias Burnus wrote: > Thoughts on this part? Either place is fine. > > > +Map-order clarificationsGCC? > > This entry I gave up on, it isn't exactly clear to me what that > > bullet is about and once we figure that out, we need to do some archeology > >

Re: [PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-17 Thread Richard Sandiford via Gcc-patches
Tamar Christina writes: […] >> E.g. does the patch avoid the AND in: >> >> #include >> uint8_t foo(uint8_t x, int y) { >> if (y) { >> printf("Foo %d\n", x ? 1 : 2); >> __builtin_abort (); >> } >> return x + 1; >> } >> >> ? > > Morning, > > It does actually, it genera

Re: [PATCH] [x86_64]: Zhaoxin lujiazui enablement

2022-05-17 Thread Mayshao-oc
> On Tue, May 17, 2022 at 5:15 AM mayshao wrote: >> Hi Uros: >> This patch fix Zhaoxin CPU vendor ID detection problem and add >> zhaoxin "lujiazui" processor support. >> Currently gcc can't recognize Zhaoxin CPU(vendor ID "CentaurHauls" >> and "Shanghai") if user use -march=nati

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Tobias Burnus
On 17.05.22 11:00, Jakub Jelinek wrote: BTW, it would be really nice to use colors like https://gcc.gnu.org/projects/cxx-status.html uses, use just GCC versions instead of GCC version and No instead of N and use hyperlinks to changes.html OpenMP ids (or just changes.html if we don't have an id).

Re: [PATCH] OpenMP, libgomp: Add new runtime routines omp_target_memcpy_async and omp_target_memcpy_rect_async

2022-05-17 Thread Marcel Vollweiler
Hi Jakub, --- a/libgomp/libgomp.map +++ b/libgomp/libgomp.map @@ -224,6 +224,8 @@ OMP_5.1 { omp_set_teams_thread_limit_8_; omp_get_teams_thread_limit; omp_get_teams_thread_limit_; +omp_target_memcpy_async; +omp_target_memcpy_rect_async; } OMP_5.0.2; These should be add

Re: [wwwdocs][Patch] Add OpenMP by-GCC-version implementation status

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Tue, May 17, 2022 at 11:50:15AM +0200, Tobias Burnus wrote: > On 17.05.22 11:00, Jakub Jelinek wrote: > > BTW, it would be really nice to use colors like > > https://gcc.gnu.org/projects/cxx-status.html uses, use just GCC versions > > instead of GCC version and No instead of N and use hyperlinks

Re: [PATCH] Expand __builtin_memcmp_eq with ptest for OImode.

2022-05-17 Thread Uros Bizjak via Gcc-patches
On Tue, May 17, 2022 at 3:33 AM Hongtao Liu wrote: > > On Mon, May 16, 2022 at 5:21 PM Uros Bizjak via Gcc-patches > wrote: > > > > On Sat, May 7, 2022 at 7:05 AM liuhongt wrote: > > > > > > This is adjusted patch only for OImode. > > > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m3

Re: [PATCH] i386: Fix up V2DI and V1TI inequality comparisons [PR105613]

2022-05-17 Thread Uros Bizjak via Gcc-patches
On Tue, May 17, 2022 at 9:00 AM Jakub Jelinek wrote: > > Hi! > > The recent r13-458 change to introduce vec_cmpeqv1tiv1ti and > add TARGET_SSE2 support to vec_cmpeqv2div2di works nicely for > equality comparisons, but as the testcase shows doesn't work > for inequality comparisons. > For EQ if we

Re: [PATCH] [i386] recognize bzhi pattern when there's zero_extendsidi.

2022-05-17 Thread Uros Bizjak via Gcc-patches
On Tue, May 17, 2022 at 5:06 AM liuhongt wrote: > > backend has > > 16550(define_insn "*bmi2_bzhi_3_2" > 16551 [(set (match_operand:SWI48 0 "register_operand" "=r") > 16552(and:SWI48 > 16553 (plus:SWI48 > 16554(ashift:SWI48 (const_int 1) > 16555

[PING] Advise to call 'internal_error' instead of 'abort' or 'fancy_abort'

2022-05-17 Thread Thomas Schwinge
Hi! Ping. Grüße Thomas On 2022-05-10T16:03:12+0200, I wrote: > Hi! > > On 2022-05-03T15:46:43+0200, Richard Biener > wrote: >> On Tue, May 3, 2022 at 2:29 PM Thomas Schwinge >> wrote: >>> On 2022-05-03T12:53:50+0200, Richard Biener >>> wrote: >>> > On Tue, May 3, 2022 at 10:16 AM Thomas

[committed] libstdc++: Stop defining C++0x compat symbols for versioned namespace

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, --enable-symvers=gnu and --enable-symvers=gnu-versioned-namespace. Pushed to trunk. -- >8 -- The src/c++11/compatibility*-c++0x.cc files define symbols that need to be exported for ancient versions of libstdc++.so.6 due to changes between C++0x and the final C++11 standard.

[committed] libstdc++: Skip tests that fail for the versioned namespace

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. -- >8 -- Most tests for the contents of header synopses need to be supressed for the versioned namespace build, because redeclaring the entities in std fails when they were originally declared in std::__8. I added these tests recently without the suppression

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: > On Sun, 15 May 2022, Iain Buclaw wrote: >> Excerpts from Marc Aurèle La France's message of Mai 12, 2022 10:29 pm: > >>> No compiler has any business rejecting files for the sole crime of >>> being symlinked to. The followi

Re: [Patch] gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]

2022-05-17 Thread Tobias Burnus
Hi Jakub, hi Andrew, On 17.05.22 10:01, Jakub Jelinek wrote: But the above patch only implements it partially. What is in omp-device-properties-* is for the sake of the host compiler, [...] You need to also change gcc/config/gcn/gcn.cc (gcn_omp_device_kind_arch_isa) case omp_device_arch: handlin

Re: [Patch] gcn/t-omp-device: Add 'amdgcn' as 'arch' [PR105602]

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Tue, May 17, 2022 at 02:45:09PM +0200, Tobias Burnus wrote: > Hi Jakub, hi Andrew, > > On 17.05.22 10:01, Jakub Jelinek wrote: > > But the above patch only implements it partially. > > What is in omp-device-properties-* is for the sake of the host compiler, > > [...] > > You need to also change

[AArch64] Improve SVE dup intrinsics codegen

2022-05-17 Thread Andre Vieira (lists) via Gcc-patches
Hi, This patch teaches the aarch64 backend to improve codegen when using dup with NEON vectors with repeating patterns. It will attempt to use a smaller NEON vector (or element) to limit the number of instructions needed to construct the input vector. Bootstrapped and regression tested  aarc

Re: [PATCH] lto-plugin: add support for feature detection

2022-05-17 Thread Martin Liška
On 5/16/22 17:16, Alexander Monakov wrote: > On Mon, 16 May 2022, Martin Liška wrote: > >> I've implemented first version of the patch, please take a look. > > I'll comment on the patch, feel free to inform me when I should back off > with forcing my opinion in this thread :) I do really welcome

[committed] openmp: Add support for inoutset depend-kind

2022-05-17 Thread Jakub Jelinek via Gcc-patches
Hi! This patch adds support for inoutset depend-kind in depend clauses. It is very similar to the in depend-kind in that a task with a dependency with that depend-kind is dependent on all previously created sibling tasks with matching address unless they have the same depend-kind. In the in depen

Re: [PING] Advise to call 'internal_error' instead of 'abort' or 'fancy_abort'

2022-05-17 Thread Richard Biener via Gcc-patches
On Tue, May 17, 2022 at 12:15 PM Thomas Schwinge wrote: > > Hi! > > Ping. OK. > > Grüße > Thomas > > > On 2022-05-10T16:03:12+0200, I wrote: > > Hi! > > > > On 2022-05-03T15:46:43+0200, Richard Biener > > wrote: > >> On Tue, May 3, 2022 at 2:29 PM Thomas Schwinge > >> wrote: > >>> On 2022-0

[PATCH v2 4/5] xtensa: Add setmemsi insn pattern

2022-05-17 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch introduces setmemsi insn pattern of two kinds, unrolled loop and small loop, for fixed small length and constant initialization value. gcc/ChangeLog: * gcc/config/xtensa/xtensa-protos.h (xtensa_expand_block_set_unrolled_loop, xtensa_expand_block_set_small_loop)

Re: [PATCH] Mitigate -Wmaybe-uninitialized in expmed.cc.

2022-05-17 Thread Martin Liška
On 5/16/22 12:32, Richard Biener wrote: > It only seems to happen with your host compiler though? The set of Yes, happens with just released 12.1 as host compiler: g++ -fcf-protection -fno-PIE -c -g -O2 -DIN_GCC -fPIC-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno

[committed] libgomp: Clarify that omp_display_env is fully implemented

2022-05-17 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP 5.2 added "When called from within a target region the effect is unspecified." restriction to omp_display_env, so it is ok not to support it in target regions (worst case we could add an empty implementation or one with __builtin_trap in there). Committed to trunk and 12.2. 2022-05-17

[PATCH] Do not clear bb->aux in duplicate_loop_body_to_header_edge

2022-05-17 Thread Richard Biener via Gcc-patches
duplicate_loop_body_to_header_edge clears bb->aux which is not wanted by a new use in loop unswitching. The clearing was introduced with r0-69110-g6580ee7781f903 and it seems accidentially so. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. 2022-05-17 Richard Biener *

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Marc Aurèle La France
On Tue, 17 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: On Sun, 15 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 12, 2022 10:29 pm: No compiler has any business rejecting files for the sole crime of b

Re: [PATCH] i386: Remove constraints when used with constant integer predicates.

2022-05-17 Thread Uros Bizjak via Gcc-patches
I have reverted the patch to fix PR105624. Uros. On Sun, May 15, 2022 at 10:10 PM Uros Bizjak wrote: > > const_int_operand and other const*_operand predicates do not need > constraints when the constraint is inherited from the range of > constant integer predicate. Remove the constraint in case

[PATCH] PR tree-optimization/105458 - Check for equivalence after merging relations.

2022-05-17 Thread Andrew MacLeod via Gcc-patches
Sorry, missed this one earlier. When we register a relation, such as LE_EXPR,  we first check if there is an existing relation that applies, and if so they are combined. We were checking if the relation being registered was an EQ_EXPR, and if so, invoked the equivalence oracle.  I was doing

[x86 PATCH take 2] Avoid andn and generate shorter not;and with -Oz.

2022-05-17 Thread Roger Sayle
This is a revised version of my i386 backend patch to avoid andn with -Oz, when an explicit not;and (or not;test) would be (one byte) shorter. https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593168.html This revision incorporates Michael Matz's feedback/suggestions with explicit checks for LE

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Iain Buclaw via Gcc-patches
Excerpts from Marc Aurèle La France's message of Mai 17, 2022 5:31 pm: > On Tue, 17 May 2022, Iain Buclaw wrote: >> Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: >>> On Sun, 15 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 12, 2022

Re: [PATCH] gdc 9, 10 and 11 bug fix

2022-05-17 Thread Marc Aurèle La France
On Tue, 17 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 17, 2022 5:31 pm: On Tue, 17 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La France's message of Mai 16, 2022 11:34 pm: On Sun, 15 May 2022, Iain Buclaw wrote: Excerpts from Marc Aurèle La F

Re: [PATCH] c++: constexpr init of union sub-aggr w/ base [PR105491]

2022-05-17 Thread Patrick Palka via Gcc-patches
On Sat, May 7, 2022 at 5:18 PM Jason Merrill wrote: > > On 5/6/22 16:46, Patrick Palka wrote: > > On Fri, 6 May 2022, Jason Merrill wrote: > > > >> On 5/6/22 16:10, Patrick Palka wrote: > >>> On Fri, 6 May 2022, Patrick Palka wrote: > >>> > On Fri, 6 May 2022, Jason Merrill wrote: > > >>

[x86 PATCH] Correct ix86_rtx_cost for multi-word multiplication.

2022-05-17 Thread Roger Sayle
This is the i386 backend specific piece of my revised patch for PR middle-end/98865, where Richard Biener has suggested that I perform the desired transformation during RTL expansion where the backend can control whether it is profitable to convert a multiplication into a bit-wise AND and a negati

[PATCH, rs6000] Remove the (no longer used) RS6000_BTC defines.

2022-05-17 Thread will schmidt via Gcc-patches
[PATCH, rs6000] Remove the (no longer used) RS6000_BTC defines. Hi, These defines are no longer used once the rs6000 built-in reworks were completed. Would be good to remove them. There was a reference to RS6000_BTC_SPECIAL in a TODO comment in rs6000-builtins.def. That comment remains, but

Re: [PATCH, rs6000] Remove the (no longer used) RS6000_BTC defines.

2022-05-17 Thread Segher Boessenkool
Hi! On Tue, May 17, 2022 at 11:54:10AM -0500, will schmidt wrote: > These defines are no longer used once the rs6000 built-in > reworks were completed. Would be good to remove them. :-) > There was a reference to RS6000_BTC_SPECIAL in a TODO comment > in rs6000-builtins.def. That comment rema

Re: [PATCH v2] PR105169 Fix references to discarded sections

2022-05-17 Thread Giuliano Belinassi via Gcc-patches
On Mon, 2022-05-09 at 13:39 +0200, Richard Biener wrote: > On Sat, 7 May 2022, Giuliano Belinassi wrote: > > > When -fpatchable-function-entry= is enabled, certain C++ codes > > fails to > > link because of generated references to discarded sections in > > __patchable_function_entry section. This

Re: [PATCH v2] PR105169 Fix references to discarded sections

2022-05-17 Thread Richard Biener via Gcc-patches
> Am 17.05.2022 um 19:37 schrieb Giuliano Belinassi via Gcc-patches > : > > On Mon, 2022-05-09 at 13:39 +0200, Richard Biener wrote: >>> On Sat, 7 May 2022, Giuliano Belinassi wrote: >>> >>> When -fpatchable-function-entry= is enabled, certain C++ codes >>> fails to >>> link because of gener

Re: [AArch64] Improve SVE dup intrinsics codegen

2022-05-17 Thread Richard Sandiford via Gcc-patches
"Andre Vieira (lists)" writes: > Hi, > > This patch teaches the aarch64 backend to improve codegen when using dup > with NEON vectors with repeating patterns. It will attempt to use a > smaller NEON vector (or element) to limit the number of instructions > needed to construct the input vector.

RE: [PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-17 Thread Tamar Christina via Gcc-patches
[…] > >> > We generate for e.g.: > >> > > >> > #include > >> > > >> > uint16_t f8 (uint8_t xr, uint8_t xc){ > >> > return (uint8_t)(xr * xc); > >> > } > >> > > >> > (insn 9 6 10 2 (set (reg:HI 101) > >> (zero_extend:HI (reg/v:QI 96 [ xr ]))) "prom.c":4:16 -1 > >> (nil)) > >> (insn 10 9 11 2 (

[PATCH] Simplify logic in tree-scalar-evolution's expensive_expression_p.

2022-05-17 Thread Roger Sayle
This patch simplifies tree-scalar-evolution's expensive_expression_p, but produces identical results; the replacement implementation is just smaller (uses less memory), faster and easier to understand. The current idiom (introduced to fix PR90726) looks like: hash_map cache; uint64_t exp

Re: [PATCH] OpenMP, libgomp: Add new runtime routines omp_target_memcpy_async and omp_target_memcpy_rect_async

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Tue, May 17, 2022 at 11:57:02AM +0200, Marcel Vollweiler wrote: > > More importantly, I have no idea how this can work when you pass arg_size 0 > > and arg_align 0. The s variable is in the current function frame, with > > arg_size 0 nothing is really copied to the generated task. > > arg_size

demangler: Structured Bindings

2022-05-17 Thread Nathan Sidwell
C++ Structured bindings have a mangling that has yet to be formally documented. However, it's been around for a while and shows up for module support. This adds it to the demangler. nathan -- Nathan SidwellFrom 451894cadcf1210883ceefb2d69a0ed2d6a8cd8b Mon Sep 17 00:00:00 2001 From: Nathan Sidw

Re: [Patch] OpenMP: Skip target-nesting warning for reverse offload

2022-05-17 Thread Jakub Jelinek via Gcc-patches
On Mon, May 16, 2022 at 05:14:12PM +0200, Tobias Burnus wrote: > --- a/gcc/omp-low.cc > +++ b/gcc/omp-low.cc > @@ -3883,6 +3883,16 @@ check_omp_nesting_restrictions (gimple *stmt, > omp_context *ctx) > } > else > { > + if ((gimple_omp_target_ki

[COMMITTED] Add ranger side effect infrastructure.

2022-05-17 Thread Andrew MacLeod via Gcc-patches
This patch replaces the old non-null processing mechanism in ranger with generic side-effect processing. The way it use to work: - The first time a query for non-nullness was made on an ssa-name, a quick pass over the immediate use lists was made. - This checked each use for triggering the non-

[PATCH] Add divide by zero side effect.

2022-05-17 Thread Andrew MacLeod via Gcc-patches
I haven't checked this patch in yet.  This implements a side effect that the divisor cannot be 0 after a divide executes. This allows us to fold the divide away: a = b / c; if (c == 0)   dead(); This bootstraps on x86_64-pc-linux-gnu with no regressions, but I first wanted to check to see if

[PATCH] PR tree-optimization/31178 - Add rshift side effect.

2022-05-17 Thread Andrew MacLeod via Gcc-patches
This patch implements side effects of the second operand of a shift operation. given A >> B or A << B, the range of B is restricted to [0, PRECISION_A). Fortran is currently more permissive than this, allowing the range to be [0, PRECISION_A], so this si the value we currently default to in th

[committed] Revert 'Use more ARRAY_SIZE.' for mkoffload (was: [PATCH] Use more ARRAY_SIZE.)

2022-05-17 Thread Tobias Burnus
Hi Martin, On 16.05.22 10:39, Martin Liška wrote: All right, CCing the following maintainers for other parts: - David for JIT and Analyzer - Tobias for Fortran part - Jason for C-family part Sorry for having missed that review request – and thanks to Mikael for doing the review! And thanks f

[committed] libstdc++: Add attributes to and related

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add the const attribute to std::future_category() and std::iostream_category(), to match the existing attributes on std::generic_category() and std::system_category(). Also add [[nodiscard]] to those functions and to the comparison operators fo

[committed] libstdc++: Add attributes to functions in

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add attributes to the accessors for the global memory resource objects, to allow the compiler to eliminate redundant calls to them. For example, multiple calls to std::pmr::new_delete_resource() will always return the same object, and so the com

[committed] libstdc++: Relax memory ordering for default memory resource object

2022-05-17 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Currently pmr::set_default_resource and pmr::get_default_resource both use sequentially consistent memory ordering. This is overkill. The standard only requires that a call to set_default_resource synchronizes with subsequent calls to set_defaul

[PATCH] c: use CONST_DECL for enumerators in TYPE_VALUES

2022-05-17 Thread Marek Polacek via Gcc-patches
The C and C++ FEs differ in TYPE_VALUES for an enum type: an entry in the list in the C++ FE has a CONST_DECL in the TREE_VALUE, but the C FE has only the numerical value of the CONST_DECL there. This has caused me some trouble in my PR105497 patch. Using a CONST_DECL is preferable because a CONS

Re: [PATCH] c: use CONST_DECL for enumerators in TYPE_VALUES

2022-05-17 Thread Joseph Myers
On Tue, 17 May 2022, Marek Polacek via Gcc-patches wrote: > The C and C++ FEs differ in TYPE_VALUES for an enum type: an entry in > the list in the C++ FE has a CONST_DECL in the TREE_VALUE, but the C FE > has only the numerical value of the CONST_DECL there. This has caused > me some trouble in

Re: [PATCH] c: use CONST_DECL for enumerators in TYPE_VALUES

2022-05-17 Thread Marek Polacek via Gcc-patches
On Tue, May 17, 2022 at 09:35:14PM +, Joseph Myers wrote: > On Tue, 17 May 2022, Marek Polacek via Gcc-patches wrote: > > > The C and C++ FEs differ in TYPE_VALUES for an enum type: an entry in > > the list in the C++ FE has a CONST_DECL in the TREE_VALUE, but the C FE > > has only the numeric

Re: [PATCH] c: use CONST_DECL for enumerators in TYPE_VALUES

2022-05-17 Thread Ian Lance Taylor via Gcc-patches
On Tue, May 17, 2022 at 2:46 PM Marek Polacek wrote: > > On Tue, May 17, 2022 at 09:35:14PM +, Joseph Myers wrote: > > On Tue, 17 May 2022, Marek Polacek via Gcc-patches wrote: > > > > > The C and C++ FEs differ in TYPE_VALUES for an enum type: an entry in > > > the list in the C++ FE has a CO

Re: [PATCH] c: use CONST_DECL for enumerators in TYPE_VALUES

2022-05-17 Thread Marek Polacek via Gcc-patches
On Tue, May 17, 2022 at 02:59:00PM -0700, Ian Lance Taylor wrote: > On Tue, May 17, 2022 at 2:46 PM Marek Polacek wrote: > > > > On Tue, May 17, 2022 at 09:35:14PM +, Joseph Myers wrote: > > > On Tue, 17 May 2022, Marek Polacek via Gcc-patches wrote: > > > > > > > The C and C++ FEs differ in T

Re: [PATCH] middle-end/105604 - snprintf dianostics and non-constant sizes/offsets

2022-05-17 Thread Martin Sebor via Gcc-patches
On 5/16/22 03:16, Richard Biener wrote: The following tries to correct get_origin_and_offset_r not handling non-constant sizes of array elements in ARRAY_REFs and non-constant offsets of COMPONENT_REFs. It isn't exactly clear how such failures should be treated in this API and existing handling

[pushed] c++: constexpr ref to array of array [PR102307]

2022-05-17 Thread Jason Merrill via Gcc-patches
The problem here is that first check_initializer calls build_aggr_init_full_exprs, which does overload resolution, but then in the case of failed constexpr throws away the result and does it again in build_functional_cast. But in the first overload resolution, reshape_init_array_1 decided to reuse

Go patch committed: load LHS subexpressions of op= only once

2022-05-17 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend loads LHS subexpressions of op= assignment only once. This avoids inconsistencies if the variables are changed by evaluating the RHS. This fixes https://go.dev/issue/52811. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. There is a

Re: [PATCH v2] rs6000: Prefer assigning the MMA vector operands to altivec registers [PR105556]

2022-05-17 Thread Segher Boessenkool
On Mon, May 16, 2022 at 05:31:31PM -0500, Peter Bergner wrote: > On 5/10/22 5:35 PM, Segher Boessenkool wrote: > > Out of interest, did you try using v,?wa (so just two alternatives, not > > four)? Or did you think it wouldresult in measurably worse code? Or > > did you decide it is not such bad

  1   2   >