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

Bin.Cheng amker.cheng@gmail.com
Sun Jul 5 03:10:00 GMT 2015


On Sat, Jul 4, 2015 at 3:20 PM, Jakub Jelinek <jakub@redhat.com> 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 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.
Bootstrap and test the patch on aarch64.  Also saw these two failures,
plus below one

FAIL: libgomp.fortran/target6.f90   -Os  execution test

Maybe the same cause with above two.  I will test later with Jakub's patch.

Another problem is the added test failed on aarch64.  I attacked the dump here.

Thanks,
bin
>
>         Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vect-126.c.133t.vect
Type: application/octet-stream
Size: 177211 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150705/8276d062/attachment.obj>


More information about the Gcc-patches mailing list