Re: [PATCH v2] doc: md.texi (Insn Splitting): Tweak wording for readability.

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/21/23 08:22, Hans-Peter Nilsson via Gcc-patches wrote: From: Hans-Peter Nilsson CC: , Date: Tue, 14 Mar 2023 17:04:43 +0100 Ping on contents (formatting is approved): I needed to check what was allowed in a define_split, but had problems understanding what was meant by "Splitting

Re: [PATCH] RTL: Bugfix for wrong code with v16hi compare & mask

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/26/23 19:36, Hongtao Liu wrote: On Sun, Mar 26, 2023 at 3:01 AM Jeff Law via Gcc-patches wrote: On 3/24/23 08:11, pan2.li--- via Gcc-patches wrote: From: Pan Li Fix the bug of the incorrect code generation for the below code sample. typedef unsigned short

Re: Re: [PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system

2023-04-02 Thread juzhe.zh...@rivai.ai
OK, would you mind telling me some tool can help for formatting of .MD file? Since clang-format only works on .cc/.h file. I have asked many people how to format .MD file but I didn't get the answer. So that's why you can see formatting of .MD file is not good. Unlike .cc/.h files. Thanks.

Re: [PATCH 2/2] Corrected pr25521.c target matching.

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/13/23 11:57, Cupertino Miranda wrote: Cupertino Miranda via Gcc-patches writes: On 1/24/23 05:24, Cupertino Miranda wrote: Thank you for the comments and suggestions. I have changed the patch. Unfortunately in case of rx target I could not make scan-assembler-symbol-section to match.

Re: [PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system

2023-04-02 Thread Jeff Law via Gcc-patches
On 4/2/23 18:38, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong It's quite obvious that the order of vrsub SEW64 is wrong. gcc/ChangeLog: * config/riscv/vector.md: Fix incorrect operand order. Note the formatting in that code is wrong on multiple levels. While I don't typically

Re: [PATCH] RISC-V: Fix typo

2023-04-02 Thread Jeff Law via Gcc-patches
On 4/2/23 19:19, Li Xu wrote: gcc/ChangeLog: * config/riscv/riscv-vector-builtins.def (vuint32m8_t): Fix typo (vfloat32m8_t): Likewise THanks. Pushed to the trunk. jeff

Re: [Ping][PATCH] RTL: Bugfix for wrong code with v16hi compare & mask

2023-04-02 Thread Jeff Law via Gcc-patches
On 4/2/23 19:52, Li, Pan2 wrote: Hi Jeff, Do you have any suggestion about this case? Sorry for late response due to not receive the mail-thread (Copy the latest one from hongtao for reference). https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614644.html

[Ping][PATCH] RTL: Bugfix for wrong code with v16hi compare & mask

2023-04-02 Thread Li, Pan2 via Gcc-patches
Hi Jeff, Do you have any suggestion about this case? Sorry for late response due to not receive the mail-thread (Copy the latest one from hongtao for reference). https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614644.html Pan On Sun, Mar 26, 2023 at 3:01 AM Jeff Law via

[PATCH] RISC-V: Fix typo

2023-04-02 Thread Li Xu
gcc/ChangeLog: * config/riscv/riscv-vector-builtins.def (vuint32m8_t): Fix typo (vfloat32m8_t): Likewise --- gcc/config/riscv/riscv-vector-builtins.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv-vector-builtins.def

[PATCH] RISC-V: Fix SEW64 of vrsub.vx runtime fail in RV32 system

2023-04-02 Thread juzhe . zhong
From: Ju-Zhe Zhong It's quite obvious that the order of vrsub SEW64 is wrong. gcc/ChangeLog: * config/riscv/vector.md: Fix incorrect operand order. gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/bug-23.C: New test. --- gcc/config/riscv/vector.md|

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-02 Thread juzhe.zhong
This point is seletected not because LCM but by Phase 3 (VL/VTYPE demand info backward fusion and propogation) which is I introduced into VSETVL PASS to enhance LCM && improve vsetvl instruction performance. This patch is to supress the Phase 3 too aggressive backward fusion and propagation to

[PATCH v5] gcc: Drop obsolete INCLUDE_PTHREAD_H

2023-04-02 Thread Sam James via Gcc-patches
INCLUDE_PTHREAD_H was added for r13-1350-g49d508065bdd36 for a calloc poisoning issue like r13-6662-g0e6f87835ccabf. When working on r13-6662-g0e6f87835ccabf, we realised that INCLUDE_PTHREAD_H became unused as of r13-4164-g0a62889c7a155f (which was originally added for r13-1350-g49d508065bdd36

Re: [PATCH] lto/109263 - lto-wrapper and -g0 -ggdb

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/23/23 10:00, Richard Biener via Gcc-patches wrote: The following makes lto-wrapper deal with non-combined debug disabling / enabling option combinations properly. Interestingly -gno-dwarf also enables debug. Bootstrap / regtest running on x86_64-unknown-linux-gnu. OK? Or do we want

Re: [PATCH] build: Check that -lzstd can be linked

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/28/23 07:21, Rainer Orth wrote: Recent Solaris 11.4 SRUs bundle zstd, but only the 64-bit libraries (no idea why). Because of this, in 32-bit builds cc1 etc. fail to link with undefined references to various ZSTD_* functions from lto-compress.o. This happens because currently only the

Re: [PATCH v4 2/2] gcc: Drop obsolete INCLUDE_PTHREAD_H (ping)

2023-04-02 Thread Sam James via Gcc-patches
Jeff Law writes: > On 4/2/23 14:06, Andrew Pinski wrote: >> On Sun, Apr 2, 2023 at 12:55 PM Jeff Law via Gcc-patches >> wrote: >>> >>> >>> >>> On 3/31/23 12:44, Sam James wrote: Kito Cheng writes: > It's not the RISC-V part, so this requires a global maintainer there I

Re: [PATCH v4 2/2] gcc: Drop obsolete INCLUDE_PTHREAD_H (ping)

2023-04-02 Thread Andrew Pinski via Gcc-patches
On Sun, Apr 2, 2023 at 1:07 PM Jeff Law wrote: > > > > On 4/2/23 14:06, Andrew Pinski wrote: > > On Sun, Apr 2, 2023 at 12:55 PM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> > >> On 3/31/23 12:44, Sam James wrote: > >>> > >>> Kito Cheng writes: > >>> > It's not the RISC-V part, so

Re: [PATCH v4 2/2] gcc: Drop obsolete INCLUDE_PTHREAD_H (ping)

2023-04-02 Thread Jeff Law via Gcc-patches
On 4/2/23 14:06, Andrew Pinski wrote: On Sun, Apr 2, 2023 at 12:55 PM Jeff Law via Gcc-patches wrote: On 3/31/23 12:44, Sam James wrote: Kito Cheng writes: It's not the RISC-V part, so this requires a global maintainer there I think? Someone able to look at the system.h bit? It

Re: [PATCH v4 2/2] gcc: Drop obsolete INCLUDE_PTHREAD_H (ping)

2023-04-02 Thread Andrew Pinski via Gcc-patches
On Sun, Apr 2, 2023 at 12:55 PM Jeff Law via Gcc-patches wrote: > > > > On 3/31/23 12:44, Sam James wrote: > > > > Kito Cheng writes: > > > >> It's not the RISC-V part, so this requires a global maintainer there I > >> think? > >> > > > > Someone able to look at the system.h bit? It should be

Re: [PATCH v4 2/2] gcc: Drop obsolete INCLUDE_PTHREAD_H (ping)

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/31/23 12:44, Sam James wrote: Kito Cheng writes: It's not the RISC-V part, so this requires a global maintainer there I think? Someone able to look at the system.h bit? It should be trivial, there's no uses left and it was added purely for a bug like this in the past (see commit

Re: [PATCH] ipa/106124 - ICE with -fkeep-inline-functions and OpenMP

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/28/23 00:20, Richard Biener via Gcc-patches wrote: The testcases in this bug reveal cases where an early generated type is collected because it was unused but gets attempted to be recreated later when a late DIE for a function (an OpenMP reduction) is created. That's unexpected and

Re: [PATCH] RISC-V: Fix PR108279

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/27/23 00:59, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong PR 108270 Fix bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108270. Consider the following testcase: void f (void * restrict in, void * restrict out, int l, int n, int m) { for (int i = 0; i < l; i++){

Re: [PATCH 2/2] Fortran: Fix memory leak in gfc_add_include_path [PR68800]

2023-04-02 Thread Bernhard Reutner-Fischer via Gcc-patches
ping? libcpp maintainers, is the helper in incpath.* ok? fortraners, Do you prefer a rogue, local forward declaration, or is the introduction of that trivial wrapper ok? I don't think pulling in cpp.h from f95-lang.cc is desirable, but i can do that if you all think that's preferred.

Re: [PATCH] libiberty: Make strstr.c in libiberty ANSI compliant

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/29/23 09:00, Jakub Jelinek via Gcc-patches wrote: On Fri, Nov 13, 2020 at 11:53:43AM -0700, Jeff Law via Gcc-patches wrote: On 5/1/20 6:06 PM, Seija Kijin via Gcc-patches wrote: The original code in libiberty says "FIXME" and then says it has not been validated to be ANSI compliant.

New Swedish PO file for 'gcc' (version 13.1-b20230212)

2023-04-02 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Swedish team of translators. The file is available at: https://translationproject.org/latest/gcc/sv.po (This file,

[PATCH 2/3] rust: Fix memory leak in compile_{integer,float}_literal

2023-04-02 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Cc: Arthur Cohen Cc: Philip Herron gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::compile_integer_literal): (CompileExpr::compile_float_literal): Fix memory leak. --- gcc/rust/backend/rust-compile-expr.cc | 7 +++ 1 file

[PATCH 1/3] go: Fix memory leak in Integer_expression

2023-04-02 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Cc: Ian Lance Taylor gcc/go/ChangeLog: * gofrontend/expressions.cc (Integer_expression::do_import): Fix memory leak. --- gcc/go/gofrontend/expressions.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/go/gofrontend/expressions.cc

[PATCH 3/3] Fortran: Fix mpz and mpfr memory leaks

2023-04-02 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Cc: fort...@gcc.gnu.org gcc/fortran/ChangeLog: * array.cc (gfc_ref_dimen_size): Free mpz memory before ICEing. * expr.cc (find_array_section): Fix mpz memory leak. * simplify.cc (gfc_simplify_reshape): Fix mpz memory leaks in error

[PATCH 0/3] Fix mpfr and mpz memory leaks

2023-04-02 Thread Bernhard Reutner-Fischer via Gcc-patches
From: Bernhard Reutner-Fischer Hi! These patches for the go, rust and fortran frontends fix the mpfr and mpz memory leaks my coccinelle script found. Bootstrapped and regtested without regressions on x86_64-unknown-linux, including go,rust,fortran. Ok for trunk for the fortran bits? I'd hope

[GCC14 PATCH] LoongArch: Optimize additions with immediates

2023-04-02 Thread Xi Ruoyao via Gcc-patches
1. Use addu16i.d for TARGET_64BIT and suitable immediates. 2. Split one addition with immediate into two addu16i.d or addi.{d/w} instructions if possible. This can avoid using a temp register w/o increase the count of instructions. Inspired by https://reviews.llvm.org/D143710 and

Re: [PATCH] [og12] OpenMP: Constructors and destructors for "declare target" static aggregates

2023-04-02 Thread Thomas Schwinge
Hi Julian! On 2023-03-27T18:54:30+, Julian Brown wrote: > This patch adds support for running constructors and destructors for > static (file-scope) aggregates for C++ objects which are marked with > "declare target" directives on OpenMP offload targets. > > At present, space is allocated on

Re: [PATCH] RISC-V: Fix ICE && codegen error of scalar move in RV32 system.

2023-04-02 Thread Kito Cheng via Gcc-patches
Commit as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=db4f7a9b47d148b5074ac15910124c746fb7a96f with more commit log On Wed, Mar 29, 2023 at 10:43 AM wrote: > > From: Juzhe-Zhong > > bug.C:144:2: error: unrecognizable insn: > 144 | } > | ^ > (insn 684 683 685 26 (set (reg:SI 513) >

Re: [PATCH] RISC-V: Fix reload fail issue on vector mac instructions

2023-04-02 Thread Kito Cheng via Gcc-patches
Committed as https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=802ab7d0db5b5aa46edc8d82526d97258c599927 , thanks On Wed, Mar 29, 2023 at 10:48 AM wrote: > > From: Juzhe-Zhong > > Co-authored-by: kito-cheng > Co-authored-by: kito-cheng > > This path fix ICE of ternary intrinsic: > bug.C:144:2:

[PATCH v3 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_reference, and __is_void. Signed-off-by: Ken Matsui ---

[PATCH v3 4/6] libstdc++: use new built-in trait __is_function for std::is_function

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch gets std::is_function to dispatch to new built-in trait __is_function. libstdc++-v3/ChangeLog: * include/std/type_traits (is_function): Use __is_function built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file changed,

[PATCH v3 5/6] c++, libstdc++: implement __is_void built-in trait

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_void. Since the new built-in name is __is_void, to avoid unintentional macro replacement, this patch also involves the removal of the existing __is_void in helper_functions.h and cpp_type_traits.h and renaming __is_void to is_void in the test

[PATCH v3 1/6] c++: implement __is_reference built-in trait

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

[PATCH v3 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 7 +++ 1 file

[PATCH v3 3/6] c++: implement __is_function built-in trait

2023-04-02 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise.

[PATCH v3 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-04-02 Thread Ken Matsui via Gcc-patches
Hi, This patch series gets std::is_object to dispatch to built-in traits and implements the following built-in traits, on which std::object depends. * __is_reference * __is_function * __is_void std::is_object was depending on them with disjunction and negation.