[PATCH] tree-optimization/99776 - relax condition on vector ctor element extract

2021-04-27 Thread Richard Biener
This relaxes the condition for the match.pd pattern doing vector ctor element extracts to not require type identity but only size equality. Since we vectorize pointer data as unsigned integer data such mismatches have to be tolerated to optimize scalar code uses of vector results. Bootstrapped and

Re: [PATCH] [RISCV] Add Pattern for builtin overflow

2021-04-27 Thread Andrew Waterman
On Tue, Apr 27, 2021 at 12:18 AM Levy Hsu wrote: > > From: LevyHsu > > Added implementation for builtin overflow detection, new patterns are listed > below. > > --- > Addition: > > signed addition (SImode with RV32 || DImode with RV64):

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-04-27 Thread Richard Biener via Gcc-patches
On Tue, Apr 27, 2021 at 2:46 AM Martin Sebor via Gcc-patches wrote: > > PR 90904 notes that auto_vec is unsafe to copy and assign because > the class manages its own memory but doesn't define (or delete) > either special function. Since I first ran into the problem, > auto_vec has grown a move ct

Re: [pushed] Darwin, X86 : Fix bootstrap break from flags changes.

2021-04-27 Thread Rainer Orth
Hi Iain, > @Martin > I am not sure from the commit messages for this series whether my change > below is complete (it is enough to make bootstrap succeed so I have > applied it anyway). > > you mention TARGET_* but that is too general - however i386/darwin.h does > have some other ISA-specific TAR

Re: [pushed] Darwin, X86 : Fix bootstrap break from flags changes.

2021-04-27 Thread Iain Sandoe
Rainer Orth wrote: Hi Iain, @Martin I am not sure from the commit messages for this series whether my change below is complete (it is enough to make bootstrap succeed so I have applied it anyway). you mention TARGET_* but that is too general - however i386/darwin.h does have some other ISA-s

Re: [pushed] Darwin, X86 : Fix bootstrap break from flags changes.

2021-04-27 Thread Rainer Orth
Hi Iain, >> cc1: sorry, unimplemented: 64-bit mode not compiled in >> >> I haven't tried investigating what's going on here. > > PR100269, I can’t exactly see the fix either. ah, thanks: I'd searched for the error message above in bugzilla, but somehow this PR isn't found. Rainer -- --

Re: [PATCH] tree-optimization: Optimize division followed by multiply [PR95176]

2021-04-27 Thread Richard Biener via Gcc-patches
On Thu, Apr 1, 2021 at 1:03 AM Victor Tong via Gcc-patches wrote: > > Hello, > > This patch fixes PR tree-optimization/95176. A new pattern in match.pd was > added to transform "a * (b / a)" --> "b - (b % a)". A new test case was also > added to cover this scenario. > > The new pattern interfere

[PATCH] tree-optimization/100278 - handle mismatched code in TBAA adjust of PRE

2021-04-27 Thread Richard Biener
PRE has code to adjust TBAA behavior for refs that expects the base operation code to match. The testcase shows a case where we have a VAR_DECL vs. a MEM_REF so add code to give up in such cases. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed to trunk sofar. 2021-04-27 Richard Bien

[PATCH] testsuite/100272 - fix some malformed dg directives

2021-04-27 Thread Richard Biener
The bug points out several malformed dg directives, the following fixes the obvious ones where the testcases keep working after the change. Tested on x86_64-unknown-linux-gnu, pushed. 2021-04-27 Richard Biener PR testsuite/100272 * g++.dg/diagnostic/ptrtomem1.C: Fix dg directi

[PATCH] testsuite/100272 - undo PRE disabling for gcc.dg/tree-ssa/predcom-1.c

2021-04-27 Thread Richard Biener
This re-enables PRE and fixes the malformed dg directive pointed out in the PR. It all works as desired and I forgot why I disabled this in the past. Tested on x86_64-unknown-linux-gnu, pushed. 2021-04-27 Richard Biener PR testsuite/100272 * gcc.dg/tree-ssa/predcom-1.c: Re-en

[PATCH][www] Document BB vectorizer improvements

2021-04-27 Thread Richard Biener
Pushed. --- htdocs/gcc-11/changes.html | 9 + 1 file changed, 9 insertions(+) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 5090ec43..a74e188e 100644 --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -167,6 +167,15 @@ You may also want to

[PATCH] i386: Optimize vpblendvb on inverted mask register to vpblendvb on swapping the order of operand 1 and operand 2. [PR target/99908]

2021-04-27 Thread Hongtao Liu via Gcc-patches
Hi: As described in the subject line, this patch is about to do the below transformation. - vpcmpeqd%ymm3, %ymm3, %ymm3 - vpandn %ymm3, %ymm2, %ymm2 - vpblendvb %ymm2, %ymm1, %ymm0, %ymm0 + vpblendvb %ymm2, %ymm0, %ymm1, %ymm0 Bootstrapped and regt

Re: [DWARF] Fix signedness issue in DWARF functions (2)

2021-04-27 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 27, 2021 at 12:18:44AM +0200, Eric Botcazou wrote: > > At least sizetype is for GIMPLE compatible with size_t or unsigned long (or > > whatever unsigned type has the same precision), so this looks wrong to me. > > It's for bitsizetype here, as it's a conversion from bits into bytes, so

Re: [wwwdocs, patch] gcc-12/changes.html: OpenMP (depobj/mutexinoutset for depend), OpenACC (-Wopenacc-parallelism)

2021-04-27 Thread Tobias Burnus
Hi Gerald, hi all, On 26.04.21 21:04, Gerald Pfeifer wrote: On Mon, 26 Apr 2021, Tobias Burnus wrote: I think for OpenMP, the sentence will be modified several times before the release :-) Can I take this as a promise? :-) Given that Stage1 has just begun and several patches are either waiti

mention x86-64-vX micro-architecture levels in the release notes

2021-04-27 Thread Matthias Klose
Just saw, these are not mentioned on the release notes. Ok to document these? Matthias --- a/htdocs/gcc-11/changes.html +++ b/htdocs/gcc-11/changes.html @@ -690,6 +690,10 @@ You may also want to check out our GCC now supports AMD CPUs based on the znver3 core via -march=znver3. + GCC

[Patch] offload-defaulted: Config option to silently ignore uninstalled offload compilers

2021-04-27 Thread Tobias Burnus
This is based on Jakub's patch* which is used with many distributions – and is has to be maintained by all of them; otherwise issues like lp #1878760 might creep in, as discussed in #gcc yesterday. - As I am a huge fan of reducing code duplication and local patches, I propose to add it to GCC p

[wwwdocs] Move some misplaced entries in gcc11 changes.html

2021-04-27 Thread Jan Hubicka
Hi, I have noticed that some entries was incorrectly added to C familly while they are general improvements and I also think the option renaming should go to canevats since renaming is hardly an improvement per se. Since the change is rather obvious I plan to commit it after lunch so we do not mis

[committed] wwwdocs: Convert ftp.mpi-sb.mpg.de mirror to https

2021-04-27 Thread Gerald Pfeifer
Tobias pointed out that many of our mirrors are listed with the FTP protocol (or FTP host name) when browers like Chrome or Firefox are currently removing support for FTP. This is the first of several changes I'll be making to adjust our mirror list. Everyone is welcome to make such changes (w/

[committed] wwwdocs: Remove gd.tuwien.ac.at mirror

2021-04-27 Thread Gerald Pfeifer
Spotted working on our mirror list; pushed. Gerald This was already disabled (commented out), and apparently has been completely deprovisioned since then. --- htdocs/mirrors.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/mirrors.html b/htdocs/mirrors.html index 75ab56e0..f2f4

Re: [wwwdocs, patch] gcc-12/changes.html: OpenMP (depobj/mutexinoutset for depend), OpenACC (-Wopenacc-parallelism)

2021-04-27 Thread Gerald Pfeifer
On Tue, 27 Apr 2021, Tobias Burnus wrote: > Thanks for the suggestions. You're always welcome! > PS: When looking at https://gcc.gnu.org/mirrors.html, I wondered whether > 3 of 5 http mirrors links could move to https and given the trend that > FTP is phased out (on the server side and in the web

Re: [PATCH] tree-optimization/100051 - disambiguate access size vs decl

2021-04-27 Thread Richard Biener via Gcc-patches
On Tue, Apr 13, 2021 at 3:50 PM Richard Biener wrote: > > This adds disambiguation of the access size vs. the decl size > in the pointer based vs. decl based disambiguator. We have > a TBAA based check like this already but that's fend off when > seeing alias-sets of zero or when -fno-strict-alia

Re: RFC: Changing AC_PROG_CC to AC_PROG_CC_C99 in top level configure

2021-04-27 Thread Nick Clifton via Gcc-patches
Hi Joseph, This isn't an objection, since upgrading auto* for the toolchain can be complicated, but note that AC_PROG_CC_C99 is obsolete in Autoconf 2.70 Ah - in which case changing to an about-to-be-obsolete macro is probably a bad idea. and instead AC_PROG_CC enables C11 mode if support

Re: mention x86-64-vX micro-architecture levels in the release notes

2021-04-27 Thread Florian Weimer via Gcc-patches
* Matthias Klose: > Just saw, these are not mentioned on the release notes. Ok to document these? > > Matthias > > --- a/htdocs/gcc-11/changes.html > +++ b/htdocs/gcc-11/changes.html > @@ -690,6 +690,10 @@ You may also want to check out our >GCC now supports AMD CPUs based on the znver3 core >

[committed] aarch64: Add +nosve to two tests

2021-04-27 Thread Richard Sandiford via Gcc-patches
Adding +nosve is more robust than checking for command-line arguments, since SVE can be enabled by default or indirectly via other options. Tested on aarch64-linux-gnu & pushed. Richard gcc/testsuite/ * gcc.target/aarch64/simd/ssra.c: Use +nosve * gcc.target/aarch64/simd/usra.c:

[committed] aarch64: Handle SVE attributes in comp_type_attributes [PR100270]

2021-04-27 Thread Richard Sandiford via Gcc-patches
Even though "SVE type" and "SVE sizeless type" are marked as affecting type identity, the middle end doesn't truly believe it unless we also handle them in comp_type_attributes. Tested on aarch64-linux-gnu. Pushed to trunk so far, but I'll backport to GCC 11 too. The GCC 10 version will look dif

[committed] arm: fix UB when compiling thumb2 with PIC [PR100236]

2021-04-27 Thread Richard Earnshaw via Gcc-patches
arm_compute_save_core_reg_mask contains UB in that the saved PIC register number is used to create a bit mask. However, for some target options this register is undefined and we end up with a shift of ~0. On native compilations this is benign since the shift will still be large enough to move the

[PATCH] gcc/genflags.c: Improve error message

2021-04-27 Thread Christophe Lyon via Gcc-patches
When an iterator cannot be expanded, it is helpful to see the expanded name which is causing problems. It would be better to also print the current iterator value (which couldn't match), but I couldn't find how. 2021-03-01 Christophe Lyon gcc/ * genflags.c (gen_insn): Print fa

[PATCH] testsuite/arm: Improve mve-vshr.c

2021-04-27 Thread Christophe Lyon via Gcc-patches
Vector right shifts by immediate use vshr, while right shifts by vectors instead use vneg and vshl. This patch adds the corresponding scan-assembler-times that were missing. 2021-04-22 Christophe Lyon gcc/testsuite/ * gcc.target/arm/simd/mve-vshr.c: Add more scan-assembler-tim

[PATCH] testsuite/arm: Factorize and increase coverage in mve-sub_1.c

2021-04-27 Thread Christophe Lyon via Gcc-patches
Use a template macro to factorize the existing test functions. This patch also adds a version to check subtraction with __fp16 type. 2021-04-26 Christophe Lyon gcc/testsuite/ * gcc.target/arm/simd/mve-vsub_1.c: Factorize and add __fp16 test. --- gcc/testsuite/gcc.target/arm/s

[PATCH] testsuite/arm: Add mve-vadd-1.c test

2021-04-27 Thread Christophe Lyon via Gcc-patches
Support for vadd has been present for a while, but it was lacking a test. 2021-04-22 Christophe Lyon gcc/testsuite/ * gcc.target/arm/simd/mve-vadd-1.c: New. --- gcc/testsuite/gcc.target/arm/simd/mve-vadd-1.c | 43 ++ 1 file changed, 43 insertions(+) cr

Re: [PATCH] testsuite/arm: Add mve-vadd-1.c test

2021-04-27 Thread Prathamesh Kulkarni via Gcc-patches
On Tue, 27 Apr 2021 at 17:02, Christophe Lyon via Gcc-patches wrote: > > Support for vadd has been present for a while, but it was lacking a > test. > > 2021-04-22 Christophe Lyon > > gcc/testsuite/ > * gcc.target/arm/simd/mve-vadd-1.c: New. > --- > gcc/testsuite/gcc.target/arm

Re: [PATCH] testsuite/arm: Add mve-vadd-1.c test

2021-04-27 Thread Christophe Lyon via Gcc-patches
On Tue, 27 Apr 2021 at 14:04, Prathamesh Kulkarni wrote: > > On Tue, 27 Apr 2021 at 17:02, Christophe Lyon via Gcc-patches > wrote: > > > > Support for vadd has been present for a while, but it was lacking a > > test. > > > > 2021-04-22 Christophe Lyon > > > > gcc/testsuite/ > >

[PATCH 1/2] tree-optimization/99912 - schedule DSE before SRA

2021-04-27 Thread Richard Biener
For the testcase in the PR the main SRA pass is unable to do some important scalarizations because dead stores of addresses make the candiate variables disqualified. The following patch adds another DSE pass before SRA forming a DCE/DSE pair and moves the DSE pass that is currently closely after S

[PATCH 2/2] tree-optimization/99912 - schedule another TODO_remove_unused_locals

2021-04-27 Thread Richard Biener
This makes sure to remove unused locals and prune CLOBBERs after the first scalar cleanup phase after IPA optimizations. On the testcase in the PR this results in 8000 CLOBBERs removed which in turn unleashes more DSE which otherwise hits its walking limit of 256 too early on this testcase. Boots

[PATCH] cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

2021-04-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase fails with -fcompare-debug. The problem is that outgoing_edges_match behaves differently between -g0 and -g, if some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the REG_EH_REGION check is not done, while when there are no DEBUG_INSNs, it is done. We alrea

Re: [PATCH] cfgcleanup: Fix -fcompare-debug issue in outgoing_edges_match [PR100254]

2021-04-27 Thread Richard Biener
On Tue, 27 Apr 2021, Jakub Jelinek wrote: > Hi! > > The following testcase fails with -fcompare-debug. The problem is that > outgoing_edges_match behaves differently between -g0 and -g, if > some load/store with REG_EH_REGION is followed by DEBUG_INSNs, the > REG_EH_REGION check is not done, whi

[PATCH 1/2] ipa-sra: Introduce a mini-DCE to tree-inline.c (PR 93385)

2021-04-27 Thread Martin Jambor
Hi, PR 93385 reveals that if the user explicitely disables DCE, IPA-SRA can leave behind statements which are useless because their results are eventually not used but can have problematic side effects, especially since their inputs are now bogus that useless parameters were removed. This patch f

[PATCH 2/2] ipa-sra: Improve debug info for removed parameters (PR 93385)

2021-04-27 Thread Martin Jambor
Hi, Whereas the previous patch fixed issues with code left behind after IPA-SRA removed a parameter but only reset all affected debug bind statements, this one updates them with expressions which can allow the debugger to print the removed value - see the added test-case. Even though I originally

[PATCH] ipa-sra: Do not bail out when callers cannot be cloned

2021-04-27 Thread Martin Jambor
Hi, IPA-SRA fails to produce (very simple) edge summaries when a caller cannot be cloned or its signature cannot be changed which makes it less powerful for no good reason. This patch fixes that problem. Bootstrapped, LTO-bootstrapped and tested on x86_64-linux. OK for trunk? A common reason w

[PATCH] veclower: Fix up vec_shl matching of VEC_PERM_EXPR [PR100239]

2021-04-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following testcase ICEs at -O0, because lower_vec_perm sees the _1 = { 0, 0, 0, 0, 0, 0, 0, 0 }; _2 = VEC_COND_EXPR <_1, { -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0 }>; _3 = { 6, 0, 0, 0, 0, 0, 0, 0 }; _4 = VEC_PERM_EXPR <{ 0, 0, 0, 0, 0, 0, 0, 0 }, _2, _3>; and a

Re: [PATCH v3 1/2] op_by_pieces_d::run: Change a while loop to a do-while loop

2021-04-27 Thread Richard Biener via Gcc-patches
On Tue, Apr 27, 2021 at 3:14 AM H.J. Lu wrote: > > Change a while loop in op_by_pieces_d::run to a do-while loop to prepare > for offset adjusted operation for the remaining bytes on the last piece > operation of a memory region. OK. Thanks, Richard. > PR middl-end/90773 > * exp

[committed] libstdc++: Define net::socket_base::message_flags operators as friends [PR 100285]

2021-04-27 Thread Jonathan Wakely via Gcc-patches
The overloaded operators for socket_base::message_flags should only be defined when the message_flags type itself is defined. Rather than duplicate the preprocessor conditional, this moves the operators into the same scope as the type, defining them as hidden friends. As well as fixing the bug, th

[committed] libstdc++: Better preprocessor conditions in net::ip [PR 100286]

2021-04-27 Thread Jonathan Wakely via Gcc-patches
This improves the use of preprocessor conditionas to enable/disable members of namespace net::ip according to what is supported by the target. This fixes PR 100286 by ensuring that the to_string member functions are always defined for the address_v4 and address_v6 classes. On the other hand, the IP

[committed] libstdc++: Minor refactoring in

2021-04-27 Thread Jonathan Wakely via Gcc-patches
libstdc++-v3/ChangeLog: * include/experimental/internet (address_v6::bytes_type): Adjust formatting. (basic_endpoint): Define _M_is_v6() to put all checks for AF_INET6 in one place. (basic_endpoint::resize): Simplify. (operator==(const tcp&, const tc

Re: [PATCH] arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]

2021-04-27 Thread Alex Coplan via Gcc-patches
Ping On 15/04/2021 15:39, Alex Coplan via Gcc-patches wrote: > Hi all, > > The PR shows two ICEs with __sync_bool_compare_and_swap and > -mcpu=cortex-m23 (equivalently, -march=armv8-m.base): one in LRA and one > later on, after the CAS insn is split. > > The LRA ICE occurs because the > @atomic_

[PATCH] aarch64: Fix UB in the compiler [PR100200]

2021-04-27 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch fixes UBs in the compiler when negativing a CONST_INT containing HOST_WIDE_INT_MIN. I've changed the spots where there wasn't an obvious earlier condition check or predicate that would fail for such CONST_INTs. Bootstrapped/regtested on aarch64-linux, ok for trunk? 2021-

[Patch] OpenMP: Add iterator support to Fortran's depend; add affinity clause

2021-04-27 Thread Tobias Burnus
OpenMP 5's iterator can be used for - depend clause - affinity clause - mapping (unsupported and not touched) (a) This patch add the iterator support to the Fortran FE and adds support for it to the depend clause. (b) It also adds a conforming stub implementation (parse & ignore in ME) for 'af

Re: [PATCH] veclower: Fix up vec_shl matching of VEC_PERM_EXPR [PR100239]

2021-04-27 Thread Richard Biener
On Tue, 27 Apr 2021, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs at -O0, because lower_vec_perm sees the > _1 = { 0, 0, 0, 0, 0, 0, 0, 0 }; > _2 = VEC_COND_EXPR <_1, { -1, -1, -1, -1, -1, -1, -1, -1 }, { 0, 0, 0, 0, > 0, 0, 0, 0 }>; > _3 = { 6, 0, 0, 0, 0, 0, 0, 0 }; > _4

Re: [PATCH] aarch64: Fix UB in the compiler [PR100200]

2021-04-27 Thread Richard Sandiford via Gcc-patches
Jakub Jelinek writes: > Hi! > > The following patch fixes UBs in the compiler when negativing > a CONST_INT containing HOST_WIDE_INT_MIN. I've changed the spots where > there wasn't an obvious earlier condition check or predicate that > would fail for such CONST_INTs. > > Bootstrapped/regtested o

RE: [PATCH] arm: Fix ICEs with compare-and-swap and -march=armv8-m.base [PR99977]

2021-04-27 Thread Kyrylo Tkachov via Gcc-patches
Hi Alex, > -Original Message- > From: Alex Coplan > Sent: 27 April 2021 14:14 > To: gcc-patches@gcc.gnu.org > Cc: ni...@redhat.com; Richard Earnshaw ; > Ramana Radhakrishnan ; Kyrylo > Tkachov > Subject: Re: [PATCH] arm: Fix ICEs with compare-and-swap and - > march=armv8-m.base [PR99977]

[PATCH] tree-optimization/99912 - delete trivially dead stmts during DSE

2021-04-27 Thread Richard Biener
DSE performs a backwards walk over stmts removing stores but it leaves removing resulting dead SSA defs to later passes. This eats into its own alias walking budget if the removed stores kept loads live. The following patch adds removal of trivially dead SSA defs which helps in this situation and

Re: [PATCH] gcc/genflags.c: Improve error message

2021-04-27 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > When an iterator cannot be expanded, it is helpful to see the expanded > name which is causing problems. It would be better to also print the > current iterator value (which couldn't match), but I couldn't find > how. > > 2021-03-01 Christophe Lyon > >

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-04-27 Thread Martin Sebor via Gcc-patches
On 4/27/21 1:58 AM, Richard Biener wrote: On Tue, Apr 27, 2021 at 2:46 AM Martin Sebor via Gcc-patches wrote: PR 90904 notes that auto_vec is unsafe to copy and assign because the class manages its own memory but doesn't define (or delete) either special function. Since I first ran into the p

Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904)

2021-04-27 Thread Richard Biener via Gcc-patches
On Tue, Apr 27, 2021 at 3:59 PM Martin Sebor wrote: > > On 4/27/21 1:58 AM, Richard Biener wrote: > > On Tue, Apr 27, 2021 at 2:46 AM Martin Sebor via Gcc-patches > > wrote: > >> > >> PR 90904 notes that auto_vec is unsafe to copy and assign because > >> the class manages its own memory but doesn

Re: [PATCH] aarch64: Fix UB in the compiler [PR100200]

2021-04-27 Thread Richard Earnshaw via Gcc-patches
On 27/04/2021 14:16, Jakub Jelinek via Gcc-patches wrote: Hi! The following patch fixes UBs in the compiler when negativing a CONST_INT containing HOST_WIDE_INT_MIN. I've changed the spots where there wasn't an obvious earlier condition check or predicate that would fail for such CONST_INTs.

Re: [PATCH] aarch64: Fix UB in the compiler [PR100200]

2021-04-27 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 27, 2021 at 03:20:47PM +0100, Richard Earnshaw via Gcc-patches wrote: > > --- gcc/config/aarch64/aarch64.c.jj 2021-04-16 20:49:23.602579852 +0200 > > +++ gcc/config/aarch64/aarch64.c2021-04-26 16:40:46.835269671 +0200 > > @@ -10778,7 +10778,7 @@ aarch64_print_operand (FILE *f, rtx

[PATCH] libstdc++: Fix up lambda in join_view::_Iterator::operator++ [PR100290]

2021-04-27 Thread Patrick Palka via Gcc-patches
Currently, the return type of this lambda is decltype(auto), so it ends up returning a copy of _M_parent->_M_inner rather than a reference to it when _S_ref_glvalue is false. Hence _M_inner and ranges::end(__inner_range) are respectively an iterator and sentinel for different ranges, so comparing

Re: [PATCH] gcc/genflags.c: Improve error message

2021-04-27 Thread Jeff Law via Gcc-patches
On 4/27/2021 5:32 AM, Christophe Lyon via Gcc-patches wrote: When an iterator cannot be expanded, it is helpful to see the expanded name which is causing problems. It would be better to also print the current iterator value (which couldn't match), but I couldn't find how. 2021-03-01 Christop

Re: [patch for gcc12 stage1][version 2] add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-04-27 Thread Qing Zhao via Gcc-patches
> On Apr 27, 2021, at 1:30 AM, Richard Biener wrote: > >> >> equivalent in all respects. And if we were trying to make them >> equivalent, we'd need to do much more than this. >> >> The same applies to the pattern case. If “x” is initialised to a pattern >> that happens to point to a real

[PATCH] Fix handling of VEC_COND_EXPR trap tests [PR100284]

2021-04-27 Thread Richard Sandiford via Gcc-patches
Now that VEC_COND_EXPR has normal unnested operands, operation_could_trap_p can treat it like any other expression. This fixes many testsuite ICEs for SVE, but it turns out that none of the tests in gcc.target/aarch64/sve were affected. Anyone testing on non-SVE aarch64 therefore wouldn't have se

Re: [PATCH] Fix handling of VEC_COND_EXPR trap tests [PR100284]

2021-04-27 Thread Richard Biener
On April 27, 2021 5:12:35 PM GMT+02:00, Richard Sandiford wrote: >Now that VEC_COND_EXPR has normal unnested operands, >operation_could_trap_p can treat it like any other expression. > >This fixes many testsuite ICEs for SVE, but it turns out that none >of the tests in gcc.target/aarch64/sve were

Re: [PATCH 10/10] RISC-V: Provide programmatic implementation of CAS [PR 100266]

2021-04-27 Thread Jim Wilson
On Mon, Apr 26, 2021 at 5:46 AM Christoph Muellner wrote: > The existing CAS implementation uses an INSN definition, which provides > the core LR/SC sequence. Additionally to that, there is a follow-up code, > that evaluates the results and calculates the return values. > This has two drawbacks:

Re: [PATCH] Fix handling of VEC_COND_EXPR trap tests [PR100284]

2021-04-27 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On April 27, 2021 5:12:35 PM GMT+02:00, Richard Sandiford > wrote: >>Now that VEC_COND_EXPR has normal unnested operands, >>operation_could_trap_p can treat it like any other expression. >> >>This fixes many testsuite ICEs for SVE, but it turns out that none >>of the tes

Re: [PATCH] c++: constexpr pointer indirection with negative offset [PR100209]

2021-04-27 Thread Jason Merrill via Gcc-patches
On 4/26/21 3:05 PM, Patrick Palka wrote: On Mon, 26 Apr 2021, Jason Merrill wrote: On 4/26/21 12:17 PM, Patrick Palka wrote: During constexpr evaluation, a base-to-derived conversion may yield an expression like (Derived*)(&D.2217.D.2106 p+ -4) where D.2217 is the derived object and D.2106 is

Re: [PATCH] c++: Fix Bases(args...)... base initializer [PR88580]

2021-04-27 Thread Jason Merrill via Gcc-patches
On 4/26/21 12:17 PM, Patrick Palka wrote: When substituting into the arguments of a base initializer pack expansion, tsubst_initializer_list uses a dummy EXPR_PACK_EXPANSION in order to expand an initializer such as Bases(args)... into Bases#{0}(args#{0}) and so on. But when an argument inside t

fix asm-not pattern in dwarf2/inline5.c

2021-04-27 Thread Alexandre Oliva
The test is supposed to check that the abstract lexical block of a function that was inlined doesn't have attributes, and that the concrete inlined lexical block does. There are two patterns to verify the absence of attributes in the abstract lexical block, one for the case in which the concrete

[PATCH 02/57] Support scanning of build-time GC roots in gengtype

2021-04-27 Thread Bill Schmidt via Gcc-patches
Currently gengtype supports scanning target-specific files for GC roots, but those files must exist in the source tree. This patch extends the support to include header files generated into the build directory. It also allows targets to specify build dependencies for s-gtype to ensure the built h

[PATCH 00/57] Replace the Power target-specific built-in machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
The design of the target-specific built-in function support in the Power back end has not stood the test of time. The machinery is grossly inefficient, confusing, and arcane; and adding new built-in functions is inefficient and error-prone. This patch set introduces a replacement. Because of th

[PATCH 01/57] Allow targets to specify build dependencies for out_object_file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * Makefile.in (OUT_FILE_DEPS): New variable. (out_object_file): Depend on OUT_FILE_DEPS. --- gcc/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 8a5fb3fd99c..2fd94fc7dba 10064

add ASM_OUTPUT_MAX_SKIP_ALIGN to i386.h

2021-04-27 Thread Alexandre Oliva
Several i386 align tests expect p2align to be used, but not all configurations define ASM_OUTPUT_MAX_SKIP_ALIGN, even when HAVE_GAS_MAX_SKIP_P2ALIGN. i386.h has an equivalent ASM_OUTPUT_MAX_SKIP_PAD that is used in i386.c, so I'm adding an _ALIGN variant, as in x86-64.h, and an #undef to x86-64.

[PATCH 04/57] rs6000: Add initial input files

2021-04-27 Thread Bill Schmidt via Gcc-patches
This patch adds a tiny subset of the built-in and overload descriptions. 2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: New. * config/rs6000/rs6000-overload.def: New. --- gcc/config/rs6000/rs6000-builtin-new.def | 199 +++ gcc/config/r

[PATCH 03/57] rs6000: Initial create of rs6000-gen-builtins.c

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c: New. --- gcc/config/rs6000/rs6000-gen-builtins.c | 165 1 file changed, 165 insertions(+) create mode 100644 gcc/config/rs6000/rs6000-gen-builtins.c diff --git a/gcc/config/rs6000/rs6000-gen-

[PATCH 06/57] rs6000: Add helper functions for parsing

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (MININT): New defined constant. (exit_codes): New enum. (consume_whitespace): New function. (advance_line): Likewise. (safe_inc_pos): Likewise. (match_identifier): Likewise

[PATCH 07/57] rs6000: Add functions for matching types, part 1 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (void_status): New enum. (basetype): Likewise. (typeinfo): New struct. (handle_pointer): New function. (match_basetype): New stub function. (match_const_restriction): Likewise.

[PATCH 08/57] rs6000: Add functions for matching types, part 2 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 64 + 1 file changed, 64 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000

[PATCH 09/57] rs6000: Add functions for matching types, part 3 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (restriction): New enum. (typeinfo): Add restr field. (match_const_restriction): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 136 1 file changed, 136 insertions(+)

[PATCH 11/57] rs6000: Main function with stubs for parsing and output

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bifs): New filescope variable. (num_ovld_stanzas): Likewise. (num_ovlds): Likewise. (exit_codes): Add more enum values. (parse_codes): New enum.

[PATCH 10/57] rs6000: Red-black tree implementation for balanced tree search

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rbtree.c: New file. * config/rs6000/rbtree.h: New file. --- gcc/config/rs6000/rbtree.c | 233 + gcc/config/rs6000/rbtree.h | 51 2 files changed, 284 insertions(+) create mode 100644 gcc

[PATCH 14/57] rs6000: Parsing built-in input file, part 3 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (parse_bif_attrs): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 102 1 file changed, 102 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6

[PATCH 12/57] rs6000: Parsing built-in input file, part 1 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (bif_stanza): New enum. (curr_bif_stanza): New filescope variable. (stanza_entry): New struct. (stanza_map): New initialized filescope variable. (enable_string): Likewise. (fnkinds

[PATCH 15/57] rs6000: Parsing of overload input file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (ovld_stanza): New struct. (MAXOVLDSTANZAS): New defined constant. (ovld_stanzas): New filescope variable. (curr_ovld_stanza): Likewise. (MAXOVLDS): New defined constant. (ovlddata

[PATCH 16/57] rs6000: Build and store function type identifiers

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (complete_vector_type): New function. (complete_base_type): Likewise. (construct_fntype_id): Likewise. (parse_bif_entry): Call construct_fntype_id. (parse_ovld_entry): Likewise. --

[PATCH 17/57] rs6000: Write output to the builtin definition include file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 17 + 1 file changed, 17 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs

[PATCH 18/57] rs6000: Write output to the builtins header file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_autogenerated_header): New function. (write_decls): Likewise. (write_extern_fntype): New callback function. (write_header_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtin

[PATCH 13/57] rs6000: Parsing built-in input file, part 2 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (parse_args): New function. (parse_prototype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 143 1 file changed, 143 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-

[PATCH 20/57] rs6000: Write output to the builtins init file, part 2 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 71 + 1 file changed, 71 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config

[PATCH 24/57] rs6000: Incorporate new builtins code into the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (extra_objs): Include rs6000-builtins.o and rs6000-c.o. * config/rs6000/t-rs6000 (OUT_FILE_DEPS): Add rs6000-builtins.h. (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins): Li

[PATCH 25/57] rs6000: Add gengtype handling to the build machinery

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-04 Bill Schmidt gcc/ * config.gcc (target_gtfiles): Add ./rs6000-builtins.h. * config/rs6000/t-rs6000 (EXTRA_GTYPE_DEPS): Set. --- gcc/config.gcc | 1 + gcc/config/rs6000/t-rs6000 | 1 + 2 files changed, 2 insertions(+) diff --git a/gcc/config.gcc b/gcc/con

[PATCH 23/57] rs6000: Write static initializations for overload tables

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-03 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_ovld_static_init): New function. (write_init_file): Call write_ovld_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 53 + 1 file changed, 53 insertions(+) diff

[PATCH 28/57] rs6000: Add available-everywhere and ancient builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add always, power5, and power6 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 72 1 file changed, 72 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gc

[PATCH 22/57] rs6000: Write static initializations for built-in table

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_bif_static_init): New function. (write_init_file): Call write_bif_static_init. --- gcc/config/rs6000/rs6000-gen-builtins.c | 104 1 file changed, 104 insertions(+) diff -

[PATCH 19/57] rs6000: Write output to the builtins init file, part 1 of 3

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-gen-builtins.c (write_fntype): New function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Implement. --- gc

[PATCH 29/57] rs6000: Add power7 and power7-64 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power7 and power7-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 39 1 file changed, 39 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/conf

[PATCH 26/57] rs6000: Add the rest of the [altivec] stanza to the builtins file

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Finish altivec stanza. * config/rs6000/rs6000-call.c (rs6000_init_builtins): Move initialization of pcvoid_type_node here... (altivec_init_builtins): ...from here. * config/rs6000/rs6000

[PATCH 27/57] rs6000: Add VSX builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add vsx stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 860 +++ 1 file changed, 860 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-

[PATCH 32/57] rs6000: Add more type nodes to support builtin processing

2021-04-27 Thread Bill Schmidt via Gcc-patches
Previously we created pointer types on the fly from their base types whenever we needed one. It's more efficient to create them up front, and the new mechanism requires that. 2021-04-02 Bill Schmidt gcc/ * config/rs6000/rs6000-call.c (rs6000_init_builtins): Initialize various

[PATCH 30/57] rs6000: Add power8-vector builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power8-vector stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 438 +++ 1 file changed, 438 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs600

[PATCH 31/57] rs6000: Add Power9 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power9-vector, power9, and power9-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 360 +++ 1 file changed, 360 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-ne

[PATCH 33/57] rs6000: Add Power10 builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-04-01 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add power10 and power10-64 stanzas. --- gcc/config/rs6000/rs6000-builtin-new.def | 427 +++ 1 file changed, 427 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/c

[PATCH 34/57] rs6000: Add MMA builtins

2021-04-27 Thread Bill Schmidt via Gcc-patches
2021-03-24 Bill Schmidt gcc/ * config/rs6000/rs6000-builtin-new.def: Add mma stanza. --- gcc/config/rs6000/rs6000-builtin-new.def | 404 +++ 1 file changed, 404 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-

  1   2   >