[llvm] [AArch64] Consider [u/s]itofp SVE packing costs (PR #225352)

Jack Styles via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 04:06:17 PDT 2026


https://github.com/Stylie777 updated https://github.com/llvm/llvm-project/pull/225352

>From 5ba5272e6f45272df33b9698d1640e8d5400c8ff Mon Sep 17 00:00:00 2001
From: Jack Styles <jack.styles at arm.com>
Date: Tue, 15 Sep 2026 13:27:39 +0100
Subject: [PATCH 1/4] [AArch64] Consider [u/s]itofp SVE packing costs

When using uitofp/sitofp with SVE instructions on fixed VF's
the vector will need unpacking into the equivalent SVE vector.
Upto now, the cost of this was not considered in the
LoopVectorizer, only he cost of the FCVT. Add these costs when
using SVE Vectors on a fixed VF.

The same can be applied for the reverse when using fptosi or
fptoui as there will need to be packing operations to the
types to be changed.
---
 .../AArch64/AArch64TargetTransformInfo.cpp    |  78 +++-
 .../Analysis/CostModel/AArch64/sve-cast.ll    | 408 +++++++++---------
 2 files changed, 265 insertions(+), 221 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 1ccefdadfe1a7..68080a78f77d5 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -3976,6 +3976,17 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
             BF16Tbl, ISD, DstTy.getSimpleVT(), SrcTy.getSimpleVT()))
       return Entry->Cost;
 
+  // Symbolic constants for the SVE sitofp/uitofp entries in the table below
+  // The cost of unpacking twice is artificially increased for now in order
+  // to avoid regressions against NEON, which will use tbl instructions directly
+  // instead of multiple layers of [s|u]unpk[lo|hi].
+  // We use the unpacks in cases where the destination type is illegal and
+  // requires splitting of the input, even if the input type itself is legal.
+  const unsigned int SVE_EXT_COST = 1;
+  const unsigned int SVE_FCVT_COST = 1;
+  const unsigned int SVE_UNPACK_ONCE = 4;
+  const unsigned int SVE_UNPACK_TWICE = 16;
+
   // We have to estimate a cost of fixed length operation upon
   // SVE registers(operations) with the number of registers required
   // for a fixed type to be represented upon SVE registers.
@@ -3983,28 +3994,61 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
   if (SrcTy.isFixedLengthVector() && DstTy.isFixedLengthVector() &&
       SrcTy.getVectorNumElements() == DstTy.getVectorNumElements() &&
       ST->useSVEForFixedLengthVectors(WiderTy)) {
+    // When going from a fixed vector to a scalable vector, types that get
+    // promoted will have associated unpacking costs that would not otherwise be
+    // present.
+    static const TypeConversionCostTblEntry FixedToScalablePackUnpackTbl[] = {
+        // f16 unpack
+        {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
+        {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
+        // f32 unpack
+        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_ONCE},
+        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
+        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_ONCE},
+        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
+        // f64 unpack
+        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
+        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
+        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
+        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
+        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
+        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
+        // f16 pack
+        {ISD::FP_TO_UINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
+        {ISD::FP_TO_SINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
+        // f32 pack
+        {ISD::FP_TO_UINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
+        {ISD::FP_TO_UINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
+        {ISD::FP_TO_SINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
+        {ISD::FP_TO_SINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
+        // f64 pack
+        {ISD::FP_TO_UINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
+        {ISD::FP_TO_UINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
+        {ISD::FP_TO_UINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
+        {ISD::FP_TO_SINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
+        {ISD::FP_TO_SINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
+        {ISD::FP_TO_SINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
+    };
+
     std::pair<InstructionCost, MVT> LT =
         getTypeLegalizationCost(WiderTy.getTypeForEVT(Dst->getContext()));
+    InstructionCost Cost = LT.first;
     unsigned NumElements =
         AArch64::SVEBitsPerBlock / LT.second.getScalarSizeInBits();
-    return LT.first *
-           getCastInstrCost(
-               Opcode,
-               ScalableVectorType::get(Dst->getScalarType(), NumElements),
-               ScalableVectorType::get(Src->getScalarType(), NumElements), CCH,
-               CostKind, I);
-  }
+    auto *SrcScalabeTy =
+        ScalableVectorType::get(Src->getScalarType(), NumElements);
+    auto *DstScalabeTy =
+        ScalableVectorType::get(Dst->getScalarType(), NumElements);
+    InstructionCost ConversionCost =
+        getCastInstrCost(Opcode, DstScalabeTy, SrcScalabeTy, CCH, CostKind, I);
+    if (const auto *Entry = ConvertCostTableLookup(
+            FixedToScalablePackUnpackTbl, ISD,
+            TLI->getValueType(DL, DstScalabeTy).getSimpleVT(),
+            TLI->getValueType(DL, SrcScalabeTy).getSimpleVT()))
+      return Cost * (ConversionCost + Entry->Cost);
 
-  // Symbolic constants for the SVE sitofp/uitofp entries in the table below
-  // The cost of unpacking twice is artificially increased for now in order
-  // to avoid regressions against NEON, which will use tbl instructions directly
-  // instead of multiple layers of [s|u]unpk[lo|hi].
-  // We use the unpacks in cases where the destination type is illegal and
-  // requires splitting of the input, even if the input type itself is legal.
-  const unsigned int SVE_EXT_COST = 1;
-  const unsigned int SVE_FCVT_COST = 1;
-  const unsigned int SVE_UNPACK_ONCE = 4;
-  const unsigned int SVE_UNPACK_TWICE = 16;
+    return Cost * ConversionCost;
+  }
 
   static const TypeConversionCostTblEntry ConversionTbl[] = {
       {ISD::TRUNCATE, MVT::v2i8, MVT::v2i64, 1},    // xtn
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
index 7b482f39a228f..85edb0a7481d6 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
@@ -823,162 +823,162 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r89 = fpext <16 x float> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r92 = fptoui <2 x float> poison to <2 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r93 = fptosi <2 x float> poison to <2 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r94 = fptoui <2 x float> poison to <2 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r95 = fptosi <2 x float> poison to <2 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r92 = fptoui <2 x float> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r93 = fptosi <2 x float> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r94 = fptoui <2 x float> poison to <2 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r95 = fptosi <2 x float> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r96 = fptoui <2 x float> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r97 = fptosi <2 x float> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r98 = fptoui <2 x float> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r99 = fptosi <2 x float> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r100 = fptoui <2 x double> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r101 = fptosi <2 x double> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r102 = fptoui <2 x double> poison to <2 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r103 = fptosi <2 x double> poison to <2 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r104 = fptoui <2 x double> poison to <2 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r105 = fptosi <2 x double> poison to <2 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r106 = fptoui <2 x double> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r107 = fptosi <2 x double> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r102 = fptoui <2 x double> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r103 = fptosi <2 x double> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r104 = fptoui <2 x double> poison to <2 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r105 = fptosi <2 x double> poison to <2 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r106 = fptoui <2 x double> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r107 = fptosi <2 x double> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r108 = fptoui <2 x double> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r109 = fptosi <2 x double> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x float> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x float> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r112 = fptoui <4 x float> poison to <4 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r113 = fptosi <4 x float> poison to <4 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r114 = fptoui <4 x float> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r115 = fptosi <4 x float> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r112 = fptoui <4 x float> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r113 = fptosi <4 x float> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r114 = fptoui <4 x float> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r118 = fptoui <4 x float> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r119 = fptosi <4 x float> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r120 = fptoui <4 x double> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r121 = fptosi <4 x double> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r122 = fptoui <4 x double> poison to <4 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r123 = fptosi <4 x double> poison to <4 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r124 = fptoui <4 x double> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r125 = fptosi <4 x double> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r126 = fptoui <4 x double> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r122 = fptoui <4 x double> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r123 = fptosi <4 x double> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r124 = fptoui <4 x double> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r125 = fptosi <4 x double> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r126 = fptoui <4 x double> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r129 = fptosi <4 x double> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r130 = fptoui <8 x float> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r131 = fptosi <8 x float> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x float> poison to <8 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x float> poison to <8 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r135 = fptosi <8 x float> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r132 = fptoui <8 x float> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r133 = fptosi <8 x float> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r134 = fptoui <8 x float> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r139 = fptosi <8 x float> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r140 = fptoui <8 x double> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r141 = fptosi <8 x double> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r142 = fptoui <8 x double> poison to <8 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r143 = fptosi <8 x double> poison to <8 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r144 = fptoui <8 x double> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r145 = fptosi <8 x double> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r146 = fptoui <8 x double> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r147 = fptosi <8 x double> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r142 = fptoui <8 x double> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r143 = fptosi <8 x double> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r144 = fptoui <8 x double> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r145 = fptosi <8 x double> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r146 = fptoui <8 x double> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r149 = fptosi <8 x double> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r150 = fptoui <16 x float> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r151 = fptosi <16 x float> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r152 = fptoui <16 x float> poison to <16 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r153 = fptosi <16 x float> poison to <16 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r154 = fptoui <16 x float> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r155 = fptosi <16 x float> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r152 = fptoui <16 x float> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r153 = fptosi <16 x float> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r154 = fptoui <16 x float> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r159 = fptosi <16 x float> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r160 = fptoui <16 x double> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r161 = fptosi <16 x double> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r162 = fptoui <16 x double> poison to <16 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r163 = fptosi <16 x double> poison to <16 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r164 = fptoui <16 x double> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r165 = fptosi <16 x double> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r166 = fptoui <16 x double> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r167 = fptosi <16 x double> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r162 = fptoui <16 x double> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r163 = fptosi <16 x double> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r164 = fptoui <16 x double> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r165 = fptosi <16 x double> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r166 = fptoui <16 x double> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r167 = fptosi <16 x double> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r168 = fptoui <16 x double> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r169 = fptosi <16 x double> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r171 = sitofp <2 x i1> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r172 = uitofp <2 x i8> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r173 = sitofp <2 x i8> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r174 = uitofp <2 x i16> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r175 = sitofp <2 x i16> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r172 = uitofp <2 x i8> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r173 = sitofp <2 x i8> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r174 = uitofp <2 x i16> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r175 = sitofp <2 x i16> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r176 = uitofp <2 x i32> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r177 = sitofp <2 x i32> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r178 = uitofp <2 x i64> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r179 = sitofp <2 x i64> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r180 = uitofp <2 x i1> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r181 = sitofp <2 x i1> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r182 = uitofp <2 x i8> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r183 = sitofp <2 x i8> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r184 = uitofp <2 x i16> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r185 = sitofp <2 x i16> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r186 = uitofp <2 x i32> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r187 = sitofp <2 x i32> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r182 = uitofp <2 x i8> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r183 = sitofp <2 x i8> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r184 = uitofp <2 x i16> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r185 = sitofp <2 x i16> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r186 = uitofp <2 x i32> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r187 = sitofp <2 x i32> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r188 = uitofp <2 x i64> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r189 = sitofp <2 x i64> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r190 = uitofp <4 x i1> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r191 = sitofp <4 x i1> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r192 = uitofp <4 x i8> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r193 = sitofp <4 x i8> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r194 = uitofp <4 x i16> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r195 = sitofp <4 x i16> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r192 = uitofp <4 x i8> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r193 = sitofp <4 x i8> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r194 = uitofp <4 x i16> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r195 = sitofp <4 x i16> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r196 = uitofp <4 x i32> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r200 = uitofp <4 x i1> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r201 = sitofp <4 x i1> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r202 = uitofp <4 x i8> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r203 = sitofp <4 x i8> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r204 = uitofp <4 x i16> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r205 = sitofp <4 x i16> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r206 = uitofp <4 x i32> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r207 = sitofp <4 x i32> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r202 = uitofp <4 x i8> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r203 = sitofp <4 x i8> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r204 = uitofp <4 x i16> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r205 = sitofp <4 x i16> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r206 = uitofp <4 x i32> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r209 = sitofp <4 x i64> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r210 = uitofp <8 x i1> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r213 = sitofp <8 x i8> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r214 = uitofp <8 x i16> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r215 = sitofp <8 x i16> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r214 = uitofp <8 x i16> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r219 = sitofp <8 x i64> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r220 = uitofp <8 x i1> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r221 = sitofp <8 x i1> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r222 = uitofp <8 x i8> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r223 = sitofp <8 x i8> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r224 = uitofp <8 x i16> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r225 = sitofp <8 x i16> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r226 = uitofp <8 x i32> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r227 = sitofp <8 x i32> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r222 = uitofp <8 x i8> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r223 = sitofp <8 x i8> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r224 = uitofp <8 x i16> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r225 = sitofp <8 x i16> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r226 = uitofp <8 x i32> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r229 = sitofp <8 x i64> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r230 = uitofp <16 x i1> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r233 = sitofp <16 x i8> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r234 = uitofp <16 x i16> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r235 = sitofp <16 x i16> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r234 = uitofp <16 x i16> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r239 = sitofp <16 x i64> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r240 = uitofp <16 x i1> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r241 = sitofp <16 x i1> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r242 = uitofp <16 x i8> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r243 = sitofp <16 x i8> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r244 = uitofp <16 x i16> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r245 = sitofp <16 x i16> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r246 = uitofp <16 x i32> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r247 = sitofp <16 x i32> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r242 = uitofp <16 x i8> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r243 = sitofp <16 x i8> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r244 = uitofp <16 x i16> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r245 = sitofp <16 x i16> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r246 = uitofp <16 x i32> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r247 = sitofp <16 x i32> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r248 = uitofp <16 x i64> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r249 = sitofp <16 x i64> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
@@ -1066,52 +1066,52 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x float> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r122 = fptoui <4 x double> poison to <4 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r123 = fptosi <4 x double> poison to <4 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r124 = fptoui <4 x double> poison to <4 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r125 = fptosi <4 x double> poison to <4 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r126 = fptoui <4 x double> poison to <4 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r127 = fptosi <4 x double> poison to <4 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r125 = fptosi <4 x double> poison to <4 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r126 = fptoui <4 x double> poison to <4 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r132 = fptoui <8 x float> poison to <8 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r133 = fptosi <8 x float> poison to <8 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x float> poison to <8 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x float> poison to <8 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r139 = fptosi <8 x float> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r140 = fptoui <8 x double> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r141 = fptosi <8 x double> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r142 = fptoui <8 x double> poison to <8 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r143 = fptosi <8 x double> poison to <8 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r144 = fptoui <8 x double> poison to <8 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r145 = fptosi <8 x double> poison to <8 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r146 = fptoui <8 x double> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r147 = fptosi <8 x double> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r142 = fptoui <8 x double> poison to <8 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r143 = fptosi <8 x double> poison to <8 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r144 = fptoui <8 x double> poison to <8 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r145 = fptosi <8 x double> poison to <8 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r146 = fptoui <8 x double> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r149 = fptosi <8 x double> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x float> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x float> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x float> poison to <16 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x float> poison to <16 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x float> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r155 = fptosi <16 x float> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r152 = fptoui <16 x float> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r153 = fptosi <16 x float> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r154 = fptoui <16 x float> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r159 = fptosi <16 x float> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r160 = fptoui <16 x double> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r161 = fptosi <16 x double> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r162 = fptoui <16 x double> poison to <16 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r163 = fptosi <16 x double> poison to <16 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r164 = fptoui <16 x double> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r165 = fptosi <16 x double> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r166 = fptoui <16 x double> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r167 = fptosi <16 x double> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r162 = fptoui <16 x double> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r163 = fptosi <16 x double> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r164 = fptoui <16 x double> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r165 = fptosi <16 x double> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r166 = fptoui <16 x double> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r167 = fptosi <16 x double> poison to <16 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r168 = fptoui <16 x double> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r169 = fptosi <16 x double> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
@@ -1146,52 +1146,52 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r199 = sitofp <4 x i64> poison to <4 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r202 = uitofp <4 x i8> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r203 = sitofp <4 x i8> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r204 = uitofp <4 x i16> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r205 = sitofp <4 x i16> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r206 = uitofp <4 x i32> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r207 = sitofp <4 x i32> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r205 = sitofp <4 x i16> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r206 = uitofp <4 x i32> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r213 = sitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r214 = uitofp <8 x i16> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r215 = sitofp <8 x i16> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r219 = sitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r220 = uitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r221 = sitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r222 = uitofp <8 x i8> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r223 = sitofp <8 x i8> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r224 = uitofp <8 x i16> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r225 = sitofp <8 x i16> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r226 = uitofp <8 x i32> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r227 = sitofp <8 x i32> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r222 = uitofp <8 x i8> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r223 = sitofp <8 x i8> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r224 = uitofp <8 x i16> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r225 = sitofp <8 x i16> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r226 = uitofp <8 x i32> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r229 = sitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r230 = uitofp <16 x i1> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r233 = sitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r234 = uitofp <16 x i16> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r235 = sitofp <16 x i16> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r234 = uitofp <16 x i16> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r239 = sitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r240 = uitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r241 = sitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r242 = uitofp <16 x i8> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r243 = sitofp <16 x i8> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r244 = uitofp <16 x i16> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r245 = sitofp <16 x i16> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r246 = uitofp <16 x i32> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r247 = sitofp <16 x i32> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r242 = uitofp <16 x i8> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r243 = sitofp <16 x i8> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r244 = uitofp <16 x i16> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r245 = sitofp <16 x i16> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r246 = uitofp <16 x i32> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r247 = sitofp <16 x i32> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r248 = uitofp <16 x i64> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r249 = sitofp <16 x i64> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
@@ -1279,52 +1279,52 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x float> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r122 = fptoui <4 x double> poison to <4 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r123 = fptosi <4 x double> poison to <4 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r124 = fptoui <4 x double> poison to <4 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r125 = fptosi <4 x double> poison to <4 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r126 = fptoui <4 x double> poison to <4 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r127 = fptosi <4 x double> poison to <4 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r125 = fptosi <4 x double> poison to <4 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r126 = fptoui <4 x double> poison to <4 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r132 = fptoui <8 x float> poison to <8 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r133 = fptosi <8 x float> poison to <8 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x float> poison to <8 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x float> poison to <8 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r139 = fptosi <8 x float> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r140 = fptoui <8 x double> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r141 = fptosi <8 x double> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r142 = fptoui <8 x double> poison to <8 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r143 = fptosi <8 x double> poison to <8 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r144 = fptoui <8 x double> poison to <8 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r145 = fptosi <8 x double> poison to <8 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r146 = fptoui <8 x double> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r147 = fptosi <8 x double> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r142 = fptoui <8 x double> poison to <8 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r143 = fptosi <8 x double> poison to <8 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r144 = fptoui <8 x double> poison to <8 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r145 = fptosi <8 x double> poison to <8 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r146 = fptoui <8 x double> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r149 = fptosi <8 x double> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x float> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x float> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r152 = fptoui <16 x float> poison to <16 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r153 = fptosi <16 x float> poison to <16 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x float> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r155 = fptosi <16 x float> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r152 = fptoui <16 x float> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r153 = fptosi <16 x float> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x float> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r159 = fptosi <16 x float> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r160 = fptoui <16 x double> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r161 = fptosi <16 x double> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r162 = fptoui <16 x double> poison to <16 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r163 = fptosi <16 x double> poison to <16 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r164 = fptoui <16 x double> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r165 = fptosi <16 x double> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r166 = fptoui <16 x double> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r167 = fptosi <16 x double> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r162 = fptoui <16 x double> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r163 = fptosi <16 x double> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r164 = fptoui <16 x double> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r165 = fptosi <16 x double> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r166 = fptoui <16 x double> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r167 = fptosi <16 x double> poison to <16 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r168 = fptoui <16 x double> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r169 = fptosi <16 x double> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
@@ -1359,52 +1359,52 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r199 = sitofp <4 x i64> poison to <4 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r202 = uitofp <4 x i8> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r203 = sitofp <4 x i8> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r204 = uitofp <4 x i16> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r205 = sitofp <4 x i16> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r206 = uitofp <4 x i32> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r207 = sitofp <4 x i32> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r205 = sitofp <4 x i16> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r206 = uitofp <4 x i32> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r213 = sitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r214 = uitofp <8 x i16> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r215 = sitofp <8 x i16> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r219 = sitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r220 = uitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r221 = sitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r222 = uitofp <8 x i8> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r223 = sitofp <8 x i8> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r224 = uitofp <8 x i16> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r225 = sitofp <8 x i16> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r226 = uitofp <8 x i32> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r227 = sitofp <8 x i32> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r222 = uitofp <8 x i8> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r223 = sitofp <8 x i8> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r224 = uitofp <8 x i16> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r225 = sitofp <8 x i16> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r226 = uitofp <8 x i32> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r229 = sitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r230 = uitofp <16 x i1> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r233 = sitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r234 = uitofp <16 x i16> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r235 = sitofp <16 x i16> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r234 = uitofp <16 x i16> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r239 = sitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r240 = uitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r241 = sitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r242 = uitofp <16 x i8> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r243 = sitofp <16 x i8> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r244 = uitofp <16 x i16> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r245 = sitofp <16 x i16> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r246 = uitofp <16 x i32> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r247 = sitofp <16 x i32> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r242 = uitofp <16 x i8> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r243 = sitofp <16 x i8> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r244 = uitofp <16 x i16> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r245 = sitofp <16 x i16> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r246 = uitofp <16 x i32> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r247 = sitofp <16 x i32> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r248 = uitofp <16 x i64> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r249 = sitofp <16 x i64> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 undef
@@ -2169,8 +2169,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r39 = fptosi half poison to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x half> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x half> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r92 = fptoui <2 x half> poison to <2 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r93 = fptosi <2 x half> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r92 = fptoui <2 x half> poison to <2 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r93 = fptosi <2 x half> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r94 = fptoui <2 x half> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r95 = fptosi <2 x half> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r96 = fptoui <2 x half> poison to <2 x i32>
@@ -2179,8 +2179,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r99 = fptosi <2 x half> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x half> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x half> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r112 = fptoui <4 x half> poison to <4 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r113 = fptosi <4 x half> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r112 = fptoui <4 x half> poison to <4 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r113 = fptosi <4 x half> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r114 = fptoui <4 x half> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r115 = fptosi <4 x half> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x half> poison to <4 x i32>
@@ -2189,8 +2189,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r119 = fptosi <4 x half> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x half> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x half> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r132 = fptoui <8 x half> poison to <8 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r133 = fptosi <8 x half> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x half> poison to <8 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x half> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x half> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x half> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r136 = fptoui <8 x half> poison to <8 x i32>
@@ -2199,8 +2199,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r139 = fptosi <8 x half> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r152 = fptoui <16 x half> poison to <16 x i8>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r155 = fptosi <16 x half> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r156 = fptoui <16 x half> poison to <16 x i32>
@@ -2209,8 +2209,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r159 = fptosi <16 x half> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r250 = uitofp <8 x i1> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r251 = sitofp <8 x i1> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r252 = uitofp <8 x i8> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r253 = sitofp <8 x i8> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r252 = uitofp <8 x i8> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r253 = sitofp <8 x i8> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r254 = uitofp <8 x i16> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r255 = sitofp <8 x i16> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r256 = uitofp <8 x i32> poison to <8 x half>
@@ -2219,8 +2219,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r259 = sitofp <8 x i64> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r260 = uitofp <16 x i1> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r261 = sitofp <16 x i1> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r262 = uitofp <16 x i8> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r263 = sitofp <16 x i8> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r262 = uitofp <16 x i8> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r265 = sitofp <16 x i16> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r266 = uitofp <16 x i32> poison to <16 x half>
@@ -2272,8 +2272,8 @@ define void @fp16cast() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r139 = fptosi <8 x half> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r152 = fptoui <16 x half> poison to <16 x i8>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r153 = fptosi <16 x half> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r155 = fptosi <16 x half> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r156 = fptoui <16 x half> poison to <16 x i32>
@@ -2292,8 +2292,8 @@ define void @fp16cast() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r259 = sitofp <8 x i64> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r262 = uitofp <16 x i8> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r263 = sitofp <16 x i8> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r265 = sitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r266 = uitofp <16 x i32> poison to <16 x half>
@@ -2345,8 +2345,8 @@ define void @fp16cast() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r139 = fptosi <8 x half> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r152 = fptoui <16 x half> poison to <16 x i8>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r153 = fptosi <16 x half> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r155 = fptosi <16 x half> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r156 = fptoui <16 x half> poison to <16 x i32>
@@ -2365,8 +2365,8 @@ define void @fp16cast() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r259 = sitofp <8 x i64> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r262 = uitofp <16 x i8> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r263 = sitofp <16 x i8> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r265 = sitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r266 = uitofp <16 x i32> poison to <16 x half>

>From cce3cd8339dc80d13e4d37f9378c6e974d2624a4 Mon Sep 17 00:00:00 2001
From: Jack Styles <jack.styles at arm.com>
Date: Wed, 23 Sep 2026 15:34:02 +0100
Subject: [PATCH 2/4] Add missing costs

---
 .../AArch64/AArch64TargetTransformInfo.cpp    |  50 ++-
 .../CostModel/AArch64/no-sve-no-neon.ll       |   2 +-
 .../Analysis/CostModel/AArch64/sve-cast.ll    | 416 +++++++++---------
 3 files changed, 249 insertions(+), 219 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 68080a78f77d5..bbb6e733386f9 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -3997,34 +3997,64 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
     // When going from a fixed vector to a scalable vector, types that get
     // promoted will have associated unpacking costs that would not otherwise be
     // present.
-    static const TypeConversionCostTblEntry FixedToScalablePackUnpackTbl[] = {
-        // f16 unpack
+    static const TypeConversionCostTblEntry ScalablePackUnpackTbl[] = {
+        // SVE: to f16
+        {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i1, SVE_UNPACK_ONCE},
         {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
+        {ISD::UINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
+        {ISD::UINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
+
+        {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i1, SVE_UNPACK_ONCE},
         {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
-        // f32 unpack
-        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_ONCE},
+        {ISD::SINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
+        {ISD::SINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
+        // SVE: to f32
+        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i1, SVE_UNPACK_TWICE},
+        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
-        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_ONCE},
+        {ISD::UINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
+
+        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i1, SVE_UNPACK_TWICE},
+        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
-        // f64 unpack
+        {ISD::SINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
+        // SVE: to f64
+        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i1, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
+
+        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i1, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
-        // f16 pack
+        // SVE: from f16
+        {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
+        {ISD::FP_TO_UINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
+        {ISD::FP_TO_UINT, MVT::nxv8i1, MVT::nxv8f16, 1}, // uzp
         {ISD::FP_TO_UINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
+
+        {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
+        {ISD::FP_TO_SINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
+        {ISD::FP_TO_SINT, MVT::nxv8i1, MVT::nxv8f16, 1}, // uzp
         {ISD::FP_TO_SINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
-        // f32 pack
+        // SVE: from f32
+        {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
+        {ISD::FP_TO_UINT, MVT::nxv4i1, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
+
+        {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
+        {ISD::FP_TO_SINT, MVT::nxv4i1, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
-        // f64 pack
+        // SVE: from f64
+        {ISD::FP_TO_UINT, MVT::nxv2i1, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
+
+        {ISD::FP_TO_SINT, MVT::nxv2i1, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
@@ -4042,7 +4072,7 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
     InstructionCost ConversionCost =
         getCastInstrCost(Opcode, DstScalabeTy, SrcScalabeTy, CCH, CostKind, I);
     if (const auto *Entry = ConvertCostTableLookup(
-            FixedToScalablePackUnpackTbl, ISD,
+            ScalablePackUnpackTbl, ISD,
             TLI->getValueType(DL, DstScalabeTy).getSimpleVT(),
             TLI->getValueType(DL, SrcScalabeTy).getSimpleVT()))
       return Cost * (ConversionCost + Entry->Cost);
diff --git a/llvm/test/Analysis/CostModel/AArch64/no-sve-no-neon.ll b/llvm/test/Analysis/CostModel/AArch64/no-sve-no-neon.ll
index 0ec8cb50942d1..305696eb51680 100644
--- a/llvm/test/Analysis/CostModel/AArch64/no-sve-no-neon.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/no-sve-no-neon.ll
@@ -11,7 +11,7 @@ define void @uitofp() {
 ; CHECK-NONEON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; CHECK-WITHSVE-LABEL: 'uitofp'
-; CHECK-WITHSVE-NEXT:  Cost Model: Found costs of 16 for: %conv = uitofp <16 x i64> poison to <16 x float>
+; CHECK-WITHSVE-NEXT:  Cost Model: Found costs of 32 for: %conv = uitofp <16 x i64> poison to <16 x float>
 ; CHECK-WITHSVE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %conv = uitofp <16 x i64> poison to <16 x float>
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
index 85edb0a7481d6..292e4bda76274 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
@@ -821,18 +821,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r87 = fpext <4 x float> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r88 = fpext <8 x float> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r89 = fpext <16 x float> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r90 = fptoui <2 x float> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r91 = fptosi <2 x float> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r92 = fptoui <2 x float> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r93 = fptosi <2 x float> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r94 = fptoui <2 x float> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r95 = fptosi <2 x float> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r96 = fptoui <2 x float> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r97 = fptosi <2 x float> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r98 = fptoui <2 x float> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r99 = fptosi <2 x float> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r100 = fptoui <2 x double> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r101 = fptosi <2 x double> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r98 = fptoui <2 x float> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r99 = fptosi <2 x float> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r100 = fptoui <2 x double> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r101 = fptosi <2 x double> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r102 = fptoui <2 x double> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r103 = fptosi <2 x double> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r104 = fptoui <2 x double> poison to <2 x i16>
@@ -841,18 +841,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r107 = fptosi <2 x double> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r108 = fptoui <2 x double> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r109 = fptosi <2 x double> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x float> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x float> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r110 = fptoui <4 x float> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r111 = fptosi <4 x float> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r112 = fptoui <4 x float> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r113 = fptosi <4 x float> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r114 = fptoui <4 x float> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r118 = fptoui <4 x float> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r118 = fptoui <4 x float> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r119 = fptosi <4 x float> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -861,18 +861,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r134 = fptoui <8 x float> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r137 = fptosi <8 x float> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r138 = fptoui <8 x float> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r138 = fptoui <8 x float> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r139 = fptosi <8 x float> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -881,18 +881,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r154 = fptoui <16 x float> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r157 = fptosi <16 x float> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r158 = fptoui <16 x float> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r158 = fptoui <16 x float> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r159 = fptosi <16 x float> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -901,18 +901,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r167 = fptosi <16 x double> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r168 = fptoui <16 x double> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r169 = fptosi <16 x double> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r171 = sitofp <2 x i1> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r172 = uitofp <2 x i8> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r173 = sitofp <2 x i8> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r170 = uitofp <2 x i1> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r171 = sitofp <2 x i1> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r172 = uitofp <2 x i8> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r173 = sitofp <2 x i8> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r174 = uitofp <2 x i16> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r175 = sitofp <2 x i16> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r176 = uitofp <2 x i32> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r177 = sitofp <2 x i32> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r178 = uitofp <2 x i64> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r179 = sitofp <2 x i64> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r180 = uitofp <2 x i1> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r181 = sitofp <2 x i1> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r178 = uitofp <2 x i64> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r179 = sitofp <2 x i64> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r180 = uitofp <2 x i1> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r181 = sitofp <2 x i1> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r182 = uitofp <2 x i8> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r183 = sitofp <2 x i8> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r184 = uitofp <2 x i16> poison to <2 x double>
@@ -921,18 +921,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r187 = sitofp <2 x i32> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r188 = uitofp <2 x i64> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r189 = sitofp <2 x i64> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r190 = uitofp <4 x i1> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r191 = sitofp <4 x i1> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r192 = uitofp <4 x i8> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r193 = sitofp <4 x i8> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r190 = uitofp <4 x i1> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r191 = sitofp <4 x i1> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r192 = uitofp <4 x i8> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r193 = sitofp <4 x i8> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r194 = uitofp <4 x i16> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r195 = sitofp <4 x i16> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r196 = uitofp <4 x i32> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r198 = uitofp <4 x i64> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r199 = sitofp <4 x i64> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -941,18 +941,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r214 = uitofp <8 x i16> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r217 = sitofp <8 x i32> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r218 = uitofp <8 x i64> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r218 = uitofp <8 x i64> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r219 = sitofp <8 x i64> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -961,18 +961,18 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r234 = uitofp <16 x i16> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r237 = sitofp <16 x i32> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r238 = uitofp <16 x i64> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r238 = uitofp <16 x i64> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r239 = sitofp <16 x i64> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -1062,10 +1062,10 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r118 = fptoui <4 x float> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -1074,18 +1074,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r138 = fptoui <8 x float> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r138 = fptoui <8 x float> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r139 = fptosi <8 x float> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -1094,18 +1094,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r154 = fptoui <16 x float> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r157 = fptosi <16 x float> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r158 = fptoui <16 x float> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r158 = fptoui <16 x float> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r159 = fptosi <16 x float> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -1142,10 +1142,10 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r195 = sitofp <4 x i16> poison to <4 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r196 = uitofp <4 x i32> poison to <4 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r198 = uitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -1154,18 +1154,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r218 = uitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r218 = uitofp <8 x i64> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r219 = sitofp <8 x i64> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -1174,18 +1174,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r234 = uitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r237 = sitofp <16 x i32> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r238 = uitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r238 = uitofp <16 x i64> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r239 = sitofp <16 x i64> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -1275,10 +1275,10 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r118 = fptoui <4 x float> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -1287,18 +1287,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r135 = fptosi <8 x float> poison to <8 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x float> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r138 = fptoui <8 x float> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r138 = fptoui <8 x float> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r139 = fptosi <8 x float> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -1307,18 +1307,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x float> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r155 = fptosi <16 x float> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r156 = fptoui <16 x float> poison to <16 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r157 = fptosi <16 x float> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r158 = fptoui <16 x float> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r158 = fptoui <16 x float> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r159 = fptosi <16 x float> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -1355,10 +1355,10 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r195 = sitofp <4 x i16> poison to <4 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r196 = uitofp <4 x i32> poison to <4 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r198 = uitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -1367,18 +1367,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r212 = uitofp <8 x i8> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r213 = sitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r212 = uitofp <8 x i8> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r215 = sitofp <8 x i16> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r216 = uitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r218 = uitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r218 = uitofp <8 x i64> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r219 = sitofp <8 x i64> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -1387,18 +1387,18 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r231 = sitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r232 = uitofp <16 x i8> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r233 = sitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r232 = uitofp <16 x i8> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r234 = uitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r235 = sitofp <16 x i16> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r236 = uitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r237 = sitofp <16 x i32> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r238 = uitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r238 = uitofp <16 x i64> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r239 = sitofp <16 x i64> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -2167,66 +2167,66 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r37 = fptosi half poison to i32
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r38 = fptoui half poison to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r39 = fptosi half poison to i64
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x half> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x half> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r90 = fptoui <2 x half> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r91 = fptosi <2 x half> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r92 = fptoui <2 x half> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r93 = fptosi <2 x half> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r94 = fptoui <2 x half> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r95 = fptosi <2 x half> poison to <2 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r96 = fptoui <2 x half> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r97 = fptosi <2 x half> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r98 = fptoui <2 x half> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r99 = fptosi <2 x half> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x half> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x half> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r96 = fptoui <2 x half> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r97 = fptosi <2 x half> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r98 = fptoui <2 x half> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r99 = fptosi <2 x half> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r110 = fptoui <4 x half> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r111 = fptosi <4 x half> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r112 = fptoui <4 x half> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r113 = fptosi <4 x half> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r114 = fptoui <4 x half> poison to <4 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r115 = fptosi <4 x half> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r116 = fptoui <4 x half> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x half> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r118 = fptoui <4 x half> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r119 = fptosi <4 x half> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x half> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x half> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r116 = fptoui <4 x half> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r117 = fptosi <4 x half> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r118 = fptoui <4 x half> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r119 = fptosi <4 x half> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r130 = fptoui <8 x half> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r131 = fptosi <8 x half> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x half> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x half> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x half> poison to <8 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x half> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r136 = fptoui <8 x half> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r137 = fptosi <8 x half> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r138 = fptoui <8 x half> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r136 = fptoui <8 x half> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r137 = fptosi <8 x half> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r138 = fptoui <8 x half> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r139 = fptosi <8 x half> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r155 = fptosi <16 x half> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r156 = fptoui <16 x half> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r157 = fptosi <16 x half> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r158 = fptoui <16 x half> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r159 = fptosi <16 x half> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r250 = uitofp <8 x i1> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r251 = sitofp <8 x i1> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r156 = fptoui <16 x half> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r157 = fptosi <16 x half> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r158 = fptoui <16 x half> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r159 = fptosi <16 x half> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r250 = uitofp <8 x i1> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r251 = sitofp <8 x i1> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r252 = uitofp <8 x i8> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r253 = sitofp <8 x i8> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r254 = uitofp <8 x i16> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r255 = sitofp <8 x i16> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r256 = uitofp <8 x i32> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r257 = sitofp <8 x i32> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r258 = uitofp <8 x i64> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r256 = uitofp <8 x i32> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r257 = sitofp <8 x i32> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r258 = uitofp <8 x i64> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r259 = sitofp <8 x i64> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r265 = sitofp <16 x i16> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r266 = uitofp <16 x i32> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r267 = sitofp <16 x i32> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r268 = uitofp <16 x i64> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r269 = sitofp <16 x i64> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r266 = uitofp <16 x i32> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r267 = sitofp <16 x i32> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r268 = uitofp <16 x i64> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r269 = sitofp <16 x i64> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; FIXED-MIN-256-LABEL: 'fp16cast'
@@ -2258,48 +2258,48 @@ define void @fp16cast() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r115 = fptosi <4 x half> poison to <4 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r116 = fptoui <4 x half> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r117 = fptosi <4 x half> poison to <4 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r118 = fptoui <4 x half> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x half> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r118 = fptoui <4 x half> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r119 = fptosi <4 x half> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of RThru:40 CodeSize:24 Lat:40 SizeLat:40 for: %r130 = fptoui <8 x half> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of RThru:40 CodeSize:24 Lat:40 SizeLat:40 for: %r131 = fptosi <8 x half> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x half> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x half> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x half> poison to <8 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x half> poison to <8 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x half> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x half> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r138 = fptoui <8 x half> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r136 = fptoui <8 x half> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r137 = fptosi <8 x half> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r138 = fptoui <8 x half> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r139 = fptosi <8 x half> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r155 = fptosi <16 x half> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r156 = fptoui <16 x half> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r157 = fptosi <16 x half> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r158 = fptoui <16 x half> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r159 = fptosi <16 x half> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r156 = fptoui <16 x half> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r157 = fptosi <16 x half> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r158 = fptoui <16 x half> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r159 = fptosi <16 x half> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r250 = uitofp <8 x i1> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r251 = sitofp <8 x i1> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r252 = uitofp <8 x i8> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r253 = sitofp <8 x i8> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r254 = uitofp <8 x i16> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r255 = sitofp <8 x i16> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r256 = uitofp <8 x i32> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r257 = sitofp <8 x i32> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r258 = uitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r256 = uitofp <8 x i32> poison to <8 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r257 = sitofp <8 x i32> poison to <8 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r258 = uitofp <8 x i64> poison to <8 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r259 = sitofp <8 x i64> poison to <8 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r265 = sitofp <16 x i16> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r266 = uitofp <16 x i32> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r267 = sitofp <16 x i32> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r268 = uitofp <16 x i64> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r269 = sitofp <16 x i64> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r266 = uitofp <16 x i32> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r267 = sitofp <16 x i32> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r268 = uitofp <16 x i64> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r269 = sitofp <16 x i64> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; FIXED-MIN-2048-LABEL: 'fp16cast'
@@ -2331,48 +2331,48 @@ define void @fp16cast() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r115 = fptosi <4 x half> poison to <4 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r116 = fptoui <4 x half> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r117 = fptosi <4 x half> poison to <4 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r118 = fptoui <4 x half> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r119 = fptosi <4 x half> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r118 = fptoui <4 x half> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r119 = fptosi <4 x half> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of RThru:40 CodeSize:24 Lat:40 SizeLat:40 for: %r130 = fptoui <8 x half> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of RThru:40 CodeSize:24 Lat:40 SizeLat:40 for: %r131 = fptosi <8 x half> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x half> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x half> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x half> poison to <8 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r135 = fptosi <8 x half> poison to <8 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r136 = fptoui <8 x half> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x half> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r138 = fptoui <8 x half> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r136 = fptoui <8 x half> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r137 = fptosi <8 x half> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r138 = fptoui <8 x half> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r139 = fptosi <8 x half> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r155 = fptosi <16 x half> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r156 = fptoui <16 x half> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r157 = fptosi <16 x half> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r158 = fptoui <16 x half> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r159 = fptosi <16 x half> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r156 = fptoui <16 x half> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r157 = fptosi <16 x half> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r158 = fptoui <16 x half> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r159 = fptosi <16 x half> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r250 = uitofp <8 x i1> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r251 = sitofp <8 x i1> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r252 = uitofp <8 x i8> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r253 = sitofp <8 x i8> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r254 = uitofp <8 x i16> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r255 = sitofp <8 x i16> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r256 = uitofp <8 x i32> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r257 = sitofp <8 x i32> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r258 = uitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r256 = uitofp <8 x i32> poison to <8 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r257 = sitofp <8 x i32> poison to <8 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r258 = uitofp <8 x i64> poison to <8 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r259 = sitofp <8 x i64> poison to <8 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r265 = sitofp <16 x i16> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r266 = uitofp <16 x i32> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r267 = sitofp <16 x i32> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r268 = uitofp <16 x i64> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r269 = sitofp <16 x i64> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r266 = uitofp <16 x i32> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r267 = sitofp <16 x i32> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r268 = uitofp <16 x i64> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r269 = sitofp <16 x i64> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %r30 = fptoui half poison to i1

>From e87281f7de7b3973743fe94503f91604f5fae441 Mon Sep 17 00:00:00 2001
From: Jack Styles <jack.styles at arm.com>
Date: Mon, 28 Sep 2026 14:09:11 +0100
Subject: [PATCH 3/4] Remove i1 entries

---
 .../AArch64/AArch64TargetTransformInfo.cpp    |  12 --
 .../Analysis/CostModel/AArch64/sve-cast.ll    | 184 +++++++++---------
 2 files changed, 92 insertions(+), 104 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index a365d8150d6e8..45ce099a0a1db 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -4026,62 +4026,50 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
     // present.
     static const TypeConversionCostTblEntry ScalablePackUnpackTbl[] = {
         // SVE: to f16
-        {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i1, SVE_UNPACK_ONCE},
         {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
         {ISD::UINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
         {ISD::UINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
 
-        {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i1, SVE_UNPACK_ONCE},
         {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
         {ISD::SINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
         {ISD::SINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
         // SVE: to f32
-        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i1, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
         {ISD::UINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
 
-        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i1, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
         {ISD::SINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
         // SVE: to f64
-        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i1, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
         {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
 
-        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i1, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
         {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
         // SVE: from f16
         {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
         {ISD::FP_TO_UINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_UINT, MVT::nxv8i1, MVT::nxv8f16, 1}, // uzp
         {ISD::FP_TO_UINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
 
         {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
         {ISD::FP_TO_SINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_SINT, MVT::nxv8i1, MVT::nxv8f16, 1}, // uzp
         {ISD::FP_TO_SINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
         // SVE: from f32
         {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_UINT, MVT::nxv4i1, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
 
         {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_SINT, MVT::nxv4i1, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
         // SVE: from f64
-        {ISD::FP_TO_UINT, MVT::nxv2i1, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
         {ISD::FP_TO_UINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
 
-        {ISD::FP_TO_SINT, MVT::nxv2i1, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
         {ISD::FP_TO_SINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
index 292e4bda76274..7a25f3a3dd4ee 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
@@ -821,8 +821,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r87 = fpext <4 x float> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r88 = fpext <8 x float> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r89 = fpext <16 x float> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r90 = fptoui <2 x float> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r91 = fptosi <2 x float> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r92 = fptoui <2 x float> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r93 = fptosi <2 x float> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r94 = fptoui <2 x float> poison to <2 x i16>
@@ -831,8 +831,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r97 = fptosi <2 x float> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r98 = fptoui <2 x float> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r99 = fptosi <2 x float> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r100 = fptoui <2 x double> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r101 = fptosi <2 x double> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r100 = fptoui <2 x double> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r101 = fptosi <2 x double> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r102 = fptoui <2 x double> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r103 = fptosi <2 x double> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r104 = fptoui <2 x double> poison to <2 x i16>
@@ -841,8 +841,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r107 = fptosi <2 x double> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r108 = fptoui <2 x double> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r109 = fptosi <2 x double> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r110 = fptoui <4 x float> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r111 = fptosi <4 x float> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x float> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x float> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r112 = fptoui <4 x float> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r113 = fptosi <4 x float> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r114 = fptoui <4 x float> poison to <4 x i16>
@@ -851,8 +851,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r118 = fptoui <4 x float> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -861,8 +861,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r134 = fptoui <8 x float> poison to <8 x i16>
@@ -871,8 +871,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -881,8 +881,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r154 = fptoui <16 x float> poison to <16 x i16>
@@ -891,8 +891,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 24 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -901,8 +901,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r167 = fptosi <16 x double> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r168 = fptoui <16 x double> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r169 = fptosi <16 x double> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r170 = uitofp <2 x i1> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r171 = sitofp <2 x i1> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r171 = sitofp <2 x i1> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r172 = uitofp <2 x i8> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r173 = sitofp <2 x i8> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r174 = uitofp <2 x i16> poison to <2 x float>
@@ -911,8 +911,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r177 = sitofp <2 x i32> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r178 = uitofp <2 x i64> poison to <2 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r179 = sitofp <2 x i64> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r180 = uitofp <2 x i1> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r181 = sitofp <2 x i1> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r180 = uitofp <2 x i1> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r181 = sitofp <2 x i1> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r182 = uitofp <2 x i8> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r183 = sitofp <2 x i8> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r184 = uitofp <2 x i16> poison to <2 x double>
@@ -921,8 +921,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r187 = sitofp <2 x i32> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r188 = uitofp <2 x i64> poison to <2 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r189 = sitofp <2 x i64> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r190 = uitofp <4 x i1> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r191 = sitofp <4 x i1> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r190 = uitofp <4 x i1> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r191 = sitofp <4 x i1> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r192 = uitofp <4 x i8> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 18 for: %r193 = sitofp <4 x i8> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r194 = uitofp <4 x i16> poison to <4 x float>
@@ -931,8 +931,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r198 = uitofp <4 x i64> poison to <4 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -941,8 +941,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r211 = sitofp <8 x i1> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r212 = uitofp <8 x i8> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 36 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r214 = uitofp <8 x i16> poison to <8 x float>
@@ -951,8 +951,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -961,8 +961,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r231 = sitofp <16 x i1> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r232 = uitofp <16 x i8> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 72 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r234 = uitofp <16 x i16> poison to <16 x float>
@@ -971,8 +971,8 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 144 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -1064,8 +1064,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -1074,8 +1074,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
@@ -1084,8 +1084,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -1094,8 +1094,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r154 = fptoui <16 x float> poison to <16 x i16>
@@ -1104,8 +1104,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 12 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -1144,8 +1144,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -1154,8 +1154,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r212 = uitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 18 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
@@ -1164,8 +1164,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -1174,8 +1174,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r231 = sitofp <16 x i1> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r232 = uitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 36 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r234 = uitofp <16 x i16> poison to <16 x float>
@@ -1184,8 +1184,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 72 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -1277,8 +1277,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r120 = fptoui <4 x double> poison to <4 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r121 = fptosi <4 x double> poison to <4 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r120 = fptoui <4 x double> poison to <4 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r121 = fptosi <4 x double> poison to <4 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r122 = fptoui <4 x double> poison to <4 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r123 = fptosi <4 x double> poison to <4 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r124 = fptoui <4 x double> poison to <4 x i16>
@@ -1287,8 +1287,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r127 = fptosi <4 x double> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r128 = fptoui <4 x double> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r129 = fptosi <4 x double> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r130 = fptoui <8 x float> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r131 = fptosi <8 x float> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x float> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x float> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r132 = fptoui <8 x float> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r133 = fptosi <8 x float> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r134 = fptoui <8 x float> poison to <8 x i16>
@@ -1297,8 +1297,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r137 = fptosi <8 x float> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r138 = fptoui <8 x float> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r139 = fptosi <8 x float> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r140 = fptoui <8 x double> poison to <8 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r141 = fptosi <8 x double> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r140 = fptoui <8 x double> poison to <8 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r141 = fptosi <8 x double> poison to <8 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r142 = fptoui <8 x double> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r143 = fptosi <8 x double> poison to <8 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r144 = fptoui <8 x double> poison to <8 x i16>
@@ -1307,8 +1307,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r147 = fptosi <8 x double> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r148 = fptoui <8 x double> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r149 = fptosi <8 x double> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r150 = fptoui <16 x float> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r151 = fptosi <16 x float> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x float> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x float> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r152 = fptoui <16 x float> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r153 = fptosi <16 x float> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x float> poison to <16 x i16>
@@ -1317,8 +1317,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r157 = fptosi <16 x float> poison to <16 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r158 = fptoui <16 x float> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r159 = fptosi <16 x float> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r160 = fptoui <16 x double> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r161 = fptosi <16 x double> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r160 = fptoui <16 x double> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r161 = fptosi <16 x double> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r162 = fptoui <16 x double> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r163 = fptosi <16 x double> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r164 = fptoui <16 x double> poison to <16 x i16>
@@ -1357,8 +1357,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r197 = sitofp <4 x i32> poison to <4 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r198 = uitofp <4 x i64> poison to <4 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r199 = sitofp <4 x i64> poison to <4 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r200 = uitofp <4 x i1> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r201 = sitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r200 = uitofp <4 x i1> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r201 = sitofp <4 x i1> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r202 = uitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r203 = sitofp <4 x i8> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r204 = uitofp <4 x i16> poison to <4 x double>
@@ -1367,8 +1367,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r207 = sitofp <4 x i32> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r208 = uitofp <4 x i64> poison to <4 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r209 = sitofp <4 x i64> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r210 = uitofp <8 x i1> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r211 = sitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r210 = uitofp <8 x i1> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r211 = sitofp <8 x i1> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r212 = uitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r213 = sitofp <8 x i8> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r214 = uitofp <8 x i16> poison to <8 x float>
@@ -1377,8 +1377,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r217 = sitofp <8 x i32> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r218 = uitofp <8 x i64> poison to <8 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r219 = sitofp <8 x i64> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r220 = uitofp <8 x i1> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r221 = sitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r220 = uitofp <8 x i1> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r221 = sitofp <8 x i1> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r222 = uitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r223 = sitofp <8 x i8> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r224 = uitofp <8 x i16> poison to <8 x double>
@@ -1387,8 +1387,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r227 = sitofp <8 x i32> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r228 = uitofp <8 x i64> poison to <8 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r229 = sitofp <8 x i64> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r230 = uitofp <16 x i1> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r231 = sitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r230 = uitofp <16 x i1> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r231 = sitofp <16 x i1> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r232 = uitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r233 = sitofp <16 x i8> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r234 = uitofp <16 x i16> poison to <16 x float>
@@ -1397,8 +1397,8 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r237 = sitofp <16 x i32> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r238 = uitofp <16 x i64> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r239 = sitofp <16 x i64> poison to <16 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r240 = uitofp <16 x i1> poison to <16 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r241 = sitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r240 = uitofp <16 x i1> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r241 = sitofp <16 x i1> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r242 = uitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 18 for: %r243 = sitofp <16 x i8> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r244 = uitofp <16 x i16> poison to <16 x double>
@@ -2167,8 +2167,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r37 = fptosi half poison to i32
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r38 = fptoui half poison to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r39 = fptosi half poison to i64
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r90 = fptoui <2 x half> poison to <2 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r91 = fptosi <2 x half> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x half> poison to <2 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x half> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r92 = fptoui <2 x half> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r93 = fptosi <2 x half> poison to <2 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r94 = fptoui <2 x half> poison to <2 x i16>
@@ -2177,8 +2177,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r97 = fptosi <2 x half> poison to <2 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r98 = fptoui <2 x half> poison to <2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %r99 = fptosi <2 x half> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r110 = fptoui <4 x half> poison to <4 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r111 = fptosi <4 x half> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r110 = fptoui <4 x half> poison to <4 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r111 = fptosi <4 x half> poison to <4 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r112 = fptoui <4 x half> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r113 = fptosi <4 x half> poison to <4 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r114 = fptoui <4 x half> poison to <4 x i16>
@@ -2187,8 +2187,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r117 = fptosi <4 x half> poison to <4 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r118 = fptoui <4 x half> poison to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %r119 = fptosi <4 x half> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r130 = fptoui <8 x half> poison to <8 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r131 = fptosi <8 x half> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r130 = fptoui <8 x half> poison to <8 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r131 = fptosi <8 x half> poison to <8 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r132 = fptoui <8 x half> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r133 = fptosi <8 x half> poison to <8 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r134 = fptoui <8 x half> poison to <8 x i16>
@@ -2197,8 +2197,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r137 = fptosi <8 x half> poison to <8 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r138 = fptoui <8 x half> poison to <8 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r154 = fptoui <16 x half> poison to <16 x i16>
@@ -2207,8 +2207,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r157 = fptosi <16 x half> poison to <16 x i32>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r158 = fptoui <16 x half> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %r159 = fptosi <16 x half> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r250 = uitofp <8 x i1> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r251 = sitofp <8 x i1> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r250 = uitofp <8 x i1> poison to <8 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r251 = sitofp <8 x i1> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r252 = uitofp <8 x i8> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 6 for: %r253 = sitofp <8 x i8> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r254 = uitofp <8 x i16> poison to <8 x half>
@@ -2217,8 +2217,8 @@ define void @fp16cast() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r257 = sitofp <8 x i32> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r258 = uitofp <8 x i64> poison to <8 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 12 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r264 = uitofp <16 x i16> poison to <16 x half>
@@ -2270,8 +2270,8 @@ define void @fp16cast() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r137 = fptosi <8 x half> poison to <8 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r138 = fptoui <8 x half> poison to <8 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
@@ -2290,8 +2290,8 @@ define void @fp16cast() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r257 = sitofp <8 x i32> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r258 = uitofp <8 x i64> poison to <8 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>
@@ -2343,8 +2343,8 @@ define void @fp16cast() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r137 = fptosi <8 x half> poison to <8 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r138 = fptoui <8 x half> poison to <8 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %r139 = fptosi <8 x half> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r150 = fptoui <16 x half> poison to <16 x i1>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r151 = fptosi <16 x half> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r150 = fptoui <16 x half> poison to <16 x i1>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r151 = fptosi <16 x half> poison to <16 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r152 = fptoui <16 x half> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r153 = fptosi <16 x half> poison to <16 x i8>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r154 = fptoui <16 x half> poison to <16 x i16>
@@ -2363,8 +2363,8 @@ define void @fp16cast() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r257 = sitofp <8 x i32> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r258 = uitofp <8 x i64> poison to <8 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 3 for: %r259 = sitofp <8 x i64> poison to <8 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r260 = uitofp <16 x i1> poison to <16 x half>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r261 = sitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r260 = uitofp <16 x i1> poison to <16 x half>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r261 = sitofp <16 x i1> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r262 = uitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 6 for: %r263 = sitofp <16 x i8> poison to <16 x half>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r264 = uitofp <16 x i16> poison to <16 x half>

>From 88238d1bc0e11d248628ae742c5b15147741bdbe Mon Sep 17 00:00:00 2001
From: Jack Styles <jack.styles at arm.com>
Date: Wed, 30 Sep 2026 11:56:14 +0100
Subject: [PATCH 4/4] Convert to function

---
 .../AArch64/AArch64TargetTransformInfo.cpp    | 114 ++++---
 .../Analysis/CostModel/AArch64/sve-cast.ll    | 280 +++++++++---------
 .../CostModel/AArch64/sve-vls-reduce-bfp.ll   |   8 +-
 .../AArch64/sve-widening-instruction.ll       |   4 +-
 4 files changed, 198 insertions(+), 208 deletions(-)

diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 45ce099a0a1db..fe8af778f1ef6 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -3883,6 +3883,42 @@ bool AArch64TTIImpl::isExtPartOfAvgExpr(const Instruction *ExtUser, Type *Dst,
   return false;
 }
 
+static InstructionCost getPackUnpackCost(EVT DstVT, EVT SrcVT) {
+  // The cost of unpacking twice is artificially increased for now in order
+  // to avoid regressions against NEON, which will use tbl instructions directly
+  // instead of multiple layers of [s|u]unpk[lo|hi].
+  // We use the unpacks in cases where the destination type is illegal and
+  // requires splitting of the input, even if the input type itself is legal.
+  const unsigned int SVE_UNPACK_ONCE = 4;
+  const unsigned int SVE_UNPACK_TWICE = 16;
+  bool IsSrcUnpacked = isUnpackedVectorVT(SrcVT);
+  bool IsDstUnpacked = isUnpackedVectorVT(DstVT);
+
+  if ((IsSrcUnpacked && IsDstUnpacked) || (!IsSrcUnpacked && !IsDstUnpacked))
+    return InstructionCost(0);
+  if (IsSrcUnpacked && !IsDstUnpacked) {
+    switch ((DstVT.getSizeInBits().getKnownMinValue()) /
+            (SrcVT.getSizeInBits().getKnownMinValue())) {
+    case 2:
+      return InstructionCost(SVE_UNPACK_ONCE);
+    case 4:
+    case 8:
+      return InstructionCost(SVE_UNPACK_TWICE);
+    }
+  }
+  if (IsDstUnpacked && !IsSrcUnpacked) {
+    switch ((SrcVT.getSizeInBits().getKnownMinValue()) /
+            (DstVT.getSizeInBits().getKnownMinValue())) {
+    case 2:
+      return InstructionCost(1); // 1 uzp
+    case 4:
+    case 8:
+      return InstructionCost(2); // 2 uzp
+    }
+  }
+  return InstructionCost(0);
+}
+
 InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
                                                  Type *Src,
                                                  TTI::CastContextHint CCH,
@@ -4021,63 +4057,8 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
   if (SrcTy.isFixedLengthVector() && DstTy.isFixedLengthVector() &&
       SrcTy.getVectorNumElements() == DstTy.getVectorNumElements() &&
       ST->useSVEForFixedLengthVectors(WiderTy)) {
-    // When going from a fixed vector to a scalable vector, types that get
-    // promoted will have associated unpacking costs that would not otherwise be
-    // present.
-    static const TypeConversionCostTblEntry ScalablePackUnpackTbl[] = {
-        // SVE: to f16
-        {ISD::UINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
-        {ISD::UINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
-        {ISD::UINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
-
-        {ISD::SINT_TO_FP, MVT::nxv8f16, MVT::nxv8i8, SVE_UNPACK_ONCE},
-        {ISD::SINT_TO_FP, MVT::nxv4f16, MVT::nxv4i32, 1}, // uzp
-        {ISD::SINT_TO_FP, MVT::nxv2f16, MVT::nxv2i64, 2}, // 2 uzp
-        // SVE: to f32
-        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
-        {ISD::UINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
-        {ISD::UINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
-
-        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i8, SVE_UNPACK_TWICE},
-        {ISD::SINT_TO_FP, MVT::nxv4f32, MVT::nxv4i16, SVE_UNPACK_ONCE},
-        {ISD::SINT_TO_FP, MVT::nxv2f32, MVT::nxv2i64, 1}, // uzp
-        // SVE: to f64
-        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
-        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
-        {ISD::UINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
-
-        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i8, SVE_UNPACK_TWICE},
-        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i16, SVE_UNPACK_TWICE},
-        {ISD::SINT_TO_FP, MVT::nxv2f64, MVT::nxv2i32, SVE_UNPACK_ONCE},
-        // SVE: from f16
-        {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
-        {ISD::FP_TO_UINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_UINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
-
-        {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f16, SVE_UNPACK_TWICE},
-        {ISD::FP_TO_SINT, MVT::nxv4i32, MVT::nxv4f16, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_SINT, MVT::nxv8i8, MVT::nxv8f16, 1}, // uzp
-        // SVE: from f32
-        {ISD::FP_TO_UINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_UINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
-        {ISD::FP_TO_UINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
-
-        {ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f32, SVE_UNPACK_ONCE},
-        {ISD::FP_TO_SINT, MVT::nxv4i8, MVT::nxv4f32, 2},  // 2 uzp
-        {ISD::FP_TO_SINT, MVT::nxv4i16, MVT::nxv4f32, 1}, // uzp
-        // SVE: from f64
-        {ISD::FP_TO_UINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
-        {ISD::FP_TO_UINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
-        {ISD::FP_TO_UINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
-
-        {ISD::FP_TO_SINT, MVT::nxv2i8, MVT::nxv2f64, 2},  // 2 uzp
-        {ISD::FP_TO_SINT, MVT::nxv2i16, MVT::nxv2f64, 2}, // 2 uzp
-        {ISD::FP_TO_SINT, MVT::nxv2i32, MVT::nxv2f64, 1}, // uzp
-    };
-
     std::pair<InstructionCost, MVT> LT =
         getTypeLegalizationCost(WiderTy.getTypeForEVT(Dst->getContext()));
-    InstructionCost Cost = LT.first;
     unsigned NumElements =
         AArch64::SVEBitsPerBlock / LT.second.getScalarSizeInBits();
     auto *SrcScalabeTy =
@@ -4086,13 +4067,22 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
         ScalableVectorType::get(Dst->getScalarType(), NumElements);
     InstructionCost ConversionCost =
         getCastInstrCost(Opcode, DstScalabeTy, SrcScalabeTy, CCH, CostKind, I);
-    if (const auto *Entry = ConvertCostTableLookup(
-            ScalablePackUnpackTbl, ISD,
-            TLI->getValueType(DL, DstScalabeTy).getSimpleVT(),
-            TLI->getValueType(DL, SrcScalabeTy).getSimpleVT()))
-      return Cost * (ConversionCost + Entry->Cost);
-
-    return Cost * ConversionCost;
+    // Truncate operations won't introduce packing/unpacking instructions that
+    // are not already catered for here, and we should exclude i1 examples too
+    // as they are always packed types.
+    if (ISD != ISD::TRUNCATE && SrcTy.getScalarSizeInBits() > 1) {
+      InstructionCost PackUnpackCost =
+          getPackUnpackCost(TLI->getValueType(DL, DstScalabeTy),
+                            TLI->getValueType(DL, SrcScalabeTy));
+      LLVM_DEBUG(
+          dbgs() << "\n"
+                 << "New Function Return Val: "
+                 << getPackUnpackCost(TLI->getValueType(DL, DstScalabeTy),
+                                      TLI->getValueType(DL, SrcScalabeTy))
+                 << "\n");
+      return LT.first * (ConversionCost + PackUnpackCost);
+    }
+    return LT.first * ConversionCost;
   }
 
   static const TypeConversionCostTblEntry ConversionTbl[] = {
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
index 7a25f3a3dd4ee..c11915371781e 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
@@ -101,52 +101,52 @@ define void @ext() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %r25 = zext i32 poison to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i8i16 = sext <2 x i8> poison to <2 x i16>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i8i16 = zext <2 x i8> poison to <2 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i8i32 = sext <2 x i8> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i8i32 = zext <2 x i8> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i8i64 = sext <2 x i8> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i8i64 = zext <2 x i8> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i16i32 = sext <2 x i16> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i16i32 = zext <2 x i16> poison to <2 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i16i64 = sext <2 x i16> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i16i64 = zext <2 x i16> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s2i32i64 = sext <2 x i32> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z2i32i64 = zext <2 x i32> poison to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s4i8i16 = sext <4 x i8> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z4i8i16 = zext <4 x i8> poison to <4 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s4i8i32 = sext <4 x i8> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z4i8i32 = zext <4 x i8> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s4i16i32 = sext <4 x i16> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z4i16i32 = zext <4 x i16> poison to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %s8i8i16 = sext <8 x i8> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %z8i8i16 = zext <8 x i8> poison to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %s2i8i32 = sext <2 x i8> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %z2i8i32 = zext <2 x i8> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %s2i8i64 = sext <2 x i8> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %z2i8i64 = zext <2 x i8> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %s2i16i32 = sext <2 x i16> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %z2i16i32 = zext <2 x i16> poison to <2 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %s2i16i64 = sext <2 x i16> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %z2i16i64 = zext <2 x i16> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %s2i32i64 = sext <2 x i32> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %z2i32i64 = zext <2 x i32> poison to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %s4i8i16 = sext <4 x i8> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %z4i8i16 = zext <4 x i8> poison to <4 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %s4i8i32 = sext <4 x i8> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 17 for: %z4i8i32 = zext <4 x i8> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %s4i16i32 = sext <4 x i16> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %z4i16i32 = zext <4 x i16> poison to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %s8i8i16 = sext <8 x i8> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %z8i8i16 = zext <8 x i8> poison to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 34 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 68 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 136 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; FIXED-MIN-256-LABEL: 'ext'
@@ -186,38 +186,38 @@ define void @ext() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i8i16 = zext <4 x i8> poison to <4 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s4i8i32 = sext <4 x i8> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i8i32 = zext <4 x i8> poison to <4 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s4i16i32 = sext <4 x i16> poison to <4 x i32>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i16i32 = zext <4 x i16> poison to <4 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s8i8i16 = sext <8 x i8> poison to <8 x i16>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z8i8i16 = zext <8 x i8> poison to <8 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 17 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 34 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 68 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; FIXED-MIN-2048-LABEL: 'ext'
@@ -257,38 +257,38 @@ define void @ext() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i8i16 = zext <4 x i8> poison to <4 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s4i8i32 = sext <4 x i8> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i8i32 = zext <4 x i8> poison to <4 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s4i8i64 = sext <4 x i8> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z4i8i64 = zext <4 x i8> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s4i16i32 = sext <4 x i16> poison to <4 x i32>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i16i32 = zext <4 x i16> poison to <4 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s4i16i64 = sext <4 x i16> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z4i16i64 = zext <4 x i16> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s4i32i64 = sext <4 x i32> poison to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z4i32i64 = zext <4 x i32> poison to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i8i16 = sext <8 x i8> poison to <8 x i16>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i8i16 = zext <8 x i8> poison to <8 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s8i8i32 = sext <8 x i8> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z8i8i32 = zext <8 x i8> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s8i8i64 = sext <8 x i8> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z8i8i64 = zext <8 x i8> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s8i16i32 = sext <8 x i16> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z8i16i32 = zext <8 x i16> poison to <8 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s8i16i64 = sext <8 x i16> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z8i16i64 = zext <8 x i16> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s8i32i64 = sext <8 x i32> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z8i32i64 = zext <8 x i32> poison to <8 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s16i8i16 = sext <16 x i8> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z16i8i16 = zext <16 x i8> poison to <16 x i16>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s16i8i32 = sext <16 x i8> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z16i8i32 = zext <16 x i8> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s16i8i64 = sext <16 x i8> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z16i8i64 = zext <16 x i8> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s16i16i32 = sext <16 x i16> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z16i16i32 = zext <16 x i16> poison to <16 x i32>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %s16i16i64 = sext <16 x i16> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 17 for: %z16i16i64 = zext <16 x i16> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %s16i32i64 = sext <16 x i32> poison to <16 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %z16i32i64 = zext <16 x i32> poison to <16 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %r0 = sext i1 poison to i8
@@ -812,15 +812,15 @@ define i32 @casts_no_users() {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r68 = sitofp i64 poison to double
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r69 = uitofp i64 poison to double
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r80 = fptrunc double poison to float
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r81 = fptrunc <2 x double> poison to <2 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r82 = fptrunc <4 x double> poison to <4 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r83 = fptrunc <8 x double> poison to <8 x float>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r84 = fptrunc <16 x double> poison to <16 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r81 = fptrunc <2 x double> poison to <2 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r82 = fptrunc <4 x double> poison to <4 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r83 = fptrunc <8 x double> poison to <8 x float>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %r84 = fptrunc <16 x double> poison to <16 x float>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r85 = fpext float poison to double
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r86 = fpext <2 x float> poison to <2 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %r87 = fpext <4 x float> poison to <4 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %r88 = fpext <8 x float> poison to <8 x double>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %r89 = fpext <16 x float> poison to <16 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 5 for: %r86 = fpext <2 x float> poison to <2 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 10 for: %r87 = fpext <4 x float> poison to <4 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 20 for: %r88 = fpext <8 x float> poison to <8 x double>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 40 for: %r89 = fpext <16 x float> poison to <16 x double>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 3 for: %r92 = fptoui <2 x float> poison to <2 x i8>
@@ -1026,14 +1026,14 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r69 = uitofp i64 poison to double
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r80 = fptrunc double poison to float
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r81 = fptrunc <2 x double> poison to <2 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r82 = fptrunc <4 x double> poison to <4 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r83 = fptrunc <8 x double> poison to <8 x float>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r84 = fptrunc <16 x double> poison to <16 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r82 = fptrunc <4 x double> poison to <4 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r83 = fptrunc <8 x double> poison to <8 x float>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 8 for: %r84 = fptrunc <16 x double> poison to <16 x float>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r85 = fpext float poison to double
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r86 = fpext <2 x float> poison to <2 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r87 = fpext <4 x float> poison to <4 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %r88 = fpext <8 x float> poison to <8 x double>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %r89 = fpext <16 x float> poison to <16 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 5 for: %r87 = fpext <4 x float> poison to <4 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 10 for: %r88 = fpext <8 x float> poison to <8 x double>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 20 for: %r89 = fpext <16 x float> poison to <16 x double>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %r92 = fptoui <2 x float> poison to <2 x i8>
@@ -1239,14 +1239,14 @@ define i32 @casts_no_users() {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r69 = uitofp i64 poison to double
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r80 = fptrunc double poison to float
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r81 = fptrunc <2 x double> poison to <2 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r82 = fptrunc <4 x double> poison to <4 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r83 = fptrunc <8 x double> poison to <8 x float>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r84 = fptrunc <16 x double> poison to <16 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r82 = fptrunc <4 x double> poison to <4 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r83 = fptrunc <8 x double> poison to <8 x float>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %r84 = fptrunc <16 x double> poison to <16 x float>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r85 = fpext float poison to double
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r86 = fpext <2 x float> poison to <2 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r87 = fpext <4 x float> poison to <4 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r88 = fpext <8 x float> poison to <8 x double>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r89 = fpext <16 x float> poison to <16 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r87 = fpext <4 x float> poison to <4 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r88 = fpext <8 x float> poison to <8 x double>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 5 for: %r89 = fpext <16 x float> poison to <16 x double>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r90 = fptoui <2 x float> poison to <2 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r91 = fptosi <2 x float> poison to <2 x i1>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %r92 = fptoui <2 x float> poison to <2 x i8>
@@ -1852,20 +1852,20 @@ define i32 @load_extends() #0 {
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %r9 = zext i16 %loadi16 to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %r10 = sext i32 %loadi32 to i64
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %r11 = zext i32 %loadi32 to i64
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v0 = sext <8 x i8> %loadv8i8 to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v1 = zext <8 x i8> %loadv8i8 to <8 x i16>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v2 = sext <4 x i8> %loadv4i8 to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v3 = zext <4 x i8> %loadv4i8 to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v4 = sext <2 x i8> %loadv2i8 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v5 = zext <2 x i8> %loadv2i8 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v6 = sext <4 x i16> %loadv4i16 to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v7 = zext <4 x i16> %loadv4i16 to <4 x i32>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v8 = sext <2 x i16> %loadv2i16 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
-; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v0 = sext <8 x i8> %loadv8i8 to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v1 = zext <8 x i8> %loadv8i8 to <8 x i16>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v2 = sext <4 x i8> %loadv4i8 to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v3 = zext <4 x i8> %loadv4i8 to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v4 = sext <2 x i8> %loadv2i8 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v5 = zext <2 x i8> %loadv2i8 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v6 = sext <4 x i16> %loadv4i16 to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v7 = zext <4 x i16> %loadv4i16 to <4 x i32>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v8 = sext <2 x i16> %loadv2i16 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 16 for: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 4 for: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
+; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 8 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v14 = sext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 0 for: %v15 = zext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; SVE128-NO-NEON-NEXT:  Cost Model: Found costs of 2 for: %v16 = sext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
@@ -1909,8 +1909,8 @@ define i32 @load_extends() #0 {
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 1 for: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 0 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
-; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 0 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
+; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 4 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 0 for: %v14 = sext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 0 for: %v15 = zext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; FIXED-MIN-256-NEXT:  Cost Model: Found costs of 2 for: %v16 = sext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
@@ -1954,8 +1954,8 @@ define i32 @load_extends() #0 {
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %v9 = zext <2 x i16> %loadv2i16 to <2 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %v10 = sext <2 x i32> %loadv2i32 to <2 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 1 for: %v11 = zext <2 x i32> %loadv2i32 to <2 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 0 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
-; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 0 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 4 for: %v12 = sext <4 x i32> %loadv4i32 to <4 x i64>
+; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 4 for: %v13 = zext <4 x i32> %loadv4i32 to <4 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 0 for: %v14 = sext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 0 for: %v15 = zext <vscale x 2 x i32> %loadnxv2i32 to <vscale x 2 x i64>
 ; FIXED-MIN-2048-NEXT:  Cost Model: Found costs of 2 for: %v16 = sext <vscale x 4 x i32> %loadnxv4i32 to <vscale x 4 x i64>
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-vls-reduce-bfp.ll b/llvm/test/Analysis/CostModel/AArch64/sve-vls-reduce-bfp.ll
index 3df9653409694..a040ba0e3c1b7 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-vls-reduce-bfp.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-vls-reduce-bfp.ll
@@ -34,7 +34,7 @@ define void @reduce_fadd_128b_types() #0 {
 ;
 ; VSCALE-FROM-2-LABEL: 'reduce_fadd_128b_types'
 ; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:54 CodeSize:23 Lat:46 SizeLat:30 for: %fadd_v8bf16_strict = call bfloat @llvm.vector.reduce.fadd.v8bf16(bfloat 0.000000e+00, <8 x bfloat> poison)
-; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:39 CodeSize:27 Lat:33 SizeLat:27 for: %fadd_v8bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v8bf16(bfloat 0.000000e+00, <8 x bfloat> poison)
+; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:63 CodeSize:27 Lat:33 SizeLat:27 for: %fadd_v8bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v8bf16(bfloat 0.000000e+00, <8 x bfloat> poison)
 ; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %fadd_v8bf16_strict = call bfloat @llvm.vector.reduce.fadd.v8bf16(bfloat 0.0, <8 x bfloat> poison)
@@ -61,7 +61,7 @@ define void @reduce_fadd_256b_types() #0 {
 ;
 ; VSCALE-FROM-2-LABEL: 'reduce_fadd_256b_types'
 ; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:108 CodeSize:46 Lat:92 SizeLat:60 for: %fadd_v16bf16_strict = call bfloat @llvm.vector.reduce.fadd.v16bf16(bfloat 0.000000e+00, <16 x bfloat> poison)
-; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:60 CodeSize:44 Lat:52 SizeLat:44 for: %fadd_v16bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v16bf16(bfloat 0.000000e+00, <16 x bfloat> poison)
+; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:92 CodeSize:44 Lat:52 SizeLat:44 for: %fadd_v16bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v16bf16(bfloat 0.000000e+00, <16 x bfloat> poison)
 ; VSCALE-FROM-2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %fadd_v16bf16_strict = call bfloat @llvm.vector.reduce.fadd.v16bf16(bfloat 0.0, <16 x bfloat> poison)
@@ -88,12 +88,12 @@ define void @reduce_fadd_512b_types() #0 {
 ;
 ; VSCALE-2-LABEL: 'reduce_fadd_512b_types'
 ; VSCALE-2-NEXT:  Cost Model: Found costs of RThru:216 CodeSize:92 Lat:184 SizeLat:120 for: %fadd_v32bf16_strict = call bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
-; VSCALE-2-NEXT:  Cost Model: Found costs of RThru:100 CodeSize:77 Lat:87 SizeLat:77 for: %fadd_v32bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
+; VSCALE-2-NEXT:  Cost Model: Found costs of RThru:150 CodeSize:77 Lat:87 SizeLat:77 for: %fadd_v32bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
 ; VSCALE-2-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
 ; VSCALE-FROM-4-LABEL: 'reduce_fadd_512b_types'
 ; VSCALE-FROM-4-NEXT:  Cost Model: Found costs of RThru:216 CodeSize:92 Lat:184 SizeLat:120 for: %fadd_v32bf16_strict = call bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
-; VSCALE-FROM-4-NEXT:  Cost Model: Found costs of RThru:96 CodeSize:77 Lat:87 SizeLat:77 for: %fadd_v32bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
+; VSCALE-FROM-4-NEXT:  Cost Model: Found costs of RThru:137 CodeSize:77 Lat:87 SizeLat:77 for: %fadd_v32bf16_fast = call fast bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.000000e+00, <32 x bfloat> poison)
 ; VSCALE-FROM-4-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
 ;
   %fadd_v32bf16_strict = call bfloat @llvm.vector.reduce.fadd.v32bf16(bfloat 0.0, <32 x bfloat> poison)
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll b/llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll
index 7b2848852eac8..e14033f5a608f 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-widening-instruction.ll
@@ -33,8 +33,8 @@ define <vscale x 8 x i32> @widening_nxv8i16(<vscale x 8 x i16> %in1, <vscale x 8
 
 define <8 x i32> @widening_v8i16_svevl2(<8 x i16> %in1, <8 x i16> %in2) vscale_range(2,16) {
 ; CHECK-LABEL: 'widening_v8i16_svevl2'
-; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %in1.ext = zext <8 x i16> %in2 to <8 x i32>
-; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %in2.ext = zext <8 x i16> %in2 to <8 x i32>
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %in1.ext = zext <8 x i16> %in2 to <8 x i32>
+; CHECK-NEXT:  Cost Model: Found an estimated cost of 5 for instruction: %in2.ext = zext <8 x i16> %in2 to <8 x i32>
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %in.add = add <8 x i32> %in1.ext, %in2.ext
 ; CHECK-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret <8 x i32> %in.add
 ;



More information about the llvm-commits mailing list