Index: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp +++ llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp @@ -1516,6 +1516,14 @@ // TODO: should we count these special vsetvlis? BaseCost = Opcode == Instruction::InsertElement ? 3 : 4; } + + // This interface is primarily used by SLP to weight vectorization decisions. + // By artificially bumping the cost for very short vectors, we bias SLP + // strongly away from producing partially vectorized trees at small VLs. + if (auto *FVTy = dyn_cast(Val); + FVTy && FVTy->getNumElements() < 4) + BaseCost += 2; + return BaseCost + SlideCost; } 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 @@ -328,8 +328,8 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %F16 = frem half undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %F32 = frem float undef, undef ; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %F64 = frem double undef, undef -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1F16 = frem <1 x half> undef, undef -; 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 5 for instruction: %V1F16 = frem <1 x half> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 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 @@ -340,8 +340,8 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV8F16 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV16F16 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV32F16 = frem undef, undef -; 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 5 for instruction: %V1F32 = frem <1 x float> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 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 @@ -350,8 +350,8 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV4F32 = frem undef, undef ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %NXV8F32 = frem undef, undef ; 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 5 for instruction: %V1F64 = frem <1 x double> undef, undef +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 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: Invalid cost for instruction: %NXV1F64 = 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 @@ -44,34 +44,34 @@ ; 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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) -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %V1I16.u = call <1 x i16> @llvm.masked.gather.v1i16.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 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) +; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %V1I16.u = call <1 x i16> @llvm.masked.gather.v1i16.v1p0(<1 x ptr> undef, i32 1, <1 x i1> undef, <1 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 ; %V8F64 = call <8 x double> @llvm.masked.gather.v8f64.v8p0(<8 x ptr> undef, i32 8, <8 x i1> undef, <8 x double> 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 @@ -44,34 +44,34 @@ ; 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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 11 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 5 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 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) -; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: call void @llvm.masked.scatter.v1i16.v1p0(<1 x i16> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: call void @llvm.masked.scatter.v2i16.v2p0(<2 x i16> undef, <2 x ptr> undef, i32 1, <2 x i1> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: call void @llvm.masked.scatter.v1i16.v1p0(<1 x i16> undef, <1 x ptr> undef, i32 1, <1 x i1> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 0 ; call void @llvm.masked.scatter.v8f64.v8p0(<8 x double> undef, <8 x ptr> undef, i32 8, <8 x i1> undef) Index: llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll +++ llvm/test/Analysis/CostModel/RISCV/fp-min-max-abs.ll @@ -158,7 +158,7 @@ define void @minimum() { ; CHECK-LABEL: 'minimum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.minimum.f32(float undef, float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.minimum.v2f32(<2 x float> undef, <2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.minimum.v4f32(<4 x float> undef, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.minimum.v8f32(<8 x float> undef, <8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.minimum.v16f32(<16 x float> undef, <16 x float> undef) @@ -168,7 +168,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.minimum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.minimum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.minimum.f64(double undef, double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.minimum.v2f64(<2 x double> undef, <2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.minimum.v2f64(<2 x double> undef, <2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.minimum.v4f64(<4 x double> undef, <4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.minimum.v8f64(<8 x double> undef, <8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.minimum.v16f64(<16 x double> undef, <16 x double> undef) @@ -203,7 +203,7 @@ define void @maximum() { ; CHECK-LABEL: 'maximum' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.maximum.f32(float undef, float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.maximum.v2f32(<2 x float> undef, <2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.maximum.v4f32(<4 x float> undef, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.maximum.v8f32(<8 x float> undef, <8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.maximum.v16f32(<16 x float> undef, <16 x float> undef) @@ -213,7 +213,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.maximum.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.maximum.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.maximum.f64(double undef, double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.maximum.v2f64(<2 x double> undef, <2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.maximum.v2f64(<2 x double> undef, <2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.maximum.v4f64(<4 x double> undef, <4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.maximum.v8f64(<8 x double> undef, <8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.maximum.v16f64(<16 x double> undef, <16 x double> undef) Index: llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll +++ llvm/test/Analysis/CostModel/RISCV/fp-sqrt-pow.ll @@ -96,7 +96,7 @@ define void @pow() { ; CHECK-LABEL: 'pow' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.pow.f32(float undef, float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.pow.v2f32(<2 x float> undef, <2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.pow.v2f32(<2 x float> undef, <2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.pow.v4f32(<4 x float> undef, <4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.pow.v8f32(<8 x float> undef, <8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.pow.v16f32(<16 x float> undef, <16 x float> undef) @@ -106,7 +106,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.pow.nxv8f32( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.pow.nxv16f32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.pow.f64(double undef, double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.pow.v2f64(<2 x double> undef, <2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.pow.v2f64(<2 x double> undef, <2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.pow.v4f64(<4 x double> undef, <4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.pow.v8f64(<8 x double> undef, <8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.pow.v16f64(<16 x double> undef, <16 x double> undef) Index: llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll +++ llvm/test/Analysis/CostModel/RISCV/fp-trig-log-exp.ll @@ -4,7 +4,7 @@ define void @sin() { ; CHECK-LABEL: 'sin' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.sin.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.sin.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.sin.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.sin.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.sin.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.sin.v16f32(<16 x float> undef) @@ -14,7 +14,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.sin.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.sin.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.sin.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.sin.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.sin.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.sin.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.sin.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.sin.v16f64(<16 x double> undef) @@ -49,7 +49,7 @@ define void @cos() { ; CHECK-LABEL: 'cos' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.cos.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.cos.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.cos.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.cos.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.cos.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.cos.v16f32(<16 x float> undef) @@ -59,7 +59,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.cos.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.cos.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.cos.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.cos.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.cos.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.cos.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.cos.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.cos.v16f64(<16 x double> undef) @@ -94,7 +94,7 @@ define void @exp() { ; CHECK-LABEL: 'exp' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.exp.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.exp.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.exp.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.exp.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.exp.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.exp.v16f32(<16 x float> undef) @@ -104,7 +104,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.exp.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.exp.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.exp.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.exp.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.exp.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.exp.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.exp.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.exp.v16f64(<16 x double> undef) @@ -139,7 +139,7 @@ define void @exp2() { ; CHECK-LABEL: 'exp2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.exp2.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.exp2.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.exp2.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.exp2.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.exp2.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.exp2.v16f32(<16 x float> undef) @@ -149,7 +149,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.exp2.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.exp2.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.exp2.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.exp2.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.exp2.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.exp2.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.exp2.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.exp2.v16f64(<16 x double> undef) @@ -184,7 +184,7 @@ define void @log() { ; CHECK-LABEL: 'log' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.log.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.log.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.log.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.log.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.log.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.log.v16f32(<16 x float> undef) @@ -194,7 +194,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.log.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.log.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.log.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.log.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.log.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.log.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.log.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.log.v16f64(<16 x double> undef) @@ -229,7 +229,7 @@ define void @log10() { ; CHECK-LABEL: 'log10' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.log10.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.log10.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.log10.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.log10.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.log10.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.log10.v16f32(<16 x float> undef) @@ -239,7 +239,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.log10.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.log10.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.log10.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.log10.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.log10.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.log10.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.log10.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.log10.v16f64(<16 x double> undef) @@ -274,7 +274,7 @@ define void @log2() { ; CHECK-LABEL: 'log2' ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %1 = call float @llvm.log2.f32(float undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %2 = call <2 x float> @llvm.log2.v2f32(<2 x float> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %2 = call <2 x float> @llvm.log2.v2f32(<2 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %3 = call <4 x float> @llvm.log2.v4f32(<4 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %4 = call <8 x float> @llvm.log2.v8f32(<8 x float> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %5 = call <16 x float> @llvm.log2.v16f32(<16 x float> undef) @@ -284,7 +284,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.log2.nxv8f32( undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %10 = call @llvm.log2.nxv16f32( undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %11 = call double @llvm.log2.f64(double undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %12 = call <2 x double> @llvm.log2.v2f64(<2 x double> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 27 for instruction: %12 = call <2 x double> @llvm.log2.v2f64(<2 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %13 = call <4 x double> @llvm.log2.v4f64(<4 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 95 for instruction: %14 = call <8 x double> @llvm.log2.v8f64(<8 x double> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 191 for instruction: %15 = call <16 x double> @llvm.log2.v16f64(<16 x double> undef) Index: llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll +++ llvm/test/Analysis/CostModel/RISCV/int-sat-math.ll @@ -312,7 +312,7 @@ define void @ushl.sat() { ; CHECK-LABEL: 'ushl.sat' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call i8 @llvm.ushl.sat.i8(i8 undef, i8 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %2 = call <2 x i8> @llvm.ushl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %2 = call <2 x i8> @llvm.ushl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %3 = call <4 x i8> @llvm.ushl.sat.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %4 = call <8 x i8> @llvm.ushl.sat.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x i8> @llvm.ushl.sat.v16i8(<16 x i8> undef, <16 x i8> undef) @@ -321,7 +321,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.ushl.sat.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.ushl.sat.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call i16 @llvm.ushl.sat.i16(i16 undef, i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %11 = call <2 x i16> @llvm.ushl.sat.v2i16(<2 x i16> undef, <2 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %11 = call <2 x i16> @llvm.ushl.sat.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %12 = call <4 x i16> @llvm.ushl.sat.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %13 = call <8 x i16> @llvm.ushl.sat.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %14 = call <16 x i16> @llvm.ushl.sat.v16i16(<16 x i16> undef, <16 x i16> undef) @@ -330,7 +330,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.ushl.sat.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.ushl.sat.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call i32 @llvm.ushl.sat.i32(i32 undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %20 = call <2 x i32> @llvm.ushl.sat.v2i32(<2 x i32> undef, <2 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %20 = call <2 x i32> @llvm.ushl.sat.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %21 = call <4 x i32> @llvm.ushl.sat.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %22 = call <8 x i32> @llvm.ushl.sat.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %23 = call <16 x i32> @llvm.ushl.sat.v16i32(<16 x i32> undef, <16 x i32> undef) @@ -339,7 +339,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.ushl.sat.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.ushl.sat.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call i64 @llvm.ushl.sat.i64(i64 undef, i64 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %29 = call <2 x i64> @llvm.ushl.sat.v2i64(<2 x i64> undef, <2 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %29 = call <2 x i64> @llvm.ushl.sat.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %30 = call <4 x i64> @llvm.ushl.sat.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %31 = call <8 x i64> @llvm.ushl.sat.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %32 = call <16 x i64> @llvm.ushl.sat.v16i64(<16 x i64> undef, <16 x i64> undef) @@ -389,7 +389,7 @@ define void @sshl.sat() { ; CHECK-LABEL: 'sshl.sat' ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = call i8 @llvm.sshl.sat.i8(i8 undef, i8 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %2 = call <2 x i8> @llvm.sshl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %2 = call <2 x i8> @llvm.sshl.sat.v2i8(<2 x i8> undef, <2 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %3 = call <4 x i8> @llvm.sshl.sat.v4i8(<4 x i8> undef, <4 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %4 = call <8 x i8> @llvm.sshl.sat.v8i8(<8 x i8> undef, <8 x i8> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %5 = call <16 x i8> @llvm.sshl.sat.v16i8(<16 x i8> undef, <16 x i8> undef) @@ -398,7 +398,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %8 = call @llvm.sshl.sat.nxv8i8( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %9 = call @llvm.sshl.sat.nxv16i8( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = call i16 @llvm.sshl.sat.i16(i16 undef, i16 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %11 = call <2 x i16> @llvm.sshl.sat.v2i16(<2 x i16> undef, <2 x i16> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %11 = call <2 x i16> @llvm.sshl.sat.v2i16(<2 x i16> undef, <2 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %12 = call <4 x i16> @llvm.sshl.sat.v4i16(<4 x i16> undef, <4 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %13 = call <8 x i16> @llvm.sshl.sat.v8i16(<8 x i16> undef, <8 x i16> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %14 = call <16 x i16> @llvm.sshl.sat.v16i16(<16 x i16> undef, <16 x i16> undef) @@ -407,7 +407,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %17 = call @llvm.sshl.sat.nxv8i16( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %18 = call @llvm.sshl.sat.nxv16i16( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = call i32 @llvm.sshl.sat.i32(i32 undef, i32 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %20 = call <2 x i32> @llvm.sshl.sat.v2i32(<2 x i32> undef, <2 x i32> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %20 = call <2 x i32> @llvm.sshl.sat.v2i32(<2 x i32> undef, <2 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %21 = call <4 x i32> @llvm.sshl.sat.v4i32(<4 x i32> undef, <4 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %22 = call <8 x i32> @llvm.sshl.sat.v8i32(<8 x i32> undef, <8 x i32> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %23 = call <16 x i32> @llvm.sshl.sat.v16i32(<16 x i32> undef, <16 x i32> undef) @@ -416,7 +416,7 @@ ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %26 = call @llvm.sshl.sat.nxv8i32( undef, undef) ; CHECK-NEXT: Cost Model: Invalid cost for instruction: %27 = call @llvm.sshl.sat.nxv16i32( undef, undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = call i64 @llvm.sshl.sat.i64(i64 undef, i64 undef) -; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %29 = call <2 x i64> @llvm.sshl.sat.v2i64(<2 x i64> undef, <2 x i64> undef) +; CHECK-NEXT: Cost Model: Found an estimated cost of 9 for instruction: %29 = call <2 x i64> @llvm.sshl.sat.v2i64(<2 x i64> undef, <2 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %30 = call <4 x i64> @llvm.sshl.sat.v4i64(<4 x i64> undef, <4 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 23 for instruction: %31 = call <8 x i64> @llvm.sshl.sat.v8i64(<8 x i64> undef, <8 x i64> undef) ; CHECK-NEXT: Cost Model: Found an estimated cost of 47 for instruction: %32 = call <16 x i64> @llvm.sshl.sat.v16i64(<16 x i64> undef, <16 x i64> 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 @@ -8,7 +8,7 @@ define void @extractelement_int(i32 %x) { ; RV32V-LABEL: 'extractelement_int' -; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 @@ -18,7 +18,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0 @@ -32,7 +32,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0 @@ -44,7 +44,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0 @@ -54,7 +54,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i64_0 = extractelement <16 x i64> undef, i32 0 @@ -62,7 +62,7 @@ ; 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: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 @@ -72,7 +72,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 @@ -86,7 +86,7 @@ ; 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: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 @@ -98,7 +98,7 @@ ; 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: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 @@ -108,7 +108,7 @@ ; 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 5 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 7 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 @@ -116,7 +116,7 @@ ; 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 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_x = extractelement <16 x i1> undef, i32 %x @@ -126,7 +126,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_x = extractelement undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_x = extractelement undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_x = extractelement <4 x i8> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_x = extractelement <8 x i8> undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x @@ -140,7 +140,7 @@ ; 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 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_x = extractelement <16 x i16> undef, i32 %x @@ -152,7 +152,7 @@ ; 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 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_x = extractelement <16 x i32> undef, i32 %x @@ -162,7 +162,7 @@ ; 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 5 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 7 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x @@ -173,7 +173,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_int' -; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 @@ -183,7 +183,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0 @@ -197,7 +197,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0 @@ -209,7 +209,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0 @@ -219,7 +219,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = extractelement <16 x i64> undef, i32 0 @@ -227,7 +227,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 @@ -237,7 +237,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 @@ -251,7 +251,7 @@ ; 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: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = extractelement <16 x i16> undef, i32 1 @@ -263,7 +263,7 @@ ; 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: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = extractelement <16 x i32> undef, i32 1 @@ -273,7 +273,7 @@ ; 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: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = extractelement <16 x i64> undef, i32 1 @@ -281,7 +281,7 @@ ; 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 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_x = extractelement <16 x i1> undef, i32 %x @@ -291,7 +291,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_x = extractelement undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_x = extractelement undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_x = extractelement <4 x i8> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_x = extractelement <8 x i8> undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x @@ -305,7 +305,7 @@ ; 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 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_x = extractelement <16 x i16> undef, i32 %x @@ -317,7 +317,7 @@ ; 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 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_x = extractelement <16 x i32> undef, i32 %x @@ -327,7 +327,7 @@ ; 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 2 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_x = extractelement <16 x i64> undef, i32 %x @@ -338,7 +338,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'extractelement_int' -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 @@ -348,7 +348,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0 @@ -362,7 +362,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = extractelement undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0 @@ -374,7 +374,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = extractelement undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0 @@ -384,7 +384,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = extractelement undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = extractelement undef, i32 0 -; 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 6 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 @@ -392,7 +392,7 @@ ; 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: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 @@ -402,7 +402,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 @@ -416,7 +416,7 @@ ; 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: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -428,7 +428,7 @@ ; 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: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -438,7 +438,7 @@ ; 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 5 for instruction: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 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 @@ -446,7 +446,7 @@ ; 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 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_x = extractelement <16 x i1> undef, i32 %x @@ -456,7 +456,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_x = extractelement undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_x = extractelement undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_x = extractelement <4 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_x = extractelement <8 x i8> undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x @@ -470,7 +470,7 @@ ; 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 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -482,7 +482,7 @@ ; 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 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -492,7 +492,7 @@ ; 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 5 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 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 @@ -503,7 +503,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'extractelement_int' -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = extractelement <2 x i1> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i1_0 = extractelement <4 x i1> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i1_0 = extractelement <8 x i1> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i1_0 = extractelement <16 x i1> undef, i32 0 @@ -513,7 +513,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv8i1_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv16i1_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %nxv32i1_0 = extractelement undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = extractelement <2 x i8> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = extractelement <4 x i8> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = extractelement <8 x i8> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = extractelement <16 x i8> undef, i32 0 @@ -527,7 +527,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = extractelement undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = extractelement <2 x i16> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = extractelement <4 x i16> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = extractelement <8 x i16> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = extractelement <16 x i16> undef, i32 0 @@ -539,7 +539,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = extractelement undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = extractelement <2 x i32> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = extractelement <4 x i32> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = extractelement <8 x i32> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = extractelement <16 x i32> undef, i32 0 @@ -549,7 +549,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = extractelement undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = extractelement <2 x i64> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = extractelement <4 x i64> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = extractelement <8 x i64> undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = extractelement <16 x i64> undef, i32 0 @@ -557,7 +557,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = extractelement undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = extractelement undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = extractelement <2 x i1> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v4i1_1 = extractelement <4 x i1> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v8i1_1 = extractelement <8 x i1> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_1 = extractelement <16 x i1> undef, i32 1 @@ -567,7 +567,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_1 = extractelement undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_1 = extractelement undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = extractelement <2 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = extractelement <4 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = extractelement <8 x i8> undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = extractelement <16 x i8> undef, i32 1 @@ -581,7 +581,7 @@ ; 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: %v2i16_1 = extractelement <2 x i16> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -593,7 +593,7 @@ ; 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: %v2i32_1 = extractelement <2 x i32> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -603,7 +603,7 @@ ; 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: %v2i64_1 = extractelement <2 x i64> undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -611,7 +611,7 @@ ; 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 4 for instruction: %v2i1_x = extractelement <2 x i1> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i1_x = extractelement <16 x i1> undef, i32 %x @@ -621,7 +621,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv8i1_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv16i1_x = extractelement undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %nxv32i1_x = extractelement undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_x = extractelement <2 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_x = extractelement <4 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_x = extractelement <8 x i8> undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_x = extractelement <16 x i8> undef, i32 %x @@ -635,7 +635,7 @@ ; 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 2 for instruction: %v2i16_x = extractelement <2 x i16> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -647,7 +647,7 @@ ; 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 2 for instruction: %v2i32_x = extractelement <2 x i32> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -657,7 +657,7 @@ ; 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 2 for instruction: %v2i64_x = extractelement <2 x i64> undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -864,7 +864,7 @@ define void @extractelement_fp(i32 %x) { ; RV32V-LABEL: 'extractelement_fp' -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = extractelement <4 x half> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = extractelement <8 x half> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = extractelement <16 x half> undef, i32 0 @@ -876,7 +876,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = extractelement <4 x float> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = extractelement <8 x float> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = extractelement <16 x float> undef, i32 0 @@ -886,7 +886,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = extractelement <4 x double> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = extractelement <8 x double> undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = extractelement <16 x double> undef, i32 0 @@ -894,7 +894,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = extractelement undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = extractelement undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = extractelement <4 x half> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = extractelement <8 x half> undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = extractelement <16 x half> undef, i32 1 @@ -906,7 +906,7 @@ ; 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: %v2f32_1 = extractelement <2 x float> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = extractelement <16 x float> undef, i32 1 @@ -916,7 +916,7 @@ ; 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: %v2f64_1 = extractelement <2 x double> undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = extractelement <16 x double> undef, i32 1 @@ -924,7 +924,7 @@ ; 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: %v2f16_x = extractelement <2 x half> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_x = extractelement <16 x half> undef, i32 %x @@ -936,7 +936,7 @@ ; 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 2 for instruction: %v2f32_x = extractelement <2 x float> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_x = extractelement <16 x float> undef, i32 %x @@ -946,7 +946,7 @@ ; 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 2 for instruction: %v2f64_x = extractelement <2 x double> undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_x = extractelement <16 x double> undef, i32 %x @@ -957,7 +957,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'extractelement_fp' -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_0 = extractelement <2 x half> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = extractelement <4 x half> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = extractelement <8 x half> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = extractelement <16 x half> undef, i32 0 @@ -969,7 +969,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_0 = extractelement <2 x float> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = extractelement <4 x float> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = extractelement <8 x float> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = extractelement <16 x float> undef, i32 0 @@ -979,7 +979,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_0 = extractelement <2 x double> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = extractelement <4 x double> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = extractelement <8 x double> undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = extractelement <16 x double> undef, i32 0 @@ -987,7 +987,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = extractelement undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = extractelement undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16_1 = extractelement <2 x half> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = extractelement <4 x half> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = extractelement <8 x half> undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = extractelement <16 x half> undef, i32 1 @@ -999,7 +999,7 @@ ; 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: %v2f32_1 = extractelement <2 x float> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = extractelement <16 x float> undef, i32 1 @@ -1009,7 +1009,7 @@ ; 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: %v2f64_1 = extractelement <2 x double> undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = extractelement <16 x double> undef, i32 1 @@ -1017,7 +1017,7 @@ ; 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: %v2f16_x = extractelement <2 x half> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_x = extractelement <16 x half> undef, i32 %x @@ -1029,7 +1029,7 @@ ; 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 2 for instruction: %v2f32_x = extractelement <2 x float> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_x = extractelement <16 x float> undef, i32 %x @@ -1039,7 +1039,7 @@ ; 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 2 for instruction: %v2f64_x = extractelement <2 x double> undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_x = extractelement <16 x double> undef, i32 %x 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 @@ -8,7 +8,7 @@ define void @insertelement_int(i32 %x) { ; RV32V-LABEL: 'insertelement_int' -; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 @@ -18,7 +18,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0 @@ -32,7 +32,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement undef, i8 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement undef, i8 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement undef, i8 undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0 @@ -44,7 +44,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement undef, i16 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement undef, i16 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement undef, i16 undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0 @@ -54,7 +54,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement undef, i32 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement undef, i32 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement undef, i32 undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0 @@ -62,7 +62,7 @@ ; 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 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 8 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 @@ -72,7 +72,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 @@ -86,7 +86,7 @@ ; 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: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 @@ -98,7 +98,7 @@ ; 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: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 @@ -108,7 +108,7 @@ ; 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 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 6 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 @@ -116,7 +116,7 @@ ; 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 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 9 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x @@ -126,7 +126,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement undef, i1 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv16i1_x = insertelement undef, i1 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv32i1_x = insertelement undef, i1 undef, i32 %x -; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x @@ -140,7 +140,7 @@ ; 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 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x @@ -152,7 +152,7 @@ ; 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 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x @@ -162,7 +162,7 @@ ; 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 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 7 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x @@ -173,7 +173,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_int' -; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 @@ -183,7 +183,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0 @@ -197,7 +197,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement undef, i8 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement undef, i8 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement undef, i8 undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0 @@ -209,7 +209,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement undef, i16 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement undef, i16 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement undef, i16 undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0 @@ -219,7 +219,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement undef, i32 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement undef, i32 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement undef, i32 undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0 @@ -227,7 +227,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 @@ -237,7 +237,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 @@ -251,7 +251,7 @@ ; 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: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i16_1 = insertelement <16 x i16> undef, i16 undef, i32 1 @@ -263,7 +263,7 @@ ; 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: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i32_1 = insertelement <16 x i32> undef, i32 undef, i32 1 @@ -273,7 +273,7 @@ ; 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: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i64_1 = insertelement <16 x i64> undef, i64 undef, i32 1 @@ -281,7 +281,7 @@ ; 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 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 9 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x @@ -291,7 +291,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement undef, i1 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv16i1_x = insertelement undef, i1 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv32i1_x = insertelement undef, i1 undef, i32 %x -; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x @@ -305,7 +305,7 @@ ; 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 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i16_x = insertelement <16 x i16> undef, i16 undef, i32 %x @@ -317,7 +317,7 @@ ; 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 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i32_x = insertelement <16 x i32> undef, i32 undef, i32 %x @@ -327,7 +327,7 @@ ; 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 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i64_x = insertelement <16 x i64> undef, i64 undef, i32 %x @@ -338,7 +338,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV32ZVE64X-LABEL: 'insertelement_int' -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 @@ -348,7 +348,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0 @@ -362,7 +362,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement undef, i8 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement undef, i8 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement undef, i8 undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0 @@ -374,7 +374,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement undef, i16 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement undef, i16 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement undef, i16 undef, i32 0 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0 @@ -384,7 +384,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement undef, i32 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement undef, i32 undef, i32 0 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement undef, i32 undef, i32 0 -; 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 5 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 @@ -392,7 +392,7 @@ ; 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 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 8 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 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 @@ -402,7 +402,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 @@ -416,7 +416,7 @@ ; 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: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -428,7 +428,7 @@ ; 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: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -438,7 +438,7 @@ ; 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 4 for instruction: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 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 @@ -446,7 +446,7 @@ ; 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 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 9 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 ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x @@ -456,7 +456,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement undef, i1 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv16i1_x = insertelement undef, i1 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv32i1_x = insertelement undef, i1 undef, i32 %x -; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x @@ -470,7 +470,7 @@ ; 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 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 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 @@ -482,7 +482,7 @@ ; 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 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 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 @@ -492,7 +492,7 @@ ; 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 5 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x +; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 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 @@ -503,7 +503,7 @@ ; RV32ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64ZVE64X-LABEL: 'insertelement_int' -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v2i1_0 = insertelement <2 x i1> undef, i1 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v4i1_0 = insertelement <4 x i1> undef, i1 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v8i1_0 = insertelement <8 x i1> undef, i1 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v16i1_0 = insertelement <16 x i1> undef, i1 undef, i32 0 @@ -513,7 +513,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv8i1_0 = insertelement undef, i1 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv16i1_0 = insertelement undef, i1 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %nxv32i1_0 = insertelement undef, i1 undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_0 = insertelement <2 x i8> undef, i8 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i8_0 = insertelement <4 x i8> undef, i8 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i8_0 = insertelement <8 x i8> undef, i8 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i8_0 = insertelement <16 x i8> undef, i8 undef, i32 0 @@ -527,7 +527,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i8_0 = insertelement undef, i8 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i8_0 = insertelement undef, i8 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv128i8_0 = insertelement undef, i8 undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i16_0 = insertelement <2 x i16> undef, i16 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i16_0 = insertelement <4 x i16> undef, i16 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i16_0 = insertelement <8 x i16> undef, i16 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i16_0 = insertelement <16 x i16> undef, i16 undef, i32 0 @@ -539,7 +539,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i16_0 = insertelement undef, i16 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i16_0 = insertelement undef, i16 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64i16_0 = insertelement undef, i16 undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i32_0 = insertelement <2 x i32> undef, i32 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i32_0 = insertelement <4 x i32> undef, i32 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i32_0 = insertelement <8 x i32> undef, i32 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i32_0 = insertelement <16 x i32> undef, i32 undef, i32 0 @@ -549,7 +549,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i32_0 = insertelement undef, i32 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i32_0 = insertelement undef, i32 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32i32_0 = insertelement undef, i32 undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i64_0 = insertelement <2 x i64> undef, i64 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4i64_0 = insertelement <4 x i64> undef, i64 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8i64_0 = insertelement <8 x i64> undef, i64 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16i64_0 = insertelement <16 x i64> undef, i64 undef, i32 0 @@ -557,7 +557,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4i64_0 = insertelement undef, i64 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8i64_0 = insertelement undef, i64 undef, i32 0 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16i64_0 = insertelement undef, i64 undef, i32 0 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2i1_1 = insertelement <2 x i1> undef, i1 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v4i1_1 = insertelement <4 x i1> undef, i1 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v8i1_1 = insertelement <8 x i1> undef, i1 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v16i1_1 = insertelement <16 x i1> undef, i1 undef, i32 1 @@ -567,7 +567,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv8i1_1 = insertelement undef, i1 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv16i1_1 = insertelement undef, i1 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %nxv32i1_1 = insertelement undef, i1 undef, i32 1 -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2i8_1 = insertelement <2 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4i8_1 = insertelement <4 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8i8_1 = insertelement <8 x i8> undef, i8 undef, i32 1 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16i8_1 = insertelement <16 x i8> undef, i8 undef, i32 1 @@ -581,7 +581,7 @@ ; 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: %v2i16_1 = insertelement <2 x i16> undef, i16 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -593,7 +593,7 @@ ; 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: %v2i32_1 = insertelement <2 x i32> undef, i32 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -603,7 +603,7 @@ ; 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: %v2i64_1 = insertelement <2 x i64> undef, i64 undef, i32 1 +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 4 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 @@ -611,7 +611,7 @@ ; 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 7 for instruction: %v2i1_x = insertelement <2 x i1> undef, i1 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 9 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 ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %v16i1_x = insertelement <16 x i1> undef, i1 undef, i32 %x @@ -621,7 +621,7 @@ ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv8i1_x = insertelement undef, i1 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv16i1_x = insertelement undef, i1 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %nxv32i1_x = insertelement undef, i1 undef, i32 %x -; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %v2i8_x = insertelement <2 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v4i8_x = insertelement <4 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v8i8_x = insertelement <8 x i8> undef, i8 undef, i32 %x ; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16i8_x = insertelement <16 x i8> undef, i8 undef, i32 %x @@ -635,7 +635,7 @@ ; 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 3 for instruction: %v2i16_x = insertelement <2 x i16> undef, i16 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 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 @@ -647,7 +647,7 @@ ; 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 3 for instruction: %v2i32_x = insertelement <2 x i32> undef, i32 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 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 @@ -657,7 +657,7 @@ ; 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 3 for instruction: %v2i64_x = insertelement <2 x i64> undef, i64 undef, i32 %x +; RV64ZVE64X-NEXT: Cost Model: Found an estimated cost of 5 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 @@ -864,7 +864,7 @@ define void @insertelement_fp(i32 %x) { ; RV32V-LABEL: 'insertelement_fp' -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0 @@ -876,7 +876,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = insertelement undef, half undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = insertelement undef, half undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = insertelement undef, half undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0 @@ -886,7 +886,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = insertelement undef, float undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = insertelement undef, float undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = insertelement undef, float undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0 +; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0 @@ -894,7 +894,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = insertelement undef, double undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = insertelement undef, double undef, i32 0 ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = insertelement undef, double undef, i32 0 -; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1 @@ -906,7 +906,7 @@ ; 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: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1 @@ -916,7 +916,7 @@ ; 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: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 +; RV32V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1 @@ -924,7 +924,7 @@ ; 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 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x @@ -936,7 +936,7 @@ ; 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 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x @@ -946,7 +946,7 @@ ; 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 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x +; RV32V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV32V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x @@ -957,7 +957,7 @@ ; RV32V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; ; RV64V-LABEL: 'insertelement_fp' -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f16_0 = insertelement <2 x half> undef, half undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f16_0 = insertelement <4 x half> undef, half undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f16_0 = insertelement <8 x half> undef, half undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f16_0 = insertelement <16 x half> undef, half undef, i32 0 @@ -969,7 +969,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f16_0 = insertelement undef, half undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f16_0 = insertelement undef, half undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv64f16_0 = insertelement undef, half undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f32_0 = insertelement <2 x float> undef, float undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f32_0 = insertelement <4 x float> undef, float undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f32_0 = insertelement <8 x float> undef, float undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f32_0 = insertelement <16 x float> undef, float undef, i32 0 @@ -979,7 +979,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f32_0 = insertelement undef, float undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f32_0 = insertelement undef, float undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv32f32_0 = insertelement undef, float undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0 +; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v2f64_0 = insertelement <2 x double> undef, double undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v4f64_0 = insertelement <4 x double> undef, double undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8f64_0 = insertelement <8 x double> undef, double undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16f64_0 = insertelement <16 x double> undef, double undef, i32 0 @@ -987,7 +987,7 @@ ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv4f64_0 = insertelement undef, double undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv8f64_0 = insertelement undef, double undef, i32 0 ; RV64V-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %nxv16f64_0 = insertelement undef, double undef, i32 0 -; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16_1 = insertelement <2 x half> undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16_1 = insertelement <4 x half> undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8f16_1 = insertelement <8 x half> undef, half undef, i32 1 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f16_1 = insertelement <16 x half> undef, half undef, i32 1 @@ -999,7 +999,7 @@ ; 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: %v2f32_1 = insertelement <2 x float> undef, float undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f32_1 = insertelement <16 x float> undef, float undef, i32 1 @@ -1009,7 +1009,7 @@ ; 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: %v2f64_1 = insertelement <2 x double> undef, double undef, i32 1 +; RV64V-NEXT: Cost Model: Found an estimated cost of 4 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16f64_1 = insertelement <16 x double> undef, double undef, i32 1 @@ -1017,7 +1017,7 @@ ; 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 3 for instruction: %v2f16_x = insertelement <2 x half> undef, half undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f16_x = insertelement <16 x half> undef, half undef, i32 %x @@ -1029,7 +1029,7 @@ ; 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 3 for instruction: %v2f32_x = insertelement <2 x float> undef, float undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f32_x = insertelement <16 x float> undef, float undef, i32 %x @@ -1039,7 +1039,7 @@ ; 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 3 for instruction: %v2f64_x = insertelement <2 x double> undef, double undef, i32 %x +; RV64V-NEXT: Cost Model: Found an estimated cost of 5 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 ; RV64V-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %v16f64_x = insertelement <16 x double> undef, double undef, i32 %x Index: llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll =================================================================== --- llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll +++ llvm/test/Analysis/CostModel/RISCV/shuffle-broadcast.ll @@ -151,7 +151,7 @@ ; CHECK-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %43 = shufflevector <128 x i1> undef, <128 x i1> undef, <128 x i32> zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %ins1 = insertelement <128 x i1> poison, i1 poison, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %44 = shufflevector <128 x i1> %ins1, <128 x i1> poison, <128 x i32> zeroinitializer -; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %ins2 = insertelement <2 x i8> poison, i8 3, i32 0 +; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %ins2 = insertelement <2 x i8> poison, i8 3, i32 0 ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %45 = shufflevector <2 x i8> %ins2, <2 x i8> undef, <2 x i32> zeroinitializer ; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void ; Index: llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll =================================================================== --- llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll +++ llvm/test/Transforms/SLPVectorizer/RISCV/math-function.ll @@ -199,11 +199,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @expf(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.exp.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @expf(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @expf(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @exp_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] { @@ -254,11 +256,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @llvm.exp.f32(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.exp.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @llvm.exp.f32(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @llvm.exp.f32(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @int_exp_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] { @@ -309,11 +313,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @logf(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.log.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @logf(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @logf(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @log_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] { @@ -364,11 +370,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @llvm.log.f32(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.log.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @llvm.log.f32(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @llvm.log.f32(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @int_log_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] { @@ -419,11 +427,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @sinf(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.sin.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @sinf(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @sinf(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @sin_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] { @@ -474,11 +484,13 @@ ; CHECK-NEXT: [[VECEXT_1:%.*]] = extractelement <4 x float> [[TMP0]], i32 1 ; CHECK-NEXT: [[TMP2:%.*]] = tail call fast float @llvm.sin.f32(float [[VECEXT_1]]) ; CHECK-NEXT: [[VECINS_1:%.*]] = insertelement <4 x float> [[VECINS]], float [[TMP2]], i32 1 -; CHECK-NEXT: [[TMP3:%.*]] = shufflevector <4 x float> [[TMP0]], <4 x float> poison, <2 x i32> -; CHECK-NEXT: [[TMP4:%.*]] = call fast <2 x float> @llvm.sin.v2f32(<2 x float> [[TMP3]]) -; CHECK-NEXT: [[TMP5:%.*]] = shufflevector <2 x float> [[TMP4]], <2 x float> poison, <4 x i32> -; CHECK-NEXT: [[VECINS_31:%.*]] = shufflevector <4 x float> [[VECINS_1]], <4 x float> [[TMP5]], <4 x i32> -; CHECK-NEXT: ret <4 x float> [[VECINS_31]] +; CHECK-NEXT: [[VECEXT_2:%.*]] = extractelement <4 x float> [[TMP0]], i32 2 +; CHECK-NEXT: [[TMP3:%.*]] = tail call fast float @llvm.sin.f32(float [[VECEXT_2]]) +; CHECK-NEXT: [[VECINS_2:%.*]] = insertelement <4 x float> [[VECINS_1]], float [[TMP3]], i32 2 +; CHECK-NEXT: [[VECEXT_3:%.*]] = extractelement <4 x float> [[TMP0]], i32 3 +; CHECK-NEXT: [[TMP4:%.*]] = tail call fast float @llvm.sin.f32(float [[VECEXT_3]]) +; CHECK-NEXT: [[VECINS_3:%.*]] = insertelement <4 x float> [[VECINS_2]], float [[TMP4]], i32 3 +; CHECK-NEXT: ret <4 x float> [[VECINS_3]] ; ; DEFAULT-LABEL: define <4 x float> @int_sin_4x ; DEFAULT-SAME: (ptr [[A:%.*]]) #[[ATTR1]] {