Re: [PATCH] use get_range_query to replace get_global_range_query

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Jiufu Guo wrote: > 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

[PATCH] [x86] Refine predicate of operands[2] in divv4hf3 with register_operand.

2023-10-10 Thread liuhongt
In the expander, it will emit below insn. rtx tmp = gen_rtx_VEC_CONCAT (V4SFmode, operands[2], force_reg (V2SFmode, CONST1_RTX (V2SFmode))); but *vec_concat only allow register_operand. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/Ch

Re: [PATCH] use get_range_query to replace get_global_range_query

2023-10-10 Thread Andrew Pinski
On Tue, Oct 10, 2023 at 12:02 AM Richard Biener wrote: > > On Tue, 10 Oct 2023, Jiufu Guo wrote: > > > 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_rang

[PATCH] Support Intel USER_MSR

2023-10-10 Thread Hu, Lin1
This patch aims to support Intel USER_MSR. gcc/ChangeLog: * common/config/i386/cpuinfo.h (get_available_features): Detect USER_MSR. * common/config/i386/i386-common.cc (OPTION_MASK_ISA2_USER_MSR_SET): New. (OPTION_MASK_ISA2_USER_MSR_UNSET): Ditto. (ix86_ha

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

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 12:59:52PM +0800, Jun Zhang wrote: > include/ChangeLog: > > * omphook.h: define RUNOMPHOOK macro. ChangeLog formatting. The description should start with capital letter. If you add a new file, you should just mention : New file. or something similar. But much more

RE: [PATCH] Support Intel USER_MSR

2023-10-10 Thread Hu, Lin1
There are some typos In /gcc/doc/extend.texi and /gcc/doc/invoke.texi. They should be USER_MSR, not UMSR. I have modified them in my branch. -Original Message- From: Hu, Lin1 Sent: Tuesday, October 10, 2023 3:47 PM To: gcc-patches@gcc.gnu.org Cc: Liu, Hongtao ; ubiz...@gmail.com Subject

Re: [PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-10 Thread HAO CHEN GUI
Hi David, Thanks for your review comments. 在 2023/10/9 23:42, David Edelsohn 写道: >  #define MOVE_MAX (! TARGET_POWERPC64 ? 4 : 8) >  #define MAX_MOVE_MAX 8 > +#define MOVE_MAX_PIECES (!TARGET_POWERPC64 ? 4 : 16) > +#define COMPARE_MAX_PIECES (!TARGET_POWERPC64 ? 4 : 16) > > >

[committed] arc: Refurbish add.f combiner patterns

2023-10-10 Thread Claudiu Zissulescu
Refurbish add compare patterns: use 'r' constraint, fix identation, and fix pattern to match 'if (a+b) { ... }' constructions. gcc/ * config/arc/arc.cc (arc_select_cc_mode): Match NEG code with the first operand. * config/arc/arc.md (addsi_compare): Make pattern canonical.

Re: [PATCH] use get_range_query to replace get_global_range_query

2023-10-10 Thread Jiufu Guo
Hi, Richard Biener writes: > On Tue, 10 Oct 2023, Jiufu Guo wrote: > >> 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 >> globa

Re: [PATCH] wide-int: Remove rwide_int, introduce dw_wide_int

2023-10-10 Thread Richard Biener
On Mon, 9 Oct 2023, Jakub Jelinek wrote: > On Mon, Oct 09, 2023 at 12:55:02PM +0200, 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 supports only up

Re: [PATCH] MATCH: [PR111679] Add alternative simplification of `a | ((~a) ^ b)`

2023-10-10 Thread Richard Biener
On Mon, Oct 9, 2023 at 11:28 PM Andrew Pinski wrote: > > So currently we have a simplification for `a | ~(a ^ b)` but > that does not match the case where we had originally `(~a) | (a ^ b)` > so we need to add a new pattern that matches that and uses > bitwise_inverted_equal_p > that also catches

Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr65935.c for RVV

2023-10-10 Thread Andrew Stubbs
On 10/10/2023 02:39, Juzhe-Zhong wrote: Here is the reference comparing dump IR between ARM SVE and RVV. https://godbolt.org/z/zqess8Gss We can see RVV has one more dump IR: optimized: basic block part vectorized using 128 byte vectors since RVV has 1024 bit vectors. The codegen is reasonable

Re: Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr65935.c for RVV

2023-10-10 Thread juzhe.zh...@rivai.ai
Great ! I am gonna wait for Richi's approval. juzhe.zh...@rivai.ai From: Andrew Stubbs Date: 2023-10-10 17:40 To: Juzhe-Zhong; gcc-patches@gcc.gnu.org CC: rguent...@suse.de; jeffreya...@gmail.com Subject: Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr65935.c for RVV On 10/10/2023 02:39,

Re: [PATCH] wide-int: Remove rwide_int, introduce dw_wide_int

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

[PATCH v15 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 v15: * Rebased on top of trunk * Use gperf to look up traits instead of enum rid Changes in v14: * Added padding calculation to the commit mes

[PATCH v15 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 v15 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: * cp-trait.def: Define __is_const. * cp-trait.gperf: Reflect cp-trait.def change. * cp-trait.h: Likewise. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (

[PATCH v15 02/39] c-family, c++: Look up traits through gperf instead of enum rid.

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 v15 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

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

2023-10-10 Thread juzhe.zh...@rivai.ai
LGTM on my side. IMHO, we need to support attribute (rvv_vector_bits) which depend on this patch, am I right? If yes, will you support this feature in GCC-14 release? juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-10-10 12:13 To: gcc-patches; kito.cheng; palmer; jeffreyalaw; rdapp; juzhe.z

[PATCH v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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 v15 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. *

Re: [PATCH] RISC-V Regression: Fix FAIL of bb-slp-pr65935.c for RVV

2023-10-10 Thread Richard Biener
On Tue, 10 Oct 2023, Juzhe-Zhong wrote: > Here is the reference comparing dump IR between ARM SVE and RVV. > > https://godbolt.org/z/zqess8Gss > > We can see RVV has one more dump IR: > optimized: basic block part vectorized using 128 byte vectors > since RVV has 1024 bit vectors. > > The codeg

[PATCH v15 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 --

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

2023-10-10 Thread Maciej W. Rozycki
On Mon, 9 Oct 2023, Maciej W. Rozycki wrote: > > Btw, could you rebase to the trunk and run regression again? > > Full regression-testing takes roughly 40 hours here and I do not normally > update the tree midway through my work so as not to add variables and end > up chasing a moving target, e

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

2023-10-10 Thread juzhe.zh...@rivai.ai
It's weird. Could you give me the FAILs report? juzhe.zh...@rivai.ai From: Maciej W. Rozycki Date: 2023-10-10 18:18 To: 钟居哲 CC: gcc-patches; Jeff Law; rdapp.gcc; kito.cheng Subject: Re: 回复: [PATCH] RISC-V/testsuite: Enable `vect_pack_trunc' On Mon, 9 Oct 2023, Maciej W. Rozycki wrote: > > Bt

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

2023-10-10 Thread Maciej W. Rozycki
On Tue, 10 Oct 2023, 钟居哲 wrote: > I know you want vect_int to block the test for rv64gc. > But unfortunately it failed. Why? > And I have changed everything to run vect testsuite with "riscv_v". > [PATCH] RISC-V: Enable more tests of "vect" for RVV (gnu.org) > > So to be consistent, plz add "

[PATCH] Fix missed CSE with a BLKmode entity

2023-10-10 Thread Richard Biener
The following fixes fallout of r10-7145-g1dc00a8ec9aeba which made us cautionous about CSEing a load to an object that has padding bits. The added check also triggers for BLKmode entities like STRING_CSTs but by definition a BLKmode entity does not have padding bits. Bootstrapped and tested on x86

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

2023-10-10 Thread Richard Biener
The following fixes a mistake in count_nonzero_bytes which happily skips over stores clobbering the memory we load a value we store from and then performs analysis on the memory state before the intermediate store. The patch implements the most simple fix - guarantee that there are no intervening

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

2023-10-10 Thread Richard Biener
On Mon, 2 Oct 2023, Tamar Christina wrote: > Hi All, > > This second part updates niters analysis to be able to analyze any number of > exits. If we have multiple exits we determine the main exit by finding the > first counting IV. > > The change allows the vectorizer to pass analysis for multi

Re: [PATCH 6/6] aarch64: Add front-end argument type checking for target builtins

2023-10-10 Thread Richard Earnshaw (lists)
On 09/10/2023 14:12, Victor Do Nascimento wrote: > > > On 10/7/23 12:53, Richard Sandiford wrote: >> Richard Earnshaw writes: >>> On 03/10/2023 16:18, Victor Do Nascimento wrote: In implementing the ACLE read/write system register builtins it was observed that leaving argument type che

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

2023-10-10 Thread Jakub Jelinek
On Tue, Oct 10, 2023 at 10:49:04AM +, Richard Biener wrote: > The following fixes a mistake in count_nonzero_bytes which happily > skips over stores clobbering the memory we load a value we store > from and then performs analysis on the memory state before the > intermediate store. > > The pat

[Committed] RISC-V: Add testcase for SCCVN optimization[PR111751]

2023-10-10 Thread Juzhe-Zhong
Add testcase for PR111751 which has been fixed: https://gcc.gnu.org/pipermail/gcc-patches/2023-October/632474.html PR target/111751 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr111751.c: New test. --- .../gcc.target/riscv/rvv/autovec/pr111751.c | 55 +

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 10:49:04AM +, Richard Biener wrote: > > The following fixes a mistake in count_nonzero_bytes which happily > > skips over stores clobbering the memory we load a value we store > > from and then performs analysis on the memory

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

2023-10-10 Thread Manolis Tsamis
On Fri, Oct 6, 2023 at 8:57 PM Jeff Law wrote: > > > > On 10/6/23 08:17, Manolis Tsamis wrote: > SNIP > >> So I was ready to ACK, but realized there weren't any testresults for a > >> primary platform mentioned. So I ran this on x86. > >> > >> It's triggering one regression (code quality). > >> >

[COMMITTED] ada: Crash processing pragmas Compile_Time_Error and Compile_Time_Warning

2023-10-10 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * sem_attr.adb (Analyze_Attribute): Protect the frontend against replacing 'Size by its static value if 'Size is not known at compile time and we are processing pragmas Compile_Time_Warning or Compile_Time_Errors. Tested on x86_64-pc

[COMMITTED] ada: Tweak documentation comments

2023-10-10 Thread Marc Poulhiès
From: Ronan Desplanques The concept of extended nodes was retired at the same time Gen_IL was introduced, but there was a reference to that concept left over in a comment. This patch removes that reference. Also, the description of the field Comes_From_Check_Or_Contract was incorrectly placed in

[COMMITTED] ada: Fix bad finalization of limited aggregate in conditional expression

2023-10-10 Thread Marc Poulhiès
From: Eric Botcazou This happens when the conditional expression is immediately returned, for example in an expression function. gcc/ada/ * exp_aggr.adb (Is_Build_In_Place_Aggregate_Return): Return true if the aggregate is a dependent expression of a conditional expressi

[COMMITTED] ada: Remove superfluous setter procedure

2023-10-10 Thread Marc Poulhiès
From: Eric Botcazou It is only called once. gcc/ada/ * sem_util.ads (Set_Scope_Is_Transient): Delete. * sem_util.adb (Set_Scope_Is_Transient): Likewise. * exp_ch7.adb (Create_Transient_Scope): Set Is_Transient directly. Tested on x86_64-pc-linux-gnu, committed on master

[COMMITTED] ada: Tweak internal subprogram in Ada.Directories

2023-10-10 Thread Marc Poulhiès
From: Ronan Desplanques The purpose of this patch is to work around false-positive warnings emitted by GNAT SAS (also known as CodePeer). It does not change the behavior of the modified subprogram. gcc/ada/ * libgnat/a-direct.adb (Start_Search_Internal): Tweak subprogram body.

[COMMITTED] ada: Fix infinite loop with multiple limited with clauses

2023-10-10 Thread Marc Poulhiès
From: Eric Botcazou This occurs when one of the types has an incomplete declaration in addition to its full declaration in its package. In this case AI05-129 says that the incomplete type is not part of the limited view of the package, i.e. only the full view is. Now, in the GNAT implementation,

[COMMITTED] ada: Fix internal error on too large representation clause for small component

2023-10-10 Thread Marc Poulhiès
From: Eric Botcazou This is a small bug present on strict-alignment platforms for questionable representation clauses. gcc/ada/ * gcc-interface/decl.cc (inline_status_for_subprog): Minor tweak. (gnat_to_gnu_field): Try harder to get a packable form of the type for a bitf

[COMMITTED] ada: Fix filesystem entry filtering

2023-10-10 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes the behavior of Ada.Directories.Search when being requested to filter out regular files or directories. One of the configurations in which that behavior was incorrect was that when the caller requested only the regular and special files but not the directo

Re: [PATCH] RISC-V: Make xtheadcondmov-indirect tests robust against instruction reordering

2023-10-10 Thread Christoph Müllner
On Tue, Oct 10, 2023 at 5:08 AM Kito Cheng wrote: > > I guess you may also want to clean up those bodies for > "check-function-bodies"? I kept the comments on purpose, so that I have a basis for the expected instruction counts. But of course, there is no need to follow the format. Would the foll

[PATCH] tree-optimization/111751 - support 1024 bit vector constant reinterpretation

2023-10-10 Thread Richard Biener
The following ups the limit in fold_view_convert_expr to handle 1024bit vectors as used by GCN and RVV. It also robustifies the handling in visit_reference_op_load to properly give up when constants cannot be re-interpreted. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR

[Committed] RISC-V: Add VLS BOOL mode vcond_mask[PR111751]

2023-10-10 Thread Juzhe-Zhong
Richard patch resolve PR111751: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7c76c876e917a1f20a788f602cc78fff7d0a2a65 which cause ICE in RISC-V regression: FAIL: gcc.dg/torture/pr53144.c -O2 (internal compiler error: in gimple_expand_vec_cond_expr, at gimple-isel.cc:328) FAIL: gcc.dg/tortur

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

2023-10-10 Thread Roger Sayle
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 shift is by one less than the narrower type's

[COMMITTED] MAINTAINERS: Add myself to write after approval

2023-10-10 Thread Christoph Muellner
From: Christoph Müllner Signed-off-by: Christoph Müllner ChangeLog: * MAINTAINERS: Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index e9154878517..aa441de5332 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -576,6 +576,7 @@ Ca

PATCH v3] rs6000: fmr gets used instead of faster xxlor [PR93571]

2023-10-10 Thread Ajit Agarwal
Hello Segher: Here is the patch that uses xxlor instead of fmr where possible. Performance results shows that fmr is better in power9 and power10 architectures whereas xxlor is better in power7 and power 8 architectures. fmr is the only option before p7. Incorporated review comments. Bootstrapp

Re: [PATCH-2, rs6000] Enable vector mode for memory equality compare [PR111449]

2023-10-10 Thread David Edelsohn
On Tue, Oct 10, 2023 at 4:23 AM HAO CHEN GUI wrote: > Hi David, > > Thanks for your review comments. > > 在 2023/10/9 23:42, David Edelsohn 写道: > > #define MOVE_MAX (! TARGET_POWERPC64 ? 4 : 8) > > #define MAX_MOVE_MAX 8 > > +#define MOVE_MAX_PIECES (!TARGET_POWERPC64 ? 4 : 16) > >

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

2023-10-10 Thread Juzhe-Zhong
This test is testing fold_extract_last pattern so it's more reasonable use vect_fold_extract_last instead of specifying targets. This is the vect_fold_extract_last property: proc check_effective_target_vect_fold_extract_last { } { return [expr { [check_effective_target_aarch64_sve]

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

2023-10-10 Thread Richard Biener
On Mon, 2 Oct 2023, Tamar Christina wrote: > Hi All, > > This final patch updates peeling to maintain LCSSA all the way through. > > It's significantly easier to maintain it during peeling while we still know > where all new edges connect rather than touching it up later as is currently > being

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

2023-10-10 Thread Jeff Law
On 10/10/23 06:55, Juzhe-Zhong wrote: This test is testing fold_extract_last pattern so it's more reasonable use vect_fold_extract_last instead of specifying targets. This is the vect_fold_extract_last property: proc check_effective_target_vect_fold_extract_last { } { return [expr { [che

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

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

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

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

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

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

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

  1   2   >