This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid false vector mask conversion
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 2 Dec 2015 13:39:35 +0300
- Subject: Re: [PATCH] Avoid false vector mask conversion
- Authentication-results: sourceware.org; auth=none
- References: <20151112160843 dot GG51435 at msticlxl57 dot ims dot intel dot com> <CAFiYyc0BNGX492H5f=1TgvBFFaj6J049_HWU8SAWG7NnSLiuBQ at mail dot gmail dot com> <CAMbmDYaMsxVqnJaz0edbpi3k5nuVYB=vW-fzXJZo_P8WwJYogw at mail dot gmail dot com> <CAMbmDYbyJdpKfvaCy-iWHTXp0_u7z5hA=6bCCGVpCjV3M9QHSA at mail dot gmail dot com>
Ping
2015-11-23 16:05 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
> Ping
>
> 2015-11-13 16:17 GMT+03:00 Ilya Enkovich <enkovich.gnu@gmail.com>:
>> 2015-11-13 13:03 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
>>> On Thu, Nov 12, 2015 at 5:08 PM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> When we use LTO for fortran we may have a mix 32bit and 1bit scalar booleans. It means we may have conversion of one scalar type to another which confuses vectorizer because values with different scalar boolean type may get the same vectype.
>>>
>>> Confuses aka fails to vectorize?
>>
>> Right.
>>
>>>
>>>> This patch transforms such conversions into comparison.
>>>>
>>>> I managed to make a small fortran test which gets vectorized with this patch but I didn't find how I can run fortran test with LTO and then scan tree dump to check it is vectorized. BTW here is a loop from the test:
>>>>
>>>> real*8 a(18)
>>>> logical b(18)
>>>> integer i
>>>>
>>>> do i=1,18
>>>> if(a(i).gt.0.d0) then
>>>> b(i)=.true.
>>>> else
>>>> b(i)=.false.
>>>> endif
>>>> enddo
>>>
>>> This looks the the "error" comes from if-conversion - can't we do
>>> better there then?
>>
>> No, this loop is transformed into a single BB before if-conversion by
>> cselim + phiopt.
>>
>> Ilya
>>
>>>
>>> Richard.
>>>
>>>> Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
>>>>
>>>> Thanks,
>>>> Ilya