Call to getCastInstrCost(): types

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 05:04:56 PDT 2017


Hi Jonas,

Sorry for missing your message - I was away on vacation. The patch has been
reverted, so you should be unblocked now (see PR33193). I will take another
look at it today. Regarding the "N *" multiplication, yes, there's not
scalarization overhead there. This is for the update instructions of
scalarized induction variables, which don't require inserts/extracts
(collectLoopScalars). But yeah, we need to consider casts here as well.

-- Matt

On Tue, May 30, 2017 at 2:30 AM, Jonas Paulsson via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> ping!
>
> This issue is still stopping a normal run of benchmark suite on SystemZ...
>
> /Jonas
>
>
>
> On 2017-05-26 13:04, Jonas Paulsson wrote:
>
>> Hi Matthew,
>>
>> your commit "[LV] Update type in cost model for scalarization" triggered
>> an assert in the SystemZ backend. It checks that if the source type is a
>> vector type, the result should also be a vector type.
>>
>> SystemZTTIImpl::getCastInstrCost() was called with a query of 'zext <2 x
>> i32> to i64', which doesn't make sense, I think...
>>
>> To fix this, I reused what you did in getArithmeticInstrCost() in
>> LoopVectorize.cpp with the call to getCastInstrCost(). Does this look right
>> to you?
>>
>> About multiplying with "N *": I see no scalarization overhead included
>> here. Is this intended, or is there an improvement planned on this more
>> generally?
>>
>> Also, I have not checked if this is missing in more places, but this is
>> the only case I have run into.
>>
>> /Jonas
>>
>> PS The assert that triggered is one that I added based on general
>> intuition, and how these methods are called currently. Not sure if I should
>> exclude bitcast from this? That might be still correct, but I don't think
>> it is used that way at least currently...
>>
>>
>>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170530/51edcbe2/attachment.html>


More information about the llvm-commits mailing list