Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-20 Thread Richard Biener
On Sun, 19 Oct 2014, Marc Glisse wrote: > Hello, > > looking though the patterns on the branch (not specifically the ones attached > here), I am surprised to see so few calls to has_single_use. In RTL-land, we > don't even valueize if there are several uses, so the question doesn't occur. > In ge

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-20 Thread Richard Biener
On Fri, 17 Oct 2014, Jakub Jelinek wrote: > On Wed, Oct 15, 2014 at 01:40:49PM +0200, Richard Biener wrote: > > > > This adds a bunch of simplifications with constant operands > > or ones that simplify to constants, such as a + 0, x * 1. > > > > It's a patch mainly to get a few questions answere

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-19 Thread Marc Glisse
Hello, looking though the patterns on the branch (not specifically the ones attached here), I am surprised to see so few calls to has_single_use. In RTL-land, we don't even valueize if there are several uses, so the question doesn't occur. In generic, we assume everything is single use (CSE c

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-17 Thread Joseph S. Myers
On Wed, 15 Oct 2014, Richard Biener wrote: >Caveat2: the GENERIC code-path of match-and-simplify does >not handle everything fold-const.c does - for example >it does nothing on operands with side-effects - foo () * 0 >is not simplified to (foo(), 0). It also does not >get the

Re: [PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-17 Thread Jakub Jelinek
On Wed, Oct 15, 2014 at 01:40:49PM +0200, Richard Biener wrote: > > This adds a bunch of simplifications with constant operands > or ones that simplify to constants, such as a + 0, x * 1. > > It's a patch mainly to get a few questions answered for further > pattern merges: > > - The branch uses

[PATCH][3/n] Merge from match-and-simplify, first patterns and questions

2014-10-15 Thread Richard Biener
This adds a bunch of simplifications with constant operands or ones that simplify to constants, such as a + 0, x * 1. It's a patch mainly to get a few questions answered for further pattern merges: - The branch uses multiple .pd files and includes them from match.pd trying to group related s