[COMMITTED 1/9] pru: Implement TARGET_ADDRESS_COST

2024-05-07 Thread Dimitar Dimitrov
Stop relying on the default fallback to TARGET_RTX_COST for PRU's addressing costs. Implement TARGET_ADDRESS_COST, in order to allow RTX cost refactoring in the future without affecting the addressing costs. No code generation changes are expected by this patch. No changes were detected when run

[COMMITTED 0/9] Small cleanups and improvements for PRU backend

2024-05-07 Thread Dimitar Dimitrov
This patch set includes small cleanups and code generation improvements I implemented during stages 3 and 4. All patches have been regression-tested individually for pru-unknown-elf while being developed. And the entire set was tested again on GCC 15 mainline. Dimitar Dimitrov (9): pru: Implem

[COMMITTED 2/9] pru: Implement zero fill for 64-bit registers

2024-05-07 Thread Dimitar Dimitrov
Loading a constant zero in a 64-bit register now takes one instead of two instructions. gcc/ChangeLog: * config/pru/pru.md: New pattern alternative for zero-filling 64-bit registers. gcc/testsuite/ChangeLog: * gcc.target/pru/mov-0.c: New test. Signed-off-by: Dimitar Dim

[COMMITTED 3/9] pru: Optimize the extzv and insv patterns

2024-05-07 Thread Dimitar Dimitrov
Optimize the generated code for the bit-field extract and insert patterns: - Use bit-set and bit-clear instructions for 1-bit fields. - Expand to SImode operations instead of relying on the default expansion to word (QI) mode. gcc/ChangeLog: * config/pru/pru.md (extzv): Make it an

[COMMITTED 8/9] pru: Refactor to use passes definition file

2024-05-07 Thread Dimitar Dimitrov
Switch to using a passes definition file instead of explicitly registering the PRU-specific passes in pru.cc. This would make it cleaner to add new PRU-specific passes. There are no functional changes. gcc/ChangeLog: * config/pru/pru-passes.cc (class pass_tiabi_check): Rename to

[COMMITTED 5/9] pru: Skip register save if function will not return

2024-05-07 Thread Dimitar Dimitrov
There is no need to store callee-saved registers in prologue if the function would never return. Size optimization is paramount for the microcontroller-class PRU. Some backends save some registers for noreturn functions. But for PRU debuggability is a less concern because GDB has not been ported

[COMMITTED 4/9] pru: Add pattern variants for zero extending destination

2024-05-07 Thread Dimitar Dimitrov
The higher bits in the result of some ALU operations are inherently always zero when all input operands are smaller than 32-bits. Add pattern variants to match when the resulting value is zero extended, so that all operations can be effectively executed in a single instruction. For PRU it simply

[COMMITTED 6/9] pru: Drop usage of ATTRIBUTE_UNUSED

2024-05-07 Thread Dimitar Dimitrov
Remove usage of ATTRIBUTE_UNUSED. Instead remove the argument's name, which in C++ means that the argument would not be used. gcc/ChangeLog: * config/pru/pru-passes.cc: Drop ATTRIBUTE_UNUSED and remove argument's name. * config/pru/pru-pragma.cc (pru_pragma_ctable_entry):

[COMMITTED 9/9] pru: New validation pass for minrt

2024-05-07 Thread Dimitar Dimitrov
Add a new pru-specific pass to validate that the assumptions for the minimal C runtime are not violated by the user program. gcc/ChangeLog: * config/pru/pru-passes.cc (class pass_pru_minrt_check): New pass. (pass_pru_minrt_check::execute): New method. (make_pru_min

[COMMITTED 7/9] pru: Use HOST_WIDE_INT_1U macro

2024-05-07 Thread Dimitar Dimitrov
Use the HOST_WIDE_INT_1U macro instead of literal 1 when constructing constants for RTL. gcc/ChangeLog: * config/pru/pru.md (lshrdi3): Use HOST_WIDE_INT_1U macro. (ashldi3): Ditto. Signed-off-by: Dimitar Dimitrov --- gcc/config/pru/pru.md | 6 -- 1 file changed, 4 insertion

GCC 14.1.1 Status Report (2024-05-07)

2024-05-07 Thread Richard Biener
Status == The GCC 14.1 release tarballs have been created, the releases/gcc-14 branch is open again for regression and documentation bugfixing. GCC 14.2 can be expected in about two months unless something serious changes the plans. Quality Data Priority # Change fro

[COMMITTED] ada: Fix bug in overloaded selected_components in aspect_specifications

2024-05-07 Thread Marc Poulhiès
From: Bob Duff This patch fixes a bug where if a selected_component X.Y appears in an aspect_specification, and there are two or more overloaded Y's in X, then it can choose the wrong one, leading to subsequent type errors. It was always picking the last declaration of Y, and leaving Entity set t

[COMMITTED] ada: Fix spurious error on generic state in SPARK

2024-05-07 Thread Marc Poulhiès
From: Yannick Moy The public state of a generic package needs not be part of the state of the enclosing unit, only the state of instantiations need to be accounted for in the enclosing package. Now fixed. gcc/ada/ * sem_util.adb (Find_Placement_In_State_Space): Stop search for p

[COMMITTED] ada: Minor comment improvement

2024-05-07 Thread Marc Poulhiès
From: Bob Duff Clarify comment about selectors. gcc/ada/ * sem_ch13.adb (Resolve_Name): Clarify comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch13.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem

[COMMITTED] ada: Fix missing flag for GNATprove

2024-05-07 Thread Marc Poulhiès
From: Yannick Moy GNATprove expects the frontend to position correctly range check flags, on expressions which might lead to a range check failure. This was missing on in-out parameters of calls. Now fixed. There is no impact on compilation. gcc/ada/ * sem_res.adb (Resolve_Actuals): Ad

[COMMITTED] ada: Reject non-statically compatible extended return statement

2024-05-07 Thread Marc Poulhiès
From: Javier Miranda Add missing check of RM 6.5(5.3/5): when the result subtype of the function is defined by a subtype mark, the subtype defined by the subtype indication of the extended return statement shall be statically compatible with the result subtype of the function. gcc/ada/

[COMMITTED] ada: Reduce scope in the analysis of access attributes

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_attr.adb (Analyze_Access_Attribute): Move code to IF branch where its result is used. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 15 --- 1 file changed,

[COMMITTED] ada: Improve pragma No_Return's pre-Ada2022 handling of functions

2024-05-07 Thread Marc Poulhiès
From: Steve Baird Ada 2022 allows pragma No_Return to apply to a function (or a generic function). For earlier Ada versions, if a No_Return pragma argument's possible resolutions include a function (or a generic function) then we want to ignore that candidate if a non-function candidate is also a

[COMMITTED] ada: Fix detection of components with per-object constraints

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Routine Contains_POC (where POC means "per-object constraint") was failing to detect expressions of the form "Current_Type'Access", because it was comparing prefix (typically an N_Identifier) with a scope (typically an N_Definining_Entity). This was harmless, because these ex

[COMMITTED] ada: Adapt proof of runtime units

2024-05-07 Thread Marc Poulhiès
From: Yannick Moy Restore proof of runtime units after changes in SPARK. gcc/ada/ * libgnat/a-strsea.adb (Index): Add assertions. * libgnat/a-strsup.ads ("="): Remove useless precondition. * libgnat/s-aridou.adb (Prove_Rounding_Case): Add assertions. (Lemma_Shift

[COMMITTED] ada: Fix Program_Error raised during generation of data representation in JSON

2024-05-07 Thread Marc Poulhiès
From: Eric Botcazou This happens for the extension of a private discriminated tagged type. gcc/ada/ * repinfo.adb (List_Record_Info.List_Structural_Record_Layout): Add another guard for private types after retrieving the parent in the extension case. Tested on x86_64-pc

[COMMITTED] ada: Add Global contracts to Ada.Numerics.Generic_Elementary_Functions

2024-05-07 Thread Marc Poulhiès
From: Joffrey Huguet GNATprove raised warnings about unspecified Global contracts when using functions from an instance of Ada.Numerics.Generic_Elementary_Functions. This patch adds null Global contracts to all subprograms. gcc/ada/ * libgnat/a-ngelfu.ads (Sqrt): Add Global contracts.

[COMMITTED] ada: Fix crash on body postcondition

2024-05-07 Thread Marc Poulhiès
From: Bob Duff This patch fixes a bug where the compiler could crash on a postcondition on a subprogram body (i.e. a body that "acts as spec"), if the postcondition contains 'Old attributes that use the Ada 2022 feature that allows certain conditionals (see RM-6.1.1). The main bug fix here is in

[COMMITTED] ada: Fix typo in documentation comment

2024-05-07 Thread Marc Poulhiès
From: Ronan Desplanques gcc/ada/ * sinfo.ads: Fix typo. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sinfo.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sinfo.ads b/gcc/ada/sinfo.ads index 4e977152cd0..06b9ad0884e 100644 --- a/gcc/a

[COMMITTED] ada: Update comment about implicit inputs of Depends contract

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Sync comment with the updated SPARK RM rules. gcc/ada/ * sem_prag.adb (Collect_Global_Item): Update comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/ada

[COMMITTED] ada: Simplify detection of the enclosing scope

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; behaviour is unaffected. gcc/ada/ * sem_attr.adb (Analyze_Access_Attribute): Replace loop with Current_Scope_No_Loops. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 5 + 1 file changed, 1 insertion(+), 4

[COMMITTED] ada: Fix bad interaction between homogeneous finalization master and BIP protocol

2024-05-07 Thread Marc Poulhiès
From: Eric Botcazou Dynamically-allocated objects that require finalization are attached to a finalization master, which is of a (limited) controlled type declared in the System.Finalization_Masters unit. Now there are two kinds of them: homogeneous and heterogeneous; for the former, all the obje

[COMMITTED] ada: Bad internal naming when using pragma Compile_Time_Error

2024-05-07 Thread Marc Poulhiès
From: Justin Squirek This patch fixes an error in the compiler whereby the presence of a condition which tests the size of a type not known at compile time within an instance of pragma Compile_Time_Error causes incorrect internal names to be generated for said type during expansion. gcc/ada/

[COMMITTED] ada: Accept constants of access types as globals of side-effect function

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Complete support for functions with side-effects. gcc/ada/ * sem_prag.adb (Analyze_Global_Item): Handle side-effect functions like procedures. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 4 +++- 1 file changed, 3 inserti

[COMMITTED] ada: Cleanup detection of per-object constraints in inlining for SPARK

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek In GNATprove mode we didn't inline subprograms whose formal parameters was of a record type with constraints depending on discriminants. Now this is extended to formal parameters with per-object constraints, regardless if they come from references to discriminants or from att

[COMMITTED] ada: Cleanup calculation of task stacks

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_ch3.adb (Count_Default_Sized_Task_Stacks): Do not look for tasks inside record discriminants; remove avoid repeated call to Has_Task that happened for record components. (Expand_N_Object_D

[COMMITTED] ada: Prevent calculation of negative stack counts

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Negative numbers of stack counts have no meaning. gcc/ada/ * lib.ads, lib.adb (Primary_Stack_Count, Sec_Stack_Count, Increment_Primary_Stack_Count, Increment_Sec_Stack_Count, Unit_Record): Stack counts are never negative. * ali.ads (Unit_Reco

[COMMITTED] ada: SPARK rule changed on functions with side effects

2024-05-07 Thread Marc Poulhiès
From: Yannick Moy SPARK RM definition of function with side effects now makes them implicitly volatile functions. gcc/ada/ * sem_util.adb (Is_Volatile_Function): Return True on functions with side effects. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ut

[COMMITTED] ada: Remove redundant guard against empty list of actions

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * exp_ch4.adb (Useful): Remove redundant check for empty list, because iteration with First works also for empty list; rename local variable from L to Action. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/e

[COMMITTED] ada: Fix calculation of tasks in null arrays

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Fix handling of null arrays when calculating the secondary stack size for the binder. gcc/ada/ * sem_util.adb (Number_Of_Elements_In_Array): Fix counting of elements in null arrays; remove redundant parenthesis; avoid run-time conversion of 1 to univ

[COMMITTED] ada: Aspects on multiple component declarations

2024-05-07 Thread Marc Poulhiès
From: Bob Duff This patch fixes a bug where aspect specifications were ignored on all but the last of multiple component declarations. For example, in a record type with components "X, Y: T with Volatile;" only Y was marked Volatile; X was not. Both should be marked Volatile. The fix is in Par.C

[COMMITTED] ada: Fix grammar in comment

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * exp_aggr.ads (Static_Array_Aggregate): Fix typo in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_aggr.ads | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/exp_aggr.ads b/gcc/ada/ex

[COMMITTED] ada: Fix LTO type mismatches in GNAT.Sockets.Thin

2024-05-07 Thread Marc Poulhiès
From: Eric Botcazou The default implementation of GNAT.Sockets.Thin is mainly used on Linux and the socklen_t type used in various routines of the BSD sockets C API is a typedef for unsigned int there, so importing it as Interface.C.int will be flagged as a type mismatch during LTO compilation.

[COMMITTED] Update copyright years.

2024-05-07 Thread Marc Poulhiès
Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/s-finpri.adb | 2 +- gcc/ada/libgnat/s-finpri.ads | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/libgnat/s-finpri.adb b/gcc/ada/libgnat/s-finpri.adb index 7dc08a97f4b..05bf2a69ddc 100644 ---

[COMMITTED] ada: Remove obsolete field Postconditions_Proc

2024-05-07 Thread Marc Poulhiès
From: Eric Botcazou It is now totally unused by the front-end and dependent tools. gcc/ada/ * einfo.ads (Postconditions_Proc): Delete. * gen_il-fields.ads (Opt_Field_Enum): Remove Postconditions_Proc. * gen_il-gen-gen_entities.adb (E_Function): Likewise. (E_Proce

[COMMITTED] ada: Remove redundant guard against empty list of declarations

2024-05-07 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * inline.adb (Has_Single_Return): Remove redundant check for empty list, because First works also for empty list. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/inline.adb | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH] gcc: header-tools scripts updated to python3

2024-05-07 Thread Sundeep KOKKONDA
Reminder-2: Can I get some update on this patch? Is this patch ok? Will it be taken to upstream sources? On 02-Apr-24 11:28, Sundeep KOKKONDA wrote: Can I get some update on this patch. Is this patch ok? Will it be taken to upstream sources? On 29-Mar-24 15:52, sundeep.kokko...@windriver.com

[COMMITTED v2] Remove obsolete Solaris 11.3 support

2024-05-07 Thread Rainer Orth
Rainer Orth writes: > Support for Solaris 11.3 had already been obsoleted in GCC 13. However, > since the only Solaris system in the cfarm was running 11.3, I've kept > it in tree until now when both Solaris 11.4/SPARC and x86 systems have > been added. > > This patch actually removes the Solari

Re: [PATCH] tree-optimization/110490 - bitcount for narrow modes

2024-05-07 Thread Stefan Schulze Frielinghaus
Ping. Ok for mainline? On Thu, Apr 25, 2024 at 09:26:45AM +0200, Stefan Schulze Frielinghaus wrote: > Bitcount operations popcount, clz, and ctz are emulated for narrow modes > in case an operation is only supported for wider modes. Beside that ctz > may be emulated via clz in expand_ctz. Refle

Re: [pushed] [PATCH v4 1/2] LoongArch: Define ISA versions

2024-05-07 Thread Xi Ruoyao
Hmm, after this change the default (-march=la64v1.0) is enabling LSX: $ echo "int dummy;" | cc -c -v |& tail -n1 COLLECT_GCC_OPTIONS='-c' '-v' '-mabi=lp64d' '-march=la64v1.0' '-mfpu=64' '-msimd=lsx' '-mcmodel=normal' '-mtune=generic' Is this expected or there's something wrong? On Tue, 2024-04-2

Re: [pushed] [PATCH v4 1/2] LoongArch: Define ISA versions

2024-05-07 Thread Xi Ruoyao
On Tue, 2024-05-07 at 17:07 +0800, Xi Ruoyao wrote: > Hmm, after this change the default (-march=la64v1.0) is enabling LSX: > > $ echo "int dummy;" | cc -c -v |& tail -n1 > COLLECT_GCC_OPTIONS='-c' '-v' '-mabi=lp64d' '-march=la64v1.0' '- > mfpu=64' > '-msimd=lsx' '-mcmodel=normal' '-mtune=generic'

[PATCH] Use unsigned for stack var indexes during RTL expansion

2024-05-07 Thread Richard Biener
We're currently using size_t but at the same time storing them into bitmaps which only support unsigned int index. The following makes it unsigned int throughout, saving memory as well. Re-bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. * cfgexpand.cc (stack_var::rep

Re: [PATCH] tree-optimization/110490 - bitcount for narrow modes

2024-05-07 Thread Richard Biener
On Tue, May 7, 2024 at 10:58 AM Stefan Schulze Frielinghaus wrote: > > Ping. Ok for mainline? OK. Thanks, Richard. > On Thu, Apr 25, 2024 at 09:26:45AM +0200, Stefan Schulze Frielinghaus wrote: > > Bitcount operations popcount, clz, and ctz are emulated for narrow modes > > in case an operatio

Re: [middle-end PATCH] Constant fold {-1,-1} << 1 in simplify-rtx.cc

2024-05-07 Thread Richard Biener
On Fri, Jan 26, 2024 at 7:26 PM Roger Sayle wrote: > > > This patch addresses a missed optimization opportunity in the RTL > optimization passes. The function simplify_const_binary_operation > will constant fold binary operators with two CONST_INT operands, > and those with two CONST_VECTOR opera

Re: [pushed] [PATCH v4 1/2] LoongArch: Define ISA versions

2024-05-07 Thread Lulu Cheng
在 2024/5/7 下午5:42, Xi Ruoyao 写道: On Tue, 2024-05-07 at 17:07 +0800, Xi Ruoyao wrote: Hmm, after this change the default (-march=la64v1.0) is enabling LSX: $ echo "int dummy;" | cc -c -v |& tail -n1 COLLECT_GCC_OPTIONS='-c' '-v' '-mabi=lp64d' '-march=la64v1.0' '- mfpu=64' '-msimd=lsx' '-mcmode

Re: [PATCHv2 wwwdocs 1/1] gcc-14: document P1689R5 scanning output support

2024-05-07 Thread Jonathan Wakely
On Thu, 2 May 2024 at 19:03, Ben Boeckel wrote: > > On Tue, Apr 30, 2024 at 10:24:44 +0100, Jonathan Wakely wrote: > > On 20/11/23 11:22 -0500, Ben Boeckel wrote: > > >--- > > > htdocs/gcc-14/changes.html | 11 +++ > > > 1 file changed, 11 insertions(+) > > > > > >diff --git a/htdocs/gcc-14

Re: [pushed] [PATCH v4 1/2] LoongArch: Define ISA versions

2024-05-07 Thread Xi Ruoyao
On Tue, 2024-05-07 at 18:01 +0800, Lulu Cheng wrote: > > 在 2024/5/7 下午5:42, Xi Ruoyao 写道: > > On Tue, 2024-05-07 at 17:07 +0800, Xi Ruoyao wrote: > > > Hmm, after this change the default (-march=la64v1.0) is enabling LSX: > > > > > > $ echo "int dummy;" | cc -c -v |& tail -n1 > > > COLLECT_GCC_OP

Re: [PATCH] Minor range type fixes for IPA in preparation for prange.

2024-05-07 Thread Aldy Hernandez
Pushed to trunk. On Sun, Apr 28, 2024 at 10:10 PM Aldy Hernandez wrote: > > The polymorphic Value_Range object takes a tree type at construction > so it can determine what type of range to use (currently irange or > frange). It seems a few of the types are slightly off. This isn't a > problem n

[wwwdocs] Add Cauldron2024

2024-05-07 Thread Jan Hubicka
Hi, this adds Cauldron2024 to main page. OK? diff --git a/htdocs/index.html b/htdocs/index.html index aa4683da..de5cca7b 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -54,6 +54,9 @@ mission statement. News +https://gcc.gnu.org/wiki/cauldron2024";>GNU Tools Cauldron 2024 +[202

[wwwdocs] Add some more stuff into GCC14 changes.html

2024-05-07 Thread Jan Hubicka
Hi, I realize that I am late for the release (sorry for that). But here are few things which I think may be added to changes.html at least for those who will look later. OK? Honza diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index ca5174de..b390db51 100644 --- a/htdocs/gcc-

[r15-222 Regression] FAIL: gcc.target/i386/vect-shiftv8qi.c scan-assembler-times psrlw 5 on Linux/x86_64

2024-05-07 Thread haochen.jiang
On Linux/x86_64, 79649a5dcd81bc05c0ba591068c9075de43bd417 is the first bad commit commit 79649a5dcd81bc05c0ba591068c9075de43bd417 Author: Roger Sayle Date: Tue May 7 07:14:40 2024 +0100 PR target/106060: Improved SSE vector constant materialization on x86. caused FAIL: gcc.target/i386/ve

Re: [PATCH] middle-end/114931 - type_hash_canon and structual equality types

2024-05-07 Thread Richard Biener
On Mon, 6 May 2024, Martin Uecker wrote: > Am Montag, dem 06.05.2024 um 11:07 +0200 schrieb Richard Biener: > > On Mon, 6 May 2024, Martin Uecker wrote: > > > > > Am Montag, dem 06.05.2024 um 09:00 +0200 schrieb Richard Biener: > > > > On Sat, 4 May 2024, Martin Uecker wrote: > > > > > > > > > A

[COMMITTED] build: Derive object names in make_sunver.pl

2024-05-07 Thread Rainer Orth
The recent move of libgfortran object files to subdirs and the resulting breakage of libgfortran.so symbol exports demonstrated how fragile deriving object and archive names from their libtool counterparts in the Makefiles is. Therefore, this patch moves that step into make_sunver.pl, considerably

[PATCH] Remove redundant check

2024-05-07 Thread Richard Biener
operand_equal_p already has checking code to verify the hash is equal, avoid doing that again in gimplify_hasher::equal. Re-bootstrap & regtest running on x86_64-unknown-linux-gnu. * gimplify.cc (gimplify_hasher::equal): Remove redundant checking. --- gcc/gimplify.cc | 4 1

[PATCH] middle-end/27800 - avoid unnecessary temporary during gimplification

2024-05-07 Thread Richard Biener
This avoids a tempoary when gimplifying reg = a ? b : c, re-using the LHS of an assignment if that's a register. Re-bootstrap and regtest running on x86_64-unknown-linux-gnu. PR middle-end/27800 * gimplify.cc (gimplify_modify_expr_rhs): For a COND_EXPR avoid a temporary fr

Re: [wwwdocs] Add Cauldron2024

2024-05-07 Thread Gerald Pfeifer
On Tue, 7 May 2024, Jan Hubicka wrote: > this adds Cauldron2024 to main page. OK? Of course! :-) No need to ask. (And thanks for organizing! Sadly, once again exactly a weekend I cannot join due to family obligations. :-( ) Gerald

[PATCH] Fix block index check in insert_updated_phi_nodes_for

2024-05-07 Thread Richard Biener
This replaces a >= 0 block index check with the appropriate NUM_FIXED_BLOCKs, the check is from times ENTRY_BLOCK was negative. Re-bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-into-ssa.cc (insert_updated_phi_nodes_for): Fix block index check. --- gcc/tree-int

[PATCH] Avoid re-allocating vector

2024-05-07 Thread Richard Biener
The following avoids re-allocating the var map BB vector by pre-allocating it to the exact size needed when operating on the whole function. Re-bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-ssa-live.cc (init_var_map): Pre-allocate vec_bbs vector to the correct

[committed] libstdc++: Update ABI test to disallow adding to released symbol versions

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- If we update the list of "active" symbols versions now, rather than when adding a new symbol version, we will notice if new symbols get added to the wrong version (as in PR 114692). libstdc++-v3/ChangeLog: * testsuite/util/testsuite_abi.cc:

[committed] libstdc++: Use https instead of http in some comments

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * include/backward/auto_ptr.h: Use https for URL in comment. * include/bits/basic_ios.h: Likewise. * include/std/iostream: Likewise. --- libstdc++-v3/include/backward/auto_ptr.h | 2 +- libstdc++-v3/i

[wwwdocs] Specify AArch64 BitInt support for little-endian only

2024-05-07 Thread Andre Vieira (lists)
Hey Jakub, This what ya had in mind? Kind regards, Andre Vieiradiff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index ca5174de991bb088f653468f77485c15a61526e6..924e045a15a78b5702a0d6997953f35c6b47efd1 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html

Re: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2024-05-07 Thread Sebastian Huber
On 06.05.24 16:20, Qing Zhao wrote: Hi, Sebastian, Looks like that the behavior you described is correct. What’s your major concern? ( a little confused). I am concerned that the static initialization of structures with flexible array members no longer works. In the RTEMS open source real-ti

[PATCH] Fix guard for IDF pruning by dominator

2024-05-07 Thread Richard Biener
When insert_updated_phi_nodes_for tries to skip pruning the IDF to blocks dominated by the nearest common dominator of the set of definition blocks it compares against ENTRY_BLOCK but that's never going to be the common dominator, instead it will be at most its single successor. Re-bootstrap and r

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

2024-05-07 Thread Matthias Kretz
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)? -- 8< Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/114958 * include/experimental/bits/s

[committed] libstdc++: Constrain equality ops for std::pair, std::tuple, std::variant

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. -- >8 -- Implement the changes from P2944R3 which add constraints to the comparison operators of std::pair, std::tuple, and std::variant. The paper also changes std::optional, but we already constrain its comparisons using SFINAE on the return type. However,

Re: [PATCH v2] aarch64: Preserve mem info on change of base for ldp/stp [PR114674]

2024-05-07 Thread Alex Coplan
On 12/04/2024 12:13, Richard Sandiford wrote: > Alex Coplan writes: > > This is a v2 because I accidentally sent a WIP version of the patch last > > time round which used replace_equiv_address instead of > > replace_equiv_address_nv; that caused some ICEs (pointed out by the > > Linaro CI) since p

Re: [PATCH 4/4] libstdc++: Simplify std::variant comparison operators

2024-05-07 Thread Jonathan Wakely
On Wed, 10 Apr 2024 at 09:51, Jonathan Wakely wrote: > > Tested x86_64-linux. > > This is just a minor clean-up and could wait for stage 1. Pushed now. > > -- >8 -- > > libstdc++-v3/ChangeLog: > > * include/std/variant (_VARIANT_RELATION_FUNCTION_TEMPLATE): > Simplify. > --- > li

[PATCH] libstdc++: Rewrite std::variant comparisons without macros

2024-05-07 Thread Jonathan Wakely
I don't think using a macro for these really saves us much, we can do this to avoid duplication instead. And now it's not a big, multi-line macro that's a pain to edit. Any objections? Tested x86_64-linux. -- >8 -- libstdc++-v3/ChangeLog: * include/std/variant (__detail::__variant::__c

[committed] libstdc++: Fix for -std=c++23 -ffreestanding [PR114866]

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. gcc-14 backport to follow. -- >8 -- std::shared_ptr isn't declared for freestanding, so guard uses of it with #if _GLIBCXX_HOSTED in . libstdc++-v3/ChangeLog: PR libstdc++/114866 * include/bits/out_ptr.h [!_GLIBCXX_HOSTED]: Don't refer to

[committed] libstdc++: Fix handling of incomplete UTF-8 sequences in _Unicode_view

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. Pushed to trunk. gcc-14 backport to follow. -- >8 -- Eddie Nolan reported to me that _Unicode_view was not correctly implementing the substitution of ill-formed subsequences with U+FFFD, due to failing to increment the counter when the iterator reaches the end of the sequence

[PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jonathan Wakely
Do we want this change for RISC-V, to fix PR113578? I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't do anything). -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/113578 * include/std/ostream (operator<<(basic_ostream&, float)): Restore signbit after c

Re: [PATCH] libstdc++: Rewrite std::variant comparisons without macros

2024-05-07 Thread Ville Voutilainen
On Tue, 7 May 2024 at 16:47, Jonathan Wakely wrote: > > I don't think using a macro for these really saves us much, we can do > this to avoid duplication instead. And now it's not a big, multi-line > macro that's a pain to edit. > > Any objections? No, that's beautiful, ship it.

Re: [PATCH v18 02/26] libstdc++: Optimize std::is_const compilation performance

2024-05-07 Thread Ken Matsui
Hi Jonathan, Since __is_const, __is_volatile, and __is_pointer were approved, could you please review these patches for libstdc++? I guess that you already reviewed almost equivalent patches, but I wanted to make sure. Sincerely, Ken Matsui On Thu, May 2, 2024 at 1:16 PM Ken Matsui wrote: > >

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jeff Law
On 5/7/24 7:49 AM, Jonathan Wakely wrote: Do we want this change for RISC-V, to fix PR113578? I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't do anything). -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/113578 * include/std/ostream (operator<<(basic_ost

Ping * 2 [PATCH v9 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2024-05-07 Thread Qing Zhao
2nd Ping for the middle-end change approval. -:) **Approval status: All C FE changes have been approved. **Review status: All Middle-end changes have been reviewed by Sid, no remaining issue. Okay for GCC15? thanks. Qing Begin forwarded message: From: Qing Zhao Subject: Re: [PATCH

[PATCH 1/2] libstdc++: Fix data race in std::basic_ios::fill() [PR77704]

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. This seems "obviously correct", and I'd like to push it. The current code definitely has a data race, i.e. undefined behaviour. -- >8 -- The lazy caching in std::basic_ios::fill() updates a mutable member without synchronization, which can cause a data race if two threads bot

[PATCH 2/2] libstdc++: Fix data races in std::ctype [PR77704]

2024-05-07 Thread Jonathan Wakely
Tested x86_64-linux. This one is less "obviously correct", as calling the single-character narrow(char, char) overload no longer lazily populates individual characters in the cache (because doing that is racy). And the single-character widen(char) no longer calls _M_wide_init() to populate the whol

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jonathan Wakely
On Tue, 7 May 2024 at 14:57, Jeff Law wrote: > > > > On 5/7/24 7:49 AM, Jonathan Wakely wrote: > > Do we want this change for RISC-V, to fix PR113578? > > > > I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't do > > anything). > > > > -- >8 -- > > > > libstdc++-v3/ChangeLog: > >

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jonathan Wakely
On Tue, 7 May 2024 at 15:06, Jonathan Wakely wrote: > > On Tue, 7 May 2024 at 14:57, Jeff Law wrote: > > > > > > > > On 5/7/24 7:49 AM, Jonathan Wakely wrote: > > > Do we want this change for RISC-V, to fix PR113578? > > > > > > I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't

Re: Ping * 2 [PATCH v9 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2024-05-07 Thread Qing Zhao
On May 7, 2024, at 10:02, Qing Zhao wrote: 2nd Ping for the middle-end change approval. -:) **Approval status: All C FE changes have been approved. **Review status: All Middle-end changes have been reviewed by Sid, no remaining issue. Okay for GCC15? For convenience, the following

Re: [V2][PATCH] gcc-14/changes.html: Deprecate a GCC C extension on flexible array members.

2024-05-07 Thread Qing Zhao
Hi, Sebastian, Thanks for your explanation. Our goal is to deprecate the GCC extension on structure containing a flexible array member not at the end of another structure. In order to achieve this goal, we provided the warning option -Wflex-array-member-not-at-end for the users to locate all

[patch,avr,applied] PR target/114835 - Tweak __popcountqi2

2024-05-07 Thread Georg-Johann Lay
Applied this tweak as proposed in the PR. Johann -- commit 6b73a9879a4503ebee2cb1a3ad243f60c922ca31 Author: Wolfgang Hospital Date: Tue May 7 16:24:39 2024 +0200 AVR: target/114835 - Tweak popcountqi2 libgcc/ PR target/114835 * config/avr/lib1funcs.S (__popc

Re: [PATCH] aarch64: Fix typo in aarch64-ldp-fusion.cc:combine_reg_notes [PR114936]

2024-05-07 Thread Richard Earnshaw (lists)
On 03/05/2024 15:45, Alex Coplan wrote: > This fixes a typo in combine_reg_notes in the load/store pair fusion > pass. As it stands, the calls to filter_notes store any > REG_FRAME_RELATED_EXPR to fr_expr with the following association: > > - i2 -> fr_expr[0] > - i1 -> fr_expr[1] > > but then

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jeff Law
On 5/7/24 8:06 AM, Jonathan Wakely wrote: On Tue, 7 May 2024 at 14:57, Jeff Law wrote: On 5/7/24 7:49 AM, Jonathan Wakely wrote: Do we want this change for RISC-V, to fix PR113578? I haven't tested it on RISC-V, only on x86_64-linux (where it doesn't do anything). -- >8 -- libstdc++-v3

Re: [RFA][RISC-V] [PATCH v2] Enable inlining str* by default

2024-05-07 Thread Jeff Law
On 5/4/24 8:41 AM, Jeff Law wrote: The CI system caught a latent bug in the inline string comparison code that shows up with rv32+zbb.  It was hardcoding 64 when AFAICT it should have been using BITS_PER_WORD. So v2 with that fixed. So per the discussion in today's call I reviewed a couple

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Andreas Schwab
On Mai 07 2024, Jonathan Wakely wrote: > +#ifdef __riscv > + return _M_insert(__builtin_copysign((double)__f, > + (double)-__builtin_signbit(__f)); Should this use static_cast? -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BA

Re: [wwwdocs] Specify AArch64 BitInt support for little-endian only

2024-05-07 Thread Jakub Jelinek
On Tue, May 07, 2024 at 02:12:07PM +0100, Andre Vieira (lists) wrote: > Hey Jakub, > > This what ya had in mind? Yes. > diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html > index > ca5174de991bb088f653468f77485c15a61526e6..924e045a15a78b5702a0d6997953f35c6b47efd1 > 100644 > -

[PATCH] tree-inline: Remove .ASAN_MARK calls when inlining functions into no_sanitize callers [PR114956]

2024-05-07 Thread Jakub Jelinek
Hi! In r9-5742 we've started allowing to inline always_inline functions into functions which have disabled e.g. address sanitization even when the always_inline function is implicitly from command line options sanitized. This mostly works fine because most of the asan instrumentation is done only

[PATCH] expansion: Use __trunchfbf2 calls rather than __extendhfbf2 [PR114907]

2024-05-07 Thread Jakub Jelinek
Hi! The HF and BF modes have the same size/precision and neither is a subset nor superset of the other. So, using either __extendhfbf2 or __trunchfbf2 is weird. The expansion apparently emits __extendhfbf2, but on the libgcc side we apparently have __trunchfbf2 implemented. I think it is easier t

Re: [PATCH v3 00/12] Add aarch64-w64-mingw32 target

2024-05-07 Thread Christophe Lyon
Hi, I've just pushed this patch series, congratulations! Thanks, Christophe On Thu, 11 Apr 2024 at 15:40, Evgeny Karpov wrote: > > Hello, > > Thank you for reviewing v2! > v3 addresses all comments on v2. > > v3 Changes: > - Exclude the aarch64_calling_abi declaration from the patch series. >

Re: Fix gnu versioned namespace mode 01/03

2024-05-07 Thread Iain Sandoe
Hi François As you know I am keen to see this land - but having had some experience with applying previous patches to actual toolchain builds .. > On 4 May 2024, at 22:11, François Dumont wrote: > > libstdc++: Bump gnu versioned namespace to __9 I think that the namespace version should be a

Re: Fix gnu versioned namespace mode 00/03

2024-05-07 Thread Iain Sandoe
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 fixed there is no chance to have

[PATCH v2] arm: [MVE intrinsics] Fix support for predicate constants [PR target/114801]

2024-05-07 Thread Christophe Lyon
In this PR, we have to handle a case where MVE predicates are supplied as a const_int, where individual predicates have illegal boolean values (such as 0xc for a 4-bit boolean predicate). To avoid the ICE, we hide the constant behind an unspec. On MVE V8BI and V4BI multi-bit masks are interpreted

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Palmer Dabbelt
[+Adhemerval and Letu, who handled the glibc side of things, in case they have any more context.] On Tue, 07 May 2024 07:11:08 PDT (-0700), jwak...@redhat.com wrote: On Tue, 7 May 2024 at 15:06, Jonathan Wakely wrote: On Tue, 7 May 2024 at 14:57, Jeff Law wrote: > > > > On 5/7/24 7:49 AM, Jon

Re: [PATCH][risc-v] libstdc++: Preserve signbit of nan when converting float to double [PR113578]

2024-05-07 Thread Jeff Law
On 5/7/24 9:36 AM, Andreas Schwab wrote: On Mai 07 2024, Jonathan Wakely wrote: +#ifdef __riscv + return _M_insert(__builtin_copysign((double)__f, + (double)-__builtin_signbit(__f)); Should this use static_cast? And it's missing a close pare

  1   2   >