[llvm-branch-commits] [llvm] [AMDGPU] Price narrow integer to bfloat vector casts (PR #225342)
Dmitry Sidorov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Sep 22 02:35:21 PDT 2026
https://github.com/MrSidims created https://github.com/llvm/llvm-project/pull/225342
A vector lane of 9 to 15 or 17 to 31 bits converted to bfloat got the
generic cost, which leaves out the rounding. Such a lane is converted to
f32 first like any other narrow lane, so price it as the f32 conversion of
the same source plus the rounding. Lanes of 8 and 16 bits keep their cost.
---
<sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
>From d74e14772ac3603d4f7917c422faa85cecfeabaf Mon Sep 17 00:00:00 2001
From: Dmitry Sidorov <Dmitry.Sidorov at amd.com>
Date: Thu, 17 Sep 2026 01:40:00 +0200
Subject: [PATCH] [AMDGPU] Price narrow integer to bfloat vector casts
A vector lane of 9 to 15 or 17 to 31 bits converted to bfloat got the
generic cost, which leaves out the rounding. Such a lane is converted to
f32 first like any other narrow lane, so price it as the f32 conversion of
the same source plus the rounding. Lanes of 8 and 16 bits keep their cost.
---
.../AMDGPU/AMDGPUTargetTransformInfo.cpp | 18 ++--
.../CostModel/AMDGPU/narrow-int-to-bfloat.ll | 90 +++++++++----------
2 files changed, 56 insertions(+), 52 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
index 911124e60864c..59f1478e9ea89 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -1059,15 +1059,19 @@ InstructionCost GCNTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
if (IsIntToFP) {
const unsigned ExtOps = UsesInt64 && SrcBits < 64 ? (IsSigned ? 2 : 1) : 0;
if (FPTy->isBFloatTy()) {
- if (SrcBits != 8 && SrcBits != 16 && SrcBits != 32 && !UsesInt64)
+ const bool NarrowLanes =
+ SrcBits >= 8 && SrcBits < 32 && isa<FixedVectorType>(Src);
+ if (!NarrowLanes && SrcBits != 8 && SrcBits != 16 && SrcBits != 32 &&
+ !UsesInt64)
return BaseT::getCastInstrCost(Opcode, Dst, Src, CCH, CostKind, I);
// Each integer is converted to f32 first.
- unsigned PerElt = UsesInt64 ? ExtOps + (IsSigned ? 12 : 8) : 1;
- if (isa<FixedVectorType>(Src) && SrcBits < 32 &&
- (IsSigned || SrcBits == 16)) {
- PerElt =
- (ST->hasSDWA() ? 1 : 2) + (SrcBits == 8 && ST->has16BitInsts());
+ InstructionCost FloatCost =
+ Scale(UsesInt64 ? ExtOps + (IsSigned ? 12 : 8) : 1);
+ if (NarrowLanes) {
+ auto *FloatTy =
+ FixedVectorType::get(Type::getFloatTy(Dst->getContext()), NElts);
+ FloatCost = getCastInstrCost(Opcode, FloatTy, Src, CCH, CostKind);
}
// Native rounding can convert a pair. With 16 bit instructions the
@@ -1080,7 +1084,7 @@ InstructionCost GCNTTIImpl::getCastInstrCost(unsigned Opcode, Type *Dst,
: Scale(!ST->has16BitInsts() ? 1
: ST->hasGFX9Insts() ? 6
: 7);
- return Scale(PerElt) + RoundCost;
+ return FloatCost + RoundCost;
}
// No instruction converts from a 64 bit integer.
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-bfloat.ll b/llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-bfloat.ll
index 22d65c5fa11f1..2ae3c80434dde 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-bfloat.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/narrow-int-to-bfloat.ll
@@ -16,14 +16,14 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; NO16BIT-LABEL: 'narrow_to_bfloat'
; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %as = sitofp <4 x i8> %a to <4 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 8 for instruction: %au = uitofp <4 x i8> %a to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %cs = sitofp <4 x i16> %c to <4 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %cu = uitofp <4 x i16> %c to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
-; NO16BIT: Cost Model: Found an estimated cost of 4 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
+; NO16BIT: Cost Model: Found an estimated cost of 12 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 9 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 9 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
; NO16BIT: Cost Model: Found an estimated cost of 9 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
@@ -36,18 +36,18 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; NOGFX9-LABEL: 'narrow_to_bfloat'
; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %as = sitofp <4 x i8> %a to <4 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 32 for instruction: %au = uitofp <4 x i8> %a to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 32 for instruction: %cs = sitofp <4 x i16> %c to <4 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 32 for instruction: %cu = uitofp <4 x i16> %c to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 10 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 7 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 7 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 7 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
-; NOGFX9: Cost Model: Found an estimated cost of 7 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 36 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 27 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 27 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 27 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
+; NOGFX9: Cost Model: Found an estimated cost of 27 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 16 for instruction: %hs = sitofp <2 x i16> %h to <2 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 16 for instruction: %hu = uitofp <2 x i16> %h to <2 x bfloat>
; NOGFX9: Cost Model: Found an estimated cost of 24 for instruction: %is = sitofp <3 x i32> %i to <3 x bfloat>
@@ -56,18 +56,18 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; SDWA-LABEL: 'narrow_to_bfloat'
; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %as = sitofp <4 x i8> %a to <4 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 28 for instruction: %au = uitofp <4 x i8> %a to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 28 for instruction: %cs = sitofp <4 x i16> %c to <4 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 28 for instruction: %cu = uitofp <4 x i16> %c to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 10 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 7 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 7 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 7 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
-; SDWA: Cost Model: Found an estimated cost of 7 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 32 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 24 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 24 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 24 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
+; SDWA: Cost Model: Found an estimated cost of 24 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 14 for instruction: %hs = sitofp <2 x i16> %h to <2 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 14 for instruction: %hu = uitofp <2 x i16> %h to <2 x bfloat>
; SDWA: Cost Model: Found an estimated cost of 21 for instruction: %is = sitofp <3 x i32> %i to <3 x bfloat>
@@ -76,18 +76,18 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; PACKED-LABEL: 'narrow_to_bfloat'
; PACKED: Cost Model: Found an estimated cost of 36 for instruction: %as = sitofp <4 x i8> %a to <4 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 28 for instruction: %au = uitofp <4 x i8> %a to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 36 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %cs = sitofp <4 x i16> %c to <4 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %cu = uitofp <4 x i16> %c to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 10 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 7 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 7 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 7 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
-; PACKED: Cost Model: Found an estimated cost of 7 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %ds = sitofp <4 x i17> %d to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 32 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 27 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 24 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 24 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
+; PACKED: Cost Model: Found an estimated cost of 24 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 16 for instruction: %hs = sitofp <2 x i16> %h to <2 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 16 for instruction: %hu = uitofp <2 x i16> %h to <2 x bfloat>
; PACKED: Cost Model: Found an estimated cost of 21 for instruction: %is = sitofp <3 x i32> %i to <3 x bfloat>
@@ -104,10 +104,10 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; SDWA-BF16: Cost Model: Found an estimated cost of 10 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
; SDWA-BF16: Cost Model: Found an estimated cost of 10 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
; SDWA-BF16: Cost Model: Found an estimated cost of 10 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
-; SDWA-BF16: Cost Model: Found an estimated cost of 7 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
-; SDWA-BF16: Cost Model: Found an estimated cost of 7 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
-; SDWA-BF16: Cost Model: Found an estimated cost of 7 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
-; SDWA-BF16: Cost Model: Found an estimated cost of 7 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
+; SDWA-BF16: Cost Model: Found an estimated cost of 8 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
+; SDWA-BF16: Cost Model: Found an estimated cost of 8 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
+; SDWA-BF16: Cost Model: Found an estimated cost of 8 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
+; SDWA-BF16: Cost Model: Found an estimated cost of 8 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
; SDWA-BF16: Cost Model: Found an estimated cost of 3 for instruction: %hs = sitofp <2 x i16> %h to <2 x bfloat>
; SDWA-BF16: Cost Model: Found an estimated cost of 3 for instruction: %hu = uitofp <2 x i16> %h to <2 x bfloat>
; SDWA-BF16: Cost Model: Found an estimated cost of 5 for instruction: %is = sitofp <3 x i32> %i to <3 x bfloat>
@@ -116,7 +116,7 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; PACKED-BF16-LABEL: 'narrow_to_bfloat'
; PACKED-BF16: Cost Model: Found an estimated cost of 14 for instruction: %as = sitofp <4 x i8> %a to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 6 for instruction: %au = uitofp <4 x i8> %a to <4 x bfloat>
-; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
+; PACKED-BF16: Cost Model: Found an estimated cost of 14 for instruction: %bs = sitofp <4 x i12> %b to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %bu = uitofp <4 x i12> %b to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %cs = sitofp <4 x i16> %c to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %cu = uitofp <4 x i16> %c to <4 x bfloat>
@@ -124,10 +124,10 @@ define void @narrow_to_bfloat(<4 x i8> %a, <4 x i12> %b, <4 x i16> %c, <4 x i17>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %du = uitofp <4 x i17> %d to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %es = sitofp <4 x i31> %e to <4 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 10 for instruction: %eu = uitofp <4 x i31> %e to <4 x bfloat>
-; PACKED-BF16: Cost Model: Found an estimated cost of 7 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
-; PACKED-BF16: Cost Model: Found an estimated cost of 7 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
-; PACKED-BF16: Cost Model: Found an estimated cost of 7 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
-; PACKED-BF16: Cost Model: Found an estimated cost of 7 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
+; PACKED-BF16: Cost Model: Found an estimated cost of 11 for instruction: %fs = sitofp <3 x i12> %f to <3 x bfloat>
+; PACKED-BF16: Cost Model: Found an estimated cost of 8 for instruction: %fu = uitofp <3 x i12> %f to <3 x bfloat>
+; PACKED-BF16: Cost Model: Found an estimated cost of 8 for instruction: %gs = sitofp <3 x i17> %g to <3 x bfloat>
+; PACKED-BF16: Cost Model: Found an estimated cost of 8 for instruction: %gu = uitofp <3 x i17> %g to <3 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 5 for instruction: %hs = sitofp <2 x i16> %h to <2 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 5 for instruction: %hu = uitofp <2 x i16> %h to <2 x bfloat>
; PACKED-BF16: Cost Model: Found an estimated cost of 5 for instruction: %is = sitofp <3 x i32> %i to <3 x bfloat>
More information about the llvm-branch-commits
mailing list