Re: [PATCH V2] powerpc: properly check for feenableexcept() on FreeBSD

2022-05-13 Thread Piotr Kubaj via Gcc-patches
I'm abandoning this patch. It was fixed in FreeBSD instead to have feenableexcept() in libm in https://cgit.freebsd.org/src/commit/?id=448c505c33cc334193590f3844406d6a74f26e2a Thanks for your insight! On 22-05-13 10:59:59, Kewen.Lin wrote: > on 2022/5/13 04:16, Segher Boessenkool wrote: > > Hi

[pushed] c++: Add fixed test [PR81952]

2022-05-13 Thread Marek Polacek via Gcc-patches
This was fixed by r258755: PR c++/81311 - wrong C++17 overload resolution. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/81952 gcc/testsuite/ChangeLog: * g++.dg/overload/conv-op4.C: New test. --- gcc/testsuite/g++.dg/overload/conv-op4.C | 22 ++ 1

[PATCH v4] c++: ICE with temporary of class type in DMI [PR100252]

2022-05-13 Thread Marek Polacek via Gcc-patches
On Sat, May 07, 2022 at 06:02:13PM -0400, Jason Merrill wrote: > On 5/7/22 15:11, Marek Polacek wrote: > > On Tue, May 03, 2022 at 04:59:38PM -0400, Jason Merrill wrote: > > > Does this testcase still work with this patch? > > > > > > struct A { > > >const A* p = this; > > > }; > > > > > >

Re: [COMMITTED] rs6000: Remove a few needless 'lp64' contraints.

2022-05-13 Thread Paul A. Clarke via Gcc-patches
On Thu, May 12, 2022 at 05:30:16PM -0500, Segher Boessenkool wrote: > On Mon, Apr 18, 2022 at 12:15:35PM -0500, Paul A. Clarke wrote: > > A few tests need not be restricted to 'lp64', so remove the restriction. > > > > A few of those need a simple change to the DejaGnu directives to suppress > >

Re: [COMMITTED] rs6000: Move g++.dg powerpc PR tests to g++.target

2022-05-13 Thread Paul A. Clarke via Gcc-patches
> On 12 May 2022, at 23:38, Segher Boessenkool > wrote: > On Mon, Apr 18, 2022 at 12:15:34PM -0500, Paul A. Clarke wrote: >> -/* { dg-skip-if "" { powerpc*-*-darwin* } } */ >> +/* Never tested on darwin, so skip there. */ >> +/* { dg-skip-if "" { *-*-darwin* } } */ > > That is probably the

Re: [PATCH] [wwwdocs] Added LoongArch support to the gcc12 changes.

2022-05-13 Thread Gerald Pfeifer
On Sat, 7 May 2022, Gerald Pfeifer wrote: >> +LoongArch > Okay, thanks. And here is a markup fix on top, which I just pushed. Gerald commit 01a1afc13afd0e2b981262b0a1bf9ba1d7d19f79 Author: Gerald Pfeifer Date: Sat May 14 00:27:52 2022 +0200 gcc-12: Fix markup in the Loongson section

Go patch committed: Always sort interface parse methods

2022-05-13 Thread Ian Lance Taylor via Gcc-patches
This patch to the Go frontend always sorts interface parse methods. The exporter relies on sorting interface parse methods. It would sort them as it encountered interface types. However, when an interface type is an element of a struct or array type, the exporter might encounter that interface

[Patch] OpenMP: Add omp_all_memory support to Fortran

2022-05-13 Thread Tobias Burnus
This adds omp_all_memory handling to Fortran, following C/C++ and shamelessly coping the C testcases and adapting them to Fortran. OK? Tobias - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung;

Re: [AArch64] PR105162: emit barrier for __sync and __atomic builtins on CPUs without LSE

2022-05-13 Thread Pop, Sebastian via Gcc-patches
Please see attached the patch back-ported to branches 12, 11, 10, and 9. Tested on aarch64-linux with bootstrap and regression test. Ok to commit to the GCC active branches? Thanks, SebastianFrom bba8d09284f3478f7d542ca4e7812d4c55e25bd4 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Mon, 18

Re: [PATCH v3] RISC-V: Implement C[LT]Z_DEFINED_VALUE_AT_ZERO

2022-05-13 Thread Philipp Tomsich
Added the two nits from Kito's review and … Applied to trunk! On Fri, 13 May 2022 at 22:16, Philipp Tomsich wrote: > > The Zbb support has introduced ctz and clz to the backend, but some > transformations in GCC need to know what the value of c[lt]z at zero > is. This affects how the optab is

[PATCH v3] RISC-V: Implement C[LT]Z_DEFINED_VALUE_AT_ZERO

2022-05-13 Thread Philipp Tomsich
The Zbb support has introduced ctz and clz to the backend, but some transformations in GCC need to know what the value of c[lt]z at zero is. This affects how the optab is generated and may suppress use of CLZ/CTZ in tree passes. Among other things, this is needed for the transformation of

[committed] libstdc++: Make std::thread::_State private

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- * include/bits/std_thread.h (thread::_State, thread::_State_ptr): Declare as private unless _GLIBCXX_THREAD_IMPL is defined. * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define. ---

[committed] libstdc++: Add noexcept to std::launch operators

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/future (launch): Make operators noexcept. --- libstdc++-v3/include/std/future | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/std/future

[committed] libstdc++: Allow std::swap to find overload for std::exception_ptr

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- The non-member swap for std::exception_ptr is in a nested namespace and so can only be found by ADL currently. Add a using-declaration so that qualified std::swap calls will use the std::exception_ptr::swap member, instead of the generic

[committed] libstdc++: Make std::rethrow_if_nested work without RTTI

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64l4-linux, pushed to trunk. -- >8 -- This allows std::rethrow_if_nested to work with -fno-rtti by not attempting the dynamic_cast if it requires RTTI, since that's ill-formed with -fno-rtti. The cast will still work if a static upcast to std::nested_exception is allowed. Also use

Re: [RESEND][committed v4] RISC-V: Provide `fmin'/`fmax' RTL patterns

2022-05-13 Thread Maciej W. Rozycki
On Fri, 13 May 2022, Palmer Dabbelt wrote: > Yep. We should have a NEWS entry, though, as this one is user-visible and may > be tricky to sort out if it turns out there is some HW lurking around that has > the old behavior. Hmm, should we? We only support `-misa-spec=<2.2|20190608|20191213>'

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-13 Thread Mohamed Atef via Gcc-patches
Hello Jakub, I am sorry, but should #ifdef __ELF__ put and separate file and also the actual functions (e.g. extern ompd_dll_location_valid (void)) I mean both in the same files or the functions should be in the omp-tools.h but with #ifndef __ELF__ Mohamed On Fri, May 13, 2022 at 8:27 PM

Re: [PATCH] Generate vadduqm and vsubuqm for TImode add/subtract

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 12:19 -0400, Michael Meissner wrote: > Generate vadduqm and vsubuqm for TImode add/subtract > > If the TImode variable is in an Altivec register instead of a GPR > register, then generate vadduqm and vsubuqm instead of having to move the > value to the GPR registers and

[COMMITTED] PR tree-optimization/105597 - Check operand for type, not LHS.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
Earlier patch was picking the type of the expression in a minus operation from the LHS.   When we are folding, the LHS may not be defined yet. Instead, pick up the type from operand 1, and ensure it isn't undefined while we're at it. Bootstrapped on x86_64-pc-linux-gnu with no regressions. 

Re: [PATCH v2 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-13 Thread Christophe Lyon via Gcc-patches
On 5/13/22 20:23, Joseph Myers wrote: On Fri, 13 May 2022, Christophe Lyon via Gcc-patches wrote: diff --git a/gcc/testsuite/gcc.target/aarch64/convert-dfp-2.c b/gcc/testsuite/gcc.target/aarch64/convert-dfp-2.c I still think the tests should run for x86 as well - that is, for any target

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-13 Thread Jakub Jelinek via Gcc-patches
On Fri, May 13, 2022 at 08:22:41PM +0200, Mohamed Atef wrote: > > As I've tried to explain, this #ifdef __ELF__ doesn't belong > > to the public header, which should contain just > > extern void ompd_dll_locations_valid (void) __GOMPD_NOTHROW; > > The #define should be in some internal header that

Re: [PATCH v2 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-13 Thread Joseph Myers
On Fri, 13 May 2022, Christophe Lyon via Gcc-patches wrote: > diff --git a/gcc/testsuite/gcc.target/aarch64/convert-dfp-2.c > b/gcc/testsuite/gcc.target/aarch64/convert-dfp-2.c I still think the tests should run for x86 as well - that is, for any target supporting both DFP and _Float16 (with

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-13 Thread Mohamed Atef via Gcc-patches
في الجمعة، ١٣ مايو، ٢٠٢٢ ٣:١٤ م Jakub Jelinek كتب: > On Tue, May 10, 2022 at 07:40:41AM +0200, Mohamed Atef wrote: > > --- a/libgomp/env.c > > +++ b/libgomp/env.c > > @@ -33,6 +33,7 @@ > > #ifndef LIBGOMP_OFFLOADED_ONLY > > #include "libgomp_f.h" > > #include "oacc-int.h" > > +#include

Re: [PATCH] Optimize multiply/add of DImode extended to TImode, PR target/103109.

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 12:17 -0400, Michael Meissner wrote: > Optimize multiply/add of DImode extended to TImode, PR target/103109. > > On power9 and power10 systems, we have instructions that support doing > 64-bit integers converted to 128-bit integers and producing 128-bit > results. This

Re: [PATCH] Add zero_extendditi2. Improve lxvr*x code generation.

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 12:13 -0400, Michael Meissner wrote: > Add zero_extendditi2. Improve lxvr*x code generation. > Content here matches what I commented on in the prior email with subject "Delay splitting addti3...". > This pattern adds zero_extendditi2 so that if we are extending

Re: [PATCH] Delay splitting addti3/subti3 until first split pass.

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 11:08 -0400, Michael Meissner wrote: > Add zero_extendditi2. Improve lxvr*x code generation. > Hi, > Subject: Re: [PATCH] Delay splitting addti3/subti3 until first split pass. Subject does not seem to match contents? > This pattern adds zero_extendditi2 so that if

[PATCH v2 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-13 Thread Christophe Lyon via Gcc-patches
This patch adds support for trunc and extend operations between HF mode (__fp16) and Decimal Floating Point formats (_Decimal32, _Decimal64 and _Decimal128). For simplicity we rely on the implicit conversions inserted by the compiler between HF and SD/DF/TF modes. The existing bid*_to_binary*

[PATCH v2 08/10] testsuite: Add C++ unwinding tests with Decimal Floating-Point

2022-05-13 Thread Christophe Lyon via Gcc-patches
These tests exercise exception handling with Decimal Floating-Point type. dfp-1.C and dfp-2.C check that thrown objects of such types are properly caught, whether when using C++ classes (decimalXX) or via GCC mode attributes. dfp-saves-aarch64.C checks that such objects are properly restored,

Re: [Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-05-13 Thread Jakub Jelinek via Gcc-patches
On Fri, May 13, 2022 at 07:21:02PM +0200, Tobias Burnus wrote: > gcc/fortran/ChangeLog: > > * trans-openmp.cc (gfc_trans_omp_clauses): When mapping nondescriptor > array sections, use GOMP_MAP_FIRSTPRIVATE_POINTER instead of > GOMP_MAP_POINTER for the pointer attachment. > >

Re: [PATCH] Delay splitting addti3/subti3 until first split pass.

2022-05-13 Thread Segher Boessenkool
On Fri, May 13, 2022 at 11:08:48AM -0400, Michael Meissner wrote: > Add zero_extendditi2. Improve lxvr*x code generation. Nothing in this pass haas anything to do with the subject. Which is a good thing, because not expanding addti3 etc. to RTL that mimics the machine insns is not acceptable

Re: [PATCH] Replace UNSPEC with RTL code for extendditi2.

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 10:52 -0400, Michael Meissner wrote: > Replace UNSPEC with RTL code for extendditi2. > Hi, > When I submitted my patch on March 12th for extendditi2, Segher > wished I > had removed the use of the UNSPEC for the vextsd2q instruction. This > patch rewrites

[PATCH v3] Disable tests that require fesetround() on platforms without it

2022-05-13 Thread Palmer Dabbelt
Some tests check for fenv and then proceed to use fesetround() directly, but some platforms (at least RISC-V soft-float) have fenv but don't support rounding modes. This adds a DG check that fesetround() actually functions, which is then used by all the tests that call fesetround() explicitly.

Re: [PATCH v2] Disable tests that require fesetround() on platforms without it

2022-05-13 Thread Palmer Dabbelt
On Tue, 03 May 2022 08:21:45 PDT (-0700), gcc-patches@gcc.gnu.org wrote: On 4/29/2022 5:44 PM, Palmer Dabbelt wrote: Some tests check for fenv and then proceed to use fesetround() directly, but some platforms (at least RISC-V soft-float) have fenv but don't support rounding modes. This adds

[Patch] OpenMP/Fortran: Use firstprivat not alloc for ptr attach for arrays

2022-05-13 Thread Tobias Burnus
Based on sollve_vv's tests/4.5/target_teams_distribute/test_target_teams_distribute_nowait.F90 As discussed, for simple pointers – like here with nondescriptor array, instead of alloc:a + pointer assign, a firstprivate + pointer assign makes more sense. It also avoids the race exposed by the

[PATCH 3/3]AArch64 Update the testsuite to remove xfails.

2022-05-13 Thread Tamar Christina via Gcc-patches
Hi All, This removes the xfails from the below tests which now all pass. Bootstrapped Regtested on aarch64-none-linux-gnu and no issues and fixes 209 SVE xfails. Ok for master? Thanks, Tamar gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/asm/abd_s16.c: Remove xfail. *

[PATCH 2/3]AArch64 Promote function arguments using a paradoxical subreg when beneficial.

2022-05-13 Thread Tamar Christina via Gcc-patches
Hi All, The PROMOTE_MODE always promotes 8 and 16-bit parameters to 32-bits. This promotion is not required for the ABI which states: ``` C.9 If the argument is an Integral or Pointer Type, the size of the argument is less than or equal to 8 bytes and the NGRN is less than 8, the argument

[PATCH 1/3]middle-end: Add the ability to let the target decide the method of argument promotions.

2022-05-13 Thread Tamar Christina via Gcc-patches
Hi All, Some targets require function parameters to be promoted to a different type on expand time because the target may not have native instructions to work on such types. As an example the AArch64 port does not have native instructions working on integer 8- or 16-bit values. As such it

Re: [wwwdocs] gcc-12/changes.html: Document the RISC-V libstdc++ -latomic detection

2022-05-13 Thread Palmer Dabbelt
On Tue, 10 May 2022 18:34:33 PDT (-0700), Kito Cheng wrote: LGTM, I think document what we really did in GCC 12 is never too late :P OK, committed. On Fri, Apr 29, 2022 at 2:23 AM Palmer Dabbelt wrote: --- IMO this one is worth documenting too, not sure if it's too late for gcc-12's

Re: [PATCH] Optimize vec_splats of constant V2DI/V2DF vec_extract, PR target/99293

2022-05-13 Thread will schmidt via Gcc-patches
On Fri, 2022-05-13 at 10:49 -0400, Michael Meissner wrote: > Optimize vec_splats of constant V2DI/V2DF vec_extract, PR target/99293. > > This patch has been previously posted, but it seemed to get lost.: > > > Date: Tue, 29 Mar 2022 23:25:31 -0400 > > Subject: [PATCH, V2] Optimize vec_splats of

Re: [PATCH] testsuite: btf: Fix btf-datasec-1.c for RISC-V

2022-05-13 Thread Palmer Dabbelt
On Tue, 10 May 2022 18:31:37 PDT (-0700), Kito Cheng wrote: LGTM, that's only added a new option for RISC-V and won't affect all other targets, so I assume I can approve that. I always forget what the rules are, but someone recently reminded me and yes that's the case. I committed this.

Re: [RESEND][committed v4] RISC-V: Provide `fmin'/`fmax' RTL patterns

2022-05-13 Thread Palmer Dabbelt
On Tue, 10 May 2022 08:48:33 PDT (-0700), gcc-patches@gcc.gnu.org wrote: Thanks Maciej! Yep. We should have a NEWS entry, though, as this one is user-visible and may be tricky to sort out if it turns out there is some HW lurking around that has the old behavior. On Tue, May 10, 2022 at

Re: [PATCH] testsuite: opt: Fix const7.C for RISC-V.

2022-05-13 Thread Palmer Dabbelt
On Thu, 12 May 2022 18:55:45 PDT (-0700), jia...@iscas.ac.cn wrote: Similar to patch 593993, RISC-V needs to limit symbols send in sdata. Thanks for Palmer's help. gcc/testsuite/ChangeLog: * g++.dg/opt/const7.C: Don't use small data on RISC-V. --- gcc/testsuite/g++.dg/opt/const7.C |

[PATCH v2 08/10] testsuite: Add C++ unwinding tests with Decimal Floating-Point

2022-05-13 Thread Christophe Lyon via Gcc-patches
These tests exercise exception handling with Decimal Floating-Point type. dfp-1.C and dfp-2.C check that thrown objects of such types are properly caught, whether when using C++ classes (decimalXX) or via GCC mode attributes. dfp-saves-aarch64.C checks that such objects are properly restored,

Re: [PATCH v2 02/10] aarch64: Add backend support for DFP

2022-05-13 Thread Richard Sandiford via Gcc-patches
Christophe Lyon via Gcc-patches writes: > @@ -19352,7 +19363,9 @@ aarch64_legitimate_constant_p (machine_mode mode, rtx > x) > { >/* Support CSE and rematerialization of common constants. */ >if (CONST_INT_P (x) > - || (CONST_DOUBLE_P (x) && GET_MODE_CLASS (mode) == MODE_FLOAT)) >

[PATCH v2 09/10] libgcc: Add support for HF mode (aka __fp16) in libbid

2022-05-13 Thread Christophe Lyon via Gcc-patches
This patch adds support for trunc and extend operations between HF mode (__fp16) and Decimal Floating Point formats (_Decimal32, _Decimal64 and _Decimal128). For simplicity we rely on the implicit conversions inserted by the compiler between HF and SD/DF/TF modes. The existing bid*_to_binary*

[PATCH] Generate vadduqm and vsubuqm for TImode add/subtract

2022-05-13 Thread Michael Meissner via Gcc-patches
Generate vadduqm and vsubuqm for TImode add/subtract If the TImode variable is in an Altivec register instead of a GPR register, then generate vadduqm and vsubuqm instead of having to move the value to the GPR registers and doing the add and subtract with carry instructions. To do this, we have

[PATCH] Optimize multiply/add of DImode extended to TImode, PR target/103109.

2022-05-13 Thread Michael Meissner via Gcc-patches
Optimize multiply/add of DImode extended to TImode, PR target/103109. On power9 and power10 systems, we have instructions that support doing 64-bit integers converted to 128-bit integers and producing 128-bit results. This patch adds support to generate these instructions. Previously GCC had

[PATCH] Add zero_extendditi2. Improve lxvr*x code generation.

2022-05-13 Thread Michael Meissner via Gcc-patches
Add zero_extendditi2. Improve lxvr*x code generation. This pattern adds zero_extendditi2 so that if we are extending DImode that is in a GPR register to TImode in a vector register, the compiler can generate MTVSRDDD. In addition the patterns for generating lxvr{b,h,w,d}x were tuned to allow

[PATCH v2 02/10] aarch64: Add backend support for DFP

2022-05-13 Thread Christophe Lyon via Gcc-patches
This patch updates the aarch64 backend as needed to support DFP modes (SD, DD and TD). 2022-03-31 Christophe Lyon gcc/ * config/aarch64/aarch64.cc (aarch64_split_128bit_move): Handle DFP modes. (aarch64_mode_valid_for_sched_fusion_p): Likewise.

Re: [x86 PATCH take 2] Improved V1TI (and V2DI) mode equality/inequality.

2022-05-13 Thread Uros Bizjak via Gcc-patches
On Fri, May 13, 2022 at 11:46 AM Roger Sayle wrote: > > > Hi Uros, > Now that we're back in stage 1, here's the revised version of the patch I > submitted here: > https://gcc.gnu.org/pipermail/gcc-patches/2022-April/593434.html > incorporating all the suggested improvements from your review

Re: [AArch64] PR105162: emit barrier for __sync and __atomic builtins on CPUs without LSE

2022-05-13 Thread Wilco Dijkstra via Gcc-patches
Hi Sebastian, >> Note the patch still needs an appropriate commit message. > > Added the following ChangeLog entry to the commit message. > > * config/aarch64/aarch64-protos.h (atomic_ool_names): Increase >dimension > of str array. > * config/aarch64/aarch64.cc

Re: [PATCH] aarch64: Fix pac-ret with unusual dwarf in libgcc unwinder [PR104689]

2022-05-13 Thread Richard Sandiford via Gcc-patches
Szabolcs Nagy via Gcc-patches writes: > The RA_SIGN_STATE dwarf pseudo-register is normally only set using the > DW_CFA_AARCH64_negate_ra_state (== DW_CFA_window_save) operation which > toggles the return address signedness state (the default state is 0). > (It may be set by

Re: [PATCH] OpenMP, C++: Add template support for the has_device_addr clause.

2022-05-13 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 05:41:38PM +0200, Marcel Vollweiler wrote: > I removed all the NON_LVALUE_EXPR changes again. > > The new version of the patch was tested again on x86_64-linux with nvptx and > amdgcn offloading. All with no regressions. Ok, thanks. > gcc/cp/ChangeLog: > > * pt.cc

[COMMITTED] Move VREL values to their own enumerated type.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
When i first wrote the relation code, it seemed like reusing some commonly understood tree codes, like EQ_EXPR, NE_EXPR, LE_EXPR, etc made sense. Fore additional values like VREL_NONE and VREL_EMPTY  (VREL is Value RELation, fwiw)  I used nearby tree odes such that they formed a contiguous

[PATCH] Delay splitting addti3/subti3 until first split pass.

2022-05-13 Thread Michael Meissner via Gcc-patches
Add zero_extendditi2. Improve lxvr*x code generation. This pattern adds zero_extendditi2 so that if we are extending DImode that is in a GPR register to TImode in a vector register, the compiler can generate MTVSRDDD. In addition the patterns for generating lxvr{b,h,w,d}x were tuned to allow

[COMMITTED] MAINTAINERS: Add myself for write after approval

2022-05-13 Thread Surya Kumari Jangala via Gcc-patches
2022-05-13  Surya Kumari Jangala     * MAINTAINERS: Add myself to write after approval. diff --git a/MAINTAINERS b/MAINTAINERS index a1b84ac5646..8bca7a636b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -464,6 +464,7 @@ Daniel Jacobowitz  Andreas Jaeger  Harsha Jagasia  Fariborz Jahanian

Re: [AArch64] PR105162: emit barrier for __sync and __atomic builtins on CPUs without LSE

2022-05-13 Thread Richard Sandiford via Gcc-patches
"Pop, Sebastian via Gcc-patches" writes: >> Yes this looks good to me (still needs maintainer approval). > > Thanks again Wilco for your review. > >> One minor nitpick, >> a few of the tests check for __aarch64_cas2 - this should be >> __aarch64_cas2_sync. > > Fixed in the attached patch. > >>

[COMMITTED] Return a bool result for union, and add performance improvements.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
This does the same for union.. adds a return value indicating in the union call changes the range. It adds a routine for efficiency which performs a union between 2 single pairs, the most common case. Improvements are much nominal.. along the 0.1% range, but again, will be utilized by

[PATCH] Replace UNSPEC with RTL code for extendditi2.

2022-05-13 Thread Michael Meissner via Gcc-patches
Replace UNSPEC with RTL code for extendditi2. When I submitted my patch on March 12th for extendditi2, Segher wished I had removed the use of the UNSPEC for the vextsd2q instruction. This patch rewrites extendditi2_vector to use VEC_SELECT rather than UNSPEC. 2022-05-13 Michael Meissner

[COMMITTED] Add a return value to intersect and speed it up.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
This patch optimizes the multi-range intersect routine for irange. It now has a return value which indicates if the intersection changed the range or not. This can be used to short-circuit updating caches and avoiding additional overheads. It also provides/uses a new routine which returns

[PATCH] Optimize vec_splats of constant V2DI/V2DF vec_extract, PR target/99293

2022-05-13 Thread Michael Meissner via Gcc-patches
Optimize vec_splats of constant V2DI/V2DF vec_extract, PR target/99293. This patch has been previously posted, but it seemed to get lost.: | Date: Tue, 29 Mar 2022 23:25:31 -0400 | Subject: [PATCH, V2] Optimize vec_splats of constant vec_extract for V2DI/V2DF, PR target 99293. | Message-ID: |

[COMMITTED] Fix return value in ranger_cache::get_global_range

2022-05-13 Thread Andrew MacLeod via Gcc-patches
This fixes a buglet in get_global_range where it was not returning the correct value. It was returning whether the value was current, not whether it originally had a global value set as it was suppose to.  The current_p flag is returned as a parameter already. Bootstrapped on

[COMMITTED] PR tree-optimization/104547 - Add relation between op1 & op2 to lhs_opN_relation API.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
We use the relation between op1 and op2 to help fold a statement, but it was not provided to the lhs_op1_relation and lhs_op2_relation routines to determine if is also creates a relation between the LHS and either operand. This patch adds the relation to the API.  It also implelements the

c++: Local symbols do not get module manglings

2022-05-13 Thread Nathan Sidwell
Internal-linkage entity mangling is entirely implementation defined -- there's no ABI issue. Let's not mangle in any module attachment to them, it makes the symbols unnecessarily longer. nathan -- Nathan SidwellFrom 8dc7e0287223bfe48f16cfc10ee87cd5ff05f277 Mon Sep 17 00:00:00 2001 From: Nathan

Re: [PATCH] [i386] Fix ICE caused by wrong condition.

2022-05-13 Thread Uros Bizjak via Gcc-patches
On Fri, May 13, 2022 at 1:43 PM liuhongt wrote: > > When d->perm[i] == d->perm[i-1] + 1 and d->perm[i] == nelt, it's not > continuous. It should fail if there's more than 2 continuous areas. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Ok for trunk? > > > gcc/ChangeLog: > >

[COMMITTED] Export global ranges during the VRP block walk.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
VRP currently searches the ssa_name list for globals to exported after it  finishes running.  This change simply exports globals as they are calculated for the final time during the DOM walk. This avoid the occasional awkwardness of determined what ssa-names in the list are important, as well

Re: [PATCH v2] RISC-V: Implement C[LT]Z_DEFINED_VALUE_AT_ZERO

2022-05-13 Thread Jakub Jelinek via Gcc-patches
On Fri, May 13, 2022 at 09:53:46PM +0800, Kito Cheng wrote: > LGTM, thanks :) > > On Fri, May 13, 2022 at 4:43 PM Philipp Tomsich > wrote: > > I see you have recently worked on lib/target-support.exp: could you do > > the review of that part? Generally, target specific additions to

Re: [PATCH v2] RISC-V: Implement C[LT]Z_DEFINED_VALUE_AT_ZERO

2022-05-13 Thread Kito Cheng via Gcc-patches
Oh, one minor comment: > +/* { dg-additional-options "-march=rv64gc_zbb" { target { lp64 && > riscv64*-*-* } } } */ { target { rv64 } here > +/* { dg-additional-options "-march=rv32gc_zbb" { target { ilp32 && > riscv64*-*-* } } } */ and { target { rv32 } here That should make riscv32*-*-*

Re: [PATCH v2] RISC-V: Implement C[LT]Z_DEFINED_VALUE_AT_ZERO

2022-05-13 Thread Kito Cheng via Gcc-patches
LGTM, thanks :) On Fri, May 13, 2022 at 4:43 PM Philipp Tomsich wrote: > > +Jakub Jelinek > > Jakub, > > I see you have recently worked on lib/target-support.exp: could you do > the review of that part? > > Thanks, > Philipp. > > On Fri, 13 May 2022 at 00:36, Palmer Dabbelt wrote: > > > > On

[COMMITTED] Clear killing defs when resetting the path in, path_oracle.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
When we clear the path in the relation path oracle, we should also reset the killing defs bitmap. Bootstraps on build-x86_64-pc-linux with no regressions.  Pushed. Andrew commit 602a3161f425ee3fe325413eeab9792e8e07a2ff Author: Andrew MacLeod Date: Wed Feb 23 12:25:20 2022 -0500 Clear

[COMMITTED] Make range_from_dom more effective.

2022-05-13 Thread Andrew MacLeod via Gcc-patches
This patch enhances  how ranger's cache picks up ranges from dominators. The previous version was pretty basic, simply walking the DOM tree back until it ran into a "complicated" situation.. (for instance when the dominator has multiple successors)  then falling back to the non-dominator

[PATCH 5/5] xtensa: Improve bswap[sd]i2 insn patterns

2022-05-13 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch makes bswap[sd]i2 better register allocation, and reconstructs bswapsi2 in order to take advantage of GIMPLE manual byte-swapping recognition. gcc/ChangeLog: * gcc/config/xtensa/xtensa.md (bswapsi2): New expansion pattern. (bswapsi2_internal): Revise the template and

[PATCH 4/5] xtensa: Add setmemsi insn pattern

2022-05-13 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch introduces setmemsi insn pattern of two kinds, unrolled loop and small loop, for fixed small length and constant initialization value. gcc/ChangeLog: * gcc/config/xtensa/xtensa-protos.h (xtensa_expand_block_set_unrolled_loop,

[PATCH 3/5] xtensa: Fix instruction counting regarding block move expansion

2022-05-13 Thread Takayuki 'January June' Suwa via Gcc-patches
This patch makes counting the number of instructions of the remainder (modulo 4) part more accurate. gcc/ChangeLog: * gcc/config/xtensa/xtensa.cc (xtensa_expand_block_move): Make instruction counting more accurate, and simplify emitting insns. --- gcc/config/xtensa/xtensa.cc |

[PATCH 2/5] xtensa: Make use of IN_RANGE macro where appropriate

2022-05-13 Thread Takayuki 'January June' Suwa via Gcc-patches
No functional changes. gcc/ChangeLog: * gcc/config/xtensa/constraints.md (M, O): Use the macro. * gcc/config/xtensa/predicates.md (addsubx_operand, extui_fldsz_operand, sext_fldsz_operand): Ditto. * gcc/config/xtensa/xtensa.cc (xtensa_simm8, xtensa_simm8x256,

[PATCH 1/5] xtensa: Simplify EXTUI instruction maskimm validations

2022-05-13 Thread Takayuki 'January June' Suwa via Gcc-patches
No functional changes. gcc/ChangeLog: * gcc/config/xtensa/predicates.md (extui_fldsz_operand): Simplify. * gcc/config/xtensa/xtensa.cc (xtensa_mask_immediate, print_operand): Ditto. --- gcc/config/xtensa/predicates.md | 2 +- gcc/config/xtensa/xtensa.cc | 24

Re: [PATCH v4, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-05-13 Thread Segher Boessenkool
Hi! On Fri, May 13, 2022 at 10:40:22AM +0800, Kewen.Lin wrote: > on 2022/5/13 09:07, HAO CHEN GUI wrote: > > * config/rs6000/rs6000.md (extenddi_ca_minus_one): Define. > > Nit: (*extenddi_ca_minus_one): New define_insn_and_split. Or just "New." even :-) It's boring, yes, but boring is

Re: [PATCH v4, rs6000] Add a combine pattern for CA minus one [PR95737]

2022-05-13 Thread Segher Boessenkool
Hi! On Fri, May 13, 2022 at 09:07:54AM +0800, HAO CHEN GUI wrote: >This patch adds a combine pattern for "CA minus one". As CA only has two > values (0 or 1), we could convert following pattern > (sign_extend:DI (plus:SI (reg:SI 98 ca) > (const_int -1

Re: libgompd: ADD OMPD support and global ICV functions

2022-05-13 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 07:40:41AM +0200, Mohamed Atef wrote: > --- a/libgomp/env.c > +++ b/libgomp/env.c > @@ -33,6 +33,7 @@ > #ifndef LIBGOMP_OFFLOADED_ONLY > #include "libgomp_f.h" > #include "oacc-int.h" > +#include "ompd-support.h" > #include > #include > #include > @@ -89,6 +90,7 @@

Re: [PATCH V2] powerpc: properly check for feenableexcept() on FreeBSD

2022-05-13 Thread Segher Boessenkool
On Fri, May 13, 2022 at 12:34:05PM +0200, Piotr Kubaj wrote: > On 22-05-13 10:59:59, Kewen.Lin wrote: > > on 2022/5/13 04:16, Segher Boessenkool wrote: > > > On Tue, May 03, 2022 at 12:21:12PM +0200, pku...@freebsd.org wrote: > > >> FreeBSD/powerpc* has feenableexcept() defined in fenv.h header. >

[committed 12/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define _GTHREAD_USE_MUTEX_TIMEDLOCK macro. * include/bits/std_mutex.h (mutex, lock_guard): Use @since and @headerfile. *

[committed 09/12] libstdc++: Improve doxygen docs for algorithms and more

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/ostream_insert.h: Mark helper functions as undocumented by Doxygen. * include/bits/stl_algo.h: Use markdown for formatting and mark helper functions as undocumented.

[committed 11/12] libstdc++: Improve doxygen docs for some of

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define _GLIBCXX23_CONSTEXPR macro. * include/backward/auto_ptr.h (auto_ptr): Use @deprecated. * include/bits/unique_ptr.h (default_delete): Use

[committed 06/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/atomic: Suppress doxygen docs for implementation details. * include/bits/atomic_base.h: Likewise. * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping so

[committed 10/12] libstdc++: Improve doxygen docs for and

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/std_thread.h (thread, thread::id): Improve doxygen docs. * include/std/future: Likewise. * include/std/thread (jthread): Likewise. ---

[committed 05/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/std/system_error: Improve doxygen comments. --- libstdc++-v3/include/std/system_error | 136 -- 1 file changed, 107 insertions(+), 29 deletions(-) diff --git

[committed 08/12] libstdc++: Improve doxygen docs for std::allocator

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base so that Doxygen shows the right base-class for std::allocator. * include/bits/alloc_traits.h: Improve doxygen docs. *

[committed 07/12] libstdc++: Improve doxygen docs for

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Add @headerfile and @since tags. Improve grouping of non-member functions via @relates tags. Mark the std::pair base class of std::sub_match as undocumented, so that the docs don't show all the related non-member functions are part of the

[committed 02/12] libstdc++: Fix typo in doxygen @headerfile command

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/mofunc_impl.h: Fix doxygen command. --- libstdc++-v3/include/bits/mofunc_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/mofunc_impl.h

[committed 04/12] libstdc++: Improve doxygen docs for std::pointer_traits

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/ptr_traits.h: Add some doxygen comments. --- libstdc++-v3/include/bits/ptr_traits.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libstdc++-v3/include/bits/ptr_traits.h

[committed 03/12] libstdc++: Add macros for the inline namespace std::_V2

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Unlike the rest of the series, this isn't suitable for backporting because it changes the ABI for the gnu-versioned-namespace build. That's fine for GCC 13, but not OK to change within a release branch, e.g. between 12.1 and 12.2. If we want to backport

[committed 01/12] libstdc++: Disable Doxygen GROUP_NESTED_COMPOUNDS config option

2022-05-13 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. -- >8 -- Before Doxygen version 1.9.2 this option is broken (see https://github.com/doxygen/doxygen/issues/8638 for more details) and classes are not added to the correct groups by @ingroup and @addtogroup. Also remove the obsolete CLASS_DIAGRAMS

libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option (was: Proposal to remove '--with-cuda-driver')

2022-05-13 Thread Thomas Schwinge
Hi! On 2022-04-29T15:48:03+0200, I wrote: > On 2022-04-06T11:57:57+0200, Tom de Vries wrote: >> On 4/5/22 17:14, Thomas Schwinge wrote: >>> Regarding [...] >>> Now, consider doing a GCC/nvptx offloading build with >>> '--with-cuda-driver' [...] >> Thanks for reminding me, I forgot about this

Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain

2022-05-13 Thread Christoph Müllner via Gcc-patches
On Fri, May 13, 2022 at 12:58 PM Florian Weimer wrote: > > * Christoph Müllner via Binutils: > > > I'd like to add two points to this topic and raise two questions. > > > > 1) Accepting vendor extensions = avoidance of fragmentation > > > > RISC-V implementors are actively encouraged to implement

libgomp nvptx plugin: Only consider '--with-cuda-driver=[...]' when applicable

2022-05-13 Thread Thomas Schwinge
Hi! Another small one: On 2022-05-12T14:39:14+0200, I wrote: > Again, no change in behavior, just refactoring, making things more > explicit, in preparation for other changes. > "Refactor '-ldl' handling for libgomp proper and plugins"? > --- a/libgomp/plugin/Makefrag.am > +++

[PATCH] [i386] Fix ICE caused by wrong condition.

2022-05-13 Thread liuhongt via Gcc-patches
When d->perm[i] == d->perm[i-1] + 1 and d->perm[i] == nelt, it's not continuous. It should fail if there's more than 2 continuous areas. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/ChangeLog: PR target/105587 * config/i386/i386-expand.cc

Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain

2022-05-13 Thread Philipp Tomsich
On Fri, 13 May 2022 at 12:58, Florian Weimer wrote: > > * Christoph Müllner via Binutils: > > > I'd like to add two points to this topic and raise two questions. > > > > 1) Accepting vendor extensions = avoidance of fragmentation > > > > RISC-V implementors are actively encouraged to implement

Re: [PATCH] [Middle-end] Enhance final_value_replacement_loop to handle bitwise induction.

2022-05-13 Thread Richard Biener via Gcc-patches
On Fri, May 13, 2022 at 5:37 AM Hongtao Liu wrote: > > On Wed, May 11, 2022 at 4:45 PM Richard Biener via Gcc-patches > wrote: > > > > On Mon, May 9, 2022 at 7:19 AM liuhongt wrote: > > > > > > This patch will enable below optimization: > > > > > > { > > > - int bit; > > > - long long

Re: Supporting RISC-V Vendor Extensions in the GNU Toolchain

2022-05-13 Thread Florian Weimer via Gcc-patches
* Christoph Müllner via Binutils: > I'd like to add two points to this topic and raise two questions. > > 1) Accepting vendor extensions = avoidance of fragmentation > > RISC-V implementors are actively encouraged to implement their > own ISA extensions. To avoid fragmentation in the SW ecosystem

Re: [PATCH] Avoid visiting newly-created blocks in harden-conditionals

2022-05-13 Thread Alexandre Oliva via Gcc-patches
On May 13, 2022, Richard Biener wrote: > Yeah, I'm not sure who clears that bit - grepping shows no user > besides the setter... *nod*, that's what I'd found out myself. Oh well... >> Though I suppose it might be useful to document and enforce the property >> that a newly-created block takes

  1   2   >