The following operations have no associated cost for them
when applied to scalable vectors, and as a consequence
can trigger a crash when a call is made to
AArch64TTIImpl::getCastInstrCost():
- fptrunc
- trunc
- fpext
- fpto(u,s)i
This patch adds costs for these operations and
relevant regression tests.
clang-format: please reformat the code
- static const TypeConversionCostTblEntry - ConversionTbl[] = { - { ISD::TRUNCATE, MVT::v4i16, MVT::v4i32, 1 }, - { ISD::TRUNCATE, MVT::v4i32, MVT::v4i64, 0 }, - { ISD::TRUNCATE, MVT::v8i8, MVT::v8i32, 3 }, - { ISD::TRUNCATE, MVT::v16i8, MVT::v16i32, 6 }, - - // Truncations on nxvmiN - { ISD::TRUNCATE, MVT::nxv2i1, MVT::nxv2i16, 1 }, - { ISD::TRUNCATE, MVT::nxv2i1, MVT::nxv2i32, 1 },383 diff lines are omitted. See full path.