[PATCH] LoongArch: doc: Put the '-mtls-dialect=opt' option description in the correct position.

2025-03-31 Thread Lulu Cheng
gcc/ChangeLog: * doc/invoke.texi: Corrected the position of '-mtls-dialect=opt' option. --- gcc/doc/invoke.texi | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index df461090824..ecc5f61f29c 100644 ---

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

2025-03-31 Thread Richard Biener
The following fixes ix86_handle_option to properly handle -mno-sse4 which is always handled as -msse4 with value unset. I've verified no other OPT_mno_* is left around. Bootstrap and regtest running on x86_64-unknown-linux-gnu. This error goes back quite some time, I'm not sure how prevalent the

[PATCH] sra: Clear grp_same_access_path of acesses created by total scalarization (PR118924)

2025-03-31 Thread Martin Jambor
Hi, during analysis of PR 118924 it was discussed that total scalarization invents access paths (strings of COMPONENT_REFs and possibly even ARRAY_REFs) which did not exist in the program before which can have unintended effects on subsequent AA queries. Although not doing that does not mean that

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

2025-03-31 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 03:33:34PM +0200, Richard Biener wrote: > On Mon, 31 Mar 2025, Jakub Jelinek wrote: > > > On Mon, Mar 31, 2025 at 03:12:56PM +0200, Richard Biener wrote: > > > The following fixes ix86_handle_option to properly handle -mno-sse4 > > > which is always handled as -msse4 with v

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

2025-03-31 Thread Richard Biener
On Mon, 31 Mar 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 03:33:34PM +0200, Richard Biener wrote: > > On Mon, 31 Mar 2025, Jakub Jelinek wrote: > > > > > On Mon, Mar 31, 2025 at 03:12:56PM +0200, Richard Biener wrote: > > > > The following fixes ix86_handle_option to properly handle -mn

[committed] arm: testsuite: fix vect-fmaxmin.c test

2025-03-31 Thread Richard Earnshaw
This is another case of a test that was both an executable test requiring specific hardware and an assembler scan test. The requirement for the hardware was masking some useful testing that could be done (by scanning the assembly output) on almost all test runs. Fixed in a similar manner to fmaxm

Re: [PATCH] libstdc++: Make operator== for std::tuple convert to bool [PR119545]

2025-03-31 Thread Tomasz Kaminski
On Mon, Mar 31, 2025 at 3:03 PM Jonathan Wakely wrote: > The boolean-testable requirements don't require the type to be copyable, > so we need to convert to bool before it might need to be copied. > > libstdc++-v3/ChangeLog: > > PR libstdc++/119545 > * include/std/tuple (operator=

Re: [PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-03-31 Thread Richard Biener
On Mon, Mar 31, 2025 at 9:41 AM Richard Biener wrote: > > On Mon, Mar 31, 2025 at 9:36 AM Kyrylo Tkachov wrote: > > > > Ping. > > Can you reference the patch please? I'll note your mails have the tendency to > end up in my spam folder (which is auto-purged after some time). Probably > a setup i

Re: [PATCH] gcc_release: Generate srcdir extras/infos/man pages from all FEs [PR119510]

2025-03-31 Thread Andreas Schwab
On Mär 31 2025, Richard Biener wrote: > Do we even install libffi.info? We shouldn't. It would conflict with the standalone libffi library, and we don't install anything from the target libffi library anyway (it's only used internally). -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fing

Re: [PATCH] libstdc++: Constrain formatters for chrono types [PR119517]

2025-03-31 Thread Tomasz Kaminski
I checked, and it seems that we have thread::id and stacktrace related formatters already use basic_format_parse_context and basic_format_context as parameters. So no changes needed there. On Sat, Mar 29, 2025 at 9:41 PM Jonathan Wakely wrote: > On Sat, 29 Mar 2025 at 18:16, Tomasz Kaminski wro

Re: [PATCH] gcc_release: Generate srcdir extras/infos/man pages from all FEs [PR119510]

2025-03-31 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 10:38:58AM +0200, Andreas Schwab wrote: > On Mär 31 2025, Richard Biener wrote: > > > Do we even install libffi.info? > > We shouldn't. It would conflict with the standalone libffi library, and > we don't install anything from the target libffi library anyway (it's > only

Re: [PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-03-31 Thread Kyrylo Tkachov
Ping. Thanks, Kyrill > On 24 Mar 2025, at 14:28, Kyrylo Tkachov wrote: > > Hi all, > > In this testcase GCC tries to expand a VNx4BI vector: > vector(4) _40; > _39 = () _24; > _40 = {_39, _39, _39, _39}; > > This ends up in a scalarised sequence of bitfield insert operations. > This is despi

[PATCH] RISC-V: testsuite: Fix broken testsuite error of zicbop

2025-03-31 Thread Liao Shihua
Fix broken testsuite like "ERROR: gcc.target/riscv/cmo-zicbop-2.c -Os : 1: too many arguments for " dg-do 1 compile target { { rv32-*-*}} " gcc/testsuite/ChangeLog: * gcc.target/riscv/cmo-zicbop-1.c: Fix missing { before target . * gcc.target/riscv/cmo-zicbop-2.c: Likewise.

Re: [PATCH] tree-optimization/119532 - ICE with fixed-point tail recursion

2025-03-31 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 11:12:45AM +0200, Richard Biener wrote: > The following disables tail recursion optimization when fixed-point > types are involved as we cannot generate -1 for all fixed-point > types. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? > > Thanks, > Richard. >

Re: [pushed] c++/modules: unexported friend template

2025-03-31 Thread Nathaniel Shead
On Sat, Mar 29, 2025 at 11:14:46AM -0400, Jason Merrill wrote: > Tested x86_64-pc-linux-gnu, applying to trunk. Do you agree with my choice of > how to adjust duplicate_decls? Yes, that looks reasonable to me. The point of this block is just to ensure that we export any entities declared in the

Re: [PATCH] tree-optimization/119532 - ICE with fixed-point tail recursion

2025-03-31 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 11:25:27AM +0200, Richard Biener wrote: > > > PR tree-optimization/119532 > > > * tree-tailcall.cc (process_assignment): FAIL for fixed-point > > > typed functions. > > > > > > * gcc.dg/torture/pr119532.c: New testcase. > > > > So shouldn't we punt in that case jus

Re: [PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-03-31 Thread Richard Biener
On Mon, Mar 31, 2025 at 9:36 AM Kyrylo Tkachov wrote: > > Ping. Can you reference the patch please? I'll note your mails have the tendency to end up in my spam folder (which is auto-purged after some time). Probably a setup issue at nvidias side. Richard. > Thanks, > Kyrill > > > On 24 Mar 20

Re: [PATCH] aarch64: remove SVE2 requirement from SME and diagnose it as unsupported

2025-03-31 Thread Richard Sandiford
"Andre Vieira (lists)" writes: > Here is the latest version of the patch, I wasn't sure whether Richard's > 'LGTM with...' was meant as a conditional OK and together with the > changes suggested by Andrew I thought I'd ask again, OK for trunk? > > > As per the AArch64 ISA FEAT_SME does not requi

[PATCH 1/2] GCN, libstdc++: '#define _GLIBCXX_USE_WEAK_REF 0' [PR119369]

2025-03-31 Thread Thomas Schwinge
This fixes a few hundreds of compilation/linking FAILs (similar to PR69506), where the GCN/LLVM 'ld' reported: ld: error: relocation R_AMDGPU_REL32_LO cannot be used against symbol '_ZGTtnam'; recompile with -fPIC >>> defined in [...]/amdgcn-amdhsa/./libstdc++-v3/src/.libs/libstdc++.a(co

[committed] OpenMP: modify_call_for_omp_dispatch - fix invalid memory access after 'error' [PR119541]

2025-03-31 Thread Tobias Burnus
This fixes an out-of-array-bounds access in the case that nappend < ninterop Namely, the number of interop clauses to 'dispatch' exceeds the number of interop args accepted by the function/specified in the append_args clause to 'declare variant'. OpenMP does not allow this - hence, GCC diagno

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

2025-03-31 Thread Robin Dapp
LGTM (even though I still don't like the spec :D). We still have an implicit assumption in riscv-vsetvl.cc that might modify LMUL: In prev_ratio_valid_for_next_sew_p and next_ratio_valid_for_prev_sew_p we check whether the ratio of two LMULs is <= 8. ISTR that with recent changes we only re-u

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

2025-03-31 Thread Kito Cheng
From: Monk Chiang According to Section 3.4.2, Vector Register Grouping, in the RISC-V Vector Specification, the rule for LMUL is LMUL >= SEW/ELEN Changes since V2: - Add check on vector-iterators.md - Add one more testcase to check the VLS use correct mode. gcc/ChangeLog: * config/riscv

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

2025-03-31 Thread Richard Biener
On Mon, 31 Mar 2025, Jakub Jelinek wrote: > On Mon, Mar 31, 2025 at 03:12:56PM +0200, Richard Biener wrote: > > The following fixes ix86_handle_option to properly handle -mno-sse4 > > which is always handled as -msse4 with value unset. I've verified > > no other OPT_mno_* is left around. > > > >

[committed] d: Fix error with -Warray-bounds and -O2 [PR117002]

2025-03-31 Thread Iain Buclaw
Hi, This patch fixes an error raised by the middle-end when compiling with the options `-Warray-bounds -O2'. The record layout of class types in D don't get any tail padding, so it is possible for the `classInstanceSize' to not be a multiple of the `classInstanceAlignment'. Rather than setting t

Re: [PATCH] libstdc++: Make operator== for std::tuple convert to bool [PR119545]

2025-03-31 Thread Jonathan Wakely
On Mon, 31 Mar 2025 at 15:53, Tomasz Kaminski wrote: > > > > On Mon, Mar 31, 2025 at 3:03 PM Jonathan Wakely wrote: >> >> The boolean-testable requirements don't require the type to be copyable, >> so we need to convert to bool before it might need to be copied. >> >> libstdc++-v3/ChangeLog: >> >

Re: [PATCH v2 0/1] Cherry pick of patch for gcc-13 fixing PR119372

2025-03-31 Thread Richard Sandiford
Alfie Richards writes: > Minor update to add the PR label from Alex's feedback (thank you!). > > Regtested and bookstrapped for gcc-12 and gcc-13 (after applying > r13-100-g3771486daa1e904ceae6f3e135b28e58af33849 to gcc-12). > > Alfie > > Andrew Carlotti (1): > aarch64: Use PAUTH instead of V8_3

Re: [PATCH] ranger: Improve nonnull_if_nonzero attribute [PR117023]

2025-03-31 Thread Andrew MacLeod
On 3/29/25 20:54, Jeff Law wrote: On 3/4/25 2:10 AM, Jakub Jelinek wrote: Hi! On Fri, Nov 22, 2024 at 07:25:23PM -0500, Andrew MacLeod wrote:   I will shortly be submitting , and presumable committing, this patch as part of a series to improve VRP time for 117467.. So it may be in place b

Re: [PATCH v3 14/19] Add reject_target_clone hook and filter target_clone versions.

2025-03-31 Thread Alfie Richards
Ah you're right, command line error on my part. Thank you! Alfie On 29/03/2025 17:05, Yangyu Chen wrote: Hi Alfie, It appears that you've duplicated patch 14/19. The only difference between them is the title, which replaces "and" with "in order to". I think the latter version is what you inte

Re: [PATCH 1/2] libstdc++: Fix -Wstringop-overread warning in std::vector [PR114758]

2025-03-31 Thread Tomasz Kaminski
On Fri, Mar 28, 2025 at 9:53 PM Jonathan Wakely wrote: > As in r13-4393-gcca06f0d6d76b0 and a few other commits, we can avoid > bogus warnings in std::vector by hoisting some loads to before the > allocation that calls operator new. This means that the compiler has > enough info to remove the dea

Re: Warning/error typo bug: "couldn't deduce template parameter"

2025-03-31 Thread Jakub Jelinek
Jakub --- Begin Message --- On Mon, Mar 31, 2025 at 02:04:14PM +0300, Roman Kovalev wrote: > Thanks for your reply. But I get warning: could»t deduce template parameter > «muted» In which locale? That would be a translation error. The translations can translate the quote characters ( ` an

Re: [PATCH v3 05/19] Update is_function_default_version to work with target_version.

2025-03-31 Thread Alfie Richards
Hello, The function is only used in i386 and rs6000 target specific code (which don't support the `target_version` attribute) so would have no effect on its own. Additionally, when it became clear this ACLE compliance series wouldn't make GCC 15 we have added a warning for Aarch64 in gcc 14

Re: [PATCH 1/2] GCN, libstdc++: '#define _GLIBCXX_USE_WEAK_REF 0' [PR119369]

2025-03-31 Thread Jonathan Wakely
On Mon, 31 Mar 2025 at 10:50, Thomas Schwinge wrote: > > This fixes a few hundreds of compilation/linking FAILs (similar to PR69506), > where the GCN/LLVM 'ld' reported: > > ld: error: relocation R_AMDGPU_REL32_LO cannot be used against symbol > '_ZGTtnam'; recompile with -fPIC > >>> defi

Re: [PATCH] gcc_release: Generate srcdir extras/infos/man pages from all FEs [PR119510]

2025-03-31 Thread Richard Biener
On Sat, 29 Mar 2025, Jakub Jelinek wrote: > Hi! > > Enabling cobol explicitly (at least unconditionally) in gcc_release has the > disadvantage that the script no longer works for GCC <= 14, I think it would > be better to keep it working for all still supported release branches. > > And as menti

C++ patch ping (Re: [PATCH] c++, libcpp: Allow some left shifts in the preprocessor [PR119391])

2025-03-31 Thread Jakub Jelinek
Hi! I'd like to ping the https://gcc.gnu.org/pipermail/gcc-patches/2025-March/678863.html patch. Thanks. On Sat, Mar 22, 2025 at 01:33:51AM +0100, Jakub Jelinek wrote: > The libcpp left shift handling implements (partially) the C99-C23 > wording where shifts are UB if shift count is negative, or

Re: [PATCH v2] aarch64, Darwin: Initial implementation of Apple cores [PR113257].

2025-03-31 Thread Kyrylo Tkachov
Hi Iain, > On 22 Mar 2025, at 15:31, Iain Sandoe wrote: > > 0. Sorry this has taken some time to close off; partly because of waiting > for input, but mostly that I've been stretched with other work. > 1. As per the commit message, the apparent non-conformance with 8.5/6 > because FEAT_SPECR

Re: Warning/error typo bug: "couldn't deduce template parameter"

2025-03-31 Thread Jakub Jelinek
On Mon, Mar 31, 2025 at 01:35:40PM +0300, Roman Kovalev wrote: > Hello! I found a typo in the error/warning output line. Sorry if I messed > up the order of submitting edits. Thius is incorrect. %' is supported escape code for apostrophes: %': apostrophe (should only be used in untranslated mes

[ping][PATCH v2] aarch64, Darwin: Initial implementation of Apple cores [PR113257].

2025-03-31 Thread Iain Sandoe
I realise this is probably not #1 priority - but it would be nice to have in gcc-15. thanks iain > On 22 Mar 2025, at 14:31, Iain Sandoe wrote: > > 0. Sorry this has taken some time to close off; partly because of waiting > for input, but mostly that I've been stretched with other work. > 1.

Re: [PATCH] PR middle-end/119442: expr.cc: Fix vec_duplicate into vector boolean modes

2025-03-31 Thread Mark Wielaard
On Mon, 2025-03-31 at 09:12 +, Kyrylo Tkachov wrote: > > > On 31 Mar 2025, at 09:43, Richard Biener wrote: > > > > On Mon, Mar 31, 2025 at 9:41 AM Richard Biener > > wrote: > > > > > > On Mon, Mar 31, 2025 at 9:36 AM Kyrylo Tkachov > > > wrote: > > > > > > > > Ping. > > > > > > Can you

[ping] [PATCH] libgcobol: C++-ify the configuration steps.

2025-03-31 Thread Iain Sandoe
Hi folks > On 24 Mar 2025, at 17:15, Iain Sandoe wrote: > >> On 24 Mar 2025, at 16:41, Iain Sandoe wrote: >>> On 24 Mar 2025, at 16:38, Robert Dubner wrote: >>> >>> How about you create the new patch and just edit out the regenerated >>> configure before sending the e-mail? Typing "autorecon

RE: [gcc-wwwdocs PATCH] gcc-14/15: Mention recent change for Intel x86_64

2025-03-31 Thread Jiang, Haochen
> From: Gerald Pfeifer > Sent: Sunday, March 30, 2025 5:23 AM > > On Mon, 24 Mar 2025, Haochen Jiang wrote: > > Mention AVX10.1 option changes, revise AVX10.2 option and mention > > APX_F new feature in GCC 15. > > --- > > >New ISA extension support for Intel AVX10.1 was added. > > - AV

Re: [PATCH] libstdc++: Fix up string _M_constructor exports [PR103827]

2025-03-31 Thread Jonathan Wakely
On Mon, 31 Mar 2025 at 17:07, Jonathan Wakely wrote: > > On Mon, 31 Mar 2025 at 16:11, Rainer Orth > wrote: > > > > Jonathan Wakely writes: > > > > > On Sun, 30 Mar 2025, 23:15 Jakub Jelinek, wrote: > > > > > >> On Thu, Mar 27, 2025 at 02:04:24PM +0100, Jan Hubicka wrote: > > >> > > > Newline

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

2025-03-31 Thread Jonathan Wakely
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: PR libstdc++/114945 * include/bits/vector.tcc (ve

Re: [PATCH] libstdc++: Fix up string _M_constructor exports [PR103827]

2025-03-31 Thread Jonathan Wakely
On Mon, 31 Mar 2025 at 17:28, Jonathan Wakely wrote: > > On Mon, 31 Mar 2025 at 17:07, Jonathan Wakely wrote: > > > > On Mon, 31 Mar 2025 at 16:11, Rainer Orth > > wrote: > > > > > > Jonathan Wakely writes: > > > > > > > On Sun, 30 Mar 2025, 23:15 Jakub Jelinek, wrote: > > > > > > > >> On Thu

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

2025-03-31 Thread Jørgen Kvalsvik
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.cc, so it doesn't make too much sense to hide it in path-coverage

[PATCH] [testsuite] [riscv] xfail ssa-dom-cse-2 on riscv64

2025-03-31 Thread Alexandre Oliva
For the same reasons that affect alpha and other targets, gcc.dg/tree-ssa/ssa-dom-cse-2.c fails to be optimized to the expected return statement: the array initializer is vectorized into pairs, and DOM cannot see through that. Add riscv*-*-* to the list of affected lp64 platforms. riscv32 is no

Re: [PATCH] libstdc++: Fix up string _M_constructor exports [PR103827]

2025-03-31 Thread Rainer Orth
Jonathan Wakely writes: > On Sun, 30 Mar 2025, 23:15 Jakub Jelinek, wrote: > >> On Thu, Mar 27, 2025 at 02:04:24PM +0100, Jan Hubicka wrote: >> > > > Newline between functions please. >> > > > >> > > > OK with those two changes. >> > > >> > > Looking back through my inbox, this one doesn't seem

[PATCH] [testsuite] [riscv] xfail update-threading on riscv [PR110628]

2025-03-31 Thread Alexandre Oliva
The failure to adjust estimated profiling frequencies in reassoc noted in PR110628 affects riscv as well. Add it to the XFAIL set. Tested on x86_64-linux-gnu native, and gcc-14 target riscv{64,32}-elf. Ok to install? for gcc/testsuite/ChangeLog PR tree-optimization/110628 *

[PATCH] [testsuite] [riscv] limit mcpu-xiangshan-nanhu.c to rv64

2025-03-31 Thread Alexandre Oliva
The testcase makes the -march option conditional on rv64, and #errors out if the desired CPU properties are not active. This makes the test fail on rv32. Arrange to skip the test on rv32 instead, moving the rv64 conditional. Tested on x86_64-linux-gnu native, and gcc-14 target riscv{64,32}-elf

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

2025-03-31 Thread Sam James
Christophe Lyon writes: > 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. Great find, thanks. > > gcc/testsuite/ChangeLog: > > PR target/119556 > * g

[PATCH 2/2] c++: maybe_dependent_member_ref and typenames [PR118626]

2025-03-31 Thread Patrick Palka
Here during maybe_dependent_member_ref for accepted_type<_Up>, we correctly don't strip the typedef because it's a complex one (its defaulted template parameter isn't used in its definition) and so we recurse to consider its corresponding TYPE_DECL. We then incorrectly decide to not rewrite this u

Re: [PATCH] [testsuite] [riscv] xfail update-threading on riscv [PR110628]

2025-03-31 Thread Alexandre Oliva
On Mar 31, 2025, Jeff Law wrote: >> PR tree-optimization/110628 >> * gcc.dg/tree-ssa/update-threading.c: XFAIL on riscv. > ?!? This is passing on my tester: Indeed, despite the lack of any activity in the PR that could suggest it's fixed in the trunk, it no longer fails in the trunk, only gcc-14

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

2025-03-31 Thread Li, Pan2
> 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 example, this permits an implementation to set vl = ceil(AVL / 2) for VLMAX

Re: [PATCH] [testsuite] [riscv] xfail some [PR113281] tests

2025-03-31 Thread Robin Dapp
Some of the tests regressed with a fix for the vectorization of shifts. The riscv cost models need to be adjusted to avoid the unprofitable optimization. The failure of these tests has been known since 2024-03-13, without a forthcoming fix, so I suggest we consider it expected by now. Adjust th

Re: [PATCH 1/8] aarch64: Use PAUTH instead of V8_3A in some places

2025-03-31 Thread Alfie Richards
Hi Richard, Is this backport okay for GCC 14 as well? (It applies cleanly for 14 but patch for 12 and 13 required a minor edit) Alfie On 20/03/2025 14:05, Alfie Richards wrote: Hi all, This commit applies cleanly to GCC 14 and fixes PR119372. Bootstrapped and regtested on aarch64-linux-gnu.

[COMMITTED 03/35] gccrs: Remove now passing test from exclusion list

2025-03-31 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those tests were malformed and failed with the new name resolution because of it. gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove test from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 5

[COMMITTED 12/35] gccrs: testsuite: Add more testcases for cfg() in core

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/testsuite/ChangeLog: * rust/compile/cfg-core1.rs: New test. * rust/compile/cfg-core2.rs: New test. --- gcc/testsuite/rust/compile/cfg-core1.rs | 12 gcc/testsuite/rust/compile/cfg-core2.rs | 12 2 files changed, 24 insertions(+)

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

2025-03-31 Thread Kito Cheng
Hi Robin: Pushed to trunk, thanks, On Mon, Mar 31, 2025 at 11:23 PM Robin Dapp wrote: > > LGTM (even though I still don't like the spec :D). Yeah...and I also don't like the magic "ceil(AVL / 2) ≤ vl ≤ VLMAX if AVL < (2 * VLMAX)" rule... > We still have an implicit assumption in riscv-vsetvl.

[PATCH] RISC-V: Fixbug for slli + addw + zext.w into sh[123]add + zext.w

2025-03-31 Thread Jin Ma
Assuming we have the following variables: unsigned long long a0, a1; unsigned int a2; For the expression: a0 = (a0 << 50) >> 49; // slli a0, a0, 50 + srli a0, a0, 49 a2 = a1 + a0; // addw a2, a1, a0 + slli a2, a2, 32 + srli a2, a2, 32 In the optimization process of ZBA (combine pass)

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

2025-03-31 Thread Jeff Law
On 3/31/25 1:33 PM, Vineet Gupta wrote: On 3/29/25 17:58, Jeff Law wrote: On 3/29/25 6:49 PM, 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. Current

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

2025-03-31 Thread Robin Dapp
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 example, this permits an implementation to set vl = ceil(AVL / 2) for VLMAX <

[PATCH]

2025-03-31 Thread Alexandre Oliva
[testsuite] [riscv] limit vwaddsub-1.c to rv64 The desired vw{add,sub}.wx instructions don't come up on rv32 for the first two functions, we get v{add,sub}.vx instead. I suppose this is an oversight, and something about the test is meant for rv64 only, but the fact that the instruction is spell

[COMMITTED 05/35] gccrs: parser: Parse let-else statements

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::parse_let_stmt): Add new parsing in case of `else` token. --- gcc/rust/parse/rust-parse-impl.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/

[COMMITTED 19/35] gccrs: Fix ICE when using super mid way though path

2025-03-31 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3568 gcc/rust/ChangeLog: * resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): check for super mid path gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: nr2 puts out a different error multiple times * rust/compile/issu

[COMMITTED 13/35] gccrs: Fix validation of constant items

2025-03-31 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * checks/errors/rust-ast-validation.cc (ASTValidation::visit): Allow constant items lacking expressions if and only if they're associated with a trait definition, not a trait implementation. gcc/testsuite/ChangeLog: *

[COMMITTED 07/35] gccrs: name-resolution: Handle let-else properly

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * resolve/rust-ast-resolve-stmt.h: Add handling for diverging else. * resolve/rust-late-name-resolver-2.0.cc (Late::visit): Likewise. --- gcc/rust/resolve/rust-ast-resolve-stmt.h| 7 --- gcc/rust/resolve/rust-late-name-resolver-

[COMMITTED 35/35] gccrs: Fix SEGV when type path resolver fails outright

2025-03-31 Thread arthur . cohen
From: Philip Herron When we resolve paths we resolve to Types first we walk each segment to the last module which has no type but then in the event that the child of a module is not found we have a null root_tyty which needs to be caught and turned into an ErrorType node. Fixes Rust-GCC#3613 gc

[COMMITTED 23/35] gccrs: Update exclusion list

2025-03-31 Thread arthur . cohen
From: Pierre-Emmanuel Patry gcc/testsuite/ChangeLog: * rust/compile/nr2/exclude: Remove now passing tests from exclusion list. Signed-off-by: Pierre-Emmanuel Patry --- gcc/testsuite/rust/compile/nr2/exclude | 6 -- 1 file changed, 6 deletions(-) diff --git a/gcc/testsuite

[COMMITTED 28/35] gccrs: nr2.0: Rename prelude to lang_prelude

2025-03-31 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (ForeverStack::get_prelude): Rename to... (ForeverStack::get_lang_prelude): ...here. (ForeverStack::prelude): Rename to... (ForeverStack::lang_prelude): ...here. (ForeverStack::For

[COMMITTED 34/35] gccrs: fix crash in parse repr options and missing delete call

2025-03-31 Thread arthur . cohen
From: Philip Herron Fixes Rust-GCC#3606 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-base.cc (TypeCheckBase::parse_repr_options): check for null and empty and add missing delete call gcc/testsuite/ChangeLog: * rust/compile/issue-3606.rs: New test. Signed-off-b

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

2025-03-31 Thread Jonathan Wakely
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 supported. That link-test isn't allowed for cross-compilation, so bootstrap fails if tm.tm_zone isn't supported. Since libstdc++ only c

[COMMITTED 15/35] gccrs: Fix core library test with proper canonical path

2025-03-31 Thread arthur . cohen
From: Pierre-Emmanuel Patry Import from core library was wrong, it misses several crate directives since we're no longer dealing with multiple files. gcc/testsuite/ChangeLog: * rust/compile/issue-2905-2.rs: Import from core library into a single file misses the crate directives.

[COMMITTED 04/35] gccrs: ast: Add optional diverging else to AST::LetStmt

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-stmt.h (class LetStmt): Add optional expression for diverging else. * ast/rust-ast-builder.cc (Builder::let): Use new API. --- gcc/rust/ast/rust-ast-builder.cc | 3 ++- gcc/rust/ast/rust-stmt.h | 29

[COMMITTED 20/35] gccrs: Fix ICE when doing method resolution on trait predicates

2025-03-31 Thread arthur . cohen
From: Philip Herron We need to ensure we are adding methods to the possible candidates. Fixes Rust-GCC#3554 gcc/rust/ChangeLog: * typecheck/rust-hir-dot-operator.cc: gcc/testsuite/ChangeLog: * rust/compile/issue-3554-1.rs: New test. * rust/compile/issue-3554-2.rs: New

[COMMITTED 17/35] gccrs: Add check for super traits being implemented by Self

2025-03-31 Thread arthur . cohen
From: Philip Herron We need to recursively check the super traits of the predicate the Self type is trying to implement. Otherwise its cannot implement it. Fixes Rust-GCC#3553 gcc/rust/ChangeLog: * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::resolve_impl_block_substitutions)

[COMMITTED 14/35] gccrs: fix unconstrained infer vars on generic associated type

2025-03-31 Thread arthur . cohen
From: Philip Herron The trick here is that when Bar::test is resolved it resolves to the trait method: fn , T> (placeholder) -> placeholder Which is fine so we need to setup the associated types for Bar which means looking up the associated impl block then setting up the projection of A = T s

[COMMITTED 22/35] gccrs: Resolve module final self segment in use decls

2025-03-31 Thread arthur . cohen
From: Pierre-Emmanuel Patry Lowercase self suffix with path was not resolved properly, this should point to the module right before. gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx: Add a new specialized function to retrieve the last "real" segment depending on the namespac

[COMMITTED 02/35] gccrs: Fix testcase module path

2025-03-31 Thread arthur . cohen
From: Pierre-Emmanuel Patry Those tests are coming from libcore and module inlining was wrong, in libcore there was a use declaration to import those modules which was missing here. gcc/testsuite/ChangeLog: * rust/compile/issue-2330.rs: Use complete path from crate root. * rust/

[COMMITTED 30/35] gccrs: Fix ICE in array ref constexpr

2025-03-31 Thread arthur . cohen
From: Philip Herron Since 898d55ad7e2 was fixed to remove the VIEW_CONVERT_EXPR from array expressions we can now turn on the array element access const expr. Fixes Rust-GCC#3563 gcc/rust/ChangeLog: * backend/rust-constexpr.cc (eval_store_expression): turn this back on gcc/testsuite/C

Re: [PATCH]

2025-03-31 Thread Jeff Law
On 3/31/25 1:05 PM, Alexandre Oliva wrote: [testsuite] [riscv] limit vwaddsub-1.c to rv64 The desired vw{add,sub}.wx instructions don't come up on rv32 for the first two functions, we get v{add,sub}.vx instead. I suppose this is an oversight, and something about the test is meant for rv64 o

Re: [PATCH] [testsuite] [riscv] limit mcpu-xiangshan-nanhu.c to rv64

2025-03-31 Thread Jeff Law
On 3/31/25 1:02 PM, Alexandre Oliva wrote: The testcase makes the -march option conditional on rv64, and #errors out if the desired CPU properties are not active. This makes the test fail on rv32. Arrange to skip the test on rv32 instead, moving the rv64 conditional. Tested on x86_64-linux

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

2025-03-31 Thread Alexandre Oliva
On Mar 31, 2025, Jeff Law wrote: > On 3/31/25 1:05 PM, Alexandre Oliva wrote: >> The desired vw{add,sub}.wx instructions don't come up on rv32 for >> the >> first two functions, we get v{add,sub}.vx instead. >> I suppose this is an oversight, and something about the test is >> meant >> for rv64

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

2025-03-31 Thread Jeff Law
On 3/31/25 3:43 PM, Vineet Gupta wrote: But what state is in play that caused it to want to insert something? That's what needs to be understood here. I don't see anything in bb64 that requires vsetvl to be in any particular state. So why did vsetvl insertion think that it needed to insert

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

2025-03-31 Thread Jeff Law
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 rs1. Right, but ISTM we ought to be able to handle a vector of 64bit i

Re: [PATCH] [testsuite] [riscv] xfail some [PR113281] tests

2025-03-31 Thread Jeff Law
On 3/31/25 1:01 PM, Alexandre Oliva wrote: Some of the tests regressed with a fix for the vectorization of shifts. The riscv cost models need to be adjusted to avoid the unprofitable optimization. The failure of these tests has been known since 2024-03-13, without a forthcoming fix, so I su

[COMMITTED 29/35] gccrs: Add ending newline to rust-macro-builtins-log-debug.cc

2025-03-31 Thread arthur . cohen
From: Owen Avery gcc/rust/ChangeLog: * expand/rust-macro-builtins-log-debug.cc: Add newline to end of file. Signed-off-by: Owen Avery --- gcc/rust/expand/rust-macro-builtins-log-debug.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/rust/expand/rust-m

Re: [PATCH] [testsuite] [riscv] xfail update-threading on riscv [PR110628]

2025-03-31 Thread Jeff Law
On 3/31/25 1:00 PM, Alexandre Oliva wrote: The failure to adjust estimated profiling frequencies in reassoc noted in PR110628 affects riscv as well. Add it to the XFAIL set. Tested on x86_64-linux-gnu native, and gcc-14 target riscv{64,32}-elf. Ok to install? for gcc/testsuite/ChangeLog

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

2025-03-31 Thread Vineet Gupta
On 3/31/25 12:39, Jeff Law wrote: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::emit_vsetvl): skip EDGE_ABNORMAL. gcc/testsuite/ChangeLog: * go.dg/pr119533-riscv.go: New test. >>> So presumably it wants to insert on the EH edge for a reason. Just >>> skipping t

[COMMITTED 10/35] rust: Lower minimum supported Rust version to 1.49

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * checks/errors/borrowck/ffi-polonius/Cargo.lock: Regenerate. * checks/errors/borrowck/ffi-polonius/Cargo.toml: Update to use source patching instead of vendoring, lower edition to 2018. * checks/errors/borrowck/ffi-polonius

Re: [PATCH] libstdc++: Fix up string _M_constructor exports [PR103827]

2025-03-31 Thread Jonathan Wakely
On Mon, 31 Mar 2025 at 16:11, Rainer Orth wrote: > > Jonathan Wakely writes: > > > On Sun, 30 Mar 2025, 23:15 Jakub Jelinek, wrote: > > > >> On Thu, Mar 27, 2025 at 02:04:24PM +0100, Jan Hubicka wrote: > >> > > > Newline between functions please. > >> > > > > >> > > > OK with those two changes.

Re: [PATCH] RISC-V: testsuite: Fix broken testsuite error of zicbop

2025-03-31 Thread Kito Cheng
Thanks, pushed to trunk :) On Mon, Mar 31, 2025 at 4:54 PM Liao Shihua wrote: > > Fix broken testsuite like > "ERROR: gcc.target/riscv/cmo-zicbop-2.c -Os : 1: too many arguments for " > dg-do 1 compile target { { rv32-*-*}} " > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/cmo-zicb

[PATCH] RISC-V: Tweak testcase for PIE

2025-03-31 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`). We may consider just drop @plt suffix to prevent that at all, because it's not difference b

[PATCH 4/7] ipa-cp: Use the stored and streamed pass-through types in ipa-vr (PR118785)

2025-03-31 Thread Martin Jambor
This patch revisits the fix for PR 118785 and intead of deducing the necessary operation type it just uses the value collected and streamed by an earlier patch. gcc/ChangeLog: Bootstrapped and tested and LTO bootstrapped on x86_64-linux. OK for master? Thanks, Martin 2025-03-20 Martin Jambor

[RFC PATCH 6/7] ipa: Remove type checks in arithmetic pass-through jfunc construction

2025-03-31 Thread Martin Jambor
After reviewing the code involving arithmetic pass-through jump functions I found out that we actually do check that the type of the LHS is compatible with the type of the first operand on the RHS. Now that we stream the types of the LHS of these operations, this is no longer necessary - and we ha

[RFC PATCH 7/7] ipa: Allow a type conversion in construction of aggregate jump functions

2025-03-31 Thread Martin Jambor
When computing arithmetic pass-through jump functions for parameters themselves (aka scalars), we allow a data preserving type conversion in between the call and the gimple calculation that is represented by the jump function. When doing the same for values passed in aggregates or passed by refere

[COMMITTED 06/35] gccrs: dump: Handle let-else properly

2025-03-31 Thread arthur . cohen
From: Arthur Cohen gcc/rust/ChangeLog: * ast/rust-ast-collector.cc (TokenCollector::visit): Add handling for diverging else expression. --- gcc/rust/ast/rust-ast-collector.cc | 8 1 file changed, 8 insertions(+) diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/r

[PATCH 5/7] ipa-cp: Use the collected pass-through types to propagate constants (PR118097)

2025-03-31 Thread Martin Jambor
This patch revisits the fix for PR 118097 and instead of deducing the necessary operation type it just uses the value collected and streamed by an earlier patch. It is bigger than the ones for propagating value ranges and known bits because we track constants both in parameters themselves and also

[PATCH 3/7] ipa-cp: Make dumping of widest_ints even more sane

2025-03-31 Thread Martin Jambor
This patch just introduces a form of dumping of widest ints that only have zeros in the lowest 128 bits so that instead of printing thousands of f's the output looks like: Bits: value = 0x, mask = all ones folled by 0x and then makes sure we use the fun

[PATCH 0/7] Fix PRs 118097, 118785 and 119318 by storing and streaming operation type

2025-03-31 Thread Martin Jambor
Hi, when looking at PR 119318 I have first written a simple fix along the lines of the fix for PR 118097 and PR 118785, i.e. without storing the type in which we perform the operation encoded in an arithmetic jump function but relying on expr_type_first_operand_type_p instead. It however became c

[PATCH 2/7] ipa-cp: Make propagation of bits in IPA-CP aware of type conversions (PR119318)

2025-03-31 Thread Martin Jambor
After the propagation of constants and value ranges, it turns out that the propagation of known bits also needs to be made aware of any intermediate types in which any arithmetic operations are made and must limit its precision there. This implements just that, using the newly collected and stream

[PATCH 1/7] ipa: Record and stream result types of arithemetic jump functions

2025-03-31 Thread Martin Jambor
In order to replace the use of somewhat unweildy expr_type_first_operand_type_p we need to record and stream the types of results of operations recorded in arithmetic jump functions. This is necessary so that we can then simulate them at the IPA stage with the corresponding precision and signednes

  1   2   >