[llvm] [RISCV][CostModel] Add cost for @llvm.experimental.vp.splice (PR #122223)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 12 21:38:55 PST 2025


https://github.com/LiqinWeng updated https://github.com/llvm/llvm-project/pull/122223

>From 558b06d50e02aefffba2dc5a4700f354ca7ed11d Mon Sep 17 00:00:00 2001
From: "Liqin.Weng" <liqin.weng at spacemit.com>
Date: Thu, 9 Jan 2025 14:23:25 +0800
Subject: [PATCH 1/3] [RISCV][CostModel] Add cost for
 @llvm.experimental.vp.splice

---
 .../Target/RISCV/RISCVTargetTransformInfo.cpp |  27 ++
 .../Analysis/CostModel/RISCV/vp-intrinsics.ll | 329 ++++++++++++++++++
 2 files changed, 356 insertions(+)

diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index 850d6244affa50..6789944d9c6cab 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -1189,6 +1189,33 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
                                                   : RISCV::VMV_V_X,
                                               LT.second, CostKind);
   }
+  case Intrinsic::experimental_vp_splice: {
+    auto LT = getTypeLegalizationCost(RetTy);
+    SmallVector<unsigned, 3> Opcodes;
+    Value *ImmValue = *(ICA.getInst()->arg_begin() + 2);
+    auto *Imm = dyn_cast<ConstantInt>(ImmValue);
+    if (Imm->isNegative())
+      Opcodes = {RISCV::VSLIDEDOWN_VI, RISCV::VSLIDEUP_VX};
+    else
+      Opcodes = {RISCV::VSLIDEDOWN_VX, RISCV::VSLIDEUP_VI};
+
+    if (!ST->hasVInstructions())
+      return InstructionCost::getInvalid();
+
+    if (LT.second.getScalarType() == MVT::i1) {
+      SmallVector<unsigned, 8> AddOpcodes = {
+          RISCV::VMV1R_V, RISCV::VMV1R_V, RISCV::VMV_V_I,    RISCV::VMERGE_VIM,
+          RISCV::VMV_V_I, RISCV::VMV1R_V, RISCV::VMERGE_VIM, RISCV::VMSNE_VI};
+      return LT.first *
+                 (getRISCVInstructionCost(Opcodes, LT.second, CostKind) +
+                  getRISCVInstructionCost(AddOpcodes, LT.second, CostKind)) +
+             1;
+    } else {
+      return LT.first * getRISCVInstructionCost(Opcodes, LT.second, CostKind) +
+             1;
+    }
+    break;
+  }
   }
 
   if (ST->hasVInstructions() && RetTy->isVectorTy()) {
diff --git a/llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll b/llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll
index 5126a6a0a3cbcd..d118f49f7cac8b 100644
--- a/llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll
+++ b/llvm/test/Analysis/CostModel/RISCV/vp-intrinsics.ll
@@ -2351,6 +2351,335 @@ define void @splat() {
   ret void
 }
 
+define void @splice() {
+; CHECK-LABEL: 'splice'
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %1 = call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %2 = call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %3 = call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %4 = call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %5 = call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %6 = call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %7 = call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %8 = call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %9 = call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %10 = call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %11 = call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %12 = call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %13 = call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %14 = call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %15 = call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %16 = call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %17 = call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %18 = call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %19 = call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %20 = call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %21 = call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %22 = call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %23 = call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %24 = call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %25 = call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %26 = call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %27 = call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %28 = call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %29 = call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %30 = call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %31 = call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %32 = call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %33 = call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %34 = call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %35 = call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %36 = call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %37 = call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %38 = call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %39 = call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %40 = call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %41 = call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %42 = call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %43 = call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %44 = call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %45 = call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %46 = call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %47 = call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %48 = call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %49 = call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %50 = call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %51 = call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %52 = call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %53 = call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %54 = call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %55 = call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %56 = call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %57 = call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %58 = call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %59 = call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %60 = call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %61 = call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %62 = call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %63 = call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %64 = call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %65 = call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %66 = call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %67 = call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %68 = call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %69 = call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %70 = call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %71 = call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %72 = call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %73 = call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %74 = call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %75 = call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %76 = call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %77 = call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %78 = call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %79 = call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %80 = call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %81 = call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %82 = call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %83 = call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %84 = call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %85 = call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %86 = call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %87 = call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %88 = call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %89 = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %90 = call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %91 = call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %92 = call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %93 = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %94 = call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %95 = call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %96 = call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %97 = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %98 = call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %99 = call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %100 = call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %101 = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %102 = call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %103 = call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %104 = call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
+;
+; TYPEBASED-LABEL: 'splice'
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %1 = call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %2 = call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %3 = call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %4 = call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %5 = call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %6 = call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %7 = call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 11 for instruction: %8 = call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %9 = call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %10 = call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %11 = call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %12 = call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %13 = call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %14 = call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %15 = call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %16 = call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %17 = call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %18 = call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %19 = call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %20 = call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %21 = call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %22 = call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %23 = call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %24 = call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %25 = call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %26 = call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %27 = call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %28 = call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %29 = call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %30 = call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %31 = call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %32 = call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %33 = call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %34 = call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %35 = call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %36 = call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %37 = call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %38 = call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %39 = call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %40 = call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %41 = call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %42 = call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %43 = call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %44 = call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %45 = call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %46 = call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %47 = call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %48 = call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %49 = call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %50 = call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %51 = call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %52 = call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %53 = call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %54 = call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %55 = call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %56 = call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %57 = call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %58 = call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %59 = call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %60 = call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %61 = call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %62 = call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %63 = call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %64 = call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %65 = call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %66 = call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %67 = call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %68 = call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %69 = call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %70 = call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %71 = call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %72 = call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %73 = call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %74 = call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %75 = call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %76 = call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %77 = call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %78 = call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %79 = call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %80 = call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %81 = call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %82 = call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %83 = call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %84 = call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %85 = call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %86 = call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %87 = call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %88 = call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %89 = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %90 = call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %91 = call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %92 = call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %93 = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %94 = call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %95 = call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %96 = call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %97 = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %98 = call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %99 = call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %100 = call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %101 = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 9 for instruction: %102 = call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 17 for instruction: %103 = call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 33 for instruction: %104 = call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+; TYPEBASED-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void
+;
+  call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <2 x i1> @llvm.experimental.vp.splice.v2i1(<2 x i1> poison, <2 x i1> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i1> @llvm.experimental.vp.splice.v4i1(<4 x i1> poison, <4 x i1> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i1> @llvm.experimental.vp.splice.v8i1(<8 x i1> poison, <8 x i1> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i1> @llvm.experimental.vp.splice.v16i1(<16 x i1> poison, <16 x i1> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x i8> @llvm.experimental.vp.splice.v2i8(<2 x i8> poison, <2 x i8> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i8> @llvm.experimental.vp.splice.v4i8(<4 x i8> poison, <4 x i8> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i8> @llvm.experimental.vp.splice.v8i8(<8 x i8> poison, <8 x i8> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i8> @llvm.experimental.vp.splice.v16i8(<16 x i8> poison, <16 x i8> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i8> @llvm.experimental.vp.splice.nxv2i8(<vscale x 2 x i8> poison, <vscale x 2 x i8> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i8> @llvm.experimental.vp.splice.nxv4i8(<vscale x 4 x i8> poison, <vscale x 4 x i8> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i8> @llvm.experimental.vp.splice.nxv8i8(<vscale x 8 x i8> poison, <vscale x 8 x i8> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i8> @llvm.experimental.vp.splice.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x i16> @llvm.experimental.vp.splice.v2i16(<2 x i16> poison, <2 x i16> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i16> @llvm.experimental.vp.splice.v4i16(<4 x i16> poison, <4 x i16> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i16> @llvm.experimental.vp.splice.v8i16(<8 x i16> poison, <8 x i16> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i16> @llvm.experimental.vp.splice.v16i16(<16 x i16> poison, <16 x i16> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i16> @llvm.experimental.vp.splice.nxv2i16(<vscale x 2 x i16> poison, <vscale x 2 x i16> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i16> @llvm.experimental.vp.splice.nxv4i16(<vscale x 4 x i16> poison, <vscale x 4 x i16> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i16> @llvm.experimental.vp.splice.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i16> @llvm.experimental.vp.splice.nxv16i16(<vscale x 16 x i16> poison, <vscale x 16 x i16> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x i32> @llvm.experimental.vp.splice.v2i32(<2 x i32> poison, <2 x i32> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i32> @llvm.experimental.vp.splice.v4i32(<4 x i32> poison, <4 x i32> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i32> @llvm.experimental.vp.splice.v8i32(<8 x i32> poison, <8 x i32> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i32> @llvm.experimental.vp.splice.v16i32(<16 x i32> poison, <16 x i32> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i32> @llvm.experimental.vp.splice.nxv2i32(<vscale x 2 x i32> poison, <vscale x 2 x i32> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i32> @llvm.experimental.vp.splice.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i32> @llvm.experimental.vp.splice.nxv8i32(<vscale x 8 x i32> poison, <vscale x 8 x i32> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i32> @llvm.experimental.vp.splice.nxv16i32(<vscale x 16 x i32> poison, <vscale x 16 x i32> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x i64> @llvm.experimental.vp.splice.v2i64(<2 x i64> poison, <2 x i64> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x i64> @llvm.experimental.vp.splice.v4i64(<4 x i64> poison, <4 x i64> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x i64> @llvm.experimental.vp.splice.v8i64(<8 x i64> poison, <8 x i64> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x i64> @llvm.experimental.vp.splice.v16i64(<16 x i64> poison, <16 x i64> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x i64> @llvm.experimental.vp.splice.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x i64> @llvm.experimental.vp.splice.nxv4i64(<vscale x 4 x i64> poison, <vscale x 4 x i64> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x i64> @llvm.experimental.vp.splice.nxv8i64(<vscale x 8 x i64> poison, <vscale x 8 x i64> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x i64> @llvm.experimental.vp.splice.nxv16i64(<vscale x 16 x i64> poison, <vscale x 16 x i64> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x float> @llvm.experimental.vp.splice.v2f32(<2 x float> poison, <2 x float> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x float> @llvm.experimental.vp.splice.v4f32(<4 x float> poison, <4 x float> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x float> @llvm.experimental.vp.splice.v8f32(<8 x float> poison, <8 x float> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x float> @llvm.experimental.vp.splice.v16f32(<16 x float> poison, <16 x float> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x float> @llvm.experimental.vp.splice.nxv2f32(<vscale x 2 x float> poison, <vscale x 2 x float> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x float> @llvm.experimental.vp.splice.nxv4f32(<vscale x 4 x float> poison, <vscale x 4 x float> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x float> @llvm.experimental.vp.splice.nxv8f32(<vscale x 8 x float> poison, <vscale x 8 x float> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x float> @llvm.experimental.vp.splice.nxv16f32(<vscale x 16 x float> poison, <vscale x 16 x float> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+  call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> poison, <2 x double> poison, i32 -1, <2 x i1> poison, i32 poison, i32 poison)
+  call <4 x double> @llvm.experimental.vp.splice.v4f64(<4 x double> poison, <4 x double> poison, i32 -1, <4 x i1> poison, i32 poison, i32 poison)
+  call <8 x double> @llvm.experimental.vp.splice.v8f64(<8 x double> poison, <8 x double> poison, i32 -1, <8 x i1> poison, i32 poison, i32 poison)
+  call <16 x double> @llvm.experimental.vp.splice.v16f64(<16 x double> poison, <16 x double> poison, i32 -1, <16 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> poison, <vscale x 2 x double> poison, i32 -1, <vscale x 2 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 4 x double> @llvm.experimental.vp.splice.nxv4f64(<vscale x 4 x double> poison, <vscale x 4 x double> poison, i32 -1, <vscale x 4 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 8 x double> @llvm.experimental.vp.splice.nxv8f64(<vscale x 8 x double> poison, <vscale x 8 x double> poison, i32 -1, <vscale x 8 x i1> poison, i32 poison, i32 poison)
+  call <vscale x 16 x double> @llvm.experimental.vp.splice.nxv16f64(<vscale x 16 x double> poison, <vscale x 16 x double> poison, i32 -1, <vscale x 16 x i1> poison, i32 poison, i32 poison)
+
+  ret void
+}
+
 declare <2 x i8> @llvm.vp.add.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
 declare <4 x i8> @llvm.vp.add.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
 declare <8 x i8> @llvm.vp.add.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)

>From 4bdf3a2198b12138c333673b1ecf1b570fb07f13 Mon Sep 17 00:00:00 2001
From: "Liqin.Weng" <liqin.weng at spacemit.com>
Date: Sun, 12 Jan 2025 12:07:36 +0800
Subject: [PATCH 2/3] fix the comments

---
 llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index e2cf370d32941b..b47baa0c84180d 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -1237,9 +1237,9 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
   }
   case Intrinsic::experimental_vp_splice: {
     auto LT = getTypeLegalizationCost(RetTy);
-    SmallVector<unsigned, 3> Opcodes;
+    SmallVector<unsigned, 2> Opcodes;
     Value *ImmValue = *(ICA.getInst()->arg_begin() + 2);
-    auto *Imm = dyn_cast<ConstantInt>(ImmValue);
+    auto *Imm = cast<ConstantInt>(ImmValue);
     if (Imm->isNegative())
       Opcodes = {RISCV::VSLIDEDOWN_VI, RISCV::VSLIDEUP_VX};
     else
@@ -1249,7 +1249,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
       return InstructionCost::getInvalid();
 
     if (LT.second.getScalarType() == MVT::i1) {
-      SmallVector<unsigned, 8> AddOpcodes = {
+      unsigned AddOpcodes[8] = {
           RISCV::VMV1R_V, RISCV::VMV1R_V, RISCV::VMV_V_I,    RISCV::VMERGE_VIM,
           RISCV::VMV_V_I, RISCV::VMV1R_V, RISCV::VMERGE_VIM, RISCV::VMSNE_VI};
       return LT.first *

>From 3b59226391e4cfd5a95edb2bf5c23edeeaeaf7f7 Mon Sep 17 00:00:00 2001
From: LiqinWeng <liqin.weng at spacemit.com>
Date: Mon, 13 Jan 2025 13:37:44 +0800
Subject: [PATCH 3/3] fix the comments

---
 llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index b47baa0c84180d..f7136ab92384a5 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -1238,8 +1238,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
   case Intrinsic::experimental_vp_splice: {
     auto LT = getTypeLegalizationCost(RetTy);
     SmallVector<unsigned, 2> Opcodes;
-    Value *ImmValue = *(ICA.getInst()->arg_begin() + 2);
-    auto *Imm = cast<ConstantInt>(ImmValue);
+    auto *Imm = cast<ConstantInt>(ICA.getInst()->getArgOperand(2));
     if (Imm->isNegative())
       Opcodes = {RISCV::VSLIDEDOWN_VI, RISCV::VSLIDEUP_VX};
     else
@@ -1256,11 +1255,9 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
                  (getRISCVInstructionCost(Opcodes, LT.second, CostKind) +
                   getRISCVInstructionCost(AddOpcodes, LT.second, CostKind)) +
              1;
-    } else {
-      return LT.first * getRISCVInstructionCost(Opcodes, LT.second, CostKind) +
-             1;
     }
-    break;
+
+    return LT.first * getRISCVInstructionCost(Opcodes, LT.second, CostKind) + 1;
   }
   }
 



More information about the llvm-commits mailing list