[PING][PATCH] [RFC v2][AutoFDO] Implement summary information in auto-profile

2025-10-29 Thread Dhruv Chawla
On 22/10/25 13:38, [email protected] wrote: External email: Use caution opening links or attachments From: Dhruv Chawla This patch aims to implement summary support in auto-profile, similar to LLVM. The summary information stores various information about the profile being read such as the nu

Re: [PATCH] Use linker sections to explicitly order functions for -fprofile-reorder-functions and -fipa-reorder-for-locality

2025-10-29 Thread Prachi Godbole
Ping > On 9 Oct 2025, at 9:10 PM, Prachi Godbole wrote: > > This patch adds support to linker driven function reordering by creating > function sections with a prefix '.text.sorted' which are then sorted using > SORT in by the linker. Appropriate support for this is already present in > binut

[PATCH 3/3] [PATCH 3/3] ipa-reorder-for-locality - Introduce C++ template heuristics

2025-10-29 Thread Prachi Godbole
This patch introduces a new heuristics for reordering functions, to be used in the absense of profile information. This approach uses C++ template instantiation types to group functions together. Entry functions are sorted in the beginning, and callees are sorted as part of partition_callchain ()

[PATCH 2/3] [PATCH 2/3] ipa-reorder-for-locality - Address compile time issues for locality cloning pass

2025-10-29 Thread Prachi Godbole
This patch attempts to reduce compile time for locality cloning pass by reducing recursive calls to partition_callchain (). This is achieved by precomputing caller callee information into locality_info. locality_info stores all callees of a node, either directly or via inlined nodes thereby avoid

[PATCH] gimple-fold: Remove assume_aligned folding

2025-10-29 Thread Andrew Pinski
So in the end I agree with Richi's comment at https://gcc.gnu.org/pipermail/gcc-patches/2025-October/698856.html: > I see. I wonder whether it would be better to leave __builtin_assume_aligned > around then, because that inherently introduces the copy and it would show > why. > TER / SSA coalesci

[PATCH 1/3] ipa-reorder-for-locality - Adjust bootstrap-lto-locality to reduce compile time

2025-10-29 Thread Prachi Godbole
Hi, As discussed at Cauldron, I’m sending a 3 patch series that addresses the review comments about the compile-time improvement and introduces C++ template heuristics which requires the data structure support added in the compile-time patch [2/3]. [Patch 1/3] This patch turns off -fipa-reorde

Re: [PATCH] libstdc++: Fix construction function_ref from nontype<&S::x> and reference_wrapper [PR121858]

2025-10-29 Thread Hewill Kang
{ "emoji": "👍", "version": 1 }

Re: [PATCH v3] Add built-in memalignment [PR122117]

2025-10-29 Thread Peter0x44
Pinging this patch. As a recap, so far I have fixed: 1) the builtin didn't the type of the argument 2) arguments with side effects had their side effects evaluated twice. Anything else I should do?

Re:[[pushed] [PATCH v3] LoongArch: Standard instruction template fnmam4 correction

2025-10-29 Thread Lulu Cheng
Pushed to r16-4723. Thanks. 在 2025/10/29 下午4:38, Guo Jie 写道: The current implementation of the fnmam4 instruction template requires the third source operand to be assigned the same hard register as the target operand, but the constraint is not documented in the instruction manual or standard te

Re: [pushed][PATCH] LoongArch: Only allow valid binary op when optimize conditional move

2025-10-29 Thread Lulu Cheng
Pushed to r16-4722. 在 2025/10/29 下午4:07, Jinyang He 写道: It is wrong that optimize from `if (cond) dest op= 1 << shift` to `dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`. Like `and`, `mul` or `div`. And in this optimization `mul` and `div` is optimized to shift. gcc/ChangeLog:

Re: Ping: [PATCH] libcpp: Improve locations for macros defined prior to PCH include [PR105608]

2025-10-29 Thread Lewis Hyatt
On Wed, Oct 29, 2025 at 2:19 PM Joseph Myers wrote: > > On Sun, 12 Oct 2025, Lewis Hyatt wrote: > > > > > One issue that came up is the treatment of command-line-defined macros. > > > > From > > > > the perspective of the generic line_map data structures, the > > > > command-line > > > > locatio

Re: [PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-10-29 Thread Kito Cheng
I know "vicuana" is the internal codename within Andes, so I would suggest all vicuna from the change and rename that into andes_25_series which is the external name, otherwise I think it might confuse people when reading the code... e.g. s/andes_vicuna/andes_25_series/ When I google with "Andes V

[PATCH V2] RISC-V: Add Andes 25 series pipeline description.

2025-10-29 Thread Kuan-Lin Chen
gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUNE): Add andes-25-series. (RISCV_CORE): Add Andes 25-series cpu list. * config/riscv/riscv-opts.h (enum riscv_microarchitecture_type): Add andes_vicuna. * config/riscv/riscv.cc: Add andes_vicuna_tune_inf

[PATCH] RISC-V: Fix the ABI of empty unions and zero length array in struct

2025-10-29 Thread Kito Cheng
The RISC-V ABI currently defines that empty unions and zero length array in struct should be ignored, but the implementation in GCC is not correct. e.g. for the following code: ``` struct S2eu_2f { union{} e1; float f; float g; }; ``` The RISC-V ABI defines that the layout of S2eu_2f

Re: [PATCH v1] LoongArch: Add builtin interfaces for 128 and 256 vector conversions.

2025-10-29 Thread Lulu Cheng
Hi, Wangrui: Please double-check if the patch is available. Thanks! 在 2025/10/29 下午6:49, chenxiaolong 写道: gcc/ChangeLog: * config/loongarch/lasx.md (vec_cast): New template implemention. (vec_insert_lo_): Dito. (vec_insert_hi_): Dito. * config/loongarch

Re: [PATCH] LoongArch: Only allow valid binary op when optimize conditional move

2025-10-29 Thread Lulu Cheng
在 2025/10/29 下午4:07, Jinyang He 写道: It is wrong that optimize from `if (cond) dest op= 1 << shift` to `dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`. Like `and`, `mul` or `div`. And in this optimization `mul` and `div` is optimized to shift. This is indeed a bug. I have no objec

[Ada] Fix instantiation failure with qualified name of child generic unit

2025-10-29 Thread Eric Botcazou
This is again an issue with multiple levels of nested instances, and it arises because the qualified name of the problematic child generic unit is used (this works fine with the direct name), exposing the rather questionable processing implemented for instances in Find_Expanded_Name. The patch

[Ada] Fix spurious visibility issue with qualified aggregate in instantiation

2025-10-29 Thread Eric Botcazou
Aggregates used as actuals of formal object parameters are handled specially by Instantiate_Object in Sem_Ch12 and qualifying them is sufficient to block this special processing. Tested on x86-64/Linux, applied on the mainline. 2025-10-29 Eric Botcazou PR ada/54178 * sem_ch

[PATCH] [x86] Fix unrecognizable insn of vpdpwuud.

2025-10-29 Thread liuhongt
512-bit vpdpwusd instruction requires AVX10.2, the iterator use VI2_AVX512F, and condition is TARGET_AVXVNNIINT16 || TARGET_AVX10_2, so case TARGET_AVXVNNIINT16 + TARGET_AVX512F meet the condition of the expander but failed the condition of define_insn. Tighten the dot_prod expander. Bootstrapped

Re: [PATCH] forwprop: Fix copy prop for alignment after the final folding [PR122086]

2025-10-29 Thread Andrew Pinski
On Tue, Oct 28, 2025 at 1:20 AM Richard Biener wrote: > > On Mon, Oct 27, 2025 at 9:41 PM Andrew Pinski > wrote: > > > > On Mon, Oct 27, 2025 at 1:07 PM Andrew Pinski > > wrote: > > > > > > On Mon, Oct 27, 2025 at 5:56 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Oct 27, 2025 at 10:22

Re: [PATCH v2] aarch64: streaming_mode_1.c/za_state_1.c: Remove some dg-error

2025-10-29 Thread H.J. Lu
On Thu, Oct 30, 2025 at 7:44 AM Andrew Pinski wrote: > > On Wed, Oct 29, 2025 at 4:38 PM H.J. Lu wrote: > > > > On Tue, Oct 28, 2025 at 3:55 PM H.J. Lu wrote: > > > > > > On Tue, Oct 28, 2025 at 12:07 PM wrote: > > > > > > > > Dear contributor, > > > > > > > > Our automatic CI has detected prob

Re: [PATCH v2] aarch64: streaming_mode_1.c/za_state_1.c: Remove some dg-error

2025-10-29 Thread Andrew Pinski
On Wed, Oct 29, 2025 at 4:38 PM H.J. Lu wrote: > > On Tue, Oct 28, 2025 at 3:55 PM H.J. Lu wrote: > > > > On Tue, Oct 28, 2025 at 12:07 PM wrote: > > > > > > Dear contributor, > > > > > > Our automatic CI has detected problems related to your patch(es). Please > > > find some details below. > >

[PATCH v2] aarch64: streaming_mode_1.c/za_state_1.c: Remove some dg-error

2025-10-29 Thread H.J. Lu
On Tue, Oct 28, 2025 at 3:55 PM H.J. Lu wrote: > > On Tue, Oct 28, 2025 at 12:07 PM wrote: > > > > Dear contributor, > > > > Our automatic CI has detected problems related to your patch(es). Please > > find some details below. > > > > In gcc_check master-aarch64, after: > > | commit gcc-16-466

Re: [PATCH] Introduce x86_64-linux-gnum32

2025-10-29 Thread Alexandre Oliva
On Oct 29, 2025, "H.J. Lu" wrote: > If bootstrap is used, it is the same as i686-linux with > --with-multilib-list=m32,m64. Perhaps. The above requires --enable-targets=all to enable 64-bit multilibs AFAICT, and it only supports GNU/Linux/i686. We want such 64-to-32 cross-natives on/for mingw

[PATCH v2] MATCH: Optimize `VEC_SHL_INSERT (dup (A), A)` to just `dup (A) [PR116075]

2025-10-29 Thread Andrew Pinski
It was noticed if we have `.VEC_SHL_INSERT ({ 0, ... }, 0)` it was not being simplified to just `{ 0, ... }`. This was generated from the autovectorizer (maybe even on accident, see PR tree-optmization/116081). This adds a few SVE testcases to see if this is optimized since the auto-vectorizer or

Re: [PATCH] btf: do not prune at typedefs

2025-10-29 Thread Jose E. Marchesi
OK. Thanks for the patch! > The existing BTF pruning logic meant that an anonymous struct or > union type hidden behind a typedef, such as in the common construct: > > typedef struct { ... } my_struct_type; > > could be pruned if 'my_struct_type' was only ever referenced via pointer > members

[PATCH] btf: do not prune at typedefs

2025-10-29 Thread David Faust
The existing BTF pruning logic meant that an anonymous struct or union type hidden behind a typedef, such as in the common construct: typedef struct { ... } my_struct_type; could be pruned if 'my_struct_type' was only ever referenced via pointer members in other structs/unions types used in the

Re: [r16-4709 Regression] FAIL: g++.dg/warn/uninit-pr105562.C -std=gnu++26 (test for excess errors) on Linux/x86_64

2025-10-29 Thread Jonathan Wakely
On Wed, 29 Oct 2025 at 20:04, Haochen Jiang wrote: > > On Linux/x86_64, > > c55c1de3a9adb241e3c0dabd7d1edd8ebe9c065f is the first bad commit > commit c55c1de3a9adb241e3c0dabd7d1edd8ebe9c065f > Author: Jonathan Wakely > Date: Tue Oct 28 12:15:52 2025 + > > libstdc++: Simplify std::regex_

[committed] libstdc++: Fix -Wunused-variable from

2025-10-29 Thread Jonathan Wakely
In r16-4709-gc55c1de3a9adb2 I meant to use the result of the static_cast for the rest of the function following it, but I accidentally used the original variable __ch. This causes -Wunused-variable warnings for the __c initialized from the cast. This fixes the rest of the function to use __c inste

Re: [PATCH v2] Extend the attribute "counted_by" to support VOID pointer under GNU extension.

2025-10-29 Thread Joseph Myers
On Wed, 29 Oct 2025, Qing Zhao wrote: > The attribute is allowed for a pointer to void, However, > Warnings will be issued for such cases when -Wpointer-arith is > specified. When this attribute is applied on a pointer to void, the > size of each element of this pointer array is treated as 1. > >

Re: [PATCH] Introduce x86_64-linux-gnum32

2025-10-29 Thread H.J. Lu
On Thu, Oct 30, 2025 at 2:42 AM Alexandre Oliva wrote: > > On Oct 27, 2025, Richard Biener wrote: > > > So on x86-64-linux this is a cross configuration? > > It's one of those cross-natives corner cases. > > > Or is this able to bootstrap itself but then resulting in a 32bit host > > compiler? >

Re: [PATCH v4] Evaluate the object size by the size of the pointee type when the type is a structure with flexible array member which is annotated with counted_by.

2025-10-29 Thread Qing Zhao
Hi, Sid, Really appreciate for your time to review this patch. > On Oct 28, 2025, at 17:50, Siddhesh Poyarekar wrote: > > On 2025-10-20 12:16, Qing Zhao wrote: >> Hi, >> this is the version 4th of the patch, compared to V3, the major change >> includes changes to address all Sid's comments for

[r16-4709 Regression] FAIL: g++.dg/warn/uninit-pr105562.C -std=gnu++26 (test for excess errors) on Linux/x86_64

2025-10-29 Thread Haochen Jiang
On Linux/x86_64, c55c1de3a9adb241e3c0dabd7d1edd8ebe9c065f is the first bad commit commit c55c1de3a9adb241e3c0dabd7d1edd8ebe9c065f Author: Jonathan Wakely Date: Tue Oct 28 12:15:52 2025 + libstdc++: Simplify std::regex_traits::value caused FAIL: g++.dg/warn/uninit-pr105562.C -std=gnu

[PATCH v2] Extend the attribute "counted_by" to support VOID pointer under GNU extension.

2025-10-29 Thread Qing Zhao
Hi, this is the 2nd version of the patch. compared to the first version, the major change is the update based on Joseph's comments: support ???counted_by??? for VOID pointer by default, but issue warnings when -Wpointer-arith is presenting. the patch has been bootstrapped and regression tested

[PATCH v4] niter: Use ranger to query ctz range.

2025-10-29 Thread Robin Dapp
Hi, When niter runs after the copy-header pass it sometimes fails to simplify assumptions in a ctz loop. As the assumption is a simple nonzero test here we can have ranger get us the range of the shifted expression, then verify that this range is nonzero. This helps recognize a ctz loop in 502.gc

[PATCH v2] libstdc++: Fix construction function_ref from nontype<&S::x> and reference_wrapper [PR121858]

2025-10-29 Thread Tomasz Kamiński
To reduce instantiation count, function_ref(nontype<&S::x>, r) previously reused the invoker from function_ref(nontype<&S::x>, &r). This assumed r was always a reference to S or a derived class. However, this constructor is also valid for lvalues (but not rvalues) of reference_wrapper specializatio

[RFA][PR rtl-optimization/122321][RISC-V] Bounds check another access to ira_reg_equiv array

2025-10-29 Thread Jeff Law
So another case where we're indexing into the ira_reg_equiv array without checking bounds. I sincerely hope we're not playing wack-a-mole here, but two failures in a couple months for the same core problem is worrisome. Bootstrapped and regression tested on x86_64 and riscv64 as well as run

Re: [PATCH] OpenMP/Fortran: Rebind labels after metadirective body [PR122369]

2025-10-29 Thread Tobias Burnus
Paul-Antoine Arras wrote: When a label is matched in the first statement after the end of a metadirective body, it is bound to the associated region. However this prevents it from being reference elsewhere. This patch fixes it by rebinding such labels to the outer region. This does not seem to

Re: [PATCH] Introduce x86_64-linux-gnum32

2025-10-29 Thread Alexandre Oliva
On Oct 27, 2025, Richard Biener wrote: > So on x86-64-linux this is a cross configuration? It's one of those cross-natives corner cases. > Or is this able to bootstrap itself but then resulting in a 32bit host > compiler? Yeah, it can bootstrap. (It needs an additional tweak to fix multilibs

Re: [PATCH] libstdc++: Fix construction function_ref from nontype<&S::x> and reference_wrapper [PR121858]

2025-10-29 Thread Tomasz Kaminski
I just realized that unwrapping reference wrapper is observable, and not permitted by standard, for example this should pass struct S { int x; }; S s1, s2; std:::refernce_wrapper rw(s1); std::function_ref fr(std::nontype<&S::x>, rw); assert( &fr() == &s1.x ); rw = std::ref(s2); // rebind assert( &f

Re: Ping: [PATCH] libcpp: Improve locations for macros defined prior to PCH include [PR105608]

2025-10-29 Thread Joseph Myers
On Sun, 12 Oct 2025, Lewis Hyatt wrote: > > > One issue that came up is the treatment of command-line-defined macros. > > > From > > > the perspective of the generic line_map data structures, the command-line > > > location is not distinguishable from other locations; it's just an > > > ordinary

[PATCH] tree: Clarify VIEW_CONVERT_EXPR sizes constraints

2025-10-29 Thread Andrew Pinski
This clarifies the comment about the sizes difference being about bytes (or units). As shown by https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122478#c3, the implicit bytes/units was not always being thought of. gcc/ChangeLog: * tree.def (VIEW_CONVERT_EXPR): Clarify what size is being

Re: [PATCH] Introduce x86_64-linux-gnum32

2025-10-29 Thread Alexandre Oliva
On Oct 26, 2025, Uros Bizjak wrote: >> * config.gcc [x86_64-*-*]: Match *m32 target, default to m32 >> abi and multilib. Accept 32 or m32 for --with-abi. > Shouldn't this target be named x86_64-linux-gnu32? In an ideal world, it should. m32 makes it easier to match, distinguishing from x32, a

Re: [PATCH v4] c: Warn when passing va_list to variadic functions [PR61898]

2025-10-29 Thread Joseph Myers
On Wed, 15 Oct 2025, Osama Abdelkader wrote: > Passing a va_list to a variadic function like printf() instead of its > v-variant (vprintf()) is a common programming error that can lead to > undefined behavior. This adds a warning to detect such cases. > > The warning uses a multi-tiered detection

Re: [PATCH] driver: Support very long command lines via temporary files [PR111527]

2025-10-29 Thread Joseph Myers
On Mon, 27 Oct 2025, [email protected] wrote: > + fseek (fptr, 0, SEEK_END); > + file_size = ftell (fptr); > + rewind (fptr); > + buf = (char *) xmalloc (file_size + 1); > + > + fread (buf, 1, file_size, fptr); This is missing error checking on fseek, ftell, f

Re: [PATCH] driver: Support very long command lines via temporary files [PR111527]

2025-10-29 Thread Joseph Myers
On Mon, 27 Oct 2025, [email protected] wrote: > + fwrite (data_to_write, sizeof(char), strlen(data_to_write), fptr); Missing spaces before '(' > + char *env_val = (char *) xmalloc (strlen (temp_file) + strlen(prefix) > + 2); Likewise. > diff --git a/gcc/testsuite/gcc.dg/

[to-be-committed][PR target/116662][RISC-V] Adjust destructive interference size for RISC-V

2025-10-29 Thread Jeff Law
So per the discussion in PR 116662, this adjusts the destructive interference size for RISC-V to be more in line with current designs (64 bytes). Getting this wrong is "just" a performance issue, so there's no correctness concerns to be worried about. The only real worry is that the value

[PATCH] OpenMP/Fortran: Rebind labels after metadirective body [PR122369]

2025-10-29 Thread Paul-Antoine Arras
When a label is matched in the first statement after the end of a metadirective body, it is bound to the associated region. However this prevents it from being reference elsewhere. This patch fixes it by rebinding such labels to the outer region. PR fortran/122369 gcc/fortran/ChangeLog:

[committed] libstdc++: Do not include internal headers in tests

2025-10-29 Thread Jonathan Wakely
For 42319.cc the PR says that reproduced the problem, so let's include that instead. We should also use the no_pch option because otherwise the test is including everything anyway, and so fails to check that the char_traits.h header can be included in isolation. There's also no reason to use an ex

Re: fortran: remove redundant code related to constant pointer

2025-10-29 Thread Yuao Ma
On Thu, Oct 30, 2025 at 12:03 AM Tobias Burnus wrote: > > Hi Yuao, hi all, > > Yuao Ma wrote: > > I think this patch explains itself. This is identified during working > > on r16-4695-gb6146faae09bbc and should be safe to remove after > > r16-4474-g2c1949bf152f8f landed. > > > > Regression tested

[PATCH v7 2/2] libstdc++: Implement const copy-assignment for tuple<> [PR119721]

2025-10-29 Thread Tomasz Kamiński
This patch completes the implementation of P2321R2, giving tuple proper proxy reference semantics. The assignment operator is implemented as a template constrained to accept only tuple<>. Consequently, the language does not consider it a copy assignment operator, which prevents tuple<> from losing

[PATCH 3/3] ipa-devirt: Add speculative direct calls based on stores to structures

2025-10-29 Thread Martin Jambor
Hi, this patch extends the ipa-devirt pass with the ability to add speculative calls for indirect calls where the target was loaded from a record_type data structure and we have seen writes of address of only one particular function to the same offset of that record type (including static initiali

[PATCH 1/2] forwprop: Improve simple dse for eh [PR122247]

2025-10-29 Thread Andrew Pinski
In the case with EH, we end up with the following IR: ``` # .MEM_5 = VDEF <.MEM_4(D)> inner = outer; # .MEM_6 = VDEF <.MEM_5> p (outer); : # .MEM_7 = VDEF <.MEM_6> inner ={v} {CLOBBER(eos)}; ... : : # .MEM_9 = VDEF <.MEM_6> inner ={v} {CLOBBER(eos)}; ``` So when the simple

[PATCH 2/2] forwprop: Improve simple dse slightly more for eh but multiple incoming edges (phi) [PR122247]

2025-10-29 Thread Andrew Pinski
In this case we have a phi node for the use so we need to see if the result of the phi is a single usage with the clobber. That is the following IR: ``` # .MEM_6 = VDEF <.MEM_5(D)> inner = outer; # .MEM_7 = VDEF <.MEM_6> p (outer); : ... # .MEM_8 = VDEF <.MEM_7> g (_3, _2, _1);

[PATCH 2/3] cgraph: cgraph_indirect_call_info into a class hierachy

2025-10-29 Thread Martin Jambor
Hi, currently, an instance of cgraph_indirect_call_info is allocated for each indirect call and it contains fields which are only usable for some kinds of calls. The most special are polymorphic calls representing calls of virtual methods through an OBJ_TYPE_REF and which need the ipa_polymorphic

[committed v7 1/2] libstdc++: Add constructors and assignments for tuple<> with tuple-like types [PR119721]

2025-10-29 Thread Tomasz Kamiński
From: Osama Abdelkader This patch adds support for constructing and assigning tuple<> from other empty tuple-like types (e.g., array), completing the C++23 tuple-like interface for the zero-element tuple specialization. The implementation includes: - Constructor from forwarding reference to tupl

[PATCH 1/3] gengtype: Avoid Werror bootstrap fail when a subclass has no GTY fields

2025-10-29 Thread Martin Jambor
Hello, in a follow-up patch, I have created a GTYed subclass which does not have any garbage collectible fields, just integers (a "sibling" subclass does). This leads to gengtype outputting code like this to gtype-desc.cc: 2722 case CIIK_SIMPLE: 2723 { 2724

Re: [PATCH v6 1/2] libstdc++: Add constructors and assignments for tuple<> with tuple-like types [PR119721]

2025-10-29 Thread Tomasz Kaminski
On Wed, Oct 29, 2025 at 4:53 PM Jonathan Wakely wrote: > On Mon, 27 Oct 2025 at 15:11 +0100, Tomasz Kamiński wrote: > >From: Osama Abdelkader > > > >This patch adds support for constructing and assigning tuple<> from > >other empty tuple-like types (e.g., array), completing the C++23 > >tuple-li

Re: fortran: remove redundant code related to constant pointer

2025-10-29 Thread Tobias Burnus
Hi Yuao, hi all, Yuao Ma wrote: I think this patch explains itself. This is identified during working on r16-4695-gb6146faae09bbc and should be safe to remove after r16-4474-g2c1949bf152f8f landed. Regression tested on x86_64-linux. Ok for trunk? LGTM. As you mentioned, r16-4474-g2c1949bf152

Re: [PATCH v6 2/2] libstdc++: Implement const copy-assignment for tuple<> [PR119721]

2025-10-29 Thread Jonathan Wakely
On Mon, 27 Oct 2025 at 15:11 +0100, Tomasz Kamiński wrote: This patch completes the implementation of P2321R2, giving tuple proper proxy reference semantics. The assignment operator is implemented as a template constrained to accept only tuple<>. Consequently, the language does not consider it a

Re: [PATCH v6 1/2] libstdc++: Add constructors and assignments for tuple<> with tuple-like types [PR119721]

2025-10-29 Thread Jonathan Wakely
On Mon, 27 Oct 2025 at 15:11 +0100, Tomasz Kamiński wrote: From: Osama Abdelkader This patch adds support for constructing and assigning tuple<> from other empty tuple-like types (e.g., array), completing the C++23 tuple-like interface for the zero-element tuple specialization. The implementat

fortran: remove redundant code related to constant pointer

2025-10-29 Thread Yuao Ma
Hi all, I think this patch explains itself. This is identified during working on r16-4695-gb6146faae09bbc and should be safe to remove after r16-4474-g2c1949bf152f8f landed. Regression tested on x86_64-linux. Ok for trunk? PS: I will continue refining the .NIL. patch this weekend. Yuao 0001-fo

Re: [PATCH] libstdc++: Simplify std::regex_traits::value

2025-10-29 Thread Tomasz Kaminski
On Tue, Oct 28, 2025 at 5:18 PM Jonathan Wakely wrote: > We don't need to use an istringstream to convert a hex digit to its > numerical value. > > libstdc++-v3/ChangeLog: > > * include/bits/regex.tcc (regex_traits::value): Implement > without using istringstream. > * incl

[COMMITTED] PR tree-optimization/91191 - Handle VIEW_CONVERT_EXPR for non-floats.

2025-10-29 Thread Andrew MacLeod
This is a long standing PR that shouldn't have languished this long.  The was a lack of clarity of what to do with VIEW_CONVERT_EXPR when it did not meet the technical requirement of both arguments being the same precision. If the precision is the same, and both arguments are integral, then we

Direct links to latest pending MIPS GCC patches

2025-10-29 Thread Aleksandar Rakic
Hi all, I’m sending a summary email with direct links to the latest version of each patch from the mailing list. This should make it easier to access them without searching through the archives manually. Please let us know if you have any comments or suggestions regarding these patches. Best reg

Re: [PATCH v2 01/10] Add -mgrow-frame-downwards

2025-10-29 Thread Aleksandar Rakic
Hi Jeff, > This ought to work. Plan is to do a first pass through for things that > are clearly safe and simple then work towards the more complex or > controversial stuff. Hopefully I don't goof dependencies again. Thanks a lot for merging the patches and for the detailed feedback. > > [PATC

[PATCH][v2] Fix possible double-free and leak in BB SLP discovery

2025-10-29 Thread Richard Biener
vect_build_slp_instance always releases the scalar stmts vector, so make sure to mark it as released and actually release it. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-slp.cc (vect_analyze_slp): Mark stmts in BB roots as released after vect_build_slp

[PATCH v2] arc: Fix wrong vector ordering on big-endian architecture

2025-10-29 Thread Luis Silva
From: Loeka Rogge V2HI vectors, explicitly or auto-generated, could be stored in memory wrongly due to endianness. For example in the following c code stores to the struct are SLP vectorized, causing them to be stored in the wrong order: struct S {short a; short b;}; s.a = 520; s.b = -1; in the

Re: [PATCH] Extend the attribute "counted_by" to support VOID pointer under GNU extension.

2025-10-29 Thread Qing Zhao
> On Oct 29, 2025, at 01:08, Yeoul Na wrote: > > Is the reasoning that since it’s not a standard feature, a pedantic warning > doesn’t make sense? And it’s still a warning with -Wpointer-arith. Yeah, “counted_by” itself is not a standard feature already. > > If so, yes, it makes sense to me

RE: [PATCH] tree-optimization/120687 - legitimise some permutes before optimizing

2025-10-29 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: 29 October 2025 09:59 > To: [email protected] > Cc: [email protected]; RISC-V CI > Subject: [PATCH] tree-optimization/120687 - legitimise some permutes before > optimizing > > The following does a simple legitimising atte

Re: [PATCH v4] [aarch64] Make better use of overflowing operations in max/min(a, add/sub(a, b)) [PR116815]

2025-10-29 Thread Uros Bizjak
On Tue, Oct 28, 2025 at 6:35 PM Andrew Pinski wrote: > > > +(define_insn_and_split > > > "*aarch64_plus_within_3_" > > > + [(set (match_operand:GPI 0 "register_operand" "=r") > > > + (UMAXMIN:GPI > > > + (plus:GPI (match_operand:GPI 1 "register_operand" "r") > > > + (m

Re: [PATCH] Fix possible double-free in BB SLP discovery

2025-10-29 Thread Christopher Bazley
On 29/10/2025 13:04, Richard Biener wrote: On Wed, 29 Oct 2025, Christopher Bazley wrote: I don't think this fix is sufficient. It may appear to "fix" a specific crash, but only because it hides the symptom. I considered making this one-line change but when I discovered how broken the error-h

[PING^1][PATCH 0/4] ipa: Remove LTO requirement for builtin callback carriers

2025-10-29 Thread Josef Melcr
Hi, a gentle ping for this patch series: https://gcc.gnu.org/pipermail/gcc-patches/2025-October/697994.html. Patch 2 has already been approved and committed, but the rest of the series is yet to be reviewed.  Thanks :) Best regards, Josef

Re: [PATCH] Fix possible double-free in BB SLP discovery

2025-10-29 Thread Richard Biener
On Wed, 29 Oct 2025, Christopher Bazley wrote: > I don't think this fix is sufficient. It may appear to "fix" a specific crash, > but only because it hides the symptom. I considered making this one-line > change but when I discovered how broken the error-handling > of vect_build_slp_instance is, I

Re: [PATCH] Fix possible double-free in BB SLP discovery

2025-10-29 Thread Christopher Bazley
I don't think this fix is sufficient. It may appear to "fix" a specific crash, but only because it hides the symptom. I considered making this one-line change but when I discovered how broken the error-handling of vect_build_slp_instance is, I rejected the idea. Your proposed fix relies on an

Re: [PATCH] fortran: support .NIL. in conditional arguments

2025-10-29 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: The updated patch will resolve the first two cases. Regarding the coarray, if it's not causing an ICE, I'd prefer to postpone working on it until we handle arrays. Makes sense. Coarrays also behave strangely at times and are not that widely used. Still, I want to mentio

Re: [PATCH] c++, libstdc++, v4: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-10-29 Thread Jonathan Wakely
On Fri, 29 Aug 2025 at 11:22, Jakub Jelinek wrote: > > On Fri, Aug 29, 2025 at 11:40:10AM +0200, Jason Merrill wrote: > > > --- gcc/cp/semantics.cc.jj 2025-08-28 10:50:43.432763513 +0200 > > > +++ gcc/cp/semantics.cc 2025-08-28 16:52:48.006806831 +0200 > > > @@ -13591,6 +13591,38 @@ trait_exp

Re: [PATCH] c++, libstdc++, v4: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-10-29 Thread Jonathan Wakely
On Tue, 23 Sept 2025 at 08:15, Tomasz Kaminski wrote: > > The library side looks good to me, with two small comments: > * removing version.cc file, that duplicates tests > * removing copyright notice from second test (to be confirmed by Jonathan). > The test covers all cases, that I could think

Re: [PATCH] bpf: Split expressions for proper CO-RE code generation

2025-10-29 Thread Cupertino Miranda
On 28-10-2025 21:26, David Faust wrote: On 10/24/25 10:01, Cupertino Miranda wrote: This patch corrects CO-RE generation for the cases where an expression starts with a non-CO-RE access, but in the middle it requires to generate CO-RE to correctly compute the access location. It fixes it b

RE: [PATCH v3 1/2] Fix comments for boolean vector modes

2025-10-29 Thread Tamar Christina
Hi Yury, > -Original Message- > From: Yury Khrustalev > Sent: 16 October 2025 16:37 > To: [email protected] > Cc: Tamar Christina ; Srinath Parvathaneni > ; Tejas Belagod ; > [email protected]; [email protected]; [email protected]; > [email protected]; [email protected] > Subject: [PAT

[PATCH] Testcase for PR70102

2025-10-29 Thread Richard Biener
We are now able to vectorize the PR70102 testcase using a SLP reduction chain. Tested on x86_64-linux, pushed. PR tree-optimization/70102 * gfortran.dg/vect/pr70102.f: New testcase. --- gcc/testsuite/gfortran.dg/vect/pr70102.f | 21 + 1 file changed, 21 insert

[PATCH v1] LoongArch: Add builtin interfaces for 128 and 256 vector conversions.

2025-10-29 Thread chenxiaolong
gcc/ChangeLog: * config/loongarch/lasx.md (vec_cast): New template implemention. (vec_insert_lo_): Dito. (vec_insert_hi_): Dito. * config/loongarch/lasxintrin.h (defined): Test for adding the builtin function. (__lasx_cast_128_s): Dito.

[PATCH] tree-optimization/120687 - legitimise some permutes before optimizing

2025-10-29 Thread Richard Biener
The following does a simple legitimising attempt on the SLP graph permutations before trying to optimize them. For the case we have a single non-zero layout we can force that to all partitions if it is compatible. This way we end up with the most canonical (and possibly no-op) load permutations a

RE: [PATCH] driver: Support very long command lines via temporary files [PR111527]

2025-10-29 Thread Tamar Christina
Adding Joseph who's a reviewer for the driver > -Original Message- > From: [email protected] > Sent: 27 October 2025 13:03 > To: [email protected] > Cc: [email protected]; [email protected]; Ross Burton > ; [email protected]; [email protected] > Subject:

[PATCH] Fix possible double-free in BB SLP discovery

2025-10-29 Thread Richard Biener
vect_build_slp_instance always releases the scalar stmts vector, so make sure to mark it as released. Bootstrapped and tested on x86_64-unknown-linux-gnu. This should fix the observed double-free? Thanks, Richard. * tree-vect-slp.cc (vect_analyze_slp): Mark stmts in BB roots as

[PATCH v3] LoongArch: Standard instruction template fnmam4 correction

2025-10-29 Thread Guo Jie
The current implementation of the fnmam4 instruction template requires the third source operand to be assigned the same hard register as the target operand, but the constraint is not documented in the instruction manual or standard template definitions. The current constraint will generate addition

[PATCH] LoongArch: Only allow valid binary op when optimize conditional move

2025-10-29 Thread Jinyang He
It is wrong that optimize from `if (cond) dest op= 1 << shift` to `dest op= (cond ? 1 : 0) << shift` when `dest op 0 != dest`. Like `and`, `mul` or `div`. And in this optimization `mul` and `div` is optimized to shift. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_expa

Re: [PATCH] rs6000: Remove redundant emit_insn from first_mismatch_or_eos_index

2025-10-29 Thread Manjunath S Matti
Hi Vijay, Right now my comments are just limited to the spell check. Fix the typo "elments" → "elements" before committing. - emit_insn (gen_vcmpne (cmpz1_result, operands[1], vzero)); - emit_insn (gen_vcmpne (cmpz2_result, operands[2], vzero)); - emit_insn (gen_and3 (and_result, cmpz1_resu

[PING^2][PATCH] rs6000: Improve codegen for __builtin_bswap16 on GPRs [PR121076]

2025-10-29 Thread Kishan Parmar
Ping! Please review.  Thanks & Regards Kishan On 09/09/25 2:04 pm, Kishan Parmar wrote: > Hi All, > > The fallback expansion of __builtin_bswap16 on pre-Power10 used a > sequence of multiple rlwinm/or instructions: > > mr r9,r3 > rlwinm r3,r9,24,24,31 > rlwinm r10,r9,8,16,23 > or

[PATCH v3] simplify-rtx: Canonicalize SUBREG and LSHIFTRT order for AND operations

2025-10-29 Thread Kishan Parmar
Hi Jeff and Segher, Changes from v2: * Code refactoring. Changes from v1: * Corrected commit message. For a given rtx expression (and (lshiftrt (subreg X) shift) mask) combine pass tries to simplify the RTL form to (and (subreg (lshiftrt X shift)) mask) where the SUBREG wraps