Re: [GSoC] writing test-case

2014-05-20 Thread Richard Biener
On Mon, May 19, 2014 at 5:51 PM, Michael Matz m...@suse.de 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

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 is binary, where is

Re: [GSoC] writing test-case

2014-05-20 Thread Richard Biener
On Tue, May 20, 2014 at 2:20 PM, Michael Matz m...@suse.de 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_zerop)

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 predicates

Re: [GSoC] writing test-case

2014-05-15 Thread Richard Biener
On Thu, May 15, 2014 at 12:30 AM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Wed, May 14, 2014 at 3:54 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM,

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 (match_and_simplify

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 output the

Re: [GSoC] writing test-case

2014-05-15 Thread Andreas Schwab
Prathamesh Kulkarni bilbotheelffri...@gmail.com 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

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Sun, May 11, 2014 at 8:10 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Wed, May 14, 2014 at 12:24 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Wed, May 14, 2014 at 12:30 PM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 14, 2014 at 12:24 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Richard Biener
On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Sun, May 11, 2014 at 8:10 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 3:54 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 4:33 PM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 14, 2014 at 12:30 PM, Richard Biener richard.guent...@gmail.com wrote: On Wed, May 14, 2014 at 12:24 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Wed, May 14, 2014 at 4:40 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM,

Re: [GSoC] writing test-case

2014-05-14 Thread Prathamesh Kulkarni
On Thu, May 15, 2014 at 4:00 AM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Wed, May 14, 2014 at 3:54 PM, Richard Biener richard.guent...@gmail.com wrote: On Tue, May 13, 2014 at 11:06 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Tue, May 13, 2014 at 2:36 PM,

Re: [GSoC] writing test-case

2014-05-13 Thread Richard Biener
On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab sch...@linux-m68k.org wrote: Prathamesh Kulkarni bilbotheelffri...@gmail.com writes: a) I am not able to follow why 3 slashes are required here in

Re: [GSoC] writing test-case

2014-05-13 Thread Prathamesh Kulkarni
On Tue, May 13, 2014 at 2:36 PM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 11, 2014 at 5:00 PM, Prathamesh Kulkarni bilbotheelffri...@gmail.com wrote: On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab sch...@linux-m68k.org wrote: Prathamesh Kulkarni

[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

Re: [GSoC] writing test-case

2014-05-11 Thread Andreas Schwab
Prathamesh Kulkarni bilbotheelffri...@gmail.com 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

Re: [GSoC] writing test-case

2014-05-11 Thread Prathamesh Kulkarni
On Sun, May 11, 2014 at 8:10 PM, Andreas Schwab sch...@linux-m68k.org wrote: Prathamesh Kulkarni bilbotheelffri...@gmail.com 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