Ping
2015-11-13 16:17 GMT+03:00 Ilya Enkovich <enkovich....@gmail.com>: > 2015-11-13 13:03 GMT+03:00 Richard Biener <richard.guent...@gmail.com>: >> On Thu, Nov 12, 2015 at 5:08 PM, Ilya Enkovich <enkovich....@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