Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-20 Thread Richard Biener
On Wed, 20 May 2015, Prathamesh Kulkarni wrote: On 19 May 2015 at 14:34, Richard Biener rguent...@suse.de wrote: On Tue, 19 May 2015, Prathamesh Kulkarni wrote: On 18 May 2015 at 20:17, Prathamesh Kulkarni prathamesh.kulka...@linaro.org wrote: On 18 May 2015 at 14:12, Richard Biener

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-19 Thread Marek Polacek
On Tue, May 19, 2015 at 10:33:08AM +0200, Richard Biener wrote: Would that be a good idea ? For symmetry, I thought (for op (list) op2 (op)) should be supported too. Hmm, but is this really a useful extension? To me it just complicates the syntax for the occasional reader.

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-19 Thread Richard Biener
On Mon, 18 May 2015, Prathamesh Kulkarni wrote: On 18 May 2015 at 14:12, Richard Biener rguent...@suse.de wrote: On Sat, 16 May 2015, Prathamesh Kulkarni wrote: Hi, genmatch generates incorrect code for following (artificial) pattern: (for op (plus) op2 (op) (simplify

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-19 Thread Richard Biener
On Tue, 19 May 2015, Prathamesh Kulkarni wrote: On 18 May 2015 at 20:17, Prathamesh Kulkarni prathamesh.kulka...@linaro.org wrote: On 18 May 2015 at 14:12, Richard Biener rguent...@suse.de wrote: On Sat, 16 May 2015, Prathamesh Kulkarni wrote: Hi, genmatch generates incorrect code for

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-19 Thread Prathamesh Kulkarni
On 19 May 2015 at 14:34, Richard Biener rguent...@suse.de wrote: On Tue, 19 May 2015, Prathamesh Kulkarni wrote: On 18 May 2015 at 20:17, Prathamesh Kulkarni prathamesh.kulka...@linaro.org wrote: On 18 May 2015 at 14:12, Richard Biener rguent...@suse.de wrote: On Sat, 16 May 2015,

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-18 Thread Prathamesh Kulkarni
On 18 May 2015 at 14:12, Richard Biener rguent...@suse.de wrote: On Sat, 16 May 2015, Prathamesh Kulkarni wrote: Hi, genmatch generates incorrect code for following (artificial) pattern: (for op (plus) op2 (op) (simplify (op @x @y) (op2 @x @y) generated gimple code:

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-18 Thread Richard Biener
On Sat, 16 May 2015, Prathamesh Kulkarni wrote: Hi, genmatch generates incorrect code for following (artificial) pattern: (for op (plus) op2 (op) (simplify (op @x @y) (op2 @x @y) generated gimple code: http://pastebin.com/h1uau9qB 'op' is not replaced in the generated

Re: [match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-18 Thread Prathamesh Kulkarni
On 18 May 2015 at 20:17, Prathamesh Kulkarni prathamesh.kulka...@linaro.org wrote: On 18 May 2015 at 14:12, Richard Biener rguent...@suse.de wrote: On Sat, 16 May 2015, Prathamesh Kulkarni wrote: Hi, genmatch generates incorrect code for following (artificial) pattern: (for op (plus)

[match-and-simplify] fix incorrect code-gen in 'for' pattern

2015-05-15 Thread Prathamesh Kulkarni
Hi, genmatch generates incorrect code for following (artificial) pattern: (for op (plus) op2 (op) (simplify (op @x @y) (op2 @x @y) generated gimple code: http://pastebin.com/h1uau9qB 'op' is not replaced in the generated code on line 33: *res_code = op; I think it would be a