Re: [PATCH 1/5] vec: Add quick_emplace_push/safe_emplace_push

2024-10-25 Thread Andrew Pinski
On Thu, Oct 24, 2024 at 6:23 AM Richard Biener wrote: > > On Thu, Oct 24, 2024 at 8:16 AM Andrew Pinski wrote: > > > > On Wed, Oct 23, 2024 at 12:28 AM Andrew Pinski wrote: > > > > > > On Tue, Oct 22, 2024 at 11:49 PM Richard Biener > > > wrote: > > > > > > > > On Tue, Oct 22, 2024 at 5:31 PM A

Re: [PATCH 07/22] aarch64: Add GCS builtins

2024-10-25 Thread Richard Sandiford
Yury Khrustalev writes: > From: Szabolcs Nagy > > Add new builtins for GCS: > > void *__builtin_aarch64_gcspr (void) > uint64_t __builtin_aarch64_gcspopm (void) > void *__builtin_aarch64_gcsss (void *) > > The builtins are always enabled, but should be used behind runtime > checks in case t

[PATCH] Match: Simplify branch form 3 of unsigned SAT_ADD into branchless

2024-10-25 Thread pan2 . li
From: Pan Li There are sorts of forms for the unsigned SAT_ADD. Some of them are complicated while others are cheap. This patch would like to simplify the complicated form into the cheap ones. For example as below: >From the form 3 (branch): SAT_U_ADD = (X + Y) >= x ? (X + Y) : -1. To (bra

[PATCH 1/3] libstdc++: Fix typos in tests using macros for std::float128_t support

2024-10-25 Thread Jonathan Wakely
These tests check `_GLIBCXX_DOUBLE_IS_IEEE_BINARY128` but that's never defined, it should be "LDOUBLE" not "DOUBLE". libstdc++-v3/ChangeLog: * testsuite/26_numerics/complex/ext_c++23.cc: Fix typo in macro. * testsuite/26_numerics/headers/cmath/constexpr_std_c++23.cc: Likew

[PATCH] [lto] ipcp don't propagate where not needed

2024-10-25 Thread Michal Jires
This patch disables propagation of ipcp information into lto partitions where all instances of the node are marked to be inlined. Motivation: Incremental LTO needs stable values between compilations to be effective. This requirement fails with following example: void heavily_used_debug_function(i

Re: [PATCH 1/5] vec: Add quick_emplace_push/safe_emplace_push

2024-10-25 Thread Richard Biener
On Thu, Oct 24, 2024 at 8:16 AM Andrew Pinski wrote: > > On Wed, Oct 23, 2024 at 12:28 AM Andrew Pinski wrote: > > > > On Tue, Oct 22, 2024 at 11:49 PM Richard Biener > > wrote: > > > > > > On Tue, Oct 22, 2024 at 5:31 PM Andrew Pinski > > > wrote: > > > > > > > > This adds quick_emplace_push

[PATCH] SVE intrinsics: Fold svaba with op1 all zeros to svabd.

2024-10-25 Thread Jennifer Schmitz
Similar to https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665780.html, this patch implements folding of svaba to svabd if op1 is all zeros, resulting in the use of UABD/SABD instructions instead of UABA/SABA. Tests were added to check the produced assembly for use of UABD/SABD, also for the

Use unique_ptr in more places in pretty_printer/diagnostics: 'gcc/config/gcn/mkoffload.cc' [PR116613] (was: [RFC/PATCH] Use unique_ptr in more places in pretty_printer/diagnostics [PR116613])

2024-10-25 Thread Thomas Schwinge
Hi! On 2024-10-14T19:18:46-0400, David Malcolm wrote: > [...] > Unfortunately we can't directly include in our internal headers > but instead any of our TUs that make use of std::unique_ptr must #define > INCLUDE_MEMORY before including system.h. > > Hence the bulk of this patch is taken up with

Re: [PATCH 14/22] aarch64: Add GCS support to the unwinder

2024-10-25 Thread Richard Sandiford
Yury Khrustalev writes: > From: Szabolcs Nagy > > Follows the current linux ABI that uses single signal entry token > and shared shadow stack between thread and alt stack. > Could be behind __ARM_FEATURE_GCS_DEFAULT ifdef (only do anything > special with gcs compat codegen) but there is a runtime

Re: [PATCH 4/6] aarch64: Optimize vector rotates into REV* instructions where possible

2024-10-25 Thread Kyrylo Tkachov
Hi Richard, > On 23 Oct 2024, at 11:30, Richard Sandiford wrote: > > Kyrylo Tkachov writes: >> Hi all, >> >> Some vector rotate operations can be implemented in a single instruction >> rather than using the fallback SHL+USRA sequence. >> In particular, when the rotate amount is half the bitwidth

Re: [PATCH] c++: Implement P2662R3, Pack Indexing [PR113798]

2024-10-25 Thread Patrick Palka
On Wed, 23 Oct 2024, Jason Merrill wrote: > On 10/23/24 10:20 AM, Patrick Palka wrote: > > On Tue, 22 Oct 2024, Marek Polacek wrote: > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > -- >8 -- > > > This patch implements C++26 Pack Indexing, as described in > > >

[PATCH 2/3] libstdc++: Define __memcpyable as true

2024-10-25 Thread Jonathan Wakely
This allows optimizing copying ranges of floating-point types when they have the same size and representation, e.g. between _Float32 and float when we know that float uses the same IEEE binary32 format as _Float32. On some targets double and long double both use IEEE binary64 format so we could en

Re: [PATCH] aarch64: Support multiple variants including up to 3

2024-10-25 Thread Kyrylo Tkachov
Hi Andrew, > On 25 Oct 2024, at 01:10, Andrew Pinski wrote: > > On Mon, Jun 3, 2024 at 2:23 AM Andrew Pinski (QUIC) > wrote: >> >>> -Original Message- >>> From: Andrew Pinski (QUIC) >>> Sent: Saturday, May 4, 2024 2:03 AM >>> To: gcc-patches@gcc.gnu.org >>> Cc: Andrew Pinski (QUIC) >

Re: [PATCH] libstdc++: Add P1206R7 from_range members to std::vector [PR111055]

2024-10-25 Thread Jonathan Wakely
On Thu, 24 Oct 2024 at 16:00, Jonathan Wakely wrote: > > This is another piece of P1206R7, adding new members to std::vector and > std::vector. > > The __uninitialized_copy_a extension needs to be enhanced to support > passing non-common ranges (i.e. a sentinel that is a different type from > the

Re: [PATCH] c: Add __builtin_stdc_rotate_{left, right} builtins [PR117030]

2024-10-25 Thread Joseph Myers
On Thu, 24 Oct 2024, Jakub Jelinek wrote: > +@defbuiltin{@var{type} __builtin_stdc_rotate_left (@var{type} @var{arg1}, > @var{type} @var{arg2})} The rotate count doesn't need to be the same type as the value rotated, so saying @{type} for both is misleading. > +The @code{__builtin_stdc_rotate_

[PATCH] c, v2: Add __builtin_stdc_rotate_{left, right} builtins [PR117030]

2024-10-25 Thread Jakub Jelinek
On Thu, Oct 24, 2024 at 02:20:16PM +, Joseph Myers wrote: > On Thu, 24 Oct 2024, Jakub Jelinek wrote: > > > +@defbuiltin{@var{type} __builtin_stdc_rotate_left (@var{type} @var{arg1}, > > @var{type} @var{arg2})} > > The rotate count doesn't need to be the same type as the value rotated, so >

Re: [PATCH 18/22] aarch64: libitm: Add GCS support

2024-10-25 Thread Richard Sandiford
Yury Khrustalev writes: > From: Szabolcs Nagy > > Transaction begin and abort use setjmp/longjmp like operations that > need to be updated for GCS compatibility. We use similar logic to > libc setjmp/longjmp that support switching stack and thus switching > GCS (e.g. due to longjmp out of a makec

[PATCH] Assorted --disable-checking fixes [PR117249]

2024-10-25 Thread Jakub Jelinek
Hi! We have currently 3 different definitions of gcc_assert macro, one used most of the time (unless --disable-checking) which evaluates the condition at runtime and also checks it at runtime, then one for --disable-checking GCC 4.5+ which looks like ((void)(UNLIKELY (!(EXPR)) ? __builtin_unreacha

Re: [PATCH v4] libstdc++: implement concatenation of strings and string_views

2024-10-25 Thread Jonathan Wakely
On Sun, 13 Oct 2024 at 18:59, Giuseppe D'Angelo wrote: > > Hello, > > On 09/10/2024 22:39, Patrick Palka wrote: > >> +#if __glibcxx_string_view >= 202403L > >> + // const string & + string_view > >> + template > >> +[[nodiscard]] > >> +constexpr inline basic_string<_CharT, _Traits, _Allo

[COMMITTED 18/35] ada: Pragmas Pre_Class/Post_Class rejected for abstract subprograms

2024-10-25 Thread Marc Poulhiès
From: Javier Miranda The Pre_Class/Post_Class pragmas are rejected at compile time for abstract subprograms. gcc/ada/ChangeLog: * sem_prag.adb (Analyze_Pre_Post_Condition): Allow the use of pragma Pre_Class/Post_Class with abstract subprograms. Tested on x86_64-pc-linux-gnu, co

[COMMITTED 05/35] ada: Fix fallout of change to 'Wide_Wide_Value for enumeration types

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou The literals of enumeration types are always normalized, even though they contain wide characters (but the normalization leaves these unchanged), so a normalization routine that is aware of wide characters must be run on the input string for 'Wide_Wide_Value. gcc/ada/ChangeLo

[COMMITTED 16/35] ada: Adjust documentation of External_Initialization

2024-10-25 Thread Marc Poulhiès
From: Ronan Desplanques The parameters Maximum_Size and If_Empty were mentioned during the request for comments phase but are not implemented, at least for now. This patch changes the GNAT reference manual accordingly. It also makes a minor punctuation change. gcc/ada/ChangeLog: * doc/g

[COMMITTED 10/35] ada: Constraint error not raised in ACATS test c413007

2024-10-25 Thread Marc Poulhiès
From: Javier Miranda The Constraint_Error exception is not raised when a subprogram is called using prefix notation, and the prefix of the call is an access-to-subprogram type with a null value. This new check is enabled by switch -gnatd_P gcc/ada/ChangeLog: * gen_il-fields.ads: New nod

[COMMITTED 30/35] ada: Add 'artificial_p' parameter to build_unc_object_type

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey This adds an 'artificial_p' parameter to build_unc_object_type, so that the artificiality of the type can be propagated to create_type_decl. This will affect the namelessness of the type in a subsequent patch. gcc/ada/ChangeLog: * gcc-interface/decl.cc (gnat_to_gnu_ent

[COMMITTED 20/35] ada: Fix ATC with timed delay from Ada.Real_Time

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou An Asynchronous Transfer of Control blocks with a timed delay that is computed by means of the Ada.Real_Time unit (instead of the default Ada.Calendar unit) because of a missing abort deferral in the unit. gcc/ada/ChangeLog: PR ada/43485 * libgnarl/a-retide.a

[COMMITTED 08/35] ada: Fix internal error on ambiguous operands of comparison operator

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou This is a regression introduced when the diagnosis of ambiguous operands for comparison and equality operators was moved from the analysis to the resolution phase in order to avoid spurious ambiguities in specific cases. When an ambiguity is detected for the operands of prede

[COMMITTED 14/35] ada: Add Type_Size_For function to Uintp package

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou It computes the size of an integer type that can accommodate the input. gcc/ada/ChangeLog: * uintp.ads (Type_Size_For): New function declaration. * uintp.adb (Type_Size_For): New function body. * exp_imgv.adb (Rewrite_Object_Image): Call Type_Size_For

[COMMITTED 13/35] ada: Update simpler accessibility model doc

2024-10-25 Thread Marc Poulhiès
From: Tonu Naks gcc/ada/ChangeLog: * doc/gnat_rm/gnat_language_extensions.rst: update simpler accessibility model * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_rm/gnat_language_exte

[COMMITTED 27/35] ada: Fix internal error on bit-packed array type with Volatile_Full_Access

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou The problem occurs when the component type is a record type with default values for the initialization procedure of the (base) array type, because the compiler is trying to generate a full access for a parameter of the base array type, which does not make sense. gcc/ada/Chang

[COMMITTED 24/35] ada: Emit DWARF for Ada 'with' and 'use' clauses

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey This changes the Ada compiler to emit DWARF information for Ada 'with' and 'use' clauses. In particular, code like: with Pck; use Pck; will be emitted as: <1><146a>: Abbrev Number: 23 (DW_TAG_module) <146b> DW_AT_name: pck <146f> DW_AT_decl_file : 1

Re: [PATCH v2] testsuite: Sanitize pacbti test cases for Cortex-M

2024-10-25 Thread Richard Earnshaw (lists)
On 14/10/2024 13:23, Christophe Lyon wrote: > > > On 10/13/24 19:50, Torbjörn SVENSSON wrote: >> Ok for trunk and releases/gcc-14? >> >> Changes since v1: >> >> - Dropped changes to dg- instructions. These will be addressed in a separate >> set of patches later. > > LGTM, let's avoid mixing cha

[PATCH #1/7] allow vuses in ifcombine blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
Disallowing vuses in blocks for ifcombine is too strict, and it prevents usefully moving fold_truth_andor into ifcombine. That tree-level folder has long ifcombined loads, absent other relevant side effects. for gcc/ChangeLog * tree-ssa-ifcombine.c (bb_no_side_effects_p): Allow vuses

Re: [PATCH] fold fold_truth_andor field merging into ifcombine

2024-10-25 Thread Alexandre Oliva
On Oct 22, 2024, Richard Biener wrote: > On Mon, Oct 21, 2024 at 4:30 AM Alexandre Oliva wrote: >> >> On Oct 10, 2024, Richard Biener wrote: >> >> > As you special-case hard register uses, do we want to ever make >> > hard-register >> > uses or defs unconditional? I'll note that on GIMPLE h

[PATCH #2/7] drop redundant ifcombine_ifandif parm (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
In preparation to changes that may modify both inner and outer conditions in ifcombine, drop the redundant parameter result_inv, that is always identical to inner_inv. for gcc/ChangeLog * tree-ssa-ifcombine.cc (ifcombine_ifandif): Drop redundant result_inv parm. Adjust all ca

[PATCH #0/7] noncontiguous ifcombine patchset (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
I've just posted 7 patches related with the implementation of noncontiguous ifcombine. They've been regstrapped together on x86_64-linux-gnu, and each patch has been tested to build on top of the previous on. Patches #1, #2 and #3 are preparatory patches that stand on their own. Patches #4, #5 a

[PATCH #3/7] introduce ifcombine_replace_cond (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
Refactor ifcombine_ifandif, moving the common code from the various paths that apply the combined condition to a new function. for gcc/ChangeLog * tree-ssa-ifcombine.cc (ifcombine_replace_cond): Factor out of... (ifcombine_ifandif): ... this. --- gcc/tree-ssa-ifcombin

[PATCH #6/7] ifcombine across noncontiguous blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
Rework ifcombine to support merging conditions from noncontiguous blocks. This depends on earlier preparation changes. The function that attempted to ifcombine a block with its immediate predecessor, tree_ssa_ifcombine_bb, now loops over dominating blocks eligible for ifcombine, attempting to c

[PATCH #4/7] adjust update_profile_after_ifcombine for noncontiguous ifcombine (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
Prepare for ifcombining noncontiguous blocks, adding (still unused) logic to the ifcombine profile updater to handle such cases. for gcc/ChangeLog * tree-ssa-ifcombine.cc (known_succ_p): New. (update_profile_after_ifcombine): Handle noncontiguous blocks. --- gcc/tree-ssa-ifco

[PATCH #5/7] extend ifcombine_replace_cond to handle noncontiguous ifcombine (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
Prepare to handle noncontiguous ifcombine, introducing logic to modify the outer condition when needed. There are two cases worth mentioning: - when blocks are noncontiguous, we have to place the combined condition in the outer block to avoid pessimizing carefully crafted short-circuited te

Re: [PATCH 2/8] aarch64: Add new +fcma flag

2024-10-25 Thread Andre Vieira (lists)
On 08/10/2024 17:18, Richard Sandiford wrote: Andrew Carlotti writes: This includes +fcma as a dependency of +sve, and means that we can finally support fcma intrinsics on a64fx. Also add fcma to the Features list in several cpunative testcases that incorrectly included sve without fcma. g

Re: [PATCH] Further use of mod_scope in modified_type_die

2024-10-25 Thread Tom Tromey
> "Tom" == Tom Tromey writes: Tom> I am working on some changes to GNAT to emit hierarchical DWARF -- Tom> i.e., where entities will have simple names nested in a DW_TAG_module. Tom> While working on this I found a couple of paths in modified_type_die Tom> where "mod_scope" should be used, b

Re: [PATCH] Add 'cobol' to Makefile.def, take 2

2024-10-25 Thread James K. Lowden
On Thu, 24 Oct 2024 12:01:10 -0400 "James K. Lowden" wrote: > They are not. With --enable-generated-files-in-srcdir, the build > fails. What do I need to do to fix it? I haven't the faintest idea. I believe I found it: diff --git a/gcc/cobol/Make-lang.in b/gcc/cobol/Make-lang.in index 6a57

Re: [PATCH 5/5] RISC-V: Add testcases for form 1 of MASK_LEN_STRIDED_LOAD{STORE}

2024-10-25 Thread Robin Dapp
OK. -- Regards Robin

Re: [PATCH] AArch64: Add more accurate constraint [PR117292]

2024-10-25 Thread Richard Sandiford
Wilco Dijkstra writes: > As shown in the PR, reload may only check the constraint in some cases and > and not check the predicate is still valid for the resulting instruction. Yeah, that's by design. constraints have to accept a subset of the predicates. > To fix the issue, add a new constraint

[COMMITTED 34/35] ada: Set DECL_NAMELESS in create_type_decl

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey When using minimal encodings, most artificial types do not need to have their names emitted in the DWARF. This patch changes the compiler to generally omit these names. However, a subset of names are needed: when the compiler creates an artificial type for certain kinds of arra

[COMMITTED 11/35] ada: Increase stack size for Windows tasking programs

2024-10-25 Thread Marc Poulhiès
From: squirek This patch increases the default tasking stack size for Windows tasking program to 8 mb to avoid use of pragma Linker_Options in the general case. gcc/ada/ChangeLog: * libgnarl/s-taprop__mingw.adb: Modify stack size and update documentation. Tested on x86_64-pc-li

[COMMITTED 35/35] ada: Change scope of XUB type

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey An earlier patch in the "nameless" series caused a regression with -fgnat-encodings=all. Previously, all artificial types were emitted in the CU scope in the DWARF, but with the patch, an "XUB" type is emitted in the function scope. This causes gdb lookups to erroneously find t

[COMMITTED 23/35] ada: Small adjustments to commentary after latest change

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou This removes the enumeration of the various cases in the comment associated with the declaration of In_Expanded_Body to prevent synchronization issues. gcc/ada/ChangeLog: * freeze.adb (Freeze_Expression.In_Expanded_Body): Tweak comments. Tested on x86_64-pc-linux-gn

[COMMITTED 33/35] ada: Mark some type decls as nameless

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey The types created by record_builtin_type and create_type_stub_decl can be marked as nameless when using minimal encodings. In this situation, gdb does not need these type names. gcc/ada/ChangeLog: * gcc-interface/utils.cc (record_builtin_type, create_type_stub_decl):

[COMMITTED 28/35] ada: Fix fallout of change in parameter passing out of aliasing considerations

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou If an actual parameter that is a type conversion is passed by reference but not addressable, the temporary that is created and whose address is passed instead may need to be in the target type of the conversion to fulfill the requirements of strict aliasing. gcc/ada/ChangeLog

[COMMITTED 22/35] ada: Pragma Pre_Class and Post_Class have no effect at runtime

2024-10-25 Thread Marc Poulhiès
From: Javier Miranda The pragmas Pre_Class and Post_Class are accepted by the compiler but have no effect at runtime. gcc/ada/ChangeLog: * freeze.adb (Freeze_Entity): If the entity is an access-to-subprogram type declaration that pre/postcondition contracts, build the wr

[COMMITTED 29/35] ada: Standard types are not artificial

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey This changes gigi so that standard types are no longer marked artificial. This change is needed to prevent subsequent patches from causing standard types to have their names elided. Also, although DWARF says that DW_AT_artificial is used for "the declaration of an object or typ

[COMMITTED 19/35] ada: Fix internal error on function call in class-wide precondition

2024-10-25 Thread Marc Poulhiès
From: Eric Botcazou This occurs when the call is to a function that is declared in a package that is nested in the scope where the type declaration is located. gcc/ada/ChangeLog: * freeze.adb (Freeze_Expression.In_Expanded_Body): Also return True for the body of a helper/wrapper

[COMMITTED 32/35] ada: Mark XUA types as artificial

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey gdb does not need the name of XUA types. This patch changes the compiler to unconditionally mark these as artificial; a subsequent patch will arrange for the name to be omitted. gcc/ada/ChangeLog: * gcc-interface/decl.cc (gnat_to_gnu_entity): Pass 'true' to cre

Re: [RFC][PATCH] Adjust param_vect_max_version_for_alias_checks

2024-10-25 Thread Richard Biener
On Fri, Oct 25, 2024 at 12:22 AM Kugan Vivekanandarajah wrote: > > Hi, > > This patch sets param_vect_max_version_for_alias_checks to 15. > This was causing GCC to miss vectorization opportunities in one internal > application making it slower than LLVM by about ~14%. > > I've tested different pa

[Patch] tree-core.h (omp_clause_code): Comments regarding range checks for OMP_CLAUSE_...

2024-10-25 Thread Tobias Burnus
It happens from time to time that we run into asserts, esp. for OMP_CLAUSE_DECL. The reason is that the comment for omp_clause_code implies that arguments should be appended (misreading the "Don't reorder") and that there was no crossref to those macros. This patch adds comments both a generic c

[PATCH 3/3] Assert finished vectorizer pattern COND_EXPR transition

2024-10-25 Thread Richard Biener
The following places a few strathegic asserts so we do not end up with COND_EXPRs with a comparison as the first operand during vectorization. Bootstrap and regtest running on x86_64-unknown-linux-gnu. These are the asserts I'd like to keep, I will followup with quite some dead code removal when

Re: [PATCH] Add 'cobol' to Makefile.def, take 2

2024-10-25 Thread James K. Lowden
On Wed, 23 Oct 2024 15:12:19 +0200 Richard Biener wrote: > Note there's --enable-generated-files-in-srcdir specifically to remove > yacc and flex - can you check whether with this configure flag those > files are generated in the source directory and thus picked up when > building the release tar

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-25 Thread Richard Biener
On Wed, 23 Oct 2024, Jennifer Schmitz wrote: > > > > On 22 Oct 2024, at 13:14, Richard Biener wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Tue, 22 Oct 2024, Jennifer Schmitz wrote: > > > >> > >> > >>> On 22 Oct 2024, at 11:05, Richard Biener wrot

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Patrick Palka
On Fri, Oct 25, 2024 at 7:54 AM Jakub Jelinek wrote: > > On Fri, Oct 25, 2024 at 01:25:25PM +0200, Arsen Arsenović wrote: > > Maybe we should go the other way around? Compressing eight spaces into > > a tab leads to strange artifacts in diffs (where lines appear > > misindented because some were

Re: [PATCH 3/2] c++: remove WILDCARD_DECL

2024-10-25 Thread Patrick Palka
On Wed, 23 Oct 2024, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > OK for trunk? > > -- >8 -- > > This tree code was added as part of the initial Concepts TS > implementation to support type-constraints introducing any kind > of template-parameter, no

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Jonathan Wakely
On Fri, 25 Oct 2024 at 12:17, Jakub Jelinek wrote: > > Hi! > > On top of the previously posted leading whitespace patch, this change > just replaces 8 consecutive spaces in leading whitespace by tab. > The patch is too large (1MB xz -9e compressed), so I'm not even trying to > split it up into 4+

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Jakub Jelinek
On Fri, Oct 25, 2024 at 01:12:15PM +0100, Jonathan Wakely wrote: > So everything except: > > include/pstl/* > src/c++17/ryu/* > src/c++17/fast_float/* Thanks, changed in my copy. grep 'pstl\|ryu\|fast_float' Q624 is now empty. Jakub

C++ Patch ping

2024-10-25 Thread Jakub Jelinek
I'd like to ping 18 C++ patches: https://gcc.gnu.org/pipermail/gcc-patches/2024-July/658137.html libcpp, c++: Optimize initializers using #embed in C++ https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659333.html c++: Speed up compilation of large char array initializers when not using

Re: [PATCH 4/6] aarch64: Optimize vector rotates into REV* instructions where possible

2024-10-25 Thread Kyrylo Tkachov
> On 25 Oct 2024, at 13:46, Richard Sandiford wrote: > > Kyrylo Tkachov writes: >> Thank you for the suggestions! I’m trying them out now. >> + if (rotamnt % BITS_PER_UNIT != 0) +return NULL_RTX; + machine_mode qimode; + if (!qimode_for_vec_perm (mode).exists (&qimo

[PATCH 1/3] Finish vectorizer pattern proper COND_EXPR transition

2024-10-25 Thread Richard Biener
The following tries to finish building proper GIMPLE COND_EXPRs in vectorizer pattern recognition. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-vect-patterns.cc (vect_recog_divmod_pattern): Build separate comparion pattern for the condition of a COND_EXPR pa

Re: [PATCH] Match: Simplify branch form 3 of unsigned SAT_ADD into branchless

2024-10-25 Thread Richard Biener
On Thu, Oct 24, 2024 at 4:08 PM wrote: > > From: Pan Li > > There are sorts of forms for the unsigned SAT_ADD. Some of them are > complicated while others are cheap. This patch would like to simplify > the complicated form into the cheap ones. For example as below: > > From the form 3 (branch)

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Richard Sandiford
Arsen Arsenović writes: > Hi! > > Jakub Jelinek writes: > >> Hi! >> >> On top of the previously posted leading whitespace patch, this change >> just replaces 8 consecutive spaces in leading whitespace by tab. >> The patch is too large (1MB xz -9e compressed), so I'm not even trying to >> split it

[PATCH 2/3] Finish vectorizer pattern proper COND_EXPR transition

2024-10-25 Thread Richard Biener
This fixes up vect_recog_ctz_ffs_pattern. Bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-vect-patterns.cc (vect_recog_ctz_ffs_pattern): Create a separate pattern stmt for the comparison in the generated COND_EXPR. --- gcc/tree-vect-patterns.cc | 7 +

[RFC PATCH] c-family: -Wleading-whitespace= argument spelling

2024-10-25 Thread Jakub Jelinek
Hi! On Thu, Oct 24, 2024 at 03:33:25PM -0400, Eric Gallager wrote: > On Thu, Oct 24, 2024 at 4:17 AM Jakub Jelinek wrote: > > I've tried to build stage3 with > > -Wleading-whitespace=blanks -Wtrailing-whitespace=blank > > -Wno-error=leading-whitespace=blanks -Wno-error=trailing-whitespace=blank

Re: [PATCH 2/2] c++/modules: Retrofit imported partial specs over existing implicit instantiations [PR113814]

2024-10-25 Thread Jason Merrill
On 10/24/24 5:10 PM, Nathaniel Shead wrote: On Thu, Oct 24, 2024 at 12:05:18PM -0400, Jason Merrill wrote: On 10/24/24 3:25 AM, Nathaniel Shead wrote: I wasn't sure whether I should include the ambiguity checking logic from process_partial_specialization; we don't do this anywhere else in the m

[PATCH] libstdc++: Fix complexity of drop_view::begin const [PR112641]

2024-10-25 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/backports? Also available in PR form at https://forge.sourceware.org/gcc/gcc-TEST/pulls/8 -- >8 -- Views are required to have a amortized O(1) begin(), but our drop_view's const begin overload is O(n) for non-common ranges. This patch re

[PATCH #7/7] handle TRUTH_ANDIF cond exprs in ifcombine_replace_cond (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-25 Thread Alexandre Oliva
The upcoming move of fold_truth_andor to ifcombine brings with it the possibility of TRUTH_ANDIF cond exprs. Handle them by splitting the cond so as to best use both BB insertion points, but only if they're contiguous. for gcc/ChangeLog * tree-ssa-ifcombine.c (ifcombine_replace_cond)

Re: [PATCH 1/2] libstdc++: Implement C++23 (P0429R9)

2024-10-25 Thread Patrick Palka
On Wed, 16 Oct 2024, Patrick Palka wrote: > On Mon, 30 Sep 2024, Patrick Palka wrote: > > > This implements the C++23 container adaptors std::flat_map and > > std::flat_multimap from P0429R9. The implementation is shared > > as much as possible between the two adaptors via a common base > > clas

Re: [PATCH 3/5] RISC-V: Adjust the gather-scatter testcases due to middle-end change

2024-10-25 Thread Robin Dapp
> After we have MASK_LEN_STRIDED_LOAD{STORE} in the middle-end, the > strided case need to be adjust for IR check. OK once the middle-end changes are in. -- Regards Robin

[PATCH] AArch64: Add more accurate constraint [PR117292]

2024-10-25 Thread Wilco Dijkstra
As shown in the PR, reload may only check the constraint in some cases and and not check the predicate is still valid for the resulting instruction. To fix the issue, add a new constraint which matches the predicate exactly. Passes regress & bootstrap, OK for commit? gcc/ChangeLog: PR ta

Re: [PATCH 4/5] RISC-V: Implement the MASK_LEN_STRIDED_LOAD{STORE}

2024-10-25 Thread Robin Dapp
> +(define_expand "mask_len_strided_store_" > + [(match_operand 0 "pmode_reg_or_0_operand") > + (match_operand 1 "pmode_reg_or_0_operand") > + (match_operand:V 2 "register_operand") > + (match_operand: 3 "vector_mask_operand") > + (match_operand 4 "autovec_length_ope

Re: [PATCH] c++: Attempt to implement C++26 P3034R1 - Module Declarations Shouldn't be Macros [PR114461]

2024-10-25 Thread Jason Merrill
On 8/8/24 4:44 AM, Jakub Jelinek wrote: This is an attempt to implement the https://wg21.link/p3034r1 paper, but I'm afraid the wording in the paper is bad for multiple reasons. I think I understand the intent, that the module name and partition if any shouldn't come from macros so that they can

Re: [PATCH] Add 'cobol' to Makefile.def, take 2

2024-10-25 Thread Xi Ruoyao
On Sun, 2024-10-13 at 20:44 -0400, James K. Lowden wrote: /* snip */ > In testing the patch with "git am" Please also use "git gcc-verify". See below for the incorrect changelog which would be caught by the command. > I got a warning about a blank line > at EOF, but I couldn't figure out where

[PATCH] testsuite: fixup tbaa test again

2024-10-25 Thread Sam James
Test was broken until r15-4684-g2d1d6be00257c5 which made it actually run and r15-4685-g091e45b4e97d1e which applied fixes other than the trivial rename. But more is needed: this gets the test working properly in terms of scanning the dump and handling the interaction w/ LTO with not producing an

Re: [PATCH v4 1/2] Match: Simplify (x != 0 ? x + ~0 : 0) to (x - x != 0).

2024-10-25 Thread Andrew Pinski
On Thu, Oct 24, 2024 at 6:22 PM Li Xu wrote: > > From: xuli > > When the imm operand op1=1 in the unsigned scalar sat_sub form2 below, > we can simplify (x != 0 ? x + ~0 : 0) to (x - x != 0), thereby eliminating > a branch instruction.This simplification also applies to signed integer. > > Form2:

Re: [PATCH 1/5] vec: Add quick_emplace_push/safe_emplace_push

2024-10-25 Thread Andrew Pinski
On Wed, Oct 23, 2024 at 12:28 AM Andrew Pinski wrote: > > On Tue, Oct 22, 2024 at 11:49 PM Richard Biener > wrote: > > > > On Tue, Oct 22, 2024 at 5:31 PM Andrew Pinski > > wrote: > > > > > > This adds quick_emplace_push and safe_emplace_push to vec. > > > These are like std::vector's emplace_b

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Joseph Myers
On Fri, 25 Oct 2024, Arsen Arsenović wrote: > Maybe we should go the other way around? Compressing eight spaces into > a tab leads to strange artifacts in diffs (where lines appear > misindented because some were aligned by tabs and some by spaces), and I also agree that spaces are preferable (g

[COMMITTED 25/35] ada: Disable self-referential with_clauses

2024-10-25 Thread Marc Poulhiès
From: Bob Duff Self-referential with_clauses (as in package body X says "with X;") cause trouble, such as duplicate nested instantiations when using container packages. This patch disables most of the processing by setting the Is_Implicit_With flag. It's not really implicit, but the subsequent pr

[COMMITTED 31/35] ada: Mark XUB types as nameless

2024-10-25 Thread Marc Poulhiès
From: Tom Tromey gdb does not need the name of XUB types. This patch changes the compiler to omit these names from the DWARF when minimal encodings are in use. gcc/ada/ChangeLog: * gcc-interface/decl.cc (gnat_to_gnu_entity): Set TYPE_NAMELESS on XUB types. Tested on x86_64-pc-

Re: [PATCH] Assorted --disable-checking fixes [PR117249]

2024-10-25 Thread Thomas Schwinge
Hi Jakub! Just one item, quickly: On 2024-10-25T10:19:58+0200, Jakub Jelinek wrote: > We have currently 3 different definitions of gcc_assert macro, one used most > of the time (unless --disable-checking) which evaluates the condition at > runtime and also checks it at runtime, then one for --di

Re: [PATCH] lto: Handle RAW_DATA_CST in compare_tree_sccs_1 [PR117201]

2024-10-25 Thread Richard Biener
On Fri, 25 Oct 2024, Jakub Jelinek wrote: > Hi! > > I've missed I need to add RAW_DATA_CST support in compare_tree_sccs_1, > because without that it considers all RAW_DATA_CSTs to be equivalent, > regardless of their length or content. > > Fixed thusly, bootstrapped/regtested on x86_64-linux and

[PATCH v3 1/4] Hard register constraints

2024-10-25 Thread Stefan Schulze Frielinghaus
Implement hard register constraints of the form {regname} where regname must be a valid register name for the target. Such constraints may be used in asm statements as a replacement for register asm and in machine descriptions. Due to optimizations it is not unexpected if two or more inputs requi

[PATCH v3 0/4] Hard Register Constraints

2024-10-25 Thread Stefan Schulze Frielinghaus
This is a follow-up to https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663238.html The primary changes are about error handling and documentation updates. Now, we error out whenever a hard register constraint is used more than once across an alternative for outputs or inputs. For example

[PATCH v3 2/4] Error handling for hard register constraints

2024-10-25 Thread Stefan Schulze Frielinghaus
This implements error handling for hard register constraints including potential conflicts with register asm operands. In contrast to register asm operands, hard register constraints allow more than just one register per operand. Even more than just one register per alternative. For example, a v

[PATCH v3 4/4] Rewrite register asm into hard register constraints

2024-10-25 Thread Stefan Schulze Frielinghaus
Currently a register asm already materializes during expand. This means, a hard register is allocated for the very first access of a register asm as e.g. in an assignment. As a consequence this might lead to suboptimal register allocation if the assignment and the using asm statement are spread f

[PATCH v3 3/4] genoutput: Verify hard register constraints

2024-10-25 Thread Stefan Schulze Frielinghaus
Since genoutput has no information about hard register names we cannot statically verify those names in constraints of the machine description. Therefore, we have to do it at runtime. Although verification shouldn't be too expensive, restrict it to checking builds. This should be sufficient since

Re: arm: Improvements to arm_noce_conversion_profitable_p call [PR 116444]

2024-10-25 Thread Richard Earnshaw (lists)
On 18/10/2024 16:53, Andre Vieira (lists) wrote: > Sorry for the delay, some other work popped up in between and this had some > latent issues. They should all be addressed now in this new patch. > > > When not dealing with the special armv8.1-m.main conditional instructions > case make sure it

Re: [PATCH 4/6] aarch64: Optimize vector rotates into REV* instructions where possible

2024-10-25 Thread Kyrylo Tkachov
Thank you for the suggestions! I’m trying them out now. > On 24 Oct 2024, at 21:11, Richard Sandiford wrote: > > Kyrylo Tkachov writes: >> Hi Richard, >> >>> On 23 Oct 2024, at 11:30, Richard Sandiford >>> wrote: >>> >>> Kyrylo Tkachov writes: Hi all, Some vector rotate ope

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Arsen Arsenović
Hi! Jakub Jelinek writes: > Hi! > > On top of the previously posted leading whitespace patch, this change > just replaces 8 consecutive spaces in leading whitespace by tab. > The patch is too large (1MB xz -9e compressed), so I'm not even trying to > split it up into 4+ pieces to fit under the m

Re: Patch ping - Re: [PATCH] genmatch: Add selftests to genmatch for diag_vfprintf

2024-10-25 Thread Richard Biener
On Fri, 25 Oct 2024, Jakub Jelinek wrote: > On Tue, Oct 15, 2024 at 11:47:45AM +0200, Jakub Jelinek wrote: > > The following patch adds selftests to genmatch to verify the new printing > > routine there. > > So that I can rely on HAVE_DECL_FMEMOPEN (host test), the tests are done > > solely in sta

Re: [PATCH] Replace 8 consecutive spaces in leading whitespace by tab

2024-10-25 Thread Sam James
Jakub Jelinek writes: > On Fri, Oct 25, 2024 at 01:25:25PM +0200, Arsen Arsenović wrote: >> Maybe we should go the other way around? Compressing eight spaces into >> a tab leads to strange artifacts in diffs (where lines appear >> misindented because some were aligned by tabs and some by spaces)

Re: libstdc++-v3: do not duplicate some math functions when using newlib

2024-10-25 Thread Andre Vieira (lists)
Hey, I have to admit I am not super familiar with long doubles, either than knowing they are 128-bit FP representations... but bisect has pointed me to this patch when investigating a regression on aarch64_be-none-elf for the libstdc++ testcase: 26_numerics/complex/13450.cc After some reduct

Re: [PATCH 4/6] aarch64: Optimize vector rotates into REV* instructions where possible

2024-10-25 Thread Richard Sandiford
Kyrylo Tkachov writes: >> On 25 Oct 2024, at 13:46, Richard Sandiford >> wrote: >> >> Kyrylo Tkachov writes: >>> Thank you for the suggestions! I’m trying them out now. >>> > + if (rotamnt % BITS_PER_UNIT != 0) > +return NULL_RTX; > + machine_mode qimode; > + if (!qimod

Re: [PATCH] match.pd: Add std::pow folding optimizations.

2024-10-25 Thread Jennifer Schmitz
> On 25 Oct 2024, at 14:39, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Wed, 23 Oct 2024, Jennifer Schmitz wrote: > >> >> >>> On 22 Oct 2024, at 13:14, Richard Biener wrote: >>> >>> External email: Use caution opening links or attachments >

  1   2   >