[PATCH] Implement known/maybe fpclassify like API for frange.

2022-09-07 Thread Aldy Hernandez via Gcc-patches
This is what I have in mind for the fpclassify-like methods on the current implementation. I'll get to the removal of the tristates after Cauldron. As you mentioned, isnormal is kinda tricky, and likely to be confusing for the user. We can revisit it if it's important. ?? I assume maybe_inf() d

RE: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-07 Thread HAO CHEN GUI via Gcc-patches
On 7/9/2022 下午 10:25, Segher Boessenkool wrote: > Hi! > > On Wed, Sep 07, 2022 at 08:51:17AM -0500, Paul A. Clarke wrote: >> On Tue, Sep 06, 2022 at 12:19:06PM -0500, Segher Boessenkool wrote: >>> On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: The return type of vec_ version

[PATCH] Handle OPAQUE_TYPE specially in verify_type [PR106833]

2022-09-07 Thread Kewen.Lin via Gcc-patches
Hi, As PR106833 shows, cv-qualified opaque type can cause ICE during LTO. It exposes that we missd to handle OPAQUE_TYPE well in type verification. As Richi pointed out, also assuming that target will always define TYPE_MAIN_VARIANT and TYPE_CANONICAL for opaque type, this patch is to check both

Re: [PATCH 1/2] Allow subtarget customization of CC1_SPEC

2022-09-07 Thread Sebastian Huber
On 04/08/2022 15:02, Sebastian Huber wrote: On 22/07/2022 15:02, Sebastian Huber wrote: gcc/ChangeLog: * gcc.cc (SUBTARGET_CC1_SPEC): Define if not defined. (CC1_SPEC): Define to SUBTARGET_CC1_SPEC. * config/arm/arm.h (CC1_SPEC): Remove. * config/arc/arc.h (CC1_SPEC): Append SUB

Re: [PATCH] Use mallinfo2 with glibc >= 2.33

2022-09-07 Thread François Dumont via Gcc-patches
    libstdc++: glibc mallinfo deprecated, use mallinfo2 when version => 2.33     glibc mallinfo is now deprecated resulting in make check-performance     failure. When glibc => 2.33 prefer mallinfo2.     libstdcxx-v3/ChangeLog:     * testsuite/util/testsuite_performance.h (__gnu_test:

Re: [PATCH] RISC-V:Add '-m[no]-csr-check' option in gcc.

2022-09-07 Thread Kito Cheng via Gcc-patches
Hi Jiawei: Could you add check in config/configure.ac and gcc/config.in to make sure the binutils has support for that or not? You can reference the commit for -misa-spec to see how it work and how it add: https://github.com/gcc-mirror/gcc/commit/4b81528241ca682025d92558ff6aeec91dafdca8 Thanks :

[PATCH 2/2] rs6000: building const with lis/li/pli+rlwinm

2022-09-07 Thread Jiufu Guo via Gcc-patches
Hi, We may use two instructions (rlwinm with mask + li/lis) to build 64bit constant. For example: 'li 9,16383 + rlwinm 9,9,0,29,25' builds 0x3fff3fc7LL. This updates rs6000_emit_set_long_const to building constants through rlwinm. Bootstrap & regtest pass on ppc64 and ppc64le. Is this ok

[PATCH] RISC-V:Add '-m[no]-csr-check' option in gcc.

2022-09-07 Thread jiawei
From: Jiawei Add -m[no]-csr-check option in gcc part, when enable -mcsr-check option, it will add csr-check in .option section and pass this to assembler. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_file_start): New .option. * config/riscv/riscv.opt: New options. * doc

[PATCH] : [gcc/config/rs600/rs6000.cc][Fix typo] Add parentheses for if statement

2022-09-07 Thread Akari Takahashi via Gcc-patches
Hello: I am very interested in GCC and have joined the FSF membership. I found a small bug in the latest source code, so I report it. Patch: [Fix typo]Add parentheses for if statement in line 18117. gcc/config/rs600/rs6000.cc Diff: -- diff --git a/gcc/config/rs6000

Re: Patch ping (was Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange)

2022-09-07 Thread Thomas Rodgers via Gcc-patches
Looks good to me. Tom. On Wed, Sep 7, 2022 at 4:56 AM Jonathan Wakely wrote: > Here's a complete patch that combines the various incremental patches > that have been going around. I'm testing this now. > > Please take a look. >

[PATCH] pch: Fix the reconstruction of adhoc data hash table

2022-09-07 Thread Lewis Hyatt via Gcc-patches
The function rebuild_location_adhoc_htab() was meant to reconstruct the adhoc location hash map after restoring a line_maps instance from a PCH. However, the function has never performed as intended because it missed the last step of adding the data into the newly reconstructed hash map. This patch

Re: [committed] libstdc++: Add missing runtime exception to licence notice

2022-09-07 Thread Thomas Rodgers via Gcc-patches
Looks good to me. Tom. On Wed, Sep 7, 2022 at 12:27 PM Jonathan Wakely via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > Tested powerpc64le-linux, pushed to trunk. > > Backports to gcc-11 and gcc-12 needed too. > > -- >8 -- > > This file is missing the GCC Runtime Library Exception text in the

Re: [PATCH v2] analyzer: support for symbolic values in the out-of-bounds checker [PR106625]

2022-09-07 Thread David Malcolm via Gcc-patches
On Wed, 2022-09-07 at 17:51 +0200, Tim Lange wrote: > Hi Dave, > > while re-reading that patch, I noticed a small mistake. I accidently > did > not move the op == PLUS_EXPR or MULT_EXPR guard in > symbolic_greater_than > when implementing the "eliminate operands on both sides" feature, > which > l

Re: [PATCH] Improve converting between 128-bit modes that use the same format

2022-09-07 Thread Segher Boessenkool
On Wed, Sep 07, 2022 at 04:25:49PM -0400, Michael Meissner wrote: > On Tue, Sep 06, 2022 at 05:22:11PM -0500, Segher Boessenkool wrote: > > Please do this. It is the biggest problem I have with most of your > > patches: you seem to save up development of a week, and then send it out > > as big omn

Re: [PATCH] c++: unnecessary instantiation of constexpr var [PR99130]

2022-09-07 Thread Patrick Palka via Gcc-patches
On Wed, 7 Sep 2022, Jason Merrill wrote: > On 9/7/22 15:41, Patrick Palka wrote: > > Here the use of the constexpr member/variable specialization 'value' > > from within an unevaluated context causes us to overeagerly instantiate > > it, via maybe_instantiate_decl called from mark_used, despite on

Re: [PATCH] Improve converting between 128-bit modes that use the same format

2022-09-07 Thread Michael Meissner via Gcc-patches
On Tue, Sep 06, 2022 at 05:22:11PM -0500, Segher Boessenkool wrote: > Please do this. It is the biggest problem I have with most of your > patches: you seem to save up development of a week, and then send it out > as big omnibus patch an hour or two before my weekend. This is not > ideal. This i

Re: [PATCH][DOCS] Mention removed ports in GCC 13.

2022-09-07 Thread Martin Liška
On 9/7/22 16:28, Gerald Pfeifer wrote: > On Wed, 7 Sep 2022, Martin Liška wrote: >> Thanks for the fix. Btw. have you removed the w3c validation script? > > I didn't remove it, but had to deactive automated notifications since the > w3.org service started to employ some "are you a secure machine?

Re: [PATCH] c++: unnecessary instantiation of constexpr var [PR99130]

2022-09-07 Thread Jason Merrill via Gcc-patches
On 9/7/22 15:41, Patrick Palka wrote: Here the use of the constexpr member/variable specialization 'value' from within an unevaluated context causes us to overeagerly instantiate it, via maybe_instantiate_decl called from mark_used, despite only its declaration not its definition being needed.

[PATCH] c++: unnecessary instantiation of constexpr var [PR99130]

2022-09-07 Thread Patrick Palka via Gcc-patches
Here the use of the constexpr member/variable specialization 'value' from within an unevaluated context causes us to overeagerly instantiate it, via maybe_instantiate_decl called from mark_used, despite only its declaration not its definition being needed. We used to have the same issue for conste

[committed] libstdc++: Add missing runtime exception to licence notice

2022-09-07 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux, pushed to trunk. Backports to gcc-11 and gcc-12 needed too. -- >8 -- This file is missing the GCC Runtime Library Exception text in the licence header. That is unintentional, and it should have been present. libstdc++-v3/ChangeLog: * include/std/barrier: Add m

Re: [PATCH] tree-object-size: Support strndup and strdup

2022-09-07 Thread Siddhesh Poyarekar
Ping! On 2022-08-29 10:16, Siddhesh Poyarekar wrote: Ping! On 2022-08-15 15:23, Siddhesh Poyarekar wrote: Use string length of input to strdup to determine the usable size of the resulting object.  Avoid doing the same for strndup since there's a chance that the input may be too large, resulti

Re: [PATCH] Fortran: Add IEEE_SIGNBIT and IEEE_FMA functions

2022-09-07 Thread FX via Gcc-patches
Hi, > Both of these functions are new with Fortran 2018, could you add > a standards version check? Thanks Thomas, I will do that and post here the commit diff. The check will not be perfect, though, because the warning/error cannot be emitted when loading the module (because it’s in an externa

[pushed] c++: diagnostic for template placeholder in parm [PR106793]

2022-09-07 Thread Jason Merrill via Gcc-patches
Talking about the declarator form doesn't help when fixing that would get you a different error about placeholders not being valid in a parameter. This also adds a <> fixit, which isn't enough for most templates, but is a start. Tested x86_64-pc-linux-gnu, applying to trunk. PR c++/10679

Re: [PATCH] Use mallinfo2 with glibc >= 2.33

2022-09-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Sept 2022 at 18:03, François Dumont via Libstdc++ wrote: > > libstdc++: Use glibc >= 2.33 mallinfo2 function > > mallinfo started to be deprecated which makes performance tests failed > to build, just > adopt mallinfo2. > > libstdcxx-v3/ChangeLog: > > * testsuite/util/testsuite_

[PATCH] Use mallinfo2 with glibc >= 2.33

2022-09-07 Thread François Dumont via Gcc-patches
libstdc++: Use glibc >= 2.33 mallinfo2 function mallinfo started to be deprecated which makes performance tests failed to build, just adopt mallinfo2. libstdcxx-v3/ChangeLog:     * testsuite/util/testsuite_performance.h (__mallinfo): New, our own mallinfo     struct with just what we

Re: [PATCH] Ignore debug insns with CONCAT and CONCATN for insn scheduling

2022-09-07 Thread Jeff Law via Gcc-patches
On 9/2/2022 8:36 AM, H.J. Lu via Gcc-patches wrote: CONCAT and CONCATN never appear in the insn chain. They are only used in debug insn. Ignore debug insns with CONCAT and CONCATN for insn scheduling to avoid different insn orders with and without debug insn. gcc/ PR rtl-optimizati

Re: [PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-07 Thread Christophe Lyon via Gcc-patches
On 9/7/22 15:42, Kyrylo Tkachov wrote: -Original Message- From: Christophe Lyon Sent: Wednesday, September 7, 2022 2:41 PM To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org Subject: Re: [PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins On 9/7/22 15

Re: [PATCH] A == 0 ? A : -A same as -A (when A is 0.0)

2022-09-07 Thread Jeff Law via Gcc-patches
On 8/29/2022 2:44 PM, Aldy Hernandez via Gcc-patches wrote: The upcoming work for frange triggers a regression in gcc.dg/tree-ssa/phi-opt-24.c. For -O2 -fno-signed-zeros, we fail to transform the following into -A: float f0(float A) { // A == 0? A : -Asame as -A if (A == 0) re

[committed] Update my entry in MAINTAINERS

2022-09-07 Thread Jeff Law via Gcc-patches
I'm leaving Tachyum this Friday.  Adjust my maintainers address, but not the DCO entry in the MAINTAINERS file. commit 756ccf97cf976011b3800a055bfb9fc3a2c943c6 (HEAD -> master, origin/master, origin/HEAD) Author: Jeff Law Date:   Wed Sep 7 12:32:31 2022 -0400     Update my email address

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-07 Thread Jeff Law via Gcc-patches
On 9/7/2022 6:45 AM, Richard Biener via Gcc-patches wrote: On Wed, Sep 7, 2022 at 2:20 PM Robin Dapp wrote: The question is really whether xor or sub is "better" statically. I can't think of any reasons. On s390, why does xor end up "better"? There is an xor with immediate (as opposed to

[PATCH v2] analyzer: support for symbolic values in the out-of-bounds checker [PR106625]

2022-09-07 Thread Tim Lange
Hi Dave, while re-reading that patch, I noticed a small mistake. I accidently did not move the op == PLUS_EXPR or MULT_EXPR guard in symbolic_greater_than when implementing the "eliminate operands on both sides" feature, which lead to the old patch also eliminating operands on both sides if the op

Re: [PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread Richard Biener via Gcc-patches
> Am 07.09.2022 um 16:37 schrieb Martin Liška : > > On 9/7/22 15:43, David Edelsohn wrote: >> On Wed, Sep 7, 2022 at 7:45 AM Martin Liška > > wrote: >> >>Hi. >> >>The patch restores DWARF support for AIX target where XCOFF file >> container is used. >>Veri

Re: [RFC] postreload cse'ing vector constants

2022-09-07 Thread Jeff Law via Gcc-patches
On 9/7/2022 9:33 AM, Robin Dapp wrote: Did you did any archeology into this code to see if there was any history that might shed light on why it doesn't just using the costing models? This one was buried under some dust :) commit 0254c56158b0533600ba9036258c11d377d46adf Author: John Carr Da

Re: [RFC] postreload cse'ing vector constants

2022-09-07 Thread Robin Dapp via Gcc-patches
> Did you did any archeology into this code to see if there was any > history that might shed light on why it doesn't just using the costing > models? This one was buried under some dust :) commit 0254c56158b0533600ba9036258c11d377d46adf Author: John Carr Date: Wed Jun 10 06:00:50 1998 +

Re: [PATCH v2] coroutines: Ensure there's a top level bind when rewriting [PR106188]

2022-09-07 Thread Arsen Arsenović via Gcc-patches
Hi, On Wednesday, 7 September 2022 17:13:03 CEST Jason Merrill wrote: > Applied with some minor tweaks, described below. > > Thanks! Got it, and noted the changes and rationale you provided Thank you! -- Arsen Arsenović signature.asc Description: This is a digitally signed message part.

Re: [PATCH v2] coroutines: Ensure there's a top level bind when rewriting [PR106188]

2022-09-07 Thread Jason Merrill via Gcc-patches
On 9/4/22 15:04, Arsen Arsenović wrote: In the edge case of a coroutine not containing any locals, the ifcd/swch temporaries would get added to the coroutine frame, corrupting its layout. To prevent this, we can make sure there is always a BIND_EXPR at the top of the function body, and thus, alwa

Re: [PATCH] c++: Fix type completeness checks for type traits [PR106838]

2022-09-07 Thread Jason Merrill via Gcc-patches
On 9/7/22 08:18, Jonathan Wakely wrote: Tested powerpc64le-linux. OK for trunk? -- >8 -- The check_trait_type function is used for a number of different type traits that have different requirements on their arguments. For example, __is_constructible allows arrays of unknown bound even if the ar

Re: [RFC] postreload cse'ing vector constants

2022-09-07 Thread Jeff Law via Gcc-patches
On 9/7/2022 8:40 AM, Robin Dapp via Gcc-patches wrote: Hi, I recently looked into a sequence like vzero %v0 vlr %v2, %v0 vlr %v3, %v0. Ideally we would like to use vzero for all of these sets in order to not create dependencies. For some instances of this problem I found the offe

Re: [PATCH v3 1/2] xtensa: Eliminate unused stack frame allocation/freeing

2022-09-07 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Wed, Sep 7, 2022 at 2:08 AM Takayuki 'January June' Suwa wrote: > > Changes from v2: > (xtensa_expand_prologue): Changed to check conditions for suppressing emit > insns in advance, instead of tracking emitted and later replacing them with > NOPs if they are found to be unnece

[RFC] postreload cse'ing vector constants

2022-09-07 Thread Robin Dapp via Gcc-patches
Hi, I recently looked into a sequence like vzero %v0 vlr %v2, %v0 vlr %v3, %v0. Ideally we would like to use vzero for all of these sets in order to not create dependencies. For some instances of this problem I found the offending snippet to be the postreload cse pass. If there is a non

Re: [PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread Martin Liška
On 9/7/22 15:43, David Edelsohn wrote: > On Wed, Sep 7, 2022 at 7:45 AM Martin Liška > wrote: > > Hi. > > The patch restores DWARF support for AIX target where XCOFF file > container is used. > Verified before and after the patch, gcc119 machine (AIX) could no

Re: [PATCH][DOCS] Mention removed ports in GCC 13.

2022-09-07 Thread Gerald Pfeifer
On Wed, 7 Sep 2022, Martin Liška wrote: > Thanks for the fix. Btw. have you removed the w3c validation script? I didn't remove it, but had to deactive automated notifications since the w3.org service started to employ some "are you a secure machine?" checks that appear to use Javascript or the l

Re: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-07 Thread Segher Boessenkool
Hi! On Wed, Sep 07, 2022 at 08:51:17AM -0500, Paul A. Clarke wrote: > On Tue, Sep 06, 2022 at 12:19:06PM -0500, Segher Boessenkool wrote: > > On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: > > > The return type of vec_ version built-ins are different than their > > > definition > >

[PATCH 2/2] var-tracking: Add entry values up to max register mode

2022-09-07 Thread Stefan Schulze Frielinghaus via Gcc-patches
For parameter of type integer which do not consume a whole register (modulo sign/zero extension) this patch adds entry values up to maximal register mode. gcc/ChangeLog: * var-tracking.cc (vt_add_function_parameter): Add entry values up to maximal register mode. --- gcc/var-track

[PATCH 1/2] cselib: Keep track of further subvalue relations

2022-09-07 Thread Stefan Schulze Frielinghaus via Gcc-patches
Whenever a new cselib value is created check whether a smaller value exists which is contained in the bigger one. If so add a subreg relation to locs of the smaller one. gcc/ChangeLog: * cselib.cc (new_cselib_val): Keep track of further subvalue relations. --- gcc/cselib.cc | 20

[PATCH 0/2] Variable tracking and subvalues

2022-09-07 Thread Stefan Schulze Frielinghaus via Gcc-patches
For variable tracking there exists cases where a value is moved in a wider mode than its native mode. For example: int foo (int x) { bar (x); return x; } compiles on IBM zSystems into 0x010012b0 <+0>: stmg%r12,%r15,96(%r15) 0x010012b6 <+6>: lgr %r12,%r2 0x000

Re: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-07 Thread Paul A. Clarke via Gcc-patches
On Tue, Sep 06, 2022 at 12:19:06PM -0500, Segher Boessenkool wrote: > On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: > > On 2/9/2022 下午 11:56, Segher Boessenkool wrote: > > >> - const signed long __builtin_vsx_scalar_extract_exp (double); > > >> + const unsigned long long __builtin

Re: [PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread David Edelsohn via Gcc-patches
On Wed, Sep 7, 2022 at 7:45 AM Martin Liška wrote: > Hi. > > The patch restores DWARF support for AIX target where XCOFF file container > is used. > Verified before and after the patch, gcc119 machine (AIX) could not build > any run-time library, > now it can. > > Ready to be installed? > Thanks,

RE: [PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-07 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Christophe Lyon > Sent: Wednesday, September 7, 2022 2:41 PM > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] arm: Fix constant immediates predicates and > constraints for some MVE builtins > > > > On 9/7/22 15:34, Kyrylo Tkachov wrote

Re: [PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-07 Thread Christophe Lyon via Gcc-patches
On 9/7/22 15:34, Kyrylo Tkachov wrote: Hi Christophe, -Original Message- From: Gcc-patches On Behalf Of Christophe Lyon via Gcc-patches Sent: Wednesday, September 7, 2022 2:03 PM To: gcc-patches@gcc.gnu.org Subject: [PATCH] arm: Fix constant immediates predicates and constraints for

RE: [PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-07 Thread Kyrylo Tkachov via Gcc-patches
Hi Christophe, > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Christophe > Lyon via Gcc-patches > Sent: Wednesday, September 7, 2022 2:03 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: Fix constant immediates predicates and cons

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-07 Thread Rainer Orth
Hi Iain, > Excerpts from Rainer Orth's message of September 7, 2022 2:40 pm: >> Hi Iain, >> Yes, this is data related. The DSO registry picks up nothing in the miscompiled stage2 compiler, leaving all data uninitialized. The stage1 compiler works, and runs all module constructors

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-07 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of September 7, 2022 2:40 pm: > Hi Iain, > >>> Yes, this is data related. The DSO registry picks up nothing in the >>> miscompiled stage2 compiler, leaving all data uninitialized. The stage1 >>> compiler works, and runs all module constructors ahead of compilat

[PATCH] arm: Fix constant immediates predicates and constraints for some MVE builtins

2022-09-07 Thread Christophe Lyon via Gcc-patches
Several MVE builtins incorrectly use the same predicate/constraint pair for several modes, which does not match the specification. This patch uses the appropriate iterator instead. 2022-09-06 Christophe Lyon gcc/ * config/arm/mve.md (mve_vqshluq_n_s): Use MVE_pred/MVE_c

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-07 Thread Richard Biener via Gcc-patches
On Wed, Sep 7, 2022 at 2:20 PM Robin Dapp wrote: > > > The question is really whether xor or sub is "better" statically. I can't > > think of any reasons. On s390, why does xor end up "better"? > > There is an xor with immediate (as opposed to no "subtract from > immediate") which saves an instr

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-07 Thread Rainer Orth
Hi Iain, >> Yes, this is data related. The DSO registry picks up nothing in the >> miscompiled stage2 compiler, leaving all data uninitialized. The stage1 >> compiler works, and runs all module constructors ahead of compilation. >> > > Ohh, backtrack on that, analysis is correct, but it is a com

Re: Modula-2: merge followup (brief update on the progress of the new linking implementation)

2022-09-07 Thread Martin Liška
On 8/31/22 15:25, Martin Liška wrote: > On 8/31/22 15:19, Gaius Mulley wrote: >> Martin Liška writes: >> >>> How do you mean that? You should ideally generate .rst (Sphinx markup) >>> instead of the *.texi files. These will be then included in the converted >>> Sphinx manual similarly to how you i

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-07 Thread Robin Dapp via Gcc-patches
> The question is really whether xor or sub is "better" statically. I can't > think of any reasons. On s390, why does xor end up "better"? There is an xor with immediate (as opposed to no "subtract from immediate") which saves an instruction, usually. On x86, I think the usual argument for xor

[PATCH] c++: Fix type completeness checks for type traits [PR106838]

2022-09-07 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. OK for trunk? -- >8 -- The check_trait_type function is used for a number of different type traits that have different requirements on their arguments. For example, __is_constructible allows arrays of unknown bound even if the array element is an incomplete type, but __i

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-07 Thread Richard Biener via Gcc-patches
On Tue, Sep 6, 2022 at 4:01 PM Robin Dapp wrote: > > > cost might also depend on the context in case flag setting > > behavior differs for xor vs sub (on x86 sub looks strictly more > > powerful here). The same is probably true when looking for > > a combination with another bitwise operation. >

Re: [PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread Richard Biener via Gcc-patches
On Wed, Sep 7, 2022 at 1:45 PM Martin Liška wrote: > > Hi. > > The patch restores DWARF support for AIX target where XCOFF file container is > used. > Verified before and after the patch, gcc119 machine (AIX) could not build any > run-time library, > now it can. > > Ready to be installed? OK.

Re: [PATCH v3] Simplify memchr with small constant strings

2022-09-07 Thread Richard Biener via Gcc-patches
On Wed, Sep 7, 2022 at 12:58 PM Jan-Benedict Glaw wrote: > > Hi! > > On Wed, 2022-07-13 09:50:14 -0700, H.J. Lu via Gcc-patches > wrote: > > When memchr is applied on a constant string of no more than the bytes of > > a word, simplify memchr by checking each byte in the constant string. > > > >

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

2022-09-07 Thread Richard Biener via Gcc-patches
On Wed, Sep 7, 2022 at 12:51 PM Jan-Benedict Glaw wrote: > > Hi! > > On Mon, 2022-08-29 22:11:35 +0200, Jan-Benedict Glaw > wrote: > > On Sun, 2022-08-28 15:32:53 -0600, Jeff Law via Gcc-patches > > wrote: > > > On 8/28/2022 1:50 AM, Jan-Benedict Glaw wrote: > > > > On Tue, 2021-09-21 16:25:19

Re: [PATCH][DOCS] Mention removed ports in GCC 13.

2022-09-07 Thread Martin Liška
On 9/5/22 14:31, Gerald Pfeifer wrote: > On Fri, 26 Aug 2022, Richard Biener via Gcc-patches wrote: >>> Ready for master? >> OK > > Actually both Richi and me missed a little detail: > >>> - ... >>> +The support for the cr16-elf, >>> tilegx*-linux and tilepro*-linux >>> + configuration

Re: Patch ping (was Re: [PATCH] libstdc++: Clear padding bits in atomic compare_exchange)

2022-09-07 Thread Jonathan Wakely via Gcc-patches
Here's a complete patch that combines the various incremental patches that have been going around. I'm testing this now. Please take a look. commit 4a0a8ec5bc2a890a1568f99eace666e9f72d Author: Thomas Rodgers Date: Thu Aug 25 11:11:40 2022 libstdc++: Clear padding bits in atomic compare

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-07 Thread Martin Liška
On 9/6/22 19:00, David Edelsohn wrote: > * dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise. > (HAVE_XCOFF_DWARF_EXTRAS): Likewise. > (output_fde): Likewise. > (output_call_frame_info): Likewise. > (have_macinfo): Likewise. > (add_AT_loc_list): Likewise. > (ad

[PATCH] Restore XCOFF for DWARF on AIX.

2022-09-07 Thread Martin Liška
Hi. The patch restores DWARF support for AIX target where XCOFF file container is used. Verified before and after the patch, gcc119 machine (AIX) could not build any run-time library, now it can. Ready to be installed? Thanks, Martin PR bootstrap/106855 gcc/ChangeLog: * colle

[PATCH] tree-optimization/106866 - avoid dead abnormal edges from DCE

2022-09-07 Thread Richard Biener via Gcc-patches
When DCE clears cfun->calls_setjmp then suddenly we don't need any abnormal call edges anymore. The following makes sure to prune them which otherwise can confuse other passes. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/106866 * tree-ssa-dce

[COMMITTED] C-SKY: Fix expanding of float LE comparing with zero for fpuv3.

2022-09-07 Thread Xianmiao Qu via Gcc-patches
The original code will cause the warning: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -peda

Re: [PING^2][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-09-07 Thread Richard Sandiford via Gcc-patches
Tom de Vries via Gcc-patches writes: > On 7/12/22 15:42, Tom de Vries wrote: >> [ dropped gdb-patches, since already applied there. ] >> >> On 6/27/22 15:38, Tom de Vries wrote: >>> On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run into:

[COMMITTED] [PR106867] Add test for PR.

2022-09-07 Thread Aldy Hernandez via Gcc-patches
PR tree-optimization/106867 gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/pr106867.c: New test. --- gcc/testsuite/gcc.dg/tree-ssa/pr106867.c | 16 1 file changed, 16 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr106867.c diff --git a/gcc/testsui

Re: [PATCH v3] Simplify memchr with small constant strings

2022-09-07 Thread Jan-Benedict Glaw
Hi! On Wed, 2022-07-13 09:50:14 -0700, H.J. Lu via Gcc-patches wrote: > When memchr is applied on a constant string of no more than the bytes of > a word, simplify memchr by checking each byte in the constant string. > > int f (int a) > { >return __builtin_memchr ("AE", a, 2) != 0; > } >

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

2022-09-07 Thread Jan-Benedict Glaw
Hi! On Mon, 2022-08-29 22:11:35 +0200, Jan-Benedict Glaw wrote: > On Sun, 2022-08-28 15:32:53 -0600, Jeff Law via Gcc-patches > wrote: > > On 8/28/2022 1:50 AM, Jan-Benedict Glaw wrote: > > > On Tue, 2021-09-21 16:25:19 +0200, Richard Biener via Gcc-patches > > > wrote: > > > > This makes def

[PATCH] tree-optimization/106860 - fix profile scaling in split_loop

2022-09-07 Thread Richard Biener via Gcc-patches
The following fixes a mistake in loop splitting which assumes loop latches have a single predecessor and that edge is from the exit test. Instead work from the single exit edge we have to find the edge towards the latch. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tre

[PATCH] mark region also for USE predicate discovery

2022-09-07 Thread Richard Biener via Gcc-patches
The following makes sure to mark the dominating region also for USE predicate discovery, avoiding compute_control_dep_chain to walk to unrelated areas, eating up walking budget. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * gimple-predicate-analysis.cc (dfs_mark_dominatin

Re: [PATCH v2] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Lulu Cheng
Sorry, I will correct this typo. Thanks! 在 2022/9/7 下午5:58, Martin Liška 写道: On 9/7/22 09:39, Lulu Cheng wrote: |+ This value is taken from the file libsanitizer/asan/asan_mappint.h. */| s/asan_mappint.h/asan_mapping.h Cheers, Martin

Re: [PATCH v2] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Martin Liška
On 9/7/22 09:39, Lulu Cheng wrote: > |+ This value is taken from the file libsanitizer/asan/asan_mappint.h. */| s/asan_mappint.h/asan_mapping.h Cheers, Martin

[pushed] aarch64: Fix +nosimd handling of FPR moves

2022-09-07 Thread Richard Sandiford via Gcc-patches
8-bit and 16-bit FPR moves would ICE for +nosimd+fp, and some other moves would handle FPR<-zero inefficiently. This is very much a niche case at the moment, but something like it becomes more important with SME streaming mode. The si, di and vector tests already passed, they're just included for

[pushed] aarch64: Prevent FPR register asms for +nofp

2022-09-07 Thread Richard Sandiford via Gcc-patches
+nofp disabled the automatic allocation of FPRs, but it didn't stop users from explicitly putting register variables in FPRs. We'd then either report an ICE or generate unsupported instructions. It's still possible (and deliberately redundant) to specify FPRs in clobber lists. Tested on aarch64-

Re: [commited PATCH v2] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Lulu Cheng
在 2022/9/7 下午4:02, Xi Ruoyao 写道: On Wed, 2022-09-07 at 15:39 +0800, Lulu Cheng wrote: Sorry, asan shadow offset is wrong in v1. In the file asan_mapping.h line 207: #    define ASAN_SHADOW_OFFSET_CONST 0x4000 So it's should be 1<<46. LGTM. I forgot to include this chan

[PATCH v3 1/2] xtensa: Eliminate unused stack frame allocation/freeing

2022-09-07 Thread Takayuki 'January June' Suwa via Gcc-patches
Changes from v2: (xtensa_expand_prologue): Changed to check conditions for suppressing emit insns in advance, instead of tracking emitted and later replacing them with NOPs if they are found to be unnecessary. --- In the example below, 'x' is once placed on the stack frame and then read into

Re: [PATCH RFA] libstdc++: small dynamic_cast optimization

2022-09-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Sept 2022 at 02:45, Jason Merrill via Libstdc++ wrote: > > An email discussion of optimizing EH led me to wonder why we weren't doing > this already. Not that this change affects EH at all. > > Tested x86_64-pc-linux-gnu. Does this seem worthwhile? Yes, I think so. If there's a fast p

Re: [PATCH 1/2] libstdc++: Optimize is_void and is_null_pointer

2022-09-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Sept 2022 at 01:46, Patrick Palka via Libstdc++ wrote: > > Instead of defining these in terms of a helper class template > and the relatively expensive __remove_cv_t, just declare four > explicit specializations of the main template, one for each choice > of cv-quals. > > Tested on x86_6

Re: [PATCH v2] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Xi Ruoyao via Gcc-patches
On Wed, 2022-09-07 at 15:39 +0800, Lulu Cheng wrote: > Sorry, asan shadow offset is wrong in v1. > > In the file asan_mapping.h line 207: > #    define ASAN_SHADOW_OFFSET_CONST 0x4000 > > So it's should be 1<<46. LGTM. I forgot to include this change in r13-2296 :(. > > --

Re: [PATCH 2/2] libstdc++: Optimize is_reference

2022-09-07 Thread Jonathan Wakely via Gcc-patches
On Wed, 7 Sept 2022 at 01:46, Patrick Palka via Libstdc++ wrote: > > Instead of defining is_reference in terms of is_lvalue_reference > and is_rvalue_reference, just define it directly. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk? Yes, thanks (I already did this for the std::is

Re: [wwdocs PATCH RFA] contribute: link to kernel doc about patch email

2022-09-07 Thread Gerald Pfeifer
On Tue, 6 Sep 2022, Jason Merrill wrote: > It occurred to me that it would be useful to link to the kernel's > documentation for emailing patches. OK? That's a great idea, thank you, Jason! (Not strictly required by HTML 5, but I'd close the paragraph with like we generally do.) Gerald

[PATCH v3, rs6000] Change mode and insn condition for VSX scalar extract/insert instructions

2022-09-07 Thread HAO CHEN GUI via Gcc-patches
Hi, For scalar extract/insert instructions, exponent field can be stored in a 32-bit register. So this patch changes the mode of exponent field from DI to SI. The instructions using DI registers can be invoked with -mpowerpc64 in a 32-bit environment. The patch changes insn condition from TARGET

[PATCH v2] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Lulu Cheng
Sorry, asan shadow offset is wrong in v1. In the file asan_mapping.h line 207: #define ASAN_SHADOW_OFFSET_CONST 0x4000 So it's should be 1<<46. gcc/ChangeLog: PR target/106828 * config/loongarch/loongarch.cc (loongarch

Ping [PATCH] rs6000: using li/lis+oris/xoris to build constants

2022-09-07 Thread Jiufu Guo via Gcc-patches
Jiufu Guo writes: Gentle ping: https://gcc.gnu.org/pipermail/gcc-patches/2022-August/600189.html BR, Jeff(Jiufu) > Hi, > > PR106708 constaint some constants which can be support by li/lis + oris/xoris. > > For constant C: > if ((c & 0x80008000ULL) == 0x8000ULL) or say: > 32(0)+1(1)+

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-07 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of September 6, 2022 11:41 pm: > Excerpts from Iain Buclaw's message of September 6, 2022 7:02 pm: >> Excerpts from Rainer Orth's message of September 6, 2022 4:25 pm: >>> Hi Iain, >>> > there is indeed ;-) The previous d21 emits > > binary./26

PING^2: [PATCH v5] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction

2022-09-07 Thread Di Zhao OS via Gcc-patches
Gentle ping again. Thanks, Di Zhao > -Original Message- > From: Di Zhao OS > Sent: Tuesday, July 12, 2022 2:08 AM > To: 'gcc-patches@gcc.gnu.org' > Cc: 'Richard Biener' > Subject: PING: [PATCH v5] tree-optimization/101186 - extend FRE with > "equivalence map" for condition prediction >

[PATCH] LoongArch: Fix pr106828 by define hook TARGET_ASAN_SHADOW_OFFSET in loongarch backend.

2022-09-07 Thread Lulu Cheng
gcc/ChangeLog: PR target/106828 * config/loongarch/loongarch.cc (loongarch_asan_shadow_offset): New. (TARGET_ASAN_SHADOW_OFFSET): New. gcc/testsuite/ChangeLog: PR target/106828 * g++.target/loongarch/pr106828.C: New test. --- gcc/config/loongarch/loongarc

[PATCH V3] rs6000: cannot_force_const_mem for HIGH code rtx[PR106460]

2022-09-07 Thread Jiufu Guo via Gcc-patches
Hi, As the issue in PR106460, a rtx 'high:DI (symbol_ref:DI ("var_48")' is tried to store into constant pool and ICE occur. But actually, this rtx represents partial address and can not be put into a .rodata section. This patch updates rs6000_cannot_force_const_mem to return true for rtx(s) with

[committed] openmp: Fix handling of target constructs in static member functions [PR106829]

2022-09-07 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 16, 2021 at 08:43:27PM +0800, Chung-Lin Tang wrote: > 2021-11-16 Chung-Lin Tang > > PR middle-end/92120 > > gcc/cp/ChangeLog: > > * semantics.c (handle_omp_array_sections_1): Add handling to create ... > (finish_omp_target_clauses): New function. Just calling cu