Re: [PATCH v2] x86: Add target("80387") function attribute

2025-08-14 Thread Uros Bizjak
On Fri, Aug 15, 2025 at 4:04 AM H.J. Lu wrote: > > Add target("80387") attribute to enable and disable x87 instructions in a > function. > > gcc/ > > PR target/121541 > * config/i386/i386-options.cc > (ix86_valid_target_attribute_inner_p): Add target("80387") > attr

Re: [PATCH] Use gimple_call_fntype rather than gimple_call_fndecl in pass_return_slot::execute

2025-08-14 Thread Kito Cheng
Pushed, thanks :) On Fri, Aug 15, 2025 at 3:17 AM Richard Biener wrote: > > > > > Am 14.08.2025 um 11:31 schrieb Kito Cheng : > > > > Call with funciton pointer might not able to get the fndecl, but fntype > > so use gimple_call_fntype instead of gimple_call_fndecl. > > > > aggregate_value_p can

[PATCH v4 2/2] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread Kito Cheng
We used to apply -mrvv-max-lmul= to limit VLS code gen, auto vectorizer, and builtin string function expansion. But I think the VLS code gen part doesn't need this limit, since it only happens when the user explicitly writes vector types. For example, int32x8_t under -mrvv-max-lmul=m1 with VLEN=12

[PATCH v4 1/2] RISC-V: Fix can_find_related_mode_p for VLS type

2025-08-14 Thread Kito Cheng
can_find_related_mode_p didn't handle VLS type correctly, and the root cause is TARGET_MIN_VLEN is in bits, but what we want is in bytes. Changes since v2: - Use else_void rather than require for opt_machine_mode. gcc/ChangeLog: * config/riscv/riscv-selftests.cc (riscv_run_selftests):

RE: [PATCH 0/1] aarch64: Adapt unwinder to linux's SME signal behaviour

2025-08-14 Thread Tamar Christina
> -Original Message- > From: Yury Khrustalev > Sent: Thursday, August 14, 2025 4:18 PM > To: gcc-patches@gcc.gnu.org > Cc: Richard Sandiford ; Tamar Christina > ; Andrew Pinski > Subject: [PATCH 0/1] aarch64: Adapt unwinder to linux's SME signal behaviour > > Backport of > https://gcc.gn

Ping #2: [PATCH, V4] Add -mcpu=future to the PowerPC

2025-08-14 Thread Michael Meissner
Ping #2 to add -mcpu=future support to the PowerPC posted on July 23rd, 2025: | Date: Wed, 23 Jul 2025 15:17:41 -0400 | Subject: [PATCH, V4] Add -mcpu=future to the PowerPC | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690398.html Note, I will have limited access to this ema

Ping: [PATCH] PR target/120681 - allow -mcmodel=large with PC relative addressing

2025-08-14 Thread Michael Meissner
Ping patch for PR target/120681 posted on June 17th, 2025 | Date: Tue, 17 Jun 2025 20:57:13 -0400 | Subject: [PATCH] PR target/120681 - allow -mcmodel=large with PC relative addressing | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686957.html Note, I will have limited acces

Ping: [PATCH] PR target/120528 -- Simplify zero extend from memory to VSX register on power10

2025-08-14 Thread Michael Meissner
Ping patch for PR target/120528, posted on June 5th, 2025 | Date: Thu, 5 Jun 2025 01:56:26 -0400 | Subject: [PATCH] PR target/120528 -- Simplify zero extend from memory to VSX register on power10 | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-June/685706.html Note, I will have li

Re:[ping^4] [ping^3][ping^2] [PATCH v2] MIPS: Fix the issue with the '-fpatchable-function-entry=' feature.

2025-08-14 Thread Lulu Cheng
在 2025/7/19 下午2:52, Lulu Cheng 写道: Ping^3 在 2025/5/27 上午8:54, Lulu Cheng 写道: Ping^2 在 2025/5/13 下午2:06, Lulu Cheng 写道: Ping? 在 2025/5/9 上午10:14, Lulu Cheng 写道: From: ChengLulu PR target/99217 gcc/ChangeLog: * config/mips/mips.cc (mips_start_function_definition): Implements

[PATCH v3 1/2] RISC-V: Fix can_find_related_mode_p for VLS type

2025-08-14 Thread Kito Cheng
can_find_related_mode_p didn't handle VLS type correctly, and the root cause is TARGET_MIN_VLEN is in bits, but what we want is in bytes. Changes since v2: - Use else_void rather than require for opt_machine_mode. gcc/ChangeLog: * config/riscv/riscv-selftests.cc (riscv_run_selftests):

Re: [PATCH v2 1/2] RISC-V: Fix can_find_related_mode_p for VLS type

2025-08-14 Thread Kito Cheng
Hmmm, it's really weird, I can't reproduce that on my hand, and I already tried two different machines... On Fri, Aug 15, 2025 at 4:43 AM Jeff Law wrote: > > > > On 8/14/25 7:34 AM, Kito Cheng wrote: > > can_find_related_mode_p didn't handle VLS type correctly, and the root > > cause is TARGET_MI

Re: [PATCH v1]RISCV: MIPS prefetch extensions for MIPS RV64 P8700 and can be enabled with xmipscbop.

2025-08-14 Thread Jeff Law
On 7/16/25 10:54 PM, Umesh Kalappa wrote: Fixed the regress that caused "pr118241.c" failure and tested "runtest --tool gcc --target_board='riscv-sim/-march=rv64gc_zba_zbb_zbc_zbs/-mabi=lp64/-mcmodel=medlow' riscv.exp" and 32 bit too lint warnings can be ignored for riscv-ext.opt. gcc

Re: [PATCH] x86: Add target("80387") function attribute

2025-08-14 Thread H.J. Lu
On Thu, Aug 14, 2025 at 5:37 AM H.J. Lu wrote: > > On Wed, Aug 13, 2025 at 11:33 PM Uros Bizjak wrote: > > > > On Thu, Aug 14, 2025 at 6:58 AM H.J. Lu wrote: > > > > > > Add target("80387") attribute to enable and disable x87 instructions in a > > > function. > > > > > > gcc/ > > > > > >

[PATCH v2] x86: Add target("80387") function attribute

2025-08-14 Thread H.J. Lu
Add target("80387") attribute to enable and disable x87 instructions in a function. gcc/ PR target/121541 * config/i386/i386-options.cc (ix86_valid_target_attribute_inner_p): Add target("80387") attribute. Set the mask bit in opts_set->x_target_flags if the

[PATCH] c++: Deducing member array type from string literal [PR121518]

2025-08-14 Thread seha-bot
From: Nedim Šehić Regtested on x86_64-pc-linux-gnu. This patch fixes deduction for member array types from parenthesized initializers which use braces and string literals. PR c++/121518 gcc/cp/ChangeLog: * pt.cc (maybe_aggr_guide): Add deduction for brace and string

Re:[pushed] [PATCH] LoongArch: Fix ICE caused by function add_stmt_cost[PR121542].

2025-08-14 Thread Lulu Cheng
Pushed to r16-3209. 在 2025/8/14 下午3:56, Lulu Cheng 写道: PR target/121542 gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_vector_costs::add_stmt_cost): When using vectype, first determine whether it is NULL. gcc/testsuite/ChangeLog: * gcc.targe

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-08-14 Thread Sebastian Huber
- Am 15. Aug 2025 um 0:02 schrieb Jeff Law jeffreya...@gmail.com: > On 8/13/25 9:00 PM, Sebastian Huber wrote: >> Hello Jeff, >> >> thanks for your comment. >> >> - Am 10. Jul 2025 um 16:01 schrieb Jeff Law jeffreya...@gmail.com: >> >>> On 7/9/25 11:53 PM, Sebastian Huber wrote: Th

[PATCH v2] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Vineet Gupta
Changes since v1: - Fix scan pattern for math-nearbyint-1.c - Per Andrew's suggestion gate flag save/restore on -ftrapping-math --- __builtin_round() fails to save/restore FP exception flags around the FP compare insn which can potentially clobber the same. Worth noting that the fflags restore

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Andrew Waterman
On Thu, Aug 14, 2025 at 3:53 PM Vineet Gupta wrote: > > On 8/14/25 15:11, Andrew Waterman wrote: > >> Yes it needed adjustment due to additional save/restore. Fixed that and > >> will > >> push shortly. > > While you're at it, does it make sense to skip the flag save/restore > > if !flag_trapping

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Palmer Dabbelt
On Thu, 14 Aug 2025 15:10:56 PDT (-0700), Vineet Gupta wrote: > On 8/14/25 14:48, Vineet Gupta wrote: >> Yes it needed adjustment due to additional save/restore. Fixed that and will >> push shortly. > > The commit hook doesn't like the following > > | remote: *** The following commit was rejected b

Re: [PATCH] fixincludes: skip stdio_stdarg_h on modern darwin

2025-08-14 Thread Iain Sandoe
Hi FX, Sorry this slipped of my radar... > On 15 Aug 2025, at 00:02, FX Coudert wrote: > > Hi Iain, > > Gentle ping on that one. It would allow to remove one of the last fixincludes > remaining on modern darwin. Yes OK, great - the more we can remove the better. Iain > > FX > > > >> Le

Re: [PATCH] fixincludes: skip stdio_stdarg_h on modern darwin

2025-08-14 Thread FX Coudert
Hi Iain, Gentle ping on that one. It would allow to remove one of the last fixincludes remaining on modern darwin. FX > Le 13 juin 2025 à 17:28, FX Coudert a écrit : > > Hi, > > All macOS SDK since at least macOS 10.9, and until macOS 10.12 > (included), feature these lines in : > > /* DO

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Vineet Gupta
On 8/14/25 15:11, Andrew Waterman wrote: >> Yes it needed adjustment due to additional save/restore. Fixed that and will >> push shortly. > While you're at it, does it make sense to skip the flag save/restore > if !flag_trapping_math? It's an admittedly minor point, since the > non-Zfa case is mor

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Joseph, On Thu, Aug 14, 2025 at 10:03:00PM +, Joseph Myers wrote: > On Thu, 14 Aug 2025, Alejandro Colomar wrote: > > > And I'm proposing it as a GNU extension, which means we don't even need > > to care about what ISO C says about [n]. We, as a quality > > implementation, treat it with s

Re: [PATCH v2] arm.cc: fix thumb1 prologue high reg restore violates -ffixed-rX [PR117468]

2025-08-14 Thread Matt Parks
Ping; CCing all ARM maintainers. This patch (PR117468) and the other (PR117366) have been good to go for some time now but need someone to approve/commit. Both have test cases included and incorporated suggestions from Christophe Lyon (thanks!). Thanks, Matt > On 07/21/2025 3:21 PM EDT Matt Par

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Jeff Law
On 8/14/25 3:48 PM, Vineet Gupta wrote: So I'm guessing the issue at hand is in that rounding path that does not use Zfa we've introduced a flt instruction where we didn't have one before (previously we likey called into glibc). No flt exists even in glibc - it just happens after NaN check

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Vineet Gupta
On 8/14/25 14:48, Vineet Gupta wrote: > Yes it needed adjustment due to additional save/restore. Fixed that and will > push shortly. The commit hook doesn't like the following | remote: *** The following commit was rejected by your hooks.commit-extra-checker script (status: 1) | remote: *** commi

[PATCH v2 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
As a GNU extension. I'll propose it for standardization, but first we'd need to make array parameters meaningful in the standard. This extension will allow using _Countof() in more places, reducing the chances of specifying an incorrect size accidentally. We should eventually add -farray-paramet

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Andrew Waterman
On Thu, Aug 14, 2025 at 2:49 PM Vineet Gupta wrote: > > On 8/14/25 13:36, Jeff Law wrote: > > On 8/14/25 8:23 AM, Vineet Gupta wrote: > >> __builtin_round() fails to save/restore FP exception flags around the FP > >> compare insn which can potentially clobber the same. > >> > >> Worth noting that

[PATCH v2 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi, Changes in v2: - Fix author. - Fix inconsistencies with actual arrays, by not folding array parameter size expressions. - Document that -farray-parameters-are-const would close a hole in this feature. At the bottom is a range-diff. The related ISO C2y proposal is alx-0054 (currentl

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Joseph Myers
On Thu, 14 Aug 2025, Alejandro Colomar wrote: > And I'm proposing it as a GNU extension, which means we don't even need > to care about what ISO C says about [n]. We, as a quality > implementation, treat it with stronger semantics, which this patch uses. As a GNU extension, it's also necessary t

Re: [PATCH] gcov: Split atomic bitwise-or for some targets

2025-08-14 Thread Jeff Law
On 8/13/25 9:00 PM, Sebastian Huber wrote: Hello Jeff, thanks for your comment. - Am 10. Jul 2025 um 16:01 schrieb Jeff Law jeffreya...@gmail.com: On 7/9/25 11:53 PM, Sebastian Huber wrote: There are targets, which only offer 32-bit atomic operations (for example 32-bit RISC-V). For

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Vineet Gupta
On 8/14/25 13:36, Jeff Law wrote: > On 8/14/25 8:23 AM, Vineet Gupta wrote: >> __builtin_round() fails to save/restore FP exception flags around the FP >> compare insn which can potentially clobber the same. >> >> Worth noting that the fflags restore bracketing is slightly different >> than the gli

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Palmer Dabbelt
On Thu, 14 Aug 2025 13:36:53 PDT (-0700), jeffreya...@gmail.com wrote: On 8/14/25 8:23 AM, Vineet Gupta wrote: __builtin_round() fails to save/restore FP exception flags around the FP compare insn which can potentially clobber the same. Worth noting that the fflags restore bracketing is sligh

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Joseph, On Thu, Aug 14, 2025 at 06:44:07PM +, Joseph Myers wrote: > We'd need standard wording that's gone through several rounds of review in > WG14 before there's a reasonable basis for reviewing such a patch, given > how it's based on a very different conceptual model to how array > p

Re: [PATCH v2 1/2] RISC-V: Fix can_find_related_mode_p for VLS type

2025-08-14 Thread Jeff Law
On 8/14/25 7:34 AM, Kito Cheng wrote: can_find_related_mode_p didn't handle VLS type correctly, and the root cause is TARGET_MIN_VLEN is in bits, but what we want is in bytes. gcc/ChangeLog: * config/riscv/riscv-selftests.cc (riscv_run_selftests): Call run_vectorize_related_m

Re: [PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Jeff Law
On 8/14/25 8:23 AM, Vineet Gupta wrote: __builtin_round() fails to save/restore FP exception flags around the FP compare insn which can potentially clobber the same. Worth noting that the fflags restore bracketing is slightly different than the glibc implementation. gcc implementation w/ this

[PATCH] c++: Implement C++20 P1766R1 - Mitigating minor modules maladies [PR121552]

2025-08-14 Thread Jakub Jelinek
Hi! The following patch attempts to implement the C++20 P1766R1 - Mitigating minor modules maladies paper. clang++ a few years ago introduced for the diagnostics required in the paper -Wnon-c-typedef-for-linkage pedwarn and the following patch does that too. The paper was accepted as a DR, the pat

[PATCH] c++: Fix default argument parsing in non-comma variadic methods [PR121539]

2025-08-14 Thread Jakub Jelinek
Hi! While the non-comma variadic functions/methods were deprecated in C++26, they are still valid and they are valid without deprecation in C++98 to C++23. We parse default arguments followed by ...) outside of classes or for out of class definitions of methods, but I think since C++11 support in

Re: [PATCH] powerpc: Don't diagnose bool define in the FE compiler for -Wkeyword-macro [PR121520]

2025-08-14 Thread Segher Boessenkool
On Thu, Aug 14, 2025 at 01:32:18PM -0400, Jason Merrill wrote: > On 8/13/25 6:29 AM, Jakub Jelinek wrote: > > Fixed by temporarily disabling the NODE_WARN flag on those, so that the > > warnings or errors aren't reported when the backend predefines the macro. > > #undef bool > > later on by users o

Re: [PATCH] powerpc: Don't diagnose bool define in the FE compiler for -Wkeyword-macro [PR121520]

2025-08-14 Thread Segher Boessenkool
Hi! On Wed, Aug 13, 2025 at 03:29:24PM +0200, Jakub Jelinek wrote: > My r16-3059 PR120778 change which introduced the -Wkeyword-macro option > and made it a default for C++26 -pedantic broke quite a few tests on > powerpc*. The problem is that the backend predefines bool and _Bool as > macros Th

Re: [PATCH] Use gimple_call_fntype rather than gimple_call_fndecl in pass_return_slot::execute

2025-08-14 Thread Richard Biener
> Am 14.08.2025 um 11:31 schrieb Kito Cheng : > > Call with funciton pointer might not able to get the fndecl, but fntype > so use gimple_call_fntype instead of gimple_call_fndecl. > > aggregate_value_p can handle fndecl and fntype right (and even CALL_EXPR), so > I > think this change is sa

Re: [PATCH v8] Provide new option -fdiagnostics-show-context=N for -Warray-bounds, -Wstringop-* warnings [PR109071,PR85788,PR88771,PR106762,PR108770,PR115274,PR117179]

2025-08-14 Thread Qing Zhao
Hi, Richard, Please ignore my previous email sent this morning. -:) Actually, I studied more about the heuristic, and I agreed that the simplified loop as you suggested below is the correct approach to go, my current two-level nested loop is a little too complicate and confusing. > On Aug 13,

Re: [PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Joseph Myers
We'd need standard wording that's gone through several rounds of review in WG14 before there's a reasonable basis for reviewing such a patch, given how it's based on a very different conceptual model to how array parameters are currently handled in the C standard. (And as noted on the reflecto

Re: [PATCH] c++, v2: Warn on #undef/#define of remaining cpp.predefined macros [PR120778]

2025-08-14 Thread Jason Merrill
On 8/13/25 9:56 AM, Jakub Jelinek wrote: On Wed, Aug 13, 2025 at 10:37:35AM -0400, Jason Merrill wrote: It looks to me like we're supposed to complain whether or not they're defined. Ok, here is a new version. For __cpp_* macros which aren't defined solely based on cxx_dialect >= cxxXX but ins

Re: [PATCH] powerpc: Don't diagnose bool define in the FE compiler for -Wkeyword-macro [PR121520]

2025-08-14 Thread Jason Merrill
On 8/13/25 6:29 AM, Jakub Jelinek wrote: Hi! My r16-3059 PR120778 change which introduced the -Wkeyword-macro option and made it a default for C++26 -pedantic broke quite a few tests on powerpc*. The problem is that the backend predefines bool and _Bool as macros (unclear why _Bool for C++ beca

Re: [PATCH] Remove MODE_COMPOSITE_P test from simplify_gen_subreg [PR120718]

2025-08-14 Thread Richard Sandiford
Richard Biener writes: > On Thu, Aug 7, 2025 at 2:14 PM Richard Sandiford > wrote: >> >> simplify_gen_subreg rejected subregs of literal constants if >> MODE_COMPOSITE_P. This was added by the fix for PR96648 in >> g:c0f772894b6b3cd8ed5c5dd09d0c7917f51cf70f. Jakub said: >> >> As for the simpl

Re: [PATCH] Use gimple_call_fntype rather than gimple_call_fndecl in pass_return_slot::execute

2025-08-14 Thread Kito Cheng
I guess I should mention why I fixed it. I am implementing some calling convention stuff on RISC-V, and that fndecl will be passed into TARGET_FUNCTION_VALUE. However, we need fndecl to determine which calling convention is being used. Of course, I could add a check to filter out cases when fn_dec

[to-be-committed][PR target/119275][RISC-V] Avoid calling gen_lowpart in cases where it would ICE

2025-08-14 Thread Jeff Law
So this is a minor bug in the riscv move expanders. It has a special cases for extraction from vector objects which makes assumptions that it can use gen_lowpart unconditionally. That's not always the case. We can just bypass that special code for cases where we can't use gen_lowpart and l

Re: [PATCH] RISC-V: Allow errors to be suppressed when parsing architectures

2025-08-14 Thread Kito Cheng
Yeah, I am OK with this change, although riscv_subset_t may be able to do further clean up/refactor, but I don't want to block you guys since this is not super rush to do that. Thanks :) On Thu, Aug 14, 2025 at 5:19 PM Richard Sandiford wrote: > > One of Alfie's FMV patches adds a hook that, in

[PATCH 1/1] aarch64: Adapt unwinder to linux's SME signal behaviour

2025-08-14 Thread Yury Khrustalev
From: Richard Sandiford SME uses a lazy save system to manage ZA. The idea is that, if a function with ZA state wants to call a "normal" function, it can leave its state in ZA and instead set up a lazy save buffer. If, unexpectedly, that normal function contains a nested use of ZA, that nested u

[PATCH 0/1] aarch64: Adapt unwinder to linux's SME signal behaviour

2025-08-14 Thread Yury Khrustalev
Backport of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b5ffc8e75a81bab7ee7554483447c27be438464e The SME tests in this patch have been updated to use the -fnon-call-exceptions compiler flag to make sure correct unwinding information is generated. Regression tested on aarch64 and no regress

[pushed] wwwdocs: style: Twitter is now X

2025-08-14 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/style.mhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/style.mhtml b/htdocs/style.mhtml index f1aa8214..5bd5190c 100644 --- a/htdocs/style.mhtml +++ b/htdocs/style.mhtml @@ -69,7 +69,7 @@ https://gcc.gnu.org/onlinedocs/gcc/Contributors

[pushed] wwwdocs: gcc-11: Update AArch64 link for -mharden-sls

2025-08-14 Thread Gerald Pfeifer
Arm's webmasters put a permanent redirect in place; follow that. Pushed. Gerald --- htdocs/gcc-11/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/gcc-11/changes.html b/htdocs/gcc-11/changes.html index 65ccbc41..1bdd814b 100644 --- a/htdocs/gcc-11/changes.h

Re: [PATCH] fortran: add optional lower arg to c_f_pointer

2025-08-14 Thread Yuao Ma
Hi Tobias, I noticed that this patch was already committed as r16-3154-g587b8a62f50179! Thanks, Yuao

Re: [PATCH] arm: avoid gcc_s dependency

2025-08-14 Thread Ramana Radhakrishnan
On Tue, Jul 15, 2025 at 2:59 PM Pierre Ossman wrote: > > On 14/07/2025 15:26, Kyrylo Tkachov wrote: > > +/* ARM EABI dummy unwinding routines. > > + Copyright 2014 Pierre Ossman for Cendio AB > > + > > + This file is free software; you can redistribute it and/or modify it > > + under the ter

Re: [PATCH] fix cris-elf build with binutils-2.45

2025-08-14 Thread Hans-Peter Nilsson
> From: Mikael Pettersson > Date: Thu, 14 Aug 2025 11:23:56 +0200 > On Mon, Aug 11, 2025 at 3:25 PM Hans-Peter Nilsson wrote: > > > > > From: Mikael Pettersson > > > Date: Thu, 31 Jul 2025 17:00:40 +0200 > > > > > gcc/ > > > PR target/121336 > > > * config/cris/cris.h: Do not abbrev

Re: [PATCH v8] Provide new option -fdiagnostics-show-context=N for -Warray-bounds, -Wstringop-* warnings [PR109071,PR85788,PR88771,PR106762,PR108770,PR115274,PR117179]

2025-08-14 Thread Qing Zhao
> On Aug 13, 2025, at 05:24, Richard Biener wrote: > > On Wed, Jul 30, 2025 at 4:42 PM Qing Zhao wrote: >> >> >> + /* Get the edge from the prev_cond_bb to cur_bb, to determine >> whether >> +the stmt is on the taken path of the conditional statement. */ >> + ed

Re: [PATCH] libstdc++: Fix-self element self-assigments when insertint an empty range [PR121313]

2025-08-14 Thread Patrick Palka
On Thu, 14 Aug 2025, Tomasz Kamiński wrote: Typo in subject line, "inserting" > For __n == 0, the elements where self move-assigned by > std::move_backward(__ins, __old_finish - __n, __old_finish). s/where/were? LGTM besides that. > > PR libstdc++/121313 > > libstdc++-v3/ChangeLog: >

Re: [PATCH v4 0/2] libstdc++: Implement aligned_accessor [P2897R7]

2025-08-14 Thread Tomasz Kaminski
Thanks again for the patches. I have tested the patches locally, and now have my ready to merge branch that contains the series in following order: * [PATCH v2 0/8] libstdc++: Sequence of improvements to . (there are mine v3 patches) https://gcc.gnu.org/pipermail/libstdc++/2025-August/062847.htm

[PATCH] RISC-V: fix __builtin_round clobbering FP exceptions flags [PR121534]

2025-08-14 Thread Vineet Gupta
__builtin_round() fails to save/restore FP exception flags around the FP compare insn which can potentially clobber the same. Worth noting that the fflags restore bracketing is slightly different than the glibc implementation. gcc implementation w/ this patch generates following, where fsflags is

Re: [PATCH] c++, v2: Fix up build_cplus_array_type [PR121524]

2025-08-14 Thread Jason Merrill
On 8/14/25 12:13 AM, Jakub Jelinek wrote: On Wed, Aug 13, 2025 at 08:58:47PM -0400, Jason Merrill wrote: --- gcc/cp/tree.cc.jj 2025-07-27 23:31:09.750006633 +0200 +++ gcc/cp/tree.cc 2025-08-13 17:17:17.248836248 +0200 @@ -1186,7 +1186,13 @@ build_cplus_array_type (tree elt_type, t

[RFA] [PR rtl-optimization/120553] Improve selecting between constants based on sign bit test

2025-08-14 Thread Jeff Law
While working to remove mvconst_internal I stumbled over a regression in the code to handle signed division by a power of two. In that sequence we want to select between 0, 2^n-1 by pairing a sign bit splat with a subsequent logical right shift. This can be done without branches or conditiona

[PATCH v2 2/2] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread Kito Cheng
We used to apply -mrvv-max-lmul= to limit VLS code gen, auto vectorizer, and builtin string function expansion. But I think the VLS code gen part doesn't need this limit, since it only happens when the user explicitly writes vector types. For example, int32x8_t under -mrvv-max-lmul=m1 with VLEN=12

[PATCH v2 1/2] RISC-V: Fix can_find_related_mode_p for VLS type

2025-08-14 Thread Kito Cheng
can_find_related_mode_p didn't handle VLS type correctly, and the root cause is TARGET_MIN_VLEN is in bits, but what we want is in bytes. gcc/ChangeLog: * config/riscv/riscv-selftests.cc (riscv_run_selftests): Call run_vectorize_related_mode_selftests. (test_vectorize_rela

[PATCH] libstdc++: Fix-self element self-assigments when insertint an empty range [PR121313]

2025-08-14 Thread Tomasz Kamiński
For __n == 0, the elements where self move-assigned by std::move_backward(__ins, __old_finish - __n, __old_finish). PR libstdc++/121313 libstdc++-v3/ChangeLog: * include/bits/vector.tcc (vector::insert_range): Add check for empty size. * testsuite/23_containers/ve

Re: [PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Martin, On Thu, Aug 14, 2025 at 02:21:10PM +0200, Martin Uecker wrote: > > > You could also add a warning when _Countof is applied to a > > > non-constant pointer. > > > > Yup, I should add that. I wouldn't enable it in any groups flags, > > though. I don't want people to start writing [cons

[pushed] powerpc: Add missing modes to P9 if_then_elses [PR121501]

2025-08-14 Thread Richard Sandiford
These patterns had one (if_then_else ...) nested within another. The outer if_then_else had SImode, which means that the "then" and "else" should also be SImode (unless they're const_ints). However, the inner if_then_else was modeless, which led to an assertion failure when trying to take a subreg

Re: [PATCH] x86: Add target("80387") function attribute

2025-08-14 Thread H.J. Lu
On Wed, Aug 13, 2025 at 11:33 PM Uros Bizjak wrote: > > On Thu, Aug 14, 2025 at 6:58 AM H.J. Lu wrote: > > > > Add target("80387") attribute to enable and disable x87 instructions in a > > function. > > > > gcc/ > > > > PR target/121541 > > * config/i386/i386-options.cc > >

Re: [PATCH] libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint

2025-08-14 Thread Yrong
Thanks for the review! All comments addressed in '[PATCH v2] libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint' mail. Tomasz Kaminski 于2025年8月14日周四 17:59写道: > > > On Wed, Aug 13, 2025 at 9:40 PM Patrick Palka wrote: > >> On Wed, 13 Aug 2025, Patrick Pa

[PATCH v2] libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint

2025-08-14 Thread Yihan Wang
libstdc++-v3/ChangeLog: * include/std/expected: Add missing constraint as per LWG 4222. * testsuite/20_util/expected/lwg4222.cc: New test. Signed-off-by: Yihan Wang --- libstdc++-v3/include/std/expected | 1 + .../testsuite/20_util/expected/lwg4222.cc | 32 +

Re: [PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Martin Uecker
Am Donnerstag, dem 14.08.2025 um 14:05 +0200 schrieb Alejandro Colomar: > Hi Martin, > > On Thu, Aug 14, 2025 at 01:37:55PM +0200, Martin Uecker wrote: > > Am Donnerstag, dem 14.08.2025 um 12:19 +0200 schrieb Alejandro Colomar: > > > Hi Martin, > > > > > > On Thu, Aug 14, 2025 at 11:01:05AM +0200

Re: [PATCH v4 1/2] libstdc++: Implement is_sufficiently_aligned [PR120994]

2025-08-14 Thread Tomasz Kaminski
On Mon, Aug 4, 2025 at 1:01 PM Luc Grosheintz wrote: > This commit implements and tests the function is_sufficiently_aligned > from P2897R7. > > PR libstdc++/120994 > > libstdc++-v3/ChangeLog: > > * include/bits/align.h (is_sufficiently_aligned): New function. > * include/

Re: [PATCH v4 2/2] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-08-14 Thread Tomasz Kaminski
On Mon, Aug 4, 2025 at 1:03 PM Luc Grosheintz wrote: > This commit completes the implementation of P2897R7 by implementing and > testing the template class aligned_accessor. > > PR libstdc++/120994 > > libstdc++-v3/ChangeLog: > > * include/bits/version.def (aligned_accessor): Add.

Re: [PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Martin, On Thu, Aug 14, 2025 at 01:37:55PM +0200, Martin Uecker wrote: > Am Donnerstag, dem 14.08.2025 um 12:19 +0200 schrieb Alejandro Colomar: > > Hi Martin, > > > > On Thu, Aug 14, 2025 at 11:01:05AM +0200, Alejandro Colomar wrote: > > > +void > > > +decay_obvious (int a[2]) > > > +{ > > >

Re: [PATCH v1][RFC] libstdc++: Implement constant_wrapper, cw from P2781R8.

2025-08-14 Thread Tomasz Kaminski
On Wed, Aug 13, 2025 at 12:24 PM Luc Grosheintz wrote: > This is a partial implementation of P2781R8. It adds std::cw and > std::constant_wrapper, but doesn't modify __integral_constant_like for > span/mdspan. > > libstdc++-v3/ChangeLog: > > * include/bits/version.def (constant_wrapper):

Re: [PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Martin Uecker
Am Donnerstag, dem 14.08.2025 um 12:19 +0200 schrieb Alejandro Colomar: > Hi Martin, > > On Thu, Aug 14, 2025 at 11:01:05AM +0200, Alejandro Colomar wrote: > > +void > > +decay_obvious (int a[2]) > > +{ > > + _Countof (typeof (a)); /* { dg-error "invalid" } */ > > + _Countof (a + 1); /* { dg-e

Re: [PATCH] csky: use quotes when referring to cpus and archs [PR90160]

2025-08-14 Thread Xianmiao Qu
On Tue, Aug 12, 2025 at 03:39:54PM -0600, Jeff Law wrote: > > > On 8/12/25 2:56 PM, Andrew Pinski wrote: > > On Tue, Nov 26, 2024 at 12:54 PM Jeff Law wrote: > > > > > > > > > > > > On 11/26/24 11:43 AM, Florian Weimer wrote: > > > > * Jeff Law: > > > > > > > > > On 11/26/24 9:06 AM, David M

Re: [PATCH v2 0/2] Two cleanup patches for .

2025-08-14 Thread Tomasz Kaminski
Thank you, the patches looks good to me, so just waiting for approval. I have tested the patches locally, and now have my ready to merge branch that contains the series in following order: * [PATCH v2 0/8] libstdc++: Sequence of improvements to . (there are mine v3 patches) https://gcc.gnu.org/p

Re: [PATCH v4] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-08-14 Thread Surya Kumari Jangala
Hi Jeevitha, On 02/07/25 11:50 am, jeevitha wrote: > diff --git a/gcc/testsuite/gcc.target/powerpc/amo3.c > b/gcc/testsuite/gcc.target/powerpc/amo3.c > new file mode 100644 > index 000..ac27543e2dc > --- /dev/null > +++ b/gcc/testsuite/gcc.target/powerpc/amo3.c > @@ -0,0 +1,134 @@ > +/* {

Re: [PATCH v2 2/2] libstdc++: Simplify precomputed partial products in .

2025-08-14 Thread Tomasz Kaminski
On Mon, Aug 11, 2025 at 10:16 PM Luc Grosheintz wrote: > Prior to this commit, the partial products of static extents in > was done in a loop that calls a function that computes the partial > product. The complexity is quadratic in the rank. > > This commit removes the quadratic complexity. > >

Re: [PATCH v2 1/2] libstdc++: Reduce size static storage for __fwd_prod in mdspan.

2025-08-14 Thread Tomasz Kaminski
On Mon, Aug 11, 2025 at 10:21 PM Luc Grosheintz wrote: > This fixes an oversight in a previous commit that improved mdspan > related code. Because __size doesn't use __fwd_prod, __fwd_prod(__rank) > is not needed anymore. Hence, one can shrink the size of > __fwd_partial_prods. > > libstdc++-v3/C

[COMMITTED] MAINTAINERS: Add myself to write after approval

2025-08-14 Thread Avinash Jayakar
2025-08-12 Avinash Jayakar * MAINTAINERS: Add myself to write after approval. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index dd31eed0251..07359c5d7ee 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -566,6 +566,7 @@ Fariborz Jahanian

Re: Re: [PATCH] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread Kito Cheng
On Thu, Aug 14, 2025 at 5:42 PM 钟居哲 wrote: > > OK. How about this following situation: > > for (i ... i < 64.. i++) { > a[i] = a[i] + b[i] > } > > When TARGET_MAX_LMUL is 1 or 2. Can auto-vectorize use LMUL 8 in VLS mode to > vectorize the case above ? OK, let me add one more testcase and I al

Re: [PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi Martin, On Thu, Aug 14, 2025 at 11:01:05AM +0200, Alejandro Colomar wrote: > +void > +decay_obvious (int a[2]) > +{ > + _Countof (typeof (a)); /* { dg-error "invalid" } */ > + _Countof (a + 1); /* { dg-error "invalid" } */ It didn't occur to me the following test: alx@devuan:~/tmp

Re: [PATCH] libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint

2025-08-14 Thread Tomasz Kaminski
On Wed, Aug 13, 2025 at 9:40 PM Patrick Palka wrote: > On Wed, 13 Aug 2025, Patrick Palka wrote: > > > Thanks for the patch! Looks good to me for the most part. > > > > On Fri, 8 Aug 2025, Yihan Wang wrote: > > > > > libstdc++-v3/ChangeLog: > > > > > > * include/std/expected: > > > > This Ch

[PATCHv2] Error out stack-protector unavailability on AIX

2025-08-14 Thread Ayappan Perumal
From: Ayappan Perumal --- stack-protector is not supported in GCC on AIX. This patch is to fail the compilation if -fstack-protector option is passed. gcc/config/rs6000/aix.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h

Re: Re: [PATCH] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread 钟居哲
OK. How about this following situation: for (i ... i < 64.. i++) { a[i] = a[i] + b[i] } When TARGET_MAX_LMUL is 1 or 2. Can auto-vectorize use LMUL 8 in VLS mode to vectorize the case above ? juzhe.zh...@rivai.ai From: Kito Cheng Date: 2025-08-14 17:39 To: 钟居哲 CC: kito.cheng; gcc-patches;

Re: [PATCH] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread Kito Cheng
Yeah, I guess you definitely got something wrong at that timing, I also got some trouble when I relaxed the constraint...and then I finally found the right way to enable that without changing behavior of the auto vectorizer: only constraint the VLS mode in autovectorize_vector_modes. On Thu, Aug 1

[PATCH] Error out stack-protector unavailability on AIX

2025-08-14 Thread Ayappan Perumal
From: Ayappan Perumal diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index 9e7edbb2f22..5b03b068139 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -281,4 +281,6 @@ #undef SUBTARGET_DRIVER_SELF_SPECS #define SUBTARGET_DRIVER_SELF_SPECS\ "%{m64:-maix64}

[PATCH] Use gimple_call_fntype rather than gimple_call_fndecl in pass_return_slot::execute

2025-08-14 Thread Kito Cheng
Call with funciton pointer might not able to get the fndecl, but fntype so use gimple_call_fntype instead of gimple_call_fndecl. aggregate_value_p can handle fndecl and fntype right (and even CALL_EXPR), so I think this change is safe. gcc/ChangeLog: * tree-nrv.cc (pass_return_slot::exec

Re: [PATCH] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread 钟居哲
As I remembered, I have ever trided to use larger LMUL in VLS mode than VLA modes. But it may cause ICE. I don't remember what scenario now... That's why originally I use MAX_LMUL to control both VLA modes and VLS modes. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2025-08-14 15:17 To: gcc-p

Re: [PATCH] arm_mve: Use inline asm for lsll and asrl MVE primitives

2025-08-14 Thread Christophe Lyon
Hi Keith, On Tue, 12 Aug 2025 at 18:33, Keith Packard wrote: > > The C shift operators do not precisely match the associated ARM > instructions: shifts of negative values or by negative amounts are > undefined behavior in C, and GCC may substitute alternate instruction > sequences when it can det

Re: [PATCH] fix cris-elf build with binutils-2.45

2025-08-14 Thread Mikael Pettersson
On Mon, Aug 11, 2025 at 3:25 PM Hans-Peter Nilsson wrote: > > > From: Mikael Pettersson > > Date: Thu, 31 Jul 2025 17:00:40 +0200 > > > gcc/ > > PR target/121336 > > * config/cris/cris.h: Do not abbreviate --emulation. > > > > Signed-off-by: Mikael Pettersson > > > Bah, I forgot abou

[PATCH] RISC-V: Allow errors to be suppressed when parsing architectures

2025-08-14 Thread Richard Sandiford
One of Alfie's FMV patches adds a hook that, in some cases, is used to silently query a target_version (with no diagnostics expected). In the review, I'd suggested handling this using a location_t *, with null meaning "suppress diagnostics": https://gcc.gnu.org/pipermail/gcc-patches/2025-Augus

[PATCH v1 1/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
From: Martin Uecker As a GNU extension. I'll propose it for standardization, but first we'd need to make array parameters meaningful in the standard. This extension will allow using _Countof() in more places, reducing the chances of specifying an incorrect size accidentally. Due to how the arr

[PATCH v1 0/1] c: Add support for array parameters in _Countof

2025-08-14 Thread Alejandro Colomar
Hi! Here's a patch co-authored by Martin and I. It adds support for array parameters in _Countof, which will enable writing safer code that only specifies array bounds in function calls when strictly necessary, reducing the chances for mistakes. Here's an example program that never specifies bou

[PATCH] LoongArch: Fix ICE caused by function add_stmt_cost[PR121542].

2025-08-14 Thread Lulu Cheng
PR target/121542 gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_vector_costs::add_stmt_cost): When using vectype, first determine whether it is NULL. gcc/testsuite/ChangeLog: * gcc.target/loongarch/pr121542.c: New test. --- gcc/config/loongar

[PATCH] RISC-V: Allow VLS types using up to LMUL 8

2025-08-14 Thread Kito Cheng
We used to apply -mrvv-max-lmul= to limit VLS code gen, auto vectorizer, and builtin string function expansion. But I think the VLS code gen part doesn't need this limit, since it only happens when the user explicitly writes vector types. For example, int32x8_t under -mrvv-max-lmul=m1 with VLEN=12

Re: [PATCH v2] MicroBlaze : Enhance support for atomics. Fix PR118280

2025-08-14 Thread Gopi Kumar Bulusu
namaskaaram This patch has been reviewed by Neal Frager - his comments are present in bugzilla PR 118280 If needed I can submit an updated patch with the patch comment updated as follows Reviewed-by: Neal Frager dhanyavaadaaha gopi On Tue, Jul 22, 2025 at 5:36 PM Gopi Kumar Bulusu wrote: >

  1   2   >