[PATCH] i386: Combine the FADD(A, FMA(B, C, 0)) to FMA(B, C, A) and combine FADD(A, FMUL(B, C)) to FMA(B, C, A).

2021-10-21 Thread Kong, Lingling via Gcc-patches
Hi, This patch is to support transform in fast-math something like _mm512_add_ph(x1, _mm512_fmadd_pch(a, b, _mm512_setzero_ph())) to _mm512_fmadd_pch(a, b, x1). And support transform _mm512_add_ph(x1, _mm512_fmul_pch(a, b)) to _mm512_fmadd_pch(a, b, x1). Ok for master? gcc/ChangeLog:

[PATCH] Canonicalize __atomic/sync_fetch_or/xor/and for constant mask.

2021-10-21 Thread liuhongt via Gcc-patches
Hi: This patch is try to canoicalize bit_and and nop_convert order for __atomic_fetch_or_*, __atomic_fetch_xor_*, __atomic_xor_fetch_*,__sync_fetch_and_or_*, __sync_fetch_and_xor_*,__sync_xor_and_fetch_*, __atomic_fetch_and_*,__sync_fetch_and_and_* when mask is constant. .i.e. +/* Canonicalize

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-10-21 Thread François Dumont via Gcc-patches
On 21/10/21 6:55 pm, Jonathan Wakely wrote: On Thu, 21 Oct 2021 at 17:52, François Dumont > wrote: I eventually would like to propose a different approach. I am adding a hook in normal implementation to let the _GLIBCXX_DEBUG code know when a node is

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On Fri, Oct 22, 2021, 05:34 Jeff Law wrote: > > > On 10/21/2021 4:15 AM, Aldy Hernandez wrote: > > On Wed, Oct 20, 2021 at 10:19 PM Jeff Law wrote: > >> So we want to keep some form of ssa-dom-thread-7. That' s the canonical > >> testcase for the case for the FSM optimization. > >> > >> What

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 4:15 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 10:19 PM Jeff Law wrote: So we want to keep some form of ssa-dom-thread-7. That' s the canonical testcase for the case for the FSM optimization. What we need to verify is that we thread jumps across the backedge of the

Re: Ping^3: [PATCH v2 0/2] Fix vec_sel code generation and merge xxsel to vsel

2021-10-21 Thread Xionghu Luo via Gcc-patches
Ping^3, thanks. https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579637.html On 2021/10/15 14:28, Xionghu Luo via Gcc-patches wrote: > Ping^2, thanks. > > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579637.html > > > On 2021/10/8 09:17, Xionghu Luo via Gcc-patches wrote:

[PATCH, Fortran] Add testcase for PR100906

2021-10-21 Thread Sandra Loosemore
PR100906 ("Bind(c): failure handling character with len/=1") has been fixed by Tobias's rewrite of the GFC <-> C descriptor conversions. I'd like to add José's testcase for that issue before closing it. OK? -Sandra commit 4c2fa9cf74162015710ccfd913c827779151aa52 Author: Sandra Loosemore

Re: [PATCH] hardened conditionals

2021-10-21 Thread Alexandre Oliva via Gcc-patches
On Oct 20, 2021, Alexandre Oliva wrote: > I suppose it's a latent issue exposed by the patch, I was mistaken. Though I even had bisected the -fcompare-debug problem back to a patch from back in May, that added a new sink_code pass before store_merging, it was actually a bug in my patch, it was

Fwd: [committed] libstdc++: Improve generated man pages for libstdc++

2021-10-21 Thread Jonathan Wakely via Gcc-patches
I messed up the CC to gcc-patches for this. And I forgot to mention in the commit msg that the reason I started looking at stdheader.cc in the first place was to fix a use-after-free bug in the old code: -// come on, gdb, find `p' already... -const char* p =

[PATCH v2] c++: P2360R0: Extend init-stmt to allow alias-decl [PR102617]

2021-10-21 Thread Marek Polacek via Gcc-patches
On Thu, Oct 21, 2021 at 04:56:57PM -0400, Jason Merrill wrote: > On 10/21/21 16:26, Marek Polacek wrote: > > The following patch implements C++23 P2360R0. This proposal merely > > extends init-statement to contain alias-declaration. init-statement > > is used in if/for/switch. The unsightly

Fwd: [committed] libstdc++: Add Doxygen comments to contents of

2021-10-21 Thread Jonathan Wakely via Gcc-patches
I messed up the CC to gcc-patches for this ... -- Forwarded message - From: Jonathan Wakely via Libstdc++ Date: Thu, 21 Oct 2021 at 22:57 Subject: [committed] libstdc++: Add Doxygen comments to contents of To: , Tested x86_64-linux, committed to trunk.

Fwd: [committed] libstdc++: Suppress Doxygen docs for more implementation details

2021-10-21 Thread Jonathan Wakely via Gcc-patches
I messed up the CC to gcc-patches for this ... -- Forwarded message - From: Jonathan Wakely via Libstdc++ Date: Thu, 21 Oct 2021 at 22:56 Subject: [committed] libstdc++: Suppress Doxygen docs for more implementation details To: , Tested x86_64-linux, committed to trunk.

[PATCH v2] c++tools: Fix memory leak

2021-10-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Oct 2021 at 20:38, Jason Merrill wrote: > On 10/21/21 09:28, Jonathan Wakely wrote: > > #else > > buffer = xmalloc (stat.st_size); > > if (!buffer) > > return -errno; > > + struct Deleter { void operator()(void* p) const { free(p); } }; > > + std::unique_ptr guard; >

Re: [PATCH] c++: P2360R0: Extend init-stmt to allow alias-decl [PR102617]

2021-10-21 Thread Jason Merrill via Gcc-patches
On 10/21/21 16:26, Marek Polacek wrote: The following patch implements C++23 P2360R0. This proposal merely extends init-statement to contain alias-declaration. init-statement is used in if/for/switch. The unsightly duplication of the new code seems to be necessary to handle for (

Re: [PATCH] Possible use before def in fortran/trans-decl.c.

2021-10-21 Thread Martin Sebor via Gcc-patches
On 10/21/21 1:02 PM, Andrew MacLeod via Gcc-patches wrote: As I'm tweaking installing ranger as the VRP2 pass, I am getting a stage 2 bootstrap failure now: In file included from /opt/notnfs/amacleod/master/gcc/gcc/fortran/trans-decl.c:28: /opt/notnfs/amacleod/master/gcc/gcc/tree.h: In

[PATCH] c++: P2360R0: Extend init-stmt to allow alias-decl [PR102617]

2021-10-21 Thread Marek Polacek via Gcc-patches
The following patch implements C++23 P2360R0. This proposal merely extends init-statement to contain alias-declaration. init-statement is used in if/for/switch. The unsightly duplication of the new code seems to be necessary to handle for ( init-statement condition[opt] ; expression[opt] )

Re: how does vrp2 rearrange this?

2021-10-21 Thread Andrew Pinski via Gcc-patches
On Thu, Oct 21, 2021 at 8:04 AM Andrew MacLeod wrote: > > On 10/19/21 7:13 PM, Andrew Pinski wrote: > > On Tue, Oct 19, 2021 at 3:32 PM Andrew MacLeod wrote: > >> On 10/19/21 5:13 PM, Andrew Pinski wrote: > >>> On Tue, Oct 19, 2021 at 1:29 PM Andrew MacLeod via Gcc-patches > >>> wrote: >

PING [PATCH v4 0/2] Implement indirect external access

2021-10-21 Thread H.J. Lu via Gcc-patches
On Wed, Sep 22, 2021 at 7:02 PM H.J. Lu wrote: > > Changes in the v4 patch. > > 1. Add nodirect_extern_access attribute. > > Changes in the v3 patch. > > 1. GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS support has been added to > GNU binutils 2.38. But the -z indirect-extern-access linker option

Re: [PATCH] c++tools: Fix memory leak

2021-10-21 Thread Jason Merrill via Gcc-patches
On 10/21/21 09:28, Jonathan Wakely wrote: The allocated memory is not freed when returning early due to an error. c++tools/ChangeLog: * resolver.cc (module_resolver::read_tuple_file): Use unique_ptr to ensure memory is freed before returning. --- c++tools/resolver.cc | 14

Re: [PATCH] libcody: Avoid double-free

2021-10-21 Thread Jason Merrill via Gcc-patches
On 10/21/21 09:27, Jonathan Wakely wrote: If the listen call fails then 'goto fail' will jump to that label and use freeaddrinfo again. Set the pointer to null to prevent that. OK. libcody/ChangeLog: * netserver.cc (ListenInet6): Set pointer to null after deallocation. ---

Re: [PATCH] x86: Document -fcf-protection requires i686 or newer

2021-10-21 Thread H.J. Lu via Gcc-patches
On Thu, Oct 21, 2021 at 12:04 PM Uros Bizjak wrote: > > On Thu, Oct 21, 2021 at 6:47 PM H.J. Lu wrote: > > > > PR target/98667 > > * doc/invoke.texi: Document -fcf-protection requires i686 or > > new. > > Obvious patch? I am checking it in and backporting it to release

Re: [PATCH] x86: Document -fcf-protection requires i686 or newer

2021-10-21 Thread Uros Bizjak via Gcc-patches
On Thu, Oct 21, 2021 at 6:47 PM H.J. Lu wrote: > > PR target/98667 > * doc/invoke.texi: Document -fcf-protection requires i686 or > new. Obvious patch? Uros. > --- > gcc/doc/invoke.texi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git

[PATCH] Possible use before def in fortran/trans-decl.c.

2021-10-21 Thread Andrew MacLeod via Gcc-patches
As I'm tweaking installing ranger as the VRP2 pass, I am getting a stage 2 bootstrap failure now: In file included from /opt/notnfs/amacleod/master/gcc/gcc/fortran/trans-decl.c:28: /opt/notnfs/amacleod/master/gcc/gcc/tree.h: In function ‘void gfc_conv_cfi_to_gfc(stmtblock_t*, stmtblock_t*,

Re: [PATCH] x86: Adjust gcc.target/i386/pr22076.c

2021-10-21 Thread Uros Bizjak via Gcc-patches
On Thu, Oct 21, 2021 at 6:50 PM H.J. Lu wrote: > > On Tue, Oct 19, 2021 at 11:42 PM Uros Bizjak wrote: > > > > On Tue, Oct 19, 2021 at 8:23 PM H.J. Lu wrote: > > > > > > commit 247c407c83f0015f4b92d5f71e45b63192f6757e > > > Author: Roger Sayle > > > Date: Mon Oct 18 12:15:40 2021 +0100 > > >

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 1:42 AM, Aldy Hernandez wrote: Massaging the IL should only take two forms IIRC. First, if we have a simplification we can do. That could be const/copy propagation, replacing an expression with an SSA_NAME or constant and the like. It doesn't massage the IL just to massage

Re: [PATCH] Handle jobserver file descriptors in btest.

2021-10-21 Thread Ian Lance Taylor via Gcc-patches
On Thu, Oct 21, 2021 at 12:48 AM Martin Liška wrote: > > The patch is about sensitive handling of file descriptors opened > by make's jobserver. Thanks. I think a better approach would be, at the start of main, fstat the descriptors up to 10 and record the ones for which fstat succeeds. Then

[r12-4601 Regression] FAIL: gcc.target/i386/avx512fp16-13.c scan-assembler-times vmovdqa64[ \\t]+[^{\n]*%ymm[0-9]+[^\n]*\\) 1 on Linux/x86_64

2021-10-21 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, c8a889fc0e115d40a2d02f32842655f3eadc8fa1 is the first bad commit commit c8a889fc0e115d40a2d02f32842655f3eadc8fa1 Author: Hongyu Wang Date: Wed Oct 20 13:13:39 2021 +0800 i386: Fix wrong codegen for V8HF move without TARGET_AVX512F caused FAIL:

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 1:17 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 10:01 PM Jeff Law wrote: On 10/20/2021 9:15 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 4:35 PM Martin Sebor wrote: I appreciate the heads up. I'm happy that the threader has improved. I'm obviously not

[PATCH] rs6000: Add Power10 optimization for most _mm_movemask*

2021-10-21 Thread Paul A. Clarke via Gcc-patches
Power10 ISA added `vextract*` instructions which are realized in the `vec_extractm` instrinsic. Use `vec_extractm` for `_mm_movemask_ps`, `_mm_movemask_pd`, and `_mm_movemask_epi8` compatibility intrinsics, when `_ARCH_PWR10`. 2021-10-21 Paul A. Clarke gcc * config/rs6000/xmmintrin.h

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-10-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Oct 2021 at 17:52, François Dumont wrote: > I eventually would like to propose a different approach. > > I am adding a hook in normal implementation to let the _GLIBCXX_DEBUG code > know when a node is being extracted. This way invalidation is only done by > comparing nodes, no need

Re: [PATH][_GLIBCXX_DEBUG] Fix unordered container merge

2021-10-21 Thread François Dumont via Gcc-patches
I eventually would like to propose a different approach. I am adding a hook in normal implementation to let the _GLIBCXX_DEBUG code know when a node is being extracted. This way invalidation is only done by comparing nodes, no need to compute hash code for this operation. The only drawback

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

2021-10-21 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

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

2021-10-21 Thread Ard Biesheuvel via Gcc-patches
bar, .-bar .ident "GCC: (GNU) 12.0.0 20211021 (experimental)" .section.note.GNU-stack,"",%progbits

Re: [PATCH] x86: Adjust gcc.target/i386/pr22076.c

2021-10-21 Thread H.J. Lu via Gcc-patches
On Tue, Oct 19, 2021 at 11:42 PM Uros Bizjak wrote: > > On Tue, Oct 19, 2021 at 8:23 PM H.J. Lu wrote: > > > > commit 247c407c83f0015f4b92d5f71e45b63192f6757e > > Author: Roger Sayle > > Date: Mon Oct 18 12:15:40 2021 +0100 > > > > Try placing RTL folded constants in the constant pool. >

[PATCH] x86: Document -fcf-protection requires i686 or newer

2021-10-21 Thread H.J. Lu via Gcc-patches
PR target/98667 * doc/invoke.texi: Document -fcf-protection requires i686 or new. --- gcc/doc/invoke.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c66a25fcd69..71992b8c597 100644 ---

Re: [wwwdocs, committed] GCC 12: Add release note for Fortran TS29113 improvements

2021-10-21 Thread Thomas Koenig via Gcc-patches
Hi Sandra, I've checked in the attached patch to announce the cleanup project that Tobias and I have been working on over the last several months in the GCC 12 release notes.  I also updated the page for TS29113 on the GCC wiki to reflect that anything that still doesn't work ought to be

Re: [RFC PATCH 0/1] implement TLS register based stack canary for ARM

2021-10-21 Thread Kees Cook via Gcc-patches
On Thu, Oct 21, 2021 at 06:34:04PM +0200, Ard Biesheuvel wrote: > On Thu, 21 Oct 2021 at 12:23, Ard Biesheuvel wrote: > > > > 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

Re: [RFC PATCH 0/1] implement TLS register based stack canary for ARM

2021-10-21 Thread Ard Biesheuvel via Gcc-patches
On Thu, 21 Oct 2021 at 12:23, Ard Biesheuvel wrote: > > 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

[wwwdocs, committed] GCC 12: Add release note for Fortran TS29113 improvements

2021-10-21 Thread Sandra Loosemore
I've checked in the attached patch to announce the cleanup project that Tobias and I have been working on over the last several months in the GCC 12 release notes. I also updated the page for TS29113 on the GCC wiki to reflect that anything that still doesn't work ought to be considered a

Re: Fix PR middle-end/102764

2021-10-21 Thread Eric Botcazou via Gcc-patches
> 2021-10-20 Eric Botcazou > > PR middle-end/102764 > * cfgexpand.c (expand_gimple_basic_block): Disregard a final debug > statement to reset the current location for the outgoing edges. This apparently breaks -fcompare-debug with -m32 so I have made it more robust by means

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread Segher Boessenkool
On Thu, Oct 21, 2021 at 02:42:10PM +0200, Richard Biener wrote: > +#define rs6000_casm static_cast (casm) > > maybe there's a better way? Though I can't think of one at the moment. > There are only 10 uses so eventually we can put the > static_cast into all places. Let's ask the powerpc

RE: [PATCH] aarch64: Remove redundant struct type definitions in arm_neon.h

2021-10-21 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Jonathan Wright > Sent: Thursday, October 21, 2021 12:46 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Sandiford > > Subject: [PATCH] aarch64: Remove redundant struct type definitions in > arm_neon.h > > Hi, > > As subject, this patch

Re: [PATCH 2/2] libstdc++: Implement P1739R4 changes to views::take/drop/counted

2021-10-21 Thread Jonathan Wakely via Gcc-patches
On Tue, 19 Oct 2021 at 13:20, Patrick Palka via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This implements P1739R4 along with the resolution for LWG 3407 which > corrects the paper's wording. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? > Yes, thanks. >

Re: [PATCH] libstdc++: Implement P2432R1 changes for views::istream

2021-10-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Oct 2021 at 15:41, Patrick Palka via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/11/10? > Yes for trunk. I'm undecided whether we want to make this breaking change on the branches. > libstdc++-v3/ChangeLog: > > *

Re: how does vrp2 rearrange this?

2021-10-21 Thread Andrew MacLeod via Gcc-patches
On 10/19/21 7:13 PM, Andrew Pinski wrote: On Tue, Oct 19, 2021 at 3:32 PM Andrew MacLeod wrote: On 10/19/21 5:13 PM, Andrew Pinski wrote: On Tue, Oct 19, 2021 at 1:29 PM Andrew MacLeod via Gcc-patches wrote: using testcase ifcvt-4.c: typedef int word __attribute__((mode(word))); word foo

Re: [PATCH] libstdc++: missing constexpr for __[nm]iter_base [PR102358]

2021-10-21 Thread Jonathan Wakely via Gcc-patches
On Thu, 21 Oct 2021 at 15:38, Patrick Palka via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested on x86_64-pc-linux-gnu, does this look ok for trunk/11/10? > Yes to all, thanks. > PR libstdc++/102358 > > libstdc++-v3/ChangeLog: > > * include/bits/stl_iterator.h

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-21 Thread Martin Sebor via Gcc-patches
On 10/21/21 1:17 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 10:01 PM Jeff Law wrote: On 10/20/2021 9:15 AM, Aldy Hernandez wrote: On Wed, Oct 20, 2021 at 4:35 PM Martin Sebor wrote: I appreciate the heads up. I'm happy that the threader has improved. I'm obviously not pleased

[PATCH] libstdc++: Implement P2432R1 changes for views::istream

2021-10-21 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/11/10? libstdc++-v3/ChangeLog: * include/std/ranges (istream_view): Replace this function template with an alias template as per P2432R1. (wistream_view): Define as per P2432R1. (views::_Istream,

Re: [COMMITTED] Avoid threading circular paths.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
Sorry, I tried to revert as soon as I noticed, but it's always a race against the 20 CI bots and fuzzers that keep us honest ;-). Aldy On Thu, Oct 21, 2021 at 4:35 PM Jeff Law wrote: > > > > On 10/21/2021 2:12 AM, Aldy Hernandez wrote: > > The backward threader keeps a hash of visited blocks to

[PATCH] libstdc++: missing constexpr for __[nm]iter_base [PR102358]

2021-10-21 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look ok for trunk/11/10? PR libstdc++/102358 libstdc++-v3/ChangeLog: * include/bits/stl_iterator.h (__niter_base): Make constexpr for C++20. (__miter_base): Likewise. * testsuite/25_algorithms/move/constexpr.cc:

Re: [COMMITTED] Avoid threading circular paths.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 2:12 AM, Aldy Hernandez wrote: The backward threader keeps a hash of visited blocks to avoid crossing the same block twice. Interestingly, we haven't been checking it for the final block out of the path. This may be inherited from the old code, as it was simple enough that it

[PATCH] coroutine use of lambda capture proxies [PR96517]

2021-10-21 Thread Iain Sandoe
Hi (apologies to Jason and Nathan for two copies - I sent from the wrong email and omitted patches@) This is a description of how the revised handling of coroutine proxy variables is supposed to work, in the case of methods and lambdas. Given that this came up again recently, perhaps I might

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:43 PM, Jeff Law wrote: On 10/21/2021 6:56 AM, Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:46 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 3:30 PM Aldy Hernandez wrote: On 10/21/21 3:14 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM

Re: [PATCH] gcc: implement AIX-style constructors

2021-10-21 Thread David Edelsohn via Gcc-patches
On Thu, Oct 21, 2021 at 8:39 AM CHIGOT, CLEMENT wrote: > > Hi David, > > The problem is that cdtors is created by the linker only when the -bcdtors > flag is provided. Thus, if we add "extern void (* _cdtors[]) (void);" to > the "crtcxa.c", we can't use it without using the new constructor types.

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 3:43 PM Martin Liška wrote: > > On 10/21/21 14:42, Richard Biener wrote: > > On Thu, Oct 21, 2021 at 11:47 AM Martin Liška wrote: > >> > >> On 10/5/21 13:54, Richard Biener wrote: > >>> On Mon, Oct 4, 2021 at 1:13 PM Martin Liška wrote: > > On 9/22/21 11:59,

[PATCH] Adjust testcase for 128/256 bit HF vector load/store

2021-10-21 Thread Hongyu Wang via Gcc-patches
Hi, The HF vector move have been updated to align with HI vector, adjust according testcase for _Float16 vector load and store. Tested on x86_64-pc-linux-gnu{-m32,}, pushed as obvious fix. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512fp16-13.c: Adjust scan-assembler for

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 3:30 PM Aldy Hernandez wrote: > > > > On 10/21/21 3:14 PM, Richard Biener wrote: > > On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: > >> > >> On Thu, Oct 21, 2021 at 12:20 PM Richard Biener > >> wrote: > >>> > >>> On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote:

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Jeff Law via Gcc-patches
On 10/21/2021 6:56 AM, Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law wrote: On 10/8/2021 9:12 AM, Aldy Hernandez via

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread Martin Liška
On 10/21/21 14:42, Richard Biener wrote: On Thu, Oct 21, 2021 at 11:47 AM Martin Liška wrote: On 10/5/21 13:54, Richard Biener wrote: On Mon, Oct 4, 2021 at 1:13 PM Martin Liška wrote: On 9/22/21 11:59, Richard Biener wrote: On Thu, Sep 16, 2021 at 3:12 PM Martin Liška wrote: This

Re: [PATCH] i386: Fix wrong codegen for V8HF move without TARGET_AVX512F

2021-10-21 Thread Hongyu Wang via Gcc-patches
Thanks for reminding this, will adjust the testcase since the output for 128/256bit HFmode load has changed. Martin Liška 于2021年10月21日周四 下午8:49写道: > > On 10/21/21 07:47, Hongyu Wang via Gcc-patches wrote: > > |Yes, updated patch.| > > Note the patch caused the following test failure: > > FAIL:

[COMMITTED 3/3] Split --param=evrp-mode into evrp-mode and ranger-debug.

2021-10-21 Thread Andrew MacLeod via Gcc-patches
Should have done this a while ago.  With ranger being utilized in other places, tying the debug output mode with the EVRP mode no longer makes sense. This patch splits the current --param=evrp-mode values into "evrp-mode" and "ranger-debug".   After this patch, valid values are:

[COMMITTED 2/3] Add --param=vrp1-mode and --param=vrp2-mode.

2021-10-21 Thread Andrew MacLeod via Gcc-patches
This patch adds 2 new --params,  vrp1-mode and vrp2-mode.  They can be used to select which version of VRP should be used for each pass. Valid options are "vrp" and "ranger": ie --param=vrp1-mode=vrp --param=vrp2-mode=ranger As VRP is the current default for both, again, there is no

[COMMITED 1/3] Move ranger only VRP folder to tree-vrp.

2021-10-21 Thread Andrew MacLeod via Gcc-patches
This patch moves the ranger rvrp folder class to tree-vrp.c, and provides an execute_ranger_vrp() routine that matches the same parameter sequence as the execute_vrp() routine has.  The evrp pass is tweaked to call this routine when running in ranger-only mode. This paves the way for a ranger

Re: [PATCH] libcody: Avoid double-free

2021-10-21 Thread Jonathan Wakely via Gcc-patches
Oops, this patch and the next one were only meant for gcc-patches, not the libstdc++ list as well - sorry! On Thu, 21 Oct 2021 at 14:27, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > If the listen call fails then 'goto fail' will jump to that label and > use freeaddrinfo

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On 10/21/21 3:14 PM, Richard Biener wrote: On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: On 10/18/2021 2:17 AM, Aldy Hernandez wrote: On 10/18/21 12:52 AM, Jeff Law

[PATCH] c++tools: Fix memory leak

2021-10-21 Thread Jonathan Wakely via Gcc-patches
The allocated memory is not freed when returning early due to an error. c++tools/ChangeLog: * resolver.cc (module_resolver::read_tuple_file): Use unique_ptr to ensure memory is freed before returning. --- c++tools/resolver.cc | 14 -- 1 file changed, 8 insertions(+),

[PATCH] libcody: Avoid double-free

2021-10-21 Thread Jonathan Wakely via Gcc-patches
If the listen call fails then 'goto fail' will jump to that label and use freeaddrinfo again. Set the pointer to null to prevent that. libcody/ChangeLog: * netserver.cc (ListenInet6): Set pointer to null after deallocation. --- libcody/netserver.cc | 1 + 1 file changed, 1

[PATCH] or1k: Update FPU to specify detect tininess before rounding

2021-10-21 Thread Stafford Horne via Gcc-patches
This was not defined in the spec and not consistent in the implementation causing incosistent behavior. After review we have updated the CPU implementations and proposed the spec be updated to specific that FPU tininess checks check for tininess before roudning. Architecture change draft:

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 3:14 PM Martin Liška wrote: > > On 10/21/21 11:57, Richard Biener wrote: > > which previously affected debug_nonbind_markers_p. I think it makes > > sense to move > > the above to finish_options as well. I suppose -help doesn't correctly dump > > the -g enabled state for

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 2:56 PM Aldy Hernandez wrote: > > On Thu, Oct 21, 2021 at 12:20 PM Richard Biener > wrote: > > > > On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > > > > > > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > > > > > > > On 10/18/21 12:52 AM, Jeff Law

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Martin Liška
On 10/21/21 11:57, Richard Biener wrote: which previously affected debug_nonbind_markers_p. I think it makes sense to move the above to finish_options as well. I suppose -help doesn't correctly dump the -g enabled state for -gtoggle at the moment? All right, works for me. The updated patch

[PATCH 2/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
This patch adds the possibility to make the following constants: * long long * long double * complex long double The long long one is needed for 32bit systems. The new entrypoints are: gcc_jit_context_new_rvalue_from_long_long gcc_jit_context_new_rvalue_from_long_double

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 2:48 PM David Malcolm via Gcc-patches wrote: > > On Thu, 2021-09-16 at 15:12 +0200, Martin Liška wrote: > > This patch comes up with asm_out_state and a new global variable > > casm. > > > > Tested on all cross compilers. > > Patch can bootstrap on x86_64-linux-gnu and

[PATCH 1/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
This patch fixes support for complex types. It adds the entrypoints: gcc_jit_context_new_rvalue_from_complex_double gcc_jit_context_set_bool_enable_complex_types Aswell as the binary operator GCC_JIT_BINARY_OP_COMPLEX, to make complex numbers from two real number rvalues. Note that the complex

[PATCH 0/2] jit: Complex types and loong constants

2021-10-21 Thread Petter Tomner via Gcc-patches
Hi, These two patches fixes support for complex types and adds the possibility to make long long, long double and complex long double constants. Please see follow up mails. Regards,

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On Thu, Oct 21, 2021 at 12:20 PM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > > > > On 10/18/21 12:52 AM, Jeff Law wrote: > > >> > > >> > > >> On 10/8/2021 9:12 AM, Aldy Hernandez via

Re: [PATCH] i386: Fix wrong codegen for V8HF move without TARGET_AVX512F

2021-10-21 Thread Martin Liška
On 10/21/21 07:47, Hongyu Wang via Gcc-patches wrote: |Yes, updated patch.| Note the patch caused the following test failure: FAIL: gcc.target/i386/avx512fp16-13.c scan-assembler-times vmovdqa64[ \\t]+[^{\n]*%ymm[0-9]+[^\n]*\\) 1 FAIL: gcc.target/i386/avx512fp16-13.c scan-assembler-times

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread David Malcolm via Gcc-patches
On Thu, 2021-09-16 at 15:12 +0200, Martin Liška wrote: > This patch comes up with asm_out_state and a new global variable > casm. > > Tested on all cross compilers. > Patch can bootstrap on x86_64-linux-gnu and survives regression > tests. > > Ready to be installed? > Thanks, > Martin This is

Re: [PATCH 3/N] Come up with casm global state.

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 11:47 AM Martin Liška wrote: > > On 10/5/21 13:54, Richard Biener wrote: > > On Mon, Oct 4, 2021 at 1:13 PM Martin Liška wrote: > >> > >> On 9/22/21 11:59, Richard Biener wrote: > >>> On Thu, Sep 16, 2021 at 3:12 PM Martin Liška wrote: > > This patch comes up

Re: [PATCH] gcc: implement AIX-style constructors

2021-10-21 Thread CHIGOT, CLEMENT via Gcc-patches
Hi David, The problem is that cdtors is created by the linker only when -bcdtors flag is provided. Thus, if we add "extern void (* _cdtors[]) (void);" to the "crtcxa.c", we can't used it without using the new constructor types. One solution would be to create another crtcxa (eg crtcxa_cdtors.o)

Re: [RFC] vect: Convert cost hooks to classes

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, 14 Oct 2021, Richard Sandiford wrote: > The current vector cost interface has a quite a bit of redundancy > built in. Each target that defines its own hooks has to replicate > the basic unsigned[3] management. Currently each target also > duplicates the cost adjustment for inner loops.

Re: [PATCH 1v2/3][vect] Add main vectorized loop unrolling

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, 20 Oct 2021, Andre Vieira (lists) wrote: > On 15/10/2021 09:48, Richard Biener wrote: > > On Tue, 12 Oct 2021, Andre Vieira (lists) wrote: > > > >> Hi Richi, > >> > >> I think this is what you meant, I now hide all the unrolling cost > >> calculations > >> in the existing target hooks for

Re: [PATCH] X86: Add an option -muse-unaligned-vector-move

2021-10-21 Thread H.J. Lu via Gcc-patches
On Thu, Oct 21, 2021 at 12:15 AM Richard Biener wrote: > > On Wed, Oct 20, 2021 at 8:34 PM H.J. Lu wrote: > > > > On Wed, Oct 20, 2021 at 9:58 AM Richard Biener > > wrote: > > > > > > On October 20, 2021 3:19:28 PM GMT+02:00, "H.J. Lu" > > > wrote: > > > >On Wed, Oct 20, 2021 at 4:18 AM

[PATCH] aarch64: Remove redundant struct type definitions in arm_neon.h

2021-10-21 Thread Jonathan Wright via Gcc-patches
Hi, As subject, this patch deletes some redundant type definitions in arm_neon.h. These vector type definitions are an artifact from the initial commit that added the AArch64 port. Bootstrapped and regression tested on aarch64-none-linux-gnu - no issues. Ok for master? Thanks, Jonathan ---

[COMMITTED] Revert the avoid threading circular paths commit.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
I've tested this patch on the wrong tree, and picked up the test changes in a pending patch, without which this patch is no longer obvious. Plus, it causes a regression in an invalid test I've recommended we remove. I'm reverting this patch until the dependencies are reviewed. Sorry for the

Re: [PATCH] sra: Fix corner case of total scalarization with virtual inheritance (PR 102505)

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, Oct 21, 2021 at 12:57 PM Martin Jambor wrote: > > Hi, > > PR 102505 is a situation where of SRA takes its initial top-level > access size from a get_ref_base_and_extent called on a COMPONENT_REF, > and thus derived frm the FIELD_DECL, which however does not include a > virtual base.

Re: [PATCH, v2] c++: Diagnose taking address of an immediate member function [PR102753]

2021-10-21 Thread Jakub Jelinek via Gcc-patches
On Wed, Oct 20, 2021 at 07:16:44PM -0400, Jason Merrill wrote: > or an unevaluated operand, or a subexpression of an immediate invocation. > > Hmm...that suggests that in consteval23.C, bar(foo) should also be OK, Ouch. That opens a big can of worms, see below. > because 'foo' is a

Re: [PATCH v4] Improve integer bit test on __atomic_fetch_[or|and]_* returns

2021-10-21 Thread Hongtao Liu via Gcc-patches
i is On Wed, Oct 13, 2021 at 8:34 PM Richard Biener via Gcc-patches wrote: > > On Sun, Oct 10, 2021 at 3:49 PM H.J. Lu wrote: > > > > Changes in v4: > > > > 1. Bypass redundant check when inputs have been transformed to the > > equivalent canonical form with valid bit operation. > > > >

[PATCH] sra: Fix corner case of total scalarization with virtual inheritance (PR 102505)

2021-10-21 Thread Martin Jambor
Hi, PR 102505 is a situation where of SRA takes its initial top-level access size from a get_ref_base_and_extent called on a COMPONENT_REF, and thus derived frm the FIELD_DECL, which however does not include a virtual base. Total scalarization then goes on traversing the type, which however has

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

2021-10-21 Thread Richard Biener via Gcc-patches
On Thu, 21 Oct 2021, Xionghu Luo wrote: > > > On 2021/10/15 13:51, Xionghu Luo via Gcc-patches wrote: > > > > > > On 2021/9/23 20:17, Richard Biener wrote: > >> On Wed, 22 Sep 2021, Xionghu Luo wrote: > >> > >>> > >>> > >>> On 2021/8/11 17:16, Richard Biener wrote: > On Wed, 11 Aug 2021,

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

2021-10-21 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

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

2021-10-21 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

Re: [PATCH] Convert strlen pass from evrp to ranger.

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 10:58 PM Jeff Law wrote: > > > > On 10/18/2021 2:17 AM, Aldy Hernandez wrote: > > > > > > On 10/18/21 12:52 AM, Jeff Law wrote: > >> > >> > >> On 10/8/2021 9:12 AM, Aldy Hernandez via Gcc-patches wrote: > >>> The following patch converts the strlen pass from evrp to

Re: [PATCH] Try to resolve paths in threader without looking further back.

2021-10-21 Thread Aldy Hernandez via Gcc-patches
On Wed, Oct 20, 2021 at 10:19 PM Jeff Law wrote: > So we want to keep some form of ssa-dom-thread-7. That' s the canonical > testcase for the case for the FSM optimization. > > What we need to verify is that we thread jumps across the backedge of > the loop through the switch statement to a

[PATCH] Move the initial debug_hooks setting

2021-10-21 Thread Richard Biener via Gcc-patches
I just realized that when I moved the langhook call I failed to move the initial debug_hooks setting whose comment mentions the langhook as reason. Bootstrap & regtest in progress on x86_64-unknown-linux-gnu. 2021-10-21 Richard Biener * toplev.c (process_options): Move the initial

[PATCH] tree-optimization/102847 - adjust VMAT_INVARIANT load costing

2021-10-21 Thread Richard Biener via Gcc-patches
This adds the missing scalar load cost in the prologue. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. 2021-10-21 Richard Biener PR tree-optimization/102847 * tree-vect-stmts.c (vect_model_load_cost): Add the scalar load cost in the prologue for

Re: [PATCH] options: Fix variable tracking option processing.

2021-10-21 Thread Richard Biener via Gcc-patches
On Wed, Oct 20, 2021 at 10:51 AM Martin Liška wrote: > > On 10/19/21 12:53, Richard Biener wrote: > > Meh ... :/ > > > > Well, move the target override hook call down (try to shuffle things > > so diagnostics happen after but > > "inits" happen before). > > Not so easy. There are direct usages of

[PATCH] tree-optimization/102847 - properly cost VMAT_INVARIANT loads

2021-10-21 Thread Richard Biener via Gcc-patches
The following adds proper costing of VMAT_INVARIANT loads, avoiding to ask the target about the cost of an unsupported vector load cost which we won't emit anyway. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. 2021-10-21 Richard Biener PR tree-optimization/102847

[committed] testsuite: Fix up gfortran.dg/gomp/strictly*.f90 testcases

2021-10-21 Thread Jakub Jelinek via Gcc-patches
Hi! I meant it in the other testcases too: While these testcases are dg-do compile only, I think it is better not to give users bad examples and avoid unnecessary data races in testcases (unless it is exactly what we want to test). Perhaps one day we'll do some analysis and warn about data

  1   2   >