[PATCH] c++/modules: Avoid rechecking initializers when streaming NTTPs [PR116382]

2024-08-15 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- When reading an NTTP we call get_template_parm_object which delegates setting of DECL_INITIAL to the general cp_finish_decl procedure, which calls check_initializer to validate and record it. Apart from being unnecessary (

Re: [PATCH] Fortran: fix doumentation of intrinsic RANDOM_INIT [PR114146]

2024-08-15 Thread Andre Vehreschild
Hi Harald, s/doumentation/documentation/ in the commit's title. Thanks for the patch, ok to commit. - Andre On Thu, 15 Aug 2024 22:37:53 +0200 Harald Anlauf wrote: > Dear all, > > here's a documentation bugfix. The previous wording was in conflict > with the standard, while the runtime beha

Re: [RESEND PATCH v5 1/3] ifcvt: handle sequences that clobber flags in noce_convert_multiple_sets

2024-08-15 Thread Jeff Law
On 8/7/24 1:25 AM, Manolis Tsamis wrote: On Wed, Aug 7, 2024 at 8:57 AM Sam James wrote: Philipp Tomsich writes: Hi, Sam, Jakub & Robin, We had an "OK for trunk" from Jeff for v4 (see https://gcc.gnu.org/pipermail/gcc-patches/2024-July/656907.html) and it has been two more weeks for th

Re: [PATCH v2] RISC-V: Make sure high bits of usadd operands is clean for HI/QI [PR116278]

2024-08-15 Thread Andrew Waterman
On Thu, Aug 15, 2024 at 9:23 PM Jeff Law wrote: > > > > On 8/13/24 10:16 PM, Li, Pan2 wrote: > >> How specifically is it avoided for SI? ISTM it should have the exact > >> same problem with a constant like 0x8000 in SImode on rv64 which is > >> going to be extended to 0x8000. > >

Re: [PATCH v2] RISC-V: Make sure high bits of usadd operands is clean for HI/QI [PR116278]

2024-08-15 Thread Jeff Law
On 8/13/24 10:16 PM, Li, Pan2 wrote: How specifically is it avoided for SI? ISTM it should have the exact same problem with a constant like 0x8000 in SImode on rv64 which is going to be extended to 0x8000. HI and QI need some special handling for sum. For example, for HImode

[PATCH v2] Optimize initialization of small padded objects

2024-08-15 Thread Alexandre Oliva
On Aug 15, 2024, Alexandre Oliva wrote: > I can't quite envision what to check for in a target-independent test. Got it. Also dropped some occurrences of CONST_CAST_TREE that I added, then changed function signatures but failed to remove them. Retested on x86_64-linux-gnu. Ok to install? Wh

Re: [PATCH v2] [libstdc++] [testsuite] avoid async.cc loss of precision [PR91486]

2024-08-15 Thread Alexandre Oliva
On Aug 7, 2024, Alexandre Oliva wrote: > On Aug 1, 2024, Alexandre Oliva wrote: >> Each iteration calls float_steady_clock::now() [...] an extra iteration >> will reach 5 and cause the test to fail. >> (Do we really want to use floats, that even with this tweak have >> borderline precision fo

[PATCH] Dump aliases in -fcallgraph-info

2024-08-15 Thread Alexandre Oliva
Dump ICF-unified decls, thunks, aliases and whatnot along with their ultimate targets, with edges from the alias to the target. Add support for dropping the source file's suffix when forming from dump-base, so that auxiliary files can be scanned, such as the .ci files generated by -fcallgraph-in

Re: [PATCH v2] [testsuite] add linkonly to dg-additional-sources [PR115295]

2024-08-15 Thread Sam James
Pinging this one on behalf of Alexandre. It fixes a bunch of D test failures for us (I'm slowly working my way through packaging issues). Iain mentioned it's blocking him upgrading the D stdlib too. signature.asc Description: PGP signature

[PATCHv2, aarch64] Implement 16-byte vector mode const0 store by TImode

2024-08-15 Thread HAO CHEN GUI
Hi, I submitted a patch to change the mode checking for CLEAR_BY_PIECES. https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660344.html It causes some regressions on aarch64. With the patch, V2x8QImode is used to do clear by pieces instead of TImode as vector mode is preferable and V2x8QImo

Re: [PATCHv3, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-15 Thread HAO CHEN GUI
Hi Richard, It's a good point. I will test it. Thanks a lot. Thanks Gui Haochen 在 2024/8/15 17:50, Richard Sandiford 写道: > HAO CHEN GUI writes: >> Hi, >> This patch adds const0 move checking for CLEAR_BY_PIECES. The original >> vec_duplicate handles duplicates of non-constant inputs. But 0 i

[PUSHED] PHIOPT: Fix comment before factor_out_conditional_operation

2024-08-15 Thread Andrew Pinski
From: Andrew Pinski I didn't update the comment before factor_out_conditional_operation correctly. this updates it to be correct and mentions unary operations rather than just conversions. Pushed as obvious. gcc/ChangeLog: * tree-ssa-phiopt.cc (factor_out_conditional_operation): Update

Re: [PATCH] c++: Pedwarn on [[]]; at class scope [PR110345]

2024-08-15 Thread Jason Merrill
On 8/15/24 4:58 PM, Jakub Jelinek wrote: Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. The fourth issue is that we just emit (w

Re: [PATCH v2] c++: Ensure ANNOTATE_EXPRs remain outermost expressions in conditions [PR116140]

2024-08-15 Thread Jason Merrill
On 8/12/24 1:55 PM, Alex Coplan wrote: Hi! This is a v2 patch of: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659968.html that addresses Jakub's feedback. FWIW, I tried to contrive a testcase where convert_from_reference kicks in and we get called with an ANNOTATE_EXPR in maybe_conver

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Jakub Jelinek
On Thu, Aug 15, 2024 at 10:07:00PM +, Joseph Myers wrote: > On Thu, 15 Aug 2024, Jakub Jelinek wrote: > > > + D(embed, T_EMBED,STDC23,INCL | EXPAND) \ > > I'd like to query the macro expansion handling. My understanding is that > a #embed directive only gets macro

Re: [PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Joseph Myers
On Thu, 15 Aug 2024, Jakub Jelinek wrote: > + D(embed, T_EMBED,STDC23,INCL | EXPAND) \ I'd like to query the macro expansion handling. My understanding is that a #embed directive only gets macro-expanded if it fails to match either of the forms # embed < h-char-

[RFC PATCH] c++: Disallow [[deprecated]] on types other than class/enum definitions [PR110345]

2024-08-15 Thread Jakub Jelinek
Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. The patch below contains that testcase. One needed change for this particular attr

[COMMITTED] RISC-V: use fclass insns to implement isfinite, isnormal and isinf builtins

2024-08-15 Thread Vineet Gupta
Currently these builtins use float compare instructions which require FP flags to be saved/restored which could be costly in uarch. RV Base ISA already has FCLASS.{d,s,h} instruction to compare/identify FP values w/o disturbing FP exception flags. Now that upstream supports the corresponding optab

[PATCH] c++: Pedwarn on [[]]; at class scope [PR110345]

2024-08-15 Thread Jakub Jelinek
Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. The fourth issue is that we just emit (when enabled) -Wextra-semi warning not just

[PATCH] c++: Allow standard attributes after closing square bracket in new-type-id [PR110345]

2024-08-15 Thread Jakub Jelinek
Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. The first thing I found is that we aren't parsing standard attributes in noptr-new-

[PATCH] c++: Parse and ignore attributes on base specifiers [PR110345]

2024-08-15 Thread Jakub Jelinek
Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. This is the third issue I found. https://eel.is/c++draft/class.derived#general-1 h

[PATCH] c++: Appertain standard attributes after array closing square bracket to array type rather than declarator [PR110345]

2024-08-15 Thread Jakub Jelinek
Hi! For C++ 26 P2552R3 I went through all the spots (except modules) where attribute-specifier-seq appears in the grammar and tried to construct a testcase in all those spots, for now for [[deprecated]] attribute. This is the second issue I found. The comment already correctly says that attribut

[committed] fortran: Fix bootstrap in resolve.cc [PR116387]

2024-08-15 Thread Jakub Jelinek
Hi! On Thu, Aug 15, 2024 at 08:50:38PM +0200, Jakub Jelinek wrote: > > whoopsie, I am sorry for that. > > > > What I don't get is, why this has not been reported during my bootstrap. I > > am > > doing this to bootstrap: > > > > LANG=C "${SRCPATH}/configure" \ > > --dis

[PATCH] Fortran: fix doumentation of intrinsic RANDOM_INIT [PR114146]

2024-08-15 Thread Harald Anlauf
Dear all, here's a documentation bugfix. The previous wording was in conflict with the standard, while the runtime behavior is apparently fine. Checked with make dvi pdf . OK for mainline? Thanks, Harald From 4515018fd858fb6ae98b54d507596ef123d7580e Mon Sep 17 00:00:00 2001 From: Harald Anlau

[pushed] wwwdocs: news: Avoid (obsolete) link for Blackfin

2024-08-15 Thread Gerald Pfeifer
This has started to redirect and an enormous URL, and being end of life for half a decade now... Pushed. Gerald --- htdocs/news.html | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/news.html b/htdocs/news.html index c8271e0a..cef5ee80 100644 --- a/htdocs/news.ht

Re: [Fortran, Patch, PR110033, v1] Fix associate for coarrays

2024-08-15 Thread Andre Vehreschild
Hi Jakub, I will not be faster by far. I have just started and am still in stage 1. So please you go ahead. And thank you very much for the help. - Andre On Thu, 15 Aug 2024 20:50:38 +0200 Jakub Jelinek wrote: > On Thu, Aug 15, 2024 at 08:30:12PM +0200, Andre Vehreschild wrote: > > Hi Harald,

Re: [Fortran, Patch, PR110033, v1] Fix associate for coarrays

2024-08-15 Thread Jakub Jelinek
On Thu, Aug 15, 2024 at 08:30:12PM +0200, Andre Vehreschild wrote: > Hi Harald, > > whoopsie, I am sorry for that. > > What I don't get is, why this has not been reported during my bootstrap. I am > doing this to bootstrap: > > LANG=C "${SRCPATH}/configure" \ > --disable

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-15 Thread Kees Cook
On Tue, Aug 13, 2024 at 03:33:26PM +, Qing Zhao wrote: > With the addition of the 'counted_by' attribute and its wide roll-out > within the Linux kernel, a use case has been found that would be very > nice to have for object allocators: being able to set the counted_by > counter variable withou

[pushed] c++: fix up cpp23/consteval-if3.C test [PR115583]

2024-08-15 Thread Patrick Palka
Compiling with optimizations is needed to trigger the bug fixed by r15-2369. PR c++/115583 gcc/testsuite/ChangeLog: * g++.dg/cpp23/consteval-if13.C: Compile with -O. --- gcc/testsuite/g++.dg/cpp23/consteval-if13.C | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite

Re: [Fortran, Patch, PR110033, v1] Fix associate for coarrays

2024-08-15 Thread Andre Vehreschild
Hi Harald, whoopsie, I am sorry for that. What I don't get is, why this has not been reported during my bootstrap. I am doing this to bootstrap: LANG=C "${SRCPATH}/configure" \ --disable-multilib\ --enable-languages=c,fortran,c++\ --pref

[PATCH 2/7] libdiagnostics v3: implementation

2024-08-15 Thread David Malcolm
Changed in v3: * Added a --enable-libdiagnostics to configure.ac. It is disabled by default, and requires --enable-host-shared. * Split out gcc/testsuite/libdiagnostics.dg/libdiagnostics.exp into another patch * Update copyright year * class diagnostic_logical_location: Add get_name_for_path_o

[PATCH 6/7] json: add json parsing support

2024-08-15 Thread David Malcolm
This patch implements JSON parsing support. It's based on the parsing parts of the patch I posted here: https://gcc.gnu.org/legacy-ml/gcc-patches/2017-08/msg00417.html with the parsing moved to a separate source file and header, heavily rewritten to capture source location information for JSON val

[PATCH 5/7] libdiagnostics v3: test suite

2024-08-15 Thread David Malcolm
Changed in v3: * split out the C and C++ API tests into this patch * heavily rewritten libdiagnostics.exp; added support for Python tests * tests updated for API changes, rewritten and extended gcc/testsuite/ChangeLog: * libdiagnostics.dg/libdiagnostics.exp: New, adapted from jit.exp.

[PATCH 4/7] testsuite: move dg-test cleanup code from gcc-dg.exp to its own file

2024-08-15 Thread David Malcolm
I need to use this cleanup logic for the testsuite for libdiagnostics where it's too awkward to directly use gcc-dg.exp itself. No functional change intended. gcc/testsuite/ChangeLog: * lib/dg-test-cleanup.exp: New file, from material moved from lib/gcc-dg.exp. * lib/gcc-d

[PATCH 3/7] libdiagnostics v3: add C++ wrapper API

2024-08-15 Thread David Malcolm
Changed in v3: * Moved the testsuite to a separate patch * Updated copyright year * class text_sink: New. * class file: Add default ctor, copy ctor, move ctor; make m_inner non-const * class physical_location: Add default ctor * class logical_location: Make m_inner non-const * class execution_pat

[PATCH 1/7] libdiagnostics v3: header

2024-08-15 Thread David Malcolm
Changed in v3: * Added support for execution paths * Moved the test cases to another patch * diagnostic_manager_add_sarif_sink: add param "main_input_file" * Added diagnostic_text_sink_set_colorize * Added DIAGNOSTIC_LEVEL_SORRY * Updated copyright year Changed in v2: * Changed from diagnostic_loc

[PATCH 0/7] v3 of libdiagnostics

2024-08-15 Thread David Malcolm
Here's v3 of my patch kit for "libdiagnostics", which makes GCC's diagnostics subsystem available as a shared library; see: https://gcc.gnu.org/wiki/libdiagnostics New in v3: * it bootstraps and pass regression tests * I added an opt-in configure flag: --enable-libdiagnostics, which must be en

Re: [Fortran, Patch, PR110033, v1] Fix associate for coarrays

2024-08-15 Thread Harald Anlauf
Hi Andre, Am 15.08.24 um 17:35 schrieb Andre Vehreschild: Hi Harald, hi Paul, thanks for the ok and the suggestions/recommendations on the testcase. I added that and commit as: gcc-15-2935-gdbf4c574b92 I didn't notice this while skimming over the patch, but gcc-testresults has: ../../src-mas

[PATCH] gnat: fix lto-type-mismatch between C_Version_String and gnat_version_string [PR115917]

2024-08-15 Thread Arsen Arsenović
Reg-tested on x86_64-pc-linux-gnu with all languages and yes,rtl,extra checking. OK for trunk? TIA, have a lovely day. -- >8 -- gcc/ada/ChangeLog: PR ada/115917 * gnatvsn.ads: Add note about the duplication of this value in verrsion.c. * version.c

Re: [PATCH v3 0/5] aarch64: Fix intrinsic availability [PR112108]

2024-08-15 Thread Andrew Carlotti
On Thu, Aug 15, 2024 at 05:15:03PM +0100, Richard Sandiford wrote: > Andrew Carlotti writes: > > This series of patches fixes issues with some intrinsics being incorrectly > > gated by global target options, instad of just using function-specific > > target > > options. These issues have been pr

[RESEND PATCH v5] RISC-V: use fclass insns to implement isfinite, isnormal and isinf builtins

2024-08-15 Thread Vineet Gupta
This was approved but resending so CI can retest after the ranges fixes. --- Currently these builtins use float compare instructions which require FP flags to be saved/restored which could be costly in uarch. RV Base ISA already has FCLASS.{d,s,h} instruction to compare/identify FP values w/o dist

[GCC 14] aarch64: Add another use of force_subreg [PR115464]

2024-08-15 Thread Richard Sandiford
I'd like to backport r15-1244 to GCC 14 and then apply the patch below. === This patch includes the testcase from r15-1399 plus a miminal fix for it, without the other proactive uses of force_subreg. We can backport other force_subreg calls later if they're shown to be needed. Boostrapped & regr

Re: [PATCH v3 0/5] aarch64: Fix intrinsic availability [PR112108]

2024-08-15 Thread Richard Sandiford
Andrew Carlotti writes: > This series of patches fixes issues with some intrinsics being incorrectly > gated by global target options, instad of just using function-specific target > options. These issues have been present since the +tme, +memtag and +ls64 > intrinsics were introduced. > > Compar

[PATCH v2] Update LDPT_REGISTER_CLAIM_FILE_HOOK_V2 linker plugin hook

2024-08-15 Thread H.J. Lu
The new hook allows the linker plugin to distinguish calls to claim_file_handler that know the object is being used by the linker (from ldmain.c:add_archive_element), from calls that don't know it's being used by the linker (from elf_link_is_defined_archive_symbol); in the latter case, the plugin s

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

2024-08-15 Thread Sam James
Sam James writes: > Eric Gallager writes: > >> On Wed, Aug 14, 2024 at 8:50 AM Sam James wrote: >>> >>> 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 22a7e547e9857fc94fe5bc7c921d9a

[PATCH v3 5/5] aarch64: Fix ls64 intrinsic availability

2024-08-15 Thread Andrew Carlotti
The availability of ls64 intrinsics and data types were determined solely by the globally specified architecture features, which did not reflect any changes specified in target pragmas or attributes. This patch removes the initialisation-time guards for the intrinsics, and replaces them with check

[PATCH v3 4/5] aarch64: Fix memtag intrinsic availability

2024-08-15 Thread Andrew Carlotti
The availability of memtag intrinsics and data types were determined solely by the globally specified architecture features, which did not reflect any changes specified in target pragmas or attributes. This patch removes the initialisation-time guards for the intrinsics, and replaces them with che

[PATCH v3 2/5] aarch64: Move check_required_extensions

2024-08-15 Thread Andrew Carlotti
Move SVE extension checking functionality to aarch64-builtins.cc, so that it can be shared by non-SVE intrinsics. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (check_builtin_call) (expand_builtin): Update calls to the below. (report_missing_extension, report_mis

[PATCH v3 3/5] aarch64: Fix tme intrinsic availability

2024-08-15 Thread Andrew Carlotti
The availability of tme intrinsics was previously gated at both initialisation time (using global target options) and usage time (accounting for function-specific target options). This patch removes the check at initialisation time, and also moves the intrinsics out of the header file to allow for

[PATCH v3 1/5] aarch64: Refactor check_required_extensions

2024-08-15 Thread Andrew Carlotti
Replace TARGET_GENERAL_REGS_ONLY check with an explicit check that aarch64_isa_flags enables all required extensions. This will be more flexible when repurposing this function for non-SVE intrinsics. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (check_required_register

[PATCH v3 0/5] aarch64: Fix intrinsic availability [PR112108]

2024-08-15 Thread Andrew Carlotti
This series of patches fixes issues with some intrinsics being incorrectly gated by global target options, instad of just using function-specific target options. These issues have been present since the +tme, +memtag and +ls64 intrinsics were introduced. Compared to the previous version, this ser

Re: [Fortran, Patch, PR110033, v1] Fix associate for coarrays

2024-08-15 Thread Andre Vehreschild
Hi Harald, hi Paul, thanks for the ok and the suggestions/recommendations on the testcase. I added that and commit as: gcc-15-2935-gdbf4c574b92 @Paul: At the moment I am taking a look at 46371. The patch makes that proceed a bit more, but still ICEing. I will address it and then check 56496. Tha

Re: [PATCH] libstdc++-v3: testsuite: Prune uncapitalized "in function" linker warning

2024-08-15 Thread Hans-Peter Nilsson
> Date: Wed, 14 Aug 2024 22:12:23 -0500 > From: Jacob Bachmeyer > Done and pushed to Savannah as commit > ed301dbd6a3d769670503ccfda1ea31b58d02547. Please confirm that this > solves the problem. Confirmed*... > (Also note that you can now run DejaGnu from a Git checkout, simply use > the "r

Re: [PATCH] Tweak base/index disambiguation in decompose_normal_address [PR116236]

2024-08-15 Thread Andreas Schwab
On Aug 15 2024, Jeff Law wrote: > On 8/15/24 2:50 AM, Richard Sandiford wrote: >> The PR points out that, for an address like: >>(plus (zero_extend X) Y) >> decompose_normal_address doesn't establish a strong preference >> between treating X as the base or Y as the base. As the comment >> in

Re: [PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-15 Thread Jeff Law
On 8/15/24 2:45 AM, Richard Sandiford wrote: When it removes a definition, late-combine tries to update all uses in notes. It does this using the same insn_propagation class that it uses for patterns. However, insn_propagation uses validate_change, which in turn resets the INSN_CODE. This i

Re: [PATCH] Tweak base/index disambiguation in decompose_normal_address [PR116236]

2024-08-15 Thread Jeff Law
On 8/15/24 2:50 AM, Richard Sandiford wrote: The PR points out that, for an address like: (plus (zero_extend X) Y) decompose_normal_address doesn't establish a strong preference between treating X as the base or Y as the base. As the comment in the patch says, zero_extend isn't enough on

Re: [PATCH 3/5] testsuite: Ensure ltrans dump files get cleaned up properly [PR116140]

2024-08-15 Thread Richard Sandiford
Alex Coplan writes: > I noticed while working on a test that uses LTO and requests a dump > file, that we are failing to cleanup ltrans dump files in the testsuite. > > E.g. the test I was working on compiles with -flto > -fdump-rtl-loop2_unroll, and we end up with the following file: > > ./gcc/te

Re: [PATCH 2/5] testsuite: Add scan-ltrans-rtl for use in dg-final [PR116140]

2024-08-15 Thread Richard Sandiford
Alex Coplan writes: > This extends the scan-ltrans-tree* helpers to create RTL variants. This > is needed to check the behaviour of an RTL pass under LTO. > > In particular it's used by a later patch in the series to check that > RTL unrolling is applied under LTO. > > Tested as a series on aarch

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

2024-08-15 Thread Sam James
Konstantinos Eleftheriou writes: > From: kelefth > > In expressions like (a != b || ((a ^ b) & CST0) == CST1) and > (a != b || (a ^ b) == CST), (a ^ b) is folded to false. > In the equivalent expressions (((a ^ b) & CST0) == CST1 || a != b) and > ((a ^ b) == CST, (a ^ b) || a != b) this is not h

[PATCH] testsuite: Reduce cut-&-paste in scanltranstree.exp

2024-08-15 Thread Richard Sandiford
scanltranstree.exp defines some LTO wrappers around standard non-LTO scanners. Four of them are cut-&-paste variants of one another, so this patch generates them from a single template. It also does the same for scan-ltrans-tree-dump-times, so that other *-times scanners can be added easily in fut

[Patch, Fortran, 77871, v1] Allow for class typed coarray parameter as dummy [PR77871]

2024-08-15 Thread Andre Vehreschild
Hi all, attached patch fixes another regression on coarrays. This time for class typed coarrays as dummys. Regtested ok on x86_64-pc-linux-gnu / Fedora 39. Ok for mainline? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de From d16ef6fe8e792063064d930f1b3ffd31c74594e1 Mon

Re: [PATCH] LoongArch: Implement scalar isinf, isnormal, and isfinite via fclass

2024-08-15 Thread Xi Ruoyao
On Mon, 2024-07-15 at 15:53 +0800, Lulu Cheng wrote: > g++.dg/opt/pr107569. C and range-sincos.c vrp-float-abs-1.c is the > same > issue, right? > > And I have no objection to code modifications. But I think it's better > to wait until this builtin > > function is fixed. Pushed r15-2931. The r

[PATCH] c++/modules: Fix type lookup in DECL_TEMPLATE_INSTANTIATIONS [PR116364]

2024-08-15 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- We need to use the DECL_TEMPLATE_INSTANTIATIONS property to find reachable specialisations from a template to ensure that any GM specialisations are properly marked as reachable. Currently the modules code uses the decl wh

Re: [Patch, rs6000, middle-end] v8: Add implementation for different targets for pair mem fusion

2024-08-15 Thread Richard Sandiford
Ajit Agarwal writes: > Hello Richard: > > On 15/08/24 3:45 pm, Richard Sandiford wrote: >> Ajit Agarwal writes: >>> +static void >>> +update_change (set_info *set) >>> +{ >>> + if (!set->has_any_uses ()) >>> +return; >>> + >>> + auto *use = *set->all_uses ().begin (); >>> + do >>> +{ >

Re: [Patch, rs6000, middle-end] v8: Add implementation for different targets for pair mem fusion

2024-08-15 Thread Ajit Agarwal
Hello Richard: On 15/08/24 3:45 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> +static void >> +update_change (set_info *set) >> +{ >> + if (!set->has_any_uses ()) >> +return; >> + >> + auto *use = *set->all_uses ().begin (); >> + do >> +{ >> + auto *next_use = use->next_u

Re: [PATCH v2] [x86] Movement between GENERAL_REGS and SSE_REGS for TImode doesn't need secondary reload.

2024-08-15 Thread Uros Bizjak
On Thu, Aug 15, 2024 at 9:27 AM liuhongt wrote: > > It results in 2 failures for x86_64-pc-linux-gnu{\ > -march=cascadelake}; > > gcc: gcc.target/i386/extendditi3-1.c scan-assembler cqt?o > gcc: gcc.target/i386/pr113560.c scan-assembler-times \tmulq 1 > > For pr113560.c, now GCC generates mulx ins

Re: [PATCH v2] [x86] Movement between GENERAL_REGS and SSE_REGS for TImode doesn't need secondary reload.

2024-08-15 Thread Hongtao Liu
On Thu, Aug 15, 2024 at 3:27 PM liuhongt wrote: > > It results in 2 failures for x86_64-pc-linux-gnu{\ > -march=cascadelake}; > > gcc: gcc.target/i386/extendditi3-1.c scan-assembler cqt?o > gcc: gcc.target/i386/pr113560.c scan-assembler-times \tmulq 1 > > For pr113560.c, now GCC generates mulx ins

Re: [Patch, rs6000, middle-end] v8: Add implementation for different targets for pair mem fusion

2024-08-15 Thread Richard Sandiford
Ajit Agarwal writes: > +static void > +update_change (set_info *set) > +{ > + if (!set->has_any_uses ()) > +return; > + > + auto *use = *set->all_uses ().begin (); > + do > +{ > + auto *next_use = use->next_use (); > + if (use->is_in_debug_insn ()) > + substitute_debug_use

Re: [x86_64 PATCH] Support wide immediate constants in STV.

2024-08-15 Thread Uros Bizjak
On Thu, Aug 15, 2024 at 11:34 AM Roger Sayle wrote: > > > As requested this patch is split out from my earlier submission. > This patch provides more accurate costs/gains for (wide) immediate > constants in STV, suitably adjusting the costs/gains when the highpart > and lowpart words are the same.

[PATCH] libcpp, v3: Add support for gnu::base64 #embed parameter

2024-08-15 Thread Jakub Jelinek
Hi! Here is a new version of the gnu::base64 parameter support, the only changes are in using the EMBED_PARAMS registry of parameters. 2024-08-15 Jakub Jelinek libcpp/ * internal.h (struct cpp_embed_params): Add base64 member. (_cpp_free_embed_params_tokens): Declare.

[PATCH] libcpp, v2: Add support for gnu::offset #embed/__has_embed parameter

2024-08-15 Thread Jakub Jelinek
Hi! Here is a new version of the gnu::offset parameter support with the use of EMBED_PARAMS macro for the registry of parameters. 2024-08-15 Jakub Jelinek libcpp/ * internal.h (struct cpp_embed_params): Add offset member. * directives.cc (EMBED_PARAMS): Add gnu::offset entry.

[PATCH] libcpp, c-family, v3: Add (dumb) C23 N3017 #embed support [PR105863]

2024-08-15 Thread Jakub Jelinek
On Wed, Aug 14, 2024 at 09:58:04PM +, Joseph Myers wrote: > On Tue, 18 Jun 2024, Jakub Jelinek wrote: > > > The following patch implements the C23 N3017 "#embed - a scannable, > > tooling-friendly binary resource inclusion mechanism" paper. > > Some initial comments, not yet reviewed the whol

Re: [x86 PATCH] Improve split of *extendv2di2_highpart_stv_noavx512vl.

2024-08-15 Thread Uros Bizjak
On Thu, Aug 15, 2024 at 11:14 AM Roger Sayle wrote: > > > This patch follows up on the previous patch to fix PR target/116275 by > improving the code STV (ultimately) generates for highpart sign extensions > like (x<<8)>>8. The arithmetic right shift is able to take advantage of > the available c

Re: [PATCHv3, expand] Add const0 move checking for CLEAR_BY_PIECES optabs

2024-08-15 Thread Richard Sandiford
HAO CHEN GUI writes: > Hi, > This patch adds const0 move checking for CLEAR_BY_PIECES. The original > vec_duplicate handles duplicates of non-constant inputs. But 0 is a > constant. So even a platform doesn't support vec_duplicate, it could > still do clear by pieces if it supports const0 move b

Re: [PATCH V2 03/10] aarch64: Fix aarch64 backend-use of (u|s|us)dot_prod patterns

2024-08-15 Thread Victor Do Nascimento
On 8/15/24 09:26, Richard Sandiford wrote: Victor Do Nascimento writes: Given recent changes to the dot_prod standard pattern name, this patch fixes the aarch64 back-end by implementing the following changes: 1. Add 2nd mode to all (u|s|us)dot_prod patterns in .md files. 2. Rewrite initializat

[x86_64 PATCH] Support wide immediate constants in STV.

2024-08-15 Thread Roger Sayle
As requested this patch is split out from my earlier submission. This patch provides more accurate costs/gains for (wide) immediate constants in STV, suitably adjusting the costs/gains when the highpart and lowpart words are the same. One minor complication is that the middle-end assumes (when ge

RE: [PATCH V3 02/10] autovectorizer: Add basic support for convert optabs

2024-08-15 Thread Tamar Christina
Hi Victor, > -Original Message- > From: Victor Do Nascimento > Sent: Thursday, August 15, 2024 9:44 AM > To: gcc-patches@gcc.gnu.org > Cc: Tamar Christina ; claz...@gmail.com; > hongtao@intel.com; s...@gcc.gnu.org; bernds_...@t-online.de; > al...@redhat.com; Victor Do Nascimento > Su

[x86 PATCH] Improve split of *extendv2di2_highpart_stv_noavx512vl.

2024-08-15 Thread Roger Sayle
This patch follows up on the previous patch to fix PR target/116275 by improving the code STV (ultimately) generates for highpart sign extensions like (x<<8)>>8. The arithmetic right shift is able to take advantage of the available common subexpressions from the preceding left shift. Hence previ

[pushed] aarch64: Rename svpext to svpext_lane [PR116371]

2024-08-15 Thread Richard Sandiford
When implementing the SME2 ACLE, I somehow missed off the _lane suffix on svpext. Tested on aarch64-linux-gnu & pushed. (I wondered about posting and waiting for comments, but the patch seems kind-of obvious, once the mistake is pointed out.) I'll backport to GCC 14 if there is no fallout. Rich

Re: Re: [PATCH v2 1/1] RISC-V: Support BF16 interfaces in libgcc

2024-08-15 Thread Xiao Zeng
2024-08-13 15:53  Jakub Jelinek wrote: > >On Tue, Aug 13, 2024 at 11:14:47AM +0800, Xiao Zeng wrote: >> Thank you very much for the in-depth discussion between Jakub Jelinek and >> jeff. >> My knowledge is narrow, and I am not familiar with architectures other than >> RISCV. >> At the same time,

[PATCH] Tweak base/index disambiguation in decompose_normal_address [PR116236]

2024-08-15 Thread Richard Sandiford
The PR points out that, for an address like: (plus (zero_extend X) Y) decompose_normal_address doesn't establish a strong preference between treating X as the base or Y as the base. As the comment in the patch says, zero_extend isn't enough on its own to assume an index, at least not on POINTE

[PATCH V3 08/10] rs6000: Adjust altivec dot-product backend patterns

2024-08-15 Thread Victor Do Nascimento
Following the migration of the dot_prod optab from a direct to a conversion-type optab, ensure all back-end patterns incorporate the second machine mode into pattern names. gcc/ChangeLog: * config/rs6000/altivec.md (udot_prod): Renamed to... (udot_prodv4si): ...this. (sdot

[PATCH V3 06/10] arc: Adjust dot-product backend patterns

2024-08-15 Thread Victor Do Nascimento
Following the migration of the dot_prod optab from a direct to a conversion-type optab, ensure all back-end patterns incorporate the second machine mode into pattern names. gcc/ChangeLog: * config/arc/simdext.md (sdot_prodv2hi): Renamed to... (sdot_prodsiv2hi): ...this. (u

[PATCH V3 07/10] mips: Adjust dot-product backend patterns

2024-08-15 Thread Victor Do Nascimento
Following the migration of the dot_prod optab from a direct to a conversion-type optab, ensure all back-end patterns incorporate the second machine mode into pattern names. gcc/ChangeLog: * config/mips/loongson-mmi.md (sdot_prodv4hi): Renamed to... (sdot_prodv2siv4hi): ...this. --

[PATCH] late-combine: Preserve INSN_CODE when modifying notes [PR116343]

2024-08-15 Thread Richard Sandiford
When it removes a definition, late-combine tries to update all uses in notes. It does this using the same insn_propagation class that it uses for patterns. However, insn_propagation uses validate_change, which in turn resets the INSN_CODE. This is inefficient in the best case, since it forces th

[PATCH V3 09/10] c6x: Adjust dot-product backend patterns

2024-08-15 Thread Victor Do Nascimento
Following the migration of the dot_prod optab from a direct to a conversion-type optab, ensure all back-end patterns incorporate the second machine mode into pattern names. gcc/ChangeLog: * config/c6x/c6x.md (sdot_prodv2hi): Renamed to... (sdot_prodsiv2hi): ...this. --- gcc/confi

[PATCH V3 03/10] aarch64: Fix aarch64 backend-use of (u|s|us)dot_prod patterns

2024-08-15 Thread Victor Do Nascimento
Given recent changes to the dot_prod standard pattern name, this patch fixes the aarch64 back-end by implementing the following changes: 1. Add 2nd mode to all (u|s|us)dot_prod patterns in .md files. 2. Rewrite initialization and function expansion mechanism for simd builtins. 3. Fix all direct ca

[PATCH V3 02/10] autovectorizer: Add basic support for convert optabs

2024-08-15 Thread Victor Do Nascimento
Given the shift from modeling dot products as direct optabs to treating them as conversion optabs, we make necessary changes to the autovectorizer code to ensure that given the relevant tree code, together with the input and output data modes, we can retrieve the relevant optab and subsequently the

[PATCH V3 10/10] autovectorizer: Test autovectorization of different dot-prod modes.

2024-08-15 Thread Victor Do Nascimento
From: Victor Do Nascimento Given the novel treatment of the dot product optab as a conversion, we are now able to targe different relationships between output modes and input modes. This is made clearer by way of example. Previously, on AArch64, the following loop was vectorizable: uint32_t udo

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

2024-08-15 Thread Victor Do Nascimento
gcc/ChangeLog: * config/arm/arm-builtins.cc (enum arm_builtins): Add new ARM_BUILTIN_* enum values: SDOTV8QI, SDOTV16QI, UDOTV8QI, UDOTV16QI, USDOTV8QI, USDOTV16QI. (arm_init_dotprod_builtins): New. (arm_init_builtins): Add call to `arm_init_dotprod_builtins

[PATCH V3 05/10] i386: Fix dot_prod backend patterns for mmx and sse targets

2024-08-15 Thread Victor Do Nascimento
Following the migration of the dot_prod optab from a direct to a conversion-type optab, ensure all back-end patterns incorporate the second machine mode into pattern names. gcc/ChangeLog: * config/i386/mmx.md (usdot_prodv8qi): Renamed to... (usdot_prodv2siv8qi): ...this. (

[PATCH V3 01/10] optabs: Make all `*dot_prod_optab's modeled as conversions

2024-08-15 Thread Victor Do Nascimento
Given the specification in the GCC internals manual defines the {u|s}dot_prod standard name as taking "two signed elements of the same mode, adding them to a third operand of wider mode", there is currently ambiguity in the relationship between the mode of the first two arguments and that of the th

[PATCH V3 00/10] optabs: Make all `*dot_prod_optab's modeled as conversions

2024-08-15 Thread Victor Do Nascimento
Changes in this revision: * [PATCH 2/10] - Make use of overloaded `directly_supported_p' in `vect_supportable_conv_optab_p' to avoid code duplication. - Given the specification in the GCC internals manual defines the {u|s}dot_prod standard name as taking "two signed elements of the same mode

Re: [PATCH V2 03/10] aarch64: Fix aarch64 backend-use of (u|s|us)dot_prod patterns

2024-08-15 Thread Richard Sandiford
Victor Do Nascimento writes: > Given recent changes to the dot_prod standard pattern name, this patch > fixes the aarch64 back-end by implementing the following changes: > > 1. Add 2nd mode to all (u|s|us)dot_prod patterns in .md files. > 2. Rewrite initialization and function expansion mechanism

[PATCH 2/3] gcov: branch, conds, calls in function summaries

2024-08-15 Thread Jørgen Kvalsvik
The gcov function summaries only output the covered lines, not the branches and calls. Since the function summaries is an opt-in it probably makes sense to also include branch coverage, calls, and condition coverage. $ gcc --coverage -fpath-coverage hello.c -o hello $ ./hello Before: $ gcov -

[PATCH 2/4] gcov: Cache source files

2024-08-15 Thread Jørgen Kvalsvik
Cache the source files as they are read, rather than discarding them at the end of output_lines (), and move the reading of the source file to the new function slurp. This patch does not really change anything other than moving the file reading out of output_file, but set gcov up for more interact

[PATCH 1/3] gcov: Cache source files

2024-08-15 Thread Jørgen Kvalsvik
Cache the source files as they are read, rather than discarding them at the end of output_lines (), and move the reading of the source file to the new function slurp. This patch does not really change anything other than moving the file reading out of output_file, but set gcov up for more interact

[PATCH 3/4] gcov: branch, conds, calls in function summaries

2024-08-15 Thread Jørgen Kvalsvik
The gcov function summaries only output the covered lines, not the branches and calls. Since the function summaries is an opt-in it probably makes sense to also include branch coverage, calls, and condition coverage. $ gcc --coverage -fpath-coverage hello.c -o hello $ ./hello Before: $ gcov -

[PATCH 1/4] testsuite: Use dg-compile, not gcc -c

2024-08-15 Thread Jørgen Kvalsvik
Since this is a pure compile test it makes sense to inform dejagnu of it. gcc/testsuite/ChangeLog: * gcc.misc-tests/gcov-23.c: Use dg-compile, not gcc -c --- gcc/testsuite/gcc.misc-tests/gcov-23.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.mis

[PATCH 0/4] Prime path coverage in gcc/gcov

2024-08-15 Thread Jørgen Kvalsvik
Ping. Since the last patch I have fixed a few bugs in the path count limit aborting, and a few minor rephrases in docs. Jørgen Kvalsvik (4): testsuite: Use dg-compile, not gcc -c gcov: Cache source files gcov: branch, conds, calls in function summaries Add prime path coverage to gcc/gcov

  1   2   >