[PATCH v3 1/2] c++: implement __is_unsigned built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_unsigned. gcc/cp/ChangeLog: * cp-trait.def: Define __is_unsigned. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_UNSIGNED. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

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

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __remove_pointer. libstdc++-v3/ChangeLog: * include/std/type_traits (remove_pointer): Use __remove_pointer built-in trait. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 8 +++- 1 file changed, 7 insertions(+),

[PATCH v2 1/2] c++: implement __remove_pointer built-in trait

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

[PATCH v3 2/2] libstdc++: use new built-in trait __is_const

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_const. 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/include/std/type_traits | 14 ++ 1 file chang

[PATCH v3 1/2] c++: implement __is_const built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_const. gcc/cp/ChangeLog: * cp-trait.def: Define __is_const. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_CONST. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

[PATCH v3 2/2] libstdc++: use new built-in trait __is_array

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_array. 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/include/std/type_traits | 12 1 file changed

[PATCH v3 1/2] c++: implement __is_array built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_array. gcc/cp/ChangeLog: * cp-trait.def: Define __is_array. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_ARRAY. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/testsuite/Chan

[PATCH v3 2/2] libstdc++: use new built-in trait __is_volatile

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch lets libstdc++ use new built-in trait __is_volatile. libstdc++-v3/ChangeLog: * include/std/type_traits (is_volatile): Use __is_volatile built-in trait. (is_volatile_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 13

[PATCH v3 1/2] c++: implement __is_volatile built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_volatile. gcc/cp/ChangeLog: * cp-trait.def: Define __is_volatile. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_VOLATILE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v8 5/6] c++, libstdc++: implement __is_void built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_void. Since the new built-in name is __is_void, to avoid unintentional macro replacement, this patch also involves the removal of the existing __is_void in helper_functions.h and cpp_type_traits.h and renaming __is_void to is_void in the test fil

[PATCH v8 6/6] libstdc++: make std::is_object dispatch to new built-in traits

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch gets std::is_object to dispatch to new built-in traits, __is_function, __is_reference, and __is_void. libstdc++-v3/ChangeLog: * include/std/type_traits (is_object): Use new built-in traits, __is_function, __is_reference, and __is_void. (is_object_v): Likewise. S

[PATCH v8 3/6] c++: implement __is_function built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_function. gcc/cp/ChangeLog: * cp-trait.def: Define __is_function. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_FUNCTION. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/tests

[PATCH v8 4/6] libstdc++: use new built-in trait __is_function for std::is_function

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch gets std::is_function to dispatch to new built-in trait __is_function. libstdc++-v3/ChangeLog: * include/std/type_traits (is_function): Use __is_function built-in trait. (is_function_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_tr

[PATCH v8 1/6] c++: implement __is_reference built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_reference. gcc/cp/ChangeLog: * cp-trait.def: Define __is_reference. * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_REFERENCE. * semantics.cc (trait_expr_value): Likewise. (finish_trait_expr): Likewise. gcc/te

[PATCH v8 2/6] libstdc++: use new built-in trait __is_reference for std::is_reference

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch gets std::is_reference to dispatch to new built-in trait __is_reference. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Use __is_reference built-in trait. (is_reference_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/ty

[PATCH v8 0/6] c++, libstdc++: get std::is_object to dispatch to new built-in traits

2023-07-07 Thread Ken Matsui via Gcc-patches
Hi, This patch series gets std::is_object to dispatch to built-in traits and implements the following built-in traits, on which std::object depends. * __is_reference * __is_function * __is_void std::is_object was depending on them with disjunction and negation. __not_<__

[PATCH v2] libstdc++: use __is_enum built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch replaces is_enum::value with __is_enum built-in trait in the type_traits header. libstdc++-v3/ChangeLog: * include/std/type_traits (__make_unsigned_selector): Use __is_enum built-in trait. (__make_signed_selector): Likewise. (__underlying_type_impl): Lik

[PATCH v2 2/2] libstdc++: use new built-in trait __is_scalar for std::is_scalar

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch gets std::is_scalar to dispatch to new built-in trait __is_scalar. libstdc++-v3/ChangeLog: * include/std/type_traits (is_scalar): Use __is_scalar built-in trait. (is_scalar_v): Likewise. Signed-off-by: Ken Matsui --- libstdc++-v3/include/std/type_traits | 14

[PATCH v2 1/2] c++, libstdc++: implement __is_scalar built-in trait

2023-07-07 Thread Ken Matsui via Gcc-patches
This patch implements built-in trait for std::is_scalar. The existent __is_scalar codes were replaced with is_scalar to avoid unintentional macro replacement by the new built-in. gcc/cp/ChangeLog: * cp-trait.def: Define __is_scalar. * constraint.cc (diagnose_trait_expr): Handl

Re: Re: [PATCH] RISC-V: Support vfwmul.vv combine lowering

2023-07-07 Thread 钟居哲
Sure. We can come back to see in the future which doesn't change this codegen quality: https://godbolt.org/z/d6rWPTWeW juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-07-08 05:11 To: juzhe.zh...@rivai.ai; Robin Dapp CC: gcc-patches; kito.cheng; Kito.cheng; palmer; palmer Subject: Re: [PATCH]

Re: [PATCH] RISC-V: Support vfwmul.vv combine lowering

2023-07-07 Thread Jeff Law via Gcc-patches
On 7/3/23 02:42, juzhe.zh...@rivai.ai wrote: We failed to merge it since it's been rejected. https://patchwork.sourceware.org/project/gcc/patch/20230628041512.188243-1-juzhe.zh...@rivai.ai/ Tha

[PATCH v5] rs6000: Update the vsx-vector-6.* tests.

2023-07-07 Thread Carl Love via Gcc-patches
GCC maintainers: Ver 5. Removed -compile from the names of the compile only tests. Fixed up the reference to the compile file names in the .h file headers. Replaced powerpc_vsx_ok with vsx_hw in the run test files. Removed the -save-temps from all files. Retested on all of the various platfor

Re: [PATCH v4] rs6000: Update the vsx-vector-6.* tests.

2023-07-07 Thread Carl Love via Gcc-patches
On Fri, 2023-07-07 at 10:15 +0800, Kewen.Lin wrote: > > > diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-func- > > 1op-compile.c b/gcc/testsuite/gcc.target/powerpc/vsx-vector-6-func- > > 1op-compile.c > > new file mode 100644 > > index 000..6b7d73ed66c > > --- /dev/null > >

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-07 Thread Qing Zhao via Gcc-patches
The following is the updated documentation on this new attribute, please let me know any suggestion and comment: == 'counted_by (COUNT)' The 'counted_by' attribute may be attached to the flexible array member of a structure. It indicates that the number of the elements of the

[PATCH ver 3] rs6000, fix vec_replace_unaligned built-in arguments

2023-07-07 Thread Carl Love via Gcc-patches
GCC maintainers: Version 3, added code to altivec_resolve_overloaded_builtin so the correct instruction is selected for the size of the second argument. This restores the instruction counts to the original values where the correct instructions were originally being generated. The naming of the

Re: [PATCH] rs6000, fix vec_replace_unaligned builtin arguments

2023-07-07 Thread Carl Love via Gcc-patches
Kewen: On Mon, 2023-06-19 at 11:50 +0800, Kewen.Lin wrote: > > generated the vinsd instruction for the two calls with the first > > argument of unsigned long long int. When the first argument of the > > builtin is changed to the correct type, vector unsigned char the > > builtin generates the vin

[committed] d: Fix PR 108842: Cannot use enum array with -fno-druntime

2023-07-07 Thread Iain Buclaw via Gcc-patches
Hi, This patch restricts generating of CONST_DECLs for D manifest constants to just scalars without pointers. It shouldn't happen that a reference to a manifest constant has not been expanded within a function body during codegen, but it has been found to occur in older versions of the D front-en

[PATCH] Fortran: simplification of FINDLOC for constant complex arguments [PR110585]

2023-07-07 Thread Harald Anlauf via Gcc-patches
Dear all, I intend to commit the attached obvious patch within 24h unless someone objects. gfc_compare_expr() did not handle the case of complex constants, which may be compared for equality. This case is needed in the simplification of the FINDLOC intrinsic. Regtested on x86_64-pc-linux-gnu.

Re: [PATCH] Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178]

2023-07-07 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 07.07.23 um 14:21 schrieb Mikael Morin: I'm attaching what I have (lightly) tested so far, which doesn't work. It seems gfc_conv_class_to_class reevaluates part of the original expression, which is not correct after deallocation. this looks much more elegant than my attempt that

[PATCH] Fix PR 110539: missed optimization after moving two_value to match.pd

2023-07-07 Thread Andrew Pinski via Gcc-patches
When I moved two_value to match.pd, I removed the check for the {0,+-1} as I had placed it after the {0,+-1} case for cond in match.pd. In the case of {0,+-1} and non boolean, before we would optmize those case to just `(convert)a` but after we would get `(convert)(a != 0)` which was not handled an

Re: [PATCH] rs6000: Don't ICE when generating vector pair load/store insns [PR110411]

2023-07-07 Thread Peter Bergner via Gcc-patches
On 7/6/23 6:28 PM, Segher Boessenkool wrote: > On Thu, Jul 06, 2023 at 02:48:19PM -0500, Peter Bergner wrote: >> On 7/6/23 12:33 PM, Segher Boessenkool wrote: >>> On Wed, Jul 05, 2023 at 05:21:18PM +0530, P Jeevitha wrote: --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.c

Cleanup force_edge_cold

2023-07-07 Thread Jan Hubicka via Gcc-patches
Hi, we can use the new set_edge_probability_and_rescale_others here. Bootstrapped/regtested x86_64-linux, comitted. Honza gcc/ChangeLog: * predict.cc (force_edge_cold): Use set_edge_probability_and_rescale_others; improve dumps. diff --git a/gcc/predict.cc b/gcc/predict.cc inde

Fix some profile consistency testcases

2023-07-07 Thread Jan Hubicka via Gcc-patches
Hi, Information about profile mismatches is printed only with -details-blocks for some time. I think it should be printed even with default to make it easier to spot when someone introduces new transform that breaks the profile, but I will send separate RFC for that. This patch enables details i

[PATCH] libstdc++: Compile basic_file_stdio.cc for LFS

2023-07-07 Thread Jonathan Wakely via Gcc-patches
When this code was written we didn't have the header, so it conditionally used lseek64 etc. Since this is compiled into the library, not inline code in headers, we can just define the relevant macros to get a 64-bit off_t and then simplify the code. Tested x86_64-linux. I intend to commit this n

[PATCH] libstdc++: Fix --enable-cstdio=stdio_pure [PR110574]

2023-07-07 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux (with --enable-cstdio=stdio_pure and without). I intend to commit this next week. This fixes most of the fstream failures seen with stdio_pure, although there are still a few that fail (about half of them time out): FAIL: 27_io/basic_filebuf/imbue/char/13171-2.cc execution t

Re: [V1][PATCH 0/3] New attribute "element_count" to annotate bounds for C99 FAM(PR108896)

2023-07-07 Thread Qing Zhao via Gcc-patches
> On Jul 6, 2023, at 5:10 PM, Martin Uecker wrote: > > Am Donnerstag, dem 06.07.2023 um 18:56 + schrieb Qing Zhao: >> Hi, Kees, >> >> I have updated my V1 patch with the following changes: >> A. changed the name to "counted_by" >> B. changed the argument from a string to an identifier >> C

[PATCH v2] x86: Properly find the maximum stack slot alignment

2023-07-07 Thread H.J. Lu via Gcc-patches
Don't assume that stack slots can only be accessed by stack or frame registers. We first find all registers defined by stack or frame registers. Then check memory accesses by such registers, including stack and frame registers. gcc/ PR target/109780 * config/i386/i386.cc (ix86_u

Re: [PATCH] s390: Fix vec_init default expander

2023-07-07 Thread Andreas Krebbel via Gcc-patches
On 7/7/23 15:51, Juergen Christ wrote: > Do not reinitialize vector lanes to zero since they are already initialized to > zero. > > Bootstrapped and regression tested on s390x. > > gcc/ChangeLog: > > * config/s390/s390.cc (vec_init): Fix default case > > gcc/Testsuite/ChangeLog: > >

Re: Re: [PATCH V4] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread 钟居哲
Thanks. I still sent V5 with fixing "dummy" into "vlmax" and add more comments. Thanks. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-07-07 20:34 To: Juzhe-Zhong; gcc-patches CC: rdapp.gcc; kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw Subject: Re: [PATCH V4] RISC-V: Support gather_l

Re: [PING][PATCH] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-07 Thread Philipp Tomsich
On Fri, 7 Jul 2023 at 10:28, Di Zhao OS via Gcc-patches wrote: > > Update the patch so it can apply. > > Tested on spec2017 fprate cases again. With option "-funroll-loops -Ofast > -flto", > the improvements of 1-copy run are: > > Ampere1: > 508.namd_r 4.26% > 510.parest_r2.55% >

Re: [PATCH ver 2] rs6000, __builtin_set_fpscr_rn add retrun value

2023-07-07 Thread Peter Bergner via Gcc-patches
On 7/7/23 12:08 AM, Kewen.Lin wrote: > on 2023/7/7 07:00, Peter Bergner wrote: >> On 7/6/23 5:54 PM, Peter Bergner wrote: >>> On 6/30/23 7:58 PM, Carl Love via Gcc-patches wrote: +++ b/gcc/testsuite/gcc.target/powerpc/test_fpscr_rn_builtin_2.c @@ -0,0 +1,153 @@ +/* { dg-do run { targ

Re: [PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-07-07 Thread Jan Hubicka via Gcc-patches
> Hi Both, > > Thanks for all the reviews/patches so far 😊 > > > > > > > Looks good, but I wonder what we can do to at least make the multiple > > > exit case behave reasonably? The vectorizer keeps track > > > > > of a "canonical" exit, would it be possible to pass in the main exit > > > edge

[pushed][LRA][PR110372]: Refine reload pseudo class

2023-07-07 Thread Vladimir Makarov via Gcc-patches
The following patch solves https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110372 The patch was successfully bootstrapped and tested on x86-64. commit 1f7e5a7b91862b999aab88ee0319052aaf00f0f1 Author: Vladimir N. Makarov Date: Fri Jul 7 09:53:38 2023 -0400 LRA: Refine reload pseudo class

[PATCH] s390: Fix vec_init default expander

2023-07-07 Thread Juergen Christ via Gcc-patches
Do not reinitialize vector lanes to zero since they are already initialized to zero. Bootstrapped and regression tested on s390x. gcc/ChangeLog: * config/s390/s390.cc (vec_init): Fix default case gcc/Testsuite/ChangeLog: * gcc.target/s390/vector/vec-init-3.c: New test. Signed-

[PATCH v2] vect: Fix vectorized BIT_FIELD_REF for signed bit-fields [PR110557]

2023-07-07 Thread Xi Ruoyao via Gcc-patches
If a bit-field is signed and it's wider than the output type, we must ensure the extracted result sign-extended. But this was not handled correctly. For example: int x : 8; long y : 55; bool z : 1; The vectorized extraction of y was: vect__ifc__49.29_110 = MEM [(struct I

Re: [PATCH V4] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, the somewhat unified modulo is IMHO a more readable. Could probably still be improved but OK with me for now. > + if (is_dummy_len) > + { > + rtx dummy_len = gen_reg_rtx (Pmode); Can we call this is_vlmax_len/is_vlmax and vlmax_len or so? > + if (inner

Re: [PATCH] Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178]

2023-07-07 Thread Mikael Morin
Le 05/07/2023 à 22:36, Harald Anlauf a écrit : Hi Mikael, Am 05.07.23 um 16:54 schrieb Mikael Morin: Here is an example, admittedly artificial.  Fails with the above change, but fails with master as well. program p    implicit none    type t integer :: i    end type t    type u class

Re: [PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-07-07 Thread Jan Hubicka via Gcc-patches
> > Looks good, but I wonder what we can do to at least make the > multiple exit case behave reasonably? The vectorizer keeps track > of a "canonical" exit, would it be possible to pass in the main > exit edge and use that instead of single_exit (), would other > exits then behave somewhat reaso

RE: [PATCH 4/19]middle-end: Fix scale_loop_frequencies segfault on multiple-exits

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi Both, Thanks for all the reviews/patches so far 😊 > > > > Looks good, but I wonder what we can do to at least make the multiple > > exit case behave reasonably? The vectorizer keeps track > > > of a "canonical" exit, would it be possible to pass in the main exit > > edge and use that instead

Gcc - CIFF FASHION FAIR 2023

2023-07-07 Thread Emma Davis
Hi, Hope this email finds you well, Utilize our high-quality Show name attendees contact database to help you reach your target audience. Our database is segmented and ready to help you reach your goals. We have compiled and identified 1439 contacts of visitors from CIFF FASHION FAIR 2023, if in

Re: [PATCH] gcc-ar: Handle response files properly [PR77576]

2023-07-07 Thread Costas Argyris via Gcc-patches
Bootstrapped successfully on x86_64-pc-linux-gnu On Fri, 7 Jul 2023 at 11:33, Costas Argyris wrote: > Problem: gcc-ar fails when a @file is passed to it: > > $ cat rsp > --version > $ gcc-ar @rsp > /usr/bin/ar: invalid option -- '@' > > This is because a dash '-' is prepended to the first > argu

Re: [PATCH v4 4/9] MIPS: Add bitwise instructions for mips16e2

2023-07-07 Thread Jan-Benedict Glaw
On Fri, 2023-07-07 16:38:51 +0800, 梅杰 wrote: > 在 2023/7/7 07:06, Jan-Benedict Glaw 写道: > > On Mon, 2023-06-19 16:29:53 +0800, Jie Mei > > wrote: > > > There are shortened bitwise instructions in the mips16e2 ASE, > > > for instance, ANDI, ORI/XORI, EXT, INS etc. . [...] > > Starting with this pa

Re: Re: [PATCH V3] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread juzhe.zh...@rivai.ai
Hi, Robin. I have fixed all issues for you with V4 patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623856.html 1. Apply your approach on poly int 2. Fix comments. 3. Normalize "modulo" codes and make it no redundancy. ... Could you take a look at it? Thanks. juzhe.zh...@rivai.ai

Re: [PATCH] gcc-ar: Handle response files properly [PR77576]

2023-07-07 Thread Costas Argyris via Gcc-patches
Problem: gcc-ar fails when a @file is passed to it: $ cat rsp --version $ gcc-ar @rsp /usr/bin/ar: invalid option -- '@' This is because a dash '-' is prepended to the first argument if it doesn't start with one, resulting in the wrong call 'ar -@rsp'. Fix: Expand argv to get rid of any @files a

Re: Re: [PATCH V3] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread juzhe.zh...@rivai.ai
>>When reading it I considered unifying both cases and have modulo_sel_indices >>just do nothing when the constant already satisfies the range requirement. >>Would that work? I tried but it turns out to cause execution faile. Sorry, I can try to refine this code.Thanks. juzhe.zh...@rivai.ai Fr

Re: [PATCH] Vect: use a small step to calculate induction for the unrolled loop (PR tree-optimization/110449)

2023-07-07 Thread Richard Biener via Gcc-patches
On Fri, Jul 7, 2023 at 9:53 AM Richard Sandiford wrote: > > Richard Biener writes: > >> Am 06.07.2023 um 19:50 schrieb Richard Sandiford > >> : > >> > >> Richard Biener via Gcc-patches writes: > On Wed, Jul 5, 2023 at 8:44 AM Hao Liu OS via Gcc-patches > wrote: > > Hi, > >

Re: Re: [PATCH V3] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread juzhe.zh...@rivai.ai
>> It's a bit weird that the function now also emits an insn. It's not >> similar to the aarch64 variant anymore then, I suppose. If so, please >> remove the comment. Ok. >> elt_mode is unused after your patch. Please remove it or we will have >> a bootstrap error. Ok >>When reading it I consi

Re: [PATCH] vect: Fix vectorized BIT_FIELD_REF for signed bit-fields [PR110557]

2023-07-07 Thread Xi Ruoyao via Gcc-patches
On Fri, 2023-07-07 at 08:15 +0200, Richard Biener wrote: /* snip */ > > +  bool sign_ext = (!TYPE_UNSIGNED (TREE_TYPE (bf_ref)) && > > +  TYPE_PRECISION (ret_type) > mask_width); > > +  bool widening = ((TYPE_PRECISION (TREE_TYPE (container)) < > > +   TYPE_PRECISI

Re: [PATCH V3] RISC-V: Support gather_load/scatter RVV auto-vectorization

2023-07-07 Thread Robin Dapp via Gcc-patches
Hi Juzhe, thanks, that's quite a chunk :) and it took me a while to go through it. > @@ -564,7 +565,14 @@ const_vec_all_in_range_p (rtx vec, poly_int64 minval, > poly_int64 maxval) > static rtx > gen_const_vector_dup (machine_mode mode, poly_int64 val) > { > - rtx c = gen_int_mode (val, GET_

[PATCH 2/2]middle-end ifcvt: Sort PHI arguments not only occurrences but also complexity [PR109154]

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi All, This patch builds on the previous patch by fixing another issue with the way ifcvt currently picks which branches to test. The issue with the current implementation is while it sorts for occurrences of the argument, it doesn't check for complexity of the arguments. As an example: [lo

[PATCH 1/2]middle-end ifcvt: Reduce comparisons on conditionals by tracking truths [PR109154]

2023-07-07 Thread Tamar Christina via Gcc-patches
Hi All, Following on from Jakub's patch in g:de0ee9d14165eebb3d31c84e98260c05c3b33acb these two patches finishes the work fixing the regression and improves codegen. As explained in that commit, ifconvert sorts PHI args in increasing number of occurrences in order to reduce the number of comparis

RE: Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560]

2023-07-07 Thread Li, Pan2 via Gcc-patches
Committed to gcc-13, thanks Juzhe and Kito. Pan From: juzhe.zh...@rivai.ai Sent: Friday, July 7, 2023 5:07 PM To: kito.cheng Cc: Li Xu ; gcc-patches ; palmer ; zhengyu ; Li, Pan2 Subject: Re: Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560] CCing Li Pan to ba

Re: Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560]

2023-07-07 Thread juzhe.zh...@rivai.ai
CCing Li Pan to backport this patch. Thanks. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-07-07 17:04 To: juzhe.zh...@rivai.ai CC: Li Xu; gcc-patches; palmer; zhengyu Subject: Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560] LGTM On Fri, Jul 7, 2023 at 4:

Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560]

2023-07-07 Thread Kito Cheng via Gcc-patches
LGTM On Fri, Jul 7, 2023 at 4:26 PM juzhe.zh...@rivai.ai wrote: > > LGTM. Thanks. > > > > juzhe.zh...@rivai.ai > > From: Li Xu > Date: 2023-07-07 16:22 > To: gcc-patches > CC: kito.cheng; palmer; juzhe.zhong; zhengyu; Li Xu > Subject: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL

Re: [COMMITTED] ada: Fix expanding container aggregates

2023-07-07 Thread Eric Botcazou via Gcc-patches
> Ensure that that container aggregate expressions are expanded as > such and not as records even if the type of the expression is a > record. > > gcc/ada/ > > * exp_aggr.adb (Expand_N_Aggregate): Ensure that container > aggregate expressions do not get expanded as records but instead

Re: [COMMITTED] ada: Fix internal error on aggregate within container aggregate

2023-07-07 Thread Eric Botcazou via Gcc-patches
> This just applies the same fix to Expand_Array_Aggregate as the one that was > recently applied to Convert_To_Assignments. > > gcc/ada/ > > * exp_aggr.adb (Convert_To_Assignments): Tweak comment. > (Expand_Array_Aggregate): Do not delay the expansion if the parent > node is a

Re: [COMMITTED] ada: Fix crash on vector initialization

2023-07-07 Thread Eric Botcazou via Gcc-patches
> Such assignments to container aggregates are later transformed into > procedure calls to the procedures named in the Aggregate aspect > definition, for which the delayed expansion is not required/expected. > > gcc/ada/ > > * exp_aggr.adb (Convert_To_Assignments): Do not mark node for >

Re: [PATCH v4 4/9] MIPS: Add bitwise instructions for mips16e2

2023-07-07 Thread 梅杰
Hi, 在 2023/7/7 07:06, Jan-Benedict Glaw 写道: > Hi! > > On Mon, 2023-06-19 16:29:53 +0800, Jie Mei wrote: >> There are shortened bitwise instructions in the mips16e2 ASE, >> for instance, ANDI, ORI/XORI, EXT, INS etc. . >> >> This patch adds these instrutions with corresponding tests. > > [...] >

[PING][PATCH] tree-optimization/110279- Check for nested FMA chains in reassoc

2023-07-07 Thread Di Zhao OS via Gcc-patches
Update the patch so it can apply. Tested on spec2017 fprate cases again. With option "-funroll-loops -Ofast -flto", the improvements of 1-copy run are: Ampere1: 508.namd_r 4.26% 510.parest_r2.55% Overall 0.54% Intel Xeon: 503.bwaves_r1.3% 508

Re: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560]

2023-07-07 Thread juzhe.zh...@rivai.ai
LGTM. Thanks. juzhe.zh...@rivai.ai From: Li Xu Date: 2023-07-07 16:22 To: gcc-patches CC: kito.cheng; palmer; juzhe.zhong; zhengyu; Li Xu Subject: [PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560] This patch fixes this issue happens on GCC-13. https://gcc.gnu.org/bug

[PATCH] RISCV: Fix local_eliminate_vsetvl_insn bug in VSETVL PASS[PR110560]

2023-07-07 Thread Li Xu
This patch fixes this issue happens on GCC-13. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110560 This patch should be backported to GCC-13. GCC-14 has rewritten this function, so there is no issue. PR target/110560 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (local_eliminate_vsetvl_

RE: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Jiang, Haochen via Gcc-patches
> -Original Message- > From: Hongtao Liu > Sent: Friday, July 7, 2023 3:55 PM > To: Beulich, Jan > Cc: haochen.jiang ; Jiang, Haochen > ; gcc-regress...@gcc.gnu.org; gcc- > patc...@gcc.gnu.org; Liu, Hongtao > Subject: Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan- > a

[COMMITTED] Implement value/mask tracking for irange.

2023-07-07 Thread Aldy Hernandez via Gcc-patches
Integer ranges (irange) currently track known 0 bits. We've wanted to track known 1 bits for some time, and instead of tracking known 0 and known 1's separately, it has been suggested we track a value/mask pair similarly to what we do for CCP and RTL. This patch implements such a thing. With thi

[COMMITTED] The caller to irange::intersect (wide_int, wide_int) must normalize the range.

2023-07-07 Thread Aldy Hernandez via Gcc-patches
Per the function comment, the caller to intersect(wide_int, wide_int) must handle the mask. This means it must also normalize the range if anything changed. gcc/ChangeLog: * value-range.cc (irange::intersect): Leave normalization to caller. --- gcc/value-range.cc | 7 +-- 1

[COMMITTED] A singleton irange has all known bits.

2023-07-07 Thread Aldy Hernandez via Gcc-patches
gcc/ChangeLog: * value-range.cc (irange::get_bitmask_from_range): Return all the known bits for a singleton. (irange::set_range_from_bitmask): Set a range of a singleton when all bits are known. --- gcc/value-range.cc | 19 ++- 1 file changed, 18 in

Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 7, 2023 at 3:50 PM Hongtao Liu wrote: > > On Fri, Jul 7, 2023 at 3:50 PM Jan Beulich wrote: > > > > On 07.07.2023 09:46, Hongtao Liu wrote: > > > On Fri, Jul 7, 2023 at 3:18 PM Jan Beulich via Gcc-regression > > > wrote: > > >> > > >> On 06.07.2023 13:57, haochen.jiang wrote: > > >>>

Re: [PATCH] Vect: use a small step to calculate induction for the unrolled loop (PR tree-optimization/110449)

2023-07-07 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: >> Am 06.07.2023 um 19:50 schrieb Richard Sandiford : >> >> Richard Biener via Gcc-patches writes: On Wed, Jul 5, 2023 at 8:44 AM Hao Liu OS via Gcc-patches wrote: Hi, If a loop is unrolled by n times during vectoriation, two steps are use

[PATCH] testsuite: Add _link flavor for several arm_arch* and arm* effective-targets

2023-07-07 Thread Christophe Lyon via Gcc-patches
For arm targets, we generate many effective-targets with check_effective_target_FUNC_multilib and check_effective_target_arm_arch_FUNC_multilib which check if we can link and execute a simple program with a given set of flags/multilibs. In some cases however, it's possible to link but not to execu

[PATCH] doc: Document arm_v8_1m_main_cde_mve_fp

2023-07-07 Thread Christophe Lyon via Gcc-patches
The arm_v8_1m_main_cde_mve_fp family of effective targets was not documented when it was introduced. 2023-07-07 Christophe Lyon gcc/ * doc/sourcebuild.texi (arm_v8_1m_main_cde_mve_fp): Document. --- gcc/doc/sourcebuild.texi | 6 ++ 1 file changed, 6 insertions(+) diff --g

Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 7, 2023 at 3:50 PM Jan Beulich wrote: > > On 07.07.2023 09:46, Hongtao Liu wrote: > > On Fri, Jul 7, 2023 at 3:18 PM Jan Beulich via Gcc-regression > > wrote: > >> > >> On 06.07.2023 13:57, haochen.jiang wrote: > >>> On Linux/x86_64, > >>> > >>> e007369c8b67bcabd57c4fed8cff2a6db82e78e

Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Jan Beulich via Gcc-patches
On 07.07.2023 09:46, Hongtao Liu wrote: > On Fri, Jul 7, 2023 at 3:18 PM Jan Beulich via Gcc-regression > wrote: >> >> On 06.07.2023 13:57, haochen.jiang wrote: >>> On Linux/x86_64, >>> >>> e007369c8b67bcabd57c4fed8cff2a6db82e78e6 is the first bad commit >>> commit e007369c8b67bcabd57c4fed8cff2a6d

Re: [r14-2310 Regression] FAIL: gcc.target/i386/pr53652-1.c scan-assembler-times pandn[ \\t] 2 on Linux/x86_64

2023-07-07 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 7, 2023 at 3:34 PM Jan Beulich wrote: > > On 07.07.2023 09:30, Hongtao Liu wrote: > > On Fri, Jul 7, 2023 at 3:13 PM Jan Beulich via Gcc-regression > > wrote: > >> > >> On 06.07.2023 13:57, haochen.jiang wrote: > >>> On Linux/x86_64, > >>> > >>> 2d11c99dfca3cc603dbbfafb3afc41689a68e40

Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 7, 2023 at 3:18 PM Jan Beulich via Gcc-regression wrote: > > On 06.07.2023 13:57, haochen.jiang wrote: > > On Linux/x86_64, > > > > e007369c8b67bcabd57c4fed8cff2a6db82e78e6 is the first bad commit > > commit e007369c8b67bcabd57c4fed8cff2a6db82e78e6 > > Author: Jan Beulich > > Date:

Re: [r14-2310 Regression] FAIL: gcc.target/i386/pr53652-1.c scan-assembler-times pandn[ \\t] 2 on Linux/x86_64

2023-07-07 Thread Jan Beulich via Gcc-patches
On 07.07.2023 09:30, Hongtao Liu wrote: > On Fri, Jul 7, 2023 at 3:13 PM Jan Beulich via Gcc-regression > wrote: >> >> On 06.07.2023 13:57, haochen.jiang wrote: >>> On Linux/x86_64, >>> >>> 2d11c99dfca3cc603dbbfafb3afc41689a68e40f is the first bad commit >>> commit 2d11c99dfca3cc603dbbfafb3afc4168

Re: [r14-2310 Regression] FAIL: gcc.target/i386/pr53652-1.c scan-assembler-times pandn[ \\t] 2 on Linux/x86_64

2023-07-07 Thread Hongtao Liu via Gcc-patches
On Fri, Jul 7, 2023 at 3:13 PM Jan Beulich via Gcc-regression wrote: > > On 06.07.2023 13:57, haochen.jiang wrote: > > On Linux/x86_64, > > > > 2d11c99dfca3cc603dbbfafb3afc41689a68e40f is the first bad commit > > commit 2d11c99dfca3cc603dbbfafb3afc41689a68e40f > > Author: Jan Beulich > > Date:

Re: [r14-2314 Regression] FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8 on Linux/x86_64

2023-07-07 Thread Jan Beulich via Gcc-patches
On 06.07.2023 13:57, haochen.jiang wrote: > On Linux/x86_64, > > e007369c8b67bcabd57c4fed8cff2a6db82e78e6 is the first bad commit > commit e007369c8b67bcabd57c4fed8cff2a6db82e78e6 > Author: Jan Beulich > Date: Wed Jul 5 09:49:16 2023 +0200 > > x86: yet more PR target/100711-like splitting

Re: [r14-2310 Regression] FAIL: gcc.target/i386/pr53652-1.c scan-assembler-times pandn[ \\t] 2 on Linux/x86_64

2023-07-07 Thread Jan Beulich via Gcc-patches
On 06.07.2023 13:57, haochen.jiang wrote: > On Linux/x86_64, > > 2d11c99dfca3cc603dbbfafb3afc41689a68e40f is the first bad commit > commit 2d11c99dfca3cc603dbbfafb3afc41689a68e40f > Author: Jan Beulich > Date: Wed Jul 5 09:41:09 2023 +0200 > > x86: use VPTERNLOG also for certain andnot for

[PATCH] mklog: handle Signed-Off-By, minor cleanup

2023-07-07 Thread Marc Poulhiès via Gcc-patches
Consider Signed-off-by lines as part of the ending of the initial commit to avoid having these in the middle of the log when the changelog part is injected after. This is particularly usefull with: $ git gcc-commit-mklog --amend -s that can be used to create the changelog and add the Signed-Off