[llvm] [RISCV][CostModel] Estimate cost of Extract/InsertElement with non-constant index when vector instructions are not available (PR #67334)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 25 10:25:28 PDT 2023
================
@@ -1456,6 +1456,24 @@ InstructionCost RISCVTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val,
Opcode != Instruction::InsertElement)
return BaseT::getVectorInstrCost(Opcode, Val, CostKind, Index, Op0, Op1);
+ // Extract/InsertElement with non-constant index is very costly without
----------------
preames wrote:
Placement wise, this should probably be under the if (!LT.second.isVector()) check below.
https://github.com/llvm/llvm-project/pull/67334
More information about the llvm-commits
mailing list