Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:21:01AM +0200, Jakub Jelinek wrote: > > Hmm, this looks like it could be split out to a function. > > Ok, will try that. Here is what I've committed after another bootstrap/regtest on x86_64-linux and i686-linux. You're right, the separate function cleaned stuff up. 2

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:14:01AM +0200, Richard Biener wrote: > > @@ -2764,6 +2769,93 @@ vectorizable_simd_clone_call (gimple stm > > || thisarginfo.dt == vect_external_def) > >&& POINTER_TYPE_P (TREE_TYPE (op))) > > thisarginfo.align = get_pointer_alignment (op) / BIT

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Richard Biener
On Sat, 4 Jul 2015, Jakub Jelinek wrote: > On Fri, Jul 03, 2015 at 04:06:26PM +0200, Jakub Jelinek wrote: > > In the pr59984.c testcase, with Marek's patch and this patch, one loop in > > test is already vectorized (the ICE was on the other one), I'll work on > > recognizing multiples of GOMP_SIMD

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Jakub Jelinek
On Thu, Jul 09, 2015 at 11:04:38AM +0200, Marek Polacek wrote: > On Thu, Jul 09, 2015 at 10:53:30AM +0200, Richard Biener wrote: > > > I renamed the file to gimple-laddress.c then and adjusted the timevar. > > > Another change is that for x86_64 we don't need -mavx at all, so I dropped > > > that.

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Marek Polacek
On Thu, Jul 09, 2015 at 10:53:30AM +0200, Richard Biener wrote: > > I renamed the file to gimple-laddress.c then and adjusted the timevar. > > Another change is that for x86_64 we don't need -mavx at all, so I dropped > > that. The test is now restricted to x86_64/i?86; on aarch64/ppc64 we aren't

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-09 Thread Richard Biener
On Wed, 8 Jul 2015, Marek Polacek wrote: > On Fri, Jul 03, 2015 at 03:41:29PM +0200, Richard Biener wrote: > > On Fri, 3 Jul 2015, Marek Polacek wrote: > > > > > This patch implements a new pass, called laddress, which deals with > > > lowering ADDR_EXPR assignments. Such lowering ought to help

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-08 Thread Marek Polacek
On Wed, Jul 08, 2015 at 07:37:41PM +0200, Marek Polacek wrote: > DEFTIMEVAR (TV_INITIALIZE_RTL, "initialize rtl") > +DEFTIMEVAR (TV_GIMPLE_LADDRESS , "address lowering") Consider this whitespace issue fixed. Marek

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-08 Thread Marek Polacek
On Fri, Jul 03, 2015 at 03:41:29PM +0200, Richard Biener wrote: > On Fri, 3 Jul 2015, Marek Polacek wrote: > > > This patch implements a new pass, called laddress, which deals with > > lowering ADDR_EXPR assignments. Such lowering ought to help the > > vectorizer, but it also could expose more CS

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-08 Thread Marek Polacek
On Sun, Jul 05, 2015 at 11:10:14AM +0800, Bin.Cheng wrote: > > Just FYI, while bootstrapping/regtesting your patch together with the one > > I've posted and another one to vectorize pr59984.c better, I've noticed > > there > > is another regression with your patch (reverting my patches doesn't hel

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-04 Thread Richard Biener
On July 4, 2015 4:17:02 PM GMT+02:00, Jakub Jelinek wrote: >On Sat, Jul 04, 2015 at 09:20:04AM +0200, Jakub Jelinek wrote: >> On Fri, Jul 03, 2015 at 03:21:47PM +0200, Marek Polacek wrote: >> > This patch implements a new pass, called laddress, which deals with >> > lowering ADDR_EXPR assignments.

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-04 Thread Jakub Jelinek
On Fri, Jul 03, 2015 at 04:06:26PM +0200, Jakub Jelinek wrote: > In the pr59984.c testcase, with Marek's patch and this patch, one loop in > test is already vectorized (the ICE was on the other one), I'll work on > recognizing multiples of GOMP_SIMD_LANE () as linear next, so that we > vectorize al

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-04 Thread Jakub Jelinek
On Sat, Jul 04, 2015 at 09:20:04AM +0200, Jakub Jelinek wrote: > On Fri, Jul 03, 2015 at 03:21:47PM +0200, Marek Polacek wrote: > > This patch implements a new pass, called laddress, which deals with > > lowering ADDR_EXPR assignments. Such lowering ought to help the > > vectorizer, but it also co

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-04 Thread Jakub Jelinek
On Fri, Jul 03, 2015 at 03:21:47PM +0200, Marek Polacek wrote: > This patch implements a new pass, called laddress, which deals with > lowering ADDR_EXPR assignments. Such lowering ought to help the > vectorizer, but it also could expose more CSE opportunities, maybe > help reassoc, etc. It's onl

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-03 Thread Richard Biener
On July 3, 2015 4:06:26 PM GMT+02:00, Jakub Jelinek wrote: >On Fri, Jul 03, 2015 at 03:41:29PM +0200, Richard Biener wrote: >> > The fallout (at least on x86_64) is surprisingly small, i.e. none, >just >> > gcc.dg/vect/pr59984.c test (using -fopenmp-simd) ICEs, but that is >due >> > to a bug in th

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-03 Thread Jakub Jelinek
On Fri, Jul 03, 2015 at 03:41:29PM +0200, Richard Biener wrote: > > The fallout (at least on x86_64) is surprisingly small, i.e. none, just > > gcc.dg/vect/pr59984.c test (using -fopenmp-simd) ICEs, but that is due > > to a bug in the vectorizer. Jakub has a patch and knows the details. > > As the

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-03 Thread Richard Biener
On Fri, 3 Jul 2015, Marek Polacek wrote: > This patch implements a new pass, called laddress, which deals with > lowering ADDR_EXPR assignments. Such lowering ought to help the > vectorizer, but it also could expose more CSE opportunities, maybe > help reassoc, etc. It's only active when optimiz

Re: RFC: Add ADDR_EXPR lowering (PR tree-optimization/66718)

2015-07-03 Thread Richard Biener
On Fri, 3 Jul 2015, Richard Biener wrote: > On Fri, 3 Jul 2015, Marek Polacek wrote: > > > This patch implements a new pass, called laddress, which deals with > > lowering ADDR_EXPR assignments. Such lowering ought to help the > > vectorizer, but it also could expose more CSE opportunities, mayb