Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-23 Thread Hongtao Liu via Gcc-patches
On Thu, Sep 23, 2021 at 11:18 PM Martin Sebor wrote: > > On 9/23/21 12:30 AM, Richard Biener wrote: > > On Thu, 23 Sep 2021, Hongtao Liu wrote: > > > >> On Thu, Sep 23, 2021 at 9:48 AM Hongtao Liu wrote: > >>> > >>> On Wed, Sep 22, 2021 at 10:21 PM Martin Sebor wrote: > > On 9/21/21

Re: [PATCH] AVX512FP16: Support cond_op for HFmode

2021-09-23 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 24, 2021 at 10:16 AM Hongyu Wang via Gcc-patches wrote: > > > >This patch extend the expanders for cond_op to support vector HF modes. > > >bootstraped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Do runtime tests passe on sde{-m32,}? > > Yes, forgot to mention this. > > Liu,

Re: [PATCH] AVX512FP16: Support cond_op for HFmode

2021-09-23 Thread Hongyu Wang via Gcc-patches
> >This patch extend the expanders for cond_op to support vector HF modes. > >bootstraped and regtested on x86_64-pc-linux-gnu{-m32,}. > Do runtime tests passe on sde{-m32,}? Yes, forgot to mention this. Liu, Hongtao via Gcc-patches 于2021年9月23日周四 下午5:31写道: > > > > >-Original Message- >

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread H.J. Lu via Gcc-patches
On Thu, Sep 23, 2021 at 6:58 PM Hongtao Liu wrote: > > On Fri, Sep 24, 2021 at 9:42 AM H.J. Lu wrote: > > > > On Thu, Sep 23, 2021 at 6:38 PM Hongtao Liu wrote: > > > > > > On Fri, Sep 24, 2021 at 9:20 AM H.J. Lu wrote: > > > > > > > > On Thu, Sep 23, 2021 at 6:17 PM liuhongt wrote: > > > > >

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 24, 2021 at 9:42 AM H.J. Lu wrote: > > On Thu, Sep 23, 2021 at 6:38 PM Hongtao Liu wrote: > > > > On Fri, Sep 24, 2021 at 9:20 AM H.J. Lu wrote: > > > > > > On Thu, Sep 23, 2021 at 6:17 PM liuhongt wrote: > > > > > > > > Updated, mention _Float16 support. > > > > > > > > --- > > >

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread H.J. Lu via Gcc-patches
On Thu, Sep 23, 2021 at 6:38 PM Hongtao Liu wrote: > > On Fri, Sep 24, 2021 at 9:20 AM H.J. Lu wrote: > > > > On Thu, Sep 23, 2021 at 6:17 PM liuhongt wrote: > > > > > > Updated, mention _Float16 support. > > > > > > --- > > > htdocs/gcc-12/changes.html | 13 - > > > 1 file

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread Hongtao Liu via Gcc-patches
On Fri, Sep 24, 2021 at 9:20 AM H.J. Lu wrote: > > On Thu, Sep 23, 2021 at 6:17 PM liuhongt wrote: > > > > Updated, mention _Float16 support. > > > > --- > > htdocs/gcc-12/changes.html | 13 - > > 1 file changed, 12 insertions(+), 1 deletion(-) > > > > diff --git

Re: [PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread H.J. Lu via Gcc-patches
On Thu, Sep 23, 2021 at 6:17 PM liuhongt wrote: > > Updated, mention _Float16 support. > > --- > htdocs/gcc-12/changes.html | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html > index 81f62fe3..f19c6718

[PATCH] [GCC12] Mention Intel AVX512-FP16 and _Float16 support.

2021-09-23 Thread liuhongt via Gcc-patches
Updated, mention _Float16 support. --- htdocs/gcc-12/changes.html | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/gcc-12/changes.html b/htdocs/gcc-12/changes.html index 81f62fe3..f19c6718 100644 --- a/htdocs/gcc-12/changes.html +++

Re: [PATCH] PR fortran/102458 - ICE tree check: expected array_type, have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:6136

2021-09-23 Thread Jerry D via Gcc-patches
Harald, Looks good. OK and thanks for your time and efforts. Jerry On 9/23/21 12:47 PM, Harald Anlauf via Fortran wrote: Dear Fortranners, we missed certain intrinsics as being disallowed in constant expressions, which lead to an ICE when these intrinsics were used in a specification

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-23 Thread Michel Morin via Gcc-patches
On Fri, Sep 24, 2021 at 5:29 AM Jason Merrill wrote: > > On Wed, Sep 22, 2021 at 7:05 PM Michel Morin wrote: > > On Thu, Sep 23, 2021 at 5:09 AM Jason Merrill wrote: > > > > On 9/21/21 20:53, Michel Morin wrote: > > > On Tue, Sep 21, 2021 at 5:24 AM Jason Merrill >

[PATCH, Fortran] Add missing diagnostic for F2018 C711 (TS29113 C407c)

2021-09-23 Thread Sandra Loosemore
Here's another missing-diagnostic patch for the Fortran front end, this time for PR Fortran/101333. OK to commit? -Sandra commit 53171e748e28901693ca4362ff658883dab97e13 Author: Sandra Loosemore Date: Thu Sep 23 15:00:43 2021 -0700 Fortran: Add missing diagnostic for F2018 C711

Re: [PATCH v3] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-09-23 Thread Jason Merrill via Gcc-patches
On 9/23/21 15:49, Uecker, Martin wrote: Am Mittwoch, den 22.09.2021, 17:18 -0400 schrieb Jason Merrill: On 9/5/21 15:14, Uecker, Martin wrote: Here is the third version of the patch. This also fixes the index zero case. Thus, this should be a complete fix for 91038 and should fix all cases

[PATCH] real: fix encoding of negative IEEE double/quad values [PR98216]

2021-09-23 Thread Patrick Palka via Gcc-patches
In encode_ieee_double/quad, the assignment unsigned long VAL = r->sign << 31; is intended to set the 31st bit of VAL whenever the given REAL_CST is negative. But on LP64 hosts it also unintentionally sets the upper 32 bits of VAL due to the promotion of r->sign from unsigned:1 to int and the

Re: [PATCH] wwwdocs: [GCC12] Mention Intel AVX512-FP16.

2021-09-23 Thread Joseph Myers
On Thu, 23 Sep 2021, liuhongt via Gcc-patches wrote: > +IA-32/x86-64 > + > + New ISA extension support for Intel AVX512-FP16 was added to GCC. > + AVX512FP16 intrinsics are available via the -mavx512fp16 > + compiler switch. > + I think the support for _Float16 should be mentioned in

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-23 Thread Jason Merrill via Gcc-patches
On Wed, Sep 22, 2021 at 7:05 PM Michel Morin wrote: On Thu, Sep 23, 2021 at 5:09 AM Jason Merrill wrote: > > On 9/21/21 20:53, Michel Morin wrote: > > On Tue, Sep 21, 2021 at 5:24 AM Jason Merrill wrote: > >> > >> On 9/17/21 13:31, Michel Morin wrote: > >>> On

Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange

2021-09-23 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Sep 2021, 20:07 Jakub Jelinek via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Thu, Sep 23, 2021 at 11:08:37AM -0700, Thomas Rodgers wrote: > > From: Thomas Rodgers > > > > This change implements P0528 which requires that padding bits not > > participate in atomic compare exchange

Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange

2021-09-23 Thread Thomas Rodgers via Gcc-patches
Agreed, I'll revise the patch to do so. On Thu, Sep 23, 2021 at 12:07 PM Jakub Jelinek wrote: > On Thu, Sep 23, 2021 at 11:08:37AM -0700, Thomas Rodgers wrote: > > From: Thomas Rodgers > > > > This change implements P0528 which requires that padding bits not > > participate in atomic compare

Re: [PATCH v3] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-09-23 Thread Uecker, Martin
Am Mittwoch, den 22.09.2021, 17:18 -0400 schrieb Jason Merrill: > On 9/5/21 15:14, Uecker, Martin wrote: > > Here is the third version of the patch. This also > > fixes the index zero case. Thus, this should be > > a complete fix for 91038 and should fix all cases > > also supported by clang.

[PATCH] PR fortran/102458 - ICE tree check: expected array_type, have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:6136

2021-09-23 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, we missed certain intrinsics as being disallowed in constant expressions, which lead to an ICE when these intrinsics were used in a specification expression with an initializer. The intrinsics in question are listed in F2018:10.1.2. As discussed in the PR, Steve recommended to

[Patch] Fortran: Fix associated intrinsic with assumed rank [PR101334] [was: [PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334)]

2021-09-23 Thread Tobias Burnus
On 20.09.21 09:58, Tobias Burnus wrote: On 20.09.21 06:01, Sandra Loosemore wrote: This patch fixes some bugs in handling of assumed-rank arguments revealed by the TS29113 testsuite, ... giving a bogus error when passing one as the first argument to the ASSOCIATED intrinsic. ... ... if I

Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange

2021-09-23 Thread Jakub Jelinek via Gcc-patches
On Thu, Sep 23, 2021 at 11:08:37AM -0700, Thomas Rodgers wrote: > From: Thomas Rodgers > > This change implements P0528 which requires that padding bits not > participate in atomic compare exchange operations. All arguments to the Thanks for working on this. > generic template are 'sanitized'

Re: [PATCH v3] attribs: Implement -Wno-attributes=vendor::attr [PR101940]

2021-09-23 Thread Jason Merrill via Gcc-patches
On 9/20/21 18:59, Marek Polacek via Gcc-patches wrote: On Mon, Sep 20, 2021 at 09:08:09PM +0200, Jakub Jelinek wrote: On Mon, Sep 20, 2021 at 02:37:03PM -0400, Marek Polacek wrote: So, wouldn't be this better specified as Wno-attributes= Common Joined RejectNegative (not sure if RejectNegative

[PATCH] libstdc++: Clear padding bits in atomic compare_exchange

2021-09-23 Thread Thomas Rodgers
From: Thomas Rodgers This change implements P0528 which requires that padding bits not participate in atomic compare exchange operations. All arguments to the generic template are 'sanitized' by the __builtin_clear_padding intrinsic before they are used in atomic compare_exchange. This

Re: [RFC] c++: Allow parm use outside function body for constexpr members

2021-09-23 Thread Barrett Adair via Gcc-patches
I'm past this snag, so disregard this RFC for now. If I post again about this, it will be with a working patch. On Fri, Sep 17, 2021 at 11:15 AM Barrett Adair wrote: > The WIP attached patch attempts to enable usage of parameters' constexpr > members before the function body begins (see new

[COMMITTED] tree-optimization/102463 - Look for a relation between operands only when possible.

2021-09-23 Thread Andrew MacLeod via Gcc-patches
The routnie that is trapping (relation_fold_and_or)  is looking to see if there are any relationships between dependencies that can be exploited. ie    c_2 = a_6 > b_7    c_3 = a_6 < b_7    c_4 = c_2 && c_3   if (c_4 != 0) when trying to fold c_4,  it looks at c_2 and c_3, it notes that they

[COMMITTED] Ranger converted to a local edge flag instead of EDGE_EXECUTABLE.

2021-09-23 Thread Andrew MacLeod via Gcc-patches
This patch converts the Ranger ecosystem to use a local edge flag to represent a "not executable" edge rather than reusing the EDGE_EXECUTABLE flag. This has multiple benefits,  - No need to set all the flags on every edge before starting  - No chance of interference from other passes which

[PATCH] ipa: Fix ICE when speculating calls from inlined functions (PR 102388)

2021-09-23 Thread Martin Jambor
Hi, The code handling various cases which lead to call graph edge duplication (in order to update reference descriptions used to track and remove no-longer needed references) has missed one important case. When edge duplication is an effect of creating a speculative edge for an indirect edge

Re: [PATCH, Fortran] Diagnose default-initialized pointer/allocatable dummies

2021-09-23 Thread Tobias Burnus
On 23.09.21 18:30, Sandra Loosemore wrote: On 9/23/21 10:10 AM, Tobias Burnus wrote: On 23.09.21 17:50, Sandra Loosemore wrote: This patch is for PR101320, another issue related to missing bind(c) diagnostics. OK to commit? LGTM - I am only ... + gfc_error ("Default-initialized %s

Re: [Patch] Fortran: Handle allocated() with coindexed scalars [PR93834] (was: [PATCH] PR fortran/93834 - [9/10/11/12 Regression] ICE in trans_caf_is_present, at fortran/trans-intrinsic.c:8469)

2021-09-23 Thread Tobias Burnus
Hi Harald, On 22.09.21 21:47, Harald Anlauf via Fortran wrote: while still feeling somewhat unsure (given my previous comment and the discussion), I think your patch is basically OK. However, your testcase has a { dg-do compile }, so it does not really do any runtime tests. Is that intended?

Re: [PATCH, Fortran] Diagnose default-initialized pointer/allocatable dummies

2021-09-23 Thread Sandra Loosemore
On 9/23/21 10:10 AM, Tobias Burnus wrote: On 23.09.21 17:50, Sandra Loosemore wrote: This patch is for PR101320, another issue related to missing bind(c) diagnostics.  OK to commit? LGTM - I am only ... diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index f2e8896..b3c65b7 100644 ---

[PATCH] attribs: Allow optional second arg for attr deprecated [PR102049]

2021-09-23 Thread Marek Polacek via Gcc-patches
Clang implements something we don't have: __attribute__((deprecated("message", "replacement"))); which seems pretty neat so I wrote this patch to add it to gcc. It doesn't allow the optional second argument in the standard [[]] form so as not to clash with possible future standard additions. I

Re: [PATCH] Avoid invalid loop transformations in jump threading registry.

2021-09-23 Thread Jeff Law via Gcc-patches
On 9/23/2021 5:15 AM, Aldy Hernandez wrote: My upcoming improvements to the forward jump threader make it thread more aggressively. In investigating some "regressions", I noticed that it has always allowed threading through empty latches and across loop boundaries. As we have discussed

Re: [PATCH, Fortran] Diagnose default-initialized pointer/allocatable dummies

2021-09-23 Thread Tobias Burnus
On 23.09.21 17:50, Sandra Loosemore wrote: This patch is for PR101320, another issue related to missing bind(c) diagnostics. OK to commit? LGTM - I am only ... commit d3507154fd34e65e2887262218fec09d5fb082a2 Author: Sandra Loosemore Date: Thu Sep 23 08:03:52 2021 -0700 Fortran:

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-09-23 Thread Jeff Law via Gcc-patches
On 9/23/2021 4:17 AM, ibuclaw--- via Gcc-patches wrote: On 22/09/2021 03:31 Luís Ferreira wrote: This patch prevents dereferencing a null reference on a crafted malformed magled name, often causing SIGSEGV to be raised. OK, seems reasonable to me. I pushed this to the trunk. Thanks,

[PATCH, Fortran] Diagnose default-initialized pointer/allocatable dummies

2021-09-23 Thread Sandra Loosemore
This patch is for PR101320, another issue related to missing bind(c) diagnostics. OK to commit? -Sandra commit d3507154fd34e65e2887262218fec09d5fb082a2 Author: Sandra Loosemore Date: Thu Sep 23 08:03:52 2021 -0700 Fortran: Diagnose default-initialized pointer/allocatable dummies

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-09-23 Thread Jeff Law via Gcc-patches
On 9/23/2021 4:16 AM, ibuclaw--- via Gcc-patches wrote: On 22/09/2021 03:10 Luís Ferreira wrote: Currently a stack/heap overflow may happen if a crafted mangle is maliciously used to cause denial of service, such as intentional crashes by accessing a reserved memory space. Hi, Thanks

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-09-23 Thread Luís Ferreira via Gcc-patches
Hi, Here is an example of a crafted mangle that can cause heap buffer overflow. ``` fuzzer-results/crash-18b7f0799be49886550876b5ab6bb63e4231979b _D2FGWG4EQe 5f 44 32 46 47 57 47 34 34 34 34 34 34 34 34 34 |_D2FGWG4| 0010 34 34 34 34 34 34 34 34 45 51 65

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-23 Thread Martin Sebor via Gcc-patches
On 9/23/21 12:30 AM, Richard Biener wrote: On Thu, 23 Sep 2021, Hongtao Liu wrote: On Thu, Sep 23, 2021 at 9:48 AM Hongtao Liu wrote: On Wed, Sep 22, 2021 at 10:21 PM Martin Sebor wrote: On 9/21/21 7:38 PM, Hongtao Liu wrote: On Mon, Sep 20, 2021 at 4:13 AM Martin Sebor wrote: ...

[committed] libstdc++: Remove c++20-specific dg-error directives in test

2021-09-23 Thread Jonathan Wakely via Gcc-patches
I added extra dg-error directives for C++20 to match the extra errors caused by some of the call stack being constexpr in C++20. Since Jason's changes to reduce those errors, those dg-error lines no longer match. This removes them again. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog:

[committed] libstdc++: Disable PCH for test that depends on a macro being defined

2021-09-23 Thread Jonathan Wakely via Gcc-patches
This test tries to ensure that can be included after defining _XOPEN_SOURCE=600, which doesn't test anything if that header is already included via the PCH before the macro definition. Disable PCH so that it behaves as intended. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog:

[committed] libstdc++: Make std::system_category() recognize Windows error codes

2021-09-23 Thread Jonathan Wakely via Gcc-patches
The std::system_category error category should be used for system-specific error codes, which means on Windows it should be used for Windows error codes. Currently that category assumes that the error numbers it deals with are errno numbers, which means that ERROR_ACCESS_DENIED (which has value

[committed] libstdc++: Improvements to standard error category objects

2021-09-23 Thread Jonathan Wakely via Gcc-patches
This ensures that the objects returned by std::generic_category() and std::system_category() are initialized before any code starts executing, and are not destroyed at the end of the program. This means it is always safe to access them, even during startup and termination. See LWG 2992 and P1195R0

[committed] libstdc++: std::system_category should know meaning of zero [PR102425]

2021-09-23 Thread Jonathan Wakely via Gcc-patches
Although 0 is not an errno value, it should still be recognized as corresponding to a value belonging to the generic_category(). Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/102425 * src/c++11/system_error.cc

[committed] libstdc++: std::system_category should know meaning of zero [PR102425]

2021-09-23 Thread Jonathan Wakely via Gcc-patches
Although 0 is not an errno value, it should still be recognized as corresponding to a value belonging to the generic_category(). Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/102425 * src/c++11/system_error.cc

[Ada] Wrappers of access-to-subprograms with pre/post conditions

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes decoration of wrappers of access to subprograms with pre/post conditions (that is, wrappers internally built by the compiler to support AI12-0220). This patch also adds assertions, fixes node decorations, and avoids cascade errors. Tested on x86_64-pc-linux-gnu, committed on

[Ada] Adjust documentation of gnatsymbolize

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
This documents the new --load option and makes a few minor tweaks. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/gnat_utility_programs.rst (gnatsymbolize): Document new --load option and -g1 as minimal compilation requirement.diff --git

[Ada] Ada2022: implementation of AI12-0212 : iterator specs in array aggregates

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
This patch implements the two-pass algorithm described in RM 4.3.3 (20.2/5), for the construction of an array aggregate all of whose component associations are iterated component associations with iterator specifications. Each iterator specification is executed twice: once to compute the number of

[Ada] Tune detection of internally generated positional aggregates

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
In Resolve_Array_Aggregate we typically compute and set Aggregate_Bounds based on the aggregate itself. We only need to keep the already computed bounds for aggregates that have been optimized into positional ones. However, we kept the already computed bounds for other aggregates too. In

[Ada] Follow-on efficiency improvements

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
This patch improves compiler efficiency by placing the Homonym attribute at offset zero. Homonym is a heavily used field. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gen_il-gen.adb: Set the number of concrete nodes that have the Homonym field to a higher number

[Ada] If unnesting and relocating subprogram call, make new Parameter_Associations

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
When unnesting, we may add static links to the actual parameters. This will cause duplication if a the Parameter_Associations list is shared, so ensure that we make a new one in this situation. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * atree.adb (Relocate_Node): If

[Ada] Cleanup and efficiency improvements

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
This patch implements some efficiency improvements related to field getters and setters, and implements some cleanups that make the efficiency improvements easier. Instead of just storing the Offset with each node, we store a node header, which contains the Offset plus a small number of slots.

[Ada] Remove Initializes contracts from Ada.Strings.Bounded

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
SPARK rules regarding constants with variable inputs and generic actual parameters are currently not flexible enough to allow an explicit Initializes contract on Ada.Strings.Bounded.Generic_Bounded_Length. This patch removes the explicit contract, so that GNATprove generates an implicit one with

[Ada] Minimize parts of Ada.Strings.Fixed marked SPARK_Mode => Off

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
Replace use of SPARK_Mode Off on callers of procedure Move by stronger preconditions, as mandated by Ada RM A.4.3, so that calls to the corresponding functions inside the procedure bodies are provably correct. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Update "Implementation Defined Characteristics" documentation.

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
Ada RM M.2 gives a list of implementation-defined characteristics, each of which is required to be documented. This requirement is addressed in the "Implementation Defined Characteristics" section of the GNAT RM. This section needs to be updated to reflect changes to the Ada RM M.2 over the last

[Ada] Remove global parameter in Global contracts of Ada.Strings.Bounded

2021-09-23 Thread Pierre-Marie de Rodat via Gcc-patches
The predefined Ada.Strings.Bounded unit has been annotated SPARK contracts that reference a local constant: generic Max : Positive; package Generic_Bounded_Length Max_Length : constant Positive := Max; function XXX return YYY with Global => Max_Length; ... When this

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-23 Thread Bill Schmidt via Gcc-patches
Hi Segher, Thanks for the review!  This is what I committed. 2021-09-23 Bill Schmidt gcc/ PR target/102024 * config/rs6000/rs6000-call.c (rs6000_aggregate_candidate): Detect zero-width bit fields and return indicator. (rs6000_discover_homogeneous_aggregate):

Re: [PATCH] Fix loop split incorrect count and probability

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, Xionghu Luo wrote: > > > On 2021/8/11 17:16, Richard Biener wrote: > > On Wed, 11 Aug 2021, Xionghu Luo wrote: > > > >> > >> > >> On 2021/8/10 22:47, Richard Biener wrote: > >>> On Mon, 9 Aug 2021, Xionghu Luo wrote: > >>> > Thanks, > > On 2021/8/6 19:46,

Re: [PATCH] Allow different vector types for stmt groups

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, Hongtao Liu wrote: > On Tue, Sep 21, 2021 at 10:55 PM H.J. Lu wrote: > > > > On Mon, Sep 20, 2021 at 5:15 AM Richard Biener via Gcc-patches > > wrote: > > > > > > This allows vectorization (in practice non-loop vectorization) to > > > have a stmt participate in different

Re: [PATCH v2 3/3] reassoc: Test rank biasing

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, Ilya Leoshkevich wrote: > Add both positive and negative tests. OK I guess (you might want to check with -ftree-vectorize given that's going to be enabled at -O2) Richard. > gcc/testsuite/ChangeLog: > > * gcc.dg/tree-ssa/reassoc-46.c: New test. > *

Re: [PATCH v2 1/3] reassoc: Do not bias loop-carried PHIs early

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, Ilya Leoshkevich wrote: > Biasing loop-carried PHIs during the 1st reassociation pass interferes > with reduction chains and does not bring measurable benefits, so do it > only during the 2nd reassociation pass. OK. Thanks, Richard. > gcc/ChangeLog: > > *

Re: [PATCH v2 2/3] reassoc: Propagate PHI_LOOP_BIAS along single uses

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, Ilya Leoshkevich wrote: > PR tree-optimization/49749 introduced code that shortens dependency > chains containing loop accumulators by placing them last on operand > lists of associative operations. > > 456.hmmer benchmark on s390 could benefit from this, however, the code >

[PATCH] Avoid invalid loop transformations in jump threading registry.

2021-09-23 Thread Aldy Hernandez via Gcc-patches
My upcoming improvements to the forward jump threader make it thread more aggressively. In investigating some "regressions", I noticed that it has always allowed threading through empty latches and across loop boundaries. As we have discussed recently, this should be avoided until after loop

Re: [PATCH] wwwdocs: Move inactive branches to the right section

2021-09-23 Thread Richard Biener via Gcc-patches
On Thu, Sep 23, 2021 at 12:28 PM Jonathan Wakely via Gcc-patches wrote: > > On 16/09/21 15:41 +0100, Jonathan Wakely wrote: > >The https://gcc.gnu.org/git.html page is a total mess, listing dozens > >and dozens of branches which haven't seen updates in a decade and > >which are under the

Re: [PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available.

2021-09-23 Thread Aldy Hernandez via Gcc-patches
On 9/22/21 10:05 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 7:17 PM Aldy Hernandez via Gcc-patches wrote: On 9/21/21 7:05 PM, Andrew MacLeod wrote: On 9/21/21 12:53 PM, Aldy Hernandez wrote: SCEV won't work without dominators and we can get called without dominators from

Re: [Patch][doc][PR101843]clarification on building gcc and binutils together

2021-09-23 Thread John Henning via Gcc-patches
Hello Jeff, >I would strongly recommend removing all the documentation related to >single tree builds. Two questions: (1) When you say "all", are you suggesting that in-the-gcc-tree builds of gmp, mpfr, mpc, and isl should no longer be documented? Or only in-tree builds of

Re: [PATCH] configure: Update --help output for --with-multilib-list

2021-09-23 Thread Jonathan Wakely via Gcc-patches
On Thu, 23 Sept 2021 at 11:36, Jonathan Wakely wrote: > On Wed, 22 Sept 2021 at 23:19, Jim Wilson wrote: > >> On Fri, Sep 17, 2021 at 4:39 AM Jonathan Wakely via Gcc-patches < >> gcc-patches@gcc.gnu.org> wrote: >> >>> The list of architectures that support the option is incomplete. >>> >>>

Re: [PATCH] configure: Update --help output for --with-multilib-list

2021-09-23 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Sept 2021 at 23:19, Jim Wilson wrote: > On Fri, Sep 17, 2021 at 4:39 AM Jonathan Wakely via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > >> The list of architectures that support the option is incomplete. >> >> gcc/ChangeLog: >> >> * configure.ac: Fix --with-multilib-list

Re: [PATCH] wwwdocs: Move inactive branches to the right section

2021-09-23 Thread Jonathan Wakely via Gcc-patches
On 16/09/21 15:41 +0100, Jonathan Wakely wrote: The https://gcc.gnu.org/git.html page is a total mess, listing dozens and dozens of branches which haven't seen updates in a decade and which are under the refs/dead/heads/* are of the Git repo. This moves them all to the "Inactive" or "Merged"

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-23 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Sept 2021 at 18:56, Antony Polukhin wrote: > > ср, 22 сент. 2021 г. в 20:44, Jonathan Wakely : > > > > On Wed, 22 Sept 2021 at 18:09, Antony Polukhin wrote: > > > > > > std::unique_ptr allows construction from std::unique_ptr of derived > > > type as per [unique.ptr.single.asgn] and

Re: [PATCH] libiberty: prevent null dereferencing on dlang_type

2021-09-23 Thread ibuclaw--- via Gcc-patches
> On 22/09/2021 03:31 Luís Ferreira wrote: > > > This patch prevents dereferencing a null reference on a crafted > malformed magled name, often causing SIGSEGV to be raised. > OK, seems reasonable to me. > Signed-off-by: Luís Ferreira > --- > libiberty/d-demangle.c | 2 +-

Re: [PATCH] libiberty: prevent buffer overflow when decoding user input

2021-09-23 Thread ibuclaw--- via Gcc-patches
> On 22/09/2021 03:10 Luís Ferreira wrote: > > > Currently a stack/heap overflow may happen if a crafted mangle is > maliciously used to cause denial of service, such as intentional > crashes > by accessing a reserved memory space. > Hi, Thanks for this. Is there a test that could trigger

RE: [PATCH] AVX512FP16: Support cond_op for HFmode

2021-09-23 Thread Liu, Hongtao via Gcc-patches
>-Original Message- >From: Wang, Hongyu >Sent: Thursday, September 23, 2021 5:16 PM >To: Liu, Hongtao >Cc: gcc-patches@gcc.gnu.org >Subject: [PATCH] AVX512FP16: Support cond_op for HFmode > >Hi, > >This patch extend the expanders for cond_op to support vector HF modes. >bootstraped

Re: [PATCH] top-level configure: setup target_configdirs based on repository

2021-09-23 Thread Thomas Schwinge
Hi! I only had a curious look here; hope that's still useful. On 2021-09-22T16:30:42+0100, Andrew Burgess wrote: > The top-level configure script is shared between the gcc repository > and the binutils-gdb repository. > > The target_configdirs variable in the configure.ac script, defines >

[PATCH] tree-optimization/102448 - clear copied alignment info from vect

2021-09-23 Thread Richard Biener via Gcc-patches
This fixes the previous change which removed setting alignment info from the vectorizers idea of how a pointer is being used but left in place the copied info from DR_PTR_INFO without realizing that this is in fact _not_ the alignment of the access but the alignment of a base pointer contained in

[PATCH] AVX512FP16: Support cond_op for HFmode

2021-09-23 Thread Hongyu Wang via Gcc-patches
Hi, This patch extend the expanders for cond_op to support vector HF modes. bootstraped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for master? gcc/ChangeLog: * config/i386/sse.md (cond_): Extend to support vector HFmodes. (cond_mul): Likewise. (cond_div):

Re: [PATCH] top-level configure: setup target_configdirs based on repository

2021-09-23 Thread Richard Biener via Gcc-patches
On Wed, Sep 22, 2021 at 5:47 PM Andrew Burgess wrote: > > The top-level configure script is shared between the gcc repository > and the binutils-gdb repository. > > The target_configdirs variable in the configure.ac script, defines > sub-directories that contain components that should be built

Re: [PATCH] Fix value uninitialization in vn_reference_insert_pieces [PR102400]

2021-09-23 Thread Richard Biener via Gcc-patches
On Thu, Sep 23, 2021 at 3:24 AM Feng Xue OS via Gcc-patches wrote: > > Bootstrapped/regtested on x86_64-linux. OK for all affected branches. Thanks, Richard. > Thanks, > Feng > --- > 2021-09-23 Feng Xue > > gcc/ChangeLog > PR tree-optimization/102400 > * tree-ssa-sccvn.c

Re: [PATCH] Fix null-pointer dereference in delete_dead_or_redundant_call [PR102451]

2021-09-23 Thread Richard Biener via Gcc-patches
On Thu, Sep 23, 2021 at 3:09 AM Feng Xue OS via Gcc-patches wrote: > > Bootstrapped/regtested on x86_64-linux and aarch64-linux. OK for trunk and all affected branches. Thanks, Richard. > Thanks, > Feng > > --- > 2021-09-23 Feng Xue > > gcc/ChangeLog: > PR tree-optimization/102451 >

[committed] openmp: Diagnose omp::directive attribute without balanced token argument [PR102413]

2021-09-23 Thread Jakub Jelinek via Gcc-patches
Hi! If omp::directive attribute argument starting with the opening ( is not a balanced token sequence, then cp_parser_skip_balanced_tokens (parser, 1) returns 1, but the code was subtracting 2 from it and iterating until it was 0, so for the non-balanced case it iterated from (size_t) -1 down to

[RFC PATCH 8/8] RISC-V: Cost model for ZBS extension.

2021-09-23 Thread Kito Cheng
2021-09-23 Kito Cheng gcc/ChangeLog: * config/riscv/riscv.c (riscv_rtx_costs): Handle cost model for zbs extension. --- gcc/config/riscv/riscv.c | 47 1 file changed, 47 insertions(+) diff --git a/gcc/config/riscv/riscv.c

[RFC PATCH 7/8] RISC-V: Implement instruction patterns for ZBS extension.

2021-09-23 Thread Kito Cheng
From: Jim Wilson 2021-09-23 Jim Wilson Kito Cheng gcc/ChangeLog: * config/riscv/bitmanip.md (shiftm1): New. (*bset): Ditto. (*bset_mask): Ditto. (*bset_1): Ditto. (*bset_1_mask): Ditto. (*bseti): Ditto. (*bclr): Ditto.

[RFC PATCH 6/8] RISC-V: Use li and rori to load constants.

2021-09-23 Thread Kito Cheng
From: Jim Wilson gcc/ChangeLog: * config/riscv/riscv.c (riscv_build_integer_1): Build integer with rotate. gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-li-rotr.c: New. --- gcc/config/riscv/riscv.c | 41

[RFC PATCH 5/8] RISC-V: Cost model for zbb extension.

2021-09-23 Thread Kito Cheng
2021-09-23 Kito Cheng gcc/ChangeLog: * config/riscv/riscv.c (riscv_extend_cost): Handle cost model for zbb extension. (riscv_rtx_costs): Ditto. --- gcc/config/riscv/riscv.c | 17 + 1 file changed, 17 insertions(+) diff --git a/gcc/config/riscv/riscv.c

[RFC PATCH 4/8] RISC-V: Implement instruction patterns for ZBB extension.

2021-09-23 Thread Kito Cheng
From: Jim Wilson 2021-09-23 Jim Wilson Kito Cheng Jia-Wei Chen gcc/ChangeLog: * config/riscv/bitmanip.md (bitmanip_bitwise): New. (bitmanip_minmax): New. (clz_ctz_pcnt): New. (bitmanip_optab): New. (bitmanip_insn): New.

[RFC PATCH 3/8] RISC-V: Cost model for zba extension.

2021-09-23 Thread Kito Cheng
2021-09-23 Kito Cheng gcc/ChangeLog: * config/riscv/riscv.c (riscv_extend_cost): Handle cost model for zba extension. (riscv_rtx_costs): Ditto. --- gcc/config/riscv/riscv.c | 81 1 file changed, 81 insertions(+) diff --git

[RFC PATCH 2/8] RISC-V: Implement instruction patterns for ZBA extension.

2021-09-23 Thread Kito Cheng
From: Jim Wilson 2021-09-23 Jim Wilson Kito Cheng Jia-Wei Chen gcc/ChangeLog: * config/riscv/bitmanip.md (*zero_extendsidi2_bitmanip): New. (*shNadd): Ditto. (*shNadduw): Ditto. (*add.uw): Ditto. (*slliuw): Ditto. *

[RFC PATCH 1/8] RISC-V: Minimal support of bitmanip extension

2021-09-23 Thread Kito Cheng
2021-09-23 Kito Cheng gcc/ChangeLog: * common/config/riscv/riscv-common.c (riscv_ext_version_table): Add zba, zbb, zbc and zbs. (riscv_ext_flag_table): Ditto. * config/riscv/riscv-opts.h (MASK_ZBA): New. (MASK_ZBB): Ditto. (MASK_ZBC): Ditto.

[RFC PATCH 0/8] RISC-V: Bit-manipulation extension.

2021-09-23 Thread Kito Cheng
Bit manipulation extension[1] is finishing the public review and waiting for the rest of the ratification process, I believe that will become a ratified extension soon, so I think it's time to submit to upstream for review now :) As the title included RFC, it's not a rush to merge to trunk yet, I

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-23 Thread Richard Biener via Gcc-patches
On Thu, 23 Sep 2021, Hongtao Liu wrote: > On Thu, Sep 23, 2021 at 9:48 AM Hongtao Liu wrote: > > > > On Wed, Sep 22, 2021 at 10:21 PM Martin Sebor wrote: > > > > > > On 9/21/21 7:38 PM, Hongtao Liu wrote: > > > > On Mon, Sep 20, 2021 at 4:13 AM Martin Sebor wrote: > > > ... > > > > diff