Re: [PATCH] RISC-V: Improve vector_insn_info::dump for LMUL and policy

2023-05-12 Thread Kito Cheng via Gcc-patches
committed to trunk. On Sat, May 13, 2023 at 1:13 AM Jeff Law via Gcc-patches wrote: > > > > On 5/12/23 07:32, Kito Cheng via Gcc-patches wrote: > > Convert vlmul and policy to human readable string, some example below: > > > > Before: > > [VALID,Demand > > field={1(VL),0(DEMAND_NONZERO_AVL),1(SE

[committed] RISC-V: Pull out function call with side effect from gcc_assert.

2023-05-12 Thread Kito Cheng via Gcc-patches
It will broken when release mode. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::cleanup_insns): Pull out function call from the gcc_assert. --- gcc/config/riscv/riscv-vsetvl.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config/riscv/ri

Re: [PATCH] libstdc++: use __bool_constant instead of integral_constant

2023-05-12 Thread Ken Matsui via Gcc-patches
It appears that GCC 13 has been released, but I am wondering if there are any issues preventing this patch from being merged yet. Can you provide any information on this? On Sat, Apr 8, 2023 at 2:08 PM Ken Matsui wrote: > > I see. Thank you! > > On Sat, Apr 8, 2023 at 12:52 AM Jonathan Wakely wr

Re: [PATCH] RISC-V: Optimize vsetvl AVL for VLS VLMAX auto-vectorization

2023-05-12 Thread Kito Cheng via Gcc-patches
Hmmm here is alternative approach for this: diff --git a/gcc/config/riscv/riscv-v.cc b/gcc/config/riscv/riscv-v.cc index b8dc333f54e1..c88056024e7d 100644 --- a/gcc/config/riscv/riscv-v.cc +++ b/gcc/config/riscv/riscv-v.cc @@ -50,6 +50,21 @@ using namespace riscv_vector; namespace riscv_vector {

[PATCH] MATCH: Fix PR 109834, ICE with popcount combined with bswap

2023-05-12 Thread Andrew Pinski via Gcc-patches
After r14-673-gc0dd80e4c4c3, there was a check in the match patterns which was checking the type is unsigned but instead of using the type, the patch used the expression. This adds the needed TREE_TYPE so get the correct answer and don't ICE. Committed as obvious after a bootstrap/test on x86_64-l

Re: [PATCH] i386: Allow -mlarge-data-threshold with -mcmodel=large

2023-05-12 Thread Fangrui Song via Gcc-patches
On Wed, May 10, 2023 at 2:58 AM Uros Bizjak wrote: > > On Fri, Apr 28, 2023 at 2:47 AM Fangrui Song wrote: > > > > When using -mcmodel=medium, large data is placed into .l* sections. GNU ld > > places .l* sections into separate output sections. If small and medium > > code model object files ar

[PATCH] RISC-V: Optimize vsetvl AVL for VLS VLMAX auto-vectorization

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong This patch is optimizing the AVL for VLS auto-vectorzation. Consider such case: typedef int8_t vnx2qi __attribute__ ((vector_size (2))); __attribute__ ((noipa)) void f_vnx2qi (int8_t a, int8_t b, int8_t *out) { vnx2qi v = {a, b}; *(vnx2qi *) out = v; } Before this patch:

Re: [committed] Convert xstormy16 to LRA

2023-05-12 Thread Hans-Peter Nilsson via Gcc-patches
> From: Hans-Peter Nilsson > Date: Sat, 13 May 2023 02:56:39 +0200 > > > From: "Roger Sayle" > > Date: Fri, 12 May 2023 15:04:03 +0100 > > > Hi H-P, > > This patch should now already be on trunk: > > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d8a6945c6ea22efa4d5e42fe1922d2 > > b27953c8cd > >

Re: [committed] Convert xstormy16 to LRA

2023-05-12 Thread Hans-Peter Nilsson via Gcc-patches
> From: "Roger Sayle" > Date: Fri, 12 May 2023 15:04:03 +0100 > Hi H-P, > This patch should now already be on trunk: > https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d8a6945c6ea22efa4d5e42fe1922d2 > b27953c8cd > Many thanks to Jeff for the review/approval. > There have been no reported adverse eff

Re: Re: [PATCH V4] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread 钟居哲
Address comments. V5 patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618398.html Thanks. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-13 00:16 To: juzhe.zhong CC: gcc-patches; palmer; jeffreyalaw Subject: Re: [PATCH V4] RISC-V: Using merge approach to optimize repeating sequ

[PATCH V5] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong 1. Remove magic number of V4 2. Remove unnecessary gcc_assert Consider this following case: typedef int64_t vnx32di __attribute__ ((vector_size (256))); __attribute__ ((noipa)) void f_vnx32di (int64_t a, int64_t b, int64_t *out) { vnx32di v = {a, b, a, b, a, b, a, b, a,

[PATCH] aarch64: Add SVE instruction types

2023-05-12 Thread Evandro Menezes via Gcc-patches
This patch adds the attribute `type` to most SVE1 instructions, as in the other instructions. -- Evandro Menezes 0002-aarch64-Add-SVE-instruction-types.patch Description: Binary data

Re: Re: [PATCH V4] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread 钟居哲
>> What the magic 64 means? uint64_t mask = 0; 64 = sizeof (uint64_t) >> gcc_assert will removed at release mode, so it's not you want I guess? You mean I need to remove it? juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-13 00:16 To: juzhe.zhong CC: gcc-patches; palmer; jeffreyalaw Subjec

Re: [PATCH] i386: Honour -mdirect-extern-access when calling __fentry__

2023-05-12 Thread Ard Biesheuvel via Gcc-patches
On Fri, 12 May 2023 at 19:05, Uros Bizjak wrote: > > On Fri, May 12, 2023 at 4:07 PM Ard Biesheuvel wrote: > > > > > > > Note that the GOT reference in question is in fact a data > > > > > > reference: we > > > > > > explicitly load the address of __fentry__ from the GOT, which > > > > > > amou

[PATCH RFC] c-family: make -fno-permissive upgrade pedwarns

2023-05-12 Thread Jason Merrill via Gcc-patches
In the context of the recent discussion, it occurred to me that this semantic would be useful, but currently there is no easy way to access it. Bikeshedding welcome; the use of this flag is a bit odd, but it has the advantage of being accepted without error going back at least to 4.3. -- 8< -- C

Re: [patch, fortran] PR109662 Namelist input with comma after name accepted

2023-05-12 Thread Jerry D via Gcc-patches
I plan to commit the following as simple. The issue was a value was being modified on a short namelist read. After tthe first read gives the correct EOF, a second read would give the error but modify the variable. diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 82664dc5f98..3

RE: [EXTERNAL] Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build

2023-05-12 Thread Eugene Rozenfeld via Gcc-patches
Thank you, Richard. I went with your suggestion. New patch: [PATCH] Disable warnings as errors for STAGEautofeedback. Compilation during STAGEautofeedback produces additional warnings since inlining decisions with -fauto-profile are different from other builds. This patches disables warnings as

[pushed] wwwdocs: gcc-13/buildstat: Remove trace of XHTML

2023-05-12 Thread Gerald Pfeifer
Hi Jakub, do you recall how this snuck in? None of other other pages has had <..." /> instead of <..."> for a while. Not a biggie at all, just curious. Pushed. On a related note, the buildstat pages for GCC 9, 10, 11, 12, and 13 all are empty and I suggest to remove them. Any concerns? Ger

Re: [PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-05-12 Thread Bernhard Reutner-Fischer via Gcc-patches
On 12 May 2023 14:45:14 CEST, Martin Jambor wrote: >gcc/ChangeLog: > >2023-05-11 Martin Jambor > > PR ipa/108007 > * cgraph.h (cgraph_edge): Add a parameter to > redirect_call_stmt_to_callee. > * ipa-param-manipulation.h (ipa_param_adjustments): Added a > paramete

Re: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits

2023-05-12 Thread Bernhard Reutner-Fischer via Gcc-patches
On 12 May 2023 08:49:53 CEST, Richard Biener via Gcc-patches wrote: >> gcc/ChangeLog: >> >> * combine.cc (struct reg_stat_type): Extended machine mode to 16 bits. >> * cse.cc (struct qty_table_elem): Ditto. >> (struct table_elt): Ditto. >> (struct set): Ditto. >> * geno

[PATCH] i386: Cleanup ix86_expand_vecop_qihi{,2}

2023-05-12 Thread Uros Bizjak via Gcc-patches
Some cleanups while looking at these two functions. gcc/ChangeLog: * config/i386/i386-expand.cc (ix86_expand_vecop_qihi2): Also reject ymm instructions for TARGET_PREFER_AVX128. Use generic gen_extend_insn to generate zero/sign extension instructions. Fix comments. (ix86_expa

Re: [PATCH 1/2] c++: potentiality of templated memfn call [PR109480]

2023-05-12 Thread Jason Merrill via Gcc-patches
On 5/12/23 13:02, Patrick Palka wrote: Hi Martin, On Fri, May 12, 2023 at 12:13 PM Martin Jambor wrote: Hello Patrick, On Wed, May 03 2023, Patrick Palka via Gcc-patches wrote: [...] Subject: [PATCH] c++: potentiality of templated memfn call [PR109480] Here we're incorrectly deeming th

Re: [PATCH] RISC-V: Improve vector_insn_info::dump for LMUL and policy

2023-05-12 Thread Jeff Law via Gcc-patches
On 5/12/23 07:32, Kito Cheng via Gcc-patches wrote: Convert vlmul and policy to human readable string, some example below: Before: [VALID,Demand field={1(VL),0(DEMAND_NONZERO_AVL),1(SEW),0(DEMAND_GE_SEW),1(LMUL),0(RATIO),0(TAIL_POLICY),0(MASK_POLICY)} AVL=(reg:DI 0 zero) SEW=16,VLMUL=3,RATIO

Re: [PATCH] i386: Honour -mdirect-extern-access when calling __fentry__

2023-05-12 Thread Uros Bizjak via Gcc-patches
On Fri, May 12, 2023 at 4:07 PM Ard Biesheuvel wrote: > > > > > Note that the GOT reference in question is in fact a data reference: > > > > > we > > > > > explicitly load the address of __fentry__ from the GOT, which amounts > > > > > to > > > > > eager binding, rather than emitting a PLT call

Re: [PATCH 1/2] c++: potentiality of templated memfn call [PR109480]

2023-05-12 Thread Patrick Palka via Gcc-patches
Hi Martin, On Fri, May 12, 2023 at 12:13 PM Martin Jambor wrote: > > Hello Patrick, > > On Wed, May 03 2023, Patrick Palka via Gcc-patches wrote: > > > [...] > > > > Subject: [PATCH] c++: potentiality of templated memfn call [PR109480] > > > > Here we're incorrectly deeming the templated call a.g

[committed] libstdc++: Fix -Wnonnull warnings during configure

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- We should not test for nan by passing it a null pointer, as this can trigger -Wnonnull warnings. Also fix an outdated comment about the default -std mode. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Use a non-null

[committed] libstdc++: Reduce dependency on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Since r9-2028-g8ba7f29e3dd064 we've defined most of unconditionally, so we can do the same for most of the std::atomic aliases such as std::atomic_int_least32_t. The only aliases that need to depend on _GLIBCXX_USE_C99_STDINT_TR1 are the ones

[committed] libstdc++: Remove dependency on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- Since r9-2028-g8ba7f29e3dd064 we've defined most of unconditionally, including uint_least32_t. This means that all of can be defined unconditionally, which means that std::shuffle and std::ranges::shuffle can be too. libstdc++-v3/ChangeLog:

[committed] libstdc++: Remove redundant dependencies on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested powerpc64le-linux. Pushed to trunk. -- >8 -- We never need to use std::make_unsigned in std::char_traits and std::char_traits because guarantees to provide the types we need, since r9-2028-g8ba7f29e3dd064. Similarly, experimental::source_location can just assume uint_least32_t is defined

[PATCH] i386: Remove mulv2si emulated sequence for TARGET_SSE2 [PR109797]

2023-05-12 Thread Uros Bizjak via Gcc-patches
Remove mulv2si emulated sequence for TARGET_SSE2 and enable only native PMULLD instruction for TARGET_SSE4_1. Ideally, the vectorization for TARGET_SSE2 should depend on more precise cost estimation (the PR contains patch for ix86_multiplication_cost), but even with patched cost function the runti

Re: [PATCH V4] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread Kito Cheng via Gcc-patches
> +/* Get the mask for merge approach. > + > + Consider such following case: > + {a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b} > + To merge "a", the mask should be 1010 > + To merge "b", the mask should be 0101 > +*/ > +rtx > +rvv_builder::get_merge_mask_bitfield (unsig

Re: [PATCH 1/2] c++: potentiality of templated memfn call [PR109480]

2023-05-12 Thread Martin Jambor
Hello Patrick, On Wed, May 03 2023, Patrick Palka via Gcc-patches wrote: > [...] > > Subject: [PATCH] c++: potentiality of templated memfn call [PR109480] > > Here we're incorrectly deeming the templated call a.g() inside b's > initializer as potentially constant, despite g being non-constexpr, >

Re: Re: [PATCH V2] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread 钟居哲
Address comments. V4 patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618375.html Regresion PASSED. Thanks. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-12 23:19 To: juzhe.zhong CC: gcc-patches; palmer; rdapp.gcc; jeffreyalaw Subject: Re: [PATCH V2] RISC-V: Using merge approa

[PATCH V4] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong Patch V3 fail testcase V4 all pass Address kito's comment Consider this following case: typedef int64_t vnx32di __attribute__ ((vector_size (256))); __attribute__ ((noipa)) void f_vnx32di (int64_t a, int64_t b, int64_t *out) { vnx32di v = {a, b, a, b, a, b, a, b, a, b,

[PATCH v2] Machine_Mode: Extend machine_mode from 8 to 16 bits

2023-05-12 Thread Pan Li via Gcc-patches
From: Pan Li We are running out of the machine_mode(8 bits) in RISC-V backend. Thus we would like to extend the machine_mode bit size from 8 to 16 bits. However, it is sensitive to extend the memory size in common structure like tree or rtx. This patch would like to extend the machine_mode bits t

[PATCH V3] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong Address comments from Kito. Consider this following case: typedef int64_t vnx32di __attribute__ ((vector_size (256))); __attribute__ ((noipa)) void f_vnx32di (int64_t a, int64_t b, int64_t *out) { vnx32di v = {a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b,

Re: [PATCH V2] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread Kito Cheng via Gcc-patches
two minor comments: > + void add_ta_policy_operand (enum tail_policy vta) > + void add_ma_policy_operand (enum mask_policy vma) You could just named as add_policy_operand since the arugment type is already sufficient to distinguish. > @@ -84,40 +92,52 @@ public: > add_input_operand (gen_i

PING: [PATCH] release the sorted FDE array when deregistering a frame [PR109685]

2023-05-12 Thread Thomas Neumann via Gcc-patches
Summary: The old linear scan logic called free while searching the list of frames. The atomic fast path finds the frame quickly, but forgot the free call. This patches adds the missing free. Bugzilla #109685. See: https://gcc.gnu.org/pipermail/gcc-patches/2023-May/617245.html Best Thomas

[PATCH V2] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong Address comment from Robin. Consider this following case: typedef int64_t vnx32di __attribute__ ((vector_size (256))); __attribute__ ((noipa)) void f_vnx32di (int64_t a, int64_t b, int64_t *out) { vnx32di v = {a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b,

Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies

2023-05-12 Thread Ben Boeckel via Gcc-patches
On Mon, Feb 13, 2023 at 13:33:50 -0500, Jason Merrill wrote: > Both this and the mapper dependency patch seem to cause most of the > modules testcases to crash; please remember to run the regression tests > (https://gcc.gnu.org/contribute.html#testing) Fixed for v6. `cpp_get_deps` can return `NU

Re: [PATCH v5 1/5] libcpp: reject codepoints above 0x10FFFF

2023-05-12 Thread Ben Boeckel via Gcc-patches
On Mon, Feb 13, 2023 at 10:53:17 -0500, Jason Merrill wrote: > On 1/25/23 13:06, Ben Boeckel wrote: > > Unicode does not support such values because they are unrepresentable in > > UTF-16. > > > > libcpp/ > > > > * charset.cc: Reject encodings of codepoints above 0x10. > > UTF-16 does

Re: [PATCH v5 3/5] p1689r5: initial support

2023-05-12 Thread Ben Boeckel via Gcc-patches
On Tue, Feb 14, 2023 at 16:50:27 -0500, Jason Merrill wrote: > I notice that the actual flags are all -fdep-*, though some of them are > -fdeps-* here, and the internal variables all seem to be fdeps_*. I > lean toward harmonizing on "deps", I think. Done. > I don't love the three separate opt

Re: [PATCH] i386: Honour -mdirect-extern-access when calling __fentry__

2023-05-12 Thread Ard Biesheuvel via Gcc-patches
On Thu, 11 May 2023 at 08:08, Uros Bizjak wrote: > > On Thu, May 11, 2023 at 12:04 AM H.J. Lu wrote: > > > > On Wed, May 10, 2023 at 2:17 AM Uros Bizjak wrote: > > > > > > On Tue, May 9, 2023 at 10:58 AM Ard Biesheuvel wrote: > > > > > > > > The small and medium PIC code models generate profili

RE: [committed] Convert xstormy16 to LRA

2023-05-12 Thread Roger Sayle
Hi H-P, This patch should now already be on trunk: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d8a6945c6ea22efa4d5e42fe1922d2 b27953c8cd Many thanks to Jeff for the review/approval. There have been no reported adverse effects so far. Please let me/us know if this has helped CRIS. Cheers, Roger

Re: [committed] Convert xstormy16 to LRA

2023-05-12 Thread Hans-Peter Nilsson via Gcc-patches
> From: Hans-Peter Nilsson > Date: Fri, 12 May 2023 15:53:49 +0200 > Anyway, Roger mentioned that the clobbers emitted by the > lower-subreg passes were apparently damaging, so I'll try > this out "for fun", on the assumption that they're actually > unnecessary. I don't think actually removing t

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Fri, 12 May 2023, Andre Vieira (lists) wrote: > >> I have dealt with, I think..., most of your comments. There's quite a few >> changes, I think it's all a bit simpler now. I made some other changes to the >> costing in tree-inline.cc and gimple-range-op.cc in which I t

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
On 12/05/2023 14:28, Richard Biener wrote: On Fri, 12 May 2023, Andre Vieira (lists) wrote: I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and gimple-range-op.cc

Re: [committed] Convert xstormy16 to LRA

2023-05-12 Thread Hans-Peter Nilsson via Gcc-patches
> From: Hans-Peter Nilsson > Date: Thu, 11 May 2023 17:05:40 +0200 > Next, I'll turn around completely, and try defaulting to > -fsplit-wide-types-early, which sounds more promising. :) > I don't like throwing defaults around randomly, but trying > out a promising idea this way is easy. Absolute

[committed] libstdc++: Remove test dependency on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This should have been removed in r9-2029-g612c9c702e2c9e when the char16_t and char32_t specializations of std::codecvt were changed to be defined unconditionally. libstdc++-v3/ChangeLog: * testsuite/22_locale/locale/cons/unicode.cc: Remove

[committed] libstdc++: Remove test dependency on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- This should have been done in r9-2028-g8ba7f29e3dd064 when std::shared_mutex was changed to be defined without depending on _GLIBCXX_USE_C99_STDINT_TR1. libstdc++-v3/ChangeLog: * testsuite/experimental/feat-cxx14.cc: Remove dependency on

[committed] libstdc++: Remove test dependencies on _GLIBCXX_USE_C99_STDINT_TR1

2023-05-12 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- These #ifdef checks should have been removed in r9-2029-g612c9c702e2c9e when the u16string_view and u32string_view aliases were changed to be defined unconditionally. libstdc++-v3/ChangeLog: * testsuite/21_strings/basic_string_view/typedefs

Re: [PATCH] OpenMP: Constructors and destructors for "declare target" static aggregates

2023-05-12 Thread Tobias Burnus
Hi Julian, hi all, (I have not (yet) looked at the patch/testcase in depth - and I prefer that someone knowledgeable with C++ constructors comments. However:) Regarding only nvptx - and the testcase on nvptx: On 12.05.23 14:02, Julian Brown wrote: The approach taken is to generate a set of con

Re: [PATCH] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread Robin Dapp via Gcc-patches
> emit_merge_op can not be wrapped into binop since mask position is > different in pattern. > > I prefer merge op in different wrapper. Yes, I didn't mean literally the same but that things already become a bit confusing with all the different variants and bool arguments or code duplication with

[PATCH] RISC-V: Improve vector_insn_info::dump for LMUL and policy

2023-05-12 Thread Kito Cheng via Gcc-patches
Convert vlmul and policy to human readable string, some example below: Before: [VALID,Demand field={1(VL),0(DEMAND_NONZERO_AVL),1(SEW),0(DEMAND_GE_SEW),1(LMUL),0(RATIO),0(TAIL_POLICY),0(MASK_POLICY)} AVL=(reg:DI 0 zero) SEW=16,VLMUL=3,RATIO=2,TAIL_POLICY=1,MASK_POLICY=1] ^

[committed v4] RISC-V: Optimize vsetvli of LCM INSERTED edge for user vsetvli [PR 109743]

2023-05-12 Thread Kito Cheng via Gcc-patches
V4 Changes: - Use different approach of V3. - Rewrite local_eliminate_vsetvl_insn to unify the optimization flow. - Also improve few more case. Off list discussed and reviewed by Ju-Zhe. --- This issue happens is because we are currently very conservative in opti

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Richard Biener via Gcc-patches
On Fri, 12 May 2023, Andre Vieira (lists) wrote: > I have dealt with, I think..., most of your comments. There's quite a few > changes, I think it's all a bit simpler now. I made some other changes to the > costing in tree-inline.cc and gimple-range-op.cc in which I try to preserve > the same beha

Re: [PATCH V6] VECT: Add decrement IV support in Loop Vectorizer

2023-05-12 Thread Richard Sandiford via Gcc-patches
"juzhe.zhong" writes: > Hi, Richard. For "can iterate more than once", is it correct use the > condition > "LOOP_LENS ().length >1". No, that says whether any LOAD_LENs or STORE_LENs operate on multiple vectors, rather than just single vectors. I meant: whether the vector loop body might

Re: [PATCH 1/3] Refactor to allow internal_fn's

2023-05-12 Thread Richard Biener via Gcc-patches
On Fri, 12 May 2023, Andre Vieira (lists) wrote: > Hi, > > I think I tackled all of your comments, let me know if I missed something. This first and the last patch look good to me now. Let me comment on the second. Thanks, Richard. > > gcc/ChangeLog: > > 2023-05-12 Andre Vieira >

Re: [Patch] LTO: Fix writing of toplevel asm with offloading [PR109816]

2023-05-12 Thread Richard Biener via Gcc-patches
On Fri, 12 May 2023, Tobias Burnus wrote: > Long standing issue but as top-level 'asm' statement were rare, it did not > show up. > However, the fix for PR108969 in commit r14-321-g9a41d2cdbcd added code > > +#elif defined(_GLIBCXX_SYMVER_GNU) > + __extension__ __asm (".globl _ZSt21ios_base_libr

Re: [PATCH] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread Robin Dapp via Gcc-patches
Hi, in general LGTM, just minor nits and comments. > - void set_len_and_policy (rtx len, bool force_vlmax = false) > -{ > - bool vlmax_p = force_vlmax; > - gcc_assert (has_dest); > + void set_len_and_policy (rtx len, bool force_vlmax = false, bool ta_p = > true, > +

[PATCH] tree-optimization/64731 - extend store-from CTOR lowering to TARGET_MEM_REF

2023-05-12 Thread Richard Biener via Gcc-patches
The following also covers TARGET_MEM_REF when decomposing stores from CTORs to supported elementwise operations. This avoids spilling and cleans up after vector lowering which doesn't touch loads or stores. It also mimics what we already do for loads. Bootstrapped and tested on x86_64-unknown-li

[Patch] LTO: Fix writing of toplevel asm with offloading [PR109816]

2023-05-12 Thread Tobias Burnus
Long standing issue but as top-level 'asm' statement were rare, it did not show up. However, the fix for PR108969 in commit r14-321-g9a41d2cdbcd added code +#elif defined(_GLIBCXX_SYMVER_GNU) + __extension__ __asm (".globl _ZSt21ios_base_library_initv"); q libstdc++-v3/include/std/iostream. Thi

[PATCH] ipa: Self-DCE of uses of removed call LHSs (PR 108007)

2023-05-12 Thread Martin Jambor
Hi, PR 108007 is another manifestation where we rely on DCE to clean-up after IPA-SRA and if the user explicitely switches DCE off, IPA-SRA can leave behind statements which are fed uninitialized values and trap, even though their results are themselves never used. I have already fixed this for u

[pushed] c++: robustify testcase [PR109752]

2023-05-12 Thread Patrick Palka via Gcc-patches
This rewrites the testcase for PR109752 to make it simpler and more robust (i.e. no longer dependent on r13-4035-gc41bbfcaf9d6ef). PR c++/109752 gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-pr109752.C: Rename to ... * g++.dg/cpp2a/concepts-complete4.C: ... this. Rewr

[pushed] c++: remove redundant testcase [PR83258]

2023-05-12 Thread Patrick Palka via Gcc-patches
I noticed only after the fact that the new testcase template/function2.C (from r14-708-gc3afdb8ba8f183) is just a subset of ext/visibility/anon8.C, so let's get rid of it. PR c++/83258 gcc/testsuite/ChangeLog: * g++.dg/ext/visibility/anon8.C: Mention PR83258. * g++.dg/tem

Re: [PATCH 3/3] Remove widen_plus/minus_expr tree codes

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
Moved the 'changes' from this patch back to the second so it's all just about removing code that we no longer use. I don't really know why Joel formatted the patches this way, but I thought I'd keep it as is for now. cover letter: This patch removes the old widen plus/minus tree codes which ha

Re: [PATCH 2/3] Refactor widen_plus as internal_fn

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
I have dealt with, I think..., most of your comments. There's quite a few changes, I think it's all a bit simpler now. I made some other changes to the costing in tree-inline.cc and gimple-range-op.cc in which I try to preserve the same behaviour as we had with the tree codes before. Also added

Re: [PATCH 1/3] Refactor to allow internal_fn's

2023-05-12 Thread Andre Vieira (lists) via Gcc-patches
Hi, I think I tackled all of your comments, let me know if I missed something. gcc/ChangeLog: 2023-05-12 Andre Vieira Joel Hutton * tree-vect-patterns.cc (vect_gimple_build): New Function. (vect_recog_widen_op_pattern): Refactor to use code_helper. * t

[PATCH] OpenMP: Constructors and destructors for "declare target" static aggregates

2023-05-12 Thread Julian Brown
This patch adds support for running constructors and destructors for static (file-scope) aggregates for C++ objects which are marked with "declare target" directives on OpenMP offload targets. At present, space is allocated on the target for such aggregates, but nothing ever constructs them proper

RE: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits

2023-05-12 Thread Li, Pan2 via Gcc-patches
Never minder. When preparing the PR, I am keeping ask myself that is everywhere about machine code bit size updated? Thus would like to align the bit size to one macro, to avoid developers (perhaps myself in future) suffering such kind of concern. Will try to move the machine mode to machmode.h

[PATCH] tree-optimization/109791 - simplify (unsigned)&foo - (unsigned)(&foo + o)

2023-05-12 Thread Richard Biener via Gcc-patches
The following adds another variant of address difference simplification. The utility ptr_difference_const only handles constant differences (we also cannot code generate anything else), so exposing a possible POINTER_PLUS_EXPR in the match and computing the difference on the base only makes it poss

Re: [PATCH V6] VECT: Add decrement IV support in Loop Vectorizer

2023-05-12 Thread Richard Sandiford via Gcc-patches
"juzhe.zhong" writes: > Thanks Richard. > I will do that as you suggested. I have a question for the first patch. How > to > enable decrement IV? Should I add a target hook or something to let target > decide whether enable decrement IV? At the moment, the only other targets that use IFN_LOAD_L

Re: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits

2023-05-12 Thread Richard Sandiford via Gcc-patches
"Li, Pan2 via Gcc-patches" writes: > Thanks Richard for comments. In previous, I am not sure it is reasonable to > let everywhere consume the same macro in rtl.h (As the includes you > mentioned). Thus, make a conservative change in PATCH v1. > > I will address the comments and try to align the

Re: [PATCH v3 3/4] ree: Main functionality to Improve ree pass for rs6000 target

2023-05-12 Thread Ajit Agarwal via Gcc-patches
Hello Jeff: On 29/04/23 3:40 am, Jeff Law wrote: > > > On 4/20/23 15:03, Ajit Agarwal wrote: > >> >> Currently I support AND with const1_rtx. This is what is equivalent to zero >> extension instruction in power instruction set. When you specify many other >> constants and Could you please sp

RE: [PATCH] Machine_Mode: Extend machine_mode from 8 to 16 bits

2023-05-12 Thread Li, Pan2 via Gcc-patches
Thanks Richard for comments. In previous, I am not sure it is reasonable to let everywhere consume the same macro in rtl.h (As the includes you mentioned). Thus, make a conservative change in PATCH v1. I will address the comments and try to align the bit size to the one and the only one macro s

Re: [PATCH V6] VECT: Add decrement IV support in Loop Vectorizer

2023-05-12 Thread Richard Sandiford via Gcc-patches
juzhe.zh...@rivai.ai writes: > From: Ju-Zhe Zhong > > 1. Fix document description according Jeff && Richard. > 2. Add LOOP_VINFO_USING_SELECT_VL_P for single rgroup. > 3. Add LOOP_VINFO_USING_SLP_ADJUSTED_LEN_P for SLP multiple rgroup. > > Fix bugs for V5 after testing: > https://gcc.gnu.org/piper

[PATCH] RISC-V: Using merge approach to optimize repeating sequence in vec_init

2023-05-12 Thread juzhe . zhong
From: Juzhe-Zhong Consider this following case: typedef int64_t vnx32di __attribute__ ((vector_size (256))); __attribute__ ((noipa)) void f_vnx32di (int64_t a, int64_t b, int64_t *out) { vnx32di v = {a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b, a, b

Re: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
On 5/12/23 12:17, Kyrylo Tkachov wrote: -Original Message- From: Christophe Lyon Sent: Friday, May 12, 2023 10:39 AM To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; Richard Earnshaw ; Richard Sandiford Cc: Christophe Lyon Subject: [PATCH 01/26] arm: [MVE intrinsics] add binary_wide

Re: [PATCH v2] libstdc++: Do not use pthread_mutex_clocklock with ThreadSanitizer

2023-05-12 Thread Jonathan Wakely via Gcc-patches
On Fri, 12 May 2023 at 11:30, Mike Crowe wrote: > On Thursday 11 May 2023 at 21:52:22 +0100, Jonathan Wakely wrote: > > On Thu, 11 May 2023 at 13:42, Jonathan Wakely > wrote: > > > > > > > > > > > On Thu, 11 May 2023 at 13:19, Mike Crowe wrote: > > > > > >> However, ... > > >> > > >> > > diff -

[PATCH v4] MIPS: add speculation_barrier support

2023-05-12 Thread YunQiang Su
speculation_barrier for MIPS needs sync+jr.hb (r2+), so we implement __speculation_barrier in libgcc, like arm32 does. gcc/ChangeLog: * config/mips/mips-protos.h (mips_emit_speculation_barrier): New prototype. * config/mips/mips.cc (speculation_barrier_libfunc): New static

Re: [PATCH v2] libstdc++: Do not use pthread_mutex_clocklock with ThreadSanitizer

2023-05-12 Thread Mike Crowe via Gcc-patches
On Thursday 11 May 2023 at 21:52:22 +0100, Jonathan Wakely wrote: > On Thu, 11 May 2023 at 13:42, Jonathan Wakely wrote: > > > > > > > On Thu, 11 May 2023 at 13:19, Mike Crowe wrote: > > > >> However, ... > >> > >> > > diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 > >> > > i

RE: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape

2023-05-12 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Christophe Lyon > Sent: Friday, May 12, 2023 10:39 AM > To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov ; > Richard Earnshaw ; Richard Sandiford > > Cc: Christophe Lyon > Subject: [PATCH 01/26] arm: [MVE intrinsics] add binary_widen_opt_n shape > > This patch

[PATCH v3] MIPS: add speculation_barrier support

2023-05-12 Thread YunQiang Su
speculation_barrier for MIPS needs sync+jr.hb (r2+), so we implement __speculation_barrier in libgcc, like arm32 does. gcc/ChangeLog: * config/mips/mips-protos.h (mips_emit_speculation_barrier): New prototype. * config/mips/mips.cc (speculation_barrier_libfunc): New static

[PATCH 26/26] arm: [MVE intrinsics] rework vsriq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vsriq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vsriq): New. * config/arm/arm-mve-builtins-base.def (vsriq): New. * config/arm/arm-mve-builtins-base.h (vsriq): New. * config/arm

[PATCH 16/26] arm: [MVE intrinsics] factorize vfmaq vfmsq vfmasq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vmvnq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/iterators.md (MVE_FP_M_BINARY): Add VFMAQ_M_F, VFMSQ_M_F. (MVE_FP_M_N_BINARY): Add VFMAQ_M_N_F, VFMASQ_M_N_F. (MVE_VFMxQ_F, MVE_VFMAxQ_N_F): New.

[PATCH 25/26] arm: [MVE intrinsics] factorize vsriq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vsriq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn): Add vsri. * config/arm/mve.md (mve_vsriq_n_): Rename into ... (@mve_q_n_): .,. this. (mve_vsriq_m_n_): Rename into ...

[PATCH 20/26] arm: [MVE intrinsics] rework vpselq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vpselq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vpselq): New. * config/arm/arm-mve-builtins-base.def (vpselq): New. * config/arm/arm-mve-builtins-base.h (vpselq): New. * config

[PATCH 17/26] arm: [MVE intrinsics] rework vfmaq vfmasq vfmsq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vfmaq, vfmasq, vfmsq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vfmaq, vfmasq, vfmsq): New. * config/arm/arm-mve-builtins-base.def (vfmaq, vfmasq, vfmsq): New. * config/arm/arm-mve-built

[PATCH 21/26] arm: [MVE intrinsics] add ternary_lshift shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
This patch adds the ternary_lshift shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (ternary_lshift): New. * config/arm/arm-mve-builtins-shapes.h (ternary_lshift): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 38 +++

[PATCH 14/26] arm: [MVE intrinsics] rework vmvnq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vmvnq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (FUNCTION_WITH_RTX_M_N_NO_F): New. (vmvnq): New. * config/arm/arm-mve-builtins-base.def (vmvnq): New. * config/arm/arm-mve

[PATCH 12/26] arm: [MVE intrinsics] add mvn shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
This patch adds the mvn shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (mvn): New. * config/arm/arm-mve-builtins-shapes.h (mvn): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 49 +++ gcc/config/arm/

[PATCH 18/26] arm: [MVE intrinsics] factorize vpselq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vpselq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm.cc (arm_expand_vcond): Use gen_mve_q instead of gen_mve_vpselq. * config/arm/iterators.md (MVE_VPSELQ_F): New. (mve_insn): Add vpsel.

[PATCH 24/26] arm: [MVE intrinsics] add ternary_rshift shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
This patch adds the ternary_rshift shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (ternary_rshift): New. * config/arm/arm-mve-builtins-shapes.h (ternary_rshift): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 38 +++

[PATCH 08/26] arm: [MVE intrinsics] rework vqshluq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vqshluq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vqshluq): New. * config/arm/arm-mve-builtins-base.def (vqshluq): New. * config/arm/arm-mve-builtins-base.h (vqshluq): New. * co

[PATCH 15/26] arm: [MVE intrinsics] add ternary_opt_n shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
This patch adds the ternary_opt_n shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (ternary_opt_n): New. * config/arm/arm-mve-builtins-shapes.h (ternary_opt_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 30 ++

[PATCH 13/26] arm: [MVE intrinsics] factorize vmvnq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vmvnq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn): Add vmvn. * config/arm/mve.md (mve_vmvnq_n_): Rename into ... (@mve_q_n_): ... this. (mve_vmvnq_m_): Rename into ...

[PATCH 23/26] arm: [MVE intrinsics] rework vsliq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Implement vsliq using the new MVE builtins framework. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vsliq): New. * config/arm/arm-mve-builtins-base.def (vsliq): New. * config/arm/arm-mve-builtins-base.h (vsliq): New. * config/arm

[PATCH 22/26] arm: [MVE intrinsics] factorize vsliq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vsliq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn>): Add vsli. * config/arm/mve.md (mve_vsliq_n_): Rename into ... (@mve_q_n_): ... this. (mve_vsliq_m_n_): Rename into ...

[PATCH 19/26] arm: [MVE intrinsics] add vpsel shape

2023-05-12 Thread Christophe Lyon via Gcc-patches
This patch adds the vpsel shape description. 2022-12-12 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (vpsel): New. * config/arm/arm-mve-builtins-shapes.h (vpsel): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 39 +++ gcc/confi

[PATCH 10/26] arm: [MVE intrinsics] factorize vrbsrq

2023-05-12 Thread Christophe Lyon via Gcc-patches
Factorize vrbsrq builtins so that they use parameterized names. 2022-12-12 Christophe Lyon gcc/ * config/arm/iterators.md (MVE_VBRSR_M_N_FP, MVE_VBRSR_N_FP): New. (mve_insn): Add vbrsr. * config/arm/mve.md (mve_vbrsrq_n_f): Rename into ... (@mve_q_n_f):

  1   2   >