Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-12-29 Thread Andrew Pinski
On Mon, Oct 7, 2019 at 3:05 AM Richard Biener wrote: > > On Tue, Oct 1, 2019 at 1:48 PM Dmitrij Pochepko > wrote: > > > > Hi Richard, > > > > I updated patch according to all your comments. > > Also bootstrapped and tested again on x86_64-pc-linux-gnu and > > aarch64-linux-gnu, which took some t

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-10-08 Thread Steve Ellcey
On Mon, 2019-10-07 at 12:04 +0200, Richard Biener wrote: > On Tue, Oct 1, 2019 at 1:48 PM Dmitrij Pochepko > wrote: > > > > Hi Richard, > > > > I updated patch according to all your comments. > > Also bootstrapped and tested again on x86_64-pc-linux-gnu and > > aarch64-linux-gnu, which took some

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-10-07 Thread Richard Biener
On Tue, Oct 1, 2019 at 1:48 PM Dmitrij Pochepko wrote: > > Hi Richard, > > I updated patch according to all your comments. > Also bootstrapped and tested again on x86_64-pc-linux-gnu and > aarch64-linux-gnu, which took some time. > > attached v3. OK. Thanks, Richard. > Thanks, > Dmitrij > > On

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-10-01 Thread Dmitrij Pochepko
Hi Richard, I updated patch according to all your comments. Also bootstrapped and tested again on x86_64-pc-linux-gnu and aarch64-linux-gnu, which took some time. attached v3. Thanks, Dmitrij On Thu, Sep 26, 2019 at 09:47:04AM +0200, Richard Biener wrote: > On Tue, Sep 24, 2019 at 5:29 PM Dmit

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-26 Thread Richard Biener
On Tue, Sep 24, 2019 at 5:29 PM Dmitrij Pochepko wrote: > > Hi, > > can anybody take a look at v2? +(if (tree_to_uhwi (@4) == 1 + && tree_to_uhwi (@10) == 2 && tree_to_uhwi (@5) == 4 those will still ICE for large __int128_t constants. Since you do not match any conversions you shou

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-24 Thread Dmitrij Pochepko
Hi, can anybody take a look at v2? Thanks, Dmitrij On Mon, Sep 09, 2019 at 10:03:40PM +0300, Dmitrij Pochepko wrote: > Hi all. > > Please take a look at v2 (attached). > I changed patch according to review comments. The same testing was performed > again. > > Thanks, > Dmitrij > > On Thu, Se

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-09 Thread Dmitrij Pochepko
Hi all. Please take a look at v2 (attached). I changed patch according to review comments. The same testing was performed again. Thanks, Dmitrij On Thu, Sep 05, 2019 at 06:34:49PM +0300, Dmitrij Pochepko wrote: > This patch adds matching for Hamming weight (popcount) implementation. The > foll

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-09 Thread Dmitrij Pochepko
Hi, thank you for looking into it. On Fri, Sep 06, 2019 at 12:13:34PM +, Wilco Dijkstra wrote: > Hi, > > +(simplify > + (convert > +(rshift > + (mult > > > is the outer convert really necessary? That is, if we change > > the simplification result to > > Indeed that should be "co

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-09 Thread Dmitrij Pochepko
Hi, thank you for looking into it. On Fri, Sep 06, 2019 at 12:23:40PM +0200, Richard Biener wrote: > On Thu, Sep 5, 2019 at 5:35 PM Dmitrij Pochepko > wrote: > > > > This patch adds matching for Hamming weight (popcount) implementation. The > > following sources: > > > > int > > foo64 (unsigned

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-09 Thread Richard Biener
On Fri, Sep 6, 2019 at 2:13 PM Wilco Dijkstra wrote: > > Hi, > > +(simplify > + (convert > +(rshift > + (mult > > > is the outer convert really necessary? That is, if we change > > the simplification result to > > Indeed that should be "convert?" to make it optional. Rather drop it, a

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-06 Thread Wilco Dijkstra
Hi, +(simplify + (convert +(rshift + (mult > is the outer convert really necessary? That is, if we change > the simplification result to Indeed that should be "convert?" to make it optional. > Is the Hamming weight popcount > faster than the libgcc table-based approach? I wonder if

Re: [PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-06 Thread Richard Biener
On Thu, Sep 5, 2019 at 5:35 PM Dmitrij Pochepko wrote: > > This patch adds matching for Hamming weight (popcount) implementation. The > following sources: > > int > foo64 (unsigned long long a) > { > unsigned long long b = a; > b -= ((b>>1) & 0xULL); > b = ((b>>2) & 0x

[PATCH] PR tree-optimization/90836 Missing popcount pattern matching

2019-09-05 Thread Dmitrij Pochepko
This patch adds matching for Hamming weight (popcount) implementation. The following sources: int foo64 (unsigned long long a) { unsigned long long b = a; b -= ((b>>1) & 0xULL); b = ((b>>2) & 0xULL) + (b & 0xULL); b = ((b>>4) + b) &