Re: [PATCH] RISC-V: Enable full coverage vect tests

2023-10-10 Thread Robin Dapp
Hi Juzhe, seems OK to me. We don't support most of the patterns directly but as we can and want to vectorize them it makes sens to enable the tests. Regards Robin

Re: [PATCH] x86: set spincount 1 for x86 hybrid platform [PR109812]

2023-10-10 Thread Jakub Jelinek
On Wed, Oct 11, 2023 at 02:47:56AM +, Zhang, Jun wrote: > Sorry, I don't know how to place wait.h. This patch is only for x86. > Wait.h is in libgomp/config/linux/. > if I directly place do_adjust_default_spincount in wait.h, > it maybe need #ifdef __x86_64__, and also need a wait.h in include

[PATCH] RISC-V: Enable full coverage vect tests

2023-10-10 Thread Juzhe-Zhong
I have analyzed all existing FAILs. Except these following FAILs need to be addressed: FAIL: gcc.dg/vect/slp-reduc-7.c -flto -ffat-lto-objects execution test FAIL: gcc.dg/vect/slp-reduc-7.c execution test FAIL: gcc.dg/vect/vect-cond-arith-2.c -flto -ffat-lto-objects scan-tree-dump optimized " =

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

2023-10-10 Thread François Dumont
On 08/10/2023 15:59, Iain Sandoe wrote: Hi François, 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++ testsuite. testsuite: Add optional libstdc++ version namespace in expected diagnostic When lib

Re: committed [RISC-V]: Harden test scan patterns

2023-10-10 Thread Joern Rennecke
On Sat, 30 Sept 2023 at 22:12, Joern Rennecke wrote: > Also, we might have different directives for not scanning in LTO sections - > or just ignoring .ascii . Or maybe the other way round - you have to do > something special if you want to scan inside strings, and by default we > don't look insi

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

2023-10-10 Thread Jeff Law
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 data on that internally, it's not showing up in a significant way

[PATCH] RISC-V: Remove XFAIL of ssa-dom-cse-2.c

2023-10-10 Thread Juzhe-Zhong
Confirm RISC-V is able to CSE this case no matter whether we enable RVV or not. Remove XFAIL, to fix: XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;" gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/ssa-dom-cse-2.c: Remove riscv. --- gcc/testsuite/gcc.dg/tree-ss

RE: [PATCH] x86: set spincount 1 for x86 hybrid platform [PR109812]

2023-10-10 Thread Zhang, Jun
> -Original Message- > From: Jakub Jelinek > Sent: Tuesday, October 10, 2023 3:57 PM > To: Zhang, Jun > Cc: gcc-patches@gcc.gnu.org; ubiz...@gmail.com; Liu, Hongtao > > Subject: Re: [PATCH] x86: set spincount 1 for x86 hybrid platform [PR109812] > > On Tue, Oct 10, 2023 at 12:59:52PM +0

[PATCH] early outs for functions in rs6000.cc

2023-10-10 Thread Jiufu Guo
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. The whole function rs6000_emit_set_long_const and num_insns_constant_gpr are r

RE: [PATCH] RISC-V Regression: Make pattern match more accurate of vect-live-2.c

2023-10-10 Thread Li, Pan2
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, October 10, 2023 11:26 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de Subject: Re: [PATCH] RISC-V Regression: Make pattern match more accurate of vect-live-2.c On 10/10/23 08:57, Juzhe-Z

RE: [PATCH] RISC-V Regression: Fix FAIL of vect-multitypes-16.c for RVV

2023-10-10 Thread Li, Pan2
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, October 10, 2023 11:29 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de Subject: Re: [PATCH] RISC-V Regression: Fix FAIL of vect-multitypes-16.c for RVV On 10/10/23 08:49, Juzhe-Zhong wrote

[PATCH] MATCH: [PR111282] Simplify `a & (b ^ ~a)` to `a & b`

2023-10-10 Thread Andrew Pinski
While `a & (b ^ ~a)` is optimized to `a & b` on the rtl level, it is always good to optimize this at the gimple level and allows us to match a few extra things including where a is a comparison. Note I had to update/change the testcase and-1.c to avoid matching this case as we can match -2 and 1 a

[PATCH V1] use more get_range_query

2023-10-10 Thread Jiufu Guo
Hi, For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried. For "get_range_query", it could get more context-aware range info. And look at the implementation of "get_range_query", it returns global range if no local fun info. So, if not quering for SSA_NAME and not chaning the IL, it wo

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

2023-10-10 Thread Andrew Waterman
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. Corrupting the RAS is potentially more costly than mispredicting a branch, since it can result in a cascading sequence of mispredictions a

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

2023-10-10 Thread Nathaniel Shead
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. > > > > -- >8 -- > > > > This patch improves the errors given when casting from v

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

2023-10-10 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 --- libstd

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

2023-10-10 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 ch

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

2023-10-10 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 v16 37/39] libstdc++: Optimize is_signed trait performance

2023-10-10 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 --- libstdc++-v3/i

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

2023-10-10 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

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

2023-10-10 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. * seman

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

2023-10-10 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 v16 31/39] libstdc++: Optimize is_arithmetic trait performance

2023-10-10 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 v16 32/39] libstdc++: Optimize is_fundamental trait performance

2023-10-10 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 ori

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

2023-10-10 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 v16 28/39] c++, libstdc++: Implement __is_pointer built-in trait

2023-10-10 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. * semantic

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

2023-10-10 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 v16 27/39] libstdc++: Optimize remove_pointer trait performance

2023-10-10 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 v16 29/39] libstdc++: Optimize is_pointer trait performance

2023-10-10 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 v16 21/39] c++: Implement __is_reference built-in trait

2023-10-10 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. * se

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

2023-10-10 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 v16 26/39] c++: Implement __remove_pointer built-in trait

2023-10-10 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 v16 20/39] libstdc++: Optimize is_member_object_pointer trait performance

2023-10-10 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. (is_

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

2023-10-10 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 v16 24/39] libstdc++: Optimize is_function trait performance

2023-10-10 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 v16 18/39] libstdc++: Optimize is_member_function_pointer trait performance

2023-10-10 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 v16 19/39] c++: Implement __is_member_object_pointer built-in trait

2023-10-10 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 v16 16/39] libstdc++: Optimize is_member_pointer trait performance

2023-10-10 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): Likewise.

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

2023-10-10 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 v16 15/39] c++: Implement __is_member_pointer built-in trait

2023-10-10 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 v16 14/39] libstdc++: Optimize is_scoped_enum trait performance

2023-10-10 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. Signed-off-by

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

2023-10-10 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 --- libstdc++

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

2023-10-10 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 v16 11/39] c++: Implement __is_bounded_array built-in trait

2023-10-10 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 v16 10/39] libstdc++: Optimize is_unbounded_array trait performance

2023-10-10 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 --- l

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

2023-10-10 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 CPTK_IS_UNBOUNDED_A

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

2023-10-10 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 --- libstdc++-v3/includ

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

2023-10-10 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 v16 06/39] libstdc++: Optimize is_volatile trait performance

2023-10-10 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 v16 05/39] c++: Implement __is_volatile built-in trait

2023-10-10 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. * seman

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

2023-10-10 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 --- libstdc++-v3/includ

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

2023-10-10 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. * cp-trait.h:

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

2023-10-10 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 a

[PATCH v16 01/39] c++: Sort built-in identifiers alphabetically

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

[PATCH v16 00/39] Optimize type traits performance

2023-10-10 Thread Ken Matsui
This patch series optimizes type traits performance by implementing built-in type traits and using them in libstdc++. Changes in v16: * Rebased on top of trunk * Improved clarity of the commit message * Simplified Make-lang.in and gperf struct Changes in v15: * R

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

2023-10-10 Thread Jeff Law
Ventana has had a variant of this patch from Andrew W. in its tree for at least a year. I'm dusting it off and submitting it on Andrew's behalf. There's multiple approaches we could be using here. First we could make $ra fixed and use it as the scratch register for the long branch sequence

Re: Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread 钟居哲
Thanks for investigation. I think the number 145 is reasonable. Even though it is more than my number. I guess the reason you still have more FAILs than me because you are using QEMU (I am using SPIKE), also you need to specify miasligned option to the simulator. For example, for SPIKE, we ne

Re: Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread Maciej W. Rozycki
On Tue, 10 Oct 2023, juzhe.zh...@rivai.ai wrote: > It's weird. Could you give me the FAILs report? I keep forgetting that I have a piece of code in my board description files that makes the testsuite leave output files in place, which helps much when debugging failures (although it's not a per

[pushed] c++: mangle multiple levels of template parms [PR109422]

2023-10-10 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- This becomes be more important with concepts, but can also be seen with generic lambdas. PR c++/109422 gcc/cp/ChangeLog: * mangle.cc (write_template_param): Also mangle level. gcc/testsuite/ChangeLog: * g++.dg/cp

Re: [RFC] RISC-V: Handle new types in scheduling descriptions

2023-10-10 Thread Edwin Lu
On 10/10/2023 10:11 AM, Jeff Law wrote: On 10/9/23 15:02, Edwin Lu wrote: Now that every insn is guaranteed a type, we want to ensure the types are handled by the existing scheduling descriptions. There are 2 approaches I see: 1. Create a new pipeline intended to eventually abort (sifive-7.md

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 06:41:50PM +0100, Richard Sandiford wrote: > > On the wide_int side, I see > > 155291 576 > > (supposedly because of bound_wide_int, where we create wide_int_ref from > > the 576-bit precision bound_wide_int and then create 576-bit wide_int when > > using unary or binary op

Re: [PATCH] RFC: Add late-combine pass [PR106594]

2023-10-10 Thread Jeff Law
On 10/7/23 06:58, Richard Sandiford wrote: Yeah, that'd probably be best. I need to split the patch up into a proper submission sequence, do more testing, and make it RFA quality. Jeff has also found a couple of regressions that I need to look at. When you've got updates, just let me know.

Re: [PATCH] wide-int: Allow up to 16320 bits wide_int and change widest_int precision to 32640 bits [PR102989]

2023-10-10 Thread Richard Sandiford
Jakub Jelinek writes: > On Mon, Oct 09, 2023 at 03:44:10PM +0200, Jakub Jelinek wrote: >> Thanks, just quick answers, will work on patch adjustments after trying to >> get rid of rwide_int (seems dwarf2out has very limited needs from it, just >> some routine to construct it in GCed memory (and nev

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

2023-10-10 Thread Marek Polacek
On Tue, Aug 29, 2023 at 03:26:46PM -0400, Jason Merrill wrote: > On 8/23/23 15:49, Marek Polacek wrote: > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > -- >8 -- > > > > This patch implements P2564, described at , whereby > > certain functions are promoted to consteval. F

Re: [RFC] RISC-V: Handle new types in scheduling descriptions

2023-10-10 Thread Jeff Law
On 10/9/23 15:02, Edwin Lu wrote: Now that every insn is guaranteed a type, we want to ensure the types are handled by the existing scheduling descriptions. There are 2 approaches I see: 1. Create a new pipeline intended to eventually abort (sifive-7.md) 2. Add the types to an existing pipeli

[Patch] Fortran: Support OpenMP's 'allocate' directive for stack vars

2023-10-10 Thread Tobias Burnus
The attached patch adds 'omp allocate' support for stack/automatic variables variables for Fortran. I had originally a pure FE version for Fortran, which failed with 'defaultmap'/'default'; I then thought I could simply piggyback on the existing C/C++ support. But it turns out that Fortran is c

Re: [PATCH] RISC-V Regression: Fix FAIL of vect-multitypes-16.c for RVV

2023-10-10 Thread Jeff Law
On 10/10/23 08:49, Juzhe-Zhong wrote: As Richard suggested: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632288.html Add vect_ext_char_longlong to fix FAIL for RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-multitypes-16.c: Adapt check for RVV. * lib/target-supp

Re: [PATCH] RISC-V Regression: Make pattern match more accurate of vect-live-2.c

2023-10-10 Thread Jeff Law
On 10/10/23 08:57, Juzhe-Zhong wrote: Like previous patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632400.html https://patchwork.sourceware.org/project/gcc/patch/dde89b9e-49a0-d70b-0906-fb3022cac...@gmail.com/ gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-live-2.c: Make

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

2023-10-10 Thread Jeff Law
On 10/9/23 22:13, Kito Cheng wrote: The target attribute which proposed in [1], target attribute allow user to specify a local setting per-function basis. The syntax of target attribute is `__attribute__((target("")))`. and the syntax of `` describes below: ``` ATTR-STRING := ATTR-STRING ';'

[PATCH] RISC-V Regression: Make pattern match more accurate of vect-live-2.c

2023-10-10 Thread Juzhe-Zhong
Like previous patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632400.html https://patchwork.sourceware.org/project/gcc/patch/dde89b9e-49a0-d70b-0906-fb3022cac...@gmail.com/ gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-live-2.c: Make pattern match more accurate. --- gcc/test

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

2023-10-10 Thread Kito Cheng
Just repeat what I said on the mailing list again :P it's LGTM, just need to rebase to deal with riscv.opt related changes :) On Sat, Sep 30, 2023 at 8:02 PM Mary Bennett wrote: > > Thank you for reviewing this patch. > > v1->v2: > * Add XCValu RTL. > * Change assembly mnemonics from mixed c

Re: [PATCH] Optimize (ne:SI (subreg:QI (ashift:SI x 7) 0) 0) as (and:SI x 1).

2023-10-10 Thread Jeff Law
On 10/10/23 08:41, Michael Matz wrote: On Tue, 10 Oct 2023, Roger Sayle wrote: This patch is the middle-end piece of an improvement to PRs 101955 and 106245, that adds a missing simplification to the RTL optimizers. This transformation is to simplify (char)(x << 7) != 0 as x & 1. Random

[PATCH] RISC-V Regression: Fix FAIL of vect-multitypes-16.c for RVV

2023-10-10 Thread Juzhe-Zhong
As Richard suggested: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632288.html Add vect_ext_char_longlong to fix FAIL for RVV. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-multitypes-16.c: Adapt check for RVV. * lib/target-supports.exp: Add vect_ext_char_longlong proper

Re: [RFC gcc13 backport 0/3] Add Ztso atomic mappings

2023-10-10 Thread Patrick O'Neill
On 10/4/23 08:53, Jeff Law wrote: On 10/3/23 16:26, Patrick O'Neill wrote: I vaugely recall some discussion about backporting the Ztso mappings along with the RVWMO mappings. Now that the RVWMO mappings have been backported for 13.3, is there interest in also backporting the Ztso mappings?

Re: [PATCH] Optimize (ne:SI (subreg:QI (ashift:SI x 7) 0) 0) as (and:SI x 1).

2023-10-10 Thread Michael Matz
On Tue, 10 Oct 2023, Roger Sayle wrote: > > This patch is the middle-end piece of an improvement to PRs 101955 and > 106245, that adds a missing simplification to the RTL optimizers. > This transformation is to simplify (char)(x << 7) != 0 as x & 1. Random observation: So, why restrict to shi

Re: [PATCH] Optimize (ne:SI (subreg:QI (ashift:SI x 7) 0) 0) as (and:SI x 1).

2023-10-10 Thread Jeff Law
On 10/10/23 06:28, Roger Sayle wrote: This patch is the middle-end piece of an improvement to PRs 101955 and 106245, that adds a missing simplification to the RTL optimizers. This transformation is to simplify (char)(x << 7) != 0 as x & 1. Technically, the cast can be any truncation, where sh

Re: [PATCH v6] Implement new RTL optimizations pass: fold-mem-offsets.

2023-10-10 Thread Jeff Law
On 10/10/23 05:59, Manolis Tsamis wrote: It's a code quality issue as long as we don't transform the code into movl $0, -18874240, at which point it would become a correctness issue. Ok, thanks for pointing that out as I thought that movl $0, -18874240 and movl $0, -18874240(eax) with eax =

Re: Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread 钟居哲
Thanks Jeff. I have found multiple dump FAIL issues are related to middle-end. For example: 111721 – RISC-V: Failed to SLP for gather_load in RVV (gnu.org) I have file bugzilla and I will fix them eventually but I am planning to fix the FAILs first which are the testcase issues. Then come back

RE: [PATCH] RISC-V Regression: Fix FAIL of predcom-2.c

2023-10-10 Thread Li, Pan2
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, October 10, 2023 9:49 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de Subject: Re: [PATCH] RISC-V Regression: Fix FAIL of predcom-2.c On 10/9/23 20:58, Juzhe-Zhong wrote: > Like GCN, add -

[PATCH 3/3] [GCC] arm: vst1q_types_x4 ACLE intrinsics

2023-10-10 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vst1q intrinsic for AArch32. This patch adds the _x4 variants of the vst1q intrinsic. ACLE documents are at https://developer.arm.com/documentation/ihi0053/latest/ ISA documents are at https://deve

[PATCH 1/3] [GCC] arm: vst1q_types_x2 ACLE intrinsics

2023-10-10 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vst1q intrinsic for AArch32. This patch adds the _x2 variants of the vst1q intrinsic. Tests use xN so that the latter variants (_x3, _x4) could be added. ACLE documents are at https://developer.ar

RE: [PATCH] RISC-V Regression: Make match patterns more accurate

2023-10-10 Thread Li, Pan2
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, October 10, 2023 9:47 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de; rdapp@gmail.com Subject: Re: [PATCH] RISC-V Regression: Make match patterns more accurate On 10/9/23 20:47, Juzhe

[PATCH 2/3] [GCC] arm: vst1q_types_x3 ACLE intrinsics

2023-10-10 Thread Ezra.Sitorus
From: Ezra Sitorus This patch is part of a series of patches implementing the _xN variants of the vst1q intrinsic for AArch32. This patch adds the _x3 variants of the vst1q intrinsic. ACLE documents are at https://developer.arm.com/documentation/ihi0053/latest/ ISA documents are at https://deve

[PATCH 0/3] [GCC] arm: vst1q_types_xN ACLE intrinsics

2023-10-10 Thread Ezra.Sitorus
Add xN variants of vst1q_types intrinsic for AArch32.

Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread Jeff Law
On 10/10/23 07:53, juzhe.zhong wrote: I am working on it. Currently,  we have about 50+ additional FAILs after enabling vectorization. some of them need fixed on middle-end. E.g richard fixed a missed cse optimization. Some need fix on test case. I am analyzing each fail one by one. I p

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

2023-10-10 Thread Jeff Law
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 set a riscv_subset_list directly rather than re-parsing the ISA string again. gcc/ChangeLog: * config/riscv

C++ patch ping^2

2023-10-10 Thread Jakub Jelinek
Hi! I'd like to ping a couple of C++ patches. - c++, v2: Implement C++26 P2169R4 - Placeholder variables with no name [PR110349] https://gcc.gnu.org/pipermail/gcc-patches/2023-September/630802.html - c++: Implement C++26 P2361R6 - Unevaluated strings [PR110342] https://gcc.gnu.org/pipermail

Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread juzhe.zhong
I am working on it. Currently,  we have about 50+ additional FAILs after enabling vectorization.some of them need fixed on middle-end. E.g richard fixed a missed cse optimization.Some need fix on test case.I am analyzing each fail one by one.I prefer postpone this patch since it will cause some add

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

2023-10-10 Thread Jeff Law
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 it's a NFC. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_convert_vector_bits): Get s

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

2023-10-10 Thread Jeff Law
On 10/9/23 22:13, Kito Cheng wrote: We TARGET__P marcro to test a Mask and InverseMask with user specified target_variable, however we may want to test with specific gcc_options variable rather than target_variable. Like RISC-V has defined lots of Mask with TargetVariable, which is not easy t

Re: [PATCH] RISC-V Regression: Fix FAIL of predcom-2.c

2023-10-10 Thread Jeff Law
On 10/9/23 20:58, Juzhe-Zhong wrote: Like GCN, add -fno-tree-vectorize. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/predcom-2.c: Add riscv. OK. jeff

[PATCH v5] c++: Check for indirect change of active union member in constexpr [PR101631,PR102286]

2023-10-10 Thread Nathaniel Shead
On Mon, Oct 09, 2023 at 04:46:46PM -0400, Jason Merrill wrote: > On 10/8/23 21:03, Nathaniel Shead wrote: > > Ping for > > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/631203.html > > > > + && (TREE_CODE (t) == MODIFY_EXPR > > + /* Also check if initializations have implic

Re: [PATCH] RISC-V Regression: Make match patterns more accurate

2023-10-10 Thread Jeff Law
On 10/9/23 20:47, Juzhe-Zhong wrote: This patch fixes following 2 FAILs in RVV regression since the check is not accurate. It's inspired by Robin's previous patch: https://patchwork.sourceware.org/project/gcc/patch/dde89b9e-49a0-d70b-0906-fb3022cac...@gmail.com/ gcc/testsuite/ChangeLog:

Re: [PATCH] RISC-V Regression: Fix dump check of bb-slp-68.c

2023-10-10 Thread Jeff Law
On 10/9/23 19:16, Juzhe-Zhong wrote: Like GCN, RVV also has 64 bytes vectors (512 bits) which cause FAIL in this test. It's more reasonable to use "vect512" instead of AMDGCN. gcc/testsuite/ChangeLog: * gcc.dg/vect/bb-slp-68.c: Use vect512. Just a note for the record. At this time

Re: [PATCH] dwarf2out: Stop using wide_int in GC structures

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Jakub Jelinek wrote: > Hi! > > On Tue, Oct 10, 2023 at 09:30:31AM +, Richard Biener wrote: > > On Mon, 9 Oct 2023, Jakub Jelinek wrote: > > > > This makes wide_int unusable in GC structures, so for dwarf2out > > > > which was the only place which needed it there is a new

[PATCH] dwarf2out: Stop using wide_int in GC structures

2023-10-10 Thread Jakub Jelinek
Hi! On Tue, Oct 10, 2023 at 09:30:31AM +, Richard Biener wrote: > On Mon, 9 Oct 2023, Jakub Jelinek wrote: > > > This makes wide_int unusable in GC structures, so for dwarf2out > > > which was the only place which needed it there is a new rwide_int type > > > (restricted wide_int) which suppor

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Jakub Jelinek wrote: > On Tue, Oct 10, 2023 at 11:59:28AM +, Richard Biener wrote: > > > I don't see why the CONSTRUCTOR case couldn't be fine regardless of the > > > vuse. Though, am not really sure when a CONSTRUCTOR would appear, the > > > lhs would need to be an SSA_N

Re: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc'

2023-10-10 Thread Jeff Law
On 10/9/23 19:13, juzhe.zh...@rivai.ai wrote: Oh. I realize this patch increase FAIL that I recently fixed: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632247.html This fail because RVV doesn't have vec_pack_tru

RE: [PATCH] RISC-V Regression: Fix FAIL of pr65947-8.c for RVV

2023-10-10 Thread Li, Pan2
Committed, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, October 10, 2023 9:24 PM To: Juzhe-Zhong ; gcc-patches@gcc.gnu.org Cc: rguent...@suse.de Subject: Re: [PATCH] RISC-V Regression: Fix FAIL of pr65947-8.c for RVV On 10/10/23 06:55, Juzhe-Zhong wrote: > This t

Re: [PATCH] tree-optimization/111519 - strlen optimization skips clobbering store

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 11:59:28AM +, Richard Biener wrote: > > I don't see why the CONSTRUCTOR case couldn't be fine regardless of the > > vuse. Though, am not really sure when a CONSTRUCTOR would appear, the > > lhs would need to be an SSA_NAME, so wouldn't for vectors that be a > > VECTOR_C

  1   2   >