[llvm] [RISCV][TTI] Return invalid for getCastInstrCost w/vector split. (PR #221913)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 01:11:01 PDT 2026
================
@@ -1925,6 +1931,12 @@ InstructionCost RISCVTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
std::pair<InstructionCost, MVT> SrcLT = getTypeLegalizationCost(Src);
std::pair<InstructionCost, MVT> DstLT = getTypeLegalizationCost(Dst);
+ // Currently VLOptimizer cannot inference the VL properly when vector splits.
+ // TODO: Remove this constraint when VLOptimizer can optimize this.
+ if (isa<ScalableVectorType>(Dst) && DstLT.first > 1 &&
----------------
wangpc-pp wrote:
I think maybe we can revise the analysis of smallest/widest types?
https://github.com/llvm/llvm-project/pull/221913
More information about the llvm-commits
mailing list