[PATCH] Fix gcc.dg/vect/bb-slp-pr65935.c FAIL with AVX after recent change

2021-09-28 Thread Richard Biener via Gcc-patches
This avoids bigger than V2DF vectorization which disturbs the ability to consistently check for the vectorization result after us now also vectorizing the V2DF tail of a V4DF vectorization variant. tested on x86_64-unknown-linux-gnu, pushed. 2021-09-28 Richard Biener * gcc.dg/vect/bb-

Re: [r12-3899 Regression] FAIL: gcc.dg/strlenopt-13.c scan-tree-dump-times strlen1 "memcpy \\(" 7 on Linux/x86_64

2021-09-28 Thread Richard Biener via Gcc-patches
On Mon, 27 Sep 2021, sunil.k.pandey wrote: > On Linux/x86_64, > > d06dc8a2c73735e9496f434787ba4c93ceee5eea is the first bad commit > commit d06dc8a2c73735e9496f434787ba4c93ceee5eea > Author: Richard Biener > Date: Mon Sep 27 13:36:12 2021 +0200 > > middle-end/102450 - avoid type_for_size

Re: [PATCH] AVX512FP16:support basic 64/32bit vector type and operation.

2021-09-28 Thread Hongyu Wang via Gcc-patches
> I'd put this new pattern in mmx.md to keep 64bit/32bit modes in > mmx.md, similar to e.g. FMA patterns among others. Yes, I put it after single-float patterns. Attached the patch I'm going to check-in. Thanks for your review. Uros Bizjak 于2021年9月28日周二 下午2:27写道: > > On Tue, Sep 28, 2021 at 6:48

Re: [r12-3893 Regression] FAIL: gcc.target/i386/vect-pr97352.c scan-assembler-times vmov.pd 4 on Linux/x86_64

2021-09-28 Thread Hongtao Liu via Gcc-patches
On Tue, Sep 28, 2021 at 2:59 PM Richard Biener via Gcc-patches wrote: > > On Mon, 27 Sep 2021, sunil.k.pandey wrote: > > > On Linux/x86_64, > > > > 6390c5047adb75960f86d56582e6322aaa4d9281 is the first bad commit > > commit 6390c5047adb75960f86d56582e6322aaa4d9281 > > Author: Richard Biener > > D

Re: [PATCH] Control all jump threading passes with -fjump-threads.

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, Sep 28, 2021 at 8:29 AM Jeff Law via Gcc-patches wrote: > > > > On 9/28/2021 12:17 AM, Aldy Hernandez wrote: > > On Tue, Sep 28, 2021 at 3:46 AM Jeff Law wrote: > >> > >> > >> On 9/27/2021 9:00 AM, Aldy Hernandez wrote: > >>> Last year I mentioned that -fthread-jumps was being ignored by

Re: [PATCH] [GIMPLE] Simplify (_Float16) ceil ((double) x) to .CEIL (x) when available.

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, Sep 28, 2021 at 4:01 AM Hongtao Liu wrote: > > On Mon, Sep 27, 2021 at 8:53 PM Richard Biener > wrote: > > > > On Fri, Sep 24, 2021 at 1:26 PM liuhongt wrote: > > > > > > Hi: > > > Related discussion in [1] and PR. > > > > > > Bootstrapped and regtest on x86_64-linux-gnu{-m32,}. > >

[committed] gfortran.dg/include_15.f90: Add dg-prune-output [PR102500]

2021-09-28 Thread Tobias Burnus
It turned out that one warning output depended on details how the testsuite it run. Thus, just ignore that bit that did not always appear or not by using dg-prune-output. Those subtle differences in test runs which make a test fail or not fail, depending on how GCC's testsuite is run, make life l

Re: [PATCH] [i386] Support reduc_{plus, smax, smin, umax, min}_scal_v4hi.

2021-09-28 Thread Uros Bizjak via Gcc-patches
On Tue, Sep 28, 2021 at 8:42 AM liuhongt wrote: > > Hi: > Bootstrapped and regtested on x86_64-pc-lunux-gnu{-m32,}. > Ok for trunk? > > gcc/ChangeLog: > > PR target/102494 > * config/i386/i386-expand.c (emit_reduc_half): Hanlde V4HImode. > * config/i386/mmx.md (reduc_pl

Re: [r12-3893 Regression] FAIL: gcc.target/i386/vect-pr97352.c scan-assembler-times vmov.pd 4 on Linux/x86_64

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, 28 Sep 2021, Hongtao Liu wrote: > On Tue, Sep 28, 2021 at 2:59 PM Richard Biener via Gcc-patches > wrote: > > > > On Mon, 27 Sep 2021, sunil.k.pandey wrote: > > > > > On Linux/x86_64, > > > > > > 6390c5047adb75960f86d56582e6322aaa4d9281 is the first bad commit > > > commit 6390c5047adb759

[PATCH] Fix gcc.target/i386/vect-pr97352.c for -m32 -march=cascadelake

2021-09-28 Thread Richard Biener via Gcc-patches
The easiest is to disable AVX2 and AVX512F explicitely. Tested on x86_64-unknown-linux-gnu, pushed. 2021-09-28 Richard Biener * gcc.target/i386/vect-pr97352.c: Pass -mno-avx2 -mno-avx512f. --- gcc/testsuite/gcc.target/i386/vect-pr97352.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi, As the discussion in PR102347, currently builtin_decl is invoked so early, it's when making up the function_decl for builtin functions, at that time the rs6000_builtin_mask could be wrong for those builtins sitting in #pragma/attribute target functions, though it will be updated properly later

[PATCH v2] rs6000: Modify the way for extra penalized cost

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi, This patch follows the discussions here[1][2], where Segher pointed out the existing way to guard the extra penalized cost for strided/elementwise loads with a magic bound does not scale. The way with nunits * stmt_cost can get one much exaggerated penalized cost, such as: for V16QI on P8, it

Re: [r12-3893 Regression] FAIL: gcc.target/i386/vect-pr97352.c scan-assembler-times vmov.pd 4 on Linux/x86_64

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, 28 Sep 2021, Richard Biener wrote: > On Tue, 28 Sep 2021, Hongtao Liu wrote: > > > On Tue, Sep 28, 2021 at 2:59 PM Richard Biener via Gcc-patches > > wrote: > > > > > > On Mon, 27 Sep 2021, sunil.k.pandey wrote: > > > > > > > On Linux/x86_64, > > > > > > > > 6390c5047adb75960f86d56582e63

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi Segher, on 2021/9/23 上午6:36, Segher Boessenkool wrote: > Hi! > > On Tue, Sep 21, 2021 at 11:24:08AM +0800, Kewen.Lin wrote: >> on 2021/9/18 上午6:01, Segher Boessenkool wrote: >>> On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: The way with nunits * stmt_cost can get one much exa

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

2021-09-28 Thread Andrew Burgess
* Richard Biener [2021-09-27 10:23:50 +0200]: > On Fri, Sep 24, 2021 at 12:34 PM Andrew Burgess > wrote: > > > > * Thomas Schwinge [2021-09-23 11:29:05 +0200]: > > > > > Hi! > > > > > > I only had a curious look here; hope that's still useful. > > > > > > On 2021-09-22T16:30:42+0100, Andrew Bur

PING^2 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059]

2021-09-28 Thread Kewen.Lin via Gcc-patches
Hi, Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html One related patch [1] is ready to commit, whose test cases rely on this patch if no changes are applied to them. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579658.html BR, Kewen

[COMMITTED] Return VARYING in range_on_path_entry if nothing found.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
The problem here is that the solver's code solving unknown SSAs on entry to a path was returning UNDEFINED if there were no incoming edges to the start of the path that were not the function entry block. This caused a cascade of pain down stream. Tested on x86-64 Linux. PR tree-optimizat

[PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
Hi! The testcases in the patch are either miscompiled or ICE with checking, because the defaulted operator== is synthetized too early (but only if constexpr), when the corresponding class type is still incomplete type. The problem is that at that point the bitfield FIELD_DECLs still have as TREE_T

Re: [RFC 1/7] Avoid references to register names in instruction output patterns.

2021-09-28 Thread YunQiang Su
Dragan Mladjenovic via Gcc-patches 于2021年9月26日周日 下午9:26写道: > > This allows us to choose the different names if needed in the future. > I try to apply this patch to current gcc, I get this error: /build/mips-mti-elf/srcs-gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c: In function 'foo':^M /b

[PATCH] i386: Don't emit fldpi etc. if -frounding-math [PR102498]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
Hi! i387 has instructions to store some transcedental numbers into the top of stack. The problem is that what exact bit in the last place one gets for those depends on the current rounding mode, the CPU knows the number with slightly higher precision. The compiler assumes rounding to nearest whe

Re: [PATCH] Control all jump threading passes with -fjump-threads.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
On 9/28/21 9:41 AM, Richard Biener wrote: On Tue, Sep 28, 2021 at 8:29 AM Jeff Law via Gcc-patches wrote: On 9/28/2021 12:17 AM, Aldy Hernandez wrote: On Tue, Sep 28, 2021 at 3:46 AM Jeff Law wrote: On 9/27/2021 9:00 AM, Aldy Hernandez wrote: Last year I mentioned that -fthread-jumps

[committed] openmp: Don't call omp_finish_clause on implicitly added private clauses on simd [PR102492]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
Hi! The gimplifier adds implicit private clauses on SIMD constructs for local variables in the SIMD body if they are addressable to make sure they use the magic arrays with "omp simd array" attribute (such that each SIMD lane has its own copy), but we actually don't need to default privatize etc.

[PATCH] Improve jump threading dump output.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
In analyzing PR102511, it has become abundantly clear that we need better debugging aids for the jump threader solver. Currently debugging these issues is a nightmare if you're not intimately familiar with the code. This patch attempts to improve this. First, I'm enabling path solver dumps with

Re: [PATCH] i386: Don't emit fldpi etc. if -frounding-math [PR102498]

2021-09-28 Thread Uros Bizjak via Gcc-patches
On Tue, Sep 28, 2021 at 11:33 AM Jakub Jelinek wrote: > > Hi! > > i387 has instructions to store some transcedental numbers into the top of > stack. The problem is that what exact bit in the last place one gets for > those depends on the current rounding mode, the CPU knows the number with > slig

[PATCH] tree-optimization/99793 - testcase for the PR

2021-09-28 Thread Richard Biener via Gcc-patches
This adds a testcase for the PR which was fixed with the fix for PR100112. Tested on x86_64-unknown-linux-gnu, pushed. 2021-09-28 Richard Biener PR tree-optimization/99793 * gcc.dg/tree-ssa/pr99793.c: New testcase. --- gcc/testsuite/gcc.dg/tree-ssa/pr99793.c | 14

Re: [PATCH] Control all jump threading passes with -fjump-threads.

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, Sep 28, 2021 at 11:42 AM Aldy Hernandez wrote: > > > > On 9/28/21 9:41 AM, Richard Biener wrote: > > On Tue, Sep 28, 2021 at 8:29 AM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> > >> On 9/28/2021 12:17 AM, Aldy Hernandez wrote: > >>> On Tue, Sep 28, 2021 at 3:46 AM Jeff Law wrote:

RE: [PATCH 01/13] arm: Add new tests for comparison vectorization with Neon and MVE

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
Hi Christophe, Sorry for the delay. > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: 07 September 2021 10:15 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH 01/13] arm: Add new tests for comparison

RE: [PATCH 02/13] arm: Add tests for PR target/100757

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: 07 September 2021 10:15 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH 02/13] arm: Add tests for PR target/100757 > > These tests currently trigg

RE: [PATCH 03/13] arm: Add test for PR target/101325

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: 07 September 2021 10:15 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH 03/13] arm: Add test for PR target/101325 > > This test is derived from th

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

2021-09-28 Thread Richard Biener via Gcc-patches
On Sun, 26 Sep 2021, liuhongt wrote: > Hi: > > Please don't add the -fno- option to the warning tests.  As I said, > > I would prefer to either suppress the vectorization for the failing > > cases by tweaking the test code or xfail them.  That way future > > regressions won't be masked by the opti

RE: [PATCH 04/13] arm: Add GENERAL_AND_VPR_REGS regclass

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
Hi Christophe, > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > LYON via Gcc-patches > Sent: 08 September 2021 08:49 > To: Richard Earnshaw ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH 04/13] arm: Add GENERAL_AND_VPR_REGS

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

2021-09-28 Thread Richard Biener via Gcc-patches
On Sun, 26 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: > > * passe

RE: [PATCH 05/13] arm: Add support for VPR_REG in arm_class_likely_spilled_p

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: 07 September 2021 10:17 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH 05/13] arm: Add support for VPR_REG in > arm_class_likely_spilled_p > > VP

RE: [PATCH 06/13] arm: Fix mve_vmvnq_n_ argument mode

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: 07 September 2021 10:17 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH 06/13] arm: Fix mve_vmvnq_n_ argument > mode > > The vmvnq_n* intrinsics a

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

2021-09-28 Thread Richard Biener via Gcc-patches
On Sun, 26 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 >

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

2021-09-28 Thread Richard Biener via Gcc-patches
On Sun, 26 Sep 2021, Ilya Leoshkevich wrote: > Add both positive and negative tests. The tests will likely be quite fragile with respect to what is actually vectorized on which target. If you move the tests to gcc.dg/vect/ you could at least do /* { dg-require-effective-target vect_int } */ do

RE: [PATCH] Make flag_trapping_math a non-binary Boolean.

2021-09-28 Thread Roger Sayle
Hi Joseph, Firstly very many thanks for taking the time to respond, and especially for mentioning the discussion in PR 54192 (and Marc Glisse's -ffenv-access patches, but they are a little less relevant). Indeed the starting point for this patch is Richard Beiner's proposal in comment #9 for tha

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

2021-09-28 Thread Ilya Leoshkevich via Gcc-patches
On Tue, 2021-09-28 at 13:28 +0200, Richard Biener wrote: > On Sun, 26 Sep 2021, Ilya Leoshkevich wrote: > > > Add both positive and negative tests. > > The tests will likely be quite fragile with respect to what is > actually vectorized on which target.  If you move the tests > to gcc.dg/vect/ yo

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-09-28 Thread Richard Biener via Gcc-patches
On Wed, Sep 15, 2021 at 10:46 AM Martin Liška wrote: > > Hello. > > The patch extends the loop unswitching pass so that gswitch > statements are supported. The pass now uses ranger which marks > switch edges that are known to be unreachable in a versioned loop. > > Patch can bootstrap on x86_64-li

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-28 Thread Richard Biener via Gcc-patches
On Fri, Sep 24, 2021 at 8:29 AM Xionghu Luo wrote: > > Update the patch to v3, not sure whether you prefer the paste style > and continue to link the previous thread as Segher dislikes this... > > > [PATCH v3] Don't move cold code out of loop by checking bb count > > > Changes: > 1. Handle max_loo

Re: [PATCH] Make flag_trapping_math a non-binary Boolean.

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, Sep 28, 2021 at 1:34 PM Roger Sayle wrote: > > > Hi Joseph, > Firstly very many thanks for taking the time to respond, and especially for > mentioning > the discussion in PR 54192 (and Marc Glisse's -ffenv-access patches, but > they are a > little less relevant). Indeed the starting point

Re: [committed] libgomp.oacc-fortran/privatized-ref-2.f90: Fix dg-note (was: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070])

2021-09-28 Thread Thomas Schwinge
Hi! On 2021-09-27T14:38:56+0200, Tobias Burnus wrote: > On 27.09.21 14:07, Tobias Burnus wrote: >> now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 > > I accidentally changed dg-note to dg-message when updating the expected > output, as the dump has changed. (Copying seemingly the

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-28 Thread Thomas Schwinge
Hi! On 2021-09-27T14:07:53+0200, Tobias Burnus wrote: > now committed r12-3897-g00f6de9c69119594f7dad3bd525937c94c8200d0 > Conclusion: Reviews are very helpful :-) Ha! :-) (... and I wasn't even involed here!) ;-P As testing showed here: > --- /dev/null > +++ b/gcc/testsuite/gfortran.dg/a

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

2021-09-28 Thread Richard Biener via Gcc-patches
On Tue, 28 Sep 2021, Ilya Leoshkevich wrote: > On Tue, 2021-09-28 at 13:28 +0200, Richard Biener wrote: > > On Sun, 26 Sep 2021, Ilya Leoshkevich wrote: > > > > > Add both positive and negative tests. > > > > The tests will likely be quite fragile with respect to what is > > actually vectorized

[Patch] libgomp: Only check for 2*sizeof(void*) int type with Fortran [PR96661]

2021-09-28 Thread Tobias Burnus
Found this one lurking around in one of my trees. It does not solve the actual issue of John that hppa64-hp-hpux11.11 does not have an __int128 alias integer(kind=16) type. The latter is required for OpenMP's omp_depend_kind as per implementation choice is has to be large enough to store two poin

Re: [Patch] libgomp: Only check for 2*sizeof(void*) int type with Fortran [PR96661]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 28, 2021 at 03:00:56PM +0200, Tobias Burnus wrote: > The depend type is a struct with two pointer members for C/C++ - but for > Fortran OpenMP requires an integer type with kind = omp_depend_kind. Thus, > libgomp's configure checks that an integer type/kind with size 2*sizeof(void*) > i

[PATCH 8/7] ifcvt: Second try in order to avoid unnecessary temporaries

2021-09-28 Thread Robin Dapp via Gcc-patches
Hi, this patch implements the latest of my attempts to avoid some of the unnecessary temporaries noce_convert_multiple currently emits. I named it 8/7 because it actually applies on top of the last series that is not yet approved while being a rather minor change. The idea is to go over the

Re: [PATCH] Always default to DWARF2_DEBUG if not specified, warn about deprecated STABS

2021-09-28 Thread Koning, Paul via Gcc-patches
> On Sep 28, 2021, at 2:14 AM, Richard Biener via Gcc-patches > wrote: > > On Tue, Sep 21, 2021 at 4:26 PM Richard Biener via Gcc-patches > wrote: >> >> This makes defaults.h choose DWARF2_DEBUG if PREFERRED_DEBUGGING_TYPE >> is not specified by the target and errors out if DWARF DWARF is n

Re: [PATCH 02/13] arm: Add tests for PR target/100757

2021-09-28 Thread Christophe LYON via Gcc-patches
On 28/09/2021 13:12, Kyrylo Tkachov wrote: -Original Message- From: Gcc-patches On Behalf Of Christophe Lyon via Gcc-patches Sent: 07 September 2021 10:15 To: gcc-patches@gcc.gnu.org Subject: [PATCH 02/13] arm: Add tests for PR target/100757 These tests currently trigger an ICE whic

Re: [PATCH 03/13] arm: Add test for PR target/101325

2021-09-28 Thread Christophe LYON via Gcc-patches
On 28/09/2021 13:14, Kyrylo Tkachov wrote: -Original Message- From: Gcc-patches On Behalf Of Christophe Lyon via Gcc-patches Sent: 07 September 2021 10:15 To: gcc-patches@gcc.gnu.org Subject: [PATCH 03/13] arm: Add test for PR target/101325 This test is derived from the one provided

Re: [PATCH 04/13] arm: Add GENERAL_AND_VPR_REGS regclass

2021-09-28 Thread Christophe LYON via Gcc-patches
On 28/09/2021 13:18, Kyrylo Tkachov wrote: Hi Christophe, -Original Message- From: Gcc-patches On Behalf Of Christophe LYON via Gcc-patches Sent: 08 September 2021 08:49 To: Richard Earnshaw ; gcc- patc...@gcc.gnu.org Subject: Re: [PATCH 04/13] arm: Add GENERAL_AND_VPR_REGS regclass

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Jeff Law via Gcc-patches
On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need better debugging aids for the jump threader solver. Currently debugging these issues is a nightmare if you're not intimately familiar with the code. This patch attempts to improve t

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Patrick Palka via Gcc-patches
On Tue, 28 Sep 2021, Jakub Jelinek via Gcc-patches wrote: > Hi! > > The testcases in the patch are either miscompiled or ICE with checking, > because the defaulted operator== is synthetized too early (but only if > constexpr), when the corresponding class type is still incomplete type. > The prob

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Patrick Palka via Gcc-patches
On Tue, 28 Sep 2021, Patrick Palka wrote: > On Tue, 28 Sep 2021, Jakub Jelinek via Gcc-patches wrote: > > > Hi! > > > > The testcases in the patch are either miscompiled or ICE with checking, > > because the defaulted operator== is synthetized too early (but only if > > constexpr), when the corr

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
On 9/28/21 3:47 PM, Jeff Law wrote: On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need better debugging aids for the jump threader solver.  Currently debugging these issues is a nightmare if you're not intimately familiar with the

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Jeff Law via Gcc-patches
On 9/28/2021 7:53 AM, Aldy Hernandez wrote: On 9/28/21 3:47 PM, Jeff Law wrote: On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need better debugging aids for the jump threader solver.  Currently debugging these issues is a nightm

Re: *PING* [PATCH] c++: fix cases of core1001/1322 by not dropping cv-qualifier of function parameter of type of typename or decltype[PR101402,PR102033,PR102034,PR102039,PR102044]

2021-09-28 Thread Jason Merrill via Gcc-patches
On 9/25/21 15:15, nick huang wrote: Why doesn't the PR92010 fix address these testcases as well? 3. PR92010 creates new functions of "rebuild_function_or_method_type" and by using gdb to trace PR101402 code as following: template struct A { typedef T arr[3]; }; template void f(const typ

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 28, 2021 at 09:49:11AM -0400, Patrick Palka via Gcc-patches wrote: > > --- gcc/cp/method.c.jj 2021-09-15 08:55:37.563497558 +0200 > > +++ gcc/cp/method.c 2021-09-27 13:48:12.139271830 +0200 > > @@ -3160,8 +3160,11 @@ defaulted_late_check (tree fn) > >if (kind == sfk_comparison)

Fwd: [PATCH][testsuite][aarch64]: Fix gcc.target/aarch64/auto-init-* tests.

2021-09-28 Thread Qing Zhao via Gcc-patches
Ping… Qing Begin forwarded message: From: Qing Zhao via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> Subject: [PATCH][testsuite][aarch64]: Fix gcc.target/aarch64/auto-init-* tests. Date: September 21, 2021 at 2:20:58 PM CDT To: gcc-patches Nick Alcock via mailto:gcc-patches@gcc.gnu.org>> Reply

[PATCH] aarch64: Add command-line support for Armv8.7-a

2021-09-28 Thread Kyrylo Tkachov via Gcc-patches
Hi all, This patch adds support for -march=armv8.7-a in GCC. It adds the +ls64 extension that's included in this architecture revision. Currently this is just the command-line option and +ls64 allows the relevant instructions to be used in inline assembly. The ACLE defines some intrinsics for the

Re: [r12-3899 Regression] FAIL: gcc.dg/strlenopt-13.c scan-tree-dump-times strlen1 "memcpy \\(" 7 on Linux/x86_64

2021-09-28 Thread Martin Sebor via Gcc-patches
On 9/28/21 1:20 AM, Richard Biener wrote: On Mon, 27 Sep 2021, sunil.k.pandey wrote: On Linux/x86_64, d06dc8a2c73735e9496f434787ba4c93ceee5eea is the first bad commit commit d06dc8a2c73735e9496f434787ba4c93ceee5eea Author: Richard Biener Date: Mon Sep 27 13:36:12 2021 +0200 middle-end

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Jeff Law via Gcc-patches
On 9/28/2021 7:53 AM, Aldy Hernandez wrote: On 9/28/21 3:47 PM, Jeff Law wrote: On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need better debugging aids for the jump threader solver.  Currently debugging these issues is a nightm

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Richard Biener via Gcc-patches
On September 28, 2021 5:45:52 PM GMT+02:00, Jeff Law via Gcc-patches wrote: > > >On 9/28/2021 7:53 AM, Aldy Hernandez wrote: >> >> >> On 9/28/21 3:47 PM, Jeff Law wrote: >>> >>> >>> On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Richard Biener via Gcc-patches
On September 28, 2021 5:45:52 PM GMT+02:00, Jeff Law via Gcc-patches wrote: > > >On 9/28/2021 7:53 AM, Aldy Hernandez wrote: >> >> >> On 9/28/21 3:47 PM, Jeff Law wrote: >>> >>> >>> On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abundantly clear that we need

[PATCH] [PR102501] Adjust jump threading testcases for ppc64* and others.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
I really don't know what to do here. This is a bit of whack-o-mole. The IL is sufficiently different for various architectures that any tweak can cause the number of jump threads to vary. For the pr7745-2.c testcase, we have less threading candidates because 2 of them now cross loop boundaries.

Re: [PATCH] Improve jump threading dump output.

2021-09-28 Thread Aldy Hernandez via Gcc-patches
On 9/28/21 6:05 PM, Richard Biener wrote: On September 28, 2021 5:45:52 PM GMT+02:00, Jeff Law via Gcc-patches wrote: On 9/28/2021 7:53 AM, Aldy Hernandez wrote: On 9/28/21 3:47 PM, Jeff Law wrote: On 9/28/2021 3:45 AM, Aldy Hernandez wrote: In analyzing PR102511, it has become abu

[Patch] Fortran: Fix same_type_as

2021-09-28 Thread Tobias Burnus
Found when looking at Sandra's c535b-1.f90 and playing around. When fixing same_type_as, I spotted by code reading another issue, related to not catering for derived types. (Untested whether it failed indeed.) I added now a bunch of testcases. OK for mainline? Tobias - Siemens

Re: [PATCH] [PR102501] Adjust jump threading testcases for ppc64* and others.

2021-09-28 Thread Jeff Law via Gcc-patches
On 9/28/2021 10:09 AM, Aldy Hernandez wrote: I really don't know what to do here. This is a bit of whack-o-mole. The IL is sufficiently different for various architectures that any tweak can cause the number of jump threads to vary. For the pr7745-2.c testcase, we have less threading candida

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Patrick Palka via Gcc-patches
On Tue, 28 Sep 2021, Jakub Jelinek wrote: > On Tue, Sep 28, 2021 at 09:49:11AM -0400, Patrick Palka via Gcc-patches wrote: > > > --- gcc/cp/method.c.jj2021-09-15 08:55:37.563497558 +0200 > > > +++ gcc/cp/method.c 2021-09-27 13:48:12.139271830 +0200 > > > @@ -3160,8 +3160,11 @@ defaulted_

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 28, 2021 at 12:44:58PM -0400, Patrick Palka wrote: > Ah yeah, sorry for the noise, I misunderstood the function comment. > > On a related note I think 'ctx' can also be a NAMESPACE_DECL here in > the case of a defaulted non-member operator<=> (as in the below), for > which I'd expect t

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 28, 2021 at 06:49:38PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Tue, Sep 28, 2021 at 12:44:58PM -0400, Patrick Palka wrote: > > Ah yeah, sorry for the noise, I misunderstood the function comment. > > > > On a related note I think 'ctx' can also be a NAMESPACE_DECL here in > > t

[committed] libstdc++: Fix mismatched noexcept-specifiers in filesystem::path [PR102499]

2021-09-28 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: PR libstdc++/102499 * include/bits/fs_path.h (path::begin, path::end): Add noexcept to declarations, to match definitions. Tested x86_64-linux. Committed to trunk. commit f2b7f56a15d9cbbd2f0db22e0e39c4dd161bab69 Aut

[committed] libstdc++: Improve std::forward static assert message

2021-09-28 Thread Jonathan Wakely via Gcc-patches
The previous message told you something was wrong, but not why it happened or why it's bad. This changes it to explain that the function is being misused. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/move.h (forward(remove_reference_t&&)): Improve text o

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Patrick Palka via Gcc-patches
On Tue, 28 Sep 2021, Jakub Jelinek wrote: > On Tue, Sep 28, 2021 at 06:49:38PM +0200, Jakub Jelinek via Gcc-patches wrote: > > On Tue, Sep 28, 2021 at 12:44:58PM -0400, Patrick Palka wrote: > > > Ah yeah, sorry for the noise, I misunderstood the function comment. > > > > > > On a related note I t

Re: [PATCH] coroutines: Only set parm copy guard vars if we have exceptions [PR 102454].

2021-09-28 Thread Jason Merrill via Gcc-patches
On 9/27/21 15:38, Iain Sandoe wrote: For coroutines, we make copies of the original function arguments into the coroutine frame. Normally, these are destroyed on the proper exit from the coroutine when the frame is destroyed. However, if an exception is thrown before the first suspend point is

[PATCH] bpf: correct extra_headers

2021-09-28 Thread David Faust via Gcc-patches
The BPF CO-RE support (commit 8bdabb37549f12ce727800a1c8aa182c0b1dd42a) mistakenly overwrote bpf-*-* extra_headers in config.gcc, causing bpf-helpers.h to not be installed. The redefinition with coreout.h is unneeded, so delete it. gcc/ChangeLog: * config.gcc (bpf-*-*): Do not overwrite e

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 28, 2021 at 01:25:13PM -0400, Patrick Palka via Gcc-patches wrote: > On Tue, 28 Sep 2021, Jakub Jelinek wrote: > > > On Tue, Sep 28, 2021 at 06:49:38PM +0200, Jakub Jelinek via Gcc-patches > > wrote: > > > On Tue, Sep 28, 2021 at 12:44:58PM -0400, Patrick Palka wrote: > > > > Ah yeah,

[PATCH] debug/102507: ICE in btf_finalize when compiling with -gbtf

2021-09-28 Thread Indu Bhagat via Gcc-patches
Fix the free'up of btf_var_ids hash_map in btf_finalize (). Testing notes: - Bootstrapped GCC with -gbtf as an experiment. - Usual bootstrap and regression testing on x86_64. - BPF backend testing - make all-gcc, reg tested bpf.exp, btf.exp and ctf.exp. (tested using David Faust's config.gcc pa

[PATCH] ctf: Do not warn for CTF not supported for GNU GIMPLE

2021-09-28 Thread Indu Bhagat via Gcc-patches
CTF is supported for C only. Currently, a warning is emitted if the -gctf command line option is specified for a non-C frontend. This warning is also used by the GCC testsuite framework - it skips adding -gctf to the list of debug flags for automated testing, if CTF is not supported for the front

[pushed] libgcc, X86, Darwin: Export cpu_model and indicator.

2021-09-28 Thread Iain Sandoe via Gcc-patches
Hi, These two symbols have been emitted since 4.8, but were not added to the Darwin exports, so we have been using the ones from libgcc.a. Added to libgcc_s now. tested on i686 and x86_64-darwin, pushed to master, thanks Iain Signed-off-by: Iain Sandoe libgcc/ChangeLog: * config/i386

Re: [Patch] Fortran: Fix assumed-size to assumed-rank passing [PR94070]

2021-09-28 Thread Harald Anlauf via Gcc-patches
Hi Tobias, let me first reach for my brown bag... > Otherwise, the quote from F2018 of my previous email applies: > > F2018:16.9.109 LBOUND has for "case(i)", i.e. with a 'dim' > argument the following. The case without 'dim' just iterates > through case (i) for each dim. Thus: > > "If DIM is pre

[PATCH] c++: ttp matching with constrained auto parm [PR99909]

2021-09-28 Thread Patrick Palka via Gcc-patches
Here, when unifying TT with S, processing_template_decl is unset, and this foils the dependence checks in do_auto_deduction for avoiding checking constraints on an auto when the initializer is dependent. This patch fixes this issue by making sure processing_template_decl is set during the call to

[pushed] Darwin, PPC : Fix R13 for PPC64.

2021-09-28 Thread Iain Sandoe via Gcc-patches
Hi, We have a somewhat unusual situation in that for PPC64, R13 is both reserved for future use by the ABI document and callee-saved. In fact, it is already used internally by the pthreads implementation to contain pthread_self. So add R13 to the fixed regs, but also keep it in the callee- saved

Re: [PATCH] rs6000: Remove builtin mask check from builtin_decl [PR102347]

2021-09-28 Thread Bill Schmidt via Gcc-patches
Hi Kewen, Although I agree that what we do now is tragically bad (and will be fixed in the builtin rewrite), this seems a little too cavalier to remove all checking during initialization without adding any checking somewhere else. :-)  We still need to check for invalid usage when the builtin i

[committed] libstdc++: Specialize std::pointer_traits<__normal_iterator>

2021-09-28 Thread Jonathan Wakely via Gcc-patches
This allows std::__to_address to be used with __normal_iterator in C++11/14/17 modes. Without the partial specialization the deduced pointer_traits::element_type is incorrect, and so the return type of __to_address is wrong. A similar partial specialization is probably needed for __gnu_debug::_Saf

[committed] libstdc++: Fix _OutputIteratorConcept checks in algorithms

2021-09-28 Thread Jonathan Wakely via Gcc-patches
The _OutputIteratorConcept should be checked using the correct value category. The std::move_backward and std::copy_backward algorithms should use _OutputIteratorConcept instead of _ConvertibleConcept. In order to use the correct value category, the concept should use a function that returns _Valu

[committed] libstdc++: Fix tests that use invalid types in ordered containers

2021-09-28 Thread Jonathan Wakely via Gcc-patches
Types used in ordered containers need to be comparable, or the container needs to use a custom comparison function. These tests fail when _GLIBCXX_CONCEPT_CHECKS is defined, because the element types aren't comparable. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/2

[committed] libstdc++: Improve types used as iterators in testsuite

2021-09-28 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/25_algorithms/copy/34595.cc: Add missing operation for type used as an iterator. * testsuite/25_algorithms/unique_copy/check_type.cc: Likewise. Tested x86_64-linux. Committed to trunk. commit 5f1db7627f6

[committed] libstdc++: Fix concept checks for iterators

2021-09-28 Thread Jonathan Wakely via Gcc-patches
This adds some additional checks the the C++98-style concept checks for iterators, and removes some bogus checks for mutable iterators. Instead of requiring that the result of dereferencing a mutable iterator is assignable (which is a property of the value type, not required for the iterator) check

[committed] libstdc++: Skip tests that fail with _GLIBCXX_CONCEPT_CHECKS

2021-09-28 Thread Jonathan Wakely via Gcc-patches
The extension that allows implicitly rebinding a container's allocator is not allowed when _GLIBCXX_CONCEPT_CHECKS is defined, so skip the tests for that extension. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * testsuite/23_containers/deque/requirements/explicit_instantiatio

[committed] libstdc++: Skip container adaptor tests that fail concept checks

2021-09-28 Thread Jonathan Wakely via Gcc-patches
As an extension, our container adaptors SFINAE away the default constructor if the adapted sequence container is not default constructible. When _GLIBCXX_CONCEPT_CHECKS is defined we enforce that the sequence is default constructible, so the tests for the extension fail. This disables the relevant

[pushed] Darwin, D : Add .d suffix to the list for invoking dsymutil.

2021-09-28 Thread Iain Sandoe via Gcc-patches
Hi, Recognise .d for D source files on the command line. This will trigger an invocation of dsymutil when a D source is present. tested along with D patches on i686, powerpc and x86_64 darwin, pushed to master, thanks, Iain gcc/ChangeLog: * config/darwin.h (DSYMUTIL_SPEC): Recognize D

[committed] libstdc++: Define macro before it is first checked

2021-09-28 Thread Jonathan Wakely via Gcc-patches
On Thu, 2 Sept 2021 at 22:25, Jonathan Wakely wrote: > > On Thu, 2 Sept 2021 at 19:00, Jonathan Wakely wrote: > > > > * include/bits/atomic_wait.h (_GLIBCXX_HAVE_PLATFORM_WAIT): > > Define before first attempt to check it. > > > > Tested x86_64-linux and powerpc64-linux, not committ

Re: [PATCH] c++: Fix up synthetization of defaulted comparison operators on classes with bitfields [PR102490]

2021-09-28 Thread Jason Merrill via Gcc-patches
On 9/28/21 09:53, Patrick Palka wrote: On Tue, 28 Sep 2021, Patrick Palka wrote: On Tue, 28 Sep 2021, Jakub Jelinek via Gcc-patches wrote: Hi! The testcases in the patch are either miscompiled or ICE with checking, because the defaulted operator== is synthetized too early (but only if conste

[PATCH] libstdc++: Fix return values for atomic wait on futex

2021-09-28 Thread Jonathan Wakely via Gcc-patches
This fixes a logic error in the futex-based timed wait. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__platform_wait_until_impl): Return false for ETIMEDOUT and true otherwise. Tested x86_64-linux. I'm not seeing any tests fail as

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

2021-09-28 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/regex.h (basic_regex, swap): Add noexcept to non-throwing functions. * include/bits/regex_automaton.h (_State_base, _State) (_NFA_base): Likewise. * include/bits/regex_compiler.h (_Compi

[committed] libstdc++: Tweaks to to avoid warnings

2021-09-28 Thread Jonathan Wakely via Gcc-patches
Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/regex_compiler.tcc: Add line break in empty while statement. * include/bits/regex_executor.tcc: Avoid unused parameter warning. Tested x86_64-linux. Committed to trunk. commit b5f276b8c76d892f

[committed] libstdc++: Remove obfuscating typedefs in

2021-09-28 Thread Jonathan Wakely via Gcc-patches
There is no benefit to using _SizeT instead of size_t, and IterT tells you less about the type than const _CharT*. This removes some unhelpful typedefs. Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * include/bits/regex_automaton.h (_NFA_base::_SizeT): Remove. * include

Re: [PATCH] c++: ttp matching with constrained auto parm [PR99909]

2021-09-28 Thread Jason Merrill via Gcc-patches
On 9/28/21 15:15, Patrick Palka wrote: Here, when unifying TT with S, processing_template_decl is unset, and this foils the dependence checks in do_auto_deduction for avoiding checking constraints on an auto when the initializer is dependent. This patch fixes this issue by making sure processing

Re: [PATCH v2] libgcc: Add a backchain fallback to _Unwind_Backtrace() on PowerPC

2021-09-28 Thread Segher Boessenkool
Hi! On Thu, Aug 26, 2021 at 11:53:24AM -0300, Raphael Moreira Zinsly wrote: > Without dwarf2 unwind tables available _Unwind_Backtrace() is not > able to return the full backtrace. > This patch adds a fallback function on powerpc to get the backtrace > by doing a backchain, this code was originall

  1   2   >