Re: [PATCH] aarch64: fix build failure on aarch64-none-elf

2024-09-26 Thread Andrew Pinski
On Thu, Sep 26, 2024 at 10:28 AM Andrew Pinski wrote: > > On Thu, Sep 26, 2024 at 10:15 AM Matthieu Longo > wrote: > > > > A previous patch ([1]) introduced a build regression on aarch64-none-elf > > target. The changes were primarilly tested on aarch64-unknown-linux-gnu, > > so the issue was mi

Re: [PATCH] arm: Force flag_pic for FDPIC

2024-09-26 Thread Fangrui Song
On Thu, Sep 26, 2024 at 11:21 AM Ramana Radhakrishnan wrote: > > On Mon, Mar 4, 2024 at 1:43 PM Fangrui Song wrote: > > > > From: Fangrui Song > > > > -fno-pic -mfdpic generated code is like regular -fno-pic, not suitable > > for FDPIC (absolute addressing for symbol references and no function >

Re: [PATCH] aarch64: fix build failure on aarch64-none-elf

2024-09-26 Thread Andrew Pinski
On Thu, Sep 26, 2024 at 10:15 AM Matthieu Longo wrote: > > A previous patch ([1]) introduced a build regression on aarch64-none-elf > target. The changes were primarilly tested on aarch64-unknown-linux-gnu, > so the issue was missed during development. > The includes are slighly different between

Re: [PATCH] arm: Force flag_pic for FDPIC

2024-09-26 Thread Ramana Radhakrishnan
On Mon, Mar 4, 2024 at 1:43 PM Fangrui Song wrote: > > From: Fangrui Song > > -fno-pic -mfdpic generated code is like regular -fno-pic, not suitable > for FDPIC (absolute addressing for symbol references and no function > descriptor). The sh port simply upgrades -fno-pic to -fpie by setting > fl

Re: [PATCH] arm: Fix missed CE optimization for armv8.1-m.main [PR 116444]

2024-09-26 Thread Ramana Radhakrishnan
> On 25 Sep 2024, at 7:38 PM, Andre Vieira (lists) > wrote: > > External email: Use caution opening links or attachments > > > Hi, > > This patch restores missed optimizations for armv8.1-m.main targets that > were missed when the generation of csinc, csinv and csneg were enabled > or the sa

Re: [PATCH 0/2] arm: Allow -mcpu and -march options to be unset

2024-09-26 Thread Ramana Radhakrishnan
On Thu, Sep 12, 2024 at 8:42 PM Richard Earnshaw wrote: > > This short patch series adds the ability to unset the -mcpu and -march > options on the Arm port. This helps to avoid ambiguities and warnings > if, for some reason, the compiler flags need to be overridden. > > The main intent of this i

Re: [PATCH V4 04/10] arm: Fix arm backend-use of (u|s|us)dot_prod patterns

2024-09-26 Thread Ramana Radhakrishnan
On Thu, Sep 5, 2024 at 4:30 PM Victor Do Nascimento wrote: > > > Changes from previous revision: > > As was done for the equivalent aarch64 patch, we rework this patch to do away > with > mission creep, keeping changes as simple as possible. > > We thus remove the `gimple_fold_builtin' changes th

Re: [PATCH] c++/coro: ignore cleanup_point_exprs while expanding awaits [PR116793]

2024-09-26 Thread Jason Merrill
On 9/25/24 6:24 PM, Arsen Arsenović wrote: Tested on x86_64-pc-linux-gnu. OK for trunk? OK. TIA -- >8 -- If we reach a CLEANUP_POINT_EXPR while trying to walk statements, we actually care about the statement or statement list contained within it. Indeed, such a construction

Re: [PATCH] tree-optimization/116850 - path isolation fails to update post-dominators

2024-09-26 Thread Jeff Law
On 9/26/24 5:06 AM, Richard Biener wrote: When path isolation performs CFG manipulations (block splitting) it fails to update post-dominators it computes on-demand. That both runs into dominance verification issues when we compute post-dominators again and possibly accessing missing or broken

Re: [PATCH] tree-optimization/114855 - speed up dom_oracle::register_transitives

2024-09-26 Thread Andrew MacLeod
On 9/26/24 10:03, Andrew MacLeod wrote: On 9/26/24 03:07, Richard Biener wrote: On Wed, 25 Sep 2024, Andrew MacLeod wrote: I added a note to the PR before I saw this... we can just disable transitives when the graph gets too big... I don't think they are worth the expense when things ge

Re: [PATCH] c++: tweak for -Wrange-loop-construct [PR116731]

2024-09-26 Thread Jason Merrill
On 9/18/24 2:35 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK. -- >8 -- This PR reports that the warning would be better off using a check for trivially constructible rather than trivially copyable. LLVM accepted a similar fix: https://github.com/ll

Re: RFC PATCH: contrib/test_summary mode for submitting testsuite results to bunsen

2024-09-26 Thread Frank Ch. Eigler
Hi - > Regarding functionality, perfect enough AFAICT. I was going to > make a nitpick comment about comments with full sentences and > all that GNU...but better be consistent with the rest of the > file. Thanks! I don't mind addressing even nitpicks, while awaiting word from someone who can

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-26 Thread Sam James
Andreas Schwab writes: > This has been fixed in commit d31c9cf54ac. Thanks.

Re: [PATCH] tree-optimization/114855 - speed up dom_oracle::register_transitives

2024-09-26 Thread Andrew MacLeod
ge_query and a create a gori_ssa unit for it during DOM.. ie something like range_query *m_ranger = get_global_range_query (); m_ranger->create_gori (); then there will be a normnal set of exports calculated as required... And instead of disable_ranger (),  call m_ranger->destroy_gori (); All in th

Re: [PATCH] tree-optimization/116850 - path isolation fails to update post-dominators

2024-09-26 Thread Richard Biener
On Thu, 26 Sep 2024, Richard Biener wrote: > When path isolation performs CFG manipulations (block splitting) it > fails to update post-dominators it computes on-demand. That both > runs into dominance verification issues when we compute post-dominators > again and possibly accessing missing or b

Re: RFC PATCH: contrib/test_summary mode for submitting testsuite results to bunsen

2024-09-26 Thread Hans-Peter Nilsson
On Mon, 23 Sep 2024, Frank Ch. Eigler wrote: > Hi, HP - > > > I'd love for (something like) gcc-testresults@ to be usefully > > searchable (it can be done but... lacks), so please allow me: > > Certainly! > > > > +: ${bunsengit=ssh://sourceware.org/git/bunsendb.git/}; > > > +: ${bunsentag=`who

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-26 Thread Andreas Schwab
This has been fixed in commit d31c9cf54ac. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."

Re: [Patch][RFC] Fortran/OpenMP: Middle-end support for mapping of DT with allocatable components

2024-09-26 Thread Tobias Burnus
Now committed as r15-3895-ge4a58b6f28383c. * * * Next step is to sent the Fortran part. While it exists, I want to proof read what I wrote a couple years back and I want to split-off the polymorphism/class part as the current implementation has some issues and OpenMP 6 decided to disallow pol

Re: [PATCH v2] libgcc, libstdc++: Make TU-local declarations in headers external linkage [PR115126]

2024-09-26 Thread Jakub Jelinek
On Thu, Sep 26, 2024 at 08:34:45PM +1000, Nathaniel Shead wrote: > --- a/libgcc/gthr-posix.h > +++ b/libgcc/gthr-posix.h > @@ -44,6 +44,21 @@ see the files COPYING3 and COPYING.RUNTIME respectively. > If not, see > # endif > #endif > > +#ifdef __has_attribute > +# if __has_attribute(__always_

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-26 Thread Andreas Schwab
On Aug 14 2024, Sam James wrote: > In particular, this now allows some harmless diagnostic flags (especially > useful for things like -Werror=odr), more optimization flags, and some > Clang-specific options. This now passes -Werror down to the linker, which breaks the binutils build with LTO beca

Re: [PATCH 0/5] arm, MVE: Refactor the vst and vld intrinsics

2024-09-26 Thread Christophe Lyon
ping? On Mon, 16 Sept 2024 at 11:39, Christophe Lyon wrote: > > From: Alfie Richards > > Hi, > > This patch series refactors the MVE vst and vld intrinsics to use the builtins > framework. > > This is a prerequisite for a later patch which adds gimple folding which in > turn enables some optimis

Re: [PATCH v2 00/36] arm: [MVE intrinsics] Re-implement more intrinsics

2024-09-26 Thread Christophe Lyon
ping? On Wed, 4 Sept 2024 at 15:27, Christophe Lyon wrote: > > Hi, > > This is v2 of the patch series I sent in > https://gcc.gnu.org/pipermail/gcc-patches/2024-July/657065.html. > > I have taken into account the feedback I received, and added more > patches to the series, converting more MVE int

Re: [PATCH v4 2/2] arm: [MVE intrinsics] Improve vdupq_n implementation

2024-09-26 Thread Christophe Lyon
ping? On Mon, 9 Sept 2024 at 14:44, Christophe Lyon wrote: > > ping? > > On Tue, 30 Jul 2024 at 23:41, Christophe Lyon wrote: > > > > Hi, > > > > v4 of patch 2/2 fixes a small mistake in 3 testcases, by relaxing the > > expected q0 as result register into q[0-9]+ to account for codegen > > diffe

Re: [PATCH] pretty-print: Fix up allocate_object

2024-09-26 Thread Richard Biener
On Thu, 26 Sep 2024, Jakub Jelinek wrote: > On Thu, Aug 29, 2024 at 06:58:12PM -0400, David Malcolm wrote: > > The following patch rewrites the internals of pp_format. > > > The tokens and token lists are allocated on the chunk_obstack, and so > > there's no additional heap activity required, wit

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-26 Thread Giuseppe D'Angelo
Hi, Thank you for the review. Il 25/09/24 20:13, Jason Merrill ha scritto: Supporting the ambiguous case seems pointless to me but, that is what the accepted proposal specifies, so indeed that's what we should implement. It's fundamentally the same with is_base_of, also supporting ambiguous

Re: [PATCH] tree-optimization/114855 - speed up dom_oracle::register_transitives

2024-09-26 Thread Richard Biener
ize and after we're fast again but lousy to optimize even "cheap" cases. That said, my main issue right now is that DOM at -O1 is comparatively very expensive on those testcases - if you look at a profile 98% of it's time is spent in ranger code. Fortunately we do have -fexp

Re: [PATCH 10/10] c++/modules: Validate external linkage definitions in header units [PR116401]

2024-09-25 Thread Nathaniel Shead
On Tue, Sep 24, 2024 at 09:47:17AM +1000, Nathaniel Shead wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? > > -- >8 -- > > [module.import] p6 says "A header unit shall not contain a definition of > a non-inline function or variable whose name has external linkage." > >

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Nathaniel Shead
On Wed, Sep 25, 2024 at 01:30:55PM +0200, Jakub Jelinek wrote: > On Wed, Sep 25, 2024 at 12:18:07PM +0100, Jonathan Wakely wrote: > > > > And whether similarly we couldn't use > > > > __attribute__((__visibility__ ("hidden"))) on the static block scope > > > > vars for C++ (again, if compiler supp

Re: [PATCH] x86: Extend AVX512 Vectorization for Popcount in Various Modes

2024-09-25 Thread Hongtao Liu
On Tue, Sep 24, 2024 at 10:16 AM Levy Hsu wrote: > > This patch enables vectorization of the popcount operation for V2QI, V4QI, > V8QI, V2HI, V4HI, and V2SI modes. Ok. > > gcc/ChangeLog: > > * config/i386/mmx.md: > (VQI_16_32_64): New mode iterator for 8-byte, 4-byte, and 2-byte >

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-25 Thread Jason Merrill
On 9/25/24 4:21 PM, Marek Polacek wrote: On Wed, Sep 25, 2024 at 08:54:46AM -0400, Jason Merrill wrote: On 9/24/24 5:10 PM, Marek Polacek wrote: On Fri, Sep 20, 2024 at 06:39:52PM -0400, Jason Merrill wrote: On 9/20/24 12:18 AM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-g

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-25 Thread Marek Polacek
On Wed, Sep 25, 2024 at 08:54:46AM -0400, Jason Merrill wrote: > On 9/24/24 5:10 PM, Marek Polacek wrote: > > On Fri, Sep 20, 2024 at 06:39:52PM -0400, Jason Merrill wrote: > > > On 9/20/24 12:18 AM, Marek Polacek wrote: > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > >

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-25 Thread rep . dot . nop
>Your interpretation of my typo is correct. Along with Andre I like auto >cleanup. On new test cases we try to have them self delete whether they pass >or fail. > so why don't we issue the cleanup then, regardless? >So your changes are ok with me. > >> No. >> >>>

Re: [PATCH v2] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-25 Thread rep . dot . nop
On 25 September 2024 13:51:07 CEST, Andre Vehreschild wrote: >Hi Hans-Peter, > >preface: I am not a testsuite nor an m4 expert. > >So I may be wrong in arguing that your changes look reasonable. I like the >"automatic" clean-up process very much. So by me, ok for mainline. But you may >want to wai

Re: [PATCH v5] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-25 Thread Qing Zhao
> On Sep 17, 2024, at 07:05, Jakub Jelinek wrote: > > On Tue, Sep 17, 2024 at 11:13:09AM +0200, Jakub Jelinek wrote: >> So maybe better >>tree arg = e_p->value; >>tree f; >>if ((in_typeof || in_alignof) >> && TREE_CODE (arg) == COMPONENT_REF >> && (f = TREE_OPERAND (arg, 1)) >> && T

Re: [PATCH] doc: Remove @code wrapping of fortran option names [PR116801]

2024-09-25 Thread Mikael Morin
Le 23/09/2024 à 20:37, Andreas Schwab a écrit : On Sep 23 2024, Mikael Morin wrote: For options where the variable is not a separate argument, I think it's preferable to keep the variable. For example, -ffree-line-length-@var{n} looks better on the index page as "-ffree-line-length-n" (with th

Re: [PATCH v5] Provide new GCC builtin __builtin_counted_by_ref [PR116016]

2024-09-25 Thread Qing Zhao
Sorry for the late reply (just came back from LPC after Cauldron). > On Sep 17, 2024, at 05:13, Jakub Jelinek wrote: > > On Sat, Sep 14, 2024 at 08:58:28PM +0200, Jakub Jelinek wrote: >>if (has_counted_by_object (e_p->value)) >> expr.value = get_counted_by_ref (e_p->value); >>else

Re: [PATCH] doc: Remove @code wrapping of fortran option names [PR116801]

2024-09-25 Thread Mikael Morin
Le 23/09/2024 à 20:43, Arsen Arsenović a écrit : Andreas Schwab writes: It's only about the @opindex. The vast majority have those variable parts removed from the index entry. We can probably do both at the same time, either via makeinfos -D option and some special macro, or by emitting a m

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-25 Thread Jason Merrill
On 9/25/24 12:44 PM, Patrick Palka wrote: On Wed, 25 Sep 2024, Jason Merrill wrote: On 7/30/24 6:49 PM, Giuseppe D'Angelo wrote: On 29/07/2024 22:53, Giuseppe D'Angelo wrote: Hi, The attached patch is a stab at adding the necessary compiler builtin to support std::is_virtual_base_of (P2985R0

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-25 Thread Jerry D
On 9/24/24 5:46 PM, Hans-Peter Nilsson wrote: Thanks for the review! Date: Tue, 24 Sep 2024 17:10:27 -0700 Cc: Jerry D From: Jerry D On 9/23/24 11:21 PM, Hans-Peter Nilsson wrote: I hope the inclusion of gfortran-dg.exp in fortran-torture.exp is not controversial, but there's no fortran-spec

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-25 Thread Patrick Palka
On Wed, 25 Sep 2024, Jason Merrill wrote: > On 7/30/24 6:49 PM, Giuseppe D'Angelo wrote: > > On 29/07/2024 22:53, Giuseppe D'Angelo wrote: > > > Hi, > > > > > > The attached patch is a stab at adding the necessary compiler builtin to > > > support std::is_virtual_base_of (P2985R0, approved for C+

Re: [PATCH v2] Provide more contexts for -Warray-bounds warning messages

2024-09-25 Thread Qing Zhao
Sorry for the late reply (just back to work after the Cauldron and LPC conferences). Thanks a lot for your suggestions. Yes, I agree that the option need a better name -:) and we will figure this out after more study. During this year’s Cauldron and LPC, I got quite some good comments and

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-25 Thread Jason Merrill
On 7/30/24 6:49 PM, Giuseppe D'Angelo wrote: On 29/07/2024 22:53, Giuseppe D'Angelo wrote: Hi, The attached patch is a stab at adding the necessary compiler builtin to support std::is_virtual_base_of (P2985R0, approved for C++26). The name of the builtin matches the one just merged into clang:

Re: [PATCH v2] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-25 Thread Hans-Peter Nilsson
> Date: Wed, 25 Sep 2024 13:51:07 +0200 > From: Andre Vehreschild > Hi Hans-Peter, > > preface: I am not a testsuite nor an m4 expert. Neither am I. Luckily, this has nothing to do with m4, and not really that much to do with tcl or dejagnu either, being just basic code, no language-specific t

Re: [PATCH] tree-optimization/114855 - speed up dom_oracle::register_transitives

2024-09-25 Thread Andrew MacLeod
On 9/25/24 06:51, Richard Biener wrote: dom_oracle::register_transitives contains an unbound dominator walk which for the testcase in PR114855 dominates the profile. I've also noticed odd behavior in the case when set_one_relation returns NULL, we'd then completely abort processing other relati

Re: [PATCH v4] match: Fix A || B not optimized to true when !B implies A [PR114326]

2024-09-25 Thread Philipp Tomsich
Applied to master with a fixup for the spurious whitespace-change/removal of newline (at the end of the file), thanks! --Philipp. On Wed, 25 Sept 2024 at 15:02, Richard Biener wrote: > > On Thu, Sep 19, 2024 at 2:18 PM Konstantinos Eleftheriou > wrote: > > > > From: kelefth > > > > In expressio

Re: [PATCH] c++: Add testcase for DR 2874

2024-09-25 Thread Jason Merrill
On 9/25/24 10:01 AM, Jakub Jelinek wrote: Hi! Seems we already allow the partial specializations the way the DR clarifies, so this patch just adds a testcase which verifies that. Tested on x86_64-linux, ok for trunk? OK. 2024-09-25 Jakub Jelinek * g++.dg/DRs/dr2874.C: New test.

Re: [PATCH] c++: Add testcase for DR 2836

2024-09-25 Thread Jason Merrill
On 9/25/24 10:00 AM, Jakub Jelinek wrote: Hi! Seems we already handle it the way the DR clarifies, if double/long double and std::float64_t have the same mode, foo has long double type (while x + y would be _Float64 in C23), so this patch just adds a testcase which verifies that. Tested on x86_

Re: [PATCH] c++: Add testcase for DR 2728

2024-09-25 Thread Jason Merrill
On 9/25/24 9:57 AM, Jakub Jelinek wrote: Hi! Seems we already handle delete expressions the way the DR clarifies, so this patch just adds a testcase which verifies that. Tested on x86_64-linux, ok for trunk? OK. 2024-09-25 Jakub Jelinek * g++.dg/DRs/dr2728.C: New test. --- gcc/

Re: [PATCH] c++: use TARGET_EXPR accessors

2024-09-25 Thread Jason Merrill
On 9/25/24 9:31 AM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? OK (and obvious, IMO). -- >8 -- While futzing around with PR116416 I noticed that we can use the _SLOT and _INITIAL macros to make the code more readable. gcc/c-family/ChangeLog: *

Re: [PATCH v2] match: Change (A * B) + (-C) to (B - C/A) * A, if C multiple of A [PR109393]

2024-09-25 Thread Philipp Tomsich
Applied to master, thanks! --Philipp. On Wed, 25 Sept 2024 at 14:56, Richard Biener wrote: > > On Tue, Sep 17, 2024 at 9:43 AM Konstantinos Eleftheriou > wrote: > > > > From: kelefth > > > > The following function: > > > > int foo(int *a, int j) > > { > > int k = j - 1; > > return a[j - 1]

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-25 Thread Richard Biener
On Wed, 25 Sep 2024, Sam James wrote: > Alan Modra writes: > > > On Thu, Sep 19, 2024 at 11:52:48PM +0100, Sam James wrote: > >> Sam James writes: > >> > >> > Sam James writes: > >> > > >> >> libtool defaults to filtering flags passed at link-time. > >> >> > >> >> This brings the filtering in

Re: [PATCH] MATCH: add abs support for half float

2024-09-25 Thread Richard Biener
On Wed, Sep 25, 2024 at 12:12 PM Kugan Vivekanandarajah wrote: > > Hi Richard, > > > On 24 Sep 2024, at 6:16 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Mon, Sep 23, 2024 at 10:52 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi

Re: [PATCH v2] match: Fix `a != 0 ? a * b : 0` patterns for things that trap [PR116772]

2024-09-25 Thread Richard Biener
On Tue, Sep 24, 2024 at 2:59 AM Andrew Pinski wrote: > > For generic, `a != 0 ? a * b : 0` would match where `b` would be an expression > which trap (in the case of the testcase, it was an integer division but it > could be any). > > This adds a new helper function, expr_no_side_effects_p which t

Re: [PATCH v1 1/2] Match: Support form 3 for vector signed integer .SAT_ADD

2024-09-25 Thread Richard Biener
On Sat, Sep 21, 2024 at 4:23 PM wrote: > > From: Pan Li > > This patch would like to support the form 3 of the vector signed > integer .SAT_ADD. Aka below example: > > Form 3: > #define DEF_VEC_SAT_S_ADD_FMT_3(T, UT, MIN, MAX) \ > void __attribute__((noinline))

Re: [PATCH v4] match: Fix A || B not optimized to true when !B implies A [PR114326]

2024-09-25 Thread Richard Biener
On Thu, Sep 19, 2024 at 2:18 PM Konstantinos Eleftheriou wrote: > > From: kelefth > > In expressions like (a != b || ((a ^ b) & c) == d) and > (a != b || (a ^ b) == c), (a ^ b) is folded to false. > In the equivalent expressions (((a ^ b) & c) == d || a != b) and > ((a ^ b) == c || a != b) this i

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-25 Thread Patrick Palka
[CC'ing Jason] On Wed, 25 Sep 2024, Patrick Palka wrote: > On Wed, 31 Jul 2024, Giuseppe D'Angelo wrote: > > > On 29/07/2024 22:53, Giuseppe D'Angelo wrote: > > > Hi, > > > > > > The attached patch is a stab at adding the necessary compiler builtin to > > > support std::is_virtual_base_of (P298

Re: [PATCH 1/2 v2] Introduce __builtin_is_virtual_base_of

2024-09-25 Thread Patrick Palka
On Wed, 31 Jul 2024, Giuseppe D'Angelo wrote: > On 29/07/2024 22:53, Giuseppe D'Angelo wrote: > > Hi, > > > > The attached patch is a stab at adding the necessary compiler builtin to > > support std::is_virtual_base_of (P2985R0, approved for C++26). The name > > of the builtin matches the one jus

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-25 Thread Sam James
Alan Modra writes: > On Thu, Sep 19, 2024 at 11:52:48PM +0100, Sam James wrote: >> Sam James writes: >> >> > Sam James writes: >> > >> >> libtool defaults to filtering flags passed at link-time. >> >> >> >> This brings the filtering in GCC's 'fork' of libtool into sync with >> >> upstream libt

Re: [PATCH v2] match: Change (A * B) + (-C) to (B - C/A) * A, if C multiple of A [PR109393]

2024-09-25 Thread Richard Biener
On Tue, Sep 17, 2024 at 9:43 AM Konstantinos Eleftheriou wrote: > > From: kelefth > > The following function: > > int foo(int *a, int j) > { > int k = j - 1; > return a[j - 1] == a[k]; > } > > does not fold to `return 1;` using -O2 or higher. The cause of this is that > the expression `4 * j

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-25 Thread Jason Merrill
On 9/24/24 5:10 PM, Marek Polacek wrote: On Fri, Sep 20, 2024 at 06:39:52PM -0400, Jason Merrill wrote: On 9/20/24 12:18 AM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? -- >8 -- This PR reports a missed optimization. When we have: Str str{"Test"};

Re: [Patch] OpenMP: Update OMP_REQUIRES_TARGET_USED for declare_target + interop

2024-09-25 Thread Tobias Burnus
Hi now committed the following as r15-3856-gfcff9c3dad4f35 with two testcase additions (and improved changelog wording). Tobias Burnus wrote: OpenMP mandates that when certain clauses are used with 'omp requires' that in all compilation units this requires clause appears. Those clauses infl

Re: [PATCH] Speed up get_bitmask_from_range

2024-09-25 Thread Jakub Jelinek
On Wed, Sep 25, 2024 at 01:42:04PM +0200, Richard Biener wrote: > When min != max we know min ^ max != 0. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > * value-range.cc (get_bitmask_from_range): Remove redundant > compare of xorv with zero. LGTM. Jakub

Re: [PATCH v2] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-25 Thread Andre Vehreschild
Hi Hans-Peter, preface: I am not a testsuite nor an m4 expert. So I may be wrong in arguing that your changes look reasonable. I like the "automatic" clean-up process very much. So by me, ok for mainline. But you may want to wait for one other ok from some one who has more experience in the gfort

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Jakub Jelinek
On Wed, Sep 25, 2024 at 12:18:07PM +0100, Jonathan Wakely wrote: > > > And whether similarly we couldn't use > > > __attribute__((__visibility__ ("hidden"))) on the static block scope > > > vars for C++ (again, if compiler supports that), so that the changes > > > don't affect ABI of C++ libraries

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Jonathan Wakely
On Wed, 25 Sept 2024 at 11:47, Jonathan Wakely wrote: > > On Wed, 25 Sept 2024 at 11:29, Jakub Jelinek wrote: > > > > On Wed, Sep 25, 2024 at 10:43:50AM +0100, Jonathan Wakely wrote: > > > > libgcc/ChangeLog: > > > > > > > > * gthr-posix.h (__GTHREAD_INLINE): New macro. > > > > (_

Re: [PATCH] x86: Don't use address override with segment regsiter

2024-09-25 Thread Uros Bizjak
On Wed, Sep 25, 2024 at 11:42 AM H.J. Lu wrote: > > Address override only applies to the (reg32) part in the thread address > fs:(reg32). Don't rewrite thread address like > > (set (reg:CCZ 17 flags) > (compare:CCZ (reg:SI 98 [ __gmpfr_emax.0_1 ]) > (mem/c:SI (plus:SI (plus:SI (unspec

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Jonathan Wakely
On Wed, 25 Sept 2024 at 11:29, Jakub Jelinek wrote: > > On Wed, Sep 25, 2024 at 10:43:50AM +0100, Jonathan Wakely wrote: > > > libgcc/ChangeLog: > > > > > > * gthr-posix.h (__GTHREAD_INLINE): New macro. > > > (__gthread_active): Convert from variable to function. > > > (__g

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Jakub Jelinek
On Wed, Sep 25, 2024 at 10:43:50AM +0100, Jonathan Wakely wrote: > > libgcc/ChangeLog: > > > > * gthr-posix.h (__GTHREAD_INLINE): New macro. > > (__gthread_active): Convert from variable to function. > > (__gthread_trigger): Mark as __GTHREAD_INLINE instead of static. > >

Re: [PATCH] Fortran: Added support for locality specs in DO CONCURRENT (Fortran 2018/23)

2024-09-25 Thread Andre Vehreschild
Hi all, I finally managed to apply the fixed patch. It still had some stray line break so check_GNU_style.py wouldn't succeed. But with that fixed I agree to have only some nonsense bickering of the script. As to the patch (I have stripped large parts.): > diff --git a/gcc/fortran/gfortran.h b/g

Re: [PATCH] libgfortran: Replace mutex with rwlock

2024-09-25 Thread Jonathan Wakely
On 27/12/22 08:33 -0800, H.J. Lu wrote: On Sun, Dec 25, 2022 at 4:58 PM Steve Kargl via Gcc-patches wrote: On Wed, Dec 21, 2022 at 07:27:11PM -0500, Lipeng Zhu via Fortran wrote: > This patch try to introduce the rwlock and split the read/write to > unit_root tree and unit_cache with rwlock in

Re: [PATCH] i386, v2: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-25 Thread Jakub Jelinek
On Wed, Sep 25, 2024 at 11:36:33AM +0200, Richard Biener wrote: > I'll note it would be much simpler if we could write x > y ? x : y in > the intrinsic header. Unfortunately, not so much. It can do that only for simple cases like _mm_min_p{s,d} or similar, which aren't masked, aren't the "scalar"

Re: [PATCH v1] RISC-V: Cleanup debug code for SAT_* testcases [NFC]

2024-09-25 Thread 钟居哲
OK juzhe.zh...@rivai.ai From: pan2.li Date: 2024-09-25 16:10 To: gcc-patches CC: juzhe.zhong; kito.cheng; jeffreyalaw; rdapp.gcc; Pan Li Subject: [PATCH v1] RISC-V: Cleanup debug code for SAT_* testcases [NFC] From: Pan Li Some print code for debugging is committed by mistake, remove them f

Re: [PATCH] libgcc, libstdc++: Make more entities no longer TU-local [PR115126]

2024-09-25 Thread Jonathan Wakely
On Wed, 25 Sept 2024 at 01:50, Nathaniel Shead wrote: > > I found that my previous minimal change to libstdc++ was only sufficient > to pass regtest on x86_64-pc-linux-gnu; Linaro complained about ARM and > aarch64. This patch removes the rest of the internal-linkage entities I > could find expos

Re: [PATCH] i386, v2: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-25 Thread Richard Biener
On Wed, Sep 25, 2024 at 10:49 AM Hongtao Liu wrote: > > On Wed, Sep 25, 2024 at 4:42 PM Jakub Jelinek wrote: > > > > On Wed, Sep 25, 2024 at 10:17:50AM +0800, Hongtao Liu wrote: > > > > + for (int i = 0; i < 2; ++i) > > > > + { > > > > + unsigned count = vector

Re: [PATCH v1 1/3] Match: Support form 1 for scalar signed integer SAT_SUB

2024-09-25 Thread Richard Biener
On Wed, Sep 25, 2024 at 4:56 AM wrote: > > From: Pan Li > > This patch would like to support the form 1 of the scalar signed > integer SAT_SUB. Aka below example: > > Form 1: > #define DEF_SAT_S_SUB_FMT_1(T, UT, MIN, MAX) \ > T __attribute__((noinline)) \ > sat_s_sub_##T##

Re: [PATCH] i386, v2: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-25 Thread Hongtao Liu
On Wed, Sep 25, 2024 at 4:42 PM Jakub Jelinek wrote: > > On Wed, Sep 25, 2024 at 10:17:50AM +0800, Hongtao Liu wrote: > > > + for (int i = 0; i < 2; ++i) > > > + { > > > + unsigned count = vector_cst_encoded_nelts (args[i]), j; > > > + for (j = 0;

Re: [PATCH] x86/{,V}AES: adjust when to force EVEX encoding

2024-09-25 Thread Jan Beulich
t;>> As an aside - {evex} (and other) pseudo-prefixes would better be avoided >>>> anyway whenever possible, as those are getting in the way of code >>>> putting in place macro overrides for certain insns: gas 2.43 rejects >>>> such bogus placement of pseudo-prefixes. > So it sounds like a walkaround in GCC to avoid the gas bug? There's no gas bug here. Gas 2.43 is validly complaining; older gas was buggy not to complain. > In general, I'm ok for the patch since we already did that in > TARGET_AES patterns. IOW AIUI I'm to re-submit then with an adjusted (shortened) description. Okay. Jan

Re: [PATCH] x86/{,V}AES: adjust when to force EVEX encoding

2024-09-25 Thread Hongtao Liu
On Wed, Sep 25, 2024 at 3:55 PM Jan Beulich wrote: > > On 25.09.2024 09:38, Hongtao Liu wrote: > > On Wed, Sep 25, 2024 at 2:56 PM Jan Beulich wrote: > >> > >> Commit a79d13a01f8c ("i386: Fix aes/vaes patterns [PR114576]") correctly > >> said "..., but we need to emit {evex} prefix in the assembl

Re: [PATCH 3/3] phiprop: VOP phi confuses phiprop [PR116824]

2024-09-25 Thread Richard Biener
On Tue, Sep 24, 2024 at 6:14 PM Andrew Pinski wrote: > > Another small phiprop improvement, in some cases > we could have a vop defining statement be a phi which might > be the same bb as the load happens. This is ok since the phi > here is not a store so we can just accept it. > > Bootstrapped an

Re: [PATCH 2/3] phiprop: Skip over clobbers [PR116823]

2024-09-25 Thread Richard Biener
On Tue, Sep 24, 2024 at 6:15 PM Andrew Pinski wrote: > > In C++ code the clobber gets in the way of phiprop. > E.g. > ``` > if (lr_bitpos.2401_412 < rr_bitpos.2402_413) > goto ; [INV] > else > goto ; [INV] > >: > >: > MEM[(struct poly_int *)&D.192544] ={v} {CLOBBER(bob)}; >

Re: [PATCH 1/3] Add an alternative testcase for PR 70740

2024-09-25 Thread Richard Biener
On Tue, Sep 24, 2024 at 6:14 PM Andrew Pinski wrote: > > While looking into improving phiprop, I noticed that > the current pr70740.c testcase was being optimized almost > all the way before phiprop because the addresses were considered > the same; the arrays were all zero in size. > > This adds a

Re: [PATCH] x86/{,V}AES: adjust when to force EVEX encoding

2024-09-25 Thread Jan Beulich
On 25.09.2024 09:38, Hongtao Liu wrote: > On Wed, Sep 25, 2024 at 2:56 PM Jan Beulich wrote: >> >> Commit a79d13a01f8c ("i386: Fix aes/vaes patterns [PR114576]") correctly >> said "..., but we need to emit {evex} prefix in the assembly if AES ISA >> is not enabled". Yet it did so only for the TARG

Re: [PATCH] x86/{,V}AES: adjust when to force EVEX encoding

2024-09-25 Thread Hongtao Liu
On Wed, Sep 25, 2024 at 2:56 PM Jan Beulich wrote: > > Commit a79d13a01f8c ("i386: Fix aes/vaes patterns [PR114576]") correctly > said "..., but we need to emit {evex} prefix in the assembly if AES ISA > is not enabled". Yet it did so only for the TARGET_AES insns. Going from > the alternative cho

Re: [PATCH 1/2] rtl-optimization/114855 - slow add_store_equivs in IRA

2024-09-25 Thread Richard Biener
ke sure the forward walk in memref_used_between_p > > will find the insn in question. Given we do have a CFG here the > > functions operation is questionable, given memref_used_between_p > > together with the walk of all insns is obviously quadratic in the > > worst case that whole th

Re: [PATCH v1 3/3] RISC-V: Refine the testcase of vector SAT_TRUNC

2024-09-24 Thread 钟居哲
LGTM juzhe.zh...@rivai.ai From: pan2.li Date: 2024-09-25 14:45 To: gcc-patches CC: juzhe.zhong; kito.cheng; jeffreyalaw; rdapp.gcc; Pan Li Subject: [PATCH v1 3/3] RISC-V: Refine the testcase of vector SAT_TRUNC From: Pan Li Take scan-assembler-times for vsadd insn check instead of function

Re: [r15-3834 Regression] FAIL: c-c++-common/gomp/declare-variant-duplicates.c (test for excess errors) on Linux/x86_64

2024-09-24 Thread Sandra Loosemore
On 9/24/24 14:08, haochen.jiang wrote: On Linux/x86_64, 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 is the first bad commit commit 96246bff0bcd9e5cdec9e6cf811ee3db4997f6d4 Author: Sandra Loosemore Date: Fri Sep 6 20:58:13 2024 + OpenMP: Check additional restrictions on context selector

Re: [PATCH] i386: Add GENERIC and GIMPLE folders of __builtin_ia32_{min,max}* [PR116738]

2024-09-24 Thread Hongtao Liu
On Wed, Sep 25, 2024 at 1:07 AM Jakub Jelinek wrote: > > Hi! > > The following patch adds GENERIC and GIMPLE folders for various > x86 min/max builtins. > As discussed, these builtins have effectively x < y ? x : y > (or x > y ? x : y) behavior. > The GENERIC folding is done if all the (relevant)

Re: [PATCH] [x86] Define VECTOR_STORE_FLAG_VALUE

2024-09-24 Thread Hongtao Liu
On Tue, Sep 24, 2024 at 5:46 PM Uros Bizjak wrote: > > On Tue, Sep 24, 2024 at 11:23 AM liuhongt wrote: > > > > Return constm1_rtx when GET_MODE_CLASS (MODE) == MODE_VECTOR_INT. > > Otherwise NULL_RTX. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > Ready push to trunk. > >

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-24 Thread Hans-Peter Nilsson
Thanks for the review! > Date: Tue, 24 Sep 2024 17:10:27 -0700 > Cc: Jerry D > From: Jerry D > On 9/23/24 11:21 PM, Hans-Peter Nilsson wrote: > > I hope the inclusion of gfortran-dg.exp in > > fortran-torture.exp is not controversial, but there's no > > fortran-specific testsuite file common to

Re: [PATCH] gfortran testsuite: Remove unit-files in files having open-statements, PR116701

2024-09-24 Thread Jerry D
On 9/23/24 11:21 PM, Hans-Peter Nilsson wrote: Here's a general approach to handle PR116701. I considered adding manual deletions as quoted below and mentioned in the PR, but seeing the handling of "integer 8" in fortran-torture-execute I decided to follow that example: better scan the source fo

Re: [PATCH] ltmain.sh: allow more flags at link-time

2024-09-24 Thread Alan Modra
On Thu, Sep 19, 2024 at 11:52:48PM +0100, Sam James wrote: > Sam James writes: > > > Sam James writes: > > > >> libtool defaults to filtering flags passed at link-time. > >> > >> This brings the filtering in GCC's 'fork' of libtool into sync with > >> upstream libtool commit 22a7e547e9857fc94fe5

Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jonathan Wakely
On Tue, 24 Sept 2024, 21:43 Jason Merrill, wrote: > On 9/24/24 7:51 AM, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. > > > > Is this the right fix, or do we want to stop using these deprecated > classes, > > here and in stl_function.h? > We can't stop using them in stl_function.h for ABI

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-24 Thread Marek Polacek
On Sat, Sep 21, 2024 at 05:00:51PM +0200, Jakub Jelinek wrote: > On Fri, Sep 20, 2024 at 07:03:45PM -0400, Jason Merrill wrote: > > > The CALL_EXPR case in cp_fold uses !flag_no_inline instead, that makes > > > more > > > sense to me. > > > Because checking "noinline" attribute (which means don't

Re: [PATCH] c++: compile time evaluation of prvalues [PR116416]

2024-09-24 Thread Marek Polacek
On Fri, Sep 20, 2024 at 06:39:52PM -0400, Jason Merrill wrote: > On 9/20/24 12:18 AM, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > This PR reports a missed optimization. When we have: > > > >Str str{"Test"}; > >callback(str);

Re: [PATCH] libstdc++: more #pragma diagnostic

2024-09-24 Thread Jason Merrill
On 9/24/24 7:51 AM, Jason Merrill wrote: Tested x86_64-pc-linux-gnu. Is this the right fix, or do we want to stop using these deprecated classes, here and in stl_function.h? Oops, adding libstdc++ CC. -- 8< -- The CI saw failures on 17_intro/headers/c++2011/parallel_mode.cc due to -Wdepreca

Re: [PATCH] Simplify range-op shift mask generation

2024-09-24 Thread Aldy Hernandez
Richard Biener writes: > The following reduces the number of wide_ints built which show up > in the profile for PR114855 as the largest remaining bit at -O1. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. Thanks.

Re: [PATCH 03/10] c++/modules: Use decl_linkage in maybe_record_mergeable_decl

2024-09-24 Thread Jason Merrill
On 9/23/24 7:44 PM, Nathaniel Shead wrote: I don't currently have any testcases where this changes something, but I felt it to be a valuable cleanup. Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. -- >8 -- This avoids any possible inconsistencies (current or future) ab

Re: [PATCH] c++, v2: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]

2024-09-24 Thread Jakub Jelinek
On Tue, Sep 24, 2024 at 01:34:44PM -0400, Jason Merrill wrote: > Let's also give an error for trying to disable it in C++23+. > Missing function comment, maybe just use the one below? > Please add a comment to this and range-for4 explaining that this is to get > the fix enabled in GNU modes. > > O

Re: [PATCH 02/10] c++: Update decl_linkage for C++11

2024-09-24 Thread Jason Merrill
On 9/23/24 7:43 PM, Nathaniel Shead wrote: This patch intends no change in functionality apart from the mangling difference noted; more tests are in patch 4 of this series, which adds a way to actually check what the linkage of decl_linkage provides more directly. Bootstrapped and regtested on x

Re: [PATCH] c++, v2: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]

2024-09-24 Thread Jason Merrill
On 9/24/24 12:53 PM, Jakub Jelinek wrote: On Mon, Sep 23, 2024 at 03:46:36PM -0400, Jason Merrill wrote: -frange-based-for-ext-temps or do you have better suggestion? I'd probably drop "based", "range-for" seems enough. Shall we allow also disabling it in C++23 or later modes, or override us

  1   2   3   4   5   6   7   8   9   10   >