[PATCH] Avoid false vector mask conversion
Mon Nov 23 13:15:00 GMT 2015
2015-11-13 16:17 GMT+03:00 Ilya Enkovich <email@example.com>:
> 2015-11-13 13:03 GMT+03:00 Richard Biener <firstname.lastname@example.org>:
>> On Thu, Nov 12, 2015 at 5:08 PM, Ilya Enkovich <email@example.com> wrote:
>>> 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?
>>> 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
>> 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.
>>> Bootstrapped and tested on x86_64-unknown-linux-gnu. OK for trunk?
More information about the Gcc-patches