Re: More vector folding

2013-06-13 Thread Jeff Law
On 06/13/13 12:06, Marc Glisse wrote: Hello, an incredibly suprising patch: I am adapting yet more fold-const transformations to vectors... (it varies, the last patch was in forwprop) I was quite conservative with respect to complex: I didn't want to create a BIT_NOT_EXPR of a complex. As an a

More vector folding

2013-06-13 Thread Marc Glisse
Hello, an incredibly suprising patch: I am adapting yet more fold-const transformations to vectors... (it varies, the last patch was in forwprop) I was quite conservative with respect to complex: I didn't want to create a BIT_NOT_EXPR of a complex. As an aside, while writing this patch, I n

Re: More vector folding

2013-05-17 Thread Jakub Jelinek
On Fri, May 17, 2013 at 04:37:45PM +0200, Marc Glisse wrote: > On Fri, 17 May 2013, Jakub Jelinek wrote: > > >On Fri, May 17, 2013 at 04:23:08PM +0200, Marc Glisse wrote: > >>2013-05-17 Marc Glisse > >> > >>PR regression/57313 > >>* gcc.dg/binop-xor3.c: Restrict to platforms known to wo

Re: More vector folding

2013-05-17 Thread Marc Glisse
On Fri, 17 May 2013, Jakub Jelinek wrote: On Fri, May 17, 2013 at 04:23:08PM +0200, Marc Glisse wrote: 2013-05-17 Marc Glisse PR regression/57313 * gcc.dg/binop-xor3.c: Restrict to platforms known to work (x86). I'd say it should be PR testsuite/57313 (and the PR changed t

Re: More vector folding

2013-05-17 Thread Jakub Jelinek
On Fri, May 17, 2013 at 04:23:08PM +0200, Marc Glisse wrote: > 2013-05-17 Marc Glisse > > PR regression/57313 > * gcc.dg/binop-xor3.c: Restrict to platforms known to work (x86). I'd say it should be PR testsuite/57313 (and the PR changed to that). Ok with that change, if some othe

Re: More vector folding

2013-05-17 Thread Marc Glisse
On Fri, 17 May 2013, Jakub Jelinek wrote: On Fri, May 17, 2013 at 09:54:14PM +0800, Chung-Ju Wu wrote: 2013/5/17 Marc Glisse : Yes, LOGICAL_OP_NON_SHORT_CIRCUIT seems to be it. What is the proper thing to do here? If I add the generic xfail back, we'll get xpass on some platforms, now we hav

Re: More vector folding

2013-05-17 Thread Jakub Jelinek
On Fri, May 17, 2013 at 09:54:14PM +0800, Chung-Ju Wu wrote: > 2013/5/17 Marc Glisse : > > > > Yes, LOGICAL_OP_NON_SHORT_CIRCUIT seems to be it. > > > > What is the proper thing to do here? If I add the generic xfail back, we'll > > get xpass on some platforms, now we have fails on some platforms,

Re: More vector folding

2013-05-17 Thread Chung-Ju Wu
2013/5/17 Marc Glisse : > > Yes, LOGICAL_OP_NON_SHORT_CIRCUIT seems to be it. > > What is the proper thing to do here? If I add the generic xfail back, we'll > get xpass on some platforms, now we have fails on some platforms, and > listing the platforms where we want the transformation to happen is

Re: More vector folding

2013-05-17 Thread Marc Glisse
On Fri, 17 May 2013, Hans-Peter Nilsson wrote: From: Marc Glisse Date: Tue, 14 May 2013 13:47:23 +0200 Here is what I tested during the night, I'll just rename the function. I took the chance to remove an unnecessary alternative in TRUTH_XOR_EXPR. Passes bootstrap+testsuite on x86_64-linux-

Re: More vector folding

2013-05-17 Thread Hans-Peter Nilsson
> From: Marc Glisse > Date: Tue, 14 May 2013 13:47:23 +0200 > Here is what I tested during the night, I'll just rename the function. > I took the chance to remove an unnecessary alternative in TRUTH_XOR_EXPR. > > Passes bootstrap+testsuite on x86_64-linux-gnu. > > 2013-05-14 Marc Glisse > >

Re: More vector folding

2013-05-14 Thread Richard Biener
On Tue, May 14, 2013 at 1:47 PM, Marc Glisse wrote: > On Tue, 14 May 2013, Richard Biener wrote: > >> On Mon, May 13, 2013 at 1:40 PM, Marc Glisse wrote: >>> >>> On Mon, 13 May 2013, Richard Biener wrote: >>> On Sat, May 11, 2013 at 11:38 AM, Marc Glisse wrote: > > @@ -8274,28

Re: More vector folding

2013-05-14 Thread Marc Glisse
On Tue, 14 May 2013, Richard Biener wrote: On Mon, May 13, 2013 at 1:40 PM, Marc Glisse wrote: On Mon, 13 May 2013, Richard Biener wrote: On Sat, May 11, 2013 at 11:38 AM, Marc Glisse wrote: @@ -8274,28 +8269,34 @@ fold_unary_loc (location_t loc, enum tre { elem =

Re: More vector folding

2013-05-14 Thread Richard Biener
On Mon, May 13, 2013 at 1:40 PM, Marc Glisse wrote: > On Mon, 13 May 2013, Richard Biener wrote: > >> On Sat, May 11, 2013 at 11:38 AM, Marc Glisse >> wrote: >>> >>> Second try. >>> >>> I removed the fold_single_bit_test thing (I thought I'd handle it, so I >>> started by the easy part, and never

Re: More vector folding

2013-05-13 Thread Marc Glisse
On Mon, 13 May 2013, Richard Biener wrote: On Sat, May 11, 2013 at 11:38 AM, Marc Glisse wrote: Second try. I removed the fold_single_bit_test thing (I thought I'd handle it, so I started by the easy part, and never did the rest). Adapting invert_truthvalue_loc for vectors, I thought: callin

Re: More vector folding

2013-05-13 Thread Richard Biener
On Sat, May 11, 2013 at 11:38 AM, Marc Glisse wrote: > Second try. > > I removed the fold_single_bit_test thing (I thought I'd handle it, so I > started by the easy part, and never did the rest). > > Adapting invert_truthvalue_loc for vectors, I thought: calling > fold_truth_not_expr and build1 if

Re: More vector folding

2013-05-11 Thread Marc Glisse
Second try. I removed the fold_single_bit_test thing (I thought I'd handle it, so I started by the easy part, and never did the rest). Adapting invert_truthvalue_loc for vectors, I thought: calling fold_truth_not_expr and build1 if it fails is just the same as fold_build1. Except that it was

Re: More vector folding

2013-05-10 Thread Richard Biener
On Fri, May 10, 2013 at 12:03 PM, Marc Glisse wrote: > On Fri, 10 May 2013, Richard Biener wrote: > >> On Thu, May 9, 2013 at 12:55 AM, Marc Glisse wrote: >>> >>> Hello, >>> >>> here are a few more changes to fold-const.c so vectors can use the >>> existing >>> optimizations. Note that I made fol

Re: More vector folding

2013-05-10 Thread Marc Glisse
On Fri, 10 May 2013, Richard Biener wrote: On Thu, May 9, 2013 at 12:55 AM, Marc Glisse wrote: Hello, here are a few more changes to fold-const.c so vectors can use the existing optimizations. Note that I made fold_truth_not_expr safe for use with vector BIT_NOT_EXPR. Passes bootstrap+testsu

Re: More vector folding

2013-05-10 Thread Richard Biener
On Thu, May 9, 2013 at 12:55 AM, Marc Glisse wrote: > Hello, > > here are a few more changes to fold-const.c so vectors can use the existing > optimizations. Note that I made fold_truth_not_expr safe for use with vector > BIT_NOT_EXPR. > > Passes bootstrap+testsuite on x86_64-linux-gnu. > > 2013-0

More vector folding

2013-05-08 Thread Marc Glisse
Hello, here are a few more changes to fold-const.c so vectors can use the existing optimizations. Note that I made fold_truth_not_expr safe for use with vector BIT_NOT_EXPR. Passes bootstrap+testsuite on x86_64-linux-gnu. 2013-05-09 Marc Glisse gcc/ * fold-const.c (fold_negate_ex