Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-09-15 Thread Richard Biener
On Mon, 14 Sep 2015, Bernhard Reutner-Fischer wrote: > On September 14, 2015 11:23:28 AM GMT+02:00, Richard Biener > wrote: > >On Fri, 11 Sep 2015, Bernd Schmidt wrote: > > > >> On 07/08/2015 04:39 PM, Richard Biener wrote: > >> > > >> > This introduces a :s flag to match expressions which enfo

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-09-14 Thread Bernhard Reutner-Fischer
On September 14, 2015 11:23:28 AM GMT+02:00, Richard Biener wrote: >On Fri, 11 Sep 2015, Bernd Schmidt wrote: > >> On 07/08/2015 04:39 PM, Richard Biener wrote: >> > >> > This introduces a :s flag to match expressions which enforces >> > the expression to have a single-use if(!) the simplified >

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-09-14 Thread Richard Biener
On Fri, 11 Sep 2015, Bernd Schmidt wrote: > On 07/08/2015 04:39 PM, Richard Biener wrote: > > > > This introduces a :s flag to match expressions which enforces > > the expression to have a single-use if(!) the simplified > > expression is larger than one statement. > > This seems to be missing d

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-09-11 Thread Bernd Schmidt
On 07/08/2015 04:39 PM, Richard Biener wrote: This introduces a :s flag to match expressions which enforces the expression to have a single-use if(!) the simplified expression is larger than one statement. This seems to be missing documentation in match-and-simplify.texi. Bernd

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-07-09 Thread Richard Biener
On Thu, 9 Jul 2015, Marek Polacek wrote: > On Thu, Jul 09, 2015 at 12:54:54PM +0200, Richard Biener wrote: > > > This introduces a :s flag to match expressions which enforces > > > the expression to have a single-use if(!) the simplified > > > expression is larger than one statement. > > This is

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-07-09 Thread Marek Polacek
On Thu, Jul 09, 2015 at 12:54:54PM +0200, Richard Biener wrote: > > This introduces a :s flag to match expressions which enforces > > the expression to have a single-use if(!) the simplified > > expression is larger than one statement. This is nice. > /* (x & ~m) | (y & m) -> ((x ^ y) & m) ^ x

Re: [PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-07-09 Thread Richard Biener
On Wed, 8 Jul 2015, Richard Biener wrote: > > This introduces a :s flag to match expressions which enforces > the expression to have a single-use if(!) the simplified > expression is larger than one statement. > > Thus with that we for example allow > > tem = a + 1; > x = tem - 3; > foo (

[PATCH] Teach genmatch.c to generate single-use restrictions from flags

2015-07-08 Thread Richard Biener
This introduces a :s flag to match expressions which enforces the expression to have a single-use if(!) the simplified expression is larger than one statement. Thus with that we for example allow tem = a + 1; x = tem - 3; foo (tem); to simplify to tem = a + 1; x = a - 2; foo (tem);