Re: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-11 Thread Kito Cheng
Did I miss something? the title says support but it seems only testcase?? On Wed, Oct 11, 2023 at 8:38 PM Li, Pan2 wrote: > > Committed, thanks Juzhe. > > > > Pan > > > > From: juzhe.zh...@rivai.ai > Sent: Thursday, October 12, 2023 11:34 AM > To: Li, Pan2 ; gcc-patches > Cc: Li, Pan2 ; Wang,

Re: [PATCH] early outs for functions in rs6000.cc

2023-10-11 Thread Jiufu Guo
Hi, David Edelsohn writes: > > On Tue, Oct 10, 2023 at 9:29 PM Jiufu Guo wrote: > > Hi, > > There are some piece of code like below in rs6000.cc: > > ... > if (xx) > return x; > else if (yy) > return y; > ... //else if chain > else > return d; > > Using early outs

RE: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-11 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, October 12, 2023 11:34 AM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Support FP llrint auto vectorization LGTM

Re: [PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-11 Thread juzhe.zh...@rivai.ai
LGTM juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-12 11:28 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP llrint auto vectorization From: Pan Li This patch would like to support the FP llrint auto vectorization. * long long

Re: RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Kito Cheng
Take a quick look and maybe fix it like that, but I am not sure the layout is what they want. diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index eb665188caf..1692e43de10 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -21714,7 +21714,7 @@ vector intrinsic specification,

[PATCH v1] RISC-V: Support FP llrint auto vectorization

2023-10-11 Thread pan2 . li
From: Pan Li This patch would like to support the FP llrint auto vectorization. * long long llrint (double) This will be the CVT from DF => DI from the standard name's perpsective, which has been covered in previous PATCH(es). Thus, this patch only add some test cases.

Re: [RFC] expr: don't clear SUBREG_PROMOTED_VAR_P flag for a promoted subreg [target/111466]

2023-10-11 Thread Hans-Peter Nilsson
> From: Vineet Gupta > Date: Thu, 28 Sep 2023 14:43:41 -0700 Please forgive my daftness, but... > ``` > foo2: > sext.w a6,a1 <-- this goes away > beq a1,zero,.L4 > li a5,0 > li a0,0 > .L3: > addwa4,a2,a5 > addwa5,a3,a5 >

Ping: [PATCH v2 2/2] testsuite: Replace many dg-require-thread-fence with dg-require-atomic-cmpxchg-word

2023-10-11 Thread Hans-Peter Nilsson
Ping. > From: Hans-Peter Nilsson > Date: Wed, 4 Oct 2023 19:08:16 +0200 > > s/atomic-exchange/atomic-cmpxchg-word/g. > Tested as v1. > > Ok to commit? > -- >8 -- > These tests actually use a form of atomic compare and exchange > operation, not just atomic loading and storing. Some targets

Ping: [PATCH v2 1/2] testsuite: Add dg-require-atomic-cmpxchg-word

2023-10-11 Thread Hans-Peter Nilsson
Ping. > From: Hans-Peter Nilsson > Date: Wed, 4 Oct 2023 19:04:55 +0200 > > > From: Hans-Peter Nilsson > > Date: Wed, 4 Oct 2023 17:15:28 +0200 > > > New version coming up. > > Using pointer-sized int instead of int, > __atomic_compare_exchange instead of __atomic_exchange, > renamed to

RE: [PATCH v1] RISC-V: Support FP irintf auto vectorization

2023-10-11 Thread Li, Pan2
Committed, thanks Juzhe. Pan From: juzhe.zh...@rivai.ai Sent: Thursday, October 12, 2023 10:02 AM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ; kito.cheng Subject: Re: [PATCH v1] RISC-V: Support FP irintf auto vectorization LGTM。 Thanks。

Re: [PATCH v1] RISC-V: Support FP irintf auto vectorization

2023-10-11 Thread juzhe.zh...@rivai.ai
LGTM。 Thanks。 juzhe.zh...@rivai.ai From: pan2.li Date: 2023-10-12 09:52 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Support FP irintf auto vectorization From: Pan Li This patch would like to support the FP irintf auto vectorization. *

Re: RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Jeff Law
On 10/11/23 19:05, juzhe.zh...@rivai.ai wrote: Plz revert it. It blocks development of all targets. We have specific policies for reversion. In general we want to give folks time to fix the problem rather than reverting, resubmitting, etc. Mary, the issue is the doc changes are apparently

[PATCH v1] RISC-V: Support FP irintf auto vectorization

2023-10-11 Thread pan2 . li
From: Pan Li This patch would like to support the FP irintf auto vectorization. * int irintf (float) Due to the limitation that only the same size of data type are allowed in the vectorier, the standard name lrintmn2 only act on SF => SI. Given we have code like: void test_irintf (int *out,

Re: [PATCH] [APX] Support Intel APX PUSH2POP2

2023-10-11 Thread Hongtao Liu
On Tue, Oct 10, 2023 at 2:51 PM Hongyu Wang wrote: > > From: "Mo, Zewei" > > Hi, > > Intel APX PUSH2POP2 feature has been released in [1]. > > This feature requires stack to be aligned at 16byte, therefore in > prologue/epilogue, a standalone push/pop will be emitted before any > push2/pop2 if

RE: [PATCH] Support Intel USER_MSR

2023-10-11 Thread Liu, Hongtao
> -Original Message- > From: Hu, Lin1 > Sent: Tuesday, October 10, 2023 4:06 PM > To: Hu, Lin1 ; gcc-patches@gcc.gnu.org > Cc: Liu, Hongtao ; ubiz...@gmail.com > Subject: RE: [PATCH] Support Intel USER_MSR > > There are some typos In /gcc/doc/extend.texi and /gcc/doc/invoke.texi. They

Re: Re: RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread juzhe.zh...@rivai.ai
Plz revert it. It blocks development of all targets. juzhe.zh...@rivai.ai From: Andrew Pinski Date: 2023-10-12 09:03 To: juzhe.zh...@rivai.ai CC: gcc-patches; jeffreyalaw; Kito.cheng; kito.cheng; Robin Dapp Subject: Re: RISC-V: Support CORE-V XCVMAC and XCVALU extensions On Wed, Oct 11, 2023

Re: RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Andrew Pinski
On Wed, Oct 11, 2023 at 6:01 PM juzhe.zh...@rivai.ai wrote: > > ../../../../gcc/gcc/doc/extend.texi:21708: warning: node next `RISC-V Vector > Intrinsics' in menu `CORE-V Built-in Functions' and in sectioning `RX > Built-in Functions' differ > ../../../../gcc/gcc/doc/extend.texi:21716: warning:

RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread juzhe.zh...@rivai.ai
../../../../gcc/gcc/doc/extend.texi:21708: warning: node next `RISC-V Vector Intrinsics' in menu `CORE-V Built-in Functions' and in sectioning `RX Built-in Functions' differ ../../../../gcc/gcc/doc/extend.texi:21716: warning: node `RX Built-in Functions' is next for `CORE-V Built-in Functions'

Re: Re: [PATCH v2 1/4] options: Define TARGET__P and TARGET__OPTS_P macro for Mask and InverseMask

2023-10-11 Thread Kito Cheng
Fixed, sorry for disturbing trunk On Wed, Oct 11, 2023 at 3:50 PM Kito Cheng wrote: > > Oh, my bad seem like that was in later patch, let me fix now > > 钟居哲 於 2023年10月11日 週三 15:49 寫道: >> >> ../../../../gcc/gcc/config/riscv/riscv.cc:8142:18: error: >> ‘TARGET_MIN_VLEN_OPTS’ was not declared in

[committed] RISC-V: Add TARGET_MIN_VLEN_OPTS to fix the build

2023-10-11 Thread Kito Cheng
gcc/ChangeLog: * config/riscv/riscv-opts.h (TARGET_MIN_VLEN_OPTS): New. --- gcc/config/riscv/riscv-opts.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/riscv/riscv-opts.h b/gcc/config/riscv/riscv-opts.h index e7c6b75c5ea..31ee42dea6b 100644 ---

Re: Re: [PATCH] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-11 Thread Kito Cheng
Yeah, I'll take you suggestion and go ahead, Robin's suggestion is great but it's just a little too magic :P On Wed, Oct 11, 2023 at 4:00 PM 钟居哲 wrote: > > Any update of this patch? > > Currently, we are running vect testsuite with -march=rv64gcv_zvl128b > > I am planning to run vect testsuite

Re: Re: [PATCH] RISC-V: Fix the riscv_legitimize_poly_move issue on targets where the minimal VLEN exceeds 512.

2023-10-11 Thread 钟居哲
Any update of this patch? Currently, we are running vect testsuite with -march=rv64gcv_zvl128b I am planning to run vect testsuite with these following combinations: -march=rv64gcv_zvl128b --param=riscv-autovec-lmul=m1 -march=rv64gcv_zvl128b --param=riscv-autovec-lmul=m2 -march=rv64gcv_zvl128b

Re: Re: [PATCH v2 1/4] options: Define TARGET__P and TARGET__OPTS_P macro for Mask and InverseMask

2023-10-11 Thread Kito Cheng
Oh, my bad seem like that was in later patch, let me fix now 钟居哲 於 2023年10月11日 週三 15:49 寫道: > ../../../../gcc/gcc/config/riscv/riscv.cc:8142:18: error: > ‘TARGET_MIN_VLEN_OPTS’ was not declared in this scope >int min_vlen = TARGET_MIN_VLEN_OPTS (opts); > > > > --

Re: Re: [PATCH v2 1/4] options: Define TARGET__P and TARGET__OPTS_P macro for Mask and InverseMask

2023-10-11 Thread 钟居哲
../../../../gcc/gcc/config/riscv/riscv.cc:8142:18: error: ‘TARGET_MIN_VLEN_OPTS’ was not declared in this scope int min_vlen = TARGET_MIN_VLEN_OPTS (opts); juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-10-12 05:20 To: Jeff Law CC: Kito Cheng; gcc-patches; palmer; rdapp; juzhe.zhong

[committed] RISC-V: Adjust long unconditional branch sequence

2023-10-11 Thread Jeff Law
Andrew and I independently noted the long unconditional branch sequence was using the "call" pseudo op. Technically it works, but it's a bit odd. This patch flips it to use the "jump" pseudo-op. This was tested with a hacked-up local compiler which forced all branches/jumps to be long

Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Paul Richard Thomas
Hi Harald and Bernhard, Indeed, you are right about the space. However, the compile is intentional. This catches the fix: ! { dg-final { scan-tree-dump-times "co._data1_length = 10;" 1 "original" } } Also, it helps to get the PR number right! I was rushing to get the patch out before leaving

[PATCH v17 36/39] c++, libstdc++: Implement __is_signed built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_signed. gcc/cp/ChangeLog: * cp-trait.def: Define __is_signed. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SIGNED. *

[PATCH v17 33/39] libstdc++: Optimize is_compound trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_compound trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_compound): Do not use __not_. (is_compound_v): Use is_fundamental_v instead. Signed-off-by: Ken Matsui

[PATCH v17 22/39] libstdc++: Optimize is_reference trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_reference trait by dispatching to the new __is_reference built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. (is_reference_v): Likewise. Signed-off-by: Ken

[PATCH v17 25/39] libstdc++: Optimize is_object trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_object trait by dispatching to the new __is_function and __is_reference built-in traits. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use __is_function and __is_reference built-in traits. (is_object_v):

[PATCH v17 29/39] libstdc++: Optimize is_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_pointer trait by dispatching to the new __is_pointer built-in trait. libstdc++-v3/ChangeLog: * include/bits/cpp_type_traits.h (__is_ptr): Use __is_pointer built-in trait. * include/std/type_traits (is_pointer): Likewise.

[PATCH v17 23/39] c++: Implement __is_function built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. *

[PATCH v17 24/39] libstdc++: Optimize is_function trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_function trait by dispatching to the new __is_function built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_function): Use __is_function built-in trait. (is_function_v): Likewise. Optimize its implementation.

[PATCH v17 30/39] c++, libstdc++: Implement __is_arithmetic built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_arithmetic. gcc/cp/ChangeLog: * cp-trait.def: Define __is_arithmetic. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARITHMETIC.

[PATCH v17 27/39] libstdc++: Optimize remove_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the remove_pointer trait by dispatching to the new remove_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_pointer): Use __remove_pointer built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v17 15/39] c++: Implement __is_member_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_member_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 26/39] c++: Implement __remove_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::remove_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __remove_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * semantics.cc (finish_trait_type): Handle CPTK_REMOVE_POINTER.

[PATCH v17 31/39] libstdc++: Optimize is_arithmetic trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_arithmetic trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_arithmetic): Use __is_arithmetic built-in trait. (is_arithmetic_v): Likewise. Signed-off-by:

[PATCH v17 20/39] libstdc++: Optimize is_member_object_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_object_pointer trait by dispatching to the new __is_member_object_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_object_pointer): Use __is_member_object_pointer built-in trait.

[PATCH v17 37/39] libstdc++: Optimize is_signed trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_signed trait by dispatching to the new __is_signed built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_signed): Use __is_signed built-in trait. (is_signed_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v17 14/39] libstdc++: Optimize is_scoped_enum trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_scoped_enum trait by dispatching to the new __is_scoped_enum built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scoped_enum): Use __is_scoped_enum built-in trait. (is_scoped_enum_v): Likewise.

[PATCH v17 32/39] libstdc++: Optimize is_fundamental trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_fundamental trait by dispatching to the new __is_arithmetic built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_fundamental_v): Use __is_arithmetic built-in trait. (is_fundamental): Likewise. Optimize the

[PATCH v17 19/39] c++: Implement __is_member_object_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_member_object_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_object_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 18/39] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_function_pointer trait by dispatching to the new __is_member_function_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_function_pointer): Use __is_member_function_pointer built-in trait.

[PATCH v17 09/39] c++: Implement __is_unbounded_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_unbounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unbounded_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 34/39] c++: Implement __is_unsigned built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. *

[PATCH v17 39/39] libstdc++: Optimize is_scalar trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_scalar trait by dispatching to the new __is_scalar built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v17 07/39] c++: Implement __is_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. * semantics.cc

[PATCH v17 11/39] c++: Implement __is_bounded_array built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_bounded_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_bounded_array. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_BOUNDED_ARRAY.

[PATCH v17 16/39] libstdc++: Optimize is_member_pointer trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_member_pointer trait by dispatching to the new __is_member_pointer built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_member_pointer): Use __is_member_pointer built-in trait. (is_member_pointer_v):

[PATCH v17 21/39] c++: Implement __is_reference built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. *

[PATCH v17 35/39] libstdc++: Optimize is_unsigned trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_unsigned trait by dispatching to the new __is_unsigned built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unsigned): Use __is_unsigned built-in trait. (is_unsigned_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v17 28/39] c++, libstdc++: Implement __is_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_POINTER. *

[PATCH v17 10/39] libstdc++: Optimize is_unbounded_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_unbounded_array trait by dispatching to the new __is_unbounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_unbounded_array_v): Use __is_unbounded_array built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v17 08/39] libstdc++: Optimize is_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_array trait by dispatching to the new __is_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_array): Use __is_array built-in trait. (is_array_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v17 17/39] c++: Implement __is_member_function_pointer built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_member_function_pointer. gcc/cp/ChangeLog: * cp-trait.def: Define __is_member_function_pointer. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle

[PATCH v17 38/39] c++, libstdc++: Implement __is_scalar built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with __is_scalar_type to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * cp-trait.gperf: Reflect cp-trait.def

[PATCH v17 12/39] libstdc++: Optimize is_bounded_array trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_bounded_array trait by dispatching to the new __is_bounded_array built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_bounded_array_v): Use __is_bounded_array built-in trait. Signed-off-by: Ken Matsui ---

[PATCH v17 13/39] c++: Implement __is_scoped_enum built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_scoped_enum. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scoped_enum. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_SCOPED_ENUM.

[PATCH v17 05/39] c++: Implement __is_volatile built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. *

[PATCH v17 03/39] c++: Implement __is_const built-in trait

2023-10-11 Thread Ken Matsui
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * Make-lang.in: Update key positions for gperf, based on automatically computed values. * cp-trait.def: Define __is_const. * cp-trait.gperf: Reflect cp-trait.def change. *

[PATCH v17 06/39] libstdc++: Optimize is_volatile trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_volatile trait by dispatching to the new __is_volatile built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui

[PATCH v17 04/39] libstdc++: Optimize is_const trait performance

2023-10-11 Thread Ken Matsui
This patch optimizes the performance of the is_const trait by dispatching to the new __is_const built-in trait. libstdc++-v3/ChangeLog: * include/std/type_traits (is_const): Use __is_const built-in trait. (is_const_v): Likewise. Signed-off-by: Ken Matsui ---

[PATCH v17 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Ken Matsui
Since RID_MAX soon reaches 255 and all traits are used approximately once in a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and RID_TRAIT_TYPE for all traits and uses gperf to look up the specific trait. gcc/c-family/ChangeLog: * c-common.cc (c_common_reswords): Map

[PATCH v17 01/39] c++: Sort built-in traits alphabetically

2023-10-11 Thread Ken Matsui
This patch sorts built-in traits alphabetically for better code readability. gcc/cp/ChangeLog: * constraint.cc (diagnose_trait_expr): Sort built-in traits alphabetically. * cp-trait.def: Likewise. * semantics.cc (trait_expr_value): Likewise.

[PATCH v17 00/39] Optimize type traits performance

2023-10-11 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v17: * Rebased on top of trunk * Improved clarity of the commit message * Simplified Make-lang.in * Made ridpointers for RID_TRAIT_EXPR

Re: [PATCH v16 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Ken Matsui
On Wed, Oct 11, 2023 at 1:09 PM Patrick Palka wrote: > > On Tue, 10 Oct 2023, Ken Matsui wrote: > > > Since RID_MAX soon reaches 255 and all traits are used approximately once in > > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and > > RID_TRAIT_TYPE for all traits and uses

Re: [PATCH v2 4/4] RISC-V: Implement target attribute

2023-10-11 Thread Kito Cheng
> Assuming you're agreeable to adjusting the code to avoid alloca, we'll > do a quick turnaround on the v3 -- I'll just audit the return paths to > make sure we don't leak and we'll be good to go. Thanks for point out that, let me figure out which is the best way to fix that, using xstrdup + free

Re: [PATCH v2 2/4] RISC-V: Refactor riscv_option_override and riscv_convert_vector_bits. [NFC]

2023-10-11 Thread Kito Cheng
Thanks, committed :) On Tue, Oct 10, 2023 at 6:51 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > Allow those funciton apply from a local gcc_options rather than the > > global options. > > > > Preparatory for target attribute, sperate this change for eaiser reivew > > since

Re: [PATCH v2 1/4] options: Define TARGET__P and TARGET__OPTS_P macro for Mask and InverseMask

2023-10-11 Thread Kito Cheng
Thanks, committed, and just did one more check with x86 again, it works as well, hope no more awk portable issue this time :P On Tue, Oct 10, 2023 at 6:51 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > We TARGET__P marcro to test a Mask and InverseMask with user > > specified

Re: [PATCH v2 3/4] RISC-V: Extend riscv_subset_list, preparatory for target attribute support

2023-10-11 Thread Kito Cheng
Thanks, committed with fixup for those two comments :) On Tue, Oct 10, 2023 at 7:01 AM Jeff Law wrote: > > > > On 10/9/23 22:13, Kito Cheng wrote: > > riscv_subset_list only accept a full arch string before, but we need to > > parse single extension when supporting target attribute, also we may

[PATCH v2] gcc: Introduce -fhardened

2023-10-11 Thread Marek Polacek
On Tue, Sep 19, 2023 at 10:58:19AM -0400, Marek Polacek wrote: > On Mon, Sep 18, 2023 at 08:57:39AM +0200, Richard Biener wrote: > > On Fri, Sep 15, 2023 at 5:09 PM Marek Polacek via Gcc-patches > > wrote: > > > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, > > >

[COMMITTED][GCC13] PR tree-optimization/111694 - Ensure float equivalences include + and - zero.

2023-10-11 Thread Andrew MacLeod
Similar patch which was checked into trunk last week.   slight tweak needed as dconstm0 was not exported in gcc 13, otherwise functionally the same Bootstrapped on x86_64-pc-linux-gnu.  pushed. Andrew commit f0efc4b25cba1bd35b08b7dfbab0f8fc81b55c66 Author: Andrew MacLeod Date: Mon Oct 9

Re: [PATCH v2] c++: implement P2564, consteval needs to propagate up [PR107687]

2023-10-11 Thread Marek Polacek
On Tue, Oct 10, 2023 at 01:20:09PM -0400, Marek Polacek wrote: > @@ -3364,6 +3365,13 @@ word as an identifier. You can use the keyword > @code{__typeof__} instead. > This option is implied by the strict ISO C++ dialects: @option{-ansi}, > @option{-std=c++98}, @option{-std=c++11}, etc. > >

Re: [PATCH v16 02/39] c-family, c++: Look up built-in traits through gperf

2023-10-11 Thread Patrick Palka
On Tue, 10 Oct 2023, Ken Matsui wrote: > Since RID_MAX soon reaches 255 and all traits are used approximately once in > a C++ translation unit, this patch instead uses only RID_TRAIT_EXPR and > RID_TRAIT_TYPE for all traits and uses gperf to look up the specific trait. Nice! This looks good to

Re: [PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-11 Thread Harald Anlauf
Dear All, sorry for attaching the wrong patch - this time it is the correct one! Harald On 10/11/23 21:39, Harald Anlauf wrote: Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict between an internal procedure and a local

[PATCH] Fortran: name conflict between internal procedure and derived type [PR104351]

2023-10-11 Thread Harald Anlauf
Dear All, the attached trivial patch fixes (= catches) a forgotten corner-case in the detection of a name conflict between an internal procedure and a local declaration for the case that the latter is a derived type. Another torture test by Gerhard... ;-) Used to ICE previously. Regtested on

Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Harald Anlauf
Hi Paul, the patch is fine, but I forgot the mention that the testcase needs fixing: Instead of ! {dg-do compile } you'll likely want ! { dg-do run } (Note the space before the dg-command.) Cheers, Harald On 10/11/23 21:06, Harald Anlauf wrote: Hi Paul, On 10/11/23 10:48, Paul Richard

Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction.

2023-10-11 Thread Robin Dapp
> It wasn't very clear, sorry, but it was the last sentence I was asking > for clarification on, not the other bits. Why do we want to avoid > generating a COND_ADD when the operand is a vectorisable call? Ah, I see, apologies. Upon thinking about it a bit more (thanks) I figured this hunk is

Re: [Patch, fortran] PR67740 - Wrong association status of allocatable character pointer in derived types

2023-10-11 Thread Harald Anlauf
Hi Paul, On 10/11/23 10:48, Paul Richard Thomas wrote: Hi All, The title line of the PR should have been changed a long time since. As noted in comment 5, the original problem was fixed in 10.5. This patch fixes the problem described in comments 4 and 6, where the hidden string length

Re: [PATCH] Fix coroutine tests for libstdc++ gnu-version-namespace mode

2023-10-11 Thread François Dumont
Hi Iain On 11/10/2023 09:30, Iain Sandoe wrote: Hi François, On 11 Oct 2023, at 05:49, François Dumont wrote: On 08/10/2023 15:59, Iain Sandoe wrote: On 23 Sep 2023, at 21:10, François Dumont wrote: I'm eventually fixing those tests the same way we manage this problem in libstdc++

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Florian Weimer
* Florian Weimer: > * C89 test cases that appear to make explicit use of C89-only features. > I plan to add /* { dg-additional-options "-std=gnu89" } */ to those > (or add -std=gnu89 to an existing dg-options line). These fixes can > be submitted early. Example:

[PATCH] C99 testsuite readiness: Some verified test case adjustments

2023-10-11 Thread Florian Weimer
The updated test cases still reproduce the bugs with old compilers. gcc/testsuite/ * gcc.c-torture/compile/pc44485.c (func_21): Add missing cast. * gcc.c-torture/compile/pr106101.c: Use builtins to avoid calls to undeclared functions. Change type of yyvsp to char

[PATCH] C99 test suite conversation: Some unverified test case adjustments

2023-10-11 Thread Florian Weimer
These changes are assumed not to interfere with the test objective, but it was not possible to reproduce the historic test case failures (with or without the modification here). gcc/testsuite/ * gcc.c-torture/compile/2105-1.c: Add missing int return type. Call __builtin_exit

[PATCH] C99 test suite readiness: Mark some C89 tests

2023-10-11 Thread Florian Weimer
Add -std=gnu89 to some tests which evidently target C89-only language features. gcc/testsuite/ * gcc.c-torture/compile/920501-11.c: Compile with -std=gnu89. * gcc.c-torture/compile/920501-23.c: Likewise. * gcc.c-torture/compile/920501-8.c: Likewise. *

Re: Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread 钟居哲
Thanks Richi point it out. I found this patch can't make conditional gather load succeed on SLP. I am considering change MASK_LEN_GATHER_LOAD in pattern recognization: If no condition mask, in tree-vect-patterns.cc, I build MASK_LEN_GATHER_LOAD (ptr, offset, scale, 0) -> 4 arguments same as

Re: [PATCH v2] c++: Improve diagnostics for constexpr cast from void*

2023-10-11 Thread Marek Polacek
On Wed, Oct 11, 2023 at 10:57:06AM +1100, Nathaniel Shead wrote: > On Mon, Oct 09, 2023 at 04:10:20PM -0400, Jason Merrill wrote: > > On 10/9/23 06:03, Nathaniel Shead wrote: > > > Bootstrapped and regtested on x86_64-pc-linux-gnu with > > > GXX_TESTSUITE_STDS=98,11,14,17,20,23,26,impcx. > > > >

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Florian Weimer
* Jeff Law: > On 10/11/23 04:39, Florian Weimer wrote: >> I've started to look at what it is required to convert the testsuite to >> C99 (without implicit ints, without implicit function declarations, and >> a few other legacy language features). > I bet those older tests originating from

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 08:17:49AM -0600, Jeff Law wrote: > > > On 10/11/23 08:10, Richard Earnshaw (lists) wrote: > > On 11/10/2023 14:56, Jeff Law wrote: > > > > > > > > > On 10/11/23 04:39, Florian Weimer wrote: > > > > I've started to look at what it is required to convert the testsuite to

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jeff Law
On 10/11/23 08:10, Richard Earnshaw (lists) wrote: On 11/10/2023 14:56, Jeff Law wrote: On 10/11/23 04:39, Florian Weimer wrote: I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Richard Earnshaw (lists)
On 11/10/2023 14:56, Jeff Law wrote: > > > On 10/11/23 04:39, Florian Weimer wrote: >> I've started to look at what it is required to convert the testsuite to >> C99 (without implicit ints, without implicit function declarations, and >> a few other legacy language features). > I bet those older

Re: Principles of the C99 testsuite conversion

2023-10-11 Thread Jeff Law
On 10/11/23 04:39, Florian Weimer wrote: I've started to look at what it is required to convert the testsuite to C99 (without implicit ints, without implicit function declarations, and a few other legacy language features). I bet those older tests originating from c-torture will be a bit

Re: [PATCH v4 0/2] RISC-V: Support CORE-V XCVMAC and XCVALU extensions

2023-10-11 Thread Jeff Law
On 10/11/23 06:06, Mary Bennett wrote: This patch series presents the comprehensive implementation of the MAC and ALU extension for CORE-V. Tested with riscv-gnu-toolchain on binutils, ld, gas and gcc testsuites to ensure its correctness and compatibility with the existing codebase. However,

Re: [PATCH v4] c-family: Implement __has_feature and __has_extension [PR60512]

2023-10-11 Thread Alex Coplan
On 27/09/2023 15:27, Alex Coplan wrote: > Hi, > > This is a v4 patch to address Jason's feedback here: > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630911.html > > w.r.t. v3 it just removes a comment now that some uncertainty around > cxx_binary_literals has been resolved, and

Re: [PATCH] early outs for functions in rs6000.cc

2023-10-11 Thread David Edelsohn
On Tue, Oct 10, 2023 at 9:29 PM Jiufu Guo wrote: > Hi, > > There are some piece of code like below in rs6000.cc: > > ... > if (xx) >return x; > else if (yy) >return y; > ... //else if chain > else >return d; > > Using early outs would be more preferable for this kind of code. >

Re: [committed] [PR target/93062] RISC-V: Handle long conditional branches for RISC-V

2023-10-11 Thread Andrew Waterman
On Tue, Oct 10, 2023 at 8:26 PM Jeff Law wrote: > > > > On 10/10/23 18:24, Andrew Waterman wrote: > > I remembered another concern since we discussed this patch privately. > > Using ra for long calls results in a sequence that will corrupt the > > return-address stack. > Yup. We've actually got

Re: [PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Juzhe-Zhong wrote: > This patch fixes this following FAILs in RISC-V regression: > > FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump > vect "Loop contains only SLP stmts" > FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only

[PATCH] VECT: Enhance SLP of MASK_LEN_GATHER_LOAD[PR111721]

2023-10-11 Thread Juzhe-Zhong
This patch fixes this following FAILs in RISC-V regression: FAIL: gcc.dg/vect/vect-gather-1.c -flto -ffat-lto-objects scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-1.c scan-tree-dump vect "Loop contains only SLP stmts" FAIL: gcc.dg/vect/vect-gather-3.c -flto

RE: [PATCH 3/3]middle-end: maintain LCSSA throughout loop peeling

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Tamar Christina wrote: > > > + auto loop_exits = get_loop_exit_edges (loop); > > > + auto_vec doms; > > > + > > >if (at_exit) /* Add the loop copy at exit. */ > > > { > > > - if (scalar_loop != loop) > > > + if (scalar_loop != loop && new_exit->dest !=

RE: [PATCH 2/3]middle-end: updated niters analysis to handle multiple exits.

2023-10-11 Thread Richard Biener
On Wed, 11 Oct 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, October 10, 2023 12:14 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; j...@ventanamicro.com > > Subject: Re: [PATCH 2/3]middle-end: updated niters analysis to

  1   2   >