[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: Ken

[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. gcc/test

[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 CPTK_IS_MEMBER_POINTE

[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 --- libstdc++-v3/include/

[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 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 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. * seman

[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. Optim

[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): Likewi

[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 Mats

[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 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. * semantics.c

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 for

[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 jumps.

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 Su

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] 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] 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 wi

[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 --- a/gcc/config/riscv/ri

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 t

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' i

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:

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 a

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: [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 th

[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, f

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

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. * in

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。 juzhe.z

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 atomi

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 (not

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 >

[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. gcc/testsuite/ChangeLog:

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, whi

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 l

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 juzhe.zh...@riva

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 w

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, Y

[PATCH 2/2] Support 32/64-bit vectorization for conversion between _Float16 and integer/float.

2023-10-11 Thread liuhongt
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/mmx.md (V2FI_32): New mode iterator (movd_v2hf_to_sse): Rename to .. (movd__to_sse): .. this. (movd_v2hf_to_sse_reg): Rename to .. (movd__to_sse_reg)

[PATCH 1/2] Enable vectorization for V2HF/V4HF rounding operations and sqrt.

2023-10-11 Thread liuhongt
For lrint/lround/lceil/lfoor is not vectorized due to vectorization restriction. When input element size is different from output element size, vectorization relies on the old TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION intstead of the modern standand pattern name. The patch only supports standard

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

2023-10-11 Thread Li, Pan2
Sorry for misleading here. When implement the llrint after lrint, I realize llrint (DF => SF) are supported by the lrint already in the previous patche(es). Because they same the same standard name as well as the mode iterator. Thus, I may have 2 options here for the patch naming. 1. Only menti

[PATCH V2] 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 -

<    1   2