Re: [RFC] tree-optimization: fix optimize-out variables passed into func to alloc

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, Jan 17, 2023 at 10:41 PM Andrew Pinski via Gcc-patches wrote: > > On Tue, Jan 17, 2023 at 7:36 AM Alexey Lapshin via Gcc-patches > wrote: > > > > After updating to GCC newer than 11.4.0 we found that some code started > > to fail if it was built with size optimization (-Os). > > You can

[PATCH] xtensa: Optimize inversion of the MSB

2023-01-17 Thread Takayuki 'January June' Suwa via Gcc-patches
Such operation can be done either bitwise-XOR or addition with -2147483648, but the latter is one byte less if TARGET_DENSITY. gcc/ChangeLog: * config/xtensa/xtensa.md (xorsi3_internal): Rename from the original of "xorsi3". (xorsi3): New expansion pattern that emits

[PATCH v2] xtensa: Eliminate unnecessary general-purpose reg-reg moves

2023-01-17 Thread Takayuki 'January June' Suwa via Gcc-patches
Register-register move instructions that can be easily seen as unnecessary by the human eye may remain in the compiled result. For example: /* example */ double test(double a, double b) { return __builtin_copysign(a, b); } test: add.n a3, a3, a3 extui a5, a5, 31, 1

[PATCH v3] xtensa: Eliminate the use of callee-saved register that saves and restores only once

2023-01-17 Thread Takayuki 'January June' Suwa via Gcc-patches
On 2023/01/17 20:23, Max Filippov wrote: > Hi Suwa-san, Hi! > There's still a few regressions in tests with -fcompare-debug because > code generated with -g and without it is different: > E.g. check the following test with -g0 and -g: Again debug_insn is the problem... = In the case of the

[PATCH] RISC-V: Finalize VSETVL PASS implementation

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (vsetvl_insn_p): Add condition to avoid ICE. (vsetvl_discard_result_insn_p): New function. (reg_killed_by_bb_p): rename to find_reg_killed_by. (find_reg_killed_by): New name. (get_vl):

[PATCH] RISC-V: Add :: for static function calling to avoid confusing

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong Since we have same function in class and static function calling get_avl. Adding :: to avoid codes confusing. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::get_backward_fusion_type): Add ::. --- gcc/config/riscv/riscv-vsetvl.cc | 2 +- 1 file

[PATCH] RISC-V: Refine function args of some functions.

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (gen_vsetvl_pat): Refine function args. (emit_vsetvl_insn): Ditto. --- gcc/config/riscv/riscv-vsetvl.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc

[PATCH v6] LoongArch: Fixed a compilation failure with '%c' in inline assembly [PR107731].

2023-01-17 Thread Lulu Cheng
Co-authored-by: Yang Yujie gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_classify_address): Add precessint for CONST_INT. (loongarch_print_operand_reloc): Operand modifier 'c' is supported. (loongarch_print_operand): Increase the processing of '%c'.

[PATCH] RISC-V: Fix bug of before_p function

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (before_p): Fix bug. --- gcc/config/riscv/riscv-vsetvl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index

[PATCH] RISC-V: Change parse_insn into public for future use.

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.h: Change it into public. --- gcc/config/riscv/riscv-vsetvl.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.h b/gcc/config/riscv/riscv-vsetvl.h index

[PATCH] RISC-V: Reorder VSETVL PASS location

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-passes.def (INSERT_PASS_BEFORE): Reorder VSETVL PASS. --- gcc/config/riscv/riscv-passes.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/riscv/riscv-passes.def

[PATCH] RISC-V: Clang-format some annotations[NFC]

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: Clang-format. --- gcc/config/riscv/riscv-vsetvl.cc | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv-vsetvl.cc b/gcc/config/riscv/riscv-vsetvl.cc index

[PATCH] RISC-V: Remove DCE in VSETVL PASS

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pass_vsetvl::done): Remove DCE. * config/riscv/t-riscv: Ditto. --- gcc/config/riscv/riscv-vsetvl.cc | 2 -- gcc/config/riscv/t-riscv | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

[PATCH] RISC-V: Change VSETVL PASS always call split_all_insns

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong Since LCM will destroy CFG, we are going to reorder the location of VSETVL PASS at least before bbro (block-reorder PASS) which is before split3 PASS. We need to call it in VSETVL PASS to get final RVV instructions patterns. gcc/ChangeLog: *

[PATCH] RISC-V: Fix incorrect attributes of vsetvl instructions pattern

2023-01-17 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/vector.md: Fix incorrect attributes. --- gcc/config/riscv/vector.md | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md index

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread 丁乐华
I don't think this pattern is correct, because SEL isn't commutative in the vector operands. Indeed, I think I should invert PRED operand or the comparison operatorwhich produce the PRED operand first. I think this should be: if (...) to = XEXP (to, 0); and should be before the REG_P

[PATCH] riscv: generate builtin macro for compilation with strict alignment

2023-01-17 Thread Vineet Gupta
This could be useful for library writers who want to write code variants for fast vs. slow unaligned accesses. We distinguish explicit -mstrict-align (1) vs. slow_unaligned_access cpu tune param (2) for even more code divesity. gcc/ChangeLog: * config/riscv-c.cc

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread Jeff Law via Gcc-patches
On 1/17/23 09:00, Richard Sandiford via Gcc-patches wrote: But the idea of the fwprop change looks OK to me in principle. What we have now seems conservative, based on heuristics that haven't been updated in a long time. So relaxing them a bit seems like a good idea. IIRC Jeff had another

Re: [RFC] tree-optimization: fix optimize-out variables passed into func to alloc

2023-01-17 Thread Andrew Pinski via Gcc-patches
On Tue, Jan 17, 2023 at 7:36 AM Alexey Lapshin via Gcc-patches wrote: > > After updating to GCC newer than 11.4.0 we found that some code started > to fail if it was built with size optimization (-Os). > You can find testsuite for reproduction in the attached patch. > > The simplified version

Re: [PATCH] libstdc++: testsuite: Simplify codecvt_unicode

2023-01-17 Thread Jonathan Wakely via Gcc-patches
On Tue, 17 Jan 2023, 21:12 Dimitrij Mijoski via Libstdc++, < libstd...@gcc.gnu.org> wrote: > Stop using unique_ptr, create some objects directly. > Thanks, I thought about suggesting this, but decided it was good enough. But I'm glad to see the simplifications :-) I'll get this committed. >

[committed] wwwdocs: gcc-4.7: Adjust www.open-std.org links to https

2023-01-17 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/gcc-4.7/cxx0x_status.html | 122 +++ 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/htdocs/gcc-4.7/cxx0x_status.html b/htdocs/gcc-4.7/cxx0x_status.html index af6a2ef8..19507d25 100644 --- a/htdocs/gcc-4.7/cxx0x_status.html

[committed] wwwdocs: rsync: Remove trailing slash from tags

2023-01-17 Thread Gerald Pfeifer
Last such occurrence in the tree - gone now. Gerald --- htdocs/rsync.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/rsync.html b/htdocs/rsync.html index e206f0b4..264ea2af 100644 --- a/htdocs/rsync.html +++ b/htdocs/rsync.html @@ -3,8 +3,8 @@ - - + +

[PATCH] libstdc++: testsuite: Simplify codecvt_unicode

2023-01-17 Thread Dimitrij Mijoski via Gcc-patches
Stop using unique_ptr, create some objects directly. libstdc++-v3/ChangeLog: * testsuite/22_locale/codecvt/codecvt_unicode.cc: Simplify. * testsuite/22_locale/codecvt/codecvt_unicode.h: Simplify. * testsuite/22_locale/codecvt/codecvt_unicode_wchar_t.cc: Simplify. ---

Re: [PATCH/RFC] rs6000: Remove optimize_for_speed check for implicit TARGET_SAVE_TOC_INDIRECT [PR108184]

2023-01-17 Thread Michael Meissner via Gcc-patches
On Tue, Jan 17, 2023 at 03:57:24PM -0500, Michael Meissner wrote: > So I have objection to the change. I suspect it may be better with a check > for > just optimize either for speed or size, and not for speed. Sigh. I meant I have NO objection to the change. Sorry about that. -- Michael

Re: [PATCH/RFC] rs6000: Remove optimize_for_speed check for implicit TARGET_SAVE_TOC_INDIRECT [PR108184]

2023-01-17 Thread Michael Meissner via Gcc-patches
On Mon, Jan 16, 2023 at 05:39:04PM +0800, Kewen.Lin wrote: > Hi, > > Now we will check optimize_function_for_speed_p (cfun) for > TARGET_SAVE_TOC_INDIRECT if it's implicitly enabled. But > the effect of -msave-toc-indirect is actually to save the > TOC in the prologue for indirect calls rather

Re: [PATCH] libgcc: Fix uninitialized RA signing on AArch64 [PR107678]

2023-01-17 Thread Richard Sandiford via Gcc-patches
Wilco Dijkstra writes: > Hi, > >> @Wilco, can you please send the rebased patch for patch review? We would >> need in out openSUSE package soon. > > Here is an updated and rebased version: > > Cheers, > Wilco > > v4: rebase and add REG_UNSAVED_ARCHEXT. > > A recent change only initializes the

Re: [PATCH] libgcc: Fix uninitialized RA signing on AArch64 [PR107678]

2023-01-17 Thread Wilco Dijkstra via Gcc-patches
Hi, > @Wilco, can you please send the rebased patch for patch review? We would > need in out openSUSE package soon. Here is an updated and rebased version: Cheers, Wilco v4: rebase and add REG_UNSAVED_ARCHEXT. A recent change only initializes the regs.how[] during Dwarf unwinding which

Re: [PATCH] c++: Define built-in for std::tuple_element [PR100157]

2023-01-17 Thread Jason Merrill via Gcc-patches
On 1/9/23 14:25, Patrick Palka via Gcc-patches wrote: On Mon, 9 Jan 2023, Patrick Palka wrote: On Wed, 5 Oct 2022, Patrick Palka wrote: On Thu, 7 Jul 2022, Jonathan Wakely via Gcc-patches wrote: This adds a new built-in to replace the recursive class template instantiations done by traits

Re: [PATCH] tree-optimization/104475 - bogus -Wstringop-overflow

2023-01-17 Thread Jason Merrill via Gcc-patches
On 12/7/22 06:25, Richard Biener wrote: The following avoids a bogus -Wstringop-overflow diagnostic by properly recognizing that >m_mutex cannot be nullptr in C++ even if m_mutex is at offset zero. The frontend already diagnoses a >m_mutex != nullptr comparison and the following transfers this

[PATCH] modula-2, testsuite: Make libs and interfaces consistent.

2023-01-17 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-linux-gnu (with a 32b multilib), powerpc, i686 and x86_64-darwin. OK for trunk? thanks, Iain --- 8< --- In some case the libraries list was being set before gm2_init_xxx was called. In some cases it was omitted - this could lead to a difference between the link libs and the

Re: [PATCH] testsuite: Skip intrinsics test if arm

2023-01-17 Thread Richard Earnshaw via Gcc-patches
On 15/01/2023 17:06, Torbjorn SVENSSON via Gcc-patches wrote: On 2023-01-12 16:03, Richard Earnshaw wrote: On 19/09/2022 17:16, Torbjörn SVENSSON via Gcc-patches wrote: In the test case, it's clearly written that intrinsics is not implemented on arm*. A simple xfail does not help since

Go patch committed: Define builtin functions

2023-01-17 Thread Ian Lance Taylor via Gcc-patches
This patch by Andrew Pinski defines two builtin functions that are used by the middle-end. This fixes PR 108426. Bootstrapped and tested on x86_64-pc-linux-gnu. Committed to mainline. Ian PR go/108426 * go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_ctzl and

[PATCH] modula-2, driver, Front end: Revise handling of I and L paths [PR108182].

2023-01-17 Thread Iain Sandoe via Gcc-patches
Tested on x86_64-linux-gnu (with a 32b multilib), powerpc, i686 and x86_64-darwin. OK for trunk? thanks, Iain --- 8< --- The adds the includes in the FE as done in other GCC languages. It also revises the library handling to avoid additional -L options from hiding LIBDIR. For the

[COMMITTED] bpf: disable -fstack-protector in BPF

2023-01-17 Thread Jose E. Marchesi via Gcc-patches
The stack protector is not supported in BPF. This patch disables -fstack-protector in bpf-* targets, along with the emission of a note indicating that the feature is not supported in this platform. Regtested in bpf-unknown-none. gcc/ChangeLog: * config/bpf/bpf.cc (bpf_option_override):

Re: [PATCH 1/1] [fwprop]: Add the support of forwarding the vec_duplicate rtx

2023-01-17 Thread Richard Sandiford via Gcc-patches
lehua.d...@rivai.ai writes: > From: Lehua Ding > > ps: Resend for adjusting the width of each line of text. > > Hi, > > When I was adding the new RISC-V auto-vectorization function, I found that > converting `vector-reg1 vop vector-vreg2` to `scalar-reg3 vop vectorreg2` > is not very easy to

Re: gcc-13/changes.html: Mention -fstrict-flex-arrays and its impact

2023-01-17 Thread Qing Zhao via Gcc-patches
Thanks for the comment. I just committed the following: >From fc681f5412c421ff9609aea448310106d2570fd5 Mon Sep 17 00:00:00 2001 From: Qing Zhao Date: Tue, 17 Jan 2023 15:52:15 + Subject: [PATCH] gcc13/changes: update id 'flexible array' to 'flexible-arrays' since ids must not contain

Re: [PATCH] contrib: Partial fix for failed update-copyright --this year [PR108413]

2023-01-17 Thread Gaius Mulley via Gcc-patches
Jakub Jelinek writes: > Hi! > > As mentioned on IRC or in PR108413, the last update-copyright.py --this year > failed and that is why we are in a strange state where some copyrights have > been updated and others have not. > The full list of errors I got was I think: >

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> > We don't use same argumentation about other control flow statements. > > The following: > > > > fn() > > { > > try { > > i_read_no_global_memory (); > > } catch (...) > > { > > reutrn 1; > > } > > return 0; > > } > > > > should be detected as const. Marking throw pure

[RFC] tree-optimization: fix optimize-out variables passed into func to alloc

2023-01-17 Thread Alexey Lapshin via Gcc-patches
After updating to GCC newer than 11.4.0 we found that some code started to fail if it was built with size optimization (-Os). You can find testsuite for reproduction in the attached patch. The simplified version affected code looks like this: void alloc_function (unsigned char **data_p) {

Re: [PATCH v5] LoongArch: Fixed a compilation failure with '%c' in inline assembly [PR107731].

2023-01-17 Thread Richard Sandiford via Gcc-patches
Lulu Cheng writes: > Co-authored-by: Yang Yujie > > gcc/ChangeLog: > > * config/loongarch/loongarch.cc (loongarch_classify_address): > Add precessint for CONST_INT. > (loongarch_print_operand_reloc): Operand modifier 'c' is supported. > (loongarch_print_operand): Increase

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > > > The following fixes a long-standing bug with DSE removing stores as > > > > dead even though they are live across non-call exceptional flow. > > > > This affects both GIMPLE and RTL DSE and the fix is

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> On Tue, 17 Jan 2023, Jan Hubicka wrote: > > > > The following fixes a long-standing bug with DSE removing stores as > > > dead even though they are live across non-call exceptional flow. > > > This affects both GIMPLE and RTL DSE and the fix is similar in > > > making externally throwing

[committed] libstdc++: Fix configuration of default zoneinfo dir on linux

2023-01-17 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux. Pushed to trunk. -- >8 -- The config for --with-libstdcxx-zoneinfo=yes was comparing the target triplet to "gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu" which is only the last component of the triplet, so failed to match and always used the zoneinfo_dir=none default. Check

Re: [PATCH,WWWDOCS] htdocs: add an Atom feed for GCC news

2023-01-17 Thread Arsen Arsenović via Gcc-patches
Hi, "Jose E. Marchesi via Gcc-patches" writes: > Yeah I guess it all depends on how much the news section is used. > > I personally think that it would be beneficial for the different GCC > projects (front-ends, back-ends, etc) to be a little more vocal, public > wise. Releasing news items

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jan Hubicka wrote: > > The following fixes a long-standing bug with DSE removing stores as > > dead even though they are live across non-call exceptional flow. > > This affects both GIMPLE and RTL DSE and the fix is similar in > > making externally throwing statements uses of

Re: [PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Jan Hubicka via Gcc-patches
> The following fixes a long-standing bug with DSE removing stores as > dead even though they are live across non-call exceptional flow. > This affects both GIMPLE and RTL DSE and the fix is similar in > making externally throwing statements uses of non-local stores. > Note this doesn't fix the

Re: [PATCH (pushed)] Ignore test_patches.txt in update-copyright.py.

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 02:02:42PM +0100, Martin Liška wrote: > contrib/ChangeLog: > > * update-copyright.py: Ignore test_patches.txt. LGTM. > diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py > index ac7a94743cf..f3691dc11cc 100755 > --- a/contrib/update-copyright.py

[PATCH (pushed)] Ignore test_patches.txt in update-copyright.py.

2023-01-17 Thread Martin Liška
contrib/ChangeLog: * update-copyright.py: Ignore test_patches.txt. --- contrib/update-copyright.py | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py index ac7a94743cf..f3691dc11cc 100755 --- a/contrib/update-copyright.py +++

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-17 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > Hi Richard, > For the following (contrived) test: > > void foo(int32x4_t v) > { > v[3] = 0; > return v; > } > > -O2 code-gen: > foo: > fmovs1, wzr > ins v0.s[3], v1.s[0] > ret > > I suppose we can instead emit the following

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-17 Thread Christophe Lyon via Gcc-patches
On 1/17/23 13:48, Jakub Jelinek wrote: On Tue, Jan 17, 2023 at 01:43:35PM +0100, Christophe Lyon wrote: As a follow-up to this, I ran the full testsuite with -fstack-protector-all and this results in lots of failures (~65000 in gcc.sum alone). I guess that is way too much. Since you also

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 01:43:35PM +0100, Christophe Lyon wrote: > As a follow-up to this, I ran the full testsuite with -fstack-protector-all > and this results in lots of failures (~65000 in gcc.sum alone). I guess that is way too much. > Since you also mentioned -fstack-protector-strong, I

Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]

2023-01-17 Thread Christophe Lyon via Gcc-patches
Hi Jakub, On 1/15/23 17:54, Christophe Lyon via Gcc-patches wrote: Hi! On 1/13/23 16:38, Jakub Jelinek wrote: On Wed, Jan 11, 2023 at 03:18:06PM +0100, Christophe Lyon via Gcc-patches wrote: While working on enabling DFP for AArch64, I noticed new failures in

Re: [PATCH (pushed)] contrib: revert removal of CR character

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 12:56:32PM +0100, Martin Liška wrote: > contrib/ChangeLog: > > * gcc-changelog/test_patches.txt: The CR character was removed > with ./contrib/update-copyright.py which I'm going to change. We shouldn't be updating that file at all IMHO, shouldn't it be listed

[PATCH] contrib: ignore CR in update-copyright.py

2023-01-17 Thread Martin Liška
When opening files, preserve CR characters. By default, open accepts universal newlines, but I think we should only split with '\n'. Ready to be installed? Thanks, Martin contrib/ChangeLog: * update-copyright.py: Split lines only with '\n'. --- contrib/update-copyright.py | 4 ++-- 1

[PATCH (pushed)] contrib: revert removal of CR character

2023-01-17 Thread Martin Liška
contrib/ChangeLog: * gcc-changelog/test_patches.txt: The CR character was removed with ./contrib/update-copyright.py which I'm going to change. --- contrib/gcc-changelog/test_patches.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

Re: Extend fold_vec_perm to fold VEC_PERM_EXPR in VLA manner

2023-01-17 Thread Prathamesh Kulkarni via Gcc-patches
On Mon, 26 Dec 2022 at 09:56, Prathamesh Kulkarni wrote: > > On Tue, 13 Dec 2022 at 11:35, Prathamesh Kulkarni > wrote: > > > > On Tue, 6 Dec 2022 at 21:00, Richard Sandiford > > wrote: > > > > > > Prathamesh Kulkarni via Gcc-patches writes: > > > > On Fri, 4 Nov 2022 at 14:00, Prathamesh

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Aldy Hernandez via Gcc-patches
On 1/17/23 12:33, Jakub Jelinek wrote: On Tue, Jan 17, 2023 at 12:22:42PM +0100, Aldy Hernandez wrote: On 1/17/23 12:19, Jakub Jelinek wrote: On Tue, Jan 17, 2023 at 12:14:14PM +0100, Aldy Hernandez wrote: A question would be if it would be worth to activate it in this spot lazily if it

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 12:22:42PM +0100, Aldy Hernandez wrote: > > > On 1/17/23 12:19, Jakub Jelinek wrote: > > On Tue, Jan 17, 2023 at 12:14:14PM +0100, Aldy Hernandez wrote: > > > > A question would be if it would be worth to activate it in this spot > > > > lazily > > > > if it isn't active

Re: [PATCH v2] xtensa: Eliminate the use of callee-saved register that saves and restores only once

2023-01-17 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Mon, Jan 16, 2023 at 8:12 PM Takayuki 'January June' Suwa wrote: > > In the case of the CALL0 ABI, values that must be retained before and > after function calls are placed in the callee-saved registers (A12 > through A15) and referenced later. However, it is often the case that

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Aldy Hernandez via Gcc-patches
On 1/17/23 12:19, Jakub Jelinek wrote: On Tue, Jan 17, 2023 at 12:14:14PM +0100, Aldy Hernandez wrote: A question would be if it would be worth to activate it in this spot lazily if it isn't active yet (and destruct at the end of the pass). That's what it was designed for :). If you're

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 12:14:14PM +0100, Aldy Hernandez wrote: > > A question would be if it would be worth to activate it in this spot lazily > > if it isn't active yet (and destruct at the end of the pass). > > That's what it was designed for :). If you're making sporadic requests, the >

[PATCH (pushed)] Regenerate Makefile.in files.

2023-01-17 Thread Martin Liška
libbacktrace/ChangeLog: * Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. libphobos/ChangeLog: * Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. libstdc++-v3/ChangeLog: *

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Aldy Hernandez via Gcc-patches
On 1/17/23 12:09, Jakub Jelinek wrote: On Tue, Jan 17, 2023 at 11:59:53AM +0100, Aldy Hernandez wrote: On 1/17/23 10:47, Jakub Jelinek wrote: Aldy/Andrew, is the ranger query ok or should I use something different when check_range_stmt is non-NULL and I know on which statement to ask?

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Jakub Jelinek via Gcc-patches
On Tue, Jan 17, 2023 at 11:59:53AM +0100, Aldy Hernandez wrote: > > > On 1/17/23 10:47, Jakub Jelinek wrote: > > > Aldy/Andrew, is the ranger query ok or should I use something different > > when check_range_stmt is non-NULL and I know on which statement to ask? > > > > > + int_range_max

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, 17 Jan 2023, Jakub Jelinek wrote: > Hi! > > The comment above simplify_rotate roughly describes what patterns > are matched into what: >We are looking for X with unsigned type T with bitsize B, OP being >+, | or ^, some type T2 wider than T. For: >(X << CNT1) OP (X >> CNT2)

Re: [PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Aldy Hernandez via Gcc-patches
On 1/17/23 10:47, Jakub Jelinek wrote: Aldy/Andrew, is the ranger query ok or should I use something different when check_range_stmt is non-NULL and I know on which statement to ask? + int_range_max r; + if (!get_global_range_query ()->range_of_expr (r, rotcnt, +

[aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-17 Thread Prathamesh Kulkarni via Gcc-patches
Hi Richard, For the following (contrived) test: void foo(int32x4_t v) { v[3] = 0; return v; } -O2 code-gen: foo: fmovs1, wzr ins v0.s[3], v1.s[0] ret I suppose we can instead emit the following code-gen ? foo: ins v0.s[3], wzr ret combine produces:

RE: [PATCH] AArch64: Gate various crypto intrinsics availability based on features

2023-01-17 Thread Kyrylo Tkachov via Gcc-patches
Hi Tejas, > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Tejas Belagod > via Gcc-patches > Sent: Monday, January 16, 2023 7:12 AM > To: gcc-patches@gcc.gnu.org > Cc: Tejas Belagod ; Richard Sandiford > ; Richard Earnshaw > > Subject:

[PATCH] middle-end/106075 - non-call EH and DSE

2023-01-17 Thread Richard Biener via Gcc-patches
The following fixes a long-standing bug with DSE removing stores as dead even though they are live across non-call exceptional flow. This affects both GIMPLE and RTL DSE and the fix is similar in making externally throwing statements uses of non-local stores. Note this doesn't fix the GIMPLE side

Re: [PATCH,WWWDOCS] htdocs: add an Atom feed for GCC news

2023-01-17 Thread Jose E. Marchesi via Gcc-patches
> On Wed, 11 Jan 2023, Thomas Schwinge wrote: >> On 2022-12-23T10:50:13+0100, "Jose E. Marchesi via Gcc-patches" >> wrote: >>> This patch adds an Atom feed for GCC news, which can then be easily >>> aggregated in other sites, such as the GNU planet >>> (https://planet.gnu.org). >> I

Re: [PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris

2023-01-17 Thread Richard Biener via Gcc-patches
On Tue, Jan 17, 2023 at 9:58 AM Rainer Orth wrote: > > When using GNU ld on Solaris, a large number of asan tests SEGV, while > Solaris ld is fine. This happens inside the __tls_get_addr interceptor, > which is highly glibc-specific. Therefore this patch disables that > interceptor. > > Posted

[PATCH] forwprop: Fix up rotate pattern matching [PR106523]

2023-01-17 Thread Jakub Jelinek via Gcc-patches
Hi! The comment above simplify_rotate roughly describes what patterns are matched into what: We are looking for X with unsigned type T with bitsize B, OP being +, | or ^, some type T2 wider than T. For: (X << CNT1) OP (X >> CNT2) iff CNT1 + CNT2 == B ((T)

Re: [PATCH][2/n] LTO option handling/merging rewrite

2023-01-17 Thread Andreas Schwab via Gcc-patches
On Nov 02 2011, Richard Guenther wrote: > lto/ > * lto-lang.c (lto_post_options): Do not read file options. > * lto.c (lto_read_all_file_options): Remove. This fails to update the documentation. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9

Re: [PATCH,WWWDOCS] htdocs: add an Atom feed for GCC news

2023-01-17 Thread Gerald Pfeifer
On Fri, 23 Dec 2022, Jose E. Marchesi via Gcc-patches wrote: > This patch adds an Atom feed for GCC news I was going to approve, would like to see a bit consensus with others though. For now some review: > I recommend switching the two notes. The one on the feed feels more important since

Re: [PATCH,WWWDOCS] htdocs: add an Atom feed for GCC news

2023-01-17 Thread Gerald Pfeifer
On Wed, 11 Jan 2023, Thomas Schwinge wrote: > On 2022-12-23T10:50:13+0100, "Jose E. Marchesi via Gcc-patches" > wrote: >> This patch adds an Atom feed for GCC news, which can then be easily >> aggregated in other sites, such as the GNU planet >> (https://planet.gnu.org). > I absolutely agree

[PATCH] libsanitizer: Fix asan SEGVs with gld on Solaris

2023-01-17 Thread Rainer Orth
When using GNU ld on Solaris, a large number of asan tests SEGV, while Solaris ld is fine. This happens inside the __tls_get_addr interceptor, which is highly glibc-specific. Therefore this patch disables that interceptor. Posted upstream at https://reviews.llvm.org/D141385. Tested on

Re: [PATCH] ada: Respect GNATMAKE

2023-01-17 Thread Arnaud Charlet via Gcc-patches
> Use the GNATMAKE variables consistently. > Avoids failures when bootstraping with a custom GNATMAKE value. > > gcc/ada/ChangeLog: > >* Make-generated.in: Use GNATMAKE. >* gcc-interface/Makefile.in: Ditto. Ok, thanks. > Signed-off-by: Peter Foley > --- > gcc/ada/Make-generated.in

Re: [PATCH] xtensa: Eliminate unnecessary general-purpose reg-reg moves

2023-01-17 Thread Max Filippov via Gcc-patches
Hi Suwa-san, On Mon, Jan 16, 2023 at 8:54 PM Takayuki 'January June' Suwa wrote: > > Register-register move instructions that can be easily seen as > unnecessary by the human eye may remain in the compiled result. > For example: > > /* example */ > double test(double a, double b) { > return