This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 only active when optimize != 0.
> 
> So e.g.
>   _1 = (sizetype) i_9;
>   _7 = _1 * 4;
>   _4 = &b + _7;
> instead of
>   _4 = &b[i_9];
> 
> This triggered 14105 times during the regtest and 6392 times during
> the bootstrap.
> 
> 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 test shows, we're now able to vectorize ADDR_EXPR of non-invariants
> (that was the motivation of this pass).

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 help,
disabling your gate does help):

+FAIL: libgomp.c/simd-3.c execution test
+FAIL: libgomp.c++/simd-3.C execution test

on both x86_64-linux and i686-linux (at least on AVX capable box).
Most likely hitting another latent vectorizer issue, haven't analyzed it
yet.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]