Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -1502,9 +1502,6 @@ if (LT.second.isScalableVector() && !LT.first.isValid()) return LT.first; - if (!isTypeLegal(Val)) - return BaseT::getVectorInstrCost(Opcode, Val, CostKind, Index, Op0, Op1); - // Mask vector extract/insert is expanded via e8. if (Val->getScalarSizeInBits() == 1) { VectorType *WideTy = @@ -1529,6 +1526,30 @@ return ExtendCost + InsertCost + TruncCost; } + // Non-immediate extraction/insertion beyond legal LMUL are handled + // as a sequence of aliased loads+stores via the stack. + // TODO: Move this to BasicTTIImpl.h? This code is already duplicated in X86. + if (!isTypeLegal(Val) && + Index == -1U && (Opcode == Instruction::ExtractElement || + Opcode == Instruction::InsertElement)) { + Align VecAlign = DL.getPrefTypeAlign(Val); + Type *ScalarType = Val->getScalarType(); + Align SclAlign = DL.getPrefTypeAlign(ScalarType); + + // Extract - store vector to stack, load scalar. + if (Opcode == Instruction::ExtractElement) { + return getMemoryOpCost(Instruction::Store, Val, VecAlign, 0, CostKind) + + getMemoryOpCost(Instruction::Load, ScalarType, SclAlign, 0, + CostKind); + } + // Insert - store vector to stack, store scalar, load vector. + if (Opcode == Instruction::InsertElement) { + return getMemoryOpCost(Instruction::Store, Val, VecAlign, 0, CostKind) + + getMemoryOpCost(Instruction::Store, ScalarType, SclAlign, 0, + CostKind) + + getMemoryOpCost(Instruction::Load, Val, VecAlign, 0, CostKind); + } + } // In RVV, we could use vslidedown + vmv.x.s to extract element from vector // and vslideup + vmv.s.x to insert element to vector. Index: llvm/test/Analysis/CostModel/RISCV/arith-fp.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/arith-fp.ll +++ llvm/test/Analysis/CostModel/RISCV/arith-fp.ll @@ -332,8 +332,8 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F16 = frem <2 x half> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4F16 = frem <4 x half> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %V8F16 = frem <8 x half> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16F16 = frem <16 x half> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V32F16 = frem <32 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V16F16 = frem <16 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %V32F16 = frem <32 x half> undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV1F16 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV2F16 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV4F16 = frem undef, undef @@ -343,8 +343,8 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F32 = frem <1 x float> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F32 = frem <2 x float> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4F32 = frem <4 x float> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8F32 = frem <8 x float> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16F32 = frem <16 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8F32 = frem <8 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V16F32 = frem <16 x float> undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV1F32 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV2F32 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV4F32 = frem undef, undef @@ -352,8 +352,8 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV16F32 = frem undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F64 = frem <1 x double> undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F64 = frem <2 x double> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4F64 = frem <4 x double> undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8F64 = frem <8 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4F64 = frem <4 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8F64 = frem <8 x double> undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV1F64 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV2F64 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV4F64 = frem undef, undef Index: llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll +++ llvm/test/Analysis/CostModel/RISCV/fixed-vector-gather.ll @@ -42,32 +42,32 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %V4I8 = call <4 x i8> @llvm.masked.gather.v4i8.v4p0(<4 x ptr> undef, i32 1, <4 x i1> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %V2I8 = call <2 x i8> @llvm.masked.gather.v2i8.v2p0(<2 x ptr> undef, i32 1, <2 x i1> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %V1I8 = call <1 x i8> @llvm.masked.gather.v1i8.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x i8> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8F64.u = call <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr> undef, i32 2, <8 x i1> undef, <8 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4F64.u = call <4 x double> @llvm.masked.gather.v4f64.v4p0(<4 x ptr> undef, i32 2, <4 x i1> undef, <4 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8F64.u = call <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr> undef, i32 2, <8 x i1> undef, <8 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4F64.u = call <4 x double> @llvm.masked.gather.v4f64.v4p0(<4 x ptr> undef, i32 2, <4 x i1> undef, <4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F64.u = call <2 x double> @llvm.masked.gather.v2f64.v2p0(<2 x ptr> undef, i32 2, <2 x i1> undef, <2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F64.u = call <1 x double> @llvm.masked.gather.v1f64.v1p0(<1 x ptr> undef, i32 2, <1 x i1> undef, <1 x double> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16F32.u = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> undef, i32 2, <16 x i1> undef, <16 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8F32.u = call <8 x float> @llvm.masked.gather.v8f32.v8p0(<8 x ptr> undef, i32 2, <8 x i1> undef, <8 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V16F32.u = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> undef, i32 2, <16 x i1> undef, <16 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8F32.u = call <8 x float> @llvm.masked.gather.v8f32.v8p0(<8 x ptr> undef, i32 2, <8 x i1> undef, <8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4F32.u = call <4 x float> @llvm.masked.gather.v4f32.v4p0(<4 x ptr> undef, i32 2, <4 x i1> undef, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F32.u = call <2 x float> @llvm.masked.gather.v2f32.v2p0(<2 x ptr> undef, i32 2, <2 x i1> undef, <2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F32.u = call <1 x float> @llvm.masked.gather.v1f32.v1p0(<1 x ptr> undef, i32 2, <1 x i1> undef, <1 x float> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V32F16.u = call <32 x half> @llvm.masked.gather.v32f16.v32p0(<32 x ptr> undef, i32 1, <32 x i1> undef, <32 x half> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16F16.u = call <16 x half> @llvm.masked.gather.v16f16.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x half> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %V32F16.u = call <32 x half> @llvm.masked.gather.v32f16.v32p0(<32 x ptr> undef, i32 1, <32 x i1> undef, <32 x half> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V16F16.u = call <16 x half> @llvm.masked.gather.v16f16.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %V8F16.u = call <8 x half> @llvm.masked.gather.v8f16.v8p0(<8 x ptr> undef, i32 1, <8 x i1> undef, <8 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4F16.u = call <4 x half> @llvm.masked.gather.v4f16.v4p0(<4 x ptr> undef, i32 1, <4 x i1> undef, <4 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2F16.u = call <2 x half> @llvm.masked.gather.v2f16.v2p0(<2 x ptr> undef, i32 1, <2 x i1> undef, <2 x half> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F16.u = call <1 x half> @llvm.masked.gather.v1f16.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x half> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I64.u = call <8 x i64> @llvm.masked.gather.v8i64.v8p0(<8 x ptr> undef, i32 4, <8 x i1> undef, <8 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %V4I64.u = call <4 x i64> @llvm.masked.gather.v4i64.v4p0(<4 x ptr> undef, i32 4, <4 x i1> undef, <4 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: %V8I64.u = call <8 x i64> @llvm.masked.gather.v8i64.v8p0(<8 x ptr> undef, i32 4, <8 x i1> undef, <8 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %V4I64.u = call <4 x i64> @llvm.masked.gather.v4i64.v4p0(<4 x ptr> undef, i32 4, <4 x i1> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2I64.u = call <2 x i64> @llvm.masked.gather.v2i64.v2p0(<2 x ptr> undef, i32 4, <2 x i1> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1I64.u = call <1 x i64> @llvm.masked.gather.v1i64.v1p0(<1 x ptr> undef, i32 4, <1 x i1> undef, <1 x i64> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16I32.u = call <16 x i32> @llvm.masked.gather.v16i32.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %V8I32.u = call <8 x i32> @llvm.masked.gather.v8i32.v8p0(<8 x ptr> undef, i32 1, <8 x i1> undef, <8 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: %V16I32.u = call <16 x i32> @llvm.masked.gather.v16i32.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: %V8I32.u = call <8 x i32> @llvm.masked.gather.v8i32.v8p0(<8 x ptr> undef, i32 1, <8 x i1> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4I32.u = call <4 x i32> @llvm.masked.gather.v4i32.v4p0(<4 x ptr> undef, i32 1, <4 x i1> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2I32.u = call <2 x i32> @llvm.masked.gather.v2i32.v2p0(<2 x ptr> undef, i32 1, <2 x i1> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1I32.u = call <1 x i32> @llvm.masked.gather.v1i32.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x i32> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %V32I16.u = call <32 x i16> @llvm.masked.gather.v32i16.v32p0(<32 x ptr> undef, i32 1, <32 x i1> undef, <32 x i16> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %V16I16.u = call <16 x i16> @llvm.masked.gather.v16i16.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 124 for instruction: %V32I16.u = call <32 x i16> @llvm.masked.gather.v32i16.v32p0(<32 x ptr> undef, i32 1, <32 x i1> undef, <32 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: %V16I16.u = call <16 x i16> @llvm.masked.gather.v16i16.v16p0(<16 x ptr> undef, i32 1, <16 x i1> undef, <16 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: %V8I16.u = call <8 x i16> @llvm.masked.gather.v8i16.v8p0(<8 x ptr> undef, i32 1, <8 x i1> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: %V4I16.u = call <4 x i16> @llvm.masked.gather.v4i16.v4p0(<4 x ptr> undef, i32 1, <4 x i1> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %V2I16.u = call <2 x i16> @llvm.masked.gather.v2i16.v2p0(<2 x ptr> undef, i32 1, <2 x i1> undef, <2 x i16> undef) Index: llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll +++ llvm/test/Analysis/CostModel/RISCV/fixed-vector-scatter.ll @@ -42,32 +42,32 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: call void @llvm.masked.scatter.v4i8.v4p0(<4 x i8> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: call void @llvm.masked.scatter.v2i8.v2p0(<2 x i8> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: call void @llvm.masked.scatter.v1i8.v1p0(<1 x i8> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: call void @llvm.masked.scatter.v8f64.v8p0(<8 x double> undef, <8 x ptr> undef, i32 2, <8 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double> undef, <4 x ptr> undef, i32 2, <4 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: call void @llvm.masked.scatter.v8f64.v8p0(<8 x double> undef, <8 x ptr> undef, i32 2, <8 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: call void @llvm.masked.scatter.v4f64.v4p0(<4 x double> undef, <4 x ptr> undef, i32 2, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2f64.v2p0(<2 x double> undef, <2 x ptr> undef, i32 2, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1f64.v1p0(<1 x double> undef, <1 x ptr> undef, i32 2, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> undef, <16 x ptr> undef, i32 2, <16 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: call void @llvm.masked.scatter.v8f32.v8p0(<8 x float> undef, <8 x ptr> undef, i32 2, <8 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> undef, <16 x ptr> undef, i32 2, <16 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: call void @llvm.masked.scatter.v8f32.v8p0(<8 x float> undef, <8 x ptr> undef, i32 2, <8 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: call void @llvm.masked.scatter.v4f32.v4p0(<4 x float> undef, <4 x ptr> undef, i32 2, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2f32.v2p0(<2 x float> undef, <2 x ptr> undef, i32 2, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1f32.v1p0(<1 x float> undef, <1 x ptr> undef, i32 2, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 96 for instruction: call void @llvm.masked.scatter.v32f16.v32p0(<32 x half> undef, <32 x ptr> undef, i32 1, <32 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: call void @llvm.masked.scatter.v16f16.v16p0(<16 x half> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 124 for instruction: call void @llvm.masked.scatter.v32f16.v32p0(<32 x half> undef, <32 x ptr> undef, i32 1, <32 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: call void @llvm.masked.scatter.v16f16.v16p0(<16 x half> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: call void @llvm.masked.scatter.v8f16.v8p0(<8 x half> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: call void @llvm.masked.scatter.v4f16.v4p0(<4 x half> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2f16.v2p0(<2 x half> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1f16.v1p0(<1 x half> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: call void @llvm.masked.scatter.v8i64.v8p0(<8 x i64> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 12 for instruction: call void @llvm.masked.scatter.v4i64.v4p0(<4 x i64> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 28 for instruction: call void @llvm.masked.scatter.v8i64.v8p0(<8 x i64> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: call void @llvm.masked.scatter.v4i64.v4p0(<4 x i64> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2i64.v2p0(<2 x i64> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1i64.v1p0(<1 x i64> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: call void @llvm.masked.scatter.v16i32.v16p0(<16 x i32> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 24 for instruction: call void @llvm.masked.scatter.v8i32.v8p0(<8 x i32> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 60 for instruction: call void @llvm.masked.scatter.v16i32.v16p0(<16 x i32> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 30 for instruction: call void @llvm.masked.scatter.v8i32.v8p0(<8 x i32> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: call void @llvm.masked.scatter.v4i32.v4p0(<4 x i32> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2i32.v2p0(<2 x i32> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1i32.v1p0(<1 x i32> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 96 for instruction: call void @llvm.masked.scatter.v32i16.v32p0(<32 x i16> undef, <32 x ptr> undef, i32 1, <32 x i1> undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 48 for instruction: call void @llvm.masked.scatter.v16i16.v16p0(<16 x i16> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 124 for instruction: call void @llvm.masked.scatter.v32i16.v32p0(<32 x i16> undef, <32 x ptr> undef, i32 1, <32 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 62 for instruction: call void @llvm.masked.scatter.v16i16.v16p0(<16 x i16> undef, <16 x ptr> undef, i32 1, <16 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 31 for instruction: call void @llvm.masked.scatter.v8i16.v8p0(<8 x i16> undef, <8 x ptr> undef, i32 1, <8 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 15 for instruction: call void @llvm.masked.scatter.v4i16.v4p0(<4 x i16> undef, <4 x ptr> undef, i32 1, <4 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 7 for instruction: call void @llvm.masked.scatter.v2i16.v2p0(<2 x i16> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) Index: llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll +++ llvm/test/Analysis/CostModel/RISCV/rvv-extractelement.ll @@ -61,7 +61,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_0 = extractelement undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 @@ -85,7 +85,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 @@ -97,7 +97,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 @@ -107,7 +107,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 @@ -115,7 +115,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_x = extractelement <4 x i1> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_x = extractelement <8 x i1> undef, i32 %x @@ -139,7 +139,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv128i8_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_x = extractelement <4 x i16> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_x = extractelement <8 x i16> undef, i32 %x @@ -151,7 +151,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_x = extractelement <4 x i32> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_x = extractelement <8 x i32> undef, i32 %x @@ -161,7 +161,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32i32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = extractelement <4 x i64> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = extractelement <8 x i64> undef, i32 %x @@ -169,7 +169,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %nxv16i64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_int' @@ -250,7 +250,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 @@ -262,7 +262,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 @@ -272,7 +272,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 @@ -280,7 +280,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_x = extractelement <4 x i1> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_x = extractelement <8 x i1> undef, i32 %x @@ -304,7 +304,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv128i8_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_x = extractelement <4 x i16> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_x = extractelement <8 x i16> undef, i32 %x @@ -316,7 +316,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_x = extractelement <4 x i32> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_x = extractelement <8 x i32> undef, i32 %x @@ -326,7 +326,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32i32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_x = extractelement <4 x i64> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_x = extractelement <8 x i64> undef, i32 %x @@ -334,7 +334,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv16i64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_int' @@ -387,11 +387,11 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_0 = extractelement <16 x i64> undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i64_0 = extractelement <16 x i64> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_0 = extractelement undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_0 = extractelement undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 @@ -408,44 +408,44 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = extractelement <64 x i8> undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_1 = extractelement <128 x i8> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = extractelement <128 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = extractelement undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = extractelement undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = extractelement <32 x i16> undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_1 = extractelement <64 x i16> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = extractelement <64 x i16> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = extractelement undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = extractelement undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_1 = extractelement <32 x i32> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = extractelement <32 x i32> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = extractelement undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_1 = extractelement undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = extractelement undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i64_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_x = extractelement <4 x i1> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_x = extractelement <8 x i1> undef, i32 %x @@ -462,44 +462,44 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_x = extractelement <32 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_x = extractelement <64 x i8> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_x = extractelement <128 x i8> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v128i8_x = extractelement <128 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = extractelement undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv128i8_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_x = extractelement <4 x i16> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_x = extractelement <8 x i16> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_x = extractelement <16 x i16> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_x = extractelement <32 x i16> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_x = extractelement <64 x i16> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v64i16_x = extractelement <64 x i16> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = extractelement undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i16_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_x = extractelement <4 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_x = extractelement <8 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_x = extractelement <16 x i32> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_x = extractelement <32 x i32> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v32i32_x = extractelement <32 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = extractelement undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32i32_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = extractelement <4 x i64> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = extractelement <8 x i64> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = extractelement undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 18 for instruction: %nxv16i64_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_int' @@ -573,44 +573,44 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = extractelement <32 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = extractelement <64 x i8> undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_1 = extractelement <128 x i8> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = extractelement <128 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = extractelement undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = extractelement undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = extractelement <2 x i16> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = extractelement <4 x i16> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = extractelement <8 x i16> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = extractelement <32 x i16> undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_1 = extractelement <64 x i16> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = extractelement <64 x i16> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = extractelement undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = extractelement undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = extractelement <2 x i32> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = extractelement <4 x i32> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = extractelement <8 x i32> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_1 = extractelement <32 x i32> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = extractelement <32 x i32> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = extractelement undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = extractelement undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = extractelement <4 x i64> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = extractelement <8 x i64> undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = extractelement undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_1 = extractelement undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_x = extractelement <4 x i1> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_x = extractelement <8 x i1> undef, i32 %x @@ -627,44 +627,44 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_x = extractelement <32 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_x = extractelement <64 x i8> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_x = extractelement <128 x i8> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v128i8_x = extractelement <128 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = extractelement undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv128i8_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_x = extractelement <4 x i16> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_x = extractelement <8 x i16> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_x = extractelement <16 x i16> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_x = extractelement <32 x i16> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_x = extractelement <64 x i16> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v64i16_x = extractelement <64 x i16> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = extractelement undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64i16_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_x = extractelement <4 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_x = extractelement <8 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_x = extractelement <16 x i32> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_x = extractelement <32 x i32> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v32i32_x = extractelement <32 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = extractelement undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32i32_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_x = extractelement <4 x i64> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_x = extractelement <8 x i64> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = extractelement undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv16i64_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2i1_0 = extractelement <2 x i1> undef, i32 0 @@ -868,68 +868,68 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_int_lmul' ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_int_lmul' -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_int_lmul' -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = extractelement <128 x i8> undef, i32 31 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = extractelement <128 x i8> undef, i32 63 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = extractelement <128 x i8> undef, i32 127 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = extractelement <256 x i8> undef, i32 127 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = extractelement <256 x i8> undef, i32 255 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = extractelement <32 x i32> undef, i32 3 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = extractelement <32 x i32> undef, i32 7 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = extractelement <32 x i32> undef, i32 15 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = extractelement <32 x i32> undef, i32 31 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = extractelement <64 x i32> undef, i32 63 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v128i8 = extractelement <128 x i8> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v256i8 = extractelement <256 x i8> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %v32i32 = extractelement <32 x i32> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i32 = extractelement <64 x i32> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v128i8_31 = extractelement <128 x i8> undef, i32 31 @@ -997,7 +997,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = extractelement <4 x float> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = extractelement <8 x float> undef, i32 1 @@ -1007,7 +1007,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = extractelement <4 x double> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = extractelement <8 x double> undef, i32 1 @@ -1015,7 +1015,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_1 = extractelement undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_x = extractelement <2 x half> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_x = extractelement <4 x half> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_x = extractelement <8 x half> undef, i32 %x @@ -1027,7 +1027,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64f16_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_x = extractelement <2 x float> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_x = extractelement <4 x float> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_x = extractelement <8 x float> undef, i32 %x @@ -1037,7 +1037,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32f32_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_x = extractelement <2 x double> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_x = extractelement <4 x double> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_x = extractelement <8 x double> undef, i32 %x @@ -1045,7 +1045,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = extractelement undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv16f64_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_fp' @@ -1090,7 +1090,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = extractelement <2 x float> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = extractelement <4 x float> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = extractelement <8 x float> undef, i32 1 @@ -1100,7 +1100,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = extractelement <2 x double> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = extractelement <4 x double> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = extractelement <8 x double> undef, i32 1 @@ -1108,7 +1108,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_1 = extractelement undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_x = extractelement <2 x half> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_x = extractelement <4 x half> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_x = extractelement <8 x half> undef, i32 %x @@ -1120,7 +1120,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv64f16_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_x = extractelement <2 x float> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_x = extractelement <4 x float> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_x = extractelement <8 x float> undef, i32 %x @@ -1130,7 +1130,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv32f32_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_x = extractelement <2 x double> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_x = extractelement <4 x double> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_x = extractelement <8 x double> undef, i32 %x @@ -1138,7 +1138,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = extractelement undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 17 for instruction: %nxv16f64_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_fp' Index: llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll +++ llvm/test/Analysis/CostModel/RISCV/rvv-insertelement.ll @@ -61,7 +61,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_0 = insertelement undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 @@ -85,7 +85,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement undef, i8 undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 @@ -97,7 +97,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement undef, i16 undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 @@ -107,7 +107,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 @@ -115,7 +115,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x @@ -139,7 +139,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement undef, i8 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x @@ -151,7 +151,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement undef, i16 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement undef, i16 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement undef, i16 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x @@ -161,7 +161,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement undef, i32 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x @@ -169,7 +169,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = insertelement undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_int' @@ -250,7 +250,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement undef, i8 undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 @@ -262,7 +262,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement undef, i16 undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 @@ -272,7 +272,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 @@ -280,7 +280,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x @@ -304,7 +304,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement undef, i8 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x @@ -316,7 +316,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement undef, i16 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement undef, i16 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement undef, i16 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x @@ -326,7 +326,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement undef, i32 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x @@ -334,7 +334,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_x = insertelement undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_int' @@ -387,11 +387,11 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_0 = insertelement undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 @@ -408,44 +408,44 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement undef, i8 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement undef, i16 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x @@ -462,44 +462,44 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement undef, i8 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement undef, i16 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement undef, i32 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv2i64_x = insertelement undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 34 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_int' @@ -573,44 +573,44 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i8_1 = insertelement <32 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i8_1 = insertelement <64 x i8> undef, i8 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_1 = insertelement <128 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i8_1 = insertelement undef, i8 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv128i8_1 = insertelement undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i16_1 = insertelement <4 x i16> undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i16_1 = insertelement <8 x i16> undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i16_1 = insertelement <32 x i16> undef, i16 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i16_1 = insertelement <64 x i16> undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i16_1 = insertelement undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i16_1 = insertelement undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i16_1 = insertelement undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i16_1 = insertelement undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i16_1 = insertelement undef, i16 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64i16_1 = insertelement undef, i16 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i32_1 = insertelement <4 x i32> undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i32_1 = insertelement <8 x i32> undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_1 = insertelement <32 x i32> undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i32_1 = insertelement undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i32_1 = insertelement undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i32_1 = insertelement undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i32_1 = insertelement undef, i32 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32i32_1 = insertelement undef, i32 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i64_1 = insertelement <4 x i64> undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i64_1 = insertelement <8 x i64> undef, i64 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2i64_1 = insertelement undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4i64_1 = insertelement undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8i64_1 = insertelement undef, i64 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16i64_1 = insertelement undef, i64 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v4i1_x = insertelement <4 x i1> undef, i1 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v8i1_x = insertelement <8 x i1> undef, i1 undef, i32 %x @@ -627,44 +627,44 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i8_x = insertelement <32 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v64i8_x = insertelement <64 x i8> undef, i8 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v128i8_x = insertelement <128 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv64i8_x = insertelement undef, i8 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv128i8_x = insertelement undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i16_x = insertelement <4 x i16> undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i16_x = insertelement <8 x i16> undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i16_x = insertelement <32 x i16> undef, i16 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i16_x = insertelement <64 x i16> undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i16_x = insertelement undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i16_x = insertelement undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i16_x = insertelement undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i16_x = insertelement undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i16_x = insertelement undef, i16 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64i16_x = insertelement undef, i16 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i32_x = insertelement <4 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i32_x = insertelement <8 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v32i32_x = insertelement <32 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i32_x = insertelement undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i32_x = insertelement undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i32_x = insertelement undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i32_x = insertelement undef, i32 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32i32_x = insertelement undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i64_x = insertelement <4 x i64> undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i64_x = insertelement <8 x i64> undef, i64 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2i64_x = insertelement undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4i64_x = insertelement undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i64_x = insertelement undef, i64 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv16i64_x = insertelement undef, i64 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 @@ -868,68 +868,68 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_int_lmul' ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_int_lmul' -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_int_lmul' -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_63 = insertelement <128 x i8> undef, i8 undef, i32 63 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v128i8_127 = insertelement <128 x i8> undef, i8 undef, i32 127 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_127 = insertelement <256 x i8> undef, i8 undef, i32 127 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v256i8_255 = insertelement <256 x i8> undef, i8 undef, i32 255 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_3 = insertelement <32 x i32> undef, i32 undef, i32 3 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_7 = insertelement <32 x i32> undef, i32 undef, i32 7 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_15 = insertelement <32 x i32> undef, i32 undef, i32 15 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v32i32_31 = insertelement <32 x i32> undef, i32 undef, i32 31 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v64i32_63 = insertelement <64 x i32> undef, i32 undef, i32 63 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v128i8 = insertelement <128 x i8> undef, i8 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %v256i8 = insertelement <256 x i8> undef, i8 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %v32i32 = insertelement <32 x i32> undef, i32 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 65 for instruction: %v64i32 = insertelement <64 x i32> undef, i32 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; %v128i8_31 = insertelement <128 x i8> undef, i8 undef, i32 31 @@ -997,7 +997,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = insertelement undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = insertelement undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = insertelement undef, half undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_1 = insertelement undef, half undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = insertelement undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1 @@ -1007,7 +1007,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = insertelement undef, float undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = insertelement undef, float undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = insertelement undef, float undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_1 = insertelement undef, float undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = insertelement undef, float undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1 @@ -1015,7 +1015,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = insertelement undef, double undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = insertelement undef, double undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = insertelement undef, double undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_1 = insertelement undef, double undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = insertelement undef, double undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x @@ -1027,7 +1027,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f16_x = insertelement undef, half undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16f16_x = insertelement undef, half undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32f16_x = insertelement undef, half undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_x = insertelement undef, half undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64f16_x = insertelement undef, half undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x @@ -1037,7 +1037,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f32_x = insertelement undef, float undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f32_x = insertelement undef, float undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16f32_x = insertelement undef, float undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_x = insertelement undef, float undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32f32_x = insertelement undef, float undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x @@ -1045,7 +1045,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2f64_x = insertelement undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_fp' @@ -1090,7 +1090,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f16_1 = insertelement undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f16_1 = insertelement undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f16_1 = insertelement undef, half undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_1 = insertelement undef, half undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv64f16_1 = insertelement undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f32_1 = insertelement <4 x float> undef, float undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f32_1 = insertelement <8 x float> undef, float undef, i32 1 @@ -1100,7 +1100,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f32_1 = insertelement undef, float undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f32_1 = insertelement undef, float undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f32_1 = insertelement undef, float undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_1 = insertelement undef, float undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv32f32_1 = insertelement undef, float undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f64_1 = insertelement <4 x double> undef, double undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f64_1 = insertelement <8 x double> undef, double undef, i32 1 @@ -1108,7 +1108,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv2f64_1 = insertelement undef, double undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv4f64_1 = insertelement undef, double undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv8f64_1 = insertelement undef, double undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_1 = insertelement undef, double undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %nxv16f64_1 = insertelement undef, double undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f16_x = insertelement <4 x half> undef, half undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f16_x = insertelement <8 x half> undef, half undef, i32 %x @@ -1120,7 +1120,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f16_x = insertelement undef, half undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16f16_x = insertelement undef, half undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32f16_x = insertelement undef, half undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_x = insertelement undef, half undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv64f16_x = insertelement undef, half undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f32_x = insertelement <4 x float> undef, float undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f32_x = insertelement <8 x float> undef, float undef, i32 %x @@ -1130,7 +1130,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f32_x = insertelement undef, float undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f32_x = insertelement undef, float undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16f32_x = insertelement undef, float undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_x = insertelement undef, float undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv32f32_x = insertelement undef, float undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4f64_x = insertelement <4 x double> undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8f64_x = insertelement <8 x double> undef, double undef, i32 %x @@ -1138,7 +1138,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv2f64_x = insertelement undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv4f64_x = insertelement undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8f64_x = insertelement undef, double undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 33 for instruction: %nxv16f64_x = insertelement undef, double undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_fp'