[PATCH] RISC-V: Fix RVV ICE && runtine fail

2023-03-19 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (eliminate_insn): Fix bugs. (insert_vsetvl): Ditto. (pass_vsetvl::emit_local_forward_vsetvls): Ditto. * config/riscv/riscv-vsetvl.h (enum vsetvl_type): Ditto. * config/riscv/vector.md:

Re: [PATCH] rs6000: Don't ICE when compiling the __builtin_vec_xst_trunc built-in [PR109178]

2023-03-19 Thread Kewen.Lin via Gcc-patches
Hi Peter, on 2023/3/18 10:30, Peter Bergner wrote: > On 3/17/23 7:17 PM, Peter Bergner wrote: >> On 3/17/23 5:35 PM, Peter Bergner wrote: >>> When we expand the __builtin_vec_xst_trunc built-in, we use the wrong mode >>> for the MEM operand which causes an unrecognizable insn ICE. The solution

[PATCH] libstdc++: use new built-in trait __remove_pointer

2023-03-19 Thread Ken Matsui via Gcc-patches
libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __remove_pointer built-in trait. --- diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index 2bd607a8b8f..cba98091aad 100644 --- a/libstdc++-v3/include/std/type_traits +++

Ping [PATCHv3, gfortran] Escalate failure when Hollerith constant to real conversion fails [PR103628]

2023-03-19 Thread HAO CHEN GUI via Gcc-patches
Hi, Gently ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613497.html Thanks Gui Haochen 在 2023/3/7 16:55, HAO CHEN GUI 写道: > Hi, > The patch escalates the failure when Hollerith constant to real conversion > fails in native_interpret_expr. It finally reports an "Cannot

Re: Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point ternary intrinsics.

2023-03-19 Thread juzhe.zh...@rivai.ai
The last patch. Kito is still keep testing with pressure tests. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-03-20 01:03 To: juzhe.zhong; gcc-patches CC: kito.cheng Subject: Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point ternary intrinsics. On 3/15/23 00:37,

Re: Re: [PATCH] RISC-V: Fine tune gather load RA constraint

2023-03-19 Thread juzhe.zh...@rivai.ai
It's ok to defer them GCC-14. I will keep testing and fix bugs during these 2 months. I won't support any more feature or optimizations until GCC-14 is open. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-03-20 00:55 To: juzhe.zh...@rivai.ai; gcc-patches CC: kito.cheng Subject: Re: [PATCH]

[PATCH] Fortran: simplification of NEAREST for large argument [PR109186]

2023-03-19 Thread Harald Anlauf via Gcc-patches
Dear all, I intend to commit the attached obvious patch within 24h unless there are comments. The issue is an off-by-one error in setting up the maximum exponent of the real kind that is passed to mpfr, so that model numbers between huge(x)/2 and huge(x), when given as an argument to

[PATCH] c++: implement __remove_pointer built-in trait

2023-03-19 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER. gcc/testsuite/ChangeLog: * g++.dg/ext/has-builtin-1.C: Test existence of __remove_pointer. *

Re: [PATCH] c++: implement __is_reference built-in trait

2023-03-19 Thread Ken Matsui via Gcc-patches
* cp-trait.def (names_builtin_p): Define __is_reference. This changelog should be the following. * cp-trait.def: Define __is_reference. I am sorry for the confusion. On Sat, Mar 18, 2023 at 9:07 PM Ken Matsui wrote: > > This patch implements built-in trait for std::is_reference. > >

Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

2023-03-19 Thread Harald Anlauf via Gcc-patches
Hi Thomas, Am 19.03.23 um 08:34 schrieb Thomas Koenig via Gcc-patches: Hi Harald, Am 18.03.23 um 19:52 schrieb Thomas Koenig via Gcc-patches: Hi Harald, the Fortran standard requires an explicit procedure interface in certain situations, such as when they have a BIND(C) attribute

Re: [patch, fortran, doc] Explicitly mention undefined overflow

2023-03-19 Thread Thomas Koenig via Gcc-patches
Hi Paul, Yes, that's fine for trunk. I wonder if it is worth being explicit that linear congruential pseudo-random number generators can and do fail at -O3? I don't think we should put this into the docs, because that can change at any time. Maybe into porting_to.html, though (where I have

Re: [PATCH] Testsuite: Disable micromips for MSA tests

2023-03-19 Thread Jeff Law via Gcc-patches
On 3/13/23 23:46, Xin Liu wrote: Thanks for your feedback. You're right that MicroMIPS doesn't support MSA, so disabling micromips for MSA tests is a reasonable change. I'll make sure to include a ChangeLog entry with a clear description of future patches. Thanks for the suggestions, and I'll

[PATCH testsuite] rs6000: suboptimal code for returning bool value on target ppc.

2023-03-19 Thread Ajit Agarwal via Gcc-patches
Hello All: This patch add new test to check unnecessary zero extension removal. Regtested on powerpc64-linux-gnu. Thanks & Regards Ajit rs6000: suboptimal code for returning bool value on target ppc. Tests to check unnecessary redundant zero extension removal.

Re: [PATCH] RISC-V: Fix bugs of ternary integer and floating-point ternary intrinsics.

2023-03-19 Thread Jeff Law via Gcc-patches
On 3/15/23 00:37, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong Fix bugs of ternary intrinsic pattern: interger: vnmsac.vv vd, vs1, vs2, vm# vd[i] = -(vs1[i] * vs2[i]) + vd[i] (minus op3 (mult op1 op2)) vnmsac.vx vd, rs1, vs2, vm# vd[i] = -(x[rs1] * vs2[i]) + vd[i] (minus op3

Re: [PATCH] vect: Verify that GET_MODE_NUNITS is greater than one.

2023-03-19 Thread Jeff Law via Gcc-patches
On 3/14/23 15:52, Michael Collison wrote: While working on autovectorizing for the RISCV port I encountered an issue where can_duplicate_and_interleave_p assumes that GET_MODE_NUNITS is a evenly divisible by two. The RISC-V target has vector modes (e.g. VNx1DImode), where GET_MODE_NUNITS is

Re: [PATCH] RISC-V: Fine tune gather load RA constraint

2023-03-19 Thread Jeff Law via Gcc-patches
On 3/15/23 00:52, juzhe.zh...@rivai.ai wrote: Hi, Jeff. I really hope the current "refine tune RA constraint" patches can be merged into GCC-13. These patches are just making RA constraint to be consistent with RVV ISA after I double checked RVV ISA. These RA constraints changing is very

Re: [PATCH v2] PR target/89828 Inernal compiler error on -fno-omit-frame-pointer

2023-03-19 Thread Jeff Law via Gcc-patches
On 3/15/23 01:51, Yoshinori Sato wrote: What about this? It no longer occurs for me. gcc/config/rx/ * rx.cc (add_pop_cfi_notes): Release the frame pointer if it is used. (rx_expand_prologue): Redesigned stack pointer and frame pointer update process. So I think the ChangeLog

Re: [patch, fortran, doc] Explicitly mention undefined overflow

2023-03-19 Thread Andreas Schwab
On Mär 19 2023, Thomas Koenig via Gcc-patches wrote: > diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi > index c483e13686d..93c66b18938 100644 > --- a/gcc/fortran/gfortran.texi > +++ b/gcc/fortran/gfortran.texi > @@ -820,6 +820,7 @@ might in some way or another become visible

Re: [patch, fortran, doc] Explicitly mention undefined overflow

2023-03-19 Thread Paul Richard Thomas via Gcc-patches
Hi Thomas, Yes, that's fine for trunk. I wonder if it is worth being explicit that linear congruential pseudo-random number generators can and do fail at -O3? Thanks for the doc patches! Paul On Sun, 19 Mar 2023 at 08:32, Thomas Koenig via Fortran wrote: > Here's also an update on the docs

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

2023-03-19 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, fortran] PR87127 - External function not recognised from within an associate block

2023-03-19 Thread Paul Richard Thomas via Gcc-patches
Hi All, I committed this to 8-branch on 2019-04-24 but not to 9-branch. I have no record of why I did this. The patch now requires an additional line, && sym->ns->proc_name->attr.proc != PROC_MODULE to prevent the error message in pr88376.f90 from changing to the less helpful Error:

[PATCH v2] rs6000: suboptimal code for returning bool value on target ppc

2023-03-19 Thread Ajit Agarwal via Gcc-patches
Hello All: This patch eliminates unncessary zero extension with ree pass. Bootstrapped and regtested on powerpc64-linux-gnu. Thanks & Regards Ajit rs6000: suboptimal code for returning bool value on target ppc. Eliminate unnecessary redundantzero extension.

Re: [patch, wwwdocs] Mention finalization

2023-03-19 Thread Paul Richard Thomas via Gcc-patches
Hi Thomas, Thanks for that! I think that your one-liner says it all :-) There are three PRs left open that PR37336 depends on: PR65347: Is partially fixed. The F2003/8 feature of finalization of a structure constructor within an array constructor doesn't work. I wonder if a compile option

[patch, fortran, doc] Explicitly mention undefined overflow

2023-03-19 Thread Thomas Koenig via Gcc-patches
Here's also an update on the docs to explicitly mention behavior on overflow. Maybe this will reach another 0.05% of users... OK for trunk? Best regards Thomas gcc/fortran/ChangeLog: * gfortran.texi: Mention behavior on overflow. diff --git a/gcc/fortran/gfortran.texi

[patch, wwwdocs] Mention finalization

2023-03-19 Thread Thomas Koenig via Gcc-patches
Hi, the sentence below seems a bit short for such a huge undertaking, but I could not think of anything else to day. Tested with "tidy -e". OK for wwwdocs? Best regards Thomas diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html index c8d757b6..a4b71ffa 100644 ---

Re: [PATCH] Fortran: procedures with BIND(C) attribute require explicit interface [PR85877]

2023-03-19 Thread Thomas Koenig via Gcc-patches
Hi Harald, Am 18.03.23 um 19:52 schrieb Thomas Koenig via Gcc-patches: Hi Harald, the Fortran standard requires an explicit procedure interface in certain situations, such as when they have a BIND(C) attribute (F2018:15.4.2.2). The attached patch adds a check for this. Regtested on

Re: [PATCH] or1k: Do not clear existing FPU exceptions before updating

2023-03-19 Thread Stafford Horne via Gcc-patches
Hello, I pushed this upstream. On Sat, Mar 18, 2023 at 05:04:05PM +0900, Stafford Horne wrote: > We should always carry the exceptions forward. This bug was found when > working on testing glibc math tests, many tests were failing with > Overflow and Underflow flags not set. This was traced to