[llvm] [AArch64] Refine costs for fptosi and fptoui (PR #192209)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 01:49:30 PDT 2026
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/192209
This adjusts the costs for fptoui and fptosi, decreasing them a little for larger types that can usually make better use of fcvts followed by truncates.
>From 1d54c241a472f5ef3f598d5b00235368ff53a572 Mon Sep 17 00:00:00 2001
From: David Green <david.green at arm.com>
Date: Wed, 15 Apr 2026 09:47:22 +0100
Subject: [PATCH] [AArch64] Refine costs for fptosi and fptoui
This adjusts the costs for fptoui and fptosi, decreasing them a little for
larger types that can usually make better use of fcvts followed by truncates.
---
.../AArch64/AArch64TargetTransformInfo.cpp | 24 ++++++-
llvm/test/Analysis/CostModel/AArch64/cast.ll | 64 +++++++++----------
.../Analysis/CostModel/AArch64/sve-cast.ll | 64 +++++++++----------
3 files changed, 87 insertions(+), 65 deletions(-)
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index a9fe0c499ef6a..eda32cb97bc4e 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -3753,12 +3753,20 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
{ISD::FP_TO_UINT, MVT::v2i64, MVT::v2f32, 2},
{ISD::FP_TO_UINT, MVT::v2i16, MVT::v2f32, 1},
{ISD::FP_TO_UINT, MVT::v2i8, MVT::v2f32, 1},
-
// Complex, from v4f32: legal type is v4i16, 1 narrowing => ~2
+ {ISD::FP_TO_SINT, MVT::v4i64, MVT::v4f32, 4},
{ISD::FP_TO_SINT, MVT::v4i16, MVT::v4f32, 2},
{ISD::FP_TO_SINT, MVT::v4i8, MVT::v4f32, 2},
+ {ISD::FP_TO_UINT, MVT::v4i64, MVT::v4f32, 4},
{ISD::FP_TO_UINT, MVT::v4i16, MVT::v4f32, 2},
{ISD::FP_TO_UINT, MVT::v4i8, MVT::v4f32, 2},
+ // From v8f32: 2 * fcvtzs + uzp [+ xtn]
+ {ISD::FP_TO_SINT, MVT::v8i16, MVT::v8f32, 3},
+ {ISD::FP_TO_SINT, MVT::v8i8, MVT::v8f32, 4},
+ {ISD::FP_TO_SINT, MVT::v16i8, MVT::v16f32, 7},
+ {ISD::FP_TO_UINT, MVT::v8i16, MVT::v8f32, 3},
+ {ISD::FP_TO_UINT, MVT::v8i8, MVT::v8f32, 4},
+ {ISD::FP_TO_UINT, MVT::v16i8, MVT::v16f32, 7},
// Complex, from v2f64: legal type is v2i32, 1 narrowing => ~2.
{ISD::FP_TO_SINT, MVT::v2i32, MVT::v2f64, 2},
@@ -3767,6 +3775,20 @@ InstructionCost AArch64TTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
{ISD::FP_TO_UINT, MVT::v2i32, MVT::v2f64, 2},
{ISD::FP_TO_UINT, MVT::v2i16, MVT::v2f64, 2},
{ISD::FP_TO_UINT, MVT::v2i8, MVT::v2f64, 2},
+ // From v4f64: 2 * fcvtzs + uzp [+ xtn]
+ {ISD::FP_TO_SINT, MVT::v4i32, MVT::v4f64, 3},
+ {ISD::FP_TO_SINT, MVT::v4i16, MVT::v4f64, 4},
+ {ISD::FP_TO_SINT, MVT::v4i8, MVT::v4f64, 4},
+ {ISD::FP_TO_UINT, MVT::v4i32, MVT::v4f64, 3},
+ {ISD::FP_TO_UINT, MVT::v4i16, MVT::v4f64, 4},
+ {ISD::FP_TO_UINT, MVT::v4i8, MVT::v4f64, 4},
+ // From v8f32: 4 * fcvtzs + uzp [+ xtn]
+ {ISD::FP_TO_SINT, MVT::v8i16, MVT::v8f64, 7},
+ {ISD::FP_TO_SINT, MVT::v8i8, MVT::v8f64, 8},
+ {ISD::FP_TO_SINT, MVT::v16i8, MVT::v16f64, 15},
+ {ISD::FP_TO_UINT, MVT::v8i16, MVT::v8f64, 7},
+ {ISD::FP_TO_UINT, MVT::v8i8, MVT::v8f64, 8},
+ {ISD::FP_TO_UINT, MVT::v16i8, MVT::v16f64, 15},
// Complex, from nxv2f32.
{ISD::FP_TO_SINT, MVT::nxv2i64, MVT::nxv2f32, 1},
diff --git a/llvm/test/Analysis/CostModel/AArch64/cast.ll b/llvm/test/Analysis/CostModel/AArch64/cast.ll
index 7f5be9f100442..01072205175e9 100644
--- a/llvm/test/Analysis/CostModel/AArch64/cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/cast.ll
@@ -331,56 +331,56 @@ define i32 @casts_no_users() {
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
; CHECK-NEXT: Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
; CHECK-NEXT: Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r118 = fptoui <4 x float> poison to <4 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r119 = fptosi <4 x float> poison to <4 x i64>
; CHECK-NEXT: Cost Model: Found costs of RThru:21 CodeSize:13 Lat:21 SizeLat:21 for: %r120 = fptoui <4 x double> poison to <4 x i1>
; CHECK-NEXT: Cost Model: Found costs of RThru:21 CodeSize:13 Lat:21 SizeLat:21 for: %r121 = fptosi <4 x double> poison to <4 x i1>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r122 = fptoui <4 x double> poison to <4 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r123 = fptosi <4 x double> poison to <4 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r124 = fptoui <4 x double> poison to <4 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r125 = fptosi <4 x double> poison to <4 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r126 = fptoui <4 x double> poison to <4 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r127 = fptosi <4 x double> poison to <4 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r122 = fptoui <4 x double> poison to <4 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r123 = fptosi <4 x double> poison to <4 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r124 = fptoui <4 x double> poison to <4 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r125 = fptosi <4 x double> poison to <4 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 3 for: %r126 = fptoui <4 x double> poison to <4 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 3 for: %r127 = fptosi <4 x double> poison to <4 x i32>
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r128 = fptoui <4 x double> poison to <4 x i64>
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r129 = fptosi <4 x double> poison to <4 x i64>
; CHECK-NEXT: Cost Model: Found costs of RThru:41 CodeSize:25 Lat:41 SizeLat:41 for: %r130 = fptoui <8 x float> poison to <8 x i1>
; CHECK-NEXT: Cost Model: Found costs of RThru:41 CodeSize:25 Lat:41 SizeLat:41 for: %r131 = fptosi <8 x float> poison to <8 x i1>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r132 = fptoui <8 x float> poison to <8 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r133 = fptosi <8 x float> poison to <8 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r134 = fptoui <8 x float> poison to <8 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 5 for: %r135 = fptosi <8 x float> poison to <8 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r132 = fptoui <8 x float> poison to <8 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 4 for: %r133 = fptosi <8 x float> poison to <8 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 3 for: %r134 = fptoui <8 x float> poison to <8 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 3 for: %r135 = fptosi <8 x float> poison to <8 x i16>
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r136 = fptoui <8 x float> poison to <8 x i32>
; CHECK-NEXT: Cost Model: Found costs of 2 for: %r137 = fptosi <8 x float> poison to <8 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r138 = fptoui <8 x float> poison to <8 x i64>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r139 = fptosi <8 x float> poison to <8 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 8 for: %r138 = fptoui <8 x float> poison to <8 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 8 for: %r139 = fptosi <8 x float> poison to <8 x i64>
; CHECK-NEXT: Cost Model: Found costs of RThru:43 CodeSize:27 Lat:43 SizeLat:43 for: %r140 = fptoui <8 x double> poison to <8 x i1>
; CHECK-NEXT: Cost Model: Found costs of RThru:43 CodeSize:27 Lat:43 SizeLat:43 for: %r141 = fptosi <8 x double> poison to <8 x i1>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r142 = fptoui <8 x double> poison to <8 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r143 = fptosi <8 x double> poison to <8 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r144 = fptoui <8 x double> poison to <8 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r145 = fptosi <8 x double> poison to <8 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r146 = fptoui <8 x double> poison to <8 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r147 = fptosi <8 x double> poison to <8 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 8 for: %r142 = fptoui <8 x double> poison to <8 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 8 for: %r143 = fptosi <8 x double> poison to <8 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 7 for: %r144 = fptoui <8 x double> poison to <8 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 7 for: %r145 = fptosi <8 x double> poison to <8 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 6 for: %r146 = fptoui <8 x double> poison to <8 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 6 for: %r147 = fptosi <8 x double> poison to <8 x i32>
; CHECK-NEXT: Cost Model: Found costs of 4 for: %r148 = fptoui <8 x double> poison to <8 x i64>
; CHECK-NEXT: Cost Model: Found costs of 4 for: %r149 = fptosi <8 x double> poison to <8 x i64>
; CHECK-NEXT: Cost Model: Found costs of RThru:83 CodeSize:51 Lat:83 SizeLat:83 for: %r150 = fptoui <16 x float> poison to <16 x i1>
; CHECK-NEXT: Cost Model: Found costs of RThru:83 CodeSize:51 Lat:83 SizeLat:83 for: %r151 = fptosi <16 x float> poison to <16 x i1>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r152 = fptoui <16 x float> poison to <16 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 11 for: %r153 = fptosi <16 x float> poison to <16 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r154 = fptoui <16 x float> poison to <16 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 10 for: %r155 = fptosi <16 x float> poison to <16 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 7 for: %r152 = fptoui <16 x float> poison to <16 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 7 for: %r153 = fptosi <16 x float> poison to <16 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 6 for: %r154 = fptoui <16 x float> poison to <16 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 6 for: %r155 = fptosi <16 x float> poison to <16 x i16>
; CHECK-NEXT: Cost Model: Found costs of 4 for: %r156 = fptoui <16 x float> poison to <16 x i32>
; CHECK-NEXT: Cost Model: Found costs of 4 for: %r157 = fptosi <16 x float> poison to <16 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 20 for: %r158 = fptoui <16 x float> poison to <16 x i64>
-; CHECK-NEXT: Cost Model: Found costs of 20 for: %r159 = fptosi <16 x float> poison to <16 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 16 for: %r158 = fptoui <16 x float> poison to <16 x i64>
+; CHECK-NEXT: Cost Model: Found costs of 16 for: %r159 = fptosi <16 x float> poison to <16 x i64>
; CHECK-NEXT: Cost Model: Found costs of RThru:87 CodeSize:55 Lat:87 SizeLat:87 for: %r160 = fptoui <16 x double> poison to <16 x i1>
; CHECK-NEXT: Cost Model: Found costs of RThru:87 CodeSize:55 Lat:87 SizeLat:87 for: %r161 = fptosi <16 x double> poison to <16 x i1>
-; CHECK-NEXT: Cost Model: Found costs of 23 for: %r162 = fptoui <16 x double> poison to <16 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 23 for: %r163 = fptosi <16 x double> poison to <16 x i8>
-; CHECK-NEXT: Cost Model: Found costs of 22 for: %r164 = fptoui <16 x double> poison to <16 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 22 for: %r165 = fptosi <16 x double> poison to <16 x i16>
-; CHECK-NEXT: Cost Model: Found costs of 20 for: %r166 = fptoui <16 x double> poison to <16 x i32>
-; CHECK-NEXT: Cost Model: Found costs of 20 for: %r167 = fptosi <16 x double> poison to <16 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 15 for: %r162 = fptoui <16 x double> poison to <16 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 15 for: %r163 = fptosi <16 x double> poison to <16 x i8>
+; CHECK-NEXT: Cost Model: Found costs of 14 for: %r164 = fptoui <16 x double> poison to <16 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 14 for: %r165 = fptosi <16 x double> poison to <16 x i16>
+; CHECK-NEXT: Cost Model: Found costs of 12 for: %r166 = fptoui <16 x double> poison to <16 x i32>
+; CHECK-NEXT: Cost Model: Found costs of 12 for: %r167 = fptosi <16 x double> poison to <16 x i32>
; CHECK-NEXT: Cost Model: Found costs of 8 for: %r168 = fptoui <16 x double> poison to <16 x i64>
; CHECK-NEXT: Cost Model: Found costs of 8 for: %r169 = fptosi <16 x double> poison to <16 x i64>
; CHECK-NEXT: Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
diff --git a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
index 7b482f39a228f..658c6b006853d 100644
--- a/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/sve-cast.ll
@@ -636,56 +636,56 @@ define i32 @casts_no_users() {
; CHECK-SVE-NEXT: Cost Model: Found costs of 2 for: %r115 = fptosi <4 x float> poison to <4 x i16>
; CHECK-SVE-NEXT: Cost Model: Found costs of 1 for: %r116 = fptoui <4 x float> poison to <4 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 1 for: %r117 = fptosi <4 x float> poison to <4 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r118 = fptoui <4 x float> poison to <4 x i64>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r119 = fptosi <4 x float> poison to <4 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r118 = fptoui <4 x float> poison to <4 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r119 = fptosi <4 x float> poison to <4 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:21 CodeSize:13 Lat:21 SizeLat:21 for: %r120 = fptoui <4 x double> poison to <4 x i1>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:21 CodeSize:13 Lat:21 SizeLat:21 for: %r121 = fptosi <4 x double> poison to <4 x i1>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r122 = fptoui <4 x double> poison to <4 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r123 = fptosi <4 x double> poison to <4 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r124 = fptoui <4 x double> poison to <4 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r125 = fptosi <4 x double> poison to <4 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r126 = fptoui <4 x double> poison to <4 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r127 = fptosi <4 x double> poison to <4 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r122 = fptoui <4 x double> poison to <4 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r123 = fptosi <4 x double> poison to <4 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r124 = fptoui <4 x double> poison to <4 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r125 = fptosi <4 x double> poison to <4 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 3 for: %r126 = fptoui <4 x double> poison to <4 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 3 for: %r127 = fptosi <4 x double> poison to <4 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 2 for: %r128 = fptoui <4 x double> poison to <4 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of 2 for: %r129 = fptosi <4 x double> poison to <4 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:41 CodeSize:25 Lat:41 SizeLat:41 for: %r130 = fptoui <8 x float> poison to <8 x i1>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:41 CodeSize:25 Lat:41 SizeLat:41 for: %r131 = fptosi <8 x float> poison to <8 x i1>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r132 = fptoui <8 x float> poison to <8 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r133 = fptosi <8 x float> poison to <8 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r134 = fptoui <8 x float> poison to <8 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 5 for: %r135 = fptosi <8 x float> poison to <8 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r132 = fptoui <8 x float> poison to <8 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r133 = fptosi <8 x float> poison to <8 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 3 for: %r134 = fptoui <8 x float> poison to <8 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 3 for: %r135 = fptosi <8 x float> poison to <8 x i16>
; CHECK-SVE-NEXT: Cost Model: Found costs of 2 for: %r136 = fptoui <8 x float> poison to <8 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 2 for: %r137 = fptosi <8 x float> poison to <8 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r138 = fptoui <8 x float> poison to <8 x i64>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r139 = fptosi <8 x float> poison to <8 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r138 = fptoui <8 x float> poison to <8 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r139 = fptosi <8 x float> poison to <8 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:43 CodeSize:27 Lat:43 SizeLat:43 for: %r140 = fptoui <8 x double> poison to <8 x i1>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:43 CodeSize:27 Lat:43 SizeLat:43 for: %r141 = fptosi <8 x double> poison to <8 x i1>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r142 = fptoui <8 x double> poison to <8 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r143 = fptosi <8 x double> poison to <8 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r144 = fptoui <8 x double> poison to <8 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r145 = fptosi <8 x double> poison to <8 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r146 = fptoui <8 x double> poison to <8 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r147 = fptosi <8 x double> poison to <8 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r142 = fptoui <8 x double> poison to <8 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r143 = fptosi <8 x double> poison to <8 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 7 for: %r144 = fptoui <8 x double> poison to <8 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 7 for: %r145 = fptosi <8 x double> poison to <8 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 6 for: %r146 = fptoui <8 x double> poison to <8 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 6 for: %r147 = fptosi <8 x double> poison to <8 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r148 = fptoui <8 x double> poison to <8 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r149 = fptosi <8 x double> poison to <8 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:83 CodeSize:51 Lat:83 SizeLat:83 for: %r150 = fptoui <16 x float> poison to <16 x i1>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:83 CodeSize:51 Lat:83 SizeLat:83 for: %r151 = fptosi <16 x float> poison to <16 x i1>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r152 = fptoui <16 x float> poison to <16 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 11 for: %r153 = fptosi <16 x float> poison to <16 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r154 = fptoui <16 x float> poison to <16 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 10 for: %r155 = fptosi <16 x float> poison to <16 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 7 for: %r152 = fptoui <16 x float> poison to <16 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 7 for: %r153 = fptosi <16 x float> poison to <16 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 6 for: %r154 = fptoui <16 x float> poison to <16 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 6 for: %r155 = fptosi <16 x float> poison to <16 x i16>
; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r156 = fptoui <16 x float> poison to <16 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 4 for: %r157 = fptosi <16 x float> poison to <16 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 20 for: %r158 = fptoui <16 x float> poison to <16 x i64>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 20 for: %r159 = fptosi <16 x float> poison to <16 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 16 for: %r158 = fptoui <16 x float> poison to <16 x i64>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 16 for: %r159 = fptosi <16 x float> poison to <16 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:87 CodeSize:55 Lat:87 SizeLat:87 for: %r160 = fptoui <16 x double> poison to <16 x i1>
; CHECK-SVE-NEXT: Cost Model: Found costs of RThru:87 CodeSize:55 Lat:87 SizeLat:87 for: %r161 = fptosi <16 x double> poison to <16 x i1>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 23 for: %r162 = fptoui <16 x double> poison to <16 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 23 for: %r163 = fptosi <16 x double> poison to <16 x i8>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 22 for: %r164 = fptoui <16 x double> poison to <16 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 22 for: %r165 = fptosi <16 x double> poison to <16 x i16>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 20 for: %r166 = fptoui <16 x double> poison to <16 x i32>
-; CHECK-SVE-NEXT: Cost Model: Found costs of 20 for: %r167 = fptosi <16 x double> poison to <16 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 15 for: %r162 = fptoui <16 x double> poison to <16 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 15 for: %r163 = fptosi <16 x double> poison to <16 x i8>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 14 for: %r164 = fptoui <16 x double> poison to <16 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 14 for: %r165 = fptosi <16 x double> poison to <16 x i16>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 12 for: %r166 = fptoui <16 x double> poison to <16 x i32>
+; CHECK-SVE-NEXT: Cost Model: Found costs of 12 for: %r167 = fptosi <16 x double> poison to <16 x i32>
; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r168 = fptoui <16 x double> poison to <16 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of 8 for: %r169 = fptosi <16 x double> poison to <16 x i64>
; CHECK-SVE-NEXT: Cost Model: Found costs of 1 for: %r170 = uitofp <2 x i1> poison to <2 x float>
More information about the llvm-commits
mailing list