[llvm] [RISCV][TTI] Model the cost of extractelt when the vector split into multiple register group and idx exceed single group. (PR #118401)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 14:18:06 PST 2024


================
@@ -1945,6 +1945,23 @@ InstructionCost RISCVTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val,
     // TODO: should we count these special vsetvlis?
     BaseCost = Opcode == Instruction::InsertElement ? 3 : 4;
   }
+
+  // When the vector need to split into multiple register groups and the index
+  // exceed single vector resgister group, we need to extract the element via
----------------
ElvisWang123 wrote:

Fixed, thanks.

https://github.com/llvm/llvm-project/pull/118401


More information about the llvm-commits mailing list