[PATCH] expand: Add trivial folding for bit query builtins at expansion time [PR114044]

2024-02-27 Thread Jakub Jelinek
Hi! While it seems a lot of places in various optimization passes fold bit query internal functions with INTEGER_CST arguments to INTEGER_CST when there is a lhs, when lhs is missing, all the removals of such dead stmts are guarded with -ftree-dce, so with -fno-tree-dce those unfolded ifn calls re

Re: [PATCH] expand: Add trivial folding for bit query builtins at expansion time [PR114044]

2024-02-27 Thread Richard Biener
On Tue, 27 Feb 2024, Jakub Jelinek wrote: > Hi! > > While it seems a lot of places in various optimization passes fold > bit query internal functions with INTEGER_CST arguments to INTEGER_CST > when there is a lhs, when lhs is missing, all the removals of such dead > stmts are guarded with -ftree

[PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Jakub Jelinek
Hi! As mentioned in the PR, on x86_64 currently a lot of ICEs end up with crashes in the unwinder like: during RTL pass: expand pr114044-2.c: In function ‘foo’: pr114044-2.c:5:3: internal compiler error: in expand_fn_using_insn, at internal-fn.cc:208 5 | __builtin_clzg (a); | ^~

Re: [PATCH] expand: Add trivial folding for bit query builtins at expansion time [PR114044]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 09:35:43AM +0100, Richard Biener wrote: > I do wonder whether we can handle the missing LHS case generically > in the direct optab expander for fns that are PURE or CONST? Maybe the 2 operand expand_internal_call could do it before handing over to individual expanders. Can

Re: [PATCH 1/3] vect: Pass stmt_vec_info to TARGET_SIMD_CLONE_USABLE

2024-02-27 Thread Richard Biener
On Mon, 26 Feb 2024, Andre Vieira (lists) wrote: > > > On 05/02/2024 09:56, Richard Biener wrote: > > On Thu, 1 Feb 2024, Andre Vieira (lists) wrote: > > > >> > >> > >> On 01/02/2024 07:19, Richard Biener wrote: > >>> On Wed, 31 Jan 2024, Andre Vieira (lists) wrote: > >>> > >>> > >>> The patch

Re: [PATCH] expand: Add trivial folding for bit query builtins at expansion time [PR114044]

2024-02-27 Thread Richard Biener
On Tue, 27 Feb 2024, Jakub Jelinek wrote: > On Tue, Feb 27, 2024 at 09:35:43AM +0100, Richard Biener wrote: > > I do wonder whether we can handle the missing LHS case generically > > in the direct optab expander for fns that are PURE or CONST? > > Maybe the 2 operand expand_internal_call could do

[PATCH] RISC-V: Add XiangShan Nanhu microarchitecture.

2024-02-27 Thread Jiawei
From: Chen Jiawei Co-Authored by: Lin Jiawei This patch add XiangShan Nanhu cpu microarchitecture, Nanhu is a 6-issue, superscalar, out-of-order processor. More details see: https://xiangshan-doc.readthedocs.io/zh-cn/latest/arch gcc/ChangeLog: * config/riscv/riscv-cores.def (RISCV_TUN

Re: [PATCH] expand: Add trivial folding for bit query builtins at expansion time [PR114044]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 09:51:05AM +0100, Richard Biener wrote: > On Tue, 27 Feb 2024, Jakub Jelinek wrote: > > > On Tue, Feb 27, 2024 at 09:35:43AM +0100, Richard Biener wrote: > > > I do wonder whether we can handle the missing LHS case generically > > > in the direct optab expander for fns that

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Richard Biener
On Tue, Feb 27, 2024 at 9:42 AM Jakub Jelinek wrote: > > Hi! > > As mentioned in the PR, on x86_64 currently a lot of ICEs end up > with crashes in the unwinder like: > during RTL pass: expand > pr114044-2.c: In function ‘foo’: > pr114044-2.c:5:3: internal compiler error: in expand_fn_using_insn,

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 09:54:45AM +0100, Richard Biener wrote: > Just to add we've in the past opted to avoid tail-calling abort () and friends > exactly to help debugging. So treating noreturn functions specially with > respect to caller saves looks inconsistent in this regard - it makes debuggi

Re: [PATCH] rs6000: Don't allow immediate value in the vsx_splat pattern [PR113950]

2024-02-27 Thread jeevitha
On 27/02/24 8:26 am, Kewen.Lin wrote: > on 2024/2/27 10:13, Peter Bergner wrote: >> On 2/26/24 7:55 PM, Kewen.Lin wrote: >>> on 2024/2/26 23:07, Peter Bergner wrote: >> >>> Good point, or maybe just an explicit -mvsx like some existing ones, which >>> can avoid to only test some fixed cpu type.

Re: [PATCH] developer option: -fdump-generic-nodes; initial incorporation

2024-02-27 Thread Richard Biener
On Thu, Feb 22, 2024 at 5:46 PM Robert Dubner wrote: > > As part of an effort to learn how create a GENERIC tree in order to > implement a > COBOL front end, I created the dump_generic_nodes(), which accepts a > function_decl at the point it is provided to the middle end. The routine > generates

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 10:04:06AM +0100, Jakub Jelinek wrote: > > I hope we at least avoid that at -O0, possibly also with -Og? > > r14-8495 fixed at least that. > > Of course, it can break debugging experience even when the noreturn function > is compiled with -O2 but some or all callers of tha

Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Richard Biener
On Sun, Feb 25, 2024 at 10:01 AM Tamar Christina wrote: > > Hi Pan, > > > From: Pan Li > > > > Hi Richard & Tamar, > > > > Try the DEF_INTERNAL_INT_EXT_FN as your suggestion. By mapping > > us_plus$a3 to the RTL representation (us_plus:m x y) in optabs.def. > > And then expand_US_PLUS in interna

Re: [PATCH v2] DSE: Bugfix ICE after allow vector type in get_stored_val

2024-02-27 Thread Richard Biener
On Mon, Feb 26, 2024 at 3:22 PM wrote: > > From: Pan Li > > We allowed vector type for get_stored_val when read is less than or > equal to store in previous. Unfortunately, we missed to adjust the > validate_subreg part accordingly. When the vector type's size is > less than vector register, it

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Richard Biener
On Tue, Feb 27, 2024 at 10:13 AM Jakub Jelinek wrote: > > On Tue, Feb 27, 2024 at 10:04:06AM +0100, Jakub Jelinek wrote: > > > I hope we at least avoid that at -O0, possibly also with -Og? > > > > r14-8495 fixed at least that. > > > > Of course, it can break debugging experience even when the nore

[PATCH][v2] tree-optimization/114074 - CHREC multiplication and undefined overflow

2024-02-27 Thread Richard Biener
When folding a multiply CHRECs are handled like {a, +, b} * c is {a*c, +, b*c} but that isn't generally correct when overflow invokes undefined behavior. The following uses unsigned arithmetic unless either a is zero or a and b have the same sign. I've used simple early outs for INTEGER_CSTs and

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 10:13:14AM +0100, Jakub Jelinek wrote: > On Tue, Feb 27, 2024 at 10:04:06AM +0100, Jakub Jelinek wrote: > > > I hope we at least avoid that at -O0, possibly also with -Og? > > > > r14-8495 fixed at least that. > > > > Of course, it can break debugging experience even when

RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, February 27, 2024 9:44 AM > To: Tamar Christina > Cc: pan2...@intel.com; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; > yanzhang.w...@intel.com; kito.ch...@gmail.com; > richard.sandiford@arm.com2; jeffreya...@gmail.com > Subje

[PATCH] arm: warn about deprecation of iwmmx in mmintrin.h

2024-02-27 Thread Richard Earnshaw
GCC 13's changes file documents that iwmmx is deprecated. Raise the bar by warning when the mmintrin.h header is included by users, but provide a way to suppress the warning. gcc: * config/arm/mmintrin.h: Warn if this header is included without defining __ENABLE_DEPRECATED_IWMMXT

Re: [PATCH v1] Internal-fn: Add new internal function SAT_ADDU

2024-02-27 Thread Georg-Johann Lay
Am 19.02.24 um 08:36 schrieb Richard Biener: On Sat, Feb 17, 2024 at 11:30 AM wrote: From: Pan Li This patch would like to add the middle-end presentation for the unsigned saturation add. Aka set the result of add to the max when overflow. It will take the pattern similar as below. SAT

RE: [PATCH v1] Internal-fn: Add new internal function SAT_ADDU

2024-02-27 Thread Tamar Christina
> Am 19.02.24 um 08:36 schrieb Richard Biener: > > On Sat, Feb 17, 2024 at 11:30 AM wrote: > >> > >> From: Pan Li > >> > >> This patch would like to add the middle-end presentation for the > >> unsigned saturation add. Aka set the result of add to the max > >> when overflow. It will take the pa

Re: [patch] OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*}

2024-02-27 Thread Thomas Schwinge
Hi Tobias! On 2024-02-19T22:36:51+0100, Tobias Burnus wrote: > While waiting for some testing to finish, I got distracted and added the > very low hanging OpenACC 3.3 fruits, i.e. those Fortran routines that directly > map to their C counter part. > > Comments, remarks? Thanks, that largely look

[PATCH 2/8] libstdc++: Include in

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h: Include for __make_move_if_noexcept_iterator. --- libstdc++-v3/include/bits/alloc_traits.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libstdc++-v3/include/bits/allo

[PATCH 4/8] libstdc++: Fix error handling in std::print

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- The standard requires an exception if std::print fails to write to a std::ostream. libstdc++-v3/ChangeLog: * include/std/ostream (vprint_nonunicode): Throw if stream state indicates writing failed. * testsuite/27_io/basic_os

[PATCH 1/8] libstdc++: Add more [[nodiscard]] to

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- libstdc++-v3/ChangeLog: * include/std/stacktrace: Add nodiscard attribute to all functions without side effects. --- libstdc++-v3/include/std/stacktrace | 36 + 1 file changed, 31 insertions(+), 5 deletio

[PATCH 7/8] libstdc++: Add nodiscard in

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/stl_algo.h: * testsuite/25_algorithms/unique/1.cc: Add dg-warning. * testsuite/25_algorithms/unique/11480.cc: Likewise. * testsuite/25_algorithms/unique_copy/26133.cc: Likewise.

[PATCH 6/8] libstdc++: Add more nodiscard uses in

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- libstdc++-v3/ChangeLog: * include/bits/stl_bvector.h (vector::at): Add nodiscard. * include/bits/stl_vector.h (vector::at): Likewise. (operator==, operator<=>, operator<, operator!=, operator>) (operator<=, op

[PATCH 5/8] libstdc++: Consistently use noexcept, constexpr, nodiscard on bitmask ops

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. Reviews invited. -- >8 -- The bitwise operators for combining bitmask types such as std::launch are not consistently annotated with noexcept, constexpr, and nodiscard. This is the subject of LWG 3977, although the proposed resolution doesn't work. We can make the changes in

[PATCH 3/8] libstdc++: Fix std::print for Cygwin

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. I am unable to test this on Cygwin myself. Testing and reviews invited. -- >8 -- Cygwin should use std::fwrite, not WriteConsoleW. And the -lstdc++exp library is only needed when running the tests on *-*-mingw*. libstdc++-v3/ChangeLog: * include/std/ostream (vprint_

[PATCH 1/3, RFC] fsra: Add final gimple sra just before expander

2024-02-27 Thread Jiufu Guo
This patch adds a new mode for sra pass: "fsra". This 'fsra' pass handle function parameters and returns as candidates. And run it at the end of GIMPLE passes sequences. gcc/ChangeLog: * passes.def: Add pass pass_sra_final. * tree-pass.h (make_pass_sra_final): Declare make_pass_sr

[PATCH 8/8] libstdc++: Do not define lock-free atomic aliases if not fully lock-free [PR114103]

2024-02-27 Thread Jonathan Wakely
Tested x86_64-linux. I think we should make this change, because otherwise we define the typedefs for platforms with no lock-free atomics, like hppa-hpux. Instead of lying, those typedefs should be absent on that target. -- >8 -- libstdc++-v3/ChangeLog: PR libstdc++/114103 * incl

[PATCH 3/3, RFC] fsra: support SET_RET_PART

2024-02-27 Thread Jiufu Guo
This patch adds IFN_SET_RET_PARTS, and generate this IFN for the accesses of the 'returns' in fsra pass. And the IFN is expanded according to the outgoing registers of the 'return'. "fsra" is tunned for the access analyze for 'returns'. 'IFN_SET_RET_LAST_PARTS' is just for this prototype, it hel

Re: [PATCH v1] Internal-fn: Add new internal function SAT_ADDU

2024-02-27 Thread Georg-Johann Lay
Am 27.02.24 um 12:15 schrieb Tamar Christina: Am 19.02.24 um 08:36 schrieb Richard Biener: On Sat, Feb 17, 2024 at 11:30 AM wrote: From: Pan Li This patch would like to add the middle-end presentation for the unsigned saturation add. Aka set the result of add to the max when overflow.

Re: [PATCH] i386: For noreturn functions save at least the bp register if it is used [PR114116]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 10:13:14AM +0100, Jakub Jelinek wrote: > For __libc_start_main, glibc surely just could use no_callee_saved_registers > attribute, because that is typically the outermost frame in backtrace, > there is no need to save those there. > And for kernel if it really wants it and n

Re: [patch] OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*}

2024-02-27 Thread Tobias Burnus
Hi Thomas, (Regarding 'call acc_attach(x)' – the problem is that one needs the address of '&x' and 'x'; while 'x' is readily available, for '&x' no temporary variable has to get involved – and there are plenty of ways temporaries can get introduced; for most cases, an interface exists that pr

[PATCH 0/3, RFC] fsra: Add final gimple sra before expander

2024-02-27 Thread Jiufu Guo
Hi, As known there are a few PRs (meta-bug PR101926) about accessing aggregate param/returns which are passed through registers. Given the suggestion from: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/637935.html: We could even use the actual SRA pass in a special mode right before RT

Re: [PATCH V2] rs6000: Don't allow immediate value in the vsx_splat pattern [PR113950]

2024-02-27 Thread Segher Boessenkool
Hi! On Tue, Feb 27, 2024 at 02:02:38AM +0530, jeevitha wrote: > There is no immediate value splatting instruction in Power. Currently, those > values need to be stored in a register or memory. To address this issue, I > have updated the predicate for the second operand in vsx_splat to > splat_inpu

RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Li, Pan2
Thanks Tamar. > Those two cases also *completely* stop vectorization because of either the > control flow or the fact the vectorizer can't handle complex types. Yes, we eventually would like to vectorize the SAT ALU but we start with scalar part first. I tried the DEF_INTERNAL_SIGNED_OPTAB_EXT_F

[PATCH] Fix internal error in GIMPLE DSE

2024-02-27 Thread Eric Botcazou
Hi, this is a regression present on the mainline, 13 and 12 branches. For the attached Ada case, it's a tree checking failure on the mainline at -O: +===GNAT BUG DETECTED==+ | 14.0.1 20240226 (experimental) [master r14-9171-g4972f97a265] GCC

RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Tamar Christina
> Thanks Tamar. > > > Those two cases also *completely* stop vectorization because of either the > > control flow or the fact the vectorizer can't handle complex types. > > Yes, we eventually would like to vectorize the SAT ALU but we start with > scalar part > first. > I tried the DEF_INTERNAL_

[PING 4][PATCH v3] rs6000/p8swap: Fix incorrect lane extraction by vec_extract() [PR106770]

2024-02-27 Thread Surya Kumari Jangala
Ping On 08/01/24 11:19 am, Surya Kumari Jangala wrote: > Ping > > On 28/11/23 6:24 pm, Surya Kumari Jangala wrote: >> Ping >> >> On 10/11/23 12:27 pm, Surya Kumari Jangala wrote: >>> Ping >>> >>> On 03/11/23 1:14 pm, Surya Kumari Jangala wrote: Hi Segher, I have incorporated changes in

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-27 Thread Jeff Law
On 2/27/24 00:43, Richard Biener wrote: On Tue, 27 Feb 2024, haochen.jiang wrote: On Linux/x86_64, af66ad89e8169f44db723813662917cf4cbb78fc is the first bad commit commit af66ad89e8169f44db723813662917cf4cbb78fc Author: Richard Biener Date: Fri Feb 23 16:06:05 2024 +0100 middle-end

Re: [PATCH] Fix internal error in GIMPLE DSE

2024-02-27 Thread Richard Biener
On Tue, Feb 27, 2024 at 1:50 PM Eric Botcazou wrote: > > Hi, > > this is a regression present on the mainline, 13 and 12 branches. For the > attached Ada case, it's a tree checking failure on the mainline at -O: > > +===GNAT BUG DETECTED==+ > |

Re: [PATCH 2/2] aarch64: Add support for _BitInt

2024-02-27 Thread Andre Vieira (lists)
Hey, Dropped the first patch and dealt with the comments above, hopefully I didn't miss any this time. -- This patch adds support for C23's _BitInt for the AArch64 port when compiling for little endianness. Big Endianness requires further target-agnostic sup

[pushed] analyzer: fix ICE on floating-point bounds [PR111881]

2024-02-27 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Successful run of analyzer integration tests on x86_64-pc-linux-gnu. Pushed to trunk as r14-9195-g43ad6ce60108ac. gcc/analyzer/ChangeLog: PR analyzer/111881 * constraint-manager.cc (bound::ensure_closed): Assert that

Re: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Richard Biener
On Tue, Feb 27, 2024 at 1:57 PM Tamar Christina wrote: > > > Thanks Tamar. > > > > > Those two cases also *completely* stop vectorization because of either the > > > control flow or the fact the vectorizer can't handle complex types. > > > > Yes, we eventually would like to vectorize the SAT ALU b

Re: [patch] OpenACC: Add Fortran routines acc_{alloc,free,hostptr,deviceptr,memcpy_{to,from}_device*}

2024-02-27 Thread Thomas Schwinge
Hi Tobias! On 2024-02-27T13:29:33+0100, Tobias Burnus wrote: > Thomas Schwinge: >>> @table @asis >>> @item @emph{Description} >>> -This function allocates @var{len} bytes of device memory. It returns >>> +This function allocates @var{bytes} of device memory. It returns >> Not '@var{bytes} {+

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-27 Thread Richard Biener
On Tue, 27 Feb 2024, Jeff Law wrote: > > > On 2/27/24 00:43, Richard Biener wrote: > > On Tue, 27 Feb 2024, haochen.jiang wrote: > > > >> On Linux/x86_64, > >> > >> af66ad89e8169f44db723813662917cf4cbb78fc is the first bad commit > >> commit af66ad89e8169f44db723813662917cf4cbb78fc > >> Author:

[PATCH v5 0/5] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2024-02-27 Thread Andre Vieira
Hi, Re-ordered patches, our latest plan is to only commit patches 1-3, and leave 4-5 for GCC 15, as we believe it is too late in Stage 4 to be making changes to target agnostic parts, especially since these affect so many ports that we can not easily test. [1/5] arm: Add define_attr to to create

[PATCH v6 2/5] arm: Annotate instructions with mve_safe_imp_xlane_pred

2024-02-27 Thread Andre Vieira
This patch annotates some MVE across lane instructions with a new attribute. We use this attribute to let the compiler know that these instructions can be safely implicitly predicated when tail predicating if their operands are guaranteed to have zeroed tail predicated lanes. These instructions w

[PATCH v6 3/5] arm: Fix a wrong attribute use and remove unused unspecs and iterators

2024-02-27 Thread Andre Vieira
This patch fixes the erroneous use of a mode attribute without a mode iterator in the pattern and removes unused unspecs and iterators. gcc/ChangeLog: * config/arm/iterators.md (supf): Remove VMLALDAVXQ_U, VMLALDAVXQ_P_U, VMLALDAVAXQ_U cases. (VMLALDAVXQ): Remove iterator

[PATCH v6 1/5] arm: Add define_attr to to create a mapping between MVE predicated and unpredicated insns

2024-02-27 Thread Andre Vieira
This patch adds an attribute to the mve md patterns to be able to identify predicable MVE instructions and what their predicated and unpredicated variants are. This attribute is used to encode the icode of the unpredicated variant of an instruction in its predicated variant. This will make it po

[PATCH v6 4/5] doloop: Add support for predicated vectorized loops

2024-02-27 Thread Andre Vieira
This patch adds support in the target agnostic doloop pass for the detection of predicated vectorized hardware loops. Arm is currently the only target that will make use of this feature. gcc/ChangeLog: * df-core.cc (df_bb_regno_only_def_find): New helper function. * df.h (df_bb_

[PATCH v6 5/5] arm: Add support for MVE Tail-Predicated Low Overhead Loops

2024-02-27 Thread Andre Vieira
This patch adds support for MVE Tail-Predicated Low Overhead Loops by using the doloop funcitonality added to support predicated vectorized hardware loops. gcc/ChangeLog: * config/arm/arm-protos.h (arm_target_bb_ok_for_lob): Change declaration to pass basic_block. (arm_at

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-27 Thread Jeff Law
On 2/27/24 06:53, Richard Biener wrote: On Tue, 27 Feb 2024, Jeff Law wrote: On 2/27/24 00:43, Richard Biener wrote: On Tue, 27 Feb 2024, haochen.jiang wrote: On Linux/x86_64, af66ad89e8169f44db723813662917cf4cbb78fc is the first bad commit commit af66ad89e8169f44db723813662917cf4cbb78

Re: [r14-9173 Regression] FAIL: gcc.dg/tree-ssa/andnot-2.c scan-tree-dump-not forwprop3 "_expr" on Linux/x86_64

2024-02-27 Thread Richard Biener
On Tue, 27 Feb 2024, Jeff Law wrote: > > > On 2/27/24 06:53, Richard Biener wrote: > > On Tue, 27 Feb 2024, Jeff Law wrote: > > > >> > >> > >> On 2/27/24 00:43, Richard Biener wrote: > >>> On Tue, 27 Feb 2024, haochen.jiang wrote: > >>> > On Linux/x86_64, > > af66ad89e8169f44db72

Re: [PATCH 8/8] libstdc++: Do not define lock-free atomic aliases if not fully lock-free [PR114103]

2024-02-27 Thread Jonathan Wakely
On Tue, 27 Feb 2024 at 11:49, Jonathan Wakely wrote: > > Tested x86_64-linux. I think we should make this change, because > otherwise we define the typedefs for platforms with no lock-free > atomics, like hppa-hpux. Instead of lying, those typedefs should be > absent on that target. > > -- >8 -- >

RE: [PATCH v2] Draft|Internal-fn: Introduce internal fn saturation US_PLUS

2024-02-27 Thread Li, Pan2
Thanks Richard and Tammer for moving this forward. > That said, I would like to see the bigger picture to be kept in mind > before altering the GIMPLE IL. > Adding an internal function for an already present optab is a > no-brainer. Adding a vectorizer > and/or if-conversion pattern to make use

Re: [PATCH 8/8] libstdc++: Do not define lock-free atomic aliases if not fully lock-free [PR114103]

2024-02-27 Thread Jonathan Wakely
Ooops, I forgot to add --no-numbered so these were eight unrelated patches, not PATCH 1/8 .. PATCH 8/8. Sorry for any confusion. On Tue, 27 Feb 2024 at 14:33, Jonathan Wakely wrote: > > On Tue, 27 Feb 2024 at 11:49, Jonathan Wakely wrote: > > > > Tested x86_64-linux. I think we should make this

[PATCH] i386: Guard noreturn no-callee-saved-registers optimization with -mnoreturn-no-callee-saved-registers [PR38534]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 01:09:09PM +0100, Jakub Jelinek wrote: > So, IMHO either revert the changes altogether, or guard on -mcmodel=kernel > (but talk to kernel people on linux-toolchains if that is what they actually > want). Here is a patch which guards this by non-default option, so kernel and

Re: [PATCH v2] DSE: Bugfix ICE after allow vector type in get_stored_val

2024-02-27 Thread Jeff Law
On 2/26/24 07:22, pan2...@intel.com wrote: From: Pan Li We allowed vector type for get_stored_val when read is less than or equal to store in previous. Unfortunately, we missed to adjust the validate_subreg part accordingly. When the vector type's size is less than vector register, it will

Re: [PATCH 1/3] Change 'v1' float and int code to fall back to v0

2024-02-27 Thread Jeff Law
On 2/26/24 20:12, Tom Tromey wrote: While working on another patch, I discovered that the libcc1 plugin code never did version negotiation correctly. So, the patches to introduce v1 never did anything -- the new code, as far as I know, has never been run. Making version negotiation work show

Re: [PATCH 4/8] libstdc++: Fix error handling in std::print

2024-02-27 Thread Tim Song
[print.fun] requires a system_error, but I don't think [ostream.formatted.print] does? On Tue, Feb 27, 2024 at 5:47 AM Jonathan Wakely wrote: > Tested x86_64-linux. Reviews invited. > > -- >8 -- > > The standard requires an exception if std::print fails to write to a > std::ostream. > > libstdc+

Re: [PATCH] RISC-V: Update test expectancies with recent scheduler change

2024-02-27 Thread Jeff Law
On 2/26/24 18:21, juzhe.zh...@rivai.ai wrote: If the scheduling model increases the vsetvls, we shouldn't set it as default scheduling model I don't think it's that simple. On some uarchs vsetvls are nearly free while on others they can be fairly expensive. It's not clear (to me) yet if on

Re: [PATCH] RISC-V: add option -m(no-)autovec-segment

2024-02-27 Thread Jeff Law
On 2/25/24 21:53, Greg McGary wrote: Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md (vec_mask_len_load_lanes, vec_mask_len_st

Re: [PATCH] combine: Don't simplify paradoxical SUBREG on WORD_REGISTER_OPERATIONS [PR113010]

2024-02-27 Thread Greg McGary
On 2/26/24 5:17 PM, Greg McGary wrote: diff --git a/gcc/testsuite/gcc.c-torture/execute/pr113010.c b/gcc/testsuite/gcc.c-torture/execute/pr113010.c new file mode 100644 index 000..a95c613c1df --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr113010.c @@ -0,0 +1,9 @@ +int minus_

[PATCH 2/3, RFC] fsra: support ARG_PARTS

2024-02-27 Thread Jiufu Guo
This patch adds IFN_ARG_PARTS, and generate this IFN for parameters access in fsra pass. And this IFN is expanded according to the incoming registers of the parameter. "fsra" is tunned for the access of parameters. PR target/108073 gcc/ChangeLog: * internal-fn.cc (query_positio

[PATCH] Output branches and calls in gcov function summaries

2024-02-27 Thread Jørgen Kvalsvik
The gcov function summaries only output the covered lines, not the branches and calls. Since the function summaries is an opt-in it probably makes sense to also include branch coverage. Simply adds the branch- and call information to the function-summaries output. $ gcc --coverage hello.c -o hello

Re: [PATCH] calls: Fix up TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453]

2024-02-27 Thread Richard Earnshaw
On 09/01/2023 10:32, Jakub Jelinek via Gcc-patches wrote: > Hi! > > On powerpc64le-linux, the following patch fixes > -FAIL: gcc.dg/c2x-stdarg-4.c execution test > -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O0 execution test > -FAIL: gcc.dg/torture/c2x-stdarg-split-1a.c -O1 execution te

Re: [PATCH v2] c++/modules: Support lambdas attached to more places in modules [PR111710]

2024-02-27 Thread Patrick Palka
On Fri, 16 Feb 2024, Nathaniel Shead wrote: > On Tue, Feb 13, 2024 at 07:52:01PM -0500, Jason Merrill wrote: > > On 2/10/24 17:57, Nathaniel Shead wrote: > > > The fix for PR107398 weakened the restrictions that lambdas must belong > > > to namespace scope. However this was not sufficient: we also

Re: [PATCH] calls: Fix up TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453]

2024-02-27 Thread Richard Earnshaw
[resending, apologies, I accidentally CC'd the wrong person last time] On 27/02/2024 16:41, Richard Earnshaw wrote: > > > On 09/01/2023 10:32, Jakub Jelinek via Gcc-patches wrote: >> Hi! >> >> On powerpc64le-linux, the following patch fixes >> -FAIL: gcc.dg/c2x-stdarg-4.c execution test >> -FAIL

Re: [PATCH] calls: Fix up TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 04:41:32PM +, Richard Earnshaw wrote: > > 2023-01-09 Jakub Jelinek > > > > PR target/107453 > > * calls.cc (expand_call): For calls with > > TYPE_NO_NAMED_ARGS_STDARG_P (funtype) use zero for n_named_args. > > Formatting fix. > > This one has been fe

[committed] i386: psrlq is not used for PERM [PR113871]

2024-02-27 Thread Uros Bizjak
Also handle V2BF mode. PR target/113871 gcc/ChangeLog: * config/i386/mmx.md (V248FI): Add V2BF mode. (V24FI_32): Ditto. gcc/testsuite/ChangeLog: * gcc.target/i386/pr113871-5a.c: New test. * gcc.target/i386/pr113871-5b.c: New test. Bootstrapped and regression tested on x86_

Re: [PATCH] calls: Fix up TYPE_NO_NAMED_ARGS_STDARG_P handling [PR107453]

2024-02-27 Thread Jakub Jelinek
On Tue, Feb 27, 2024 at 06:25:21PM +0100, Jakub Jelinek wrote: > I guess we need some testsuite coverage for caller/callee ABI match of > struct S { char p[64]; }; > struct S foo (...); Maybe the test below? Passes on x86_64 -m32/-m64, but I guess that doesn't care at all about the named vs. not

Re: [PATCH] c++/modules: relax diagnostic about GMF contents

2024-02-27 Thread Patrick Palka
On Thu, 15 Feb 2024, Patrick Palka wrote: > On Thu, 15 Feb 2024, Jason Merrill wrote: > > > On 2/15/24 16:10, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > > OK for trunk? > > > > > > -- >8 -- > > > > > > Issuing a hard error when the GMF doesn

Re: [PATCH] c++/modules: optimize tree flag streaming

2024-02-27 Thread Patrick Palka
On Fri, 16 Feb 2024, Patrick Palka wrote: > On Thu, 15 Feb 2024, Patrick Palka wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look > > OK for trunk? > > > > -- >8 -- > > > > One would expect consecutive calls to bytes_in/out::b for streaming > > adjacent bits, as we d

[PATCH v2] libstdc++: Fix error handling in std::print

2024-02-27 Thread Jonathan Wakely
On Tue, 27 Feb 2024 at 15:21, Tim Song wrote: > > [print.fun] requires a system_error, but I don't think > [ostream.formatted.print] does? Yeah it looks like I got confused (again) jumping back and forth between [print.fun] and [ostream.formatted.print]. So we're doing the right thing, and should

Re: [PATCH] c++/modules: local class merging [PR99426]

2024-02-27 Thread Patrick Palka
On Mon, 26 Feb 2024, Patrick Palka wrote: > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this approach > look reasonable? > > -- >8 -- > > One known missing piece in the modules implementation is merging of a > streamed-in local class with the corresponding in-TU version of the > loca

[PATCH v2 1/5] btf: fixed type id in BTF_KIND_FUNC struct data.

2024-02-27 Thread Cupertino Miranda
This patch correct the aditition of +1 on the type id, which originally was done in the wrong location and leaded to func_sts->dtd_type for BTF_KIND_FUNCS struct data to contain the type id of the previous entry. gcc/ChangeLog: * btfout.cc (btf_collect_dataset): Corrected BTF type id. ---

bpf: PR target/113453 func_info .BTF.ext implementation

2024-02-27 Thread Cupertino Miranda
Hi everyone, Just an updated version of the patches based on recent reviews from David Faust. Thanks for the feedback. Regards, Cupertino

[PATCH v2 2/5] btf: added KIND_FUNC traversal function.

2024-02-27 Thread Cupertino Miranda
Added a traversal function to traverse all BTF_KIND_FUNC nodes with a callback function. Used for .BTF.ext section content creation. gcc/ChangeLog: * btfout.cc (output_btf_func_types): Use FOR_EACH_VEC_ELT. (traverse_btf_func_types): Defined function. * ctfc.h (funcs_trave

[PATCH v2 3/5] bpf: Always emit .BTF.ext section if generating BTF

2024-02-27 Thread Cupertino Miranda
BPF applications, when generating BTF information should always create a .BTF.ext section. Current implementation was only creating it when -mco-re option was used. This patch makes .BTF.ext always be generated for BPF target objects. The patch also adds conditions around btf_finalize function call

[PATCH v2 5/5] bpf: renamed coreout.* files to btfext-out.*.

2024-02-27 Thread Cupertino Miranda
gcc/ChangeLog: * config.gcc (target_gtfiles): Changes coreout to btfext-out. (extra_objs): Changes coreout to btfext-out. * config/bpf/coreout.cc: Renamed to btfext-out.cc. * config/bpf/btfext-out.cc: Added. * config/bpf/coreout.h: Renamed to btfext-out.h.

[PATCH v2 4/5] bpf: implementation of func_info in .BTF.ext.

2024-02-27 Thread Cupertino Miranda
Kernel verifier complains in some particular cases for missing func_info implementation in .BTF.ext. This patch implements it. Strings are cached locally in coreout.cc to avoid adding duplicated strings in the string list. This string deduplication should eventually be moved to the CTFC functions

[wwwdocs] gcc-14/changes.html + projects/gomp/: OpenMP + OpenACC update

2024-02-27 Thread Tobias Burnus
Minor update for older and more recent changes. Comments? Tobias gcc-14/changes.html + projects/gomp/: OpenMP + OpenACC update Update OpenMP for two meanwhile implemented features (lvalue-expr in map, indirect now also in Fortran). Update OpenACC for one new feature (Fortran interface to exisit

Re: [PATCH v2 1/5] btf: fixed type id in BTF_KIND_FUNC struct data.

2024-02-27 Thread David Faust
Hi Cupertino, Just some nits below. Apologies for incoming pedantry. On 2/27/24 11:04, Cupertino Miranda wrote: > This patch correct the aditition of +1 on the type id, which originally > was done in the wrong location and leaded to func_sts->dtd_type for > BTF_KIND_FUNCS struct data to contain t

[PATCH v1 10/13] Rename "x86 Windows Options" to "Cygwin and MinGW Options"

2024-02-27 Thread Evgeny Karpov
@xref{Cygwin and MinGW Options} re-direct from "x86 Windows Options" will be added in v2. Thanks! Regards, Evgeny -Original Message- Thursday, February 22, 2024 2:32 PM Richard Earnshaw (lists) wrote: For this change you might want to put some form of re-direct in the manual under th

Re: [PATCH v2 2/5] btf: added KIND_FUNC traversal function.

2024-02-27 Thread David Faust
Hi Cupertino, Similar to patch 1, please use present tense to match the style of existing commits, in commit message and in ChangeLog. On 2/27/24 11:04, Cupertino Miranda wrote: > Added a traversal function to traverse all BTF_KIND_FUNC nodes with a > callback function. Used for .BTF.ext section

Re: [PATCH v2 3/5] bpf: Always emit .BTF.ext section if generating BTF

2024-02-27 Thread David Faust
On 2/27/24 11:04, Cupertino Miranda wrote: > BPF applications, when generating BTF information should always create a > .BTF.ext section. > Current implementation was only creating it when -mco-re option was used. > This patch makes .BTF.ext always be generated for BPF target objects. > The patc

Re: [PATCH v2 5/5] bpf: renamed coreout.* files to btfext-out.*.

2024-02-27 Thread David Faust
On 2/27/24 11:04, Cupertino Miranda wrote: > gcc/ChangeLog: > > * config.gcc (target_gtfiles): Changes coreout to btfext-out. > (extra_objs): Changes coreout to btfext-out. > * config/bpf/coreout.cc: Renamed to btfext-out.cc. > * config/bpf/btfext-out.cc: Added. > * c

Re: [PATCH] RISC-V: add option -m(no-)autovec-segment

2024-02-27 Thread Greg McGary
On 2/27/24 8:25 AM, Jeff Law wrote: On 2/25/24 21:53, Greg McGary wrote: Add option -m(no-)autovec-segment to enable/disable autovectorizer from emitting vector segment load/store instructions. This is useful for performance experiments. gcc/ChangeLog: * config/riscv/autovec.md (vec_mask

[PATCH v1 00/13] Add aarch64-w64-mingw32 target

2024-02-27 Thread Evgeny Karpov
Richard, thank you for the initial review! Hopefully, the required actions have been addressed, which should improve the patch quality in v2. Regards, Evgeny -Original Message- Thursday, February 22, 2024 2:40 PM Richard Earnshaw (lists) wrote: Thanks for posting this. I've only read

[PATCH] c++: auto(x) partial substitution [PR110025, PR114138]

2024-02-27 Thread Patrick Palka
Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 13? -- >8 -- In r12-6773-g09845ad7569bac we gave CTAD placeholders a level of 0 and ensured we never replaced them via tsubst. It turns out that autos representing an explicit cast need the same treatment

[PATCH] Fortran testsuite: fix invalid Fortran in testcase

2024-02-27 Thread Harald Anlauf
Dear all, the attached patch fixes invalid Fortran in testcase gfortran.dg/pr101026.f, which might prohibit progress in fixing pr111781. (Note that the testcase was for a tree-optimizer issue, not the Fortran frontend.) OK for mainline? Will commit within 24h unless there are comments. Thanks,

[PATCH v1 08/13] aarch64: Add Cygwin and MinGW environments for AArch64

2024-02-27 Thread Evgeny Karpov
SEH is not implemented yet and needs to be disabled in mingw/winnt.cc. Disabling every SEH function that uses references to these macros might trigger significant refactoring, and to avoid this, required macros are defined with 0. It is needed only for compilation. A comment with an explanation

RE: [PATCH] developer option: -fdump-generic-nodes; initial incorporation

2024-02-27 Thread Robert Dubner
Richard, Thank you very much for your comments. When I set out to create the capability, I had a "specification" in mind. I didn't have a clue how to create a GENERIC tree that could be fed to the middle end in a way that would successfully result in an executable. And I needed to be able to

[PATCH] Add myself to write after approval and DCO

2024-02-27 Thread Fangrui Song
From: Fangrui Song ChangeLog: * MAINTAINERS: Add myself. Signed-off-by: Fangrui Song --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 986e8d0a725..b01fab16061 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -669,6 +669,7 @@ Edward Smi

Re: [PATCH v2 4/5] bpf: implementation of func_info in .BTF.ext.

2024-02-27 Thread David Faust
Hi Cupertino, On 2/27/24 11:04, Cupertino Miranda wrote: > Kernel verifier complains in some particular cases for missing func_info > implementation in .BTF.ext. This patch implements it. > > Strings are cached locally in coreout.cc to avoid adding duplicated > strings in the string list. This st

Re: [PATCH] RISC-V: Add initial cost handling for segment loads/stores.

2024-02-27 Thread Robin Dapp
> This patch looks odd to me. > I don't see memrefs in the trunk code. It's on top of the vle/vse offset handling patch from a while back that I haven't committed yet. > Also, I prefer list all cost in cost tune info for NF = 2 ~ 8 like ARM SVE > does: I don't mind having separate costs for each

  1   2   >