[PATCH v2 1/2] RISC-V: avoid LUI based const materialization ... [part of PR/106265]

2024-05-13 Thread Vineet Gupta
Apologies for the delay in getting this out. Needed to fix one ICE with glibc build and fresh round of testing: both testsuite and SPEC runs (which are similar to v1 in terms of Cactu gains, but some more minor regressions elsewhere gcc). Again those seem so small that IMHO this should still go

[PATCH v2 2/2] RISC-V: avoid LUI based const mat in prologue/epilogue expansion [PR/105733]

2024-05-13 Thread Vineet Gupta
If the constant used for stack offset can be expressed as sum of two S12 values, the constant need not be materialized (in a reg) and instead the two S12 bits can be added to instructions involved with frame pointer. This avoids burning a register and more importantly can often get down to be 2

[PATCH v2 0/2] RISC-V improve stack/array access by constant mat tweak

2024-05-13 Thread Vineet Gupta
Hi, This set of patches help improve stack/array accesses by improving constant materialization. Details are in respective patches. The first patch is the main change which improves SPEC cactu by 10%. As discussed/agreed for v1 [1], I've dropped the splitter variant for stack accesses. I also

Re: [PATCH] rs6000: Enable overlapped by-pieces operations

2024-05-13 Thread Kewen.Lin
Hi, on 2024/5/9 15:35, HAO CHEN GUI wrote: > Hi Kewen, > Thanks for your comments. > > 在 2024/5/9 13:44, Kewen.Lin 写道: >> Hi, >> >> on 2024/5/8 14:47, HAO CHEN GUI wrote: >>> Hi, >>> This patch enables overlapped by-piece operations. On rs6000, default >>> move/set/clear ratio is 2. So the

Re: [COMMITTED 2/5] Fix ranger when called from SCEV.

2024-05-13 Thread Jan-Benedict Glaw
On Mon, 2024-05-13 20:19:42 +0200, Jan-Benedict Glaw wrote: > On Tue, 2024-04-30 17:24:15 -0400, Andrew MacLeod wrote: > > Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed. > > Starting with this patch (upstream as > e8ae56a7dc46e39a48017bb5159e4dc672ec7fad, can still be

Re: [COMMITTED 2/5] Fix ranger when called from SCEV.

2024-05-13 Thread Jan-Benedict Glaw
On Tue, 2024-04-30 17:24:15 -0400, Andrew MacLeod wrote: > Bootstrapped on x86_64-pc-linux-gnu with no regressions.  pushed. Starting with this patch (upstream as e8ae56a7dc46e39a48017bb5159e4dc672ec7fad, can still be reproduced with 0c585c8d0dd85601a8d116ada99126a48c8ce9fd as of May 13th), my

Re: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar

2024-05-13 Thread Jeff Law
On 5/13/24 9:00 AM, Li, Pan2 wrote: Committed, thanks Juzhe and Kito. Let's wait for a while before backport to 14. Could you fix the formatting nits caught by the CI linter? === ERROR type #1: trailing operator (4 error(s)) === gcc/config/riscv/riscv-vector-builtins.cc:4641:39: if ((exts

[COMMITTED][GCC12] Backport of 111009 patch.

2024-05-13 Thread Andrew MacLeod
Same patch for gcc12. bootstraps and passes all tests on x86_64-pc-linux-gnu On 5/9/24 10:32, Andrew MacLeod wrote: As requested, backported the patch for 111009 to resolve incorrect ranges from addr_expr and committed to GCC 13 branch. bootstraps and passes all tests on x86_64-pc-linux-gnu

[COMMITTED] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
Pushed as obvious. -- >8 -- This patch fixes a compilation error when building GCC using Clang. Since __array_rank is used as a built-in trait name, use rank instead. PR c++/115061 gcc/cp/ChangeLog: * semantics.cc (finish_trait_expr): Use rank instead of __array_rank.

Re: [PATCH] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
On Mon, May 13, 2024 at 8:19 AM Marek Polacek wrote: > > On Sun, May 12, 2024 at 11:48:07PM -0700, Ken Matsui wrote: > > This patch fixes a compilation error when building GCC using Clang. > > Since __array_rank is used as a built-in trait name, use rank instead. > > I think you can go ahead and

[r15-429 Regression] FAIL: experimental/simd/pr109261_constexpr_simd.cc -msse2 -O2 -Wno-psabi (test for excess errors) on Linux/x86_64

2024-05-13 Thread haochen.jiang
On Linux/x86_64, fb1649f8b4ad5043dd0e65e4e3a643a0ced018a9 is the first bad commit commit fb1649f8b4ad5043dd0e65e4e3a643a0ced018a9 Author: Matthias Kretz Date: Mon May 6 12:13:55 2024 +0200 libstdc++: Use __builtin_shufflevector for simd split and concat caused FAIL:

Re: [PATCH v1 3/3] RISC-V: Enable vectorizable early exit test

2024-05-13 Thread Robin Dapp
Hi Pan, > > @@ -4114,6 +4115,7 @@ proc check_effective_target_vect_early_break_hw { } { > || [check_effective_target_arm_v8_neon_hw] > || [check_sse4_hw_available] > || [istarget amdgcn-*-*] > + || [check_effective_target_riscv_v] > }}] > } I believe this should be

[PATCH] Match: optimize `a == CST & unary(a)` [PR111487]

2024-05-13 Thread Andrew Pinski
This is an expansion of the optimize `a == CST & a` to handle more than just casts. It adds optimization for unary. The patch for binary operators will come later. Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/111487 gcc/ChangeLog: *

Re: [Patch, aarch64] v3: Preparatory patch to place target independent and,dependent changed code in one file

2024-05-13 Thread Alex Coplan
Hi Ajit, Why did you send three mails for this revision of the patch? If you're going to send a new revision of the patch you should increment the version number and outline the changes / reasons for the new revision. Mostly the comments below are just style nits and things you missed from the

[pushed][PR115013][LRA]: Modify register starvation recognition

2024-05-13 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115013 Successfully tested and bootstrapped on x86-64. commit 44430ef3d8ba75692efff5f6969d5610134566d3 Author: Vladimir N. Makarov Date: Mon May 13 10:12:11 2024 -0400 [PR115013][LRA]: Modify register starvation

Re: [PATCH] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Marek Polacek
On Sun, May 12, 2024 at 11:48:07PM -0700, Ken Matsui wrote: > This patch fixes a compilation error when building GCC using Clang. > Since __array_rank is used as a built-in trait name, use rank instead. I think you can go ahead and push this patch as obvious, thanks. > PR c++/115061 > >

RE: [PATCH v1 1/3] Vect: Support loop len in vectorizable early exit

2024-05-13 Thread Tamar Christina
> -Original Message- > From: pan2...@intel.com > Sent: Monday, May 13, 2024 3:54 PM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com; > Tamar Christina ; Richard Sandiford > ; Pan Li > Subject: [PATCH v1 1/3] Vect: Support loop

RE: [PATCH v4 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-13 Thread Tamar Christina
> > Thanks Tamer for comments. > > > I think OPTIMIZE_FOR_BOTH is better here, since this is a win also when > optimizing for size. > > Sure thing, let me update it in v5. > > > Hmm why do you iterate independently over the statements? The block below > already visits > > Every statement

RE: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar

2024-05-13 Thread Li, Pan2
Committed, thanks Juzhe and Kito. Let's wait for a while before backport to 14. Pan -Original Message- From: Kito Cheng Sent: Monday, May 13, 2024 10:11 PM To: juzhe.zh...@rivai.ai Cc: Li, Pan2 ; gcc-patches Subject: Re: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16

[PATCH v1 3/3] RISC-V: Enable vectorizable early exit test

2024-05-13 Thread pan2 . li
From: Pan Li This patch depends on below 2 patches. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651459.html https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651460.html After we supported vectorizable early exit in RISC-V, we would like to enable the gcc vect test for vectorizable

[PATCH v1 2/3] RISC-V: Implement vectorizable early exit with vcond_mask_len

2024-05-13 Thread pan2 . li
From: Pan Li This patch depends on below middle-end implementation. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651459.html After we support the loop lens for the vectorizable, we would like to implement the feature for the RISC-V target. Given below example: unsigned vect_a[1923];

[PATCH v1 1/3] Vect: Support loop len in vectorizable early exit

2024-05-13 Thread pan2 . li
From: Pan Li This patch adds early break auto-vectorization support for target which use length on partial vectorization. Consider this following example: unsigned vect_a[802]; unsigned vect_b[802]; void test (unsigned x, int n) {  for (int i = 0; i < n; i++)  {    vect_b[i] = x + i;    

Re: [PATCH v2 2/3] diagnostics: Don't hardcode auto_enable_urls to false for mingw hosts

2024-05-13 Thread Peter0x44
13 May 2024 1:30:28 pm NightStrike : On Thu, May 9, 2024 at 1:03 PM Peter Damianov wrote: Windows terminal and mintty both have support for link escape sequences, and so auto_enable_urls shouldn't be hardcoded to false. For older versions of the windows console, mingw_ansi_fputs's console

Re: [PATCH] internal-fn: Do not force vcond operand to reg.

2024-05-13 Thread Richard Biener
On Mon, May 13, 2024 at 4:14 PM Robin Dapp wrote: > > > What happens if we simply remove all of the force_reg here? > > On x86 I bootstrapped and tested the attached without fallout > (gcc188, so it's no avx512-native machine and therefore limited > coverage). riscv regtest is unchanged. > For

Re: [PATCH] internal-fn: Do not force vcond operand to reg.

2024-05-13 Thread Robin Dapp
> What happens if we simply remove all of the force_reg here? On x86 I bootstrapped and tested the attached without fallout (gcc188, so it's no avx512-native machine and therefore limited coverage). riscv regtest is unchanged. For aarch64 I would to rely on the pre-commit CI to pick it up (does

Re: [PATCH v1] RISC-V: Bugfix ICE for RVV intrinisc vfw on _Float16 scalar

2024-05-13 Thread Kito Cheng
LGTM as well :) On Sat, May 11, 2024 at 3:58 PM juzhe.zh...@rivai.ai wrote: > > LGTM from my side. Wait for kito chime in. > > > juzhe.zh...@rivai.ai > > > From: pan2.li > Date: 2024-05-11 15:54 > To: gcc-patches > CC: juzhe.zhong; kito.cheng; Pan Li > Subject:

Re: [EXTERNAL] [COMMITTED] Regenerate cygming.opt.urls and mingw.opt.urls

2024-05-13 Thread David Malcolm
On Mon, 2024-05-13 at 09:42 -0400, David Malcolm wrote: > On Mon, 2024-05-13 at 11:14 +0200, Mark Wielaard wrote: > > Hi Evgeny, > > > > Adding David to the CC, who might know the details. > > > > On Mon, May 13, 2024 at 08:44:12AM +, Evgeny Karpov wrote: > > > Sunday, May 12, 2024 > > > >

Re: [EXTERNAL] [COMMITTED] Regenerate cygming.opt.urls and mingw.opt.urls

2024-05-13 Thread David Malcolm
On Mon, 2024-05-13 at 11:14 +0200, Mark Wielaard wrote: > Hi Evgeny, > > Adding David to the CC, who might know the details. > > On Mon, May 13, 2024 at 08:44:12AM +, Evgeny Karpov wrote: > > Sunday, May 12, 2024 > > > > Thank you for reviewing our changes related to the refactoring of > >

RE: [PATCH v4 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-13 Thread Li, Pan2
Thanks Tamer for comments. > I think OPTIMIZE_FOR_BOTH is better here, since this is a win also when > optimizing for size. Sure thing, let me update it in v5. > Hmm why do you iterate independently over the statements? The block below > already visits > Every statement doesn't it? Because

Re: [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993]

2024-05-13 Thread Joseph Myers
On Mon, 13 May 2024, Kewen.Lin wrote: > > In fact replacing all of X_TYPE_SIZE with a single hook might be worthwhile > > though this removes the "convenient" defaulting, requiring each target to > > enumerate all standard C ABI type modes. But that might be also a good > > thing. > > > > I

[PATCH] PR60276 fix for single-lane SLP

2024-05-13 Thread Richard Biener
When enabling single-lane SLP and not splitting groups the fix for PR60276 is no longer effective since it for unknown reason exempted pure SLP. The following removes this exemption, making gcc.dg/vect/pr60276.c PASS even with --param vect-single-lane-slp=1 Bootstrapped and tested on

Re: [PATCH v2 2/3] diagnostics: Don't hardcode auto_enable_urls to false for mingw hosts

2024-05-13 Thread Peter0x44
13 May 2024 1:30:28 pm NightStrike : On Thu, May 9, 2024 at 1:03 PM Peter Damianov wrote: Windows terminal and mintty both have support for link escape sequences, and so auto_enable_urls shouldn't be hardcoded to false. For older versions of the windows console, mingw_ansi_fputs's console

Re: [PATCH v2 2/3] diagnostics: Don't hardcode auto_enable_urls to false for mingw hosts

2024-05-13 Thread NightStrike
On Thu, May 9, 2024 at 1:03 PM Peter Damianov wrote: > > Windows terminal and mintty both have support for link escape sequences, and > so > auto_enable_urls shouldn't be hardcoded to false. For older versions of the > windows console, mingw_ansi_fputs's console API translation logic does mangle

Re: [PATCH] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]

2024-05-13 Thread Rainer Orth
Hi Nathaniel, >> > There are a couple of other tests that appear to potentially have a >> > similar issue: >> > >> > global-2_a.C >> > 21:// { dg-final { scan-lang-dump-not {Reachable GMF '::printf[^\n']*' >> > added} module } } >> > >> > global-3_a.C >> > 15:// { dg-final { scan-lang-dump-not

Re: [PATCH] report message for operator %a on unaddressible exp

2024-05-13 Thread Kewen.Lin
Hi, on 2024/5/13 10:57, Jiufu Guo wrote: > Hi, > > For PR96866, when gcc print asm code for modifier "%a" which requires > an address operand, while the operand is with the constraint "X" which > allow non-address form. An error message would be reported to indicate > the invalid asm operands.

Re: [PATCH] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]

2024-05-13 Thread Nathaniel Shead
On Mon, May 13, 2024 at 01:59:51PM +0200, Rainer Orth wrote: > Hi Nathaniel, > > > On Mon, May 13, 2024 at 10:40:30AM +0200, Rainer Orth wrote: > >> g++.dg/modules/stdio-1_a.H currently FAILs on Solaris: > >> > >> FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module > >> "Depset:0

Re: [PATCH] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]

2024-05-13 Thread Rainer Orth
Hi Nathaniel, > On Mon, May 13, 2024 at 10:40:30AM +0200, Rainer Orth wrote: >> g++.dg/modules/stdio-1_a.H currently FAILs on Solaris: >> >> FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module "Depset:0 >> decl entity:[0-9]* function_decl:'::printf'" >> FAIL:

[PATCH][14 backport] c++: Fix instantiation of imported temploid friends [PR114275]

2024-05-13 Thread Nathaniel Shead
> > @@ -11751,9 +11767,16 @@ tsubst_friend_class (tree friend_tmpl, tree args) > > if (tmpl != error_mark_node) > > { > > /* The new TMPL is not an instantiation of anything, so we > > -forget its origins. We don't reset CLASSTYPE_TI_TEMPLATE > > +forget its

Re: [PATCH] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]

2024-05-13 Thread Nathaniel Shead
On Mon, May 13, 2024 at 10:40:30AM +0200, Rainer Orth wrote: > g++.dg/modules/stdio-1_a.H currently FAILs on Solaris: > > FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module "Depset:0 > decl entity:[0-9]* function_decl:'::printf'" > FAIL: g++.dg/modules/stdio-1_a.H -std=c++2a

Re: [PATCHv2] Value range: Add range op for __builtin_isfinite

2024-05-13 Thread Aldy Hernandez
On Thu, May 9, 2024 at 10:05 AM Mikael Morin wrote: > > Hello, > > Le 07/05/2024 à 04:37, HAO CHEN GUI a écrit : > > Hi, > >The former patch adds isfinite optab for __builtin_isfinite. > > https://gcc.gnu.org/pipermail/gcc-patches/2024-April/649339.html > > > >Thus the builtin might not

Re: [PATCH] report message for operator %a on unaddressible exp

2024-05-13 Thread Segher Boessenkool
Hi! On Mon, May 13, 2024 at 10:57:12AM +0800, Jiufu Guo wrote: > For PR96866, when gcc print asm code for modifier "%a" which requires > an address operand, It requires a *memory* operand, and it outputs its address. This is a generic modifier btw (not rs6000). > while the operand is with the

Re: [PATCH] libstdc++: Use __builtin_shufflevector for simd split and concat

2024-05-13 Thread Jonathan Wakely
On Tue, 7 May 2024 at 14:42, Matthias Kretz wrote: > > Tested on x86_64-linux-gnu and aarch64-linux-gnu and with Clang 18 on x86_64- > linux-gnu. > > OK for trunk and backport(s)? OK for all. > > -- 8< > > Signed-off-by: Matthias Kretz > >

[PATCH] Refactor SLP reduction group discovery

2024-05-13 Thread Richard Biener
The following refactors a bit how we perform SLP reduction group discovery possibly making it easier to have multiple reduction groups later, esp. with single-lane SLP. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-slp.cc (vect_analyze_slp_instance): Remove

RE: [PATCH] Allow patterns in SLP reductions

2024-05-13 Thread Richard Biener
On Mon, 13 May 2024, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 10, 2024 2:07 PM > > To: Richard Biener > > Cc: gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] Allow patterns in SLP reductions > > > > On Fri, Mar 1, 2024 at 10:21 AM

Re: [PATCH] c++: Optimize in maybe_clone_body aliases even when not at_eof [PR113208]

2024-05-13 Thread Jakub Jelinek
On Fri, May 10, 2024 at 03:59:25PM -0400, Jason Merrill wrote: > > 2024-05-09 Jakub Jelinek > > Jason Merrill > > > > PR lto/113208 > > * cp-tree.h (maybe_optimize_cdtor): Remove. > > * decl2.cc (tentative_decl_linkage): Call maybe_make_one_only > > for implicit

RE: [PATCH] Allow patterns in SLP reductions

2024-05-13 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 10, 2024 2:07 PM > To: Richard Biener > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] Allow patterns in SLP reductions > > On Fri, Mar 1, 2024 at 10:21 AM Richard Biener wrote: > > > > The following removes the

Re: [EXTERNAL] [COMMITTED] Regenerate cygming.opt.urls and mingw.opt.urls

2024-05-13 Thread Mark Wielaard
Hi Evgeny, Adding David to the CC, who might know the details. On Mon, May 13, 2024 at 08:44:12AM +, Evgeny Karpov wrote: > Sunday, May 12, 2024 > > Thank you for reviewing our changes related to the refactoring of > extracting the MinGW implementation from ix64. > > It was expected to move

RE: [PATCH v4 2/3] VECT: Support new IFN SAT_ADD for unsigned vector int

2024-05-13 Thread Tamar Christina
Hi Pan, > -Original Message- > From: pan2...@intel.com > Sent: Monday, May 6, 2024 3:49 PM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; > hongtao@intel.com; Pan Li > Subject: [PATCH v4 2/3] VECT:

RE: [PATCH v4 1/3] Internal-fn: Support new IFN SAT_ADD for unsigned scalar int

2024-05-13 Thread Tamar Christina
Hi Pan, > -Original Message- > From: pan2...@intel.com > Sent: Monday, May 6, 2024 3:48 PM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; > hongtao@intel.com; Pan Li > Subject: [PATCH v4 1/3]

Re: [pushed 00/21] Various backports to gcc 13 (analyzer, jit, diagnostics)

2024-05-13 Thread Jakub Jelinek
On Thu, May 09, 2024 at 01:42:15PM -0400, David Malcolm wrote: > I've pushed the following changes to releases/gcc-13 > as r13-8741-g89feb3557a0188 through r13-8761-gb7a2697733d19a. Unfortunately many of the commits contained git commit message wording that update_git_version can't cope with.

RE: [EXTERNAL] [COMMITTED] Regenerate cygming.opt.urls and mingw.opt.urls

2024-05-13 Thread Evgeny Karpov
Sunday, May 12, 2024 Mark Wielaard wrote: > The new cygming.opt.urls and mingw.opt.urls in the > gcc/config/mingw/cygming.opt.urls directory need to generated by make > regenerate-opt-urls in the gcc subdirectory. They still contained references > to > the gcc/config/i386 directory from which

[PATCH] testsuite: c++: Allow for std::printf in g++.dg/modules/stdio-1_a.H [PR98529]

2024-05-13 Thread Rainer Orth
g++.dg/modules/stdio-1_a.H currently FAILs on Solaris: FAIL: g++.dg/modules/stdio-1_a.H -std=c++17 scan-lang-dump module "Depset:0 decl entity:[0-9]* function_decl:'::printf'" FAIL: g++.dg/modules/stdio-1_a.H -std=c++2a scan-lang-dump module "Depset:0 decl entity:[0-9]*

[COMMITTED] ada: Attributes Put_Image and Object_Size are defined by Ada 2022

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Recognize references to attributes Put_Image and Object_Size as language-defined in Ada 2022 and implementation-defined in earlier versions of Ada. Other attributes listed in Ada 2022 RM, K.2 and currently implemented in GNAT are correctly categorized. This change only

[COMMITTED] ada: Fix crash on Compile_Time_Warning in dead code

2024-05-13 Thread Marc Poulhiès
From: Bob Duff If a pragma Compile_Time_Warning triggers, and the pragma is later removed because it is dead code, then the compiler can return a bad exit code. This causes gprbuild to report "*** compilation phase failed". This is because Total_Errors_Detected, which is declared as Nat, goes

[COMMITTED] ada: Refine type of a local variable

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_util.adb (Has_No_Output): Iteration with First_Formal/Next_Formal involves Entity_Ids. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 2 +- 1 file changed, 1

Re: [PATCH] tree-ssa-math-opts: Pattern recognize yet another .ADD_OVERFLOW pattern [PR113982]

2024-05-13 Thread Richard Biener
On Mon, 13 May 2024, Jakub Jelinek wrote: > Hi! > > We pattern recognize already many different patterns, and closest to the > requested one also >yc = (type) y; >zc = (type) z; >x = yc + zc; >w = (typeof_y) x; >if (x > max) > where y/z has the same unsigned type and type is

[COMMITTED] ada: Remove code that expected pre/post being split into conjuncts

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek The removed code is no longer needed (and causes assertion failures). Most likely it should have been using the Split_PPC flag. gcc/ada/ * sem_util.adb (Is_Potentially_Unevaluated): Remove code for recovering the original structure of expressions with AND

[COMMITTED] ada: Revert recent change for Put_Image and Object_Size attributes

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Recent change for attribute Object_Size caused spurious errors when restriction No_Implementation_Attributes is active and attribute Object_Size is introduced by expansion of dispatching operations. Temporarily revert that change for a further investigation. gcc/ada/

[COMMITTED] ada: Refactor repeated code for querying Boolean-valued aspects

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup following a fix for aspect Exclusive_Functions; semantics is unaffected. gcc/ada/ * exp_ch9.adb (Build_Protected_Subprogram_Body, Build_Protected_Subprogram_Call_Cleanup): Reuse refactored routine. * sem_util.adb

[COMMITTED] ada: Remove dynamic frame in System.Image_D and document it in System.Image_F

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou The former can easily be removed while the latter cannot. gcc/ada/ * libgnat/s-imaged.ads (System.Image_D): Add Uns formal parameter. * libgnat/s-imaged.adb: Add with clauses for System.Image_I, System.Value_I_Spec and System.Value_U_Spec.

[COMMITTED] ada: Remove guards against traversal of empty list of aspects

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek When iterating over Aspect_Specifications, we can use First/Next directly even if the Aspect_Specifications returns a No_List or the list has no items. Code cleanup. gcc/ada/ * aspects.adb (Copy_Aspects): Style fix. * contracts.adb (Analyze_Contracts):

[COMMITTED] ada: Deconstruct unused flag Is_Expanded_Contract

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Flag Is_Expanded_Contract was introduced together with N_Contract field (when implementing freezing of contracts), but was never actually used. gcc/ada/ * gen_il-fields.ads (Opt_Field_Enum): Remove Is_Expanded_Contract from the list of flags. *

[COMMITTED] ada: Move Init_Proc_Level_Formal from Exp_Ch3 to Exp_Util

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou This makes it possible to remove clauses from the Accessibility package. gcc/ada/ * accessibility.adb: Remove clauses for Exp_Ch3. * exp_ch3.ads (Init_Proc_Level_Formal): Move declaration to... * exp_ch3.adb (Init_Proc_Level_Formal): Move body to...

[COMMITTED] ada: Move splitting of pre/post aspect expressions to expansion

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek We split expressions of pre/post aspects into individual conjuncts and emit messages with their precise location when they fail at runtime. This was done when processing the aspects and caused inefficiency when the original expression had to be recovered to detects uses of

[COMMITTED] ada: Complete implementation of Ada 2022 aspect Exclusive_Functions

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Extend implementation of RM 9.5.1(7/4), which now applies also to protected function if the protected type has aspect Exclusive_Functions. gcc/ada/ * exp_ch9.adb (Build_Protected_Subprogram_Call_Cleanup): If aspect Exclusive_Functions is present then the

[COMMITTED] ada: Deconstruct flag Split_PPC since splitting now is done in expansion

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Remove flag Split_PPC and all its uses. gcc/ada/ * contracts.adb (Append_Enabled_Item): Remove use of Split_PPC; simplify. * gen_il-fields.ads (Opt_Field_Enum): Remove flag definition. * gen_il-gen-gen_nodes.adb (N_Aspect_Specification,

[COMMITTED] ada: Avoid crash on illegal constrained type declarations

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Fix crash on ACATS test B38003B introduced by a recent cleanup of per-object constraints. gcc/ada/ * sem_util.adb (Get_Index_Bounds): Guard against missing Entity, which happens on illegal constrained type declaration. Tested on x86_64-pc-linux-gnu,

[COMMITTED] ada: Fix style in comments

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * contracts.adb (Inherit_Subprogram_Contract): Fix style. * sem_ch5.adb (Analyze_Iterator_Specification): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/contracts.adb | 2 +- gcc/ada/sem_ch5.adb | 2 +-

[COMMITTED] ada: Decouple finalization masters from storage pools

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou The coupling came from the build-in-place protocol but is now unnecessary because the storage pool reference is always passed along with the master reference in this protocol. No functional changes. gcc/ada/ * exp_ch3.adb (Build_Heap_Or_Pool_Allocator): Use the

[COMMITTED] ada: Rename finalization scope masters into finalization masters

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou Now that what was previously called "finalization master" has been renamed into "finalization collection" in the front-end, we can also rename what was initially called "finalization scope master" into "finalization master". These entities indeed drive the finalization of

[COMMITTED] ada: Replace finalization masters with finalization collections

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou This change replaces finalization masters with finalization collections in most cases, that is to say, when they implement a list of objects created by allocators of a given access type; indeed the moniker is overloaded in the front-end, e.g. Sem_Util.Is_Master determines if

[COMMITTED] ada: Restore fix for controlled dynamic allocation with BIP function call

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou The resolution made some time ago had been that a dynamic allocation for a limited type that needs finalization with a function call as expression always needs to be done in the called function, even if the limited type has a known size. But the fix implementing this

[COMMITTED] ada: Couple of comment tweaks to latest change

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou This replaces a few remaining references to "master" by "collection" and makes a couple of additional tweaks in comments. gcc/ada/ * libgnat/s-finpri.adb (Finalize): Replace "master" by "collection" in comments and add a comment about the form of the loop.

[COMMITTED] ada: Remove deprecated VxWorks interrupt connection API

2024-05-13 Thread Marc Poulhiès
From: Ashley Gay The VxWorks 7 API to use hardware interrupts is the VxBus subsystem. GNAT API still provides bindings for the deprecated (VxWorks 6) routines. A direct consequence of this change is that Attach_Handler cannot be used anymore (the VxBus subsystem should be used instead). This

[COMMITTED] ada: Fix pragma Compile_Time_Error for alignment of array types

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou The pragma is consistenly rejected for the alignment of array types because Eval_Attribute does not evaluate it even if it is known. gcc/ada/ * sem_attr.adb (Eval_Attribute): Treat Alignment like Component_Size for array types. Tested on

[COMMITTED] ada: Recognize pragma Lock_Free as specific to GNAT

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Pramga Lock_Free must be recognized as implementation-defined. gcc/ada/ * sem_prag.adb (Analyze_Pragma): When processing pragma Lock_Free, check if restriction No_Implementation_Pragmas is enabled. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED] ada: Rewrite Append_Entity_Name; skip irrelevant names

2024-05-13 Thread Marc Poulhiès
From: Bob Duff This patch rewrites Append_Entity_Name, both for maintainability and to improve user messages. The main issue was that the recursion stopped when the enclosing scope is the wrapper created in case of postconditions with 'Old. This caused different results depending on the

[COMMITTED] ada: Simplify uses of readdir_gnat with object overlay

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; behavior is unaffected. gcc/ada/ * libgnat/a-direct.adb (Start_Search_Internal): Combine subtype and object declaration. * libgnat/g-dirope.adb (Read): Replace convoluted unchecked conversion with an overlay. Tested on

[COMMITTED] ada: Enable casing on composite via -X0 instead of -X

2024-05-13 Thread Marc Poulhiès
From: Steve Baird Move case statement pattern matching out of the curated language extension set and into the extended set. gcc/ada/ * sem_case.adb: Replace all tests of Core_Extensions_Allowed with corresponding tests of All_Extensions_Allowed. * sem_ch5.adb: Likewise.

[COMMITTED] ada: Fix internal error with Put_Image aspect on access-to-class-wide type

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou This occurs with an instantiation of Ada.Containers.Vectors in a nested package on an access-to-class-wide type declared with the Put_Image aspect because of too late a freezing for the internal renaming generated for the Put_Image procedure. The change freezes this renaming

[COMMITTED] ada: Small cleanup in the BIP machinery

2024-05-13 Thread Marc Poulhiès
From: Eric Botcazou This avoids creating Null nodes when they are not used in the end and makes the implementation of Add_Finalization_Master_Actual_To_Build_In_Place_Call more consistent with that of its sibling routines. No functional changes. gcc/ada/ * exp_ch6.adb

[COMMITTED] ada: Compiler crash on nonstatic container aggregates for Doubly_Linked_Lists

2024-05-13 Thread Marc Poulhiès
From: Gary Dismukes The compiler was crashing on container aggregates for the List type coming from an instantiation of Ada.Containers.Doubly_Linked_Lists when the aggregate has more than one iterated_element_association with nonstatic range bounds. As part of addressing this, it was noticed

[COMMITTED] ada: Refactor GNAT.Directory_Operations.Read to minimise runtime checks

2024-05-13 Thread Marc Poulhiès
From: Piotr Trojanek Array assignments are likely more efficient than element-by-element copying; in particular, they avoid constraints checks in every iteration of a loop (when the runtime is compiled with checks enabled). A cleanup and improvement opportunity spotted while working on improved

Re: Fix gnu versioned namespace mode 00/03

2024-05-13 Thread Jonathan Wakely
On Mon, 13 May 2024, 07:30 Iain Sandoe, wrote: > > > > On 13 May 2024, at 06:06, François Dumont wrote: > > > > > > On 07/05/2024 18:15, Iain Sandoe wrote: > >> Hi François > >> > >>> On 4 May 2024, at 22:11, François Dumont wrote: > >>> > >>> Here is the list of patches to restore gnu

[PATCH] tree-ssa-math-opts: Pattern recognize yet another .ADD_OVERFLOW pattern [PR113982]

2024-05-13 Thread Jakub Jelinek
Hi! We pattern recognize already many different patterns, and closest to the requested one also yc = (type) y; zc = (type) z; x = yc + zc; w = (typeof_y) x; if (x > max) where y/z has the same unsigned type and type is a wider unsigned type and max is maximum value of the narrower

Re: [PATCH] internal-fn: Do not force vcond operand to reg.

2024-05-13 Thread Richard Biener
On Mon, May 13, 2024 at 8:18 AM Robin Dapp wrote: > > > How does this make a difference in the end? I'd expect say forwprop to > > fix things? > > In general we try to only add the masking "boilerplate" of our > instructions at split time so fwprop, combine et al. can do their > work uninhibited

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-13 Thread Richard Biener
On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > As testcase in the PR, O3 cunrolli may prevent vectorization for the > innermost loop and increase register pressure. > The patch removes the 1/3 reduction of unr_insn for innermost loop for UL_ALL. > ul != UR_ALL is needed since some small loop

Re: [PATCH] Fortran: improve attribute conflict checking [PR93635]

2024-05-13 Thread Mikael Morin
Le 10/05/2024 à 21:56, Harald Anlauf a écrit : Am 10.05.24 um 21:48 schrieb Harald Anlauf: Hi Mikael, Am 10.05.24 um 11:45 schrieb Mikael Morin: Le 09/05/2024 à 22:30, Harald Anlauf a écrit : I'll stop here... Thanks. Go figure, I have no problem reproducing today. It's PR99798 (and there

Re: [PATCH 1/4] rs6000: Make all 128 bit scalar FP modes have 128 bit precision [PR112993]

2024-05-13 Thread Richard Biener
On Mon, May 13, 2024 at 3:39 AM Kewen.Lin wrote: > > Hi Joseph and Richi, > > Thanks for the suggestions and comments! > > on 2024/5/10 14:31, Richard Biener wrote: > > On Thu, May 9, 2024 at 9:12 PM Joseph Myers wrote: > >> > >> On Wed, 8 May 2024, Kewen.Lin wrote: > >> > >>> to widen IFmode to

Re: gcc/DATESTAMP wasn't updated since 20240507

2024-05-13 Thread Rainer Orth
Richard Biener writes: > On Thu, 9 May 2024, Jakub Jelinek wrote: > >> On Thu, May 09, 2024 at 12:14:43PM +0200, Jakub Jelinek wrote: >> > On Thu, May 09, 2024 at 12:04:38PM +0200, Rainer Orth wrote: >> > > I just noticed that gcc/DATESTAMP wasn't updated yesterday and today, >> > > staying at

[PATCH] c++: Avoid using __array_rank as a variable name [PR115061]

2024-05-13 Thread Ken Matsui
This patch fixes a compilation error when building GCC using Clang. Since __array_rank is used as a built-in trait name, use rank instead. PR c++/115061 gcc/cp/ChangeLog: * semantics.cc (finish_trait_expr): Use rank instead of __array_rank. Signed-off-by: Ken Matsui

Re: Fix gnu versioned namespace mode 00/03

2024-05-13 Thread Iain Sandoe
> On 13 May 2024, at 06:06, François Dumont wrote: > > > On 07/05/2024 18:15, Iain Sandoe wrote: >> Hi François >> >>> On 4 May 2024, at 22:11, François Dumont wrote: >>> >>> Here is the list of patches to restore gnu versioned namespace mode. >>> >>> 1/3: Bump gnu version namespace >>>

Re: [PATCH 1/13] rs6000, Remove __builtin_vsx_cmple* builtins

2024-05-13 Thread Kewen.Lin
Hi, on 2024/4/20 05:16, Carl Love wrote: > > rs6000, Remove __builtin_vsx_cmple* builtins > > The built-ins __builtin_vsx_cmple_u16qi, __builtin_vsx_cmple_u2di, > __builtin_vsx_cmple_u4si and __builtin_vsx_cmple_u8hi should take > unsigned arguments and return an unsigned result. The current

Re: [PATCH] internal-fn: Do not force vcond operand to reg.

2024-05-13 Thread Robin Dapp
> How does this make a difference in the end? I'd expect say forwprop to > fix things? In general we try to only add the masking "boilerplate" of our instructions at split time so fwprop, combine et al. can do their work uninhibited of it (and we don't need numerous (if_then_else ...

Re: Fix gnu versioned namespace mode 00/03

2024-05-12 Thread François Dumont
On 07/05/2024 18:15, Iain Sandoe wrote: Hi François On 4 May 2024, at 22:11, François Dumont wrote: Here is the list of patches to restore gnu versioned namespace mode. 1/3: Bump gnu version namespace This is important to be done first so that once build of gnu versioned namespace is

[to-be-committed] [RISC-V] Improve single inverted bit extraction - v3

2024-05-12 Thread Jeff Law
The only change in v2 vs v3 is testsuite adjustments for the updated sequences and fixing the name of the second pattern. -- So this patch fixes a minor code generation inefficiency that (IIRC) the RAU team discovered a while ago in spec. If we want the inverted value of a single bit we

[PATCH][_Hashtable] Fix some implementation inconsistencies

2024-05-12 Thread François Dumont
    libstdc++: [_Hashtable] Fix some implementation inconsistencies     Get rid of the different usages of the mutable keyword except in     _Prime_rehash_policy where it is preserved for abi compatibility reason.     Fix comment to explain that we need the computation of bucket index

[PATCH] c++/modules: Remember that header units have CMIs

2024-05-12 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- This appears to be an oversight in the definition of module_has_cmi_p; this comes up transitively in other functions used for e.g. determining whether a name could potentially be accessed in a different translation unit.

[PATCH] report message for operator %a on unaddressible exp

2024-05-12 Thread Jiufu Guo
Hi, For PR96866, when gcc print asm code for modifier "%a" which requires an address operand, while the operand is with the constraint "X" which allow non-address form. An error message would be reported to indicate the invalid asm operands. Bootstrap pass on ppc64{,le}. Is this ok for trunk?

MAINTAINERS: Add myself to write after approval

2024-05-12 Thread Xiao Zeng
ChangeLog: * MAINTAINERS: Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 71e02abc426..361059fd55c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -738,6 +738,7 @@ Kwok Cheung Yeung Greta Yorsh

  1   2   3   4   5   6   7   8   9   10   >