Re: [PATCH] vect: Add bias parameter for partial vectorization

2021-10-28 Thread Kewen.Lin via Gcc-patches
Hi Robin, on 2021/10/28 下午10:44, Robin Dapp wrote: > Hi, > > as discussed in > https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582627.html this > introduces a bias parameter for the len_load/len_store ifns as well as > optabs that is meant to distinguish between Power and s390 variants. >

Re: [PATCH] Adjust testcase for O2 vect.

2021-10-28 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 29, 2021 at 10:34 AM Martin Sebor wrote: > > On 10/28/21 7:47 PM, Hongtao Liu wrote: > > On Fri, Oct 29, 2021 at 12:20 AM Martin Sebor via Gcc-patches > > wrote: > >> > >> On 10/28/21 1:23 AM, liuhongt via Gcc-patches wrote: > >>> Adjust code in check_vect_slp_aligned_store_usage to

Re: [PATCH] Adjust testcase for O2 vect.

2021-10-28 Thread Martin Sebor via Gcc-patches
On 10/28/21 7:47 PM, Hongtao Liu wrote: On Fri, Oct 29, 2021 at 12:20 AM Martin Sebor via Gcc-patches wrote: On 10/28/21 1:23 AM, liuhongt via Gcc-patches wrote: Adjust code in check_vect_slp_aligned_store_usage to make it an exact pattern match of the corresponding testcases. These new

[PATCH] ipa/102714 - IPA SRA eliding volatile

2021-10-28 Thread duan.db via Gcc-patches
Hi. This patch fix the pr102714 in the trunk. Should we backport this patch to gcc-10? If needed, an adapted patch is attached. Thanks, Bo Duan 0001-Subject-PATCH-ipa-102714-IPA-SRA-eliding-volatile.patch Description: Binary data

Re: [PATCH] Enable vectorization for _Float16 floor/ceil/trunc/nearbyint/rint operations.

2021-10-28 Thread Hongtao Liu via Gcc-patches
On Thu, Oct 28, 2021 at 10:26 AM Hongtao Liu wrote: > > On Mon, Oct 25, 2021 at 4:24 PM liuhongt wrote: > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ok for trunk? > > > I'm going to check in this patch if there's no objection. Committed. > > gcc/ChangeLog: > > > >

Re: [PATCH] Adjust testcase for O2 vect.

2021-10-28 Thread Hongtao Liu via Gcc-patches
On Fri, Oct 29, 2021 at 12:20 AM Martin Sebor via Gcc-patches wrote: > > On 10/28/21 1:23 AM, liuhongt via Gcc-patches wrote: > > Adjust code in check_vect_slp_aligned_store_usage to make it an exact > > pattern match of the corresponding testcases. > > These new target/xfail selectors are added

[PATCH] Bump required minimum DejaGnu version to 1.5.3

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Bump required DejaGnu version to 1.5.3 (or later). Ok for trunk? gcc/ChangeLog: * doc/install.texi: Bump required minimum DejaGnu version. --- gcc/doc/install.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/doc/install.texi

Re: [PATCH,FORTRAN 28/29] Free type-bound procedure structs

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
ping [Rebased, re-regtested cleanly. Ok for trunk?] On Wed, 5 Sep 2018 14:57:31 + Bernhard Reutner-Fischer wrote: > From: Bernhard Reutner-Fischer > > compiling gfortran.dg/typebound_proc_31.f90 leaked the type-bound > structs: > > 56 bytes in 1 blocks are definitely lost. > at

Re: [PATCH,Fortran 0/1] Correct CAF locations in simplify

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 27 Oct 2021 23:29:40 +0200 Bernhard Reutner-Fischer wrote: > Hi! > > I found this lying around in an oldish tree. > Regtest running over night, ok for trunk if it passes? Regtest turned up no regressions. Ok for trunk? thanks, > > Bernhard Reutner-Fischer (1): > Tweak locations

Re: [PATCH,FORTRAN] Fix memory leak in finalization wrappers

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
On Wed, 27 Oct 2021 23:39:43 +0200 Bernhard Reutner-Fischer wrote: > Ping > [hmz. it's been a while, I'll rebase and retest this one. > Ok if it passes?] Testing passed without any new regressions. Ok for trunk? thanks, > > On Mon, 15 Oct 2018 10:23:06 +0200 > Bernhard Reutner-Fischer wrote: >

[PATCH,Fortran 1/2] Add uop/name helpers

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Introduce a helper to construct a user operator from a name and the reverse operation, i.e. a helper to construct a name from a user operator. Cc: Jakub Jelinek gcc/fortran/ChangeLog: 2017-10-29 Bernhard Reutner-Fischer * gfortran.h

[PATCH,Fortran 2/2] Fix write_omp_udr for user-operator REDUCTIONs

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Due to a typo a user operator used in a reduction was not found in the symtree so would have been written multiple times (in theory). E.g. user operator ".add." was looked up as ".ad" instead of "add". For gcc-11 branch and earlier one would - memcpy

Re: [PATCH][RFC] Map -ftrapv to -fsanitize=signed-integer-overflow -fsanitize-undefined-trap-on-error

2021-10-28 Thread Hans-Peter Nilsson
On Wed, 20 Oct 2021, Richard Biener via Gcc-patches wrote: > This maps -ftrapv to -fsanitize=signed-integer-overflow > -fsanitize-undefined-trap-on-error, Isn't that UBSAN target-dependent, i.e. not supported on all targets, whereas -ftrapv is just about universally supported? I.e. isn't this

Re: [PATCH,FORTRAN] Fix memory leak of gsymbol

2021-10-28 Thread Bernhard Reutner-Fischer via Gcc-patches
On Thu, 28 Oct 2021 23:37:59 +0200 Harald Anlauf wrote: > Hi Bernhard, > > Am 27.10.21 um 23:43 schrieb Bernhard Reutner-Fischer via Gcc-patches: > > ping > > [I'll rebase and retest this too since it's been a while. > > Ok if it passes?] > > > > On Sun, 21 Oct 2018 16:04:34 +0200 > > Bernhard

Re: [PATCH,FORTRAN] Fix memory leak of gsymbol

2021-10-28 Thread Harald Anlauf via Gcc-patches
Hi Bernhard, Am 27.10.21 um 23:43 schrieb Bernhard Reutner-Fischer via Gcc-patches: ping [I'll rebase and retest this too since it's been a while. Ok if it passes?] On Sun, 21 Oct 2018 16:04:34 +0200 Bernhard Reutner-Fischer wrote: Hi! Regtested on x86_64-unknown-linux, installing on

[PATCH] PR fortran/99853 - ICE: Cannot convert 'LOGICAL(4)' to 'INTEGER(8)' (etc.)

2021-10-28 Thread Harald Anlauf via Gcc-patches
Dear Fortranners, the original fix by Steve was lingering in the PR. We did ICE in situations where in a SELECT CASE a kind conversion was deemed necessary, but it did involve different types. The check gfc_convert_type_warn () was invoked with arguments requesting to generate an internal error.

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-28 Thread Patrick Palka via Gcc-patches
On Thu, 28 Oct 2021, Jakub Jelinek wrote: > On Thu, Oct 28, 2021 at 12:40:02PM -0400, Patrick Palka wrote: > > PR c++/102780 > > > > gcc/cp/ChangeLog: > > > > * constexpr.c (potential_constant_expression_1) : > > When tf_error isn't set, preemptively check potentiality of the > >

Re: dejagnu version update?

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/27/2021 5:00 PM, Bernhard Reutner-Fischer wrote: On Sat, 4 Aug 2018 18:32:24 +0200 Bernhard Reutner-Fischer wrote: On Tue, 16 May 2017 at 21:08, Mike Stump wrote: On May 16, 2017, at 5:16 AM, Jonathan Wakely wrote: The change I care about in 1.5.3 So, we haven't talked much

Re: [PATCH] configure, d: Add support for bootstrapping the D front-end

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/9/2021 7:32 AM, Iain Buclaw via Gcc-patches wrote: Hi, The implementation of the D front-end in GCC is based on the original C++ version of the D programming language compiler, which was ported to D itself in version 2.069.0 (released in 2015). To keep it somewhat up-to-date, I have

Re: [PATCH] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/28/2021 9:24 AM, Aldy Hernandez wrote: This patch upgrades the pre-VRP threading passes to fully resolving backward threaders, and removes the post-VRP threading passes altogether. With it, we reduce the number of threaders in our pipeline from 9 to 7. This will leave DOM as the only

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 12:40:02PM -0400, Patrick Palka wrote: > PR c++/102780 > > gcc/cp/ChangeLog: > > * constexpr.c (potential_constant_expression_1) : > When tf_error isn't set, preemptively check potentiality of the > second operand before performing trial evaluation

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-10-28 Thread Richard Purdie via Gcc-patches
On Wed, 2021-10-27 at 22:56 +0200, Bernhard Reutner-Fischer wrote: > On Wed, 27 Oct 2021 21:05:03 +0100 > Richard Purdie via Gcc-patches wrote: > > > OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries > > separately from the compiler and slightly differently to the

Re: [PATCH] c++: quadratic constexpr behavior for left-assoc logical exprs [PR102780]

2021-10-28 Thread Patrick Palka via Gcc-patches
> On 10/27/21 17:10, Patrick Palka wrote: > > On Wed, 27 Oct 2021, Jason Merrill wrote: > > > > > On 10/27/21 14:54, Patrick Palka wrote: > > > > On Tue, 26 Oct 2021, Jakub Jelinek wrote: > > > > > > > > > On Tue, Oct 26, 2021 at 05:07:43PM -0400, Patrick Palka wrote: > > > > > > The performance

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-10-28 Thread Richard Purdie via Gcc-patches
On Thu, 2021-10-28 at 08:51 -0600, Jeff Law wrote: > > On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches wrote: > > OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries > > separately from the compiler and slightly differently to the standard gcc > > build. > > > >

Re: [PATCH] c++: CTAD within template argument [PR102933]

2021-10-28 Thread Patrick Palka via Gcc-patches
On Wed, 27 Oct 2021, Jason Merrill wrote: > On 10/26/21 13:44, Patrick Palka wrote: > > Here when checking for erroneous occurrences of 'auto' inside a template > > argument (which is allowed by the concepts TS for class templates), > > extract_autos_r picks up the CTAD placeholder for X{T{0}}

Re: [Patch] libcpp: Fix _Pragma expansion [PR102409]

2021-10-28 Thread Martin Sebor via Gcc-patches
On 10/28/21 9:51 AM, Tobias Burnus wrote: Before this patch, running #define TEST(T) T #define PARALLEL(X) TEST(X) PARALLEL(     for (int i = 0; i < N; i++) { \   _Pragma("omp ordered") \   S[0] += C[i] + D[i]; \     }) through 'gcc -E' yielded #pragma omp ordered  for (int i =

Re: [PATCH] Adjust testcase for O2 vect.

2021-10-28 Thread Martin Sebor via Gcc-patches
On 10/28/21 1:23 AM, liuhongt via Gcc-patches wrote: Adjust code in check_vect_slp_aligned_store_usage to make it an exact pattern match of the corresponding testcases. These new target/xfail selectors are added as a temporary solution, and should be removed after real issue is fixed for

Re: [PATCH] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-28 Thread Aldy Hernandez via Gcc-patches
> > > And... the total compilation improves by 1.32%! > This last number is compilation speed, not number of threads. Aldy

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-28 Thread Martin Sebor via Gcc-patches
On 10/28/21 2:59 AM, Prathamesh Kulkarni via Gcc-patches wrote: On Fri, 22 Oct 2021 at 14:41, Prathamesh Kulkarni wrote: On Wed, 20 Oct 2021 at 15:05, Richard Sandiford wrote: Prathamesh Kulkarni writes: On Tue, 19 Oct 2021 at 19:58, Richard Sandiford wrote: Prathamesh Kulkarni

[Patch] libcpp: Fix _Pragma expansion [PR102409]

2021-10-28 Thread Tobias Burnus
Before this patch, running #define TEST(T) T #define PARALLEL(X) TEST(X) PARALLEL( for (int i = 0; i < N; i++) { \ _Pragma("omp ordered") \ S[0] += C[i] + D[i]; \ }) through 'gcc -E' yielded #pragma omp ordered for (int i = 0; i < N; i++) { S[0] += C[i] + D[i]; } Note

Re: [PATCH] configure: Avoid unnecessary constraints on executables for $build.

2021-10-28 Thread Iain Sandoe
Hi Richard, > On 8 Sep 2021, at 07:35, Richard Biener wrote: > > On Tue, Sep 7, 2021 at 10:11 PM Iain Sandoe wrote: >> >> So, looking through the various email threads and the PR, I think that >> what has happened is : >> >> As the PR points out, our existing PCH model does not work if the

[PATCH] Remove VRP threader passes in exchange for better threading pre-VRP.

2021-10-28 Thread Aldy Hernandez via Gcc-patches
This patch upgrades the pre-VRP threading passes to fully resolving backward threaders, and removes the post-VRP threading passes altogether. With it, we reduce the number of threaders in our pipeline from 9 to 7. This will leave DOM as the only forward threader client. When the ranger can

[PATCH] path relation oracle: Remove SSA's being killed from the equivalence list.

2021-10-28 Thread Aldy Hernandez via Gcc-patches
Same thing as the relational change. Walk any equivalences that have been registered on the path, and remove the name being killed. The only reason we had added the equivalence with itself earlier is so we wouldn't search any further in the equivalency list. So if we are removing all references

Re: [PATCH v2] rs6000: Optimize __builtin_shuffle when it's used to zero the upper bits [PR102868]

2021-10-28 Thread David Edelsohn via Gcc-patches
On Thu, Oct 28, 2021 at 1:39 AM Xionghu Luo wrote: > > On 2021/10/27 21:24, David Edelsohn wrote: > > On Sun, Oct 24, 2021 at 10:51 PM Xionghu Luo wrote: > >> > >> If the second operand of __builtin_shuffle is const vector 0, and with > >> specific mask, it can be optimized to vspltisw+xxpermdi

Re: [PATCH] c++, v2: Implement DR2351 - void{} [PR102820]

2021-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/21 08:19, Jakub Jelinek wrote: On Thu, Oct 28, 2021 at 08:01:27AM -0400, Jason Merrill wrote: --- gcc/cp/semantics.c.jj 2021-10-27 09:16:41.161600606 +0200 +++ gcc/cp/semantics.c 2021-10-28 13:06:59.325791588 +0200 @@ -3079,6 +3079,24 @@ finish_unary_op_expr (location_t op_loc,

Re: [PATCH] libcody: add mostlyclean Makefile target

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/26/2021 3:47 AM, Martin Liška wrote: On 10/25/21 18:10, Eric Gallager wrote: On Mon, Oct 25, 2021 at 7:35 AM Martin Liška wrote: Hello. The patch adds missing Makefile mostlyclean. Ready to be installed? Thanks, Martin Generally the way the various "*clean" targets are

Re: [PATCH] assert_streq: add newlines to failure message

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/26/2021 3:27 PM, David Malcolm via Gcc-patches wrote: Adding newlines so that the two strings line up makes string equality failures considerably easier to read. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * selftest.c

Re: [PATCH] gcc/Makefile.in: fix bug in gengtype link rule

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/26/2021 3:26 PM, David Malcolm via Gcc-patches wrote: Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * Makefile.in: Fix syntax for reference to LIBDEPS in gengtype link rule. Signed-off-by: David Malcolm OK jeff

[COMMITTED] Fix ifcvt-4.c to not depend on VRP2 asserts.

2021-10-28 Thread Andrew MacLeod via Gcc-patches
as discussed elsewhere, gcc.dg/ifcvt-4.c seems to be a flawed testcase as it is. it does not use __builtin_expect properly, so edges are predicted 50/50.  It also turns out that it only works due to an oddity that causes the basic blocks to be restructured by the VRP2 pass when it removes

Re: [PATCH 3/5] gcc: Add --nostdlib++ option

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches wrote: OpenEmbedded/Yocto Project builds libgcc and the other gcc runtime libraries separately from the compiler and slightly differently to the standard gcc build. In general this works well but in trying to build them separately we run

[COMMITTED] Unify EVRP and VRP folding predicate message.

2021-10-28 Thread Andrew MacLeod via Gcc-patches
When EVRP folds a predicate it reports it only with TDF_DETAILS set as:     Predicate evaluates to: 0 VRP on the other hand always reports it to a dump_file as:     Folding predicate c_10 > 6 to 0 This patch changes fold_cond() in the simplifier to use the latter format, and converts a

[COMMITTED] tree-optimization/102940 - Reset scev before invoking array_checker.

2021-10-28 Thread Andrew MacLeod via Gcc-patches
As pointed out, we need to reset scev before invoking the array-checker in execute_ranger_vrp. Bootstrapped on x86_64-pc-linux-gnu with no regressions.  Pushed. Andrew >From d46aeb5906b8ed7ee255cfbacc5cf9d2f56b850c Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Tue, 26 Oct 2021

Re: [PATCH 4/5] gcc/nios2: Define the musl linker

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/27/2021 2:05 PM, Richard Purdie via Gcc-patches wrote: Add a definition of the musl linker used on the nios2 platform. 2021-10-26 Richard Purdie gcc/ChangeLog: * config/nios2/linux.h (MUSL_DYNAMIC_LINKER): Add musl linker THanks.  I've pushed this to the trunk jeff

[PATCH] vect: Add bias parameter for partial vectorization

2021-10-28 Thread Robin Dapp via Gcc-patches
Hi, as discussed in https://gcc.gnu.org/pipermail/gcc-patches/2021-October/582627.html this introduces a bias parameter for the len_load/len_store ifns as well as optabs that is meant to distinguish between Power and s390 variants. The default is a bias of 0, while in s390's case vll/vstl do not

Re: [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/28/2021 1:04 AM, Richard Biener via Gcc-patches wrote: On Wed, Oct 27, 2021 at 10:10 PM Richard Purdie via Gcc-patches wrote: During cross compiling, CPP is being set to the target compiler even for build targets. As an example, when building a cross compiler targetting mingw, the

Re: [PATCH] c++: Implement C++23 P2128R6 - Multidimensional subscript operator [PR102611]

2021-10-28 Thread Jakub Jelinek via Gcc-patches
Hi! On Thu, Oct 14, 2021 at 10:26:29AM +0200, Jakub Jelinek via Gcc-patches wrote: > The following patch implements the C++23 Multidimensional subscript operator > P2128R6 paper. I'd like to ping this patch. Thanks. > 2021-10-14 Jakub Jelinek > > PR c++/102611 > gcc/ > *

Re: [Version 2][Patch][PR102281]do not add BUILTIN_CLEAR_PADDING for variables that are gimple registers

2021-10-28 Thread Qing Zhao via Gcc-patches
Ping…. Hi, Based on the previous discussion, I thought that we have agreed that the proposed patch for this current bug is the correct fix. And This bug is an important bug that need to be fixed. I have created another new PR for the other potential issue with padding initialization for

Update documentation of %X spec after 27 years

2021-10-28 Thread Eric Botcazou via Gcc-patches
The current documentation states: "%X Output the accumulated linker options specified by -Wl or a ‘%x’ spec string." The part about -Wl has been obsolete for 27 years, since this change: Author: Torbjorn Granlund Date: Thu Oct 27 18:04:25 1994 + (process_command): Handle -Wl, and

[PATCH 3/3] RISC-V: Imply info and regs limit for zfinx extension

2021-10-28 Thread jiawei
Co-Authored-By: sinan --- gcc/config/riscv/arch-canonicalize | 1 + gcc/config/riscv/constraints.md| 3 ++- gcc/config/riscv/riscv.c | 15 +-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/arch-canonicalize

[PATCH 2/3] RISC-V: Target support for zfinx extension

2021-10-28 Thread jiawei
Co-Authored-By: sinan --- gcc/config/riscv/riscv-builtins.c | 4 +- gcc/config/riscv/riscv-c.c| 2 +- gcc/config/riscv/riscv.md | 72 +++ 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/gcc/config/riscv/riscv-builtins.c

[PATCH 1/3] RISC-V: Minimal support of zfinx extension

2021-10-28 Thread jiawei
Co-Authored-By: sinan --- gcc/common/config/riscv/riscv-common.c | 6 ++ gcc/config/riscv/riscv-opts.h | 6 ++ gcc/config/riscv/riscv.opt | 3 +++ 3 files changed, 15 insertions(+) diff --git a/gcc/common/config/riscv/riscv-common.c

[PATCH 0/3] RISC-V: Zfinx extension support

2021-10-28 Thread jiawei
Zfinx extension[1] had already finished public review. Here is the implementation patch set that reuse floating point pattern and ban the use of fpr when use zfinx as a target. Current works can be find in follow links, we will keep update zhinx and zhinxmin after zfh extension goes upstream.

Re: [COMMITTED] Fold all statements in Ranger VRP.

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/28/2021 7:47 AM, Andrew MacLeod wrote: On 10/28/21 9:38 AM, Jeff Law wrote: On 10/25/2021 6:03 PM, Andrew MacLeod via Gcc-patches wrote: This patch changes the ranger VRP pass to simplify all statements, not just the ones with ranges.  I believe Jeff had mentioned we were no longer

Re: [COMMITTED] Fold all statements in Ranger VRP.

2021-10-28 Thread Andrew MacLeod via Gcc-patches
On 10/28/21 9:38 AM, Jeff Law wrote: On 10/25/2021 6:03 PM, Andrew MacLeod via Gcc-patches wrote: This patch changes the ranger VRP pass to simplify all statements, not just the ones with ranges.  I believe Jeff had mentioned we were no longer doing this a while back.  Now we need it when

Re: [COMMITTED] Fold all statements in Ranger VRP.

2021-10-28 Thread Jeff Law via Gcc-patches
On 10/25/2021 6:03 PM, Andrew MacLeod via Gcc-patches wrote: This patch changes the ranger VRP pass to simplify all statements, not just the ones with ranges.  I believe Jeff had mentioned we were no longer doing this a while back.  Now we need it when running as the VRP2 pass to satisfy

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 02:40:24PM +0200, Richard Biener wrote: > This makes us honor -frounding-math for integer to float conversions > and avoid constant folding when such conversion is not exact. > > 2021-10-28 Richard Biener > > PR middle-end/84407 > * fold-const.c

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Richard Biener via Gcc-patches
On Thu, 28 Oct 2021, Jakub Jelinek wrote: > On Thu, Oct 28, 2021 at 02:24:23PM +0200, Richard Biener wrote: > > I'm not able to trigger unsigned_float to be used, even when > > converting 0x8001 I get (float:DF (reg:DI...)) > > on x86_64 because we emit conditional code that will end

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Richard Biener via Gcc-patches
On Thu, 28 Oct 2021, Richard Biener wrote: > On Thu, 28 Oct 2021, Jakub Jelinek wrote: > > > On Thu, Oct 28, 2021 at 01:32:17PM +0200, Richard Biener wrote: > > > diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c > > > index f38b6d7d31c..a16395befcd 100644 > > > --- a/gcc/simplify-rtx.c > > >

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 02:24:23PM +0200, Richard Biener wrote: > I'm not able to trigger unsigned_float to be used, even when > converting 0x8001 I get (float:DF (reg:DI...)) > on x86_64 because we emit conditional code that will end up > using some compensation to emulate

[COMMITTED] Improve backward threading with switches.

2021-10-28 Thread Aldy Hernandez via Gcc-patches
We've been essentially using find_taken_edge_switch_expr() in the backward threader, but this is suboptimal because said function only works with singletons. VRP has a much smarter find_case_label_range that works with ranges. Tested on x86-64 Linux with: a) Bootstrap & regtests.

[COMMITTED] Make back_threader_registry inherit from back_jt_path_registry.

2021-10-28 Thread Aldy Hernandez via Gcc-patches
When a class's only purpose is to expose the methods of its only member, it's really a derived class ;-). Tested on x86-64 Linux. Committed as obvious. gcc/ChangeLog: * tree-ssa-threadbackward.c (class back_threader_registry): Inherit from back_jt_path_registry.

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Richard Biener via Gcc-patches
On Thu, 28 Oct 2021, Jakub Jelinek wrote: > On Thu, Oct 28, 2021 at 01:32:17PM +0200, Richard Biener wrote: > > diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c > > index f38b6d7d31c..a16395befcd 100644 > > --- a/gcc/simplify-rtx.c > > +++ b/gcc/simplify-rtx.c > > @@ -1917,6 +1917,19 @@

Re: [PATCH] c++, v2: Implement DR2351 - void{} [PR102820]

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 08:01:27AM -0400, Jason Merrill wrote: > > --- gcc/cp/semantics.c.jj 2021-10-27 09:16:41.161600606 +0200 > > +++ gcc/cp/semantics.c 2021-10-28 13:06:59.325791588 +0200 > > @@ -3079,6 +3079,24 @@ finish_unary_op_expr (location_t op_loc, > > return result; > > }

Re: [PATCH] c++, v2: Implement DR2351 - void{} [PR102820]

2021-10-28 Thread Jason Merrill via Gcc-patches
On 10/28/21 07:26, Jakub Jelinek wrote: On Wed, Oct 27, 2021 at 04:58:53PM -0400, Jason Merrill wrote: On 10/21/21 04:42, Jakub Jelinek wrote: Hi! Here is an attempt to implement DR2351 - void{} - where void{} after pack expansion is considered valid and the same thing as void(). For

Re: [PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 01:32:17PM +0200, Richard Biener wrote: > diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c > index f38b6d7d31c..a16395befcd 100644 > --- a/gcc/simplify-rtx.c > +++ b/gcc/simplify-rtx.c > @@ -1917,6 +1917,19 @@ simplify_const_unary_operation (enum rtx_code code, >

Re: [PATCH] match.pd: Optimize MIN_EXPR etc. addr1 < addr2 would be simplified [PR102951]

2021-10-28 Thread Richard Biener via Gcc-patches
On Thu, 28 Oct 2021, Jakub Jelinek wrote: > Hi! > > This patch outlines the decision whether address comparison can be folded > or not from the match.pd simple comparison simplification and uses it > both there and in a new minmax simplification, such that we fold e.g. > MAX ([2], [1]) > etc.

[Patch 8/8, Arm, GCC] Introduce multilibs for PACBTI target feature. [Was RE: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+belagod=gcc.gnu@gcc.gnu.org> On Behalf Of Tejas Belagod via > Gcc-patches > Sent: Friday, October 8, 2021 1:19 PM > To: gcc-patches@gcc.gnu.org > Subject: [Patch 7/7, Arm, GCC] Introduce multilibs for PACBTI target feature. > > Hi, >

[Patch 7/8, Arm, GCC] Emit build attributes for PACBTI target feature. [ Was RE: [Patch 6/7, Arm, GCC] Emit build attributes for PACBTI target feature.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+belagod=gcc.gnu@gcc.gnu.org> On Behalf Of Tejas Belagod via > Gcc-patches > Sent: Friday, October 8, 2021 1:19 PM > To: gcc-patches@gcc.gnu.org > Subject: [Patch 6/7, Arm, GCC] Emit build attributes for PACBTI target > feature. > >

[Patch 6/8, Arm. GCC] Add pointer authentication for stack-unwinding runtime. [Was RE: [Patch 5/7, Arm. GCC] Add pointer authentication for stack-unwinding runtime.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+belagod=gcc.gnu@gcc.gnu.org> On Behalf Of Tejas Belagod via > Gcc-patches > Sent: Friday, October 8, 2021 1:18 PM > To: gcc-patches@gcc.gnu.org > Subject: [Patch 5/7, Arm. GCC] Add pointer authentication for stack- > unwinding

[Patch 5/8, Arm, GCC] Implement target feature macros for PACBTI. [Was RE: [Patch 4/7, Arm. GCC] Implement target feature macros for PACBTI.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 2:58 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 4/7, Arm. GCC] Implement target feature macros for > PACBTI. > > On 08/10/2021 13:18, Tejas Belagod via Gcc-patches wrote: > > Hi,

[Patch 4/8, Arm. GCC] Add testsuite library support for PACBTI target. [Was RE: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI target.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 2:38 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 3/7, Arm, GCC] Add testsuite library support for PACBTI > target. > > On 11/10/2021 14:36, Richard Earnshaw via Gcc-patches wrote:

[Patch 3/8, Arm, GCC] Add option -mbranch-protection. [Was RE: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 1:58 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 2/7, Arm, GCC] Add option -mbranch-protection. > > On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: > > Hi, > > > > Add

[Patch 2/8, Arm, GCC] Add Armv8.1-M Mainline target feature +pacbti. [Was RE: [Patch 1/7, Arm, GCC] Add Armv8.1-M Mainline target feature +pacbti.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 1:29 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 1/7, Arm, GCC] Add Armv8.1-M Mainline target feature > +pacbti. > > On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: > >

[Patch 1/8, Arm, AArch64, GCC] Refactor mbranch-protection option parsing and make it common to AArch32 and AArch64 backends. [Was RE: [Patch 2/7, Arm, GCC] Add option -mbranch-protection.]

2021-10-28 Thread Tejas Belagod via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, October 11, 2021 1:58 PM > To: Tejas Belagod ; gcc-patches@gcc.gnu.org > Subject: Re: [Patch 2/7, Arm, GCC] Add option -mbranch-protection. > > On 08/10/2021 13:17, Tejas Belagod via Gcc-patches wrote: > > Hi, > > > > Add

[PATCH] middle-end/84407 - honor -frounding-math for int to float conversion

2021-10-28 Thread Richard Biener via Gcc-patches
This makes us honor -frounding-math for integer to float conversions and avoid constant folding when such conversion is not exact. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard. 2021-10-28 Richard Biener PR middle-end/84407 * fold-const.c

[PATCH v4 1/1] [ARM] Add support for TLS register based stack protector canary access

2021-10-28 Thread Ard Biesheuvel via Gcc-patches
Add support for accessing the stack canary value via the TLS register, so that multiple threads running in the same address space can use distinct canary values. This is intended for the Linux kernel running in SMP mode, where processes entering the kernel are essentially threads running the same

[PATCH v4 0/1] implement TLS register based stack canary for ARM

2021-10-28 Thread Ard Biesheuvel via Gcc-patches
Bugzilla: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102352 In the Linux kernel, user processes calling into the kernel are essentially threads running in the same address space, of a program that never terminates. This means that using a global variable for the stack protector canary value is

[PATCH] c++, v2: Implement DR2351 - void{} [PR102820]

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 27, 2021 at 04:58:53PM -0400, Jason Merrill wrote: > On 10/21/21 04:42, Jakub Jelinek wrote: > > Hi! > > > > Here is an attempt to implement DR2351 - void{} - where void{} after > > pack expansion is considered valid and the same thing as void(). > > For templates, dunno if we have

[PATCH] match.pd: Optimize MIN_EXPR etc. addr1 < addr2 would be simplified [PR102951]

2021-10-28 Thread Jakub Jelinek via Gcc-patches
Hi! This patch outlines the decision whether address comparison can be folded or not from the match.pd simple comparison simplification and uses it both there and in a new minmax simplification, such that we fold e.g. MAX ([2], [1]) etc. Some of the Wstringop-overflow-62.c changes might look

Re: [PATCH] middle-end/57245 - honor -frounding-math in real truncation

2021-10-28 Thread Jakub Jelinek via Gcc-patches
On Thu, Oct 28, 2021 at 10:11:36AM +0200, Richard Biener wrote: > 2021-10-27 Richard Biener > > PR middle-end/57245 > * fold-const.c (fold_convert_const_real_from_real): Honor > -frounding-math if the conversion is not exact. > * simplify-rtx.c

Re: [RFC] Overflow check in simplifying exit cond comparing two IVs.

2021-10-28 Thread Richard Biener via Gcc-patches
On Mon, 18 Oct 2021, Jiufu Guo wrote: > With reference the discussions in: > https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574334.html > https://gcc.gnu.org/pipermail/gcc-patches/2021-June/572006.html > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578672.html > > Base on the

[PATCH] tree-optimization/102949 - fix base object alignment

2021-10-28 Thread Richard Biener via Gcc-patches
This fixes fallout of g:4703182a06b831a9 where we now silently fail to force alignment of a base object. The fix is to look at the dr_info of the group leader to be consistent with alignment analysis. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-28 Richard Biener

Re: [aarch64] PR102376 - Emit better diagnostic for arch extensions in target attr

2021-10-28 Thread Prathamesh Kulkarni via Gcc-patches
On Fri, 22 Oct 2021 at 14:41, Prathamesh Kulkarni wrote: > > On Wed, 20 Oct 2021 at 15:05, Richard Sandiford > wrote: > > > > Prathamesh Kulkarni writes: > > > On Tue, 19 Oct 2021 at 19:58, Richard Sandiford > > > wrote: > > >> > > >> Prathamesh Kulkarni writes: > > >> > Hi, > > >> > The

Re: [PATCH] middle-end/57245 - honor -frounding-math in real truncation

2021-10-28 Thread Richard Biener via Gcc-patches
On Wed, 27 Oct 2021, Richard Biener wrote: > On October 27, 2021 4:44:53 PM GMT+02:00, Jakub Jelinek > wrote: > >On Wed, Oct 27, 2021 at 04:29:38PM +0200, Richard Biener wrote: > >> So something like the following below? Note I have to fix > >> simplify_const_unary_operation to not perform

[PATCH] Adjust testcase for O2 vect.

2021-10-28 Thread liuhongt via Gcc-patches
Adjust code in check_vect_slp_aligned_store_usage to make it an exact pattern match of the corresponding testcases. These new target/xfail selectors are added as a temporary solution, and should be removed after real issue is fixed for Wstringop-overflow. gcc/ChangeLog: *

Re: [PATCH 1/5] Makefile.in: Ensure build CPP/CPPFLAGS is used for build targets

2021-10-28 Thread Richard Biener via Gcc-patches
On Wed, Oct 27, 2021 at 10:10 PM Richard Purdie via Gcc-patches wrote: > > During cross compiling, CPP is being set to the target compiler even for > build targets. As an example, when building a cross compiler targetting > mingw, the config.log for libiberty in >

[committed] RISC-V: Fix wrong predicator for zero_extendsidi2_internal pattern

2021-10-28 Thread Kito Cheng
We're wrongly guard zero_extendsidi2_internal pattern both ZBA and ZBB, only ZBA provide zero_extendsidi2 instruction. gcc/ChangeLog * config/riscv/riscv.md (zero_extendsidi2_internal): Allow ZBB use this pattern. --- gcc/config/riscv/riscv.md | 2 +- 1 file changed, 1

[committed] RISC-V: Handle zi* extension correctly for arch-canonicalize script

2021-10-28 Thread Kito Cheng
Canonical order for z-prefixed extension are rely on the canonical order of single letter extension, however we didn't put i into the list before, so when we put zicsr or zifencei it will got exception. gcc/ChangeLog: * config/riscv/arch-canonicalize (CANONICAL_ORDER): Add `i` to