RE: [PATCH] libgcobol: Drop unhelpful constexpr keyword [PR120554]

2025-06-06 Thread Robert Dubner
We are taking care of this separately, as part of a larger set of changes. So, please don't apply the patch; we're likely to trip over each other. Thanks! > -Original Message- > From: Jakub Jelinek > Sent: Friday, June 6, 2025 09:48 > To: Robert Dubner ; James K. Lowden > > Cc: gcc-pat

[PATCH] Improve copy prop for aggregates and combine with zeroing case

2025-06-06 Thread Andrew Pinski
This improves copy prop for aggregates by working over statements that don't modify the access just like how it is done for copying zeros. To speed up things, we should only have one loop back on the vuse instead of doing it twice for each load/store assignments. PR tree-optimization/142

Re: [PATCH] libgcobol: Drop unhelpful constexpr keyword [PR120554]

2025-06-06 Thread James K. Lowden
On Fri, 6 Jun 2025 15:48:27 +0200 Jakub Jelinek wrote: > In any case, the class doesn't have any constexpr constructors, so > it isn't a literal type, one can't construct those objects in constant > expressions and so using constexpr keyword for the defaulted copy > assignment operator can't help

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-06 Thread Jeff Law
On 6/6/25 11:58 AM, Robin Dapp wrote: Note it’s far from obvious to me whether for stride and gather loads the alignment of the elements loaded falls under the scalar or vector load restriction.  Is this explicitly spelled out for risc-v or is that your interpretation? We have the followin

Re: [PATCH] expand: Improve store_field for `{}` stores of non mode size [PR110459]

2025-06-06 Thread Andrew Pinski
On Thu, Jun 5, 2025 at 11:39 PM Richard Biener wrote: > > On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski > wrote: > > > > Currently we expand `{}` and store zeros to the stack and then do a full > > mode load back. This is a waste, instead we should just use the zero cst > > in the mode that fits

[committed] libstdc++: Use std::conditional_t instead of lambda to select semaphore implementation

2025-06-06 Thread Jonathan Wakely
The lambda expression causes testsuite failures such as: FAIL g++.dg/modules/xtreme-header-2_b.C -std=c++26 (test for excess errors) libstdc++-v3/ChangeLog: * include/bits/semaphore_base.h (_Select_semaphore_impl): Rename to _Semaphore_impl and use std::conditional_t instead of an

RE: [PATCH] libgcobol: Drop unhelpful constexpr keyword [PR120554]

2025-06-06 Thread Robert Dubner
I once was involved in a dinner party where three different people dumped "a little bit" of salt into the soup while it was cooking. This feels like that. I'll be taking care of this. > -Original Message- > From: James K. Lowden > Sent: Friday, June 6, 2025 14:51 > To: gcc-patches@gcc.g

[committed] libstdc++: Add more tests for semaphores

2025-06-06 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * testsuite/30_threads/semaphore/1.cc: Check type properties and max() values. * testsuite/30_threads/semaphore/3.cc: New test. * testsuite/30_threads/semaphore/cons_neg.cc: New test. --- Tested x86_64-linux and sparc-solaris. Pushed to trun

[PATCH] doc: document -fconcepts-diagnostics-depth=

2025-06-06 Thread Patrick Palka
Built on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps release branches? -- >8 -- Jonathan noticed this flag isn't documented in the manual. gcc/ChangeLog: * doc/invoke.texi: Add -fconcepts-diagnostics-depth. --- gcc/doc/invoke.texi | 8 +++- 1 file changed, 7 insert

[PATCH] test: Do not include in g++.dg/modules/xtreme-header*.h

2025-06-06 Thread Jonathan Wakely
Including behaves differently depending on whether you have the TBB headers installed or not. Without them installed, the modules tests PASS, but with TBB headers installed they FAIL with: gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H: internal compiler error: in core_vals, at cp/module.cc:66

[pushed] c++: recursive template with deduced return [PR120555]

2025-06-06 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Here since r15-4120 we were prematurely complaining about the use of func within its own definiton, which is fine at instantiation time. So don't require this for function templates that are currently being defined. But keep the error for

[PATCH v1 2/4] RISC-V: Add test for vec_duplicate + vdivu.vv combine case 0 with GR2VR cost 0, 2 and 15

2025-06-06 Thread pan2 . li
From: Pan Li Add asm dump check test for vec_duplicate + vdivu.vv combine to vdivu.vx, with the GR2VR cost is 0, 2 and 15. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-1-u16.c: Add asm check for vdivu.vx combine. * gcc.target/riscv/rvv/autovec/vx_vf/v

[PATCH v1 4/4] RISC-V: Reconcile the existing test for vdivu.vx combine

2025-06-06 Thread pan2 . li
From: Pan Li Some existing vdiv related test need some adjust for the asm check due to cost model. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/binop/vdiv-rv32gcv-nofm.c: Adjust the asm check for vdivu. * gcc.target/riscv/rvv/autovec/binop/vdiv-rv32gcv.c: Ditt

[PATCH v1 0/4] RISC-V: Combine vec_duplicate + vdivu.vv to vdivu.vx on GR2VR cost

2025-06-06 Thread pan2 . li
From: Pan Li This patch would like to introduce the combine of vec_dup + vdivu.vv into vdivu.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VR is zero, or reject the combine if non-zero like 1, 15 in test. There will be two cases for the combine: Case 0: |

[PATCH v1 1/4] RISC-V: Combine vec_duplicate + vidvu.vv to vdivu.vx on GR2VR cost

2025-06-06 Thread pan2 . li
From: Pan Li This patch would like to combine the vec_duplicate + vdivu.vv to the vdivu.vx. From example as below code. The related pattern will depend on the cost of vec_duplicate from GR2VR. Then the late-combine will take action if the cost of GR2VR is zero, and reject the combination if th

[PATCH v1 3/4] RISC-V: Add test for vec_duplicate + vdivu.vv combine case 1 with GR2VR cost 0, 1 and 2

2025-06-06 Thread pan2 . li
From: Pan Li Add asm dump check test for vec_duplicate + vdivu.vv combine to vdivu.vx, with the GR2VR cost is 0, 1 and 2. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vx_vf/vx-4-u16.c: Add asm check for vdivu.vx combine. * gcc.target/riscv/rvv/autovec/vx_vf/vx

Re: [PATCH v2] libstdc++: hashing support for chrono value classes (P2592R2)

2025-06-06 Thread Giuseppe D'Angelo
Hi Tomasz, Thank you for reviewing the original patch! I'm attaching a second version, hopefully addressing what you've highlighed. I've also pushed it on Forge: https://forge.sourceware.org/gcc/gcc-TEST/pulls/52 On 24/04/2025 15:30, Tomasz Kaminski wrote: Hi, I am reattaching the origina

Re: [PATCH v1 0/4] RISC-V: Combine vec_duplicate + vdivu.vv to vdivu.vx on GR2VR cost

2025-06-06 Thread Kito Cheng
LGTM On Fri, Jun 6, 2025 at 3:06 PM wrote: > > From: Pan Li > > This patch would like to introduce the combine of vec_dup + vdivu.vv into > vdivu.vx on the cost value of GR2VR. The late-combine will take place if > the cost of GR2VR is zero, or reject the combine if non-zero like 1, 15 > in tes

Re: [RFC] RISC-V: Support -mcpu for XiangShan Kunminghu cpu.

2025-06-06 Thread Jiawei
Committed on trunk with typo fixed, thanks! https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f0cd40f71ba424bde94dcddbf1df67bb100b82ef Jiawei 在 2025/6/4 21:33, Jeff Law 写道: On 6/4/25 3:56 AM, Jiawei wrote: This patch adds support for the XiangShan Kunminghu CPU in GCC, allowing the use of the `-

Re: [PATCH] [lra] force reg update after spilling to memory [PR120424]

2025-06-06 Thread Alexandre Oliva
On Jun 6, 2025, Alexandre Oliva wrote: > Now, since lra_update_fp2sp_elimination checks that > !elimination_fp2sp_occured_p, we *could* disable the fp2sp elimination, > if it's selected, right away, so that it is not applied after we've > disabled it, and then we don't have to worry about disabl

Re: [PATCH v6 1/3][Middle-end] Provide more contexts for -Warray-bounds, -Wstringop-*warning messages due to code movements from compiler transformation (Part 1) [PR109071, PR85788, PR88771, PR106762,

2025-06-06 Thread Richard Biener
On Fri, May 30, 2025 at 5:13 PM Qing Zhao wrote: > > Hi, Richard, > > Really appreciate for your suggestions. > > > On May 30, 2025, at 05:22, Richard Biener > > wrote: > > > > On Fri, May 23, 2025 at 10:49 PM Qing Zhao wrote: > >> > >> Hi, Richard, > >> > >> Thanks a lot for your comments and

[PATCH] libstdc++: Support wide characters output for sys_info and local_info [PR120565]

2025-06-06 Thread Tomasz Kamiński
Formatting sys_info as wchar_t require widening of the abbrev (zone) member. To support that we reuse the existing code in support for '%Z' specifier, for local_time_format, and produce output using singe format call with "[{0:%F %T},{1:%F %T},{2:%T},{3:%Q%q},{0:%Z}]" format string. As noted in the

[COMMITTED 28/40] ada: Constant_Indexing used when context requires a variable

2025-06-06 Thread Marc Poulhiès
From: Javier Miranda In the case of an assignment where the type of its left hand side is an indexable container that has indexable container components (for example a container vector of container vectors), and both indexable containers have Constant_Indexing and Variable_Indexing aspects, the l

Re: [PATCH 04/14] aarch64: Add support for unpacked SVE FP comparisons

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > @@ -27292,10 +27291,16 @@ aarch64_emit_sve_invert_fp_cond (rtx target, > rtx_code code, rtx pred, > void > aarch64_expand_sve_vec_cmp_float (rtx target, rtx_code code, rtx op0, rtx > op1) > { > - machine_mode pred_mode = GET_MODE (target); >machine_mode data_mode

[COMMITTED 40/40] ada: Avoid repeated range checks when negating a rational number

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek Use local constant to avoid repeated range checks (at least in the debug builds), but also to make the code easier to read and consistent in style with similar routines in the same package. gcc/ada/ChangeLog: * urealp.adb (UR_Negate): Capture array element in a loca

[COMMITTED 26/40] ada: Set Ekind early for entities created in expansion

2025-06-06 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds early Ekind assignments to entities created for the expansion of a few constructs. The only effect is to enable more dynamic checks for the uses of those entities that used to happen before the Ekind had been set. gcc/ada/ChangeLog: * contracts.ad

[COMMITTED 33/40] ada: Add case for Program_Exit in Exit_Cases

2025-06-06 Thread Marc Poulhiès
From: Claire Dross Extend the syntax for Exit_Cases to support exiting the program. gcc/ada/ChangeLog: * doc/gnat_rm/implementation_defined_pragmas.rst (Pragma Exit_Cases): Update the documentation for Exit_Cases. * sem_prag.adb (Anlayze_Pragma): Accept Program_E

[COMMITTED 32/40] ada: Support aspect Program_Exit with no expression

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek New aspect Program_Exit for SPARK was originally designed to require an expression, but now we want this expression to be optional. gcc/ada/ChangeLog: * aspects.ads (Aspect_Argument): Argument for Program_Exit is now optional. * doc/gnat_rm/implement

[COMMITTED 24/40] ada: Adjust the Android RTS config to match linux

2025-06-06 Thread Marc Poulhiès
From: Olivier Hainque Android has many traits of Linux, reflected by the gcc port triplets composition (-android-linux). The Android Ada RTS was so far configured as a mostly "posix" port, which happens to be very little tested, if at all. This change reworks the Android Ada RTS to map a lot mo

[committed v2 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-06 Thread Jonathan Wakely
Rename __semaphore_base to __semaphore_impl, because it's not used as a base class. Replace the three identical lambda expressions with a named class, __semaphore_impl::_Available, which stores the most recent value of the counter as a data member, and provides call operators that test whether the

[COMMITTED 29/40] ada: Child unit subprograms are not primitive subprograms

2025-06-06 Thread Marc Poulhiès
From: Steve Baird If a package declares a type and a child unit of that package is a subprogram with a parameter (or function result) of that type, then that subprogram is not a primitive subprogram of that type. Previously this was handled incorrectly in some cases, leading to incorrect analysis

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Jan Hubicka
> Should I go with: > > +autofdo_target > > +autofdo_target="i386" > +case "${target}" in > + aarch64-*-*) > +autofdo_target="aarch64" > +;; > +esac > > As in the first version? I can test and send a patch for review if there is > no other better alternative. This looks OK - I can n

Re: [PATCH v6 9/8] libstdc++: Uglify __mapping_alike template parameter and fix test and typo in comment.

2025-06-06 Thread Luc Grosheintz
On 6/5/25 17:18, Tomasz Kamiński wrote: When the static assert was generated from instantiations of default member initializer of class B, the error was not generated for B<1, std::layout_left, std::layout_left> case, only when -D_GLIBCXX_DEBUG was set. Changing B calls to functions fixes that

[COMMITTED 35/40] ada: Refine subtypes in routines for building floating-point numbers

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek Propagate strict subtypes from callees to the caller; code cleanup. gcc/ada/ChangeLog: * cstand.adb (Build_Float_Type, Register_Float_Type): Refine parameter subtypes. * set_targ.ads (FPT_Mode_Entry): Refine component subtype. Tested on x86_64-pc-li

[PATCH] Remove create_tmp_reg_or_ssa_name

2025-06-06 Thread Richard Biener
Now that create_tmp_reg_or_ssa_name just calls make_ssa_name replace all of its uses. Bootstrapped on x86_64-unknown-linux-gnu, built a cross to ppc64le, pushed. * gimple-fold.h (create_tmp_reg_or_ssa_name): Remove. * gimple-fold.cc (create_tmp_reg_or_ssa_name): Likewise.

More of autofdo 0 fixes

2025-06-06 Thread Jan Hubicka
This patch fixes ICE seen when building spec2k17 with autofdo and enable checking compiler. Bause we special case 0 of autofdo to be kind of 1 in IPA scalling, we can now end up with function heving global0 profile but producing inline clone with nonzero profile. I think correct way is to extend

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-06 Thread Richard Biener
On Fri, Jun 6, 2025 at 1:26 PM Robin Dapp wrote: > > > In case the riscv strided vector load instruction has additional > > requirements > > on the loaded (scalar) element alignment then we'd have to implement this. > > For the moment the vectorizer will really emit scalar loads here, so that's >

[PATCH 1/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
replace slp_node/slp checks with 1 * tree-vect-stmts.cc (vectorizable_store): Prune non-SLP paths. --- gcc/tree-vect-stmts.cc | 78 +- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc in

[PATCH 3/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
Eliminate the toplevel ncopies and loops that become non-loops. Eliminate use of STMT_VINFO_VECTYPE. Bootstrapped and tested on x86_64-unknown-linux-gnu, will squash and push. * tree-vect-stmts.cc (vectorizable_store): Remove non-SLP paths. --- gcc/tree-vect-stmts.cc | 524 ++

[PATCH 2/3] Remove non-SLP path from vectorizable_store

2025-06-06 Thread Richard Biener
Prune unreachable paths * tree-vect-stmts.cc (vectorizable_store): Remove non-SLP paths. --- gcc/tree-vect-stmts.cc | 591 + 1 file changed, 192 insertions(+), 399 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc in

Re: [PATCH v2 1/2] emit-rtl: Allow extra checks for paradoxical subregs [PR119966]

2025-06-06 Thread Jeff Law
On 6/6/25 4:14 AM, Stafford Horne wrote: Hello, This seems to be causing a build regression on the or1k port. I have not quite figured it out yet but I have bisected to this commit. The failure is as below, this seems to be caused by the cstoresi4 instruction produced by or1k.md. So I thi

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Jan Hubicka
> On 2025-06-06 12:42, Jan Hubicka wrote: > > > Hi, > > > also after fixing this issue my bootstrap failes with: > > > > > > Permission error mapping pages. > > > Consider increasing /proc/sys/kernel/perf_event_mlock_kb, > > > or try again with a smaller value of -m/--mmap_pages. > > > (current va

[PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-06 Thread Jakub Jelinek
Hi! As the following testcase shows, during expansion we use value range info in lots of places, but sadly currently use only the global ranges. It is mostly through get_range_pos_neg function, which uses get_global_range_query ()->range_of_expr (arg1, arg2) but other spots use it directly. On th

[PATCH] vect: Use combined peeling and versioning for mutually aligned DRs

2025-06-06 Thread Pengfei Li
Current GCC uses either peeling or versioning, but not in combination, to handle unaligned data references (DRs) during vectorization. This limitation causes some loops with early break to fall back to scalar code at runtime. Consider the following loop with DRs in its early break condition:

([commited] →) Re: [Patch][RFC?] OpenMP: Add omp_get_initial_device/omp_get_num_devices builtins

2025-06-06 Thread Tobias Burnus
I have now pushed those patches as: r16-1262-g387209938d2c47 OpenMP: Add omp_get_initial_device/omp_get_num_devices builtins r16-1261-g214b5d66c54613 builtins.def: Enable OpenMP/OpenACC builtins also with -fno-nonansi-builtins Tobias

[committed] Fix compromised ARC test

2025-06-06 Thread Jeff Law
Jakub's recent changes for pr120231 compromised this arc port specific test. Essentially we collapse the entire FMA sequence down to a constant and thus never emit the FMA instruction the test wants to see. If we make "a" an extern so that we don't know its value the optimizers can't collapse

[Patch] omp-builtins.def: Leaf attribute fixes to omp_{is_initial_device,get_{mapped_ptr,interop_int}}

2025-06-06 Thread Tobias Burnus
Most builtins in omp-builtins.def is marked as LEAF. At a glance, that's surprising but looking at the functions, it turns out that most of them just call 'gomp_thread ()' which is a simple inline function such that no function call remains. However, that's not true for all - and omp_get_mapped_p

[COMMITTED 08/40] ada: Remove Size_Check_Code field from entities

2025-06-06 Thread Marc Poulhiès
From: Eric Botcazou It has been unused for a very long time. gcc/ada/ChangeLog: * einfo.ads (Size_Check_Code): Delete. * gen_il-fields.ads (Opt_Field_Enum): Remove Size_Check_Code. * gen_il-gen-gen_entities.adb (Constant_Or_Variable_Kind): Likewise. * sem_ch13.ad

[COMMITTED 12/40] ada: Restore Original_Access_Type field in E_Access_Subprogram_Type entities

2025-06-06 Thread Marc Poulhiès
From: Eric Botcazou It is used by CodePeer to recognize the special access pattern. gcc/ada/ChangeLog: * einfo.ads (Original_Access_Type): Restore. * gen_il-fields.ads (Opt_Field_Enum): Restore Original_Access_Type. * gen_il-gen-gen_entities.adb: Adjust accordingly.

[COMMITTED 20/40] ada: Fix libgpr2 build failure with compiler built with assertions

2025-06-06 Thread Marc Poulhiès
From: Eric Botcazou The problem is that the Entity field is accessed for a node without one. gcc/ada/ChangeLog: * sem_ch10.adb (Install_Siblings.In_Context): Add missing guard. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch10.adb | 2 ++ 1 file changed, 2 inse

[COMMITTED 30/40] ada: Deconstruct C header for the SCOs unit

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek The C version of SCOs unit provided a gigi interface to source code obligations that at some point were generated by the frontend. This functionality has been deconstructed long ago. gcc/ada/ChangeLog: * libgnat/g-dyntab.ads (Instance): Update and extend comment.

[COMMITTED 17/40] ada: Convert floating-point zero to machine representation

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek When statically evaluating floating-point expressions we convert the final result to machine number. However, we skipped this conversion if the result was zero. This inconsistency was introduced when adding a warning for compile-time evaluation that gives different result fr

Re: [PATCH v2] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-06 Thread Jonathan Wakely
On Thu, 5 Jun 2025, 16:39 Tomasz Kaminski, wrote: > > > On Thu, Jun 5, 2025 at 5:19 PM Tomasz Kamiński > wrote: > >> We do not test with wchar_t currently, as operator<< (and format) are >> ill-formed in such case, because we do not widen abbrev member of >> local_info. >> >> Adding a tests for

Re: [PATCH] libstdc++: Support wide characters output for sys_info and local_info [PR120565]

2025-06-06 Thread Jonathan Wakely
On Fri, 6 Jun 2025, 08:34 Tomasz Kamiński, wrote: > Formatting sys_info as wchar_t require widening of the abbrev (zone) > member. > To support that we reuse the existing code in support for '%Z' specifier, > for > local_time_format, and produce output using singe format call with > "[{0:%F %T},{

[COMMITTED 15/40] ada: Initial prototype of constructors

2025-06-06 Thread Marc Poulhiès
From: squirek The patch implements the experimental constructors RFC. Currently a WIP. gcc/ada/ChangeLog: * aspects.ads: Add support for constructors. * exp_aggr.adb: Likewise. * exp_attr.adb: Likewise. * exp_ch3.adb: Likewise. * exp_ch4.adb: Likewise.

[COMMITTED 34/40] ada: Check references to subprogram outputs with Program_Exit expression

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek Add check for references to subprogram outputs occurring within the Program_Exit expression. This check is necessarily partial, as it misses objects referenced by subprograms called from the Program_Exit expression, but this is consistent with other checks. gcc/ada/ChangeLog

[COMMITTED 16/40] ada: Move Incomplete_View from node to entity field

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek The Incomplete_View property of a type was attached to its full type declaration as a semantic field, but retrieving it from there required low-level tree navigation and caused code duplication. In one case we relied on internal class-wide type being attached to the correspon

[COMMITTED 22/40] ada: Deconstruct representation clauses required by ASIS

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek When GNAT was operating in ASIS mode, it was writing internal tables to files, so we annotated record types for elements stored in these tables with representation clauses to avoid holes with potentially uninitialized data. Since ASIS mode has been now deconstructed and we n

[COMMITTED 25/40] ada: Rework Android struct sigaction bindings

2025-06-06 Thread Marc Poulhiès
From: Olivier Hainque A previous change arranged for the common definition of struct_sigaction in s-osinte__android.ads to work both for ARM and aarch64 by way of representation clauses with field offsets taken from specialized versions of s-linux (one for ARM, one for aarch64). The aarch64 vari

[COMMITTED 07/40] ada: Allow IN OUT parameters for first parameter of traversal functions

2025-06-06 Thread Marc Poulhiès
From: Claire Dross In general, functions in SPARK cannot have parameters of mode IN OUT unless they are annotated with the Side_Effects aspect. Borrowing traversal functions are special functions which can return a part of their first parameter as an access-to-variable type. This might not be all

[COMMITTED 19/40] ada: Tweak condition for name resolution failure

2025-06-06 Thread Marc Poulhiès
From: Ronan Desplanques It is sometimes used as a convention across GNAT's code to set the Etype field of a node to Any_Type to signal a name resolution error. This has the potential to be confusing, which is why this patch replaces one such use of the convention by a less convoluted check. This

[PATCH 4/4] RISC-V: Add support for xtheadvector fault-only-first segment load/store intrinsics

2025-06-06 Thread yunzezhu
From: Yunze Zhu This commit add support for xtheadvector-specific fault-only-first segment load/store intrinsics with b/h/w suffix. We also defined enum to be used in thead-vector-builtins-bases.cc https://github.com/XUANTIE-RV/thead-extension-spec/pull/66 gcc/ChangeLog: * config/riscv/

Avoid useless reading of profile data in LTO

2025-06-06 Thread Jan Hubicka
Hi, New auto-profile merging dumps made me notice that we read the afdo data when we are in LTO. This is not necessary since profile is read at compile time and streamed to LTO bytecode. gcc/ChangeLog: * coverage.cc (coverage_init): Return early when in LTO. diff --git a/gcc/coverage.cc

Re: [PATCH v1] libstdc++: Implement default_accessor from mdspan.

2025-06-06 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 4:31 PM Luc Grosheintz wrote: > libstdc++-v3/ChangeLog: > > * include/std/mdspan (default_accessor): New class. > * src/c++23/std.cc.in: Register default_accessor. > * testsuite/23_containers/mdspan/default_accessor.cc: New test. > > Signed-off-by: L

[PATCH] libgcobol: Drop unhelpful constexpr keyword [PR120554]

2025-06-06 Thread Jakub Jelinek
Hi! As mentioned in the PR, this code is likely only valid in C++23 and later and not really useful in that case and it might be a GCC bug that it fails to diagnose the bug in C++14 to C++20 modes (it diagnoses it in C++11 mode). In any case, the class doesn't have any constexpr constructors, so

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-06-06 Thread Robin Dapp
Yes. Note I don't see we guarantee element alignment for gather/scatter either, nor do the IFNs seem to have encoding space for alignment. The effective type for TBAA seems also missing there ... Regarding vector_vector_composition_type I had a try and attached a preliminary V3. I'm not reall

[PATCH] i386: Handle ZERO_EXTEND like SIGN_EXTEND in bsr patterns [PR120434]

2025-06-06 Thread Jakub Jelinek
Hi! The just posted second PR120434 patch causes +FAIL: gcc.target/i386/pr78103-3.c scan-assembler m(leaq|addq|incq)M +FAIL: gcc.target/i386/pr78103-3.c scan-assembler-not mmovlM+ +FAIL: gcc.target/i386/pr78103-3.c scan-assembler-not msubqM +FAIL: gcc.target/i386/pr78103-3.

Re: [PATCH 10/14] aarch64: Relaxed SEL combiner patterns for unpacked SVE FP binary arithmetic

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > Extend the binary op/UNSPEC_SEL combiner patterns from SVE_FULL_F/ > SVE_FULL_F_B16B16 to SVE_F/SVE_F_B16B16, where the strictness value > is SVE_RELAXED_GP. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (*cond__2_relaxed): > Extend from SVE_FULL_F_B16B

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Andi Kleen
On 2025-06-06 12:42, Jan Hubicka wrote: Hi, also after fixing this issue my bootstrap failes with: Permission error mapping pages. Consider increasing /proc/sys/kernel/perf_event_mlock_kb, or try again with a smaller value of -m/--mmap_pages. (current value: 4294967295,0) Permission error mappin

Re: [PATCH] libstdc++: Adjust effective-target requirements for and

2025-06-06 Thread Tomasz Kaminski
On Fri, Jun 6, 2025 at 3:13 PM Jonathan Wakely wrote: > These features depend on __cpp_lib_atomic_wait which is not available > for freestanding, and is available when either gthreads is supported, or > the target is linux (for futex support). > > libstdc++-v3/ChangeLog: > > * testsuite/3

[PATCH] libstdc++: Adjust effective-target requirements for and

2025-06-06 Thread Jonathan Wakely
These features depend on __cpp_lib_atomic_wait which is not available for freestanding, and is available when either gthreads is supported, or the target is linux (for futex support). libstdc++-v3/ChangeLog: * testsuite/30_threads/barrier/1.cc: Require hosted. Only require gthread

[PATCH] expand: Use less costly from sign and zero extensions for values where value range says they don't have MSB set [PR120434]

2025-06-06 Thread Jakub Jelinek
Hi! On top of the just posted patch, the following patch attempts to use value range to see if MSB is known to be false and for scalar integral extension in that case tries to expand both sign and zero extension and chooses based on RTX costs the cheaper one (if the costs are the same uses what it

[PATCH] libstdc++: Skip wchar_t range and tuple formatting test is wchar_t support is disabled.

2025-06-06 Thread Tomasz Kamiński
Simplfy dg-options in format/debug.cc, by not configuring wide encoding. Address TODO in format_kind.cc, by adding test for format_kind::map. libstdc++-v3/ChangeLog: * testsuite/std/format/ranges/format_kind.cc: Add test for range_format::map. * testsuite/std/format/debug.

Re: [PATCH] expand, ranger: Use ranger during expansion [PR120434]

2025-06-06 Thread Andrew MacLeod
Interesting. I don't remember details about the order of things...  Is there any chance that you might query an SSA_NAME whose DEF was in  a block which has been converted to RTL?   Ranger will query all the way back to the def block, accessed via gimple_bb (SSA_NAME_DEF_STMT (name)), or top

Re: [PATCH 11/14] aarch64: Add support for unpacked SVE FP conditional binary arithmetic

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > @@ -8165,20 +8169,25 @@ > ;; > ;; For unpacked vectors, it doesn't really matter whether SEL uses the > ;; the container size or the element size. If SEL used the container size, > -;; it would ignore undefined bits of the predicate but would copy the > -;; upper (undef

Re: [PATCH 12/14] aarch64: Add support for unpacked SVE FP ternary arithmetic

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > This patch extends the expander for unconditional fma, fnma, fms, and > fnms, so that it supports partial SVE FP modes. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (4): Extend from > SVE_FULL_F_B16B16 to SVE_F_B16B16. Use sve_fp_pred instead >

Re: [PATCH 13/14] aarch64: Relaxed SEL combiner patterns for unpacked SVE FP ternary arithmetic

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > Extend the ternary op/UNSPEC_SEL combiner patterns from SVE_FULL_F/ > SVE_FULL_F_BF to SVE_F/SVE_F_BF, where the strictness value is > SVE_RELAXED_GP. > > We can only reliably test the 'merging with the third input' (addend) > and 'independent value' patterns at this stage

[COMMITTED 04/40] ada: Move standard subtype declarations generation

2025-06-06 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, the subtype declarations for Standard.Natural and Standard.Positive were created before the entity for Standard.Integer was complete. In preparation of a future change that will make it impossible to call Etype on an incomplete node, this patch delays th

[COMMITTED 21/40] ada: Fix typo in documentation about convention and representation

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek Currently there are only three exceptions to the general rule; the fourth exception applied to OpenVMS, whose support has been deconstructed. gcc/ada/ChangeLog: * doc/gnat_rm/representation_clauses_and_pragmas.rst (Effect of Convention on Representation): Fi

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Kugan Vivekanandarajah
Hi Honza, > On 6 Jun 2025, at 6:34 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> Kugan Vivekanandarajah writes: >>> Add support for autoprofiledbootstrap in aarch64. >>> This is similar to what is done for i386. Added >>> gcc/config/aarch64/gcc-aut

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Jan Hubicka
Hi, also after fixing this issue my bootstrap failes with: Permission error mapping pages. Consider increasing /proc/sys/kernel/perf_event_mlock_kb, or try again with a smaller value of -m/--mmap_pages. (current value: 4294967295,0) Permission error mapping pages. Consider increasing /proc/sys/ker

[PATCH 0/4] RISC-V: Add new segment load/store intrinsics for xtheadvector

2025-06-06 Thread yunzezhu
From: Yunze Zhu This series add xtheadvector-specific segment load/store intrinsics support, including: [1/4] xtheadvector unit stride segment load/store intrinsics, [2/4] xtheadvector stride segment load/store intrinsics, [3/4] xtheadvector indexed stride segment load/store intrinsics, [4/4] xt

Re: [PATCH 07/14] aarch64: Relaxed SEL combiner patterns for unpacked SVE FP unary operations

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > Extend the unary op/UNSPEC_SEL combiner patterns from SVE_FULL_F to SVE_F, > where the strictness value is SVE_RELAXED_GP. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (*cond__2_relaxed): > Extend from SVE_FULL_F to SVE_F. > (*cond__any_relaxed):

[PATCH 3/4] RISC-V: Add support for xtheadvector indexed segment load/store intrinsics

2025-06-06 Thread yunzezhu
From: Yunze Zhu This commit add support for xtheadvector-specific indexed segment load/store intrinsics with b/h/w suffix. We also defined enum to be used in thead-vector-builtins-bases.cc https://github.com/XUANTIE-RV/thead-extension-spec/pull/66 gcc/ChangeLog: * config/riscv/riscv-vec

Re: [PATCH 06/14] aarch64: Add support for unpacked SVE FP unary operations

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > diff --git a/gcc/config/aarch64/aarch64-sve.md > b/gcc/config/aarch64/aarch64-sve.md > index 399d147c9a5..1a705e153cb 100644 > --- a/gcc/config/aarch64/aarch64-sve.md > +++ b/gcc/config/aarch64/aarch64-sve.md > @@ -3762,13 +3762,28 @@ > > ;; Unpredicated floating-point

[PATCH 1/4] RISC-V: Add support for xtheadvector unit-stride segment load/store intrinsics

2025-06-06 Thread yunzezhu
From: Yunze Zhu This commit add support for xtheadvector-specific unit-stride segment load/store intrinsics with b/h/w suffix. We also defined enum to be used in thead-vector-builtins-bases.cc https://github.com/XUANTIE-RV/thead-extension-spec/pull/66 gcc/ChangeLog: * config.gcc: Add ne

[PATCH 2/4] RISC-V: Add support for xtheadvector strided segment load/store intrinsics

2025-06-06 Thread yunzezhu
From: Yunze Zhu This commit add support for xtheadvector-specific strided segment load/store intrinsics with b/h/w suffix. We also defined enum to be used in thead-vector-builtins-bases.cc https://github.com/XUANTIE-RV/thead-extension-spec/pull/66 gcc/ChangeLog: * config/riscv/riscv-vec

Re: [PATCH 05/14] aarch64: Compare/and splits for unpacked SVE FP comparisons

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > This patch extends the compare/and splitting patterns for FP comparisons > from SVE_FULL_F to SVE_F. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (*fcm_and_combine): > Extend to SVE_F. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/sve/unp

[COMMITTED 18/40] ada: Fix wrong initialization of library-level object by conditional expression

2025-06-06 Thread Marc Poulhiès
From: Eric Botcazou At library level the object must be allocated statically and with its bounds when its nominal subtype is an unconstrained array type. gcc/ada/ChangeLog: * exp_ch4.adb (Insert_Conditional_Object_Declaration): Make sure the object is allocated properly by the c

Re: [PATCH] libstdc++: Add smart ptr owner_equals and owner_hash structs and members for P1901R2

2025-06-06 Thread Jonathan Wakely
On 23/05/25 17:55 +, Paul Keir wrote: This patch implements C++26 "Enabling the Use of weak_ptr as Keys in Unordered Associative Containers", as specified in P1901R2. I don't have write access. Signed-off-by: Paul Keir Tested on x86_64-linux. libstdc++-v3/ChangeLog: * include/bi

Re: [PATCH 08/14] aarch64: Add support for unpacked SVE FP binary arithmetic

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > This patch extends the expanders for unpredicated smax, smin, add, sub, > mul, min, and max, so that they support partial SVE FP modes. > > The relevant insn/split patterns have also been updated. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md (3): Extend from

Re: [PATCH 09/14] aarch64: Add support for unpacked SVE FDIV

2025-06-06 Thread Richard Sandiford
Spencer Abson writes: > This patch extends the unpredicated FP division expander to support > partial FP modes. It extends the existing patterns used to implement > UNSPEC_COND_FDIV and it's approximation as needed. > > gcc/ChangeLog: > > * config/aarch64/aarch64-sve.md: (@aarch64_sve_): >

Re: [PATCH v2 1/2] emit-rtl: Allow extra checks for paradoxical subregs [PR119966]

2025-06-06 Thread Stafford Horne
Hello, This seems to be causing a build regression on the or1k port. I have not quite figured it out yet but I have bisected to this commit. The failure is as below, this seems to be caused by the cstoresi4 instruction produced by or1k.md. So I think its likely something we are doing funny in

Re: [AUTOFDO][AARCH64] Add support for profilebootstrap

2025-06-06 Thread Jan Hubicka
> Hi, > also after fixing this issue my bootstrap failes with: > > Permission error mapping pages. > Consider increasing /proc/sys/kernel/perf_event_mlock_kb, > or try again with a smaller value of -m/--mmap_pages. > (current value: 4294967295,0) > Permission error mapping pages. > Consider increa

[PATCH 0/4] Reworkd formatting for empty chrono-spec

2025-06-06 Thread Tomasz Kamiński
This patch series reworks the handling of the empty chron-spec when formatting calendar types. For all types except duration with custom representation, the implementation no-longer delegates to operator<<, and instead configures formatter _M_chron_spec accordingly, and follows with normal format r

[PATCH 2/4] libstdc++: Format empty chrono-spec for the time points and hh_mm_ss directly.

2025-06-06 Thread Tomasz Kamiński
This patch change implementation of the formatters for time points and hh_mm_ss, so they no longer delegate to operator<< for ostream in case of empty chrono-spec. As in case of calendar types, the formatters for specific type now provide __formatter_chrono with default _ChronoSpec that are used i

[PATCH] Fix assertion failure on small array constructor

2025-06-06 Thread Eric Botcazou
Hi, the attached Ada testcase triggers an assertion failure in size_binop_loc: +===GNAT BUG DETECTED==+ | 16.0.0 20250605 (experimental) [master r16-1173-gda96bdfff08] (x86_64-suse- linux) GCC error:| | in size_binop_loc, at fold-const.cc:2091

Re: [PATCH] Fix assertion failure on small array constructor

2025-06-06 Thread Richard Biener
On Fri, Jun 6, 2025 at 10:31 AM Eric Botcazou wrote: > > Hi, > > the attached Ada testcase triggers an assertion failure in size_binop_loc: > > +===GNAT BUG DETECTED==+ > | 16.0.0 20250605 (experimental) [master r16-1173-gda96bdfff08] (x86_64-sus

[COMMITTED 39/40] ada: Remove repeated call in exponentiation of rational numbers

2025-06-06 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ChangeLog: * urealp.adb (UR_Exponentiate): Use local variable. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/urealp.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/urealp.adb b/gcc/ada/urealp

[COMMITTED 09/40] ada: Remove dead code

2025-06-06 Thread Marc Poulhiès
From: Ronan Desplanques The code this patch removes is never executed on any of the available test suites. The patch that introduced it mentions that it fixes a test in particular, but that test passes anyway today. gcc/ada/ChangeLog: * sem_ch8.adb (Premature_Usage): Remove dead code.

  1   2   >