This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.
- From: Cong Hou <congh at google dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 21 Oct 2013 09:45:24 -0700
- Subject: Re: [PATCH] Hoist loop invariant statements containing data refs with zero-step during loop-versioning in vectorization.
- Authentication-results: sourceware.org; auth=none
- References: <CAK=A3=33JChF2hpKEhSDcEpYwvoO5y-cLJC9T-TNERJZMUJF9g at mail dot gmail dot com> <CAK=A3=343pS3FBpJbqJL-kRsVBaV4a5khyE9i0gUcQSY=M5k+Q at mail dot gmail dot com> <525D9871 dot 2030304 at redhat dot com> <CAK=A3=3vavn7u7vnziZPOw2d6uhvbhKx1AVTROnAYFCGCOF22Q at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1310161033330 dot 11149 at zhemvz dot fhfr dot qr> <CAK=A3=2AaM_hkznF31O-v+xkjx3EW1Ru5n+RgnHmOk3TkcJ7XA at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1310171111440 dot 11149 at zhemvz dot fhfr dot qr> <CAK=A3=3j6OxCidtcGzQOAZKKK0SBeKRUZApe3PsK0EtYaHy8fg at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1310181155030 dot 11149 at zhemvz dot fhfr dot qr> <52621731 dot 10707 at redhat dot com>
Jeff, thank you for installing this patch. Actually I already have the
write privileges. I just came back from a trip.
Thank you again!
thanks,
Cong
On Fri, Oct 18, 2013 at 10:22 PM, Jeff Law <law@redhat.com> wrote:
> On 10/18/13 03:56, Richard Biener wrote:
>>
>> On Thu, 17 Oct 2013, Cong Hou wrote:
>>
>>> I tested this case with -fno-tree-loop-im and -fno-tree-pre, and it
>>> seems that GCC could hoist j+1 outside of the i loop:
>>>
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _10 = (sizetype)
>>> j_25;
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _11 = _10 + 1;
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _12 = _11 * 4;
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _14 = b_13(D) + _12;
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _15 = *_14;
>>> t3.c:5:5: note: hoisting out of the vectorized loop: _16 = _15 + 1;
>>>
>>>
>>> But your suggestion is still nice as it can remove a branch and make
>>> the code more brief. I have updated the patch and also included the
>>> nested loop example into the test case.
>>
>>
>> Ok if it passes bootstrap & regtest.
>
> Bootstrapped & regression tested on x86_64-unknown-linux-gnu. Installed on
> Cong's behalf.
>
> Cong -- if you plan on contributing regularly to GCC, please start the
> process for write privileges. This form should have everything you need:
>
> https://sourceware.org/cgi-bin/pdw/ps_form.cgi
>
> Jeff