RE: [1/3 PATCH]middle-end vect: Simplify and extend the complex numbers validation routines.

2022-01-10 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Monday, January 10, 2022 1:00 PM > To: Tamar Christina > Cc: GCC Patches ; nd ; Richard > Guenther > Subject: Re: [1/3 PATCH]middle-end vect: Simplify and extend the complex > numbers validation routines. > > On Fri, Dec 17, 2021 at

Re: Ping: [PATCH] rs6000: Add split pattern to replace

2022-01-10 Thread Xionghu Luo via Gcc-patches
On 2022/1/11 06:55, David Edelsohn wrote: >>> +(define_insn_and_split "sldoi_to_mov_" > It would be more consistent with the naming convention to use > "sldoi_to_mov" without the final "_". OK, thanks. > >>> + [(set (match_operand:VM 0 "altivec_register_operand") >>> + (unspec:VM

Re: [PATCH] testsuite: Fix regression on m32 by r12-6087 [PR103820]

2022-01-10 Thread Richard Biener via Gcc-patches
On Tue, Jan 11, 2022 at 6:27 AM Xionghu Luo wrote: > > r12-6087 will avoid move cold bb out of hot loop, while the original > intent of this testcase is to hoist divides out of loop and CSE them to > only one divide. So increase the loop count to turn the cold bb to hot > bb again. Then the 3

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

2022-01-10 Thread Richard Biener via Gcc-patches
On Mon, 10 Jan 2022, Andre Vieira (lists) wrote: > Hi, > > I don't think I ever ended up posting the rebased version on top of the > epilogue mode patch. So here it is, I think I had a conditional OK if I split > the epilogue mode patch, but just want to double check this is OK for trunk? Yes,

RE: [3/3 PATCH][AArch32] use canonical ordering for complex mul, fma and fms

2022-01-10 Thread Tamar Christina via Gcc-patches
ping > -Original Message- > From: Tamar Christina > Sent: Monday, December 20, 2021 4:22 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: RE: [3/3 PATCH][AArch32] use canonical ordering for complex

RE: [2/3 PATCH]AArch64 use canonical ordering for complex mul, fma and fms

2022-01-10 Thread Tamar Christina via Gcc-patches
ping > -Original Message- > From: Tamar Christina > Sent: Monday, December 20, 2021 4:21 PM > To: Richard Sandiford > Cc: gcc-patches@gcc.gnu.org; nd ; Richard Earnshaw > ; Marcus Shawcroft > ; Kyrylo Tkachov > Subject: RE: [2/3 PATCH]AArch64 use canonical ordering for complex > mul,

RE: [PATCH][AArch32]: correct usdot-product RTL patterns.

2022-01-10 Thread Tamar Christina via Gcc-patches
ping > -Original Message- > From: Tamar Christina > Sent: Tuesday, December 21, 2021 12:32 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: [PATCH][AArch32]: correct usdot-product RTL patterns. > > Hi

RE: [AArch32]: correct dot-product RTL patterns.

2022-01-10 Thread Tamar Christina via Gcc-patches
ping > -Original Message- > From: Tamar Christina > Sent: Tuesday, December 21, 2021 12:31 PM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Ramana Radhakrishnan > ; Richard Earnshaw > ; ni...@redhat.com; Kyrylo Tkachov > > Subject: [AArch32]: correct dot-product RTL patterns. > > Hi All, >

Re: [PATCH] PR tree-optimization/103821 - Prevent exponential range calculations.

2022-01-10 Thread Richard Biener via Gcc-patches
On Tue, Jan 11, 2022 at 12:28 AM Andrew MacLeod via Gcc-patches wrote: > > This test case demonstrates an unnoticed exponential situation in range-ops. > > We end up unrolling the loop, and the pattern of code creates a set of > cascading multiplies for which we can precisely evaluate them with

[PATCH] testsuite: Fix regression on m32 by r12-6087 [PR103820]

2022-01-10 Thread Xionghu Luo via Gcc-patches
r12-6087 will avoid move cold bb out of hot loop, while the original intent of this testcase is to hoist divides out of loop and CSE them to only one divide. So increase the loop count to turn the cold bb to hot bb again. Then the 3 divides could be rewritten with same reciptmp. Tested pass on

Re: [PATCH 5/6] ira: Consider modelling caller-save allocations as loop spills

2022-01-10 Thread Hans-Peter Nilsson via Gcc-patches
> From: Richard Sandiford via Gcc-patches > Date: Thu, 6 Jan 2022 15:48:01 +0100 > If an allocno A in an inner loop L spans a call, a parent allocno AP > can choose to handle a call-clobbered/caller-saved hard register R > in one of two ways: > > (1) save R before each call in L and restore R

Re: [PATCH] rs6000: Remove useless code related to -mno-power10

2022-01-10 Thread Kewen.Lin via Gcc-patches
on 2022/1/11 上午8:26, David Edelsohn wrote: > On Wed, Dec 29, 2021 at 4:37 AM Kewen.Lin wrote: >> >> Hi, >> >> Option -mpower10 was made as "WarnRemoved" since commit r11-2318, >> so -mno-power10 doesn't take effect any more. This patch is to >> remove one line useless code which still respects

Re: [PATCH] c++: Reject in constant evaluation address comparisons of start of one var and end of another [PR89074]

2022-01-10 Thread Andrew Pinski via Gcc-patches
On Mon, Jan 10, 2022 at 6:11 AM Richard Biener via Gcc-patches wrote: > > On Thu, Jan 6, 2022 at 10:25 AM Jakub Jelinek via Gcc-patches > wrote: > > > > Hi! > > > > The following testcase used to be incorrectly accepted. The match.pd > > optimization that uses address_compare punts on folding

Re: Ping^1 [PATCH, rs6000] new split pattern for TI to V1TI move [PR103124]

2022-01-10 Thread HAO CHEN GUI via Gcc-patches
Segher and David, Thanks for your explanation. I got it. The "\m" itself is a constraint escape. Gui Haochen On 11/1/2022 上午 9:12, Segher Boessenkool wrote: > On Mon, Jan 10, 2022 at 06:09:01PM -0500, David Edelsohn wrote: >> On Sun, Jan 9, 2022 at 10:16 PM HAO CHEN GUI wrote: +/* {

Re: [PATCH 0/2]: C N2653 char8_t implementation

2022-01-10 Thread Joseph Myers
Please repost these patches after GCC 12 branches (updated as appropriate depending on whether the feature is accepted at the two-week Jan/Feb WG14 meeting, which doesn't yet have an agenda), since we're currently stabilizing for the release and so not considering new features. -- Joseph S.

Re: Ping: [PATCH] rs6000: powerpc suboptimal boolean test of contiguous bits [PR102239]

2022-01-10 Thread David Edelsohn via Gcc-patches
On Mon, Jan 10, 2022 at 12:37 AM Xionghu Luo wrote: > > Ping, thanks. > > > On 2021/12/13 13:16, Xionghu Luo wrote: > > Add specialized version to combine two instructions from > > > > 9: {r123:CC=cmp(r124:DI&0x6,0);clobber scratch;} > >REG_DEAD r124:DI > > 10:

Re: [PATCH] [i386] Remove register restriction on operands for andnot insn

2022-01-10 Thread Hongtao Liu via Gcc-patches
On Mon, Jan 10, 2022 at 3:21 PM Jiang, Haochen wrote: > > Hi Hongtao, > > I have changed that message in this patch. Ok for trunk? Ok. > > Thx, > Haochen > > -Original Message- > From: Hongtao Liu > Sent: Monday, January 10, 2022 3:25 PM > To: Jiang, Haochen > Cc: GCC Patches ; Liu,

Re: Ping^1 [PATCH, rs6000] new split pattern for TI to V1TI move [PR103124]

2022-01-10 Thread Segher Boessenkool
On Mon, Jan 10, 2022 at 06:09:01PM -0500, David Edelsohn wrote: > On Sun, Jan 9, 2022 at 10:16 PM HAO CHEN GUI wrote: > > > +/* { dg-final { scan-assembler-not "\mmr\M" } } */ > > Segher probably would prefer {\mmr\M} . Because that one works, and the one with double quotes doesn't, yes :-) It

Re: [PATCH v5 2/4] tree-object-size: Handle function parameters

2022-01-10 Thread Siddhesh Poyarekar
On 10/01/2022 16:20, Jakub Jelinek wrote: On Sat, Dec 18, 2021 at 06:05:09PM +0530, Siddhesh Poyarekar wrote: @@ -1440,6 +1441,53 @@ cond_expr_object_size (struct object_size_info *osi, tree var, gimple *stmt) return reexamine; } +/* Find size of an object passed as a parameter to the

Re: [PATCH] rs6000: Remove useless code related to -mno-power10

2022-01-10 Thread David Edelsohn via Gcc-patches
On Wed, Dec 29, 2021 at 4:37 AM Kewen.Lin wrote: > > Hi, > > Option -mpower10 was made as "WarnRemoved" since commit r11-2318, > so -mno-power10 doesn't take effect any more. This patch is to > remove one line useless code which still respects it. > > Bootstrapped and regtested on

[Patch][V3][Patch 2/2]Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables.

2022-01-10 Thread Qing Zhao via Gcc-patches
Hi, Richard, This is the second patch, which is mainly the change for "Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables”. Please see the detailed description below for the problem and solution of this patch. This patch has been bootstrapped and regressing tested

[Patch][V3][Patch 1/2]Change the 3rd parameter of function .DEFERRED_INIT from IS_VLA to decl name

2022-01-10 Thread Qing Zhao via Gcc-patches
Hi, Richard, I splited the previous patch for “Enable -Wuninitialized + -ftrivial-auto-var-init for address taken variables” into two separate patches. This is the first one This first patch is to fix (or work around ) PR103720, therefore it’s an important change, and need to be go into

Re: [PATCH v5 1/4] tree-object-size: Support dynamic sizes in conditions

2022-01-10 Thread Siddhesh Poyarekar
On 10/01/2022 16:07, Jakub Jelinek wrote: You test the above with both possibilities. + if (test_builtin_calloc_condphi (128, 1, 0) == 128) +FAIL (); But not this one, why? Also, it would be better to have a != ... test rather than ==, if it is the VLA, then 128 * sizeof (struct { int

[PATCH] PR tree-optimization/103821 - Prevent exponential range calculations.

2022-01-10 Thread Andrew MacLeod via Gcc-patches
This test case demonstrates an unnoticed exponential situation in range-ops. We end up unrolling the  loop, and the pattern of code creates a set of cascading multiplies for which we can precisely evaluate them with sub-ranges. For instance, we calculated : _38 = int [8192, 8192][24576,

Re: Ping^1 [PATCH, rs6000] new split pattern for TI to V1TI move [PR103124]

2022-01-10 Thread David Edelsohn via Gcc-patches
On Sun, Jan 9, 2022 at 10:16 PM HAO CHEN GUI wrote: > > Hi, > > Gentle ping this: > https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587051.html > > Thanks > > On 17/12/2021 上午 9:55, HAO CHEN GUI wrote: > > Hi, > >This patch defines a new split pattern for TI to V1TI move.

Re: Ping: [PATCH] rs6000: Add split pattern to replace

2022-01-10 Thread David Edelsohn via Gcc-patches
On Mon, Jan 10, 2022 at 12:04 AM Xionghu Luo wrote: > > Gentle ping, thanks. > > > On 2021/12/29 09:27, Xionghu Luo wrote: > > 7: r120:V4SI=const_vector > > 8: r121:V4SI=unspec[r120:V4SI,r120:V4SI,0xc] 260 > > > > with r121:v4SI = r120:V4SI when r120 is a vector with same element. > > > >

[power-ieee128, committed] Enable conversion selection via environment variable

2022-01-10 Thread Thomas Koenig via Gcc-patches
Hello world, I have just pushed the attched patch to the branch. With this patch, the program tkoenig@gcc-fortran:~/Tst$ cat write_env.f90 program main real(kind=16) :: x character (len=30) :: conv x = 1/3._16 open

Re: [PATCH] Add VxWorks fixincludes hack, kernel math.h FP_ constants

2022-01-10 Thread Olivier Hainque via Gcc-patches
Hi Rasmus, > On 17 Dec 2021, at 21:47, Olivier Hainque wrote: > >>> Don't you also need to add an fpclassify() macro? There's a >> >> We have a separate "fix" for a set of such functions indeed. > I probably can merge the two, actually. I'll do that. We have had pretty good results with the

[PATCH] Add VxWorks fixincludes hack, #include sysLib.h in time.h

2022-01-10 Thread Olivier Hainque via Gcc-patches
Hello, This change instates a new vxworks fixincludes hack to make sure there is a visible prototype of sysClkRateGet() when CLOCKS_PER_SEC is #defined to that in time.h for VxWorks < 7 (fixincludes not run otherwise). The function is provided by sysLib.h, so we arrange to #include this one at a

PING 4 [PATCH v2 1/2] add -Wuse-after-free

2022-01-10 Thread Martin Sebor via Gcc-patches
Last ping before stage 3 ends: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585816.html On 1/4/22 11:01, Martin Sebor wrote: Ping.  (CC'ing Jason as requested.) https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585816.html On 12/13/21 9:48 AM, Martin Sebor wrote: Ping.

PING [PATCH] Use enclosing object size if it's smaller than member [PR 101475]

2022-01-10 Thread Martin Sebor via Gcc-patches
Ping (CC'ing Jason as requested): https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587033.html On 1/4/22 10:28, Martin Sebor wrote: On 12/20/21 12:29 PM, Jeff Law wrote: On 12/16/2021 12:56 PM, Martin Sebor via Gcc-patches wrote: Enabling vectorization at -O2 caused quite a few tests

PING 4 [PATCH v2 2/2] add -Wdangling-pointer [PR #63272]

2022-01-10 Thread Martin Sebor via Gcc-patches
Last ping for this stage 1 feature before stage 3 ends: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 1/4/22 11:02, Martin Sebor wrote: Ping: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585819.html On 12/13/21 9:50 AM, Martin Sebor wrote: Ping.  This

Re: [PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-10 Thread Jonathan Wakely via Gcc-patches
On Mon, 10 Jan 2022 at 21:24, Tom Honermann via Libstdc++ wrote: > > On 1/10/22 8:23 AM, Jonathan Wakely wrote: > > > > > > On Sat, 8 Jan 2022 at 00:42, Tom Honermann via Libstdc++ > > mailto:libstdc%2b...@gcc.gnu.org>> wrote: > > > > This patch completes implementation of the C++20 proposal

PING^2 (C/C++): Re: [PATCH 6/6] Add __attribute__ ((tainted))

2022-01-10 Thread David Malcolm via Gcc-patches
On Thu, 2022-01-06 at 09:08 -0500, David Malcolm wrote: > On Sat, 2021-11-13 at 15:37 -0500, David Malcolm wrote: > > This patch adds a new __attribute__ ((tainted)) to the C/C++ > > frontends. > > Ping for GCC C/C++ mantainers for review of the C/C++ FE parts of this > patch (attribute

Re: [PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-10 Thread Tom Honermann via Gcc-patches
On 1/10/22 8:23 AM, Jonathan Wakely wrote: On Sat, 8 Jan 2022 at 00:42, Tom Honermann via Libstdc++ mailto:libstdc%2b...@gcc.gnu.org>> wrote: This patch completes implementation of the C++20 proposal P0482R6 [1] by adding declarations of std::c8rtomb() and std::mbrtoc8() in

Re: [PATCH] Improve sequence logic in cxx_init_decl_processing

2022-01-10 Thread Olivier Hainque via Gcc-patches
> On 10 Jan 2022, at 20:02, Jason Merrill wrote: > >> The attached patch just moves the reset above the test. > > OK. Great, thanks Jason! >> 2021-12-30 Olivier Hainque >> gcc/ >> * cp/decl.c (cxx_init_decl_processing): Move code possibly >> altering flag_weak before code

[PATCH] i386: Introduce V2QImode vector compares [PR103861]

2022-01-10 Thread Uros Bizjak via Gcc-patches
Add V2QImode vector compares with SSE registers. 2022-01-10 Uroš Bizjak gcc/ChangeLog: PR target/103861 * config/i386/i386-expand.c (ix86_expand_int_sse_cmp): Handle V2QImode. * config/i386/mmx.md (3): Use VI1_16_32 mode iterator. (*eq3): Ditto. (*gt3): Ditto.

[PATCH] tree-optimization/103948 - detect vector vec_cmp in expand_vector_condition

2022-01-10 Thread Uros Bizjak via Gcc-patches
Currently, expand_vector_condition detects only vcondMN and vconduMN named RTX patterns. Teach it to also consider vec_cmpMN and vec_cmpuMN RTX patterns when all ones vector is returned for true and all zeros vector is returned for false. Patch by Richard, I tested it on the patched x86 target

Re: [PATCH] c++: constexpr base-to-derived conversion with offset 0 [PR103879]

2022-01-10 Thread Jason Merrill via Gcc-patches
On 1/4/22 11:54, Patrick Palka wrote: r12-136 made us canonicalize an object/offset pair with negative offset into one with a nonnegative offset, by iteratively absorbing the innermost component into the offset and stopping as soon as the offset becomes nonnegative. This patch strengthens this

Re: [PATCH] c++: "more constrained" vs staticness of memfn [PR103783]

2022-01-10 Thread Jason Merrill via Gcc-patches
On 1/4/22 13:01, Patrick Palka wrote: Here we're rejecting the calls to g1 and g2 as ambiguous even though one overload is more constrained than the other (and otherwise equivalent), because the implicit 'this' parameter of the non-static overload causes cand_parms_match to think the function

Re: [PATCH] Improve sequence logic in cxx_init_decl_processing

2022-01-10 Thread Jason Merrill via Gcc-patches
On 1/6/22 03:26, Olivier Hainque wrote: Hello, commit aa2c978400f3b3ca6e9f2d18598a379589e77ba0, introduced per https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545552.html makes references to __cxa_pure_virtual weak and this is causing issues on some VxWorks configurations, where weak

Re: [PATCH] c++: Ensure some more that immediate functions aren't gimplified [PR103912]

2022-01-10 Thread Jason Merrill via Gcc-patches
On 1/6/22 03:48, Jakub Jelinek wrote: Hi! Immediate functions should never be emitted into assembly, the FE doesn't genericize them and does various things to ensure they aren't gimplified. But the following testcase ICEs anyway due to that, because the consteval function returns a lambda, and

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

2022-01-10 Thread Andre Vieira (lists) via Gcc-patches
Hi, I don't think I ever ended up posting the rebased version on top of the epilogue mode patch. So here it is, I think I had a conditional OK if I split the epilogue mode patch, but just want to double check this is OK for trunk? gcc/ChangeLog:     * tree-vect-loop.c

[v2 COMMITTED] rs6000: Add Power10 optimization for _mm_blendv*

2022-01-10 Thread Paul A. Clarke via Gcc-patches
This is the patch that was committed. Thanks for the review! --- Power10 ISA added `xxblendv*` instructions which are realized in the `vec_blendv` instrinsic. Use `vec_blendv` for `_mm_blendv_epi8`, `_mm_blendv_ps`, and `_mm_blendv_pd` compatibility intrinsics, when `_ARCH_PWR10`. Update

[PATCH] Fortran: make IEEE_VALUE produce signaling NaNs

2022-01-10 Thread FX via Gcc-patches
Hi, Second part of a three-patch series to fix PR 82207 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82207), making gfortran handle signaling NaNs. This part fixes the library code implementing IEEE_VALUE. To do so, I switched that part of library code from Fortran to C, because in C we have

Re: [PATCH] Register --sysroot in the driver switches table

2022-01-10 Thread Olivier Hainque via Gcc-patches
> On 10 Jan 2022, at 09:00, Richard Biener wrote: > > On Wed, Jan 5, 2022 at 6:58 PM Olivier Hainque via Gcc-patches > wrote: >> >> >> >>> On 5 Jan 2022, at 10:26, Olivier Hainque wrote: >>> >>> The change should also set "validated" true >>> when requesting to save --sysroot. >> >>

[PING] [PATCH] C, C++, Fortran, OpenMP: Add 'has_device_addr' clause to 'target' construct

2022-01-10 Thread Marcel Vollweiler
Hi, I'd like to ping the patch for the OpenMP 'has_device_addr' clause on the target construct: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585361.html Thanks Marcel - Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München;

[PATCH] Check sorting of MAINTAINERS

2022-01-10 Thread Martin Liška
The script is capable of checking if MAINTAINER names are sorted alphabetically. I used English locales and the scripts emits: Are you fine with the suggested changes? Cheers, Martin $ contrib/check-MAINTAINERS.py MAINTAINERS Global Reviewers are fine! Wrong order for Write After Approval:

[PATCH][pushed] Partially sort MAINTAINERS.

2022-01-10 Thread Martin Liška
There are more complicated names that I'm going to address in a different patch. Cheers, Martin ChangeLog: * MAINTAINERS: Fix obvious issues with sorting. --- MAINTAINERS | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git

Re: [PATCH] x86_64: Ignore zero width bitfields in ABI and issue -Wpsabi warning about C zero width bitfield ABI changes [PR102024]

2022-01-10 Thread Uros Bizjak via Gcc-patches
On Mon, Jan 10, 2022 at 3:23 PM Michael Matz wrote: > > Hello, > > On Mon, 20 Dec 2021, Uros Bizjak wrote: > > > > Thanks. > > > I see nobody commented on Micha's post there. > > > > > > Here is a patch that implements it in GCC, i.e. C++ doesn't change ABI > > > (at least > > > not from the

Re: PING^2: [PATCH] Add --enable-first-stage-cross configure option

2022-01-10 Thread Jonathan Wakely via Gcc-patches
On 10/01/22 00:26 +0300, Serge Belyshev wrote: Ping: [PATCH] Add --enable-first-stage-cross configure option https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575318.html Add --enable-first-stage-cross configure option Build static-only, C-only compiler that is sufficient to cross compile

Re: [PATCH, OpenMP, C/C++] Fix PR103705

2022-01-10 Thread Chung-Lin Tang
Forgot to attach the patch, here it is :P On 2022/1/10 10:59 PM, Chung-Lin Tang wrote: For cases like:   #pragma omp target update from(s[0].a[0:1]) The handling in [c_]finish_omp_clauses was only peeling off ARRAY_REF once before the loop handling COMPONENT_REF, and snagged when the base of

[PATCH, OpenMP, C/C++] Fix PR103705

2022-01-10 Thread Chung-Lin Tang
For cases like: #pragma omp target update from(s[0].a[0:1]) The handling in [c_]finish_omp_clauses was only peeling off ARRAY_REF once before the loop handling COMPONENT_REF, and snagged when the base of the component_ref is an array access. This adds the handling there for both C and C++

Re: [PATCH 4/6] ira: Try to avoid propagating conflicts

2022-01-10 Thread Richard Sandiford via Gcc-patches
Hi Vlad, Vladimir Makarov writes: > On 2022-01-06 09:47, Richard Sandiford wrote: >> Suppose that: >> >> - an inner loop L contains an allocno A >> - L clobbers hard register R while A is live >> - A's parent allocno is AP >> >> Previously, propagate_allocno_info would propagate conflict sets up

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-01-10 Thread Richard Biener via Gcc-patches
On Mon, 10 Jan 2022, Andre Vieira (lists) wrote: > Yeah seems I forgot to send the latest version, my bad. > > Bootstrapped on aarch64-none-linux. > > OK for trunk? The match.pd part looks OK to me. Thanks, Richard. > gcc/ChangeLog: > >     * config/aarch64/aarch64.md (ftrunc2): New >

Re: [PATCH] x86_64: Ignore zero width bitfields in ABI and issue -Wpsabi warning about C zero width bitfield ABI changes [PR102024]

2022-01-10 Thread Michael Matz via Gcc-patches
Hello, On Mon, 20 Dec 2021, Uros Bizjak wrote: > > Thanks. > > I see nobody commented on Micha's post there. > > > > Here is a patch that implements it in GCC, i.e. C++ doesn't change ABI (at > > least > > not from the past few releases) and C does for GCC: > > > > 2021-12-15 Jakub Jelinek >

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

2022-01-10 Thread Richard Sandiford via Gcc-patches
Robin Dapp writes: > Hi Richard, > >> I think it would be better to fold this into the existing documentation >> a bit more: > [..] > > done. > > Fixed the remaining nits in the attached v5. > > Bootstrap and regtest are good on s390x, Power9 and i386. > > Regards > Robin > > -- > >

Re: [PATCH] c++: Reject in constant evaluation address comparisons of start of one var and end of another [PR89074]

2022-01-10 Thread Richard Biener via Gcc-patches
On Thu, Jan 6, 2022 at 10:25 AM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > The following testcase used to be incorrectly accepted. The match.pd > optimization that uses address_compare punts on folding comparison > of start of one object and end of another one only when those addresses >

Re: [AArch64] Enable generation of FRINTNZ instructions

2022-01-10 Thread Andre Vieira (lists) via Gcc-patches
Yeah seems I forgot to send the latest version, my bad. Bootstrapped on aarch64-none-linux. OK for trunk? gcc/ChangeLog:     * config/aarch64/aarch64.md (ftrunc2): New pattern.     * config/aarch64/iterators.md (FRINTNZ): New iterator.     (frintnz_mode): New int attribute.  

Re: [PATCH 6/6] ira: Handle "soft" conflicts between cap and non-cap allocnos

2022-01-10 Thread Vladimir Makarov via Gcc-patches
On 2022-01-06 09:48, Richard Sandiford wrote: This patch looks for allocno conflicts of the following form: - One allocno (X) is a cap allocno for some non-cap allocno X2. - X2 belongs to some loop L2. - The other allocno (Y) is a non-cap allocno. - Y is an ancestor of some allocno Y2 in L2.

Re: [PATCH 5/6] ira: Consider modelling caller-save allocations as loop spills

2022-01-10 Thread Vladimir Makarov via Gcc-patches
On 2022-01-06 09:48, Richard Sandiford wrote: If an allocno A in an inner loop L spans a call, a parent allocno AP can choose to handle a call-clobbered/caller-saved hard register R in one of two ways: (1) save R before each call in L and restore R after each call (2) spill R to memory

Re: [PATCH 4/6] ira: Try to avoid propagating conflicts

2022-01-10 Thread Vladimir Makarov via Gcc-patches
On 2022-01-06 09:47, Richard Sandiford wrote: Suppose that: - an inner loop L contains an allocno A - L clobbers hard register R while A is live - A's parent allocno is AP Previously, propagate_allocno_info would propagate conflict sets up the loop tree, so that the conflict between A and R

Re: [PATCH] libstdc++, v2: Add %j, %U, %w, %W time_get support, fix %y, %Y, %C, %p [PR77760]

2022-01-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 17 Dec 2021 at 07:19, Jakub Jelinek via Libstdc++ < libstd...@gcc.gnu.org> wrote: > On Thu, Dec 16, 2021 at 03:46:47PM +0100, Jakub Jelinek via Gcc-patches > wrote: > > glibc strptime passes around some state, what fields in struct tm have > been > > set and what needs to be finalized

Re: [PATCH] C++ P0482R6 char8_t: declare std::c8rtomb and std::mbrtoc8 if provided by the C library

2022-01-10 Thread Jonathan Wakely via Gcc-patches
On Sat, 8 Jan 2022 at 00:42, Tom Honermann via Libstdc++ < libstd...@gcc.gnu.org> wrote: > This patch completes implementation of the C++20 proposal P0482R6 [1] by > adding declarations of std::c8rtomb() and std::mbrtoc8() in if > provided by the C library in . > > This patch addresses feedback

Re: [PATCH take #3] Recognize MULT_HIGHPART_EXPR in tree-ssa-math-opts pass.

2022-01-10 Thread Richard Biener via Gcc-patches
On Thu, Jan 6, 2022 at 11:39 PM Roger Sayle wrote: > > > This is the third iteration of a patch to perceive MULT_HIGHPART_EXPR > in the middle-end. As they say "the third time's a charm". The first > version implemented this in match.pd, which was considered too early. >

Re: [PATCH v2] match.pd: Simplify 1 / X for integer X [PR95424]

2022-01-10 Thread Richard Biener via Gcc-patches
On Thu, Jan 6, 2022 at 11:36 AM Zhao Wei Liew wrote: > > This patch implements an optimization for the following C++ code: > > int f(int x) { > return 1 / x; > } > > int f(unsigned int x) { > return 1 / x; > } > > Before this patch, x86-64 gcc -std=c++20 -O3 produces the following

Re: [1/3 PATCH]middle-end vect: Simplify and extend the complex numbers validation routines.

2022-01-10 Thread Richard Biener via Gcc-patches
On Fri, Dec 17, 2021 at 4:44 PM Tamar Christina via Gcc-patches wrote: > > Hi All, > > This patch boosts the analysis for complex mul,fma and fms in order to ensure > that it doesn't create an incorrect output. > > Essentially it adds an extra verification to check that the two nodes it's >

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

2022-01-10 Thread Robin Dapp via Gcc-patches
Hi Richard, > I think it would be better to fold this into the existing documentation > a bit more: [..] done. Fixed the remaining nits in the attached v5. Bootstrap and regtest are good on s390x, Power9 and i386. Regards Robin -- gcc/ChangeLog: * config/rs6000/vsx.md: Use const0

Re: [PATCH] libstdc++: Fix and simplify freestanding configuration [PR103866]

2022-01-10 Thread Jonathan Wakely via Gcc-patches
On Fri, 7 Jan 2022 at 13:46, Jonathan Wakely via Libstdc++ < libstd...@gcc.gnu.org> wrote: > Tested powerpc64le-linux and by building a mips-none-elf cross with > --disable-hosted-libstdcxx --without-headers (which fails currently). > > Any objections? > Pushed to trunk. > > This fixes the

[committed] libstdc++: Add dg-timeout-factor to some more regex tests

2022-01-10 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. I'm seeing these fail with tool_timeout=30 on a busy machine. libstdc++-v3/ChangeLog: * testsuite/28_regex/algorithms/regex_replace/char/103664.cc: Add dg-timeout-factor directive. * testsuite/28_regex/basic_regex/84110.cc:

[committed] libstdc++: Update default -std option in manual

2022-01-10 Thread Jonathan Wakely via Gcc-patches
Pushed to trunk. libstdc++-v3/ChangeLog: * doc/xml/manual/using.xml: Update documentation around default -std option. * doc/html/*: Regenerate. --- libstdc++-v3/doc/html/index.html| 4 ++-- libstdc++-v3/doc/html/manual/using.html | 3 ++-

[committed] libstdc++: Add -nostdinc++ for c++17 sources [PR100017]

2022-01-10 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, and build=x86_64-linux host=aarch64-linux. Pushed to trunk. Backport to gcc-11 also needed. When building a build!=host compiler, the just-built gcc can't be used to build the target libstdc++ (because it is built for the host triplet, not the build triplet). The

Re: [PATCH] [aarch64/64821]: Simplify __builtin_aarch64_sqrt* into internal function .SQRT.

2022-01-10 Thread Richard Sandiford via Gcc-patches
apinski--- via Gcc-patches writes: > From: Andrew Pinski > > This is a simple patch which simplifies the __builtin_aarch64_sqrt* builtins > into the internal function SQRT which allows for constant folding and other > optimizations at the gimple level. It was originally suggested we do to >

Re: [PATCH] Fortran: make IEEE_CLASS recognize signaling NaNs

2022-01-10 Thread FX via Gcc-patches
Thanks Mikael. I haven’t been active with gfortran development in a while, but I originally wrote those IEEE routines so I believe my understanding of them is fair. I will continue posting my next patches to gather comments (if any), but they’re relatively straightforward. The main limitation

GCC 12.0.0 Status Report (2022-01-10), Stage 3 ends Jan 16th

2022-01-10 Thread Richard Biener via Gcc-patches
Status == The GCC development branch is open for general bugfixing (Stage 3) and will transition to regression and documentation fixing only (Stage 4) on the end of Jan 16th. Take the quality data below with a big grain of salt - most of the new P3 classified bugs will become P1 or P2

Re: [COMIITTED] Testsuite: Make dependence on -fdelete-null-pointer-checks explicit

2022-01-10 Thread Jonathan Wakely via Gcc-patches
CC libstdc++ and Jakub. On 08/01/22 23:22 -0700, Sandra Loosemore wrote: I've checked in these tweaks for various testcases that fail on nios2-elf without an explicit -fdelete-null-pointer-checks option. This target is configured to build with that optimization off by default. -Sandra commit

[PATCH] [aarch64/64821]: Simplify __builtin_aarch64_sqrt* into internal function .SQRT.

2022-01-10 Thread apinski--- via Gcc-patches
From: Andrew Pinski This is a simple patch which simplifies the __builtin_aarch64_sqrt* builtins into the internal function SQRT which allows for constant folding and other optimizations at the gimple level. It was originally suggested we do to __builtin_sqrt just for __builtin_aarch64_sqrtdf

Re: [patch] Fix PR target/103465

2022-01-10 Thread Richard Biener via Gcc-patches
On Mon, Jan 10, 2022 at 10:19 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > this PR uncovered that -freorder-blocks-and-partition was working by accident > on 64-bit Windows, i.e. the middle-end was supposed to disable it with SEH. > After Martin's change, the middle-end properly disables

Re: [PATCH] middle-end/101530 - fix shufflevector lowering

2022-01-10 Thread Richard Biener via Gcc-patches
On Wed, 5 Jan 2022, Jeff Law wrote: > > > On 1/5/2022 7:17 AM, Richard Biener via Gcc-patches wrote: > > This makes __builtin_shufflevector lowering force the result > > of the BIT_FIELD_REF lowpart operation to a temporary as to > > fulfil the IL verifier constraint that BIT_FIELD_REFs should

Re: [PATCH v3 7/7] ifcvt: Run second pass if it is possible to omit a temporary.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/ChangeLog: * ifcvt.c (noce_convert_multiple_sets_1): New function. (noce_convert_multiple_sets): Call function a second time if we can improve the first try.

Re: [PATCH v3 6/7] testsuite/s390: Add tests for noce_convert_multiple.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/testsuite/ChangeLog: * gcc.dg/ifcvt-4.c: Remove s390-specific check. * gcc.target/s390/ifcvt-two-insns-bool.c: New test. * gcc.target/s390/ifcvt-two-insns-int.c: New test. * gcc.target/s390/ifcvt-two-insns-long.c: New

Re: [PATCH v3 5/7] ifcvt: Try re-using CC for conditional moves.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/ChangeLog: * ifcvt.c (cond_exec_get_condition): New parameter to allow getting the reversed comparison. (try_emit_cmove_seq): New function to facilitate creating a cmov sequence. (noce_convert_multiple_sets):

Re: [PATCH v3 4/7] ifcvt/optabs: Allow using a CC comparison for emit_conditional_move.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/ChangeLog: * rtl.h (struct rtx_comparison): New struct that holds an rtx comparison. * config/rs6000/rs6000.c (rs6000_emit_minmax): Use struct instead of single parameters. (rs6000_emit_swsqrt): Likewise.

Re: [PATCH v3 3/7] ifcvt: Improve costs handling for noce_convert_multiple.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/ChangeLog: * ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Estimate insns costs. (noce_process_if_block): Use potential costs.

Re: [PATCH v3 2/7] ifcvt: Allow constants for noce_convert_multiple.

2022-01-10 Thread Robin Dapp via Gcc-patches
Posting the ChangeLog before pushing. -- gcc/ChangeLog: * ifcvt.c (noce_convert_multiple_sets): Allow constants. (bb_ok_for_noce_convert_multiple_sets): Likewise.

Re: [PATCH v3 1/7] ifcvt: Check if cmovs are needed.

2022-01-10 Thread Robin Dapp via Gcc-patches
Hi, I included the outstanding minor remarks and believe everything is OK'ed now. Still posting the ChangeLogs that I omitted before continuing. I'd expect some fallout on other targets (hopefully nothing major) since rtx costs are handled differently now for this code path. Regards Robin --

Re: [PATCH] middle-end/77608: object size estimate with variable offsets

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Wed, Jan 05, 2022 at 06:50:58PM +0530, Siddhesh Poyarekar wrote: > --- a/gcc/tree-object-size.c > +++ b/gcc/tree-object-size.c > @@ -347,10 +347,21 @@ init_offset_limit (void) > be positive and hence, be within OFFSET_LIMIT for valid offsets. */ > > static tree > -size_for_offset (tree

Re: [PATCH v5 4/4] tree-object-size: Dynamic sizes for ADDR_EXPR

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Sat, Dec 18, 2021 at 06:05:11PM +0530, Siddhesh Poyarekar wrote: > --- a/gcc/tree-object-size.c > +++ b/gcc/tree-object-size.c > @@ -107,6 +107,14 @@ size_unknown_p (tree val, int object_size_type) > ? integer_zerop (val) : integer_all_onesp (val)); > } > > +/* Return true if VAL is

Re: [PATCH v5 3/4] tree-object-size: Handle GIMPLE_CALL

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Sat, Dec 18, 2021 at 06:05:10PM +0530, Siddhesh Poyarekar wrote: > Handle non-constant expressions in GIMPLE_CALL arguments. Also handle > alloca. > > gcc/ChangeLog: > > * tree-object-size.c (alloc_object_size): Make and return > non-constant size expression. >

[PATCH] nvptx: Expand QI mode operations using SI mode instructions.

2022-01-10 Thread Roger Sayle
One of the unusual target features of the Nvidia PTX ISA is that it doesn't provide QI mode (byte sized) operations or registers. Somewhat conventionally, 8-bit quantities are read from/written to memory using special instructions, but stored internally using SImode (32-bit) registers. GCC's

Re: [PATCH v5 2/4] tree-object-size: Handle function parameters

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Sat, Dec 18, 2021 at 06:05:09PM +0530, Siddhesh Poyarekar wrote: > @@ -1440,6 +1441,53 @@ cond_expr_object_size (struct object_size_info *osi, > tree var, gimple *stmt) >return reexamine; > } > > +/* Find size of an object passed as a parameter to the function. */ > + > +static void >

Re: [PATCH v5 1/4] tree-object-size: Support dynamic sizes in conditions

2022-01-10 Thread Jakub Jelinek via Gcc-patches
On Sat, Dec 18, 2021 at 06:05:08PM +0530, Siddhesh Poyarekar wrote: Sorry for the delay. > +size_t > +__attribute__ ((noinline)) > +test_builtin_calloc_condphi (size_t cnt, size_t sz, int cond) > +{ > + struct > +{ > + int a; > + char b; > +} bin[cnt]; > + > + char *ch =

RE: [1/3 PATCH]middle-end vect: Simplify and extend the complex numbers validation routines.

2022-01-10 Thread Tamar Christina via Gcc-patches
ping > -Original Message- > From: Tamar Christina > Sent: Monday, December 20, 2021 4:19 PM > To: Richard Sandiford ; Tamar Christina via > Gcc- patches > Cc: nd ; rguent...@suse.de > Subject: RE: [1/3 PATCH]middle-end vect: Simplify and extend the > complex numbers validation

[PATCH] tree-optimization/100359 - restore unroll at -O3

2022-01-10 Thread Richard Biener via Gcc-patches
This fixes a mistake done with r8-5008 when introducing allow_peel to the unroll code. The intent was to allow peeling that doesn't grow code but the result was that with -O3 and UL_ALL this wasn't done. The following instantiates the desired effect by adjusting ul to UL_NO_GROWTH if peeling is

[Ada] Fix bogus error on call to subprogram with incomplete profile

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
This fixes a bad interaction between the machinery used to build subprogram types referencing incomplete types and the Copy-In/Copy-Out mechanism used to implement In/Out and Out parameters of elementary types in subprograms. The latter mechanism cannot be finalized until after incomplete types

[Ada] Fix internal error on unchecked union with component clauses

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
The issue arises when the unchecked union contains nested variants, i.e. variants containing themselves a variant part, and is subject to a full representation clause covering all the components in all the variants, when the component clauses do not align the variant boundaries with byte

[Ada] Make pragma Inspection_Point work for constants

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
This entails marking the pragma as requiring an lvalue and explicitly going to the corresponding variable of the constants, which is always built since the front-end marks the constants as having their address taken. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ *

[Ada] Switch from __sync to __atomic builtins for Lock_Free_Try_Write

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
Routine Lock_Free_Try_Write was using deprecated __sync GCC builtins. Now it uses __atomic builtins, which are recommended for new code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-atopri.ads (Atomic_Compare_Exchange): Replaces deprecated

[Ada] Remove CodePeer annotations for pragma Loop_Variant

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
Pragma Loop_Variant is now expanded into a null statement in CodePeer mode. Remove annotations related to false positives in runtime units. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-exponn.adb, libgnat/s-expont.adb, libgnat/s-exponu.adb,

[Ada] Disable expansion of pragma Loop_Variant in CodePeer mode

2022-01-10 Thread Pierre-Marie de Rodat via Gcc-patches
Pragma Loop_Variant is expanded into code which is too complicated for CodePeer to handle and results in messages with internal names. Disable expansion. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_prag.adb (Expand_Pragma_Loop_Variant): Disable expansion in

  1   2   >