Call to getCastInstrCost(): types
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 04:04:54 PDT 2017
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...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: getCastInstrCost_types.patch
Type: text/x-patch
Size: 1121 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/b1ede871/attachment.bin>
More information about the llvm-commits
mailing list