[PATCH] c++: Fix typo in RAW_DATA_CST build_list_conv subsubconv hanling [PR119563]

2025-04-01 Thread Jakub Jelinek
Hi! The following testcase ICEs (the embed one actually doesn't but dereferences random uninitialized pointer far after allocated memory) because of a typo. In the RAW_DATA_CST handling of list conversion where there are conversions to something other than initializer_list<{{,un}signed ,}char>, t

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Qing Zhao
> On Apr 1, 2025, at 10:04, Martin Uecker wrote: > > > > Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb Bill Wendling: >>> I'd like to offer up this to solve the issues we're facing. This is a >>> combination of everything that's been discussed here (or at least that >>> I've been able to r

Re: [PATCH] gimple-low: Diagnose assume attr expressions defining labels which are used as unary && operands outside of those [PR119537]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > Hi! > > The following testcases ICE on invalid code which defines > labels inside of statement expressions and then uses &&label > from code outside of the statement expressions. > The C++ FE diagnoses that with a warning (not specifically for > assume a

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern

2025-04-01 Thread Jeff Law
On 3/30/25 8:54 PM, Bohan Lei wrote: The RTL pattern has an "and" operation, which clears out the upper bits after the shift operation. Since we have (INTVAL (operands[3]) >> INTVAL (operands[2])) == 0x as a constraint, the RTL template and the split code should be semantically identi

Re: [PATCH][v2] target/119549 - fixup handling of -mno-sse4 in target attribute

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 10:13:22AM +0200, Richard Biener wrote: > The following fixes ix86_valid_target_attribute_inner_p to properly > handle target("no-sse4") via OPT_mno_sse4 rather than as unset OPT_msse4. > I've added asserts to ix86_handle_option that RejectNegative is honored > for both. >

[PATCH] c++/modules: Forbid exposures of TU-local entities in inline variables [PR119551]

2025-04-01 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- An inline variable has vague linkage, and needs to be conditionally emitted in TUs that reference it. Unfortunately this clashes with [basic.link] p14.2, which says that we ignore the initialisers of all variables (includi

Re: [PATCH] tailc, v2: Improve tail recursion handling [PR119493]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > On Tue, Apr 01, 2025 at 10:59:36AM +0200, Jakub Jelinek wrote: > > On Tue, Apr 01, 2025 at 10:46:15AM +0200, Richard Biener wrote: > > > This looks OK, but I wonder if ... > > > > - /* The parameter should be a real operand, so that phi > > >

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Michael Matz
Hello, On Mon, 31 Mar 2025, Bill Wendling wrote: > 1. The use of '__self' isn't feasible, so we won't use it. That's a bold statement. How's that? The only thing I read here is that the very spelling of "self" was objected to. So, call it _Self, _Selfref, or something. Even _Whatever42 wou

Re: [PATCH] combine: Use reg_used_between_p rather than modified_between_p in two spots [PR119291]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > On Tue, Apr 01, 2025 at 11:27:25AM +0200, Richard Biener wrote: > > > Looking at this some more today, I think we should special case > > > set_noop_p because that can be put into i2 (except for the JUMP_P > > > violations), currently both modified_betwee

Re: [PATCH] Libstdc++: Fix bootstrap failure for cross without tm.tm_zone [PR119550]

2025-04-01 Thread Jonathan Wakely
On Tue, 1 Apr 2025 at 11:34, Tomasz Kaminski wrote: > > > > On Mon, Mar 31, 2025 at 7:28 PM Jonathan Wakely wrote: >> >> In r15-8491-g778c28c70f8573 I added a use of the Autoconf macro >> AC_STRUCT_TIMEZONE, but that requires a link-test for the global tzname >> object if tm.tm_zone isn't support

Re: [PATCH v2 0/4] Libsanitizer improvements

2025-04-01 Thread Richard Biener
On Mon, Mar 17, 2025 at 2:24 PM Aleksandar Rakic wrote: > > This patch series improves the libsanitizer for the mips target > in GCC. You should send these improvements to upstream libsanitizer instead. > These patches are cherry-picked from the mips_rel/11_2_0/master > and mips_rel/9_3_0/master

[PATCH] tailr: Punt on tail recursions that would break musttail [PR119493]

2025-04-01 Thread Jakub Jelinek
Hi! While working on the previous tailc patch, I've noticed the following problem. The testcase below fails, because we decide to tail recursion optimize the call, but tail recursion (as documented in tree-tailcall.cc) needs to add some result multiplication and/or addition if any tail recursion u

Re: [PATCH] phiprop: Avoid proping loads into loops [PR116835]

2025-04-01 Thread Richard Biener
On Tue, Apr 1, 2025 at 6:10 AM Andrew Pinski wrote: > > phiprop can sometimes prop loads back into loops > and in some cases cause wrong code when the load > was from a weak symbol as now it becomes an unconditional > load before the loop. > > Bootstrapped and tested on x86_64-linux-gnu with no re

[PATCH][v2] target/119549 - fixup handling of -mno-sse4 in target attribute

2025-04-01 Thread Richard Biener
The following fixes ix86_valid_target_attribute_inner_p to properly handle target("no-sse4") via OPT_mno_sse4 rather than as unset OPT_msse4. I've added asserts to ix86_handle_option that RejectNegative is honored for both. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard

Re: [PATCH] tailc: Improve tail recursion handling [PR119493]

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 10:46:15AM +0200, Richard Biener wrote: > This looks OK, but I wonder if ... > > - /* The parameter should be a real operand, so that phi node > > -created for it at the start of the function has the meaning > > -of copying the value. This te

Re: [PATCH] tailr: Punt on tail recursions that would break musttail [PR119493]

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 10:50:01AM +0200, Richard Biener wrote: > > While working on the previous tailc patch, I've noticed the following > > problem. > > The testcase below fails, because we decide to tail recursion optimize > > the call, but tail recursion (as documented in tree-tailcall.cc) need

[PATCH] tailc, v2: Improve tail recursion handling [PR119493]

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 10:59:36AM +0200, Jakub Jelinek wrote: > On Tue, Apr 01, 2025 at 10:46:15AM +0200, Richard Biener wrote: > > This looks OK, but I wonder if ... > > > - /* The parameter should be a real operand, so that phi node > > > - created for it at the start of the funct

Re: [pushed] Only write gcov when file output is on [PR119553]

2025-04-01 Thread Richard Biener
On Mon, Mar 31, 2025 at 7:54 PM Jørgen Kvalsvik wrote: > > gcov_write_* functions must be guarded so they only are called when > output_to_file is true, like for -fcondition-coverage, otherwise it > triggers an invalid read as detected by valgrind. The gcno file is > mostly written to from profile

[PATCH v2] RISC-V: Tweak testcase for PIE

2025-04-01 Thread Kito Cheng
Linux toolchain may configured with --enable-default-pie, and that will cause lots of regression test failures because the function name will append with @plt suffix (e.g. `call foo` become `call foo@plt`), also some code generation will different due to the code model like the address generation

Re: [PATCH] APX: add nf counterparts for rotl split pattern [PR 119539]

2025-04-01 Thread Uros Bizjak
On Tue, Apr 1, 2025 at 10:55 AM Hongtao Liu wrote: > > On Tue, Apr 1, 2025 at 4:40 PM Hongyu Wang wrote: > > > > Hi, > > > > For spiltter after 3_mask it now splits the pattern > > to *3_mask, causing the splitter doesn't generate > > nf variant. Add corresponding nf counterpart for define_insn_a

Re: [PATCH] combine: Use reg_used_between_p rather than modified_between_p in two spots [PR119291]

2025-04-01 Thread Richard Biener
On Fri, 28 Mar 2025, Jakub Jelinek wrote: > Hi! > > The following testcase is miscompiled on x86_64-linux at -O2 by the combiner. > We have from earlier combinations > (insn 22 21 23 4 (set (reg:SI 104 [ _7 ]) > (const_int 0 [0])) "pr119291.c":25:15 96 {*movsi_internal} > (nil)) > (i

Re: [PATCH] testsuite: arm: Fix dg-final in short-vfp-1.c [PR119556]

2025-04-01 Thread Richard Earnshaw (lists)
On 31/03/2025 20:04, Christophe Lyon wrote: > Recent syntactic fixes enabled the test, but the result was failing. > > It turns out it was missing a space between the register arguments in > the scan-assembler-times directives. > > gcc/testsuite/ChangeLog: > > PR target/119556 > * gc

Re: [PATCH] target/119549 - fixup handling of -mno-sse4

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 01:36:23PM +0800, Hongtao Liu wrote: > >Changing ix86_valid_target_attribute_inner_p might be even better because > >OPT_msse4 is RejectNegative option, so !value for it looks weird. > msse4 is defined as ix86_opt_isa in ix86_valid_target_attribute_inner_p > > 1055IX86_

[PATCH] gimple-low: Diagnose assume attr expressions defining labels which are used as unary && operands outside of those [PR119537]

2025-04-01 Thread Jakub Jelinek
Hi! The following testcases ICE on invalid code which defines labels inside of statement expressions and then uses &&label from code outside of the statement expressions. The C++ FE diagnoses that with a warning (not specifically for assume attribute, genericallly about taking address of a label o

[committed] OpenMP: Reorder diagnostic in modify_call_for_omp_dispatch [PR119559]

2025-04-01 Thread Tobias Burnus
Reorder to the diagnostic to avoid issues when nappend < ninteropfor the case no append_args arguments at all (nappend == 0) and one interop clause to dispatch (ninterop == 1) Committed as r15-9120-gde92ac6f11e605. Tobias commit de92ac6f11e605987421fe1443b5b81ff172dbb6 Author: Tobias Burnu

[PATCH] APX: add nf counterparts for rotl split pattern [PR 119539]

2025-04-01 Thread Hongyu Wang
Hi, For spiltter after 3_mask it now splits the pattern to *3_mask, causing the splitter doesn't generate nf variant. Add corresponding nf counterpart for define_insn_and_split to make the splitter also works for nf insn. Bootstrapped & regtested on x86-64-pc-linux-gnu. Ok for trunk? gcc/Change

Re: [PATCH] libstdc++: Fix -Warray-bounds warning in std::vector::resize [PR114945]

2025-04-01 Thread Tomasz Kaminski
On Mon, Mar 31, 2025 at 6:23 PM Jonathan Wakely wrote: > This is yet another false positive warning fix. This time the compiler > can't prove that when the vector has sufficient excess capacity to > append new elements, the pointer to the existing storage is not null. > > libstdc++-v3/ChangeLog:

Re: [PATCH] profile: Another profiling musttail call fix [PR119535]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > Hi! > > As the following testcase shows, EDGE_FAKE edges from musttail calls to > EXIT aren't the only edges we should ignore, we need to ignore also > edges created by the splitting of blocks for the EDGE_FAKE creation that > point from the musttail cal

Re: [PATCH] APX: add nf counterparts for rotl split pattern [PR 119539]

2025-04-01 Thread Hongtao Liu
On Tue, Apr 1, 2025 at 4:40 PM Hongyu Wang wrote: > > Hi, > > For spiltter after 3_mask it now splits the pattern > to *3_mask, causing the splitter doesn't generate > nf variant. Add corresponding nf counterpart for define_insn_and_split > to make the splitter also works for nf insn. > > Bootstra

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Martin Uecker
Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: > > > On Apr 1, 2025, at 10:04, Martin Uecker wrote: > > > > > > > > Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb Bill Wendling: > > > > I'd like to offer up this to solve the issues we're facing. This is a > > > > combination o

[PATCH] combine: Allow 2->2 combos but limit insn searches [PR116398]

2025-04-01 Thread Richard Sandiford
The problem in PR101523 was that, after each successful 2->2 combination attempt, distribute_links would search further and further for the next combinable use of the i2 destination. The original patch for the PR dealt with that by disallowing such combinations. However, that led to various optimi

[PATCH] profile: Another profiling musttail call fix [PR119535]

2025-04-01 Thread Jakub Jelinek
Hi! As the following testcase shows, EDGE_FAKE edges from musttail calls to EXIT aren't the only edges we should ignore, we need to ignore also edges created by the splitting of blocks for the EDGE_FAKE creation that point from the musttail calls to the fallthrough block, which typically does the

[PATCH] config, toplevel, Darwin: Pass -B instead of -L to C++ commands.

2025-04-01 Thread Iain Sandoe
Another misconfigure (Darwin-only) found by a combination of increases in system security contraints and the COBOL runtime. We will now fail any C++ configure test that needs the binary to run. Tested on x86_64-darwin17,21,24 and on x86_64, powerpc64le, aarch64-linux confirmed manually that the C

[PATCH] tailc: Improve tail recursion handling [PR119493]

2025-04-01 Thread Jakub Jelinek
Hi! This is a partial step towards fixing that PR. For musttail recursive calls which have non-is_gimple_reg_type typed parameters, the only case we've handled was if the exact parameter was passed through (perhaps modified, but still the same PARM_DECL). That isn't necessary, we can copy the argu

[COMMITTED] Doc: Document enum with underlying type extension [PR117689]

2025-04-01 Thread Sandra Loosemore
This is a C23/C++11 feature that is supported as an extension with earlier -std= options too, but was never previously documented. It interacts with the already-documented forward enum definition extension, so I have merged discussion of the two extensions into the same section. gcc/ChangeLog

[PATCH] testsuite: Add support for GCOV_UNDER_TEST

2025-04-01 Thread Christophe Lyon
After commit r15-8947-g8ed2d5d219e999, which added new tests using gcov, the CI noticed failures because it was calling 'gcov' instead of $target-gcov. This is because the CI scripts override GXX_UNDER_TEST, but still run the testsuite in-tree, and gcc-transform-out-of-tree only depends on TESTING

Re: [PATCH] simplify-rtx: Fix shortcut for vector eq/ne

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 01:16:32PM +0100, Richard Sandiford wrote: > gcc/ > * simplify-rtx.cc (simplify_const_relational_operation): Generalize > the constant checks in the fold-via-minus path to match the > INTEGRAL_MODE_P condition. LGTM. Jakub

[PATCH] OpenMP: Require target and/or targetsync init modifier [PR118965]

2025-04-01 Thread Sandra Loosemore
As noted in PR 118965, the initial interop implementation overlooked the requirement in the OpenMP spec that at least one of the "target" and "targetsync" modifiers is required in both the interop construct init clause and the declare variant append_args clause. Adding the check was fairly straigh

Re: [PATCH v2 0/4] Libsanitizer improvements

2025-04-01 Thread Aleksandar Rakic
HTEC Proprietary Hi, Could you please provide an email address for upstream libsanitizer? We are not sure where to send these patches. Kind regards, Aleksandar Rakic From: Richard Biener Sent: Tuesday, April 1, 2025 2:50 PM To: Aleksandar Rakic Cc: gcc-

Re: [PATCH v3] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-04-01 Thread Andrew Waterman
On Mon, Mar 31, 2025 at 11:34 PM Robin Dapp wrote: > > >> Yeah...and I also don't like the magic "ceil(AVL / 2) ≤ vl ≤ VLMAX if > >> AVL < (2 * VLMAX)" rule... > > > > +1, spec has some description about this but I am not sure if I really get > > the point. > > > > From Spec: > > > > "For exampl

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Martin Uecker
Am Dienstag, dem 01.04.2025 um 18:58 + schrieb Qing Zhao: > > > On Apr 1, 2025, at 11:28, Martin Uecker wrote: > > > > Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: > > > > > > > On Apr 1, 2025, at 10:04, Martin Uecker wrote: > > > > > > > > > > > > > > > > Am Montag, de

Re: [PATCH v3] RISC-V: Fix wrong LMUL when only implict zve32f.

2025-04-01 Thread Robin Dapp
Note it's not quite "whatever" -- there is a constraint that vl be monotonically nonincreasing, which in some cases is the only important property. No denying this is an annoyance, though. Yes, I was hoping the smiley would convey that "whatever" was not to be taken literally. In terms of SC

Re: [PATCH v2 0/4] Libsanitizer improvements

2025-04-01 Thread Andrew Pinski
On Tue, Apr 1, 2025 at 12:02 PM Aleksandar Rakic wrote: > > HTEC Proprietary > > Hi, > > Could you please provide an email address for upstream libsanitizer? > We are not sure where to send these patches. It is mentioned in libsantizer/README.gcc : ``` Both tools consist of a compiler module and a

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Qing Zhao
> On Apr 1, 2025, at 15:25, Martin Uecker wrote: > > Am Dienstag, dem 01.04.2025 um 18:58 + schrieb Qing Zhao: >> >>> On Apr 1, 2025, at 11:28, Martin Uecker wrote: >>> >>> Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: > On Apr 1, 2025, at 10:04, Martin Uecker

Re: [PATCH] [testsuite] [riscv] limit vwaddsub-1.c to rv64

2025-04-01 Thread Jeff Law
On 4/1/25 8:03 AM, Kito Cheng wrote: On Tue, Apr 1, 2025 at 12:47 PM Jeff Law wrote: On 3/31/25 7:03 PM, Alexandre Oliva wrote: On Mar 31, 2025, Jeff Law wrote: I don't immediately see anything in this test or its history to indicate it's only supposed to work for rv64. It's the 64-b

Re: [PATCH] aarch64: Deprecate -march= for the month of April

2025-04-01 Thread Richard Earnshaw (lists)
On 01/04/2025 09:42, Kyrylo Tkachov wrote: > Hi all, > > As we're starting a new month, introduce a more appropriate -mapril= > to specify the compilation target instead. > This helps keep GCC more up to date with the passage of time. > > Bootstrapped and tested on aarch64-none-linux-gnu. > > Si

Re: [PATCH] c++: Fix typo in RAW_DATA_CST build_list_conv subsubconv hanling [PR119563]

2025-04-01 Thread Marek Polacek
On Tue, Apr 01, 2025 at 04:31:38PM +0200, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs (the embed one actually doesn't but > dereferences random uninitialized pointer far after allocated memory) > because of a typo. In the RAW_DATA_CST handling of list conversion > where there are c

[PATCH] PR119482: Avoid mispredictions in bitmap_set_bit

2025-04-01 Thread Andi Kleen
From: Andi Kleen This isn't a regression, but it's a very simple patch with high performance improvement, so perhaps suitable in the current stage. --- bitmap_set_bit checks the original value of the bit to return it to the caller and then only writes the new value back if it changes. Most call

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Bill Wendling
On Tue, Apr 1, 2025 at 5:41 AM Michael Matz wrote: > > Hello, > > On Mon, 31 Mar 2025, Bill Wendling wrote: > > > 1. The use of '__self' isn't feasible, so we won't use it. > > That's a bold statement. How's that? The only thing I read here is that > the very spelling of "self" was objected to.

[COMMITTED 16/35] gccrs: Fix ICE when array elements are not a value

2025-04-01 Thread arthur . cohen
From: Philip Herron We need to check for error_mark_node when doing adjustments from coercion sites otherwise we hit assetions as part of the coercion. That fixes the ICE but the reason for the error_mark_node is because the array element value. Fixes Rust-GCC#3567 gcc/rust/ChangeLog:

Patch ping [PATCH] tailc: Don't fail musttail calls if they use or could use local arguments, instead warn [PR119376]

2025-04-01 Thread Jakub Jelinek
Hi! On Tue, Mar 25, 2025 at 08:34:10AM +0100, Jakub Jelinek wrote: > As discussed here and in bugzilla, [[clang::musttail]] attribute in clang > not just strongly asks for tail call or error, but changes behavior. > To quote: > https://clang.llvm.org/docs/AttributeReference.html#musttail > "The li

Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533]

2025-04-01 Thread Jeff Law
On 4/1/25 12:15 PM, Vineet Gupta wrote: On 3/31/25 23:48, Heinrich Schuchardt wrote: On 3/30/25 01:49, Vineet Gupta wrote: changes since v2 - dump log sanfu --- vsetvl phase4 uses LCM guided info to insert VSETVL insns. It has an additional loop to insert missing vsetvls on certain edges

[PATCH, V6] PR target/118541 - Do not generate unordered fp cmoves for IEEE compares on PowerPC

2025-04-01 Thread Michael Meissner
Bernhard Reutner-Fischer suggested some typos to the patch for 118551. Here is the changed patch. In bug PR target/118541 on power9, power10, and power11 systems, for the function: extern double __ieee754_acos (double); double __acospi (double x) { do

[COMMITTED] Doc: Document _Bool type as C90 extension [PR118118]

2025-04-01 Thread Sandra Loosemore
gcc/ChangeLog PR c/118118 * doc/extend.texi (Boolean Type): New section. --- gcc/doc/extend.texi | 12 1 file changed, 12 insertions(+) diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 76fb210060d..d2bf6048be7 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc

[COMMITTED] Doc: Cross-reference constructor and init_priority attributes [PR118982]

2025-04-01 Thread Sandra Loosemore
Per the issue, the discussion of these two attributes needed to be better integrated. I also did some editing for style and readability, and clarified that almost all targets support this feature (it is enabled by default unless the back end disables it), not just "some". Co-Authored_by: Jonathan

Re: Patch ping [PATCH] tailc: Don't fail musttail calls if they use or could use local arguments, instead warn [PR119376]

2025-04-01 Thread Andi Kleen
> I'd like to ping the > https://gcc.gnu.org/pipermail/gcc-patches/2025-March/679182.html > patch. > I know it is quite controversial and if clang wouldn't be the first > to implement this I'd certainly not go that way; I am willing to change > the warning option names or move the maybe one from -W

[COMMITTED 09/35] gccrs: nr2.0: Fix test const_generics_3.rs

2025-04-01 Thread arthur . cohen
From: Owen Avery gcc/testsuite/ChangeLog: * rust/compile/const_generics_3.rs: Modify test to run with name resolution 2.0 only and to handle the absence of a bogus resolution error. * rust/compile/nr2/exclude: Remove const_generics_3.rs. Signed-off-by: Owen Avery

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Qing Zhao
> On Apr 1, 2025, at 11:28, Martin Uecker wrote: > > Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: >> >>> On Apr 1, 2025, at 10:04, Martin Uecker wrote: >>> >>> >>> >>> Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb Bill Wendling: > I'd like to offer up this to solve

Re: [RFC] [C]New syntax for the argument of counted_by attribute for C language

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 05:13:46PM -0700, Bill Wendling wrote: > On Tue, Apr 1, 2025 at 8:29 AM Martin Uecker wrote: > > Am Dienstag, dem 01.04.2025 um 15:01 + schrieb Qing Zhao: > > > > On Apr 1, 2025, at 10:04, Martin Uecker wrote: > > > > Am Montag, dem 31.03.2025 um 13:59 -0700 schrieb Bi

Re: [PATCH] RISC-V: xtheadmemidx: Split slli.uw pattern [combine question]

2025-04-01 Thread Jeff Law
Segher -- there's a combine question near the end... On 3/23/25 8:43 PM, Bohan Lei wrote: The combine pass can generate an index like (and:DI (mult:DI (reg:DI) (const_int scale)) (const_int mask)) when XTheadMemIdx is available. LRA may pull it out, and thus a splitter is needed when Zba is n

[PATCH] LoongArch: Make gen-evolution.awk compatible with FreeBSD awk

2025-04-01 Thread Xi Ruoyao
Avoid using gensub that FreeBSD awk lacks, use gsub and split those each of gawk, mawk, and FreeBSD awk provides. Reported-by: mp...@vip.163.com Link: https://man.freebsd.org/cgi/man.cgi?query=awk gcc/ChangeLog: * config/loongarch/genopts/gen-evolution.awk: Avoid using gensub tha

Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533]

2025-04-01 Thread Heinrich Schuchardt
On 4/1/25 20:15, Vineet Gupta wrote: On 3/31/25 23:48, Heinrich Schuchardt wrote: On 3/30/25 01:49, Vineet Gupta wrote: changes since v2 - dump log sanfu --- vsetvl phase4 uses LCM guided info to insert VSETVL insns. It has an additional loop to insert missing vsetvls on certain edges. Curr

Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533]

2025-04-01 Thread Jeff Law
On 4/1/25 10:46 PM, Heinrich Schuchardt wrote: On 4/1/25 20:15, Vineet Gupta wrote: On 3/31/25 23:48, Heinrich Schuchardt wrote: On 3/30/25 01:49, Vineet Gupta wrote: changes since v2    - dump log sanfu --- vsetvl phase4 uses LCM guided info to insert VSETVL insns. It has an additional lo

Re: [PATCH] PR119482: Avoid mispredictions in bitmap_set_bit

2025-04-01 Thread Richard Biener
> Am 02.04.2025 um 00:02 schrieb Andi Kleen : > > From: Andi Kleen > > This isn't a regression, but it's a very simple patch with high > performance improvement, so perhaps suitable in the current stage. Ok. Can you add a comment as to why we store unconditionally? Richard > --- > > bi

Re: [PATCH] Libstdc++: Fix bootstrap failure for cross without tm.tm_zone [PR119550]

2025-04-01 Thread Tomasz Kaminski
On Tue, Apr 1, 2025 at 2:46 PM Jonathan Wakely wrote: > On Tue, 1 Apr 2025 at 11:34, Tomasz Kaminski wrote: > > > > > > > > On Mon, Mar 31, 2025 at 7:28 PM Jonathan Wakely > wrote: > >> > >> In r15-8491-g778c28c70f8573 I added a use of the Autoconf macro > >> AC_STRUCT_TIMEZONE, but that requir

Re: [PATCH] target/119549 - fixup handling of -mno-sse4

2025-04-01 Thread Hongtao Liu
On Tue, Apr 1, 2025 at 3:56 PM Jakub Jelinek wrote: > > On Tue, Apr 01, 2025 at 01:36:23PM +0800, Hongtao Liu wrote: > > >Changing ix86_valid_target_attribute_inner_p might be even better because > > >OPT_msse4 is RejectNegative option, so !value for it looks weird. > > msse4 is defined as ix86_op

Re: [PATCH] tailc: Improve tail recursion handling [PR119493]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > Hi! > > This is a partial step towards fixing that PR. > For musttail recursive calls which have non-is_gimple_reg_type typed > parameters, the only case we've handled was if the exact parameter > was passed through (perhaps modified, but still the same

Re: [PATCH] tailr: Punt on tail recursions that would break musttail [PR119493]

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > Hi! > > While working on the previous tailc patch, I've noticed the following > problem. > The testcase below fails, because we decide to tail recursion optimize > the call, but tail recursion (as documented in tree-tailcall.cc) needs to > add some resul

Re: [PATCH] sra: Avoid creating TBAA hazards (PR118924)

2025-04-01 Thread Richard Biener
On Mon, 31 Mar 2025, Martin Jambor wrote: > Hi, > > the testcase in PR 118924, when compiled on Aarch64, contains an > gimple aggregate assignment statement in between different types which > are types_compatible_p but behave differently for the purposes of > alias analysis. > > SRA replaces the

Re: [PATCH] c++/modules: Forbid exposures of TU-local entities in inline variables [PR119551]

2025-04-01 Thread Jason Merrill
On 4/1/25 7:02 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- An inline variable has vague linkage, and needs to be conditionally emitted in TUs that reference it. Unfortunately this clashes with [basic.link] p14.2, which says that we ignor

Re: [PATCH] target/119549 - fixup handling of -mno-sse4

2025-04-01 Thread Richard Biener
On Tue, 1 Apr 2025, Jakub Jelinek wrote: > On Tue, Apr 01, 2025 at 01:36:23PM +0800, Hongtao Liu wrote: > > >Changing ix86_valid_target_attribute_inner_p might be even better because > > >OPT_msse4 is RejectNegative option, so !value for it looks weird. > > msse4 is defined as ix86_opt_isa in ix86

[PATCH] simplify-rtx: Fix shortcut for vector eq/ne

2025-04-01 Thread Richard Sandiford
This patch forestalls a regression in gcc.dg/rtl/x86_64/vector_eq.c with the patch for PR116398. The test wants: (cinsn 3 (set (reg:V4SI <0>) (const_vector:V4SI [(const_int 0) (const_int 0) (const_int 0) (const_int 0)]))) (cinsn 5 (set (reg:V4SI <2>) (eq:V4SI (reg

Re: [PATCH][gcc-14] libstdc++: Fix bogus -Wstringop-overflow in std::vector::insert [PR117983]

2025-04-01 Thread Tomasz Kaminski
On Tue, Apr 1, 2025 at 11:32 AM Jonathan Wakely wrote: > This was fixed on trunk by r15-4473-g3abe751ea86e34, but that isn't > suitable for backporting. Instead, just add another unreachable > condition in std::vector::_M_range_insert so the compiler knows this > memcpy doesn't use a length origi

Re: [PATCH] combine: Use reg_used_between_p rather than modified_between_p in two spots [PR119291]

2025-04-01 Thread Jakub Jelinek
On Tue, Apr 01, 2025 at 11:27:25AM +0200, Richard Biener wrote: > > Looking at this some more today, I think we should special case > > set_noop_p because that can be put into i2 (except for the JUMP_P > > violations), currently both modified_between_p (pc_rtx, i2, i3) > > and reg_used_between_p (p

Re: [PATCH v4 0/3] [AArch64, OpenMP] Support SVE types with various OpenMP clauses and constructs

2025-04-01 Thread Tejas Belagod
Ping. Thanks, Tejas. On 3/18/25 11:27 AM, Tejas Belagod wrote: This series is based on a previous thread and review comments from RichardS and Jakub upstream: https://gcc.gnu.org/pipermail/gcc-patches/2025-March/677072.html The changes suggested are cosmetic in nature. As suggested in the p

Re: [PATCH v2] RISC-V: Tweak testcase for PIE

2025-04-01 Thread Kito Cheng
Push to trunk since the CI is green :) On Tue, Apr 1, 2025 at 3:43 PM Kito Cheng wrote: > > Linux toolchain may configured with --enable-default-pie, and that will > cause lots of regression test failures because the function name will > append with @plt suffix (e.g. `call foo` become `call foo@p

Re: [PATCH] [testsuite] [riscv] limit vwaddsub-1.c to rv64

2025-04-01 Thread Kito Cheng
On Tue, Apr 1, 2025 at 12:47 PM Jeff Law wrote: > > > > On 3/31/25 7:03 PM, Alexandre Oliva wrote: > > On Mar 31, 2025, Jeff Law wrote: > >> I don't immediately see anything in this test or its history to > >> indicate it's only supposed to work for rv64. > > > > It's the 64-bit integral argument

Re: [PATCH] Further use of mod_scope in modified_type_die

2025-04-01 Thread Tom Tromey
> "Richard" == Richard Biener writes: Richard> On Fri, Mar 28, 2025 at 8:32 AM Eric Botcazou wrote: >> >> > Let's involve Eric here, I have no idea what was intended here. >> >> We discussed it with Tom internally and he makes the final decisions here. Richard> Well the, Tom, go ahead.

Re: [PATCH v2] RISC-V: vsetvl: skip abnormal edge on vsetvl insertion [PR119533]

2025-04-01 Thread Vineet Gupta
On 3/31/25 23:48, Heinrich Schuchardt wrote: > On 3/30/25 01:49, Vineet Gupta wrote: >> changes since v2 >> - dump log sanfu >> >> --- >> vsetvl phase4 uses LCM guided info to insert VSETVL insns. >> It has an additional loop to insert missing vsetvls on certain edges. >> Currently it asserts/abo

Re: [PATCH v2] c++: fix missing lifetime extension [PR119383]

2025-04-01 Thread Jason Merrill
On 3/31/25 4:59 PM, Marek Polacek wrote: On Thu, Mar 27, 2025 at 11:27:04AM -0400, Jason Merrill wrote: On 3/25/25 3:37 PM, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- Since r15-8011 cp_build_indirect_ref_1 won't do the *&TARGET_EXPR -> TARGET_

[COMMITTED 26/35] gccrs: Fix ICE during const expr eval on array expressions

2025-04-01 Thread arthur . cohen
From: Philip Herron Array expressions are still getting turned into VIEW_CONVERT_EXPR's becuase TYPE_MAIN_VARIANT is not set so then we might as well reuse the type-hasher to sort this out. Fixes Rust-GCC#3588 gcc/rust/ChangeLog: * backend/rust-compile-context.h: only push named types