Re: [GSoC] writing test-case

2014-05-20 Thread Richard Biener
On Tue, May 20, 2014 at 2:20 PM, Michael Matz wrote: > Hi, > > On Tue, 20 May 2014, Richard Biener wrote: > >> > Syntaxwise I had this idea for adding generic predicates to expressions: >> > >> > (plus (minus @0 @1):predicate >> > @2) >> > (...) >> >> So you'd write >> >> (plus @0 :integer_

Re: [GSoC] writing test-case

2014-05-20 Thread Michael Matz
Hi, On Tue, 20 May 2014, Richard Biener wrote: > > Syntaxwise I had this idea for adding generic predicates to expressions: > > > > (plus (minus @0 @1):predicate > > @2) > > (...) > > So you'd write > > (plus @0 :integer_zerop) > > instead of > > (plus @0 integer_zerop) > > ? plus i

Re: [GSoC] writing test-case

2014-05-20 Thread Richard Biener
On Mon, May 19, 2014 at 5:51 PM, Michael Matz wrote: > Hi, > > On Thu, 15 May 2014, Richard Biener wrote: > >> To me predicate (and capture without expression or predicate) >> differs from expression in that predicate is clearly a leaf of the >> expression tree while we have to recurse into expres

Re: [GSoC] writing test-case

2014-05-19 Thread Michael Matz
Hi, On Thu, 15 May 2014, Richard Biener wrote: > To me predicate (and capture without expression or predicate) > differs from expression in that predicate is clearly a leaf of the > expression tree while we have to recurse into expression operands. > > Now, if we want to support applying predica

Re: [GSoC] writing test-case

2014-05-15 Thread Andreas Schwab
Prathamesh Kulkarni writes: > +/* { dg-final { scan-tree-dump "gimple_match_and_simplified to \[^\n\r\]*= > x_\\d\+\\(D\\) - y_\\d\+\\(D\\)" "forwprop1" } } */ No need to quote +, it's not special to tcl. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53

Re: [GSoC] writing test-case

2014-05-15 Thread Richard Biener
>>> * I have written test-cases for patterns in match.pd (attached patch), which >>> result in PASS. Could you review them for me ? >> >> Sure. It looks good to me, though you can look at the changed match-1.c >> testcase on the branch where I've changed the matching to look for the >> debug outpu

Re: [GSoC] writing test-case

2014-05-15 Thread Richard Biener
>> So I came along the need to add another predicate for REAL_CST >> leafs which makes me wonder if we should support tree codes >> as predicates. Thus instead of writing >> >> (match_and_simplify >> (plus (plus @0 INTEGER_CST_P@1) INTEGER_CST_P@2) >> (plus @0 (plus @1 @2))) >> >> write >> >>

Re: [GSoC] writing test-case

2014-05-15 Thread Richard Biener
On Thu, May 15, 2014 at 12:30 AM, Prathamesh Kulkarni wrote: > On Wed, May 14, 2014 at 3:54 PM, Richard Biener > wrote: >> On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni >> wrote: >>> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >>> wrote: On Sun, May 11, 2014 at 5:00 PM, Pratham

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Thu, May 15, 2014 at 4:00 AM, Prathamesh Kulkarni wrote: > On Wed, May 14, 2014 at 3:54 PM, Richard Biener > wrote: >> On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni >> wrote: >>> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >>> wrote: On Sun, May 11, 2014 at 5:00 PM, Prathame

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 4:40 PM, Richard Biener wrote: > On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni > wrote: >> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >> wrote: >>> On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni >>> wrote: On Sun, May 11, 2014 at 8:10 PM, Andreas

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 4:33 PM, Richard Biener wrote: > On Wed, May 14, 2014 at 12:30 PM, Richard Biener > wrote: >> On Wed, May 14, 2014 at 12:24 PM, Richard Biener >> wrote: >>> On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni >>> wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Bie

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 3:54 PM, Richard Biener wrote: > On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni > wrote: >> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >> wrote: >>> On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni >>> wrote: On Sun, May 11, 2014 at 8:10 PM, Andreas

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni wrote: > On Tue, May 13, 2014 at 2:36 PM, Richard Biener > wrote: >> On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni >> wrote: >>> On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab >>> wrote: Prathamesh Kulkarni writes: >

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Wed, May 14, 2014 at 12:30 PM, Richard Biener wrote: > On Wed, May 14, 2014 at 12:24 PM, Richard Biener > wrote: >> On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni >> wrote: >>> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >>> wrote: On Sun, May 11, 2014 at 5:00 PM, Prathamesh

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Wed, May 14, 2014 at 12:24 PM, Richard Biener wrote: > On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni > wrote: >> On Tue, May 13, 2014 at 2:36 PM, Richard Biener >> wrote: >>> On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni >>> wrote: On Sun, May 11, 2014 at 8:10 PM, Andreas

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni wrote: > On Tue, May 13, 2014 at 2:36 PM, Richard Biener > wrote: >> On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni >> wrote: >>> On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab >>> wrote: Prathamesh Kulkarni writes: >

Re: [GSoC] writing test-case

2014-05-13 Thread Prathamesh Kulkarni
On Tue, May 13, 2014 at 2:36 PM, Richard Biener wrote: > On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni > wrote: >> On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab >> wrote: >>> Prathamesh Kulkarni writes: >>> a) I am not able to follow why 3 slashes are required here in x_.\\\

Re: [GSoC] writing test-case

2014-05-13 Thread Richard Biener
On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni wrote: > On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab wrote: >> Prathamesh Kulkarni writes: >> >>> a) I am not able to follow why 3 slashes are required here >>> in x_.\\\(D\\\) ? Why does x_.\(D\) not work ? >> >> Two of the three backslas

Re: [GSoC] writing test-case

2014-05-11 Thread Prathamesh Kulkarni
On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab wrote: > Prathamesh Kulkarni writes: > >> a) I am not able to follow why 3 slashes are required here >> in x_.\\\(D\\\) ? Why does x_.\(D\) not work ? > > Two of the three backslashes are eaten by the tcl parser. But actually > only two backslashes

Re: [GSoC] writing test-case

2014-05-11 Thread Andreas Schwab
Prathamesh Kulkarni writes: > a) I am not able to follow why 3 slashes are required here > in x_.\\\(D\\\) ? Why does x_.\(D\) not work ? Two of the three backslashes are eaten by the tcl parser. But actually only two backslashes are needed, since the parens are not special to tcl (but are spec

[GSoC] writing test-case

2014-05-11 Thread Prathamesh Kulkarni
Hi, I was trying to write test-case for the pattern A + -B -> A - B (currently written for only int type). Is the test-case written correctly (attached) ? a) I am not able to follow why 3 slashes are required here in x_.\\\(D\\\) ? Why does x_.\(D\) not work ? (I saw 3 slashes used in a testca