When BasicTTIImpl::getCastInstrCost can't determine the cost of a
vector cast operation when the types need legalization, it falls
back to calculating scalarization costs. Instead of crashing on
cast<FixedVectorType>(DstVTy) when the type is a scalable vector,
return an Invalid cost.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll | ||
---|---|---|
20 | It seems a little inconsistent that we return a cost of one for converting <vscale x 1 x double>, whereas it's invalid for <vscale x 1 x float>. Not sure if we need to worry about this? |
llvm/test/Analysis/CostModel/AArch64/sve-fptoi.ll | ||
---|---|---|
20 | Yes, it's inconsistent, but I don't think it's really something to worry about now. For all legal types or too-wide types (that require splitting) we should have sensible costs, whereas VFs with vscale x 1 types are currently avoided for SVE. |
It seems a little inconsistent that we return a cost of one for converting <vscale x 1 x double>, whereas it's invalid for <vscale x 1 x float>. Not sure if we need to worry about this?