diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h @@ -145,6 +145,10 @@ TTI::TargetCostKind CostKind, const Instruction *I = nullptr); + using BaseT::getVectorInstrCost; + InstructionCost getVectorInstrCost(unsigned Opcode, Type *Val, + unsigned Index); + bool isElementTypeLegalForScalableVector(Type *Ty) const { return TLI->isLegalElementTypeForRVV(Ty); } diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp --- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -735,6 +735,68 @@ return BaseT::getCmpSelInstrCost(Opcode, ValTy, CondTy, VecPred, CostKind, I); } +InstructionCost RISCVTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val, + unsigned Index) { + assert(Val->isVectorTy() && "This must be a vector type"); + + // Legalize the type. + std::pair LT = getTypeLegalizationCost(Val); + + // This type is legalized to a scalar type. + if (!LT.second.isVector()) + return 0; + + if (Index != -1U) { + // The type may be split. For fixed-width vectors we can normalize the + // index to the new type. + if (LT.second.isFixedLengthVector()) { + unsigned Width = LT.second.getVectorNumElements(); + Index = Index % Width; + } + + // We could extract/insert the first element without vslidedown. + if (Index == 0) { + // Mask vector extract/insert element is different from normal case. + if (Val->getScalarSizeInBits() == 1) { + // vmv.v.i v8, 0 + // vmerge.vim v8, v8, 1, v0 + // vmv.x.s a0, v8 + return 3; + } + // Extract i64 in the target that has XLEN=32 need more instruction. + if (Val->getScalarType()->isIntegerTy() && + ST->getXLen() < Val->getScalarSizeInBits()) { + // vmv.x.s a0, v8 + // li a1, 32 + // vsrl.vx v8, v8, a1 + // vmv.x.s a1, v8 + return 4; + } + return 1; + } + } + // Mask vector extract/insert element is different from normal case. + if (Val->getScalarSizeInBits() == 1) { + // vmv.v.i v8, 0 + // vmerge.vim v8, v8, 1, v0 + // vsetivli zero, 1, e8, m2, ta, mu (not count) + // vslidedown.vx v8, v8, a0 + // vmv.x.s a0, v8 + return 4; + } + // Extract i64 in the target that has XLEN=32 need more instruction. + if (Val->getScalarType()->isIntegerTy() && + ST->getXLen() < Val->getScalarSizeInBits()) { + // vslidedown.vx v8, v8, a0 + // vmv.x.s a0, v8 + // li a1, 32 + // vsrl.vx v8, v8, a1 + // vmv.x.s a1, v8 + return 5; + } + return 2; +} + void RISCVTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE, TTI::UnrollingPreferences &UP, OptimizationRemarkEmitter *ORE) { diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll --- a/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll @@ -6,16 +6,16 @@ define void @extractelement_int() { ; RV32-LABEL: 'extractelement_int' -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i1_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i1_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 @@ -42,67 +42,67 @@ ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = extractelement undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = extractelement undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_0 = extractelement undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_1 = extractelement <32 x i1> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = extractelement undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_0 = extractelement undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32i1_1 = extractelement <32 x i1> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i1_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i1_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_1 = extractelement undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_1 = extractelement undef, i32 1 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64-LABEL: 'extractelement_int' -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_0 = extractelement undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_0 = extractelement undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_0 = extractelement undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_0 = extractelement undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_0 = extractelement undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i1_0 = extractelement <32 x i1> undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i1_0 = extractelement undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i1_0 = extractelement undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 @@ -135,48 +135,48 @@ ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_0 = extractelement undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = extractelement undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = extractelement undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_1 = extractelement <32 x i1> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_1 = extractelement undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32i1_1 = extractelement <32 x i1> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i1_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i1_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = extractelement undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = extractelement undef, i32 1 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2i1_0 = extractelement <2 x i1> undef, i32 0 @@ -310,28 +310,28 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_0 = extractelement undef, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = extractelement undef, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = extractelement undef, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_1 = extractelement <4 x half> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_1 = extractelement <8 x half> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_1 = extractelement <16 x half> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_1 = extractelement <4 x float> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_1 = extractelement <8 x float> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_1 = extractelement <16 x float> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_1 = extractelement <4 x double> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_1 = extractelement <8 x double> undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_1 = extractelement undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = extractelement <4 x half> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = extractelement <8 x half> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = extractelement <16 x half> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f16_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f16_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = extractelement <4 x float> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = extractelement <8 x float> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = extractelement <16 x float> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f32_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = extractelement <4 x double> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = extractelement <8 x double> undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = extractelement undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = extractelement undef, i32 1 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2f16_0 = extractelement <2 x half> undef, i32 0 diff --git a/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll b/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll --- a/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll +++ b/llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll @@ -6,16 +6,16 @@ define void @insertelement_int() { ; RV32-LABEL: 'insertelement_int' -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_0 = insertelement undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_0 = insertelement undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i1_0 = insertelement undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i1_0 = insertelement undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 @@ -42,67 +42,67 @@ ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_0 = insertelement undef, i32 undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement undef, i32 undef, i32 0 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement undef, i32 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_0 = insertelement undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_1 = insertelement undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_1 = insertelement undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 -; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_0 = insertelement undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i1_1 = insertelement undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i1_1 = insertelement undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 +; RV32-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 ; RV32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64-LABEL: 'insertelement_int' -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_0 = insertelement undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_0 = insertelement undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i1_0 = insertelement <32 x i1> undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i1_0 = insertelement undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i1_0 = insertelement undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 +; RV64-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 @@ -135,48 +135,48 @@ ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_0 = insertelement undef, i64 undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i1_1 = insertelement undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i1_1 = insertelement undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 -; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v32i1_1 = insertelement <32 x i1> undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i1_1 = insertelement undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i1_1 = insertelement undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 +; RV64-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 ; RV64-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 @@ -310,28 +310,28 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_0 = insertelement undef, double undef, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = insertelement undef, double undef, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = insertelement undef, double undef, i32 0 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f16_1 = insertelement undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f16_1 = insertelement undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f16_1 = insertelement undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_1 = insertelement undef, half undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f32_1 = insertelement undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f32_1 = insertelement undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_1 = insertelement undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_1 = insertelement undef, float undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv2f64_1 = insertelement undef, double undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_1 = insertelement undef, double undef, i32 1 -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_1 = insertelement undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f16_1 = insertelement undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f16_1 = insertelement undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = insertelement undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = insertelement undef, half undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f32_1 = insertelement undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = insertelement undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = insertelement undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = insertelement undef, float undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = insertelement undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = insertelement undef, double undef, i32 1 +; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = insertelement undef, double undef, i32 1 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0