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

2025-10-24 Thread Hewill Kang
Thanks. The patch is LGTM. Tomasz Kaminski 於 2025年10月25日 週六 上午1:35寫道: > > > On Fri, Oct 24, 2025 at 7:03 PM Hewill Kang wrote: > >> `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard error. But I'm not sure we really need to care about it. > result_of (where

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

2025-10-24 Thread Andrew Pinski
After r16-4081-g966cdec2b2 which added folding of __builtin_assume_aligned, forwprop would propagate pointers that lower alignment replacing ones with greater alignment. This causes us to lose alignment information that __builtin_assume_aligned provided to expand. Normally this just loses some opt

[PATCH] LoongArch: Standard instruction template fnmam4 correction

2025-10-24 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: Adjust widen-mul rtx cost

2025-10-24 Thread Guo Jie
Equalize the rtx cost of mulw.d.w[u] with mul.d. There are two main benefits: 1. Reducing the number of instructions. - lu32i.d $r12,0 - bstrpick.d $r4,$r4,31,0 - mul.d $r4,$r4,$r12 - srli.d $r4,$r4,33 --- + mulh.wu $r4,$r4,

[PATCH] LoongArch: Add a combiner to eliminate redundant extension

2025-10-24 Thread Guo Jie
When the bit width of the data type before extension plus the bit count of the left-shift operation equals 32, optimizations similar to the following can from: ext.w.b $r4,$r5 slli.d $r4,$r4,24 to: slli.w $r4,$r5,24 gcc/ChangeLog: * config/loongarch/loongarch.md

Re: [PATCH v5 3/3] fmv: Add -ftarget-clones-table option support

2025-10-24 Thread Yangyu Chen
> On 24 Oct 2025, at 17:51, Alfie Richards wrote: > > On 04/10/2025 22:15, Jeff Law wrote: >> On 10/3/25 12:27 PM, Yangyu Chen wrote: >>> This patch adds support for target_clones table option. The >>> target_clones table option allows users to specify multiple versions >>> of a function and s

[PATCH] libstdc++: Add constructors and assignments for tuple<> with tuple-like types [PR119721]

2025-10-24 Thread Osama Abdelkader
This patch adds missing constructors and assignment operators for tuple<> to support construction and assignment from other empty tuple-like types such as array, completing the C++23 tuple-like support. The following members are added: - tuple(_UTuple&&): Constructor from empty tuple-like types -

[COMMITTED] PR tree-optimization/110405 - Add testcase

2025-10-24 Thread Andrew MacLeod
This PR was fixed by one of the other patches, just adding the testcase. Andrew From c9a4bd0dca16ad4de299e9f0c4a2afef6b85b8f0 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 24 Oct 2025 17:32:32 -0400 Subject: [PATCH 2/2] Add test case for PR 110405 PR was fixed bu one of the other pat

[COMMITTED] PR tree-optimization/114025 - Refine COND_EXPR ranges better.

2025-10-24 Thread Andrew MacLeod
We make some attempts to improve the ranges we pick up from cond_exprs.   We miss the case where its tied to a single ssa-name.  ie   _2 = value_3 < 20   _4 = _2 ? 20 : value_3 This is a common idiom for min or max, but it sometimes  eludes us for no good reason. fold_using_range::condexpr_a

Re: [PATCH] Add -fcombine-op-with-volatile-memory-load

2025-10-24 Thread H.J. Lu
On Fri, Oct 24, 2025 at 10:23 PM Georg-Johann Lay wrote: > > Am 24.10.25 um 15:45 schrieb H.J. Lu: > > For x86, volatile memory can be used as source operand for loads. Add > > -fcombine-op-with-volatile-memory-load to allow operations with volatile > > memory load: > > > > 1. Add a field, try_co

[PATCH v2] aarch64: Add support for FEAT_F8F32MM, FEAT_F8F16MM, and FEAT_SVE_F16F32MM.

2025-10-24 Thread Alfie Richards
Hi All, Embarrassingly, I had run the regression tests for V1, but apparently not looked at the results. Sorry about that, here's a not totally broken version. Regression tested (properly) for AArch64. Okay for master? Thanks, Alfie -- >8 -- Adds support for the AArch64 2024 fmmla extensions

[pushed] PR modula2/122407: Followup to spell check remaining intrinsics

2025-10-24 Thread Gaius Mulley
This followup patch ensures that any unknown symbol spell check error in the instrinsics uses the parameter token rather than the procedure name token. In turn this allows the filter module to detect and remove multiple unknowns at the same token. The patch also adds spell checking to the instrins

[PUSHED] aarch64/testsuite: fix auto-init-padding-[24].c testcases [PR122402]

2025-10-24 Thread Andrew Pinski
After r16-3956-gf613fdc6920c83, these 2 testcases start to fail as now SRA will fully scalarize the structs and only provide with the piece that was used. But the testcase is testing about the padding so turning off SRA is correct in this case. Pushed as obvious after testing the testcases now pas

[PATCH] xtensa: Remove one_cmplsi2 insn pattern

2025-10-24 Thread Takayuki 'January June' Suwa
The definition of one_cmplsi2 insn pattern is not mandatory; the insn generator recognize the absence of the pattern and instead generates an XOR with a pseudo whose value is -1 if "XOR reg, reg, imm" is not also provided. There is an advantage to exposing constant-valued registers early in RTL pa

[PATCH] Fortran: IS_CONTIGUOUS and pointers to non-contiguous targets [PR114023]

2025-10-24 Thread Harald Anlauf
Dear All, this patch does two things: it extends the inline generated code for IS_CONTIGUOUS to check the dtype of a passed pointer for span equal to elem_len. It also fixes the assignment of pointers to ensure that the dtype is the same whether bounds-remapping is done or not. While developing

Re: [PATCH] Fortran: fix TRANSFER of subarray component references [PR122386]

2025-10-24 Thread Harald Anlauf
Am 24.10.25 um 02:59 schrieb Jerry D: On 10/23/25 1:03 PM, Harald Anlauf wrote: Dear All, this patch remedies the approach used for PR102891 which turned out to be not generalizable and otherwise could lead to unwanted temporaries.  We now check directly whether the SOURCE argument of TRANSFER

Re: [committed v2] libstdc++: Fix export in std module

2025-10-24 Thread Eric Pimentel Aguiar
On Fri, Oct 24, 2025 at 2:09 PM Tomasz Kamiński wrote: > > From: Eric Pimentel Aguiar > > When exporting declarations in a namespace with using declarations, the > name must be fully qualified. Recently introduced std::full_extent{,_t}, > std:strided_slice, and std::submdspan_mapping_result broke

[committed v2] libstdc++: Fix export in std module

2025-10-24 Thread Tomasz Kamiński
From: Eric Pimentel Aguiar When exporting declarations in a namespace with using declarations, the name must be fully qualified. Recently introduced std::full_extent{,_t}, std:strided_slice, and std::submdspan_mapping_result broke module std and module std.compat. libstdc++-v3/ChangeLog:

[PATCH] libstdc++: Make std::valarray support overaligned types [PR108951]

2025-10-24 Thread Jonathan Wakely
Switch std::valarray memory allocation to use std::__new_allocator to allocate and deallocate memory. This adds support for extended alignment types without needing to duplicate all the logic from __new_allocator::allocate and __new_allocator::dellocate. std::__new_allocator is used instead of std

[PATCH] libstdc++: Add missing -pthread for new tests [PR122401]

2025-10-24 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: PR libstdc++/122401 * testsuite/20_util/shared_ptr/atomic/pr118757.cc: Add -pthread for et pthread. * testsuite/20_util/weak_ptr/pr118757.cc: Likewise. * testsuite/30_threads/condition_variable/members/116586.cc: Likewise. Onl

[PATCH] libstdc++: Add typedefs to __gnu_test::test_container utility

2025-10-24 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * testsuite/util/testsuite_iterators.h (test_container): Add iterator and value_type typedefs. --- I wanted to use test_container::value_type in a new test I was writing, and though it would be worth adding independently of the new test. Tested powerpc64le

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

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 7:03 PM Hewill Kang wrote: > `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard >>> error. But I'm not sure we really need to care about it. >>> result_of (where __inv_unwrap is sourced from), does not care about it. So I would say, we do no

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

2025-10-24 Thread Hewill Kang
According to your explanation, I have noticed that the following code should be rejected because the constraints are not satisfied (i.e., is-invocable-using should be false). Hewill Kang 於 2025年10月25日 週六 上午12:15寫道: > Here are some examples: > > struct S { > void f() const; > }; > > int main(

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

2025-10-24 Thread Hewill Kang
I use "!", so libstdc++ should pass, no? Tomasz Kaminski 於 2025年10月25日 週六 上午1:09寫道: > > > On Fri, Oct 24, 2025 at 7:03 PM Hewill Kang wrote: > >> `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard error. But I'm not sure we really need to care about it. > resu

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

2025-10-24 Thread Hewill Kang
> > `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard >> error. But I'm not sure we really need to care about it. >> >>> result_of (where __inv_unwrap is sourced from), does not care about it. >>> So I would say, we do not need to. >> >> Thanks for the explanation. Should I f

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

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 7:03 PM Hewill Kang wrote: > `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard >>> error. But I'm not sure we really need to care about it. >>> result_of (where __inv_unwrap is sourced from), does not care about it. So I would say, we do no

[Ada] Fix other instances of incorrect String lower bound in gnatlink

2025-10-24 Thread Eric Botcazou
Two were fixed for GCC 15 and this fixes the other two. This also reverts an unintentional change introduced by the initial fix. Tested on x86-64/Linux, applied on the mainline and 15 branch. 2025-10-24 Nicolas Boulenguez PR ada/81087 * gnatlink.adb (Is_Prefix): Move around

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

2025-10-24 Thread Cupertino Miranda
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 by splitting the expression into their CO-RE and non-CO-RE counterparts. It performs this by

[Ada] Fix segfault on file without final EOL with -gnatyc

2025-10-24 Thread Eric Botcazou
The compiler overruns the source file buffer. Tested on x86-64/Linux, applied on the mainline and 15 branch. 2025-10-24 Eric Botcazou PR ada/118782 * styleg.adb (Is_Box_Comment): Also stop the loop at EOF. -- Eric Botcazoudiff --git a/gcc/ada/styleg.adb b/gcc/ada/styleg.adb

[Ada] Fix argument expansion with unbalanced quote on Windows

2025-10-24 Thread Eric Botcazou
The last character of the argument is chopped as if it was a quote. Tested on x86-64/Windows, applied on the mainline. 2025-10-24 Mivirl PR ada/122367 * rtinit.c (__gnat_runtime_initialize) [__MINGW32__]: Fix detection of quoted arguments. -- Eric Botcazoudiff --git

[Ada] Fix strange control flow in terminals.c

2025-10-24 Thread Eric Botcazou
This was caught by a static analyzer some time ago. Tested on x86-64/Windows, applied on the mainline. 2025-10-24 Eric Botcazou PR ada/98879 * terminals.c (__gnat_setup_child_communication) [_WIN32]: Add else blocks in the processing of the data returned by ReadFile.

Re: [PATCH v2 1/5] aarch64: Document `DEF_*` macros

2025-10-24 Thread Karl Meakin
On 24/10/2025 17:27, Alice Carlotti wrote: On Fri, Oct 24, 2025 at 04:36:46PM +0100, Karl Meakin wrote: On 24/10/2025 15:26, Kyrylo Tkachov wrote: On 16 Sep 2025, at 12:43, via Sourceware Forge wrote: From: Karl Meakin I’ve added Karl explicitly on CC myself as I think the forge doesn’

Re: [PATCH v2 1/5] aarch64: Document `DEF_*` macros

2025-10-24 Thread Alice Carlotti
On Fri, Oct 24, 2025 at 04:36:46PM +0100, Karl Meakin wrote: > > On 24/10/2025 15:26, Kyrylo Tkachov wrote: > > > > > On 16 Sep 2025, at 12:43, via Sourceware Forge > > > wrote: > > > > > > > > > From: Karl Meakin > > > > > I’ve added Karl explicitly on CC myself as I think the forge doesn’

Re: [PATCH] PR 118254 and a question...

2025-10-24 Thread Andrew MacLeod
On 10/24/25 05:29, Richard Biener wrote: I'd say commit it and re-open the bug - it has not been "fixed", but it was made latent anyway. Richard. I checked it in.  I was just thinking, should I do anything to the testcase for 111003?  mark it XFAIL or something or just leave it as is? And

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

2025-10-24 Thread Hewill Kang
Here are some examples: struct S { void f() const; }; int main() { S s; volatile auto sr = std::ref(s); std::function_ref fr(std::nontype<&S::f>, sr); fr(); } Hewill Kang 於 2025年10月25日 週六 上午12:10寫道: > `volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard > error.

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

2025-10-24 Thread Hewill Kang
`volatile std::reference_wrapper` will cause `_Ur __uref = __ref;` hard error. But I'm not sure we really need to care about it. Tomasz Kamiński 於 2025年10月24日 週五 下午11:33寫道: > To reduce instantiation count, function_ref(nontype<&S::x>, r) previously > reused the invoker from function_ref(nontype<

Re: [PATCH v2] libstdc++: New _IotaArray utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
Tomasz Kaminski [Friday, 24 October 2025, 17:40:40 CEST]: > > #endif // __glibcxx_integer_sequence > > > > +#if __cpp_structured_bindings >= 202411L > > +#if __has_builtin(__integer_pack) > > + template > > +inline constexpr _Tp > > +_IotaArray[_Num] = {__integer_pack(_Tp(_Num))...}; >

[COMMITTED] PR 118254 - Create and apply bitmasks for truncating casts.

2025-10-24 Thread Andrew MacLeod
On 10/24/25 05:29, Richard Biener wrote: On Thu, Oct 23, 2025 at 8:49 PM Andrew MacLeod wrote: The attached patch fixes PR 118254. It does 2 things: 1) when performing a cast, we cast sub pairs and union the results. When this gets to VARYING we immediately short circuit and return. THe erro

[COMMITTED] PR tree-optimization/114725 - Split signed bitwise AND operations.

2025-10-24 Thread Andrew MacLeod
The current algorithm for performing bitwise and operations predates multi-ranges.  AS such, it has difficulty with complex signed operations when the range crosses the boundry between signed and unsigned. In this case, we are looking at  [-INF, 128] & -9,  which basically gives up and returns

Re: [PATCH v2] libstdc++: New _IotaArray utility to simplify index pack creation

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 5:34 PM Matthias Kretz wrote: > - Moved out of #if __glibcxx_integer_sequence into #if > __cpp_structured_bindings >= 202411L. > - Renamed to _IotaArray. Renamed test accordingly. > > Tested on x86_64-linux. (__integer_pack else branch tested, too) > OK for trunk? > >

Re: [PATCH v2 1/5] aarch64: Document `DEF_*` macros

2025-10-24 Thread Karl Meakin
On 24/10/2025 15:26, Kyrylo Tkachov wrote: On 16 Sep 2025, at 12:43, via Sourceware Forge wrote: From: Karl Meakin I’ve added Karl explicitly on CC myself as I think the forge doesn’t do it currently. Document all the `DEF_*` macros and their arguments. gcc/ChangeLog: * config/aa

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

2025-10-24 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

[PATCH v2] libstdc++: New _IotaArray utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
- Moved out of #if __glibcxx_integer_sequence into #if __cpp_structured_bindings >= 202411L. - Renamed to _IotaArray. Renamed test accordingly. Tested on x86_64-linux. (__integer_pack else branch tested, too) OK for trunk? - 8< -- This patch introduces th

Re: [PATCH] libstdc++: Fix export in std module

2025-10-24 Thread Jonathan Wakely
On Fri, 24 Oct 2025 at 14:55, Eric Pimentel Aguiar wrote: > > Hi, > > This is my first patch to the GCC mailing, so feedback is appreciated. I > may have gone overboard with detail for a mere four-line change. I > noticed trunk builds of libstdc++ broke previously working builds of an > experiment

Re: [PATCH v2 1/5] aarch64: Document `DEF_*` macros

2025-10-24 Thread Karl Meakin
On 24/10/2025 15:26, Kyrylo Tkachov wrote: On 16 Sep 2025, at 12:43, via Sourceware Forge wrote: From: Karl Meakin I’ve added Karl explicitly on CC myself as I think the forge doesn’t do it currently. Document all the `DEF_*` macros and their arguments. gcc/ChangeLog: * config/aa

Re: [PATCH] Add -fcombine-op-with-volatile-memory-load

2025-10-24 Thread Uros Bizjak
On Fri, Oct 24, 2025 at 4:23 PM Georg-Johann Lay wrote: > Can it break volatile correctness or so? I have done some smoke tests with the patched compiler with (gcc -O2): --cut here-- volatile int m; int foo (void) { int h = m; int r = m; asm volatile ("barrier" ::: "memory"); int p = m

Re: [PATCH] Add -fcombine-op-with-volatile-memory-load

2025-10-24 Thread Uros Bizjak
l Core i7-1195G7. I have built the latest git defconfig linux kernel with the patched current gcc trunk. The patched compiler compiles the kernel without problems and I was able to boot the built kernel under qemu: Linux version 6.18.0-rc2-00120-g6fab32bb6508 (uros@fedora) (xgcc (GCC) 16.0.0 20251

Re: [PATCH] Add -fcombine-op-with-volatile-memory-load

2025-10-24 Thread Georg-Johann Lay
Am 24.10.25 um 15:45 schrieb H.J. Lu: For x86, volatile memory can be used as source operand for loads. Add -fcombine-op-with-volatile-memory-load to allow operations with volatile memory load: 1. Add a field, try_combine_insn, to recog_data_d for the combine pass to pass the instruction in

Re: [PATCH v2 1/5] aarch64: Document `DEF_*` macros

2025-10-24 Thread Kyrylo Tkachov
> On 16 Sep 2025, at 12:43, via Sourceware Forge > wrote: > > > From: Karl Meakin > I’ve added Karl explicitly on CC myself as I think the forge doesn’t do it currently. > Document all the `DEF_*` macros and their arguments. > > gcc/ChangeLog: > > * config/aarch64/aarch64-neon-sve-bri

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

2025-10-24 Thread Luis Manuel Silva
Hi Claudiu, There’s no earlier discussion. The ">" lines in the commit message were just used to show code examples, not replies to previous emails. Luis On Fri, Oct 24, 2025 at 1:59 PM Claudiu Zissulescu Ianculescu wrote: > Hi Luis, > > It seems I've got only this email, and it looks like it

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
On 24 October 2025 14:27:23 CEST, Jonathan Wakely wrote: >On Fri, 24 Oct 2025 at 13:11, Matthias Kretz wrote: >> >> Matthias Kretz [Friday, 24 October 2025, 14:04:16 CEST]: >> > > > > #endif // __glibcxx_integer_sequence >> > > > >> > > > This is defined for C++14 and later, but I think it ca

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

2025-10-24 Thread Claudiu Zissulescu Ianculescu
Hi Luis, It seems I've got only this email, and it looks like it is part of a larger discussion. Did I miss it? Claudiu On Wed, Oct 22, 2025 at 3:37 PM Luis Silva wrote: > > From: Loeka Rogge > > V2HI vectors, explicitly or auto-generated, could be stored in memory wrongly > due to endianness.

[PATCH] libstdc++: Fix export in std module

2025-10-24 Thread Eric Pimentel Aguiar
Hi, This is my first patch to the GCC mailing, so feedback is appreciated. I may have gone overboard with detail for a mere four-line change. I noticed trunk builds of libstdc++ broke previously working builds of an experimental C++ codebase of mine that tests new C++26 features. The problem can b

Re: [PATCH] OpenMP: Fix label mangling in metadirective body [PR122378]

2025-10-24 Thread Paul-Antoine Arras
Updated the git commit log as suggested by Thomas. The patch itself remains unchanged. On 24/10/2025 10:13, Paul-Antoine Arras wrote: Testcase c-c++-common/gomp/attrs-metadirective-2.c failed in C++ when OFFLOAD_TARGET_NAMES=nvptx-none. That was caused by label mangling being applied to the use

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

2025-10-24 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 2/2] xtensa: Remove redundant use of 'n'-constraint for call insns

2025-10-24 Thread Max Filippov
On Thu, Oct 23, 2025 at 1:07 AM Takayuki 'January June' Suwa wrote: > > Because 'i'-constraint clearly includes 'n'. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (call_internal, call_value_internal, > sibcall_internal, sibcall_value_internal): Remove 'n'-constraint. > --- > g

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Jonathan Wakely
On Fri, 24 Oct 2025 at 13:11, Matthias Kretz wrote: > > Matthias Kretz [Friday, 24 October 2025, 14:04:16 CEST]: > > > > > #endif // __glibcxx_integer_sequence > > > > > > > > This is defined for C++14 and later, but I think it can't actually be > > > > used for anything useful without C++26 pack

Re: [PATCH v2] libstdc++: Forward arguments for bind_front, bind_back, nttp [PR122022]

2025-10-24 Thread Jonathan Wakely
On Fri, 24 Oct 2025 at 10:54, Tomasz Kamiński wrote: > > This patch fixes a missing forwarding-reference (&&) in _Bind_fn_t::operator() > and lambda returned from not_fn. > > The bind_front/bind_back tests were updated to use a structure similar > to r16-3398-g250dd5b5604fbc to cover cases involvi

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 2:04 PM Matthias Kretz wrote: > > > > #endif // __glibcxx_integer_sequence > > > > > > This is defined for C++14 and later, but I think it can't actually be > > > used for anything useful without C++26 packs introduced by structured > > > bindings, right? > > > > > > I wo

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
Matthias Kretz [Friday, 24 October 2025, 14:04:16 CEST]: > > > > #endif // __glibcxx_integer_sequence > > > > > > This is defined for C++14 and later, but I think it can't actually be > > > used for anything useful without C++26 packs introduced by structured > > > bindings, right? > > > > > > I

[pushed] PR modula2/122407: similar error messages are emitted for an unknown symbol

2025-10-24 Thread Gaius Mulley
This followup to PR modula2/122241 reduces error message clutter by filtering unknown symbol error ensuring that only one error message is emitted for an unknown symbol at a particular location. The filter is implemented using two binary trees. A new generic (based on the address type) binary dict

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
> > > #endif // __glibcxx_integer_sequence > > > > This is defined for C++14 and later, but I think it can't actually be > > used for anything useful without C++26 packs introduced by structured > > bindings, right? > > > > I wonder if we want to restrict the definition of _IndexPack to C++26? >

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 1:45 PM Jonathan Wakely wrote: > On Fri, 24 Oct 2025 at 12:38, Matthias Kretz wrote: > > > > Tested on x86_64-linux. (Not tested with Clang yet.) OK for trunk? > > > > - 8< > > > > This patch introduces the internal helper type _In

Re: [PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Jonathan Wakely
On Fri, 24 Oct 2025 at 12:38, Matthias Kretz wrote: > > Tested on x86_64-linux. (Not tested with Clang yet.) OK for trunk? > > - 8< > > This patch introduces the internal helper type _IndexPack to simplify > defining a pack of indices via a structured bindi

[PATCH] libstdc++: New _IndexPack utility to simplify index pack creation

2025-10-24 Thread Matthias Kretz
Tested on x86_64-linux. (Not tested with Clang yet.) OK for trunk? - 8< This patch introduces the internal helper type _IndexPack to simplify defining a pack of indices via a structured binding declaration: constexpr auto [...__is] = _IndexPack; _IndexPac

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

2025-10-24 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: [COMMITTED, PATCH] x86: builtin-fabs-2.c: Also scan (%edi) for x32

2025-10-24 Thread H.J. Lu
On Fri, Oct 24, 2025 at 4:32 PM H.J. Lu wrote: > > Adjust gcc.target/i386/builtin-fabs-2.c to scan both (%rdi) and (%edi). > > PR target/122323 > * gcc.target/i386/builtin-fabs-2.c: Also scan (%edi)for x32. > > -- > H.J. Backporting it to release branches. -- H.J.

Re: [PATCH] testsuite: Add test for ICE fixed by r16-4571

2025-10-24 Thread Richard Biener
On Fri, 24 Oct 2025, Alex Coplan wrote: > I recently ran into an ICE that was fixed by richi's > r16-4571-g1ceda79ca5fe1a1a296624a98de8fd04958fbe55. > > This adds a testcase for that fix. > > The same testcase doesn't ICE with GCC 15, so there's no need for a > backport or PR. > > Tested on aar

[PATCH] testsuite: Add test for ICE fixed by r16-4571

2025-10-24 Thread Alex Coplan
I recently ran into an ICE that was fixed by richi's r16-4571-g1ceda79ca5fe1a1a296624a98de8fd04958fbe55. This adds a testcase for that fix. The same testcase doesn't ICE with GCC 15, so there's no need for a backport or PR. Tested on aarch64-linux-gnu (ICEs prior to r16-4571, PASSes afterwards).

[PATCH v2] vect: Add vector lowering for MULT_EXPR for constant pow2 multiplication. [PR122065]

2025-10-24 Thread Avinash Jayakar
Hi, I have incorporated the changes suggested in the previous version. For now the bare bones version of multiply by constant pattern recog is implemented in tree-vect-generic.cc, which should help fixing the failing test cases in 119702. But to fix PR122065, will need to implement the lowering

[PATCH v1] aarch64: Add support for FEAT_F8F32MM, FEAT_F8F16MM, and FEAT_SVE_F16F32MM.

2025-10-24 Thread Alfie Richards
Hi All, Reg tested on aarch64-linux-gnu. Okay for master? Alfie -- >8 -- Adds support for the AArch64 2024 fmmla extensions. Note this includes a work around for spurious warnings from binutils with movprfx and fmmla instructions (PR gas/33562). gcc/ChangeLog: * config/aarch64/aarch

[PATCH v2] libstdc++: Forward arguments for bind_front, bind_back, nttp [PR122022]

2025-10-24 Thread Tomasz Kamiński
This patch fixes a missing forwarding-reference (&&) in _Bind_fn_t::operator() and lambda returned from not_fn. The bind_front/bind_back tests were updated to use a structure similar to r16-3398-g250dd5b5604fbc to cover cases involving zero, one, and many bound arguments. PR libstdc++/122

Re: [PATCH v5 3/3] fmv: Add -ftarget-clones-table option support

2025-10-24 Thread Alfie Richards
On 04/10/2025 22:15, Jeff Law wrote: On 10/3/25 12:27 PM, Yangyu Chen wrote: This patch adds support for target_clones table option. The target_clones table option allows users to specify multiple versions of a function and select the version at runtime based on the specified table. The targe

[PATCH] Fix reduction validation for associated reduction chains

2025-10-24 Thread Richard Biener
The code checking whether we have a single cycle and tracking the reduction chain was not transitioned to full SLP which now shows when having a SLP reduction chain built after associating the reduction operation. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-lo

[PATCH] tree-optimization/122406 - incomplete handling of reduction chain with conversion

2025-10-24 Thread Richard Biener
The following fixes the mixup between reduction operation and conversion wrapping a reduction chain. This also exposes a missed optimization but I'm going to fix that in a followup. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/122406 * tree-ve

Re: [PATCH 1/2] libstdc++: Use forwarding in _Bind_fn_t::operator().

2025-10-24 Thread Tomasz Kaminski
On Fri, Oct 24, 2025 at 11:15 AM Tomasz Kamiński wrote: > This patch fixes a missing forwarding-reference (&&) in > _Bind_fn_t::operator(). > This issue was detected when the bind_front/bind_back tests were > updated > to use a structure similar to r16-3398-g250dd5b5604fbc to cover cases > involv

Re: [PATCH][middle-end/122392] Remove erroneous PASS_MEM_STAT annotation.

2025-10-24 Thread Richard Biener
On Fri, Oct 24, 2025 at 11:32 AM Josef Melcr wrote: > > Hi, > this patch remvoes the annotation which causes the build to fail when > configured with --enable-gather-detailed-mem-stats. I am very familiar > with the mem stat system yet, so I'd leave annotating these functions > for a future patch

[PATCH][middle-end/122392] Remove erroneous PASS_MEM_STAT annotation.

2025-10-24 Thread Josef Melcr
Hi, this patch remvoes the annotation which causes the build to fail when configured with --enable-gather-detailed-mem-stats. I am very familiar with the mem stat system yet, so I'd leave annotating these functions for a future patch. Bootstrapped on x86_64-linux. OK for master? Best regards, J

Re: [PATCH] PR 118254 and a question...

2025-10-24 Thread Richard Biener
On Thu, Oct 23, 2025 at 8:49 PM Andrew MacLeod wrote: > > The attached patch fixes PR 118254. > > It does 2 things: > > 1) when performing a cast, we cast sub pairs and union the results. > When this gets to VARYING we immediately short circuit and return. > THe error was if there was a bitmask, i

Re: [PATCH] tree-optimization/120687 - permute optimization wrt unsupported layout 0

2025-10-24 Thread Richard Biener
On Thu, 23 Oct 2025, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 22 Oct 2025, Richard Sandiford wrote: > > > >> Richard Biener writes: > >> > The following tries to addess one shortcoming of the SLP permute > >> > optimization phase which is that it tries to refuse layouts that

[PATCH v8] rs6000: Use vector addition when left shifting by 1 [PR119702]

2025-10-24 Thread Avinash Jayakar
Hi Segher, Please ignore the v7 patch, had minor errors in capitalization. Thanks for the review of the v6 patch. I have incorporated all the mentioned changes in this patch. Bootstrapped and regtested on powerpc64le-linux with no regressions. Ok for trunk? As mentioned in the PATCH v6 thread va

[PATCH] OpenMP: Fix label mangling in metadirective body [PR122378]

2025-10-24 Thread Paul-Antoine Arras
Testcase c-c++-common/gomp/attrs-metadirective-2.c failed in C++ when OFFLOAD_TARGET_NAMES=nvptx-none. That was caused by label mangling being applied to the use but not to the declaration. This is now fixed by mangling the declaration as well. PR middle-end/122378 gcc/cp/ChangeLog:

[PATCH 1/2] libstdc++: Use forwarding in _Bind_fn_t::operator().

2025-10-24 Thread Tomasz Kamiński
This patch fixes a missing forwarding-reference (&&) in _Bind_fn_t::operator(). This issue was detected when the bind_front/bind_back tests were updated to use a structure similar to r16-3398-g250dd5b5604fbc to cover cases involving zero, one, and many bound arguments. libstdc++-v3/ChangeLog:

[PATCH 2/2] libstdc++: Use _Bind_front_t/_Bind_back_t in bind_front/bind_back [PR122032]

2025-10-24 Thread Tomasz Kamiński
This patch changes the implementation of bind_front and bind_back to return a _Bind_front_t<_Bind_fn_t, ...> and _Bind_back_t<_Bind_fn_t, ...> respectively, replacing the previous lambda-based implementation. The prior use of a lambda caused non-conforming behavior with respect to C++23 [func.requi

[COMMITTED, PATCH] x86: builtin-fabs-2.c: Also scan (%edi) for x32

2025-10-24 Thread H.J. Lu
Adjust gcc.target/i386/builtin-fabs-2.c to scan both (%rdi) and (%edi). PR target/122323 * gcc.target/i386/builtin-fabs-2.c: Also scan (%edi)for x32. -- H.J. From 3caec017d613f7a5f3ed2bf150c00b8c1bead6b8 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 24 Oct 2025 16:23:19 +0800 Subject: [PA

Re: [PATCH] vect: Fix regression for PR104116

2025-10-24 Thread Andrew Stubbs
On 24/10/2025 06:15, Avinash Jayakar wrote: Thanks for the info. I also was able to build and debug it for this target. For the signed mod case, there is an extra requirement for vectorization that is to have vector operation support for ABS_EXPR, which amdgcn does not have. 5033if (!unsigne

[patch] Undefine SET_CMODEL before #define in rs6000/vxworks.h

2025-10-24 Thread Olivier Hainque
Good morning, This prevents warnings complaining about the redefinition on top of the base version, at compiler build time. 2025-10-16 Olivier Hainque * config/rs6000/vxworks.h (SET_CMODEL): Undefine before (re)defining. 0001-Undefine-SET_CMODEL-before-define-in-rs6000-vxwor

[patch] Adjust VxWorks special case in testsuite check_weak_available

2025-10-24 Thread Olivier Hainque
Greetings, check_weak_available was reporting weak symbols unsupported for vxworks unconditionally, while they are actually supported vxworks 7 now (assumed >= r2). This change adjusts the predicate to reflect that. We used to believe we should distinguish kernel and rtp modes, and experiments s