Re: [PATCH] i386: Rewrite ieee_minmax pattern with if_then_else

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 04:04:55PM +0800, Hongyu Wang wrote: > Following the discussion in pr116738, the insn for UNSPEC_IEEE_MAXMIN > actually matches the behavior of if_then_else, so remove the UNSPEC and > rewrite related pattern with if_then_else. I'm not sure if it is necessarily always a win

Re: [PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-15 Thread Jennifer Schmitz
> On 7 Nov 2024, at 13:47, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Tue, 5 Nov 2024, Jennifer Schmitz wrote: > >> We are working on a patch to improve the codegen for the following test case: >> uint64x2_t foo (uint64x2_t r) { >>uint32x4

Re: Fix type of malloc call in trans-expr.cc

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 07:45:32AM +, Paul Richard Thomas wrote: > Hi Jakub, Honza's catch. > Good catch! Does it fix any specific PR? Dunno. I think even without a PR it can be backported after a while. Jakub

[PATCH] i386: Rewrite ieee_minmax pattern with if_then_else

2024-11-15 Thread Hongyu Wang
Hi, Following the discussion in pr116738, the insn for UNSPEC_IEEE_MAXMIN actually matches the behavior of if_then_else, so remove the UNSPEC and rewrite related pattern with if_then_else. Bootstrapped & regtested on x86-64-pc-linux-gnu. Ok for trunk? gcc/ChangeLog: * config/i386/i386-

[committed] testsuite: Change 3 tests from c++14 to c++11

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 12:04:11AM -0500, Marek Polacek wrote: > This test FAILs due to the second dg-do compile: > FAIL: g++.dg/tree-ssa/pr58483.C -std=gnu++98 (test for excess errors) > and it passes in C++11 as well. The other tests are valid C++11, so we can run them in C++11 as well (just th

Re: [PATCH v2] RISC-V: Improve vsetvl vconfig alignment

2024-11-15 Thread Robin Dapp
> So this is really the biggest question in my mind. When we kicked this > around in the patchwork meeting several weeks ago I got the impression > Robin had a correctness concern with this code. Robin, do you remember > what had you worried? Unfortunately I haven't managed to get back to this

Re: [PATCH 1/4] tree-optimization/117558 - peeling for gaps and VL vectors

2024-11-15 Thread Richard Sandiford
Richard Biener writes: > The following ensures that peeling a single iteration for gaps is > sufficient by enforcing niter masking (partial vector use) given > we cannot (always) statically decide when the vector size isn't known. > The condition guarding this and thus statically giving a pass in

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jonathan Wakely
On 14/11/24 23:09 -0500, Jason Merrill wrote: On 10/18/24 9:38 AM, Jason Merrill wrote: This patch is not ready for integration, but I'd like to get feedback on the approach (and various specific questions below). An updated version: From 533c496ae39ba2cf1783136e1da5ae9f0f61d4f7 Mon Sep 17

Re: [PATCH 1/3] AArch64: Add baseline tune

2024-11-15 Thread Kyrylo Tkachov
> On 14 Nov 2024, at 18:40, Wilco Dijkstra wrote: > > > Cleanup the extra tune defines by introducing AARCH64_EXTRA_TUNE_BASE as a > common base supported by all modern cores. Initially set it to > AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND. No change in generated code. > > Passes regress & boo

[PATCH v2 1/5] vect: Force alignment peeling to vectorize more early break loops

2024-11-15 Thread Alex Coplan
Hi, This is a v2 which hopefully addresses the feedback for v1 of the 1/5 patch, originally posted here: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/48.html As mentioned on IRC, it will need follow-up work to fix up latent profile issues, but that can be done during stage 3. We wi

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jason Merrill
On 11/15/24 9:20 AM, Jonathan Wakely wrote: On 15/11/24 08:53 -0500, Jason Merrill wrote: On 11/15/24 6:04 AM, Jonathan Wakely wrote: On 14/11/24 23:09 -0500, Jason Merrill wrote: Since bits/stdc++.h also intends to include the whole standard library, I include it rather than duplicate it. 

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Martin Jambor
Hi, On Tue, Nov 05 2024, Jan Hubicka wrote: >> Hi, >> >> when inlining (during the analysis phase) a call graph edge, we update >> all pass-through jump functions corresponding to edges going out of >> the newly inlined function to be relative to the function into which >> we are inlining or to e

Re: [PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
On Fri, Nov 15, 2024 at 10:41 PM Andrew Pinski wrote: > > On Fri, Nov 15, 2024 at 1:30 PM Christoph Müllner > wrote: > > > > This extends forwprop by yet another VEC_PERM optimization: > > It attempts to blend two isomorphic vector sequences by using the > > redundancy in the lane utilization in

Re: [PATCH 4/8] ipa: Better value ranges for zero pointer constants

2024-11-15 Thread Martin Jambor
Hi, On Thu, Nov 07 2024, Aldy Hernandez wrote: > Jan Hubicka writes: > >>> > 2024-11-01 Martin Jambor >>> > >>> > * ipa-prop.cc (ipa_compute_jump_functions_for_edge): When creating >>> > value-range jump functions from pointer type constant zero, do so >>> > as if it wa

Re: [PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Joseph Myers
On Sat, 16 Nov 2024, Florian Weimer wrote: > +@opindex Wdeprecated-non-prototype > +@opindex Wno-deprecated-non-prototype > +@item -Wdeprecated-non-prototype @r{(C and Objective-C only)} > +Warn if a function declarated with an empty parameter list @samp{()} is > +called with one or more arguments

Re: [PATCH v3] forwprop: Try to merge two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
On Thu, Nov 14, 2024 at 3:55 PM Christoph Müllner wrote: > > On Thu, Nov 14, 2024 at 3:07 PM Richard Biener wrote: > > > > On Thu, 14 Nov 2024, Christoph Müllner wrote: > > > > > This extends forwprop by yet another VEC_PERM optimization: > > > It attempts to merge two isomorphic vector sequences

[PATCH v1 3/4] Rename SEH functions for reuse in AArch64

2024-11-15 Thread Evgeny Karpov
v1-0003-Rename-SEH-functions-for-reuse-in-AArch64.patch Description: v1-0003-Rename-SEH-functions-for-reuse-in-AArch64.patch

[PATCH v1 2/4] aarch64: Add stdcall and cdecl attributes

2024-11-15 Thread Evgeny Karpov
This patch adds stdcall and cdecl attributes, which might be used for DLL export/import in MinGW. gcc/ChangeLog: * config/aarch64/aarch64.cc: Update. --- gcc/config/aarch64/aarch64.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64

[PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Florian Weimer
This is another recent GCC extension whose use is apparently difficult to spot in code reviews. The name of the option is due to Jonathan Wakely. Part of it could apply to C++ as well (for labels at the end of a compound statement). gcc/c-family/ * c-opts.cc (c_common_post_options): Ini

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Andrew Pinski
On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer wrote: > > This is another recent GCC extension whose use is apparently > difficult to spot in code reviews. > > The name of the option is due to Jonathan Wakely. Part of it > could apply to C++ as well (for labels at the end of a compound > statemen

[PATCH v1 3/4] Rename SEH functions for reuse in AArch64

2024-11-15 Thread Evgeny Karpov
From 4274d1126a1aa60d16dca1cbf7dde1c5ee344bf7 Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Fri, 15 Nov 2024 13:36:41 +0100 Subject: [PATCH v1 3/4] Rename SEH functions for reuse in AArch64 This patch renames functions related to SEH functionality. These functions will be reused in the aarch

[PATCH v1 4/4] aarch64: Add SEH, stack unwinding and C++ exceptions

2024-11-15 Thread Evgeny Karpov
From 69ce2026b10711b32595d58e23f92f54e6c718c2 Mon Sep 17 00:00:00 2001 From: Evgeny Karpov Date: Fri, 15 Nov 2024 13:14:18 +0100 Subject: [PATCH v1 4/4] aarch64: Add SEH, stack unwinding and C++ exceptions This patch reuses the existing SEH, stack unwinding and C++ exceptions from ix86 and implem

Re: [PATCH] Add new hardreg PRE pass

2024-11-15 Thread Andrew Carlotti
On Tue, Nov 12, 2024 at 10:42:50PM +, Richard Sandiford wrote: > Sorry for the slow review. I think Jeff's much better placed to comment > on this than I am, but here's a stab. Mostly it looks really good to me > FWIW. > > Andrew Carlotti writes: > > This pass is used to optimise assignment

[PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
This extends forwprop by yet another VEC_PERM optimization: It attempts to blend two isomorphic vector sequences by using the redundancy in the lane utilization in these sequences. This redundancy in lane utilization comes from the way how specific scalar statements end up vectorized: two VEC_PERMs

Re: [PATCH v4] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Andrew Pinski
On Fri, Nov 15, 2024 at 1:30 PM Christoph Müllner wrote: > > This extends forwprop by yet another VEC_PERM optimization: > It attempts to blend two isomorphic vector sequences by using the > redundancy in the lane utilization in these sequences. > This redundancy in lane utilization comes from the

Re: [PATCH RFC] libcpp, libstdc++: add __has_import builtin

2024-11-15 Thread Ville Voutilainen
On Sat, 16 Nov 2024 at 01:12, Jason Merrill wrote: > > Does this seem like an interesting direction? > > -- 8< -- > > A problem with coexistence of module std and the library headers is that > import and then #include tends to break (PR99000). But even with that > fixed, it might be useful to be

[committed] c: Default to -std=gnu23

2024-11-15 Thread Joseph Myers
Change the default language version for C compilation from -std=gnu17 to -std=gnu23. A few tests are updated to remove local definitions of bool, true and false (where making such an unconditional test change seemed to make more sense than changing the test conditionally earlier or building it wit

[PATCH 1/2] c++: print z candidate count and number them

2024-11-15 Thread David Malcolm
This patch is a followup to: "c++: use diagnostic nesting [PR116253]" Following Sy Brand's UX suggestions in P2429R0 for example 1, this patch tweaks print_z_candidates to add a note about the number of candidates, and adds a candidate number to each one. Various examples of output can be seen

[PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-15 Thread Jonathan Wakely
While working on fancy pointer support for the linked lists I noticed they didn't have any debug assertions. This adds the obvious non-empty assertions to front(), back(), pop_front() and pop_back(). For the pop members, adding an assertion to the underlying function that erases a member means it

Re: [RFC 3/9] aarch64: add new insn definition for st2g

2024-11-15 Thread Indu Bhagat
On 11/13/24 3:02 PM, Richard Sandiford wrote: Indu Bhagat writes: Store Allocation Tags (st2g) is an Armv8.5-A memory tagging (MTE) instruction. It stores an allocation tag to two tag granules of memory. TBD: - Not too sure what is the best way to generate the st2g yet; A subsequent pa

[committed] libstdc++: Use -C option to run recursive make in sub-directories

2024-11-15 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * Makefile.am: Use $(MAKE) -C dir instead of cd dir && $(MAKE). * Makefile.in: Regenerate. --- We require GNU Make, so this is always supported. Tested x86_64-linux. Pushed to trunk. libstdc++-v3/Makefile.am | 4 ++-- libstdc++-v3/Makefile.in | 4 ++-- 2

Re: [PATCH] libstdc++: Add debug assertions to std::list and std::forward_list

2024-11-15 Thread Jonathan Wakely
On Sat, 16 Nov 2024, 01:21 Jonathan Wakely, wrote: > On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote: > > > > While working on fancy pointer support for the linked lists I noticed > > they didn't have any debug assertions. This adds the obvious non-empty > > assertions to front(), back(), po

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Andrew MacLeod
On 11/15/24 10:19, Jan Hubicka wrote: I have seen this happen when the result of the intersection is an empty set (one of the few comments in value-range.h actually describes an undefined range as an "empty range"). I have only seen this happen when the edge has been redirected to builtin_unre

[PATCH] Add -f{,no-}assume-sane-operators-new-delete{,={0,1,2}} options [PR110137]

2024-11-15 Thread Jakub Jelinek
Hi! The following patch adds a new tristate option for optimizations related to replaceable global operators new/delete. The option isn't called -fassume-sane-operator-new (which clang++ implements), because 1) clang++ option means something different; initially it was an option to add malloc a

Re: [PATCH] ranger, v2: Handle nonnull_if_nonzero attribute [PR117023]

2024-11-15 Thread Andrew MacLeod
On 11/15/24 04:36, Jakub Jelinek wrote: On Thu, Nov 14, 2024 at 06:25:49PM +0100, Jakub Jelinek wrote: On Thu, Nov 14, 2024 at 10:05:05AM -0500, Andrew MacLeod wrote: The inferred range mechanism is also initialized using cfun, so again introducing a use of cfun shouldnt be an issue. Somethi

Re: [PATCH v4 4/7] OpenMP: C++ front-end support for dispatch + adjust_args

2024-11-15 Thread Tobias Burnus
Hi PA, * I believe that all prep + middle end patches are approved and ready to go * Pending for C and C++ are the three patches, attached to the email I am hereby replying to - for the C and the C++ front end and the common C/C++ testcases. → Those 3 patches LGTM - thanks! Related but not

[PATCH] Introduce -flto-partition=locality

2024-11-15 Thread Kyrylo Tkachov
Hi all, This is a patch submission following-up from the RFC at: https://gcc.gnu.org/pipermail/gcc/2024-November/245076.html The patch is rebased and retested against current trunk, some debugging code removed, comments improved and some fixes added as I've we've done more testing. --

Re: [PATCH][RFC][PR117093] match.pd: Fold vec_perm with view_convert

2024-11-15 Thread Jennifer Schmitz
> On 15 Nov 2024, at 12:05, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > On Fri, 15 Nov 2024, Jennifer Schmitz wrote: > >> >> >>> On 7 Nov 2024, at 13:47, Richard Biener wrote: >>> >>> External email: Use caution opening links or attachments >>

Re: [PATCH] c: Introduce -Wfree-labels

2024-11-15 Thread Florian Weimer
* Jakub Jelinek: > On Fri, Nov 15, 2024 at 08:13:28PM +0100, Florian Weimer wrote: >> * Andrew Pinski: >> >> > On Fri, Nov 15, 2024 at 9:13 AM Florian Weimer wrote: >> >> >> >> This is another recent GCC extension whose use is apparently >> >> difficult to spot in code reviews. >> >> >> >> The n

[PATCH 2/2] diagnostics: suppress "note: " prefix in nested diagnostics [PR116253]

2024-11-15 Thread David Malcolm
This patch is a followup to: "c++: use diagnostic nesting [PR116253]" This patch tweaks how text output with experimental-nesting=yes prints nested diagnostics, by omitting the leading "note: " from nested notes. This reduces the amount of visual cruft the user has to ignore when reading C++ te

[PATCH] c++: fix colorization in print_conversion_rejection

2024-11-15 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. gcc/cp/ChangeLog: * call.cc (print_conversion_rejection): When we're using the location of the param in the decl, match the color in the quoted source to that of %qI in the message. Signed-off-by: David Malcolm

[PATCH] c++: tweak colorization of incompatible declspecs

2024-11-15 Thread David Malcolm
Introduce a helper function for complaining about "signed unsigned" and "short long". Add colorization there so that e.g. the 'signed' and 'unsigned' are given consisten contrasting colors in both the message and the quoted source. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. g

[PATCH] c: Implement -Wdeprecated-non-prototype

2024-11-15 Thread Florian Weimer
This warning covers the C23 incompibilities resulting from using () as parameter lists in function declarations. The warning name comes from Clang. The implementation is not perfect because GCC treats these two declarations as equivalent: void f (); void f (not_a_type); This is a bit confus

[PATCH RFC] libcpp, libstdc++: add __has_import builtin

2024-11-15 Thread Jason Merrill
Does this seem like an interesting direction? -- 8< -- A problem with coexistence of module std and the library headers is that import and then #include tends to break (PR99000). But even with that fixed, it might be useful to be able to test whether a module has been imported. So, this patch i

[PATCH v5] forwprop: Try to blend two isomorphic VEC_PERM sequences

2024-11-15 Thread Christoph Müllner
This extends forwprop by yet another VEC_PERM optimization: It attempts to blend two isomorphic vector sequences by using the redundancy in the lane utilization in these sequences. This redundancy in lane utilization comes from the way how specific scalar statements end up vectorized: two VEC_PERMs

[r15-5324 Regression] FAIL: gcc.dg/tree-ssa/pr117093.c (test for excess errors) on Linux/x86_64

2024-11-15 Thread haochen.jiang
On Linux/x86_64, c83e2d47574fd9a21f257e0f0d7e350c3f1b0618 is the first bad commit commit c83e2d47574fd9a21f257e0f0d7e350c3f1b0618 Author: Jennifer Schmitz Date: Mon Nov 4 07:56:09 2024 -0800 match.pd: Fold vec_perm with view_convert caused FAIL: gcc.dg/tree-ssa/pr117093.c (test for exces

[PATCH 2/2] testsuite: i386: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but this test now triggers -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the test accordingly. gcc/testsuite/ChangeLog: * gcc.target/i386/pr66891.c: Pass -Wold-style-function-definition. --- OK i

Re: [PATCH 2/2] testsuite: i386: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
... with s/-function// and the commit message and ChangeLogs fixed, of course.

[PATCH] RISC-V:Support N32(32-bit ABI on 64-bit ISA) in riscv

2024-11-15 Thread Liao Shihua
RISC-V N32 ABI means using 32-bit ABI on 64-bit ISA, the discussion in https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/381 . At this moment, N32 is supported batemental toolchain. Three OpenSource RTOS using this feature and have been merged in upstream. You can see them in EasyXem (A

Re: [PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Jeff Law
On 11/15/24 8:16 PM, Sam James wrote: r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pas

Re: [PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
> On 16 Nov 2024, at 03:28, Jeff Law wrote: > >  > >> On 11/15/24 8:16 PM, Sam James wrote: >> r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these >> tests now trigger -Wold-style-function-definition. Follow Joseph's advice >> in that commit and tweak the tests accordingly.

[PATCH v2 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pass -Wno-old-style-definition. * gcc.dg/graphi

[RFC] PR81358: Enable automatic linking of libatomic

2024-11-15 Thread Prathamesh Kulkarni
Hi, The attached patch attempts to enable automatic linking of libatomic, and makes the following changes: (1) Introduces a new driver option -f[no]-link-libatomic, which is enabled by default. (2) Adds new dependencies in toplevel Makefile.def so libatomic is built before other target libraries

[PATCH 1/2] testsuite: graphite: adapt to -std=gnu23 default change

2024-11-15 Thread Sam James
r15-5327-g55e3bd376b2214 changes the default to -std=gnu23 but these tests now trigger -Wold-style-function-definition. Follow Joseph's advice in that commit and tweak the tests accordingly. gcc/testsuite/ChangeLog: * gcc.dg/graphite/id-15.c: Pass -Wold-style-function-definition.

[PATCH] rs6000: Remove entry for V1TImode from VI_unit

2024-11-15 Thread Kewen Lin
Hi, When making a patch to adjust VECTOR_P8_VECTOR rs6000_vector enum, I noticed that V1TImode's mode attribute in VI_unit VECTOR_UNIT_ALTIVEC_P (V1TImode) is never true, since VECTOR_UNIT_ALTIVEC_P checks if vector_unit[V1TImode] is equal to VECTOR_ALTIVEC, but vector_unit[V1TImode] can only be V

[PATCH] rs6000: Adjust FLOAT128 signbit2 expander for P8 LE [PR114567]

2024-11-15 Thread Kewen Lin
Hi, As the associated test case shows, signbit generated assembly is sub-optimal for _Float128 argument from memory on P8 LE. On P8 LE, p8swap pass puts an explicit AND -16 on the memory, which causes mode_dependent_address_p considers it's invalid to change its mode and combine fails to make use

[PATCH] gimple: Add limit after which slower switchlower algs are used [PR117091] [PR117352]

2024-11-15 Thread Filip Kastl
Hi, Andi's greedy bit test finding algorithm was reverted. I found a fix for the problem that caused the revert. I made this patch to reintroduce the greedy alg into GCC. However I think we should keep the old slow but more powerful algorithm so I added a limit on the number of cases of the swi

[PATCH 2/4] RISC-V: Add Zicfilp ISA extension.

2024-11-15 Thread Monk Chiang
This patch only support landing pad value is 1. The next version will implement function signature based labeling scheme. RISC-V CFI SPEC: https://github.com/riscv/riscv-cfi gcc/ChangeLog: * gcc/common/config/riscv/riscv-common.cc: Add ZICFILP ISA string. * gcc/config.gc

[PATCH 1/4] RISC-V: Add Zicfiss ISA extension.

2024-11-15 Thread Monk Chiang
This patch is implemented according to the RISC-V CFI specification. It supports the generation of shadow stack instructions in the prologue, epilogue, non-local gotos, and unwinding. RISC-V CFI SPEC: https://github.com/riscv/riscv-cfi gcc/ChangeLog: * common/config/riscv/riscv-common.cc:

[PATCH 4/4] RISC-V: Add -fcf-protection=[full|branch|return] to enable zicfiss, zicfilp.

2024-11-15 Thread Monk Chiang
gcc/ChangeLog: * gcc/config/riscv/riscv.cc (is_zicfilp_p): New function. (is_zicfiss_p): New function. * gcc/config/riscv/riscv-zicfilp.cc: Update. * gcc/config/riscv/riscv.h: Update. * gcc/config/riscv/riscv.md: Update. --- gcc/config/riscv/risc

[PATCH 3/4] RISC-V: Add .note.gnu.property for ZICFILP and ZICFISS ISA extension

2024-11-15 Thread Monk Chiang
gcc/ChangeLog: * gcc/config/riscv/riscv.cc (riscv_file_end_indicate_exec_stack): Add .note.gnu.property. * gcc/config/riscv/linux.h (TARGET_ASM_FILE_END): Define. libgcc/ChangeLog: * libgcc/config/riscv/crti.S: Add lpad instructions. * libgcc/config/riscv/cr

Re: [PATCH] testsuite: arm: Prune incremental link warning

2024-11-15 Thread Christophe Lyon
On Thu, 14 Nov 2024 at 18:33, Torbjorn SVENSSON wrote: > > > > On 2024-11-14 16:53, Christophe Lyon wrote: > > On Sun, 10 Nov 2024 at 17:44, Torbjörn SVENSSON > > wrote: > >> > >> Ok for trunk and releases/gcc-14? > >> > >> -- > >> > >> When the feature "needs_status_wrapper" in dejagnu is used,

Re: [PATCH] Introduce feeble_inline attribute [PR93008]

2024-11-15 Thread Jonathan Wakely
On Thu, 14 Nov 2024 at 18:16, Jan Hubicka wrote: > > > Hi! > > > > The inlining heuristics uses DECL_DECLARED_INLINE_P (whether a function > > has been explicitly marked inline; that can be inline keyword, or for C++ > > also constexpr keyword or defining a function inside of a class definition) >

[PATCH 6/8] aarch64: Add support for SME_F16F16

2024-11-15 Thread Richard Sandiford
This patch adds support for the SME_F16F16 extension. The extension adds two new instructions to convert from a single vector of f16s to two vectors of f32s. It also adds f16 variants of existing SME ZA instructions. gcc/ * config/aarch64/aarch64-option-extensions.def (sme-f16f16

[PATCH 5/8] aarch64: Add support for SVE_B16B16

2024-11-15 Thread Richard Sandiford
This patch adds support for the SVE_B16B16 extension, which provides non-widening BF16 versions of existing instructions. Mostly it's just a simple extension of iterators. The main complications are: (1) The new instructions have no immediate forms. This is easy to handle for the cond_* pat

[PATCH 4/8] aarch64: Fix the choice of unspec in two SME patterns

2024-11-15 Thread Richard Sandiford
@aarch64_sme_write and *aarch64_sme_write_plus were using UNSPEC_SME_READ instead of UNSPEC_SME_WRITE. gcc/ * config/aarch64/aarch64-sme.md (@aarch64_sme_write) (*aarch64_sme_write_plus): Use UNSPEC_SME_WRITE instead of UNSPEC_SME_READ. --- gcc/config/aarch64/aarch64-sme.m

Re: Fix type of malloc call in trans-expr.cc

2024-11-15 Thread Jan Hubicka
> Hi Jakub, > > Good catch! Does it fix any specific PR? > > If you don't have the time, I would be happy to apply the correction to > 13-branch through to mainline. I caught it with my WIP patch to improve tree-ssa-dce. I am not aware it can produce wrong code. It will likely lead to missed o

[PATCH 8/8] aarch64: Add support for SME2p1

2024-11-15 Thread Richard Sandiford
This patch adds support for FEAT_SME2p1. There are two sets of new instructions: MOVAZ to read from ZA and zero the source data, and new forms of ZERO. All of them require streaming mode. MOVAZ can't reuse the existing UNSPEC_SME_READ* patterns because of the write to ZA. I did wonder about try

[PATCH 7/8] aarch64: Add support for SME_B16B16

2024-11-15 Thread Richard Sandiford
This patch adds support for the SME_B16B16 extension. It follows similar lines to the SME_F16F16 extension added earlier. gcc/ * config/aarch64/aarch64-option-extensions.def (sme-b16b16): New extension. * doc/invoke.texi: Document it. * config/aarch64/aarch64.h (TA

Re: [PATCH v4 6/7] OpenMP: Fortran front-end support for dispatch + adjust_args

2024-11-15 Thread Tobias Burnus
Hi, Paul-Antoine Arras wrote: This patch adds support for the `dispatch` construct and the `adjust_args` clause to the Fortran front-end. Handling of `adjust_args` across translation units is missing due to PR115271. First, can you add a run-time test? [I think it helps to have at least one

Re: 'I' and 'U' fn spec specifiers

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Jan Hubicka wrote: > Hi, > To implement pointer parameters reproducible and unsequenced I would like to > use fnspec built at callgraph construction time. Pointer parameters are > either > const or non-const. After discussion with Jens, I now understand that memory > pointe

Re: [RFC][RISC-V] Add target dependent pass to optimize related permutation constants

2024-11-15 Thread Jeff Law
On 11/15/24 12:17 AM, Richard Biener wrote: On Thu, Nov 14, 2024 at 10:41 PM Jeff Law wrote: Several weeks ago I was looking at SATD and realized that we had loads of permutation constants that could be implemented as a trivial adjustment to a prior loaded permutation constant. For exampl

Re: [PATCH v2] MATCH: Simplify `min(a, b) op max(a, b)` to `a op b` [PR109401]

2024-11-15 Thread Eikansh Gupta
Hi Jeff, The patch has support for both. In the test cases, approx half the test cases have min(a, b) op max(a, b) and the other half have max(a, b) op min(a, b). Regards, Eikansh From: Andrew Pinski Sent: Friday, November 15, 2024 7:03 AM To: Jeff Law Cc: Eika

Re: [PATCH] Introduce feeble_inline attribute [PR93008]

2024-11-15 Thread Jonathan Wakely
On Fri, 15 Nov 2024 at 12:02, Jakub Jelinek wrote: > > On Fri, Nov 15, 2024 at 11:25:00AM +, Jonathan Wakely wrote: > > On Thu, 14 Nov 2024 at 18:16, Jan Hubicka wrote: > > > > > > > Hi! > > > > > > > > The inlining heuristics uses DECL_DECLARED_INLINE_P (whether a function > > > > has been e

[PATCH 2/8] aarch64: Refactor SVE predicated-to-unpredicated splits

2024-11-15 Thread Richard Sandiford
There are separate patterns for predicated FADD, FSUB, and FMUL. Previously they each had their own in-built split to convert the instruction to unpredicated form where appropriate. However, it's more convenient for later patches if we use a single separate split instead. gcc/ * config/aa

[PATCH 3/8] aarch64: Rename some SME iterators

2024-11-15 Thread Richard Sandiford
This patch just renames the iterators SME_READ and SME_WRITE to SME_READ_HV and SME_WRITE_HV, to distinguish them from other forms of ZA read and write. gcc/ * config/aarch64/iterators.md (SME_READ): Rename to... (SME_READ_HV): ...this. (SME_WRITE): Rename to... (SM

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jonathan Wakely
On Fri, 15 Nov 2024 at 15:12, Jason Merrill wrote: > > On 11/15/24 9:20 AM, Jonathan Wakely wrote: > > On 15/11/24 08:53 -0500, Jason Merrill wrote: > >> On 11/15/24 6:04 AM, Jonathan Wakely wrote: > >>> On 14/11/24 23:09 -0500, Jason Merrill wrote: > > Since bits/stdc++.h also intends to inc

Re: [PATCH 5/8] ipa: Update value range jump functions during inlining

2024-11-15 Thread Jan Hubicka
> > I have seen this happen when the result of the intersection is an empty > set (one of the few comments in value-range.h actually describes an > undefined range as an "empty range"). I have only seen this happen when > the edge has been redirected to builtin_unreachable because, the has > been

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jonathan Wakely
On Fri, 15 Nov 2024 at 15:20, Jonathan Wakely wrote: > > On Fri, 15 Nov 2024 at 15:12, Jason Merrill wrote: > > > > On 11/15/24 9:20 AM, Jonathan Wakely wrote: > > > On 15/11/24 08:53 -0500, Jason Merrill wrote: > > >> On 11/15/24 6:04 AM, Jonathan Wakely wrote: > > >>> On 14/11/24 23:09 -0500, J

[PATCH 1/3] libstdc++: Refactor std::list::size() for cxx11 ABI

2024-11-15 Thread Jonathan Wakely
Remove some preprocessor conditionals by moving the _M_size member for the cxx11 ABI into a new base class, which is empty for the gcc4-compat ABI. Move some unused members that are only retained for ABI compatibility to the end of _List_base and add an explanatory comment. Stop using list::_M_nod

[PATCH 3/3] libstdc++: Add fancy pointer support to std::list [PR57272]

2024-11-15 Thread Jonathan Wakely
Currently std::list uses raw pointers to connect its nodes, which is non-conforming. We should use the allocator's pointer type everywhere that a "pointer" is needed. Because the existing types like _List_node are part of the ABI now, we can't change them. To support nodes that are connected by fa

[PATCH 2/3] libstdc++: Stop using _Self typedefs in std::list iterators

2024-11-15 Thread Jonathan Wakely
We can just use the injected-class-name instead of defining a new name. That seems simpler. libstdc++-v3/ChangeLog: * include/bits/stl_list.h (_List_iterator): Remove _Self typedef and just use injected-class-name instead. (_List_const_iterator): Likewise. --- Tested x86_

[PATCH v2] RISC-V: Tie MUL and DIV masks to the M extension

2024-11-15 Thread Dimitar Dimitrov
When configuring GCC for RV32EC with: ./configure \ --target=riscv32-none-elf \ --with-multilib-generator="rv32ec-ilp32e--" \ --with-abi=ilp32e \ --with-arch=rv32ec Then the build fails becaus

Re: [PATCH] aarch64: Use SVE SUBR instruction with Neon modes

2024-11-15 Thread Andrew Pinski
On Thu, Nov 14, 2024 at 7:50 PM Soumya AR wrote: > > The SVE SUBR instruction performs a reversed subtract from an immediate. > > This patches enables the emission of SUBR for Neon modes and avoids the need > to > materialise an explicit constant. > > For example, the below test case: > > typedef

Re: [PATCH v4 5/7] OpenMP: common C/C++ testcases for dispatch + adjust_args

2024-11-15 Thread Tobias Burnus
Paul-Antoine Arras wrote: OpenMP: common C/C++ testcases for dispatch + adjust_args gcc/testsuite/ChangeLog: ... libgomp/ChangeLog: * testsuite/libgomp.c-c++-common/dispatch-1.c: New test. * testsuite/libgomp.c-c++-common/dispatch-2.c: New test. LGTM

Re: [COMMITTED] gcc: regenerate configure

2024-11-15 Thread Yury Khrustalev
On Thu, Nov 14, 2024 at 08:53:48PM +, Sam James wrote: > r15-5257-g56ded80b96b0f6 didn't regenerate configure correctly. > > See https://inbox.sourceware.org/gcc-patches/zzzf69gorvpro...@zen.kayari.org/. > > gcc/ChangeLog: > > * configure: Regenerate. > --- > Pushed as obvious. Thank

[PATCH v1 1/2] RISC-V: Rearrange the test files for scalar SAT_SUB [NFC]

2024-11-15 Thread pan2 . li
From: Pan Li The test files of scalar SAT_SUB only has numbers as the suffix. Rearrange the file name to -{form number}-{target-type}. For example, test form 3 for uint32_t SAT_SUB will have -3-u32.c for asm check and -run-3-u32.c for the run test. Meanwhile, all related test files moved to ris

Re: [PATCH] Introduce feeble_inline attribute [PR93008]

2024-11-15 Thread Jakub Jelinek
On Fri, Nov 15, 2024 at 11:25:00AM +, Jonathan Wakely wrote: > On Thu, 14 Nov 2024 at 18:16, Jan Hubicka wrote: > > > > > Hi! > > > > > > The inlining heuristics uses DECL_DECLARED_INLINE_P (whether a function > > > has been explicitly marked inline; that can be inline keyword, or for C++ > >

Re: [PATCH 3/3] AArch64: Add SVE vector cost to baseline tuning

2024-11-15 Thread Kyrylo Tkachov
> On 15 Nov 2024, at 12:33, Wilco Dijkstra wrote: > > Hi Kyrill, > >> This would make USE_NEW_VECTOR_COSTS effectively the default. >> Jennifer has been trying to do that as well and then to remove it (as it >> would be always true) but there are some codegen regressions that still > >> need

Re: [PATCH 1/4] tree-optimization/117558 - peeling for gaps and VL vectors

2024-11-15 Thread Richard Biener
On Fri, 15 Nov 2024, Richard Biener wrote: > On Fri, 15 Nov 2024, Richard Sandiford wrote: > > > Richard Biener writes: > > > The following ensures that peeling a single iteration for gaps is > > > sufficient by enforcing niter masking (partial vector use) given > > > we cannot (always) statical

'I' and 'U' fn spec specifiers

2024-11-15 Thread Jan Hubicka
Hi, To implement pointer parameters reproducible and unsequenced I would like to use fnspec built at callgraph construction time. Pointer parameters are either const or non-const. After discussion with Jens, I now understand that memory pointed to by const pointers can only be read directly and n

[PATCH 2/4][v2] tree-optimization/117605 - SLP with large negative single-element interleaving

2024-11-15 Thread Richard Biener
We fail to demote this to VMAT_ELEMENTWISE and thus run into the three vector permutation limit (and would not consider to use strided loads or gathers). This resolves another bunch of SVE regressions with --param vect-force-slp=1 PR tree-optimization/117605 * tree-vect-stmts.cc (

[PATCH 1/4][v2] tree-optimization/117558 - peeling for gaps and VL vectors

2024-11-15 Thread Richard Biener
The following ensures that peeling a single iteration for gaps is sufficient by enforcing niter masking (partial vector use) given we cannot (always) statically decide when the vector size isn't known. The condition guarding this and thus statically giving a pass in some cases for VL vectors is que

[PATCH 4/4][v2] Flip vectorization to forced SLP

2024-11-15 Thread Richard Biener
The following flips the vectorizer to forced SLP, there is almost no expected fallout at this point, the remains should be target specific cost modeling issues. * params.opt (vect-force-slp): Default to 1. --- gcc/params.opt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --gi

[PATCH 3/4][v2] tree-optimization/117606 - SLP and single element interleaving

2024-11-15 Thread Richard Biener
The following tries to reduce the amount of difference between SLP and non-SLP for single-element interleaving load classification. This fixes another fallout of --param vect-force-slp=1 PR tree-optimization/117606 * tree-vect-stmts.cc (get_group_load_store_type): For single

Re: [WIP RFC] libstdc++: add module std

2024-11-15 Thread Jason Merrill
On 11/15/24 6:04 AM, Jonathan Wakely wrote: On 14/11/24 23:09 -0500, Jason Merrill wrote: On 10/18/24 9:38 AM, Jason Merrill wrote: Currently this installs the sources under $(gxx_include_dir)/bits/, i.e. /usr/include/c++/15/bits.  So with my -fsearch-include-path change, std.cc can be compil

[PATCH]AArch64 Suppress default options when march or mcpu used is not affected by it.

2024-11-15 Thread Tamar Christina
Hi All, This patch makes it so that when you use any of the Cortex-A53 errata workarounds but have specified an -march or -mcpu we know is not affected by it that we suppress the errata workaround. This is a driver only patch as the linker invocation needs to be changed as well. The linker and c

[PATCH] rs6000: Add veqv support to *eqv3_internal1

2024-11-15 Thread Kewen Lin
Hi, When making patch to replace TARGET_P8_VECTOR, I noticed for *eqv3_internal1 unlike the other logical operations, we only exploited the vsx version. I think it is an oversight, this patch is to consider veqv as well. Bootstrapped and regtested on ppc64-linux P8/P9 and ppc64le-linux P9/P10 tw

[PATCH] rs6000: Use standard name {add,sub}v1ti3 for altivec_v{add,sub}uqm

2024-11-15 Thread Kewen Lin
Hi, This patch is to adjust define_insn altivec_v{add,sub}uqm with standard names, as the associated test case shows, w/o this patch, it ends up with scalar {add,subf}c/{add,subf}e, the standard names help to exploit v{add,sub}uqm. Bootstrapped and regtested on ppc64-linux P8/P9 and ppc64le-linux

[PATCH 3/4] tree-optimization/117606 - SLP and single element interleaving

2024-11-15 Thread Richard Biener
The following tries to reduce the amount of difference between SLP and non-SLP for single-element interleaving load classification. This fixes another fallout of --param vect-force-slp=1 Bootstraped on x86_64-unknown-linux-gnu, testing in progress. PR tree-optimization/117606 * t

  1   2   >