Re: [PATCH] MATCH: Port CLRSB part of builtin_zero_pattern

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 5:24 AM Richard Biener via Gcc-patches wrote: > > On Sun, Apr 30, 2023 at 11:13 PM Andrew Pinski via Gcc-patches > wrote: > > > > This ports the clrsb builtin part of builtin_zero_pattern > > to match.pd. A simple pattern to port. > > > > OK? Bootstrapped and tested on x86_

Re: [committed] Convert xstormy16 to LRA

2023-05-02 Thread Segher Boessenkool
Hi! On Tue, May 02, 2023 at 05:20:49PM +0100, Roger Sayle wrote: > On 02 May 2023 14:49, Segher Boessenkool wrote: > Then combine inserts an additional copy: Combine makes sure a pseudo-to-pseudo move remains. Without that, combine will seize part of RA's job, and butcher it. It has always done

Re: [PATCH v4 4/4] ree: Improve ree pass for rs6000 target using defined ABI interfaces.

2023-05-02 Thread Peter Bergner via Gcc-patches
On 4/28/23 6:49 PM, Hans-Peter Nilsson wrote: > On Fri, 28 Apr 2023, Jeff Law wrote: >> So while what Ajit has done is a step forward, at some point the actual >> details of the ABI need to be described in a way that can be checked and >> consumed by REE. > > IIRC I also commented and suggested a

Re: [PATCH] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 5:26 AM Richard Biener via Gcc-patches wrote: > > On Sun, Apr 30, 2023 at 11:14 PM Andrew Pinski via Gcc-patches > wrote: > > > > While looking at differences between what minmax_replacement > > and match_simplify_replacement does. I noticed that they sometimes > > chose di

Re: [PATCH, V4] PR target/105325, Make load/cmp fusion know about prefixed loads.

2023-05-02 Thread Segher Boessenkool
On Wed, Apr 26, 2023 at 12:18:36PM -0400, Michael Meissner wrote: > * gcc/config/rs6000/genfusion.pl (gen_ld_cmpi_p10): Improve generation > of the ld and lwa instructions which use the DS encoding instead of D. > Use the YZ constraint for these loads. Handle prefixed loads bette

[pushed] c++: simplify member template substitution

2023-05-02 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- I noticed that for member class templates of a class template we were unnecessarily substituting both the template and its type. Avoiding that duplication speeds compilation of this silly testcase from ~12s to ~9s on my laptop. It's unlike

[PATCH] c++: wrong std::is_convertible with cv-qual fn [PR109680]

2023-05-02 Thread Marek Polacek via Gcc-patches
This PR points out that std::is_convertible has given the wrong answer in static_assert (!std::is_convertible_v , ""); since r13-2822 implemented __is_{,nothrow_}convertible. std::is_convertible uses the imaginary To test() { return std::declval(); } to do its job. Here, From is 'int () c

[PATCH] Add stats to simple_dce_from_worklist

2023-05-02 Thread Andrew Pinski via Gcc-patches
While looking to move substitute_and_fold_engine over to use simple_dce_from_worklist, I noticed that we don't record the stats of the removed stmts/phis. So this does that. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-dce.cc (simple_dce_from_worklist): Reco

Re: [PATCH] RISC-V: fix build issue with gcc 4.9.x

2023-05-02 Thread Kito Cheng via Gcc-patches
> >>> Pushed to trunk, thanks for catching that, that's definitely should > >>> use log2 no matter C++03 or C++11, > >>> but I think GCC allows the usage of C++11 according to > >>> https://gcc.gnu.org/install/prerequisites.html :P > >> Yes, we should be able to use C++11. I'd like to get that to

Re: [PATCH] RISC-V: fix build issue with gcc 4.9.x

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 5:38 PM Kito Cheng via Gcc-patches wrote: > > > >>> Pushed to trunk, thanks for catching that, that's definitely should > > >>> use log2 no matter C++03 or C++11, > > >>> but I think GCC allows the usage of C++11 according to > > >>> https://gcc.gnu.org/install/prerequisites

[PATCH v2 0/1] Set _M_string_length before calling _M_dispose()

2023-05-02 Thread Kefu Chai via Gcc-patches
Hi Jonathan, Thank you for your review and suggestion. The change looks great! Assigning a value with an immediate zero is indeed much faster. in v2: * revised the commit message a little bit, I found it a little bit difficult to parse when re-reading it. * associated the commit with PR/libstd

[PATCH v2 1/1] libstdc++: Set _M_string_length before calling _M_dispose() [PR109703]

2023-05-02 Thread Kefu Chai via Gcc-patches
This patch always sets _M_string_length in the constructor specialized for range of input_iterator, for the cases like istringstream. We copy from source range to the local buffer, and then reallocate to a larger one if necessary. When disposing the old buffer, the old buffer could be provisioned

[PATCH 1/2] Factor out copy_phi_args from gimple_duplicate_sese_tail and remove_forwarder_block.

2023-05-02 Thread Andrew Pinski via Gcc-patches
While improving replace_phi_edge_with_variable for the diamond formed bb case, I needed a new function, copy_phi_args and then I went to search for similar code and noticed both gimple_duplicate_sese_tail and remove_forwarder_block have the same code I need. So I decided it would be best if I facto

[PATCH 2/2] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Andrew Pinski via Gcc-patches
While looking at differences between what minmax_replacement and match_simplify_replacement does. I noticed that they sometimes chose different edges to remove. I decided we should be able to do better and be able to remove both empty basic blocks in the case of match_simplify_replacement as that m

[pushed] c++: fix TTP level reduction cache

2023-05-02 Thread Jason Merrill via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We try to cache the result of reduce_template_parm_level so that when we reduce the same parm multiple times we get the same result, but this wasn't working for template template parms because in that case TYPE is a TEMPLATE_TEMPLATE_PARM, a

Re: [PATCH] do not tailcall __sanitizer_cov_trace_pc [PR90746]

2023-05-02 Thread Richard Biener via Gcc-patches
On Tue, May 2, 2023 at 4:45 PM Alexander Monakov via Gcc-patches wrote: > > When instrumentation is requested via -fsanitize-coverage=trace-pc, GCC > emits calls to __sanitizer_cov_trace_pc callback into each basic block. > This callback is supposed to be implemented by the user, and should be > a

Re: [PATCH] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Richard Biener via Gcc-patches
On Wed, May 3, 2023 at 12:04 AM Andrew Pinski wrote: > > On Tue, May 2, 2023 at 5:26 AM Richard Biener via Gcc-patches > wrote: > > > > On Sun, Apr 30, 2023 at 11:14 PM Andrew Pinski via Gcc-patches > > wrote: > > > > > > While looking at differences between what minmax_replacement > > > and mat

Re: [PATCH] Add stats to simple_dce_from_worklist

2023-05-02 Thread Richard Biener via Gcc-patches
On Wed, May 3, 2023 at 1:15 AM Andrew Pinski via Gcc-patches wrote: > > While looking to move substitute_and_fold_engine > over to use simple_dce_from_worklist, I noticed > that we don't record the stats of the removed stmts/phis. > So this does that. > > OK? Bootstrapped and tested on x86_64-linu

Re: [PATCH] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 11:14 PM Richard Biener wrote: > > On Wed, May 3, 2023 at 12:04 AM Andrew Pinski wrote: > > > > On Tue, May 2, 2023 at 5:26 AM Richard Biener via Gcc-patches > > wrote: > > > > > > On Sun, Apr 30, 2023 at 11:14 PM Andrew Pinski via Gcc-patches > > > wrote: > > > > > > > >

Re: [committed] RISCV: Inline subword atomic ops

2023-05-02 Thread Jeff Law via Gcc-patches
On 5/2/23 14:34, Patrick O'Neill wrote: Is this OK for a backport to GCC-13 as well? Let me sync with Richi & Jakub. They're the release managers and this doesn't fall under the usual rules for things that can be backported. jeff

Re: [PATCH] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Jeff Law via Gcc-patches
On 5/3/23 00:27, Andrew Pinski via Gcc-patches wrote: On Tue, May 2, 2023 at 11:14 PM Richard Biener wrote: On Wed, May 3, 2023 at 12:04 AM Andrew Pinski wrote: On Tue, May 2, 2023 at 5:26 AM Richard Biener via Gcc-patches wrote: On Sun, Apr 30, 2023 at 11:14 PM Andrew Pinski via Gcc-

Re: [PATCH] PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb

2023-05-02 Thread Andrew Pinski via Gcc-patches
On Tue, May 2, 2023 at 11:36 PM Jeff Law wrote: > > > > On 5/3/23 00:27, Andrew Pinski via Gcc-patches wrote: > > On Tue, May 2, 2023 at 11:14 PM Richard Biener > > wrote: > >> > >> On Wed, May 3, 2023 at 12:04 AM Andrew Pinski wrote: > >>> > >>> On Tue, May 2, 2023 at 5:26 AM Richard Biener via

Re: [PATCH] Add emulated scatter capability to the vectorizer

2023-05-02 Thread Richard Biener via Gcc-patches
On Tue, 2 May 2023, Christophe Lyon wrote: > Hi Richard, > > On Fri, 28 Apr 2023 at 14:41, Richard Biener via Gcc-patches < > gcc-patches@gcc.gnu.org> wrote: > > > This adds a scatter vectorization capability to the vectorizer > > without target support by decomposing the offset and data vectors

<    1   2