[llvm-branch-commits] [llvm] [AMDGPU] Price memory operations by the number of memory instructions (PR #233261)
Dmitry Sidorov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Oct 18 09:20:18 PDT 2026
https://github.com/MrSidims created https://github.com/llvm/llvm-project/pull/233261
Price a load or store as the number of memory instructions it is split
into.
Constant and buffer "fat" pointers are left alone (for now).
---
<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 b261801bdecb65e7218528986074bc03bdbec20a Mon Sep 17 00:00:00 2001
From: Dmitry Sidorov <Dmitry.Sidorov at amd.com>
Date: Fri, 9 Oct 2026 11:20:46 +0200
Subject: [PATCH] [AMDGPU] Price memory operations by the number of memory
instructions
Price a load or store as the number of memory instructions it is split
into.
Constant and buffer "fat" pointers are left alone (for now).
---
.../AMDGPU/AMDGPUTargetTransformInfo.cpp | 81 ++++-
.../CostModel/AMDGPU/load-to-trunc.ll | 2 +-
llvm/test/Analysis/CostModel/AMDGPU/load.ll | 324 +++++++++++-------
llvm/test/Analysis/CostModel/AMDGPU/store.ll | 298 +++++++++-------
.../AMDGPU/amdgpu-simplify-libcall-sincos.ll | 3 +-
llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll | 3 +-
.../ordered-reduction-coalesced-loads.ll | 310 ++++++++++++++---
7 files changed, 708 insertions(+), 313 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
index 3e190190ee761d..bfb455ec758e6c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
@@ -2115,22 +2115,89 @@ GCNTTIImpl::fpenvIEEEMode(const Instruction &I) const {
: KnownIEEEMode::On;
}
+static unsigned getNumMemoryInsts(unsigned Bytes, unsigned MaxBytes,
+ bool HasDwordx3) {
+ unsigned NumInsts = Bytes / MaxBytes;
+ unsigned Rem = Bytes % MaxBytes;
+ if (HasDwordx3 && Rem >= 12) {
+ ++NumInsts;
+ Rem -= 12;
+ }
+ return NumInsts + llvm::popcount(Rem);
+}
+
InstructionCost GCNTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
Align Alignment,
unsigned AddressSpace,
TTI::TargetCostKind CostKind,
TTI::OperandValueInfo OpInfo,
const Instruction *I) const {
- if (VectorType *VecTy = dyn_cast<VectorType>(Src)) {
- if ((Opcode == Instruction::Load || Opcode == Instruction::Store) &&
- CostKind != TTI::TCK_Latency &&
- VecTy->getElementType()->isIntegerTy(8)) {
- return divideCeil(DL.getTypeSizeInBits(VecTy) - 1,
+ Type *EltTy = Src->getScalarType();
+ if ((Opcode != Instruction::Load && Opcode != Instruction::Store) ||
+ CostKind == TTI::TCK_Latency || isa<ScalableVectorType>(Src) ||
+ (!EltTy->isIntOrPtrTy() && !EltTy->isFloatingPointTy()))
+ return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace,
+ CostKind, OpInfo, I);
+
+ unsigned EltBits = DL.getTypeSizeInBits(EltTy);
+ if (EltBits < 8 || !isPowerOf2_32(EltBits))
+ return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace,
+ CostKind, OpInfo, I);
+
+ if (AddressSpace == AMDGPUAS::CONSTANT_ADDRESS ||
+ AddressSpace == AMDGPUAS::CONSTANT_ADDRESS_32BIT ||
+ AddressSpace == AMDGPUAS::BUFFER_FAT_POINTER) {
+ if (Src->isVectorTy() && EltTy->isIntegerTy(8))
+ return divideCeil(DL.getTypeSizeInBits(Src) - 1,
getLoadStoreVecRegBitWidth(AddressSpace));
+ return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace,
+ CostKind, OpInfo, I);
+ }
+
+ unsigned Bytes = DL.getTypeStoreSize(Src);
+ unsigned MaxBytes = 16;
+ bool HasDwordx3 = ST->hasDwordx3LoadStores();
+ switch (AddressSpace) {
+ case AMDGPUAS::PRIVATE_ADDRESS:
+ MaxBytes = ST->getMaxPrivateElementSize();
+ break;
+ case AMDGPUAS::FLAT_ADDRESS:
+ if (!ST->hasMultiDwordFlatScratchAddressing())
+ MaxBytes = ST->getMaxPrivateElementSize();
+ break;
+ case AMDGPUAS::LOCAL_ADDRESS:
+ case AMDGPUAS::REGION_ADDRESS:
+ HasDwordx3 = ST->hasDS96AndDS128();
+ break;
+ default:
+ break;
+ }
+
+ if (Opcode == Instruction::Load) {
+ if (Alignment >= PowerOf2Ceil(Bytes))
+ return divideCeil(Bytes, MaxBytes);
+ if (EltBits <= 16 && Alignment >= 4 && Bytes % 4) {
+ unsigned Piece = std::min(EltBits == 8 ? 8u : 16u, MaxBytes);
+ unsigned Granule = std::min<unsigned>(Alignment.value(), Piece);
+ bool MergesPieces = AddressSpace == AMDGPUAS::LOCAL_ADDRESS ||
+ AddressSpace == AMDGPUAS::REGION_ADDRESS ||
+ (AddressSpace != AMDGPUAS::PRIVATE_ADDRESS &&
+ ST->hasFlatInstOffsets() &&
+ (AddressSpace != AMDGPUAS::FLAT_ADDRESS ||
+ !ST->hasFlatSegmentOffsetBug()));
+ if (!MergesPieces)
+ return Bytes / Piece + llvm::popcount(Bytes % Piece / Granule) +
+ (Bytes % Granule != 0);
+ unsigned Tail = Bytes % Granule;
+ if (Tail > EltBits / 8) {
+ Bytes += std::max<unsigned>(4, PowerOf2Ceil(Tail)) - Tail;
+ if (AddressSpace == AMDGPUAS::LOCAL_ADDRESS ||
+ AddressSpace == AMDGPUAS::REGION_ADDRESS)
+ HasDwordx3 = false;
+ }
}
}
- return BaseT::getMemoryOpCost(Opcode, Src, Alignment, AddressSpace, CostKind,
- OpInfo, I);
+ return getNumMemoryInsts(Bytes, MaxBytes, HasDwordx3);
}
unsigned GCNTTIImpl::getNumberOfParts(Type *Tp) const {
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/load-to-trunc.ll b/llvm/test/Analysis/CostModel/AMDGPU/load-to-trunc.ll
index 92412d706d224d..ec942e5667ec6a 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/load-to-trunc.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/load-to-trunc.ll
@@ -19,7 +19,7 @@ define i32 @loadUnusualIntegerWithTrunc(ptr %ptr) {
define i128 @loadUnusualInteger(ptr %ptr) {
; CHECK-LABEL: 'loadUnusualInteger'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %out = load i128, ptr %ptr, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %out = load i128, ptr %ptr, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i128 %out
;
%out = load i128, ptr %ptr
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/load.ll b/llvm/test/Analysis/CostModel/AMDGPU/load.ll
index e2393175e71fe4..073e504080c49c 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/load.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/load.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu8.03-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX8
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90A
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX12
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90APLUS,GFX90A
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90APLUS,GFX12
define void @loads_i1(i32 %arg) {
@@ -28,7 +28,7 @@ define void @loads_i8(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i8>, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i8, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i8>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <3 x i8>, ptr poison, align 1
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i8>, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i8>, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i8, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i8>, ptr poison, align 4
@@ -55,24 +55,43 @@ define void @loads_i8(i32 %arg) {
}
define void @loads_i16(i32 %arg) {
-; CHECK-LABEL: 'loads_i16'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i16, ptr poison, align 2
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i16>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = load <3 x i16>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i16>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i16, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i16>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = load <3 x i16>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i16>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i16, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i16>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i16>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i16, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i16>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %15 = load <3 x i16>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i16>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'loads_i16'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i16, ptr poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i16>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = load <3 x i16>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load <4 x i16>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i16, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i16>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i16>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <4 x i16>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i16, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i16>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = load <4 x i16>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i16, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i16>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = load <3 x i16>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = load <4 x i16>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90APLUS-LABEL: 'loads_i16'
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i16, ptr poison, align 2
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i16>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i16>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i16>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i16, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i16>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i16>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i16>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i16, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i16>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i16>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i16, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i16>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <3 x i16>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i16>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load i16, ptr poison
load <2 x i16>, ptr poison
@@ -98,28 +117,51 @@ define void @loads_i16(i32 %arg) {
}
define void @loads_i32(i32 %arg) {
-; CHECK-LABEL: 'loads_i32'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i32>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i32, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i32>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <3 x i32>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i32>, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i32, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i32>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i32, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i32>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <3 x i32>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load i32, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <2 x i32>, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <3 x i32>, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'loads_i32'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <2 x i32>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = load <3 x i32>, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = load <4 x i32>, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i32, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = load <2 x i32>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %7 = load <3 x i32>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %8 = load <4 x i32>, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i32, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <2 x i32>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i32>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = load <4 x i32>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i32, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = load <2 x i32>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %15 = load <3 x i32>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %16 = load <4 x i32>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load i32, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = load <2 x i32>, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %19 = load <3 x i32>, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <4 x i32>, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90APLUS-LABEL: 'loads_i32'
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i32>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i32, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i32>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <3 x i32>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i32>, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i32, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i32>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i32, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i32>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <3 x i32>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load i32, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <2 x i32>, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <3 x i32>, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load i32, ptr poison
load <2 x i32>, ptr poison
@@ -161,7 +203,7 @@ define void @loads_addrspace_1(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i32>, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <3 x i1>, ptr addrspace(1) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(1) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr addrspace(1) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i16>, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <3 x i32>, ptr addrspace(1) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = load <4 x i1>, ptr addrspace(1) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(1) poison, align 4
@@ -170,23 +212,23 @@ define void @loads_addrspace_1(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %17 = load <8 x i1>, ptr addrspace(1) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <8 x i8>, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <8 x i16>, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i32>, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %20 = load <8 x i32>, ptr addrspace(1) poison, align 32
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = load <16 x i1>, ptr addrspace(1) poison, align 2
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <16 x i8>, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <16 x i16>, ptr addrspace(1) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <16 x i32>, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %23 = load <16 x i16>, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %24 = load <16 x i32>, ptr addrspace(1) poison, align 64
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %25 = load <32 x i1>, ptr addrspace(1) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %26 = load <32 x i8>, ptr addrspace(1) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load <32 x i16>, ptr addrspace(1) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <32 x i32>, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %26 = load <32 x i8>, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %27 = load <32 x i16>, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %28 = load <32 x i32>, ptr addrspace(1) poison, align 128
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %29 = load <64 x i1>, ptr addrspace(1) poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %30 = load <64 x i8>, ptr addrspace(1) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <64 x i16>, ptr addrspace(1) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = load <64 x i32>, ptr addrspace(1) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %30 = load <64 x i8>, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %31 = load <64 x i16>, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %32 = load <64 x i32>, ptr addrspace(1) poison, align 256
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %33 = load <128 x i1>, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %34 = load <128 x i8>, ptr addrspace(1) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %35 = load <128 x i16>, ptr addrspace(1) poison, align 256
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %36 = load <128 x i32>, ptr addrspace(1) poison, align 512
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %34 = load <128 x i8>, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %35 = load <128 x i16>, ptr addrspace(1) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %36 = load <128 x i32>, ptr addrspace(1) poison, align 512
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <1 x i1>, ptr addrspace(1) poison
@@ -248,7 +290,7 @@ define void @loads_addrspace_3(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i32>, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <3 x i1>, ptr addrspace(3) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr addrspace(3) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i16>, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <3 x i32>, ptr addrspace(3) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = load <4 x i1>, ptr addrspace(3) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(3) poison, align 4
@@ -257,23 +299,23 @@ define void @loads_addrspace_3(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %17 = load <8 x i1>, ptr addrspace(3) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <8 x i8>, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <8 x i16>, ptr addrspace(3) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i32>, ptr addrspace(3) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %20 = load <8 x i32>, ptr addrspace(3) poison, align 32
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = load <16 x i1>, ptr addrspace(3) poison, align 2
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <16 x i8>, ptr addrspace(3) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <16 x i16>, ptr addrspace(3) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <16 x i32>, ptr addrspace(3) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %23 = load <16 x i16>, ptr addrspace(3) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %24 = load <16 x i32>, ptr addrspace(3) poison, align 64
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %25 = load <32 x i1>, ptr addrspace(3) poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %26 = load <32 x i8>, ptr addrspace(3) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load <32 x i16>, ptr addrspace(3) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <32 x i32>, ptr addrspace(3) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %27 = load <32 x i16>, ptr addrspace(3) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %28 = load <32 x i32>, ptr addrspace(3) poison, align 128
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %29 = load <64 x i1>, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %30 = load <64 x i8>, ptr addrspace(3) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <64 x i16>, ptr addrspace(3) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = load <64 x i32>, ptr addrspace(3) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %31 = load <64 x i16>, ptr addrspace(3) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %32 = load <64 x i32>, ptr addrspace(3) poison, align 256
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %33 = load <128 x i1>, ptr addrspace(3) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %34 = load <128 x i8>, ptr addrspace(3) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %35 = load <128 x i16>, ptr addrspace(3) poison, align 256
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %36 = load <128 x i32>, ptr addrspace(3) poison, align 512
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %35 = load <128 x i16>, ptr addrspace(3) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %36 = load <128 x i32>, ptr addrspace(3) poison, align 512
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <1 x i1>, ptr addrspace(3) poison
@@ -332,35 +374,35 @@ define void @loads_addrspace_5(i32 %arg) {
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <2 x i1>, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i8>, ptr addrspace(5) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <2 x i16>, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <3 x i1>, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = load <4 x i1>, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i16>, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = load <4 x i16>, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %16 = load <4 x i32>, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %17 = load <8 x i1>, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = load <8 x i8>, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = load <16 x i1>, ptr addrspace(5) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <16 x i8>, ptr addrspace(5) poison, align 16
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
+; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %25 = load <32 x i1>, ptr addrspace(5) poison, align 4
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %26 = load <32 x i8>, ptr addrspace(5) poison, align 32
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
+; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
+; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %29 = load <64 x i1>, ptr addrspace(5) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %30 = load <64 x i8>, ptr addrspace(5) poison, align 64
-; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
-; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
+; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
+; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
; GFX8-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %33 = load <128 x i1>, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %34 = load <128 x i8>, ptr addrspace(5) poison, align 128
-; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
-; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
+; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
+; GFX8-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-LABEL: 'loads_addrspace_5'
@@ -371,35 +413,35 @@ define void @loads_addrspace_5(i32 %arg) {
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <2 x i1>, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i8>, ptr addrspace(5) poison, align 2
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <2 x i16>, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <3 x i1>, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = load <4 x i1>, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i16>, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = load <4 x i16>, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %16 = load <4 x i32>, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %17 = load <8 x i1>, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = load <8 x i8>, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = load <16 x i1>, ptr addrspace(5) poison, align 2
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <16 x i8>, ptr addrspace(5) poison, align 16
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %25 = load <32 x i1>, ptr addrspace(5) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %26 = load <32 x i8>, ptr addrspace(5) poison, align 32
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %29 = load <64 x i1>, ptr addrspace(5) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %30 = load <64 x i8>, ptr addrspace(5) poison, align 64
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
; GFX90A-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %33 = load <128 x i1>, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %34 = load <128 x i8>, ptr addrspace(5) poison, align 128
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX12-LABEL: 'loads_addrspace_5'
@@ -413,7 +455,7 @@ define void @loads_addrspace_5(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <3 x i1>, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(5) poison, align 4
-; GFX12-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %13 = load <4 x i1>, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(5) poison, align 4
@@ -422,23 +464,23 @@ define void @loads_addrspace_5(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %17 = load <8 x i1>, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <8 x i8>, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %21 = load <16 x i1>, ptr addrspace(5) poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <16 x i8>, ptr addrspace(5) poison, align 16
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
+; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
; GFX12-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %25 = load <32 x i1>, ptr addrspace(5) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %26 = load <32 x i8>, ptr addrspace(5) poison, align 32
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
+; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
+; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
; GFX12-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %29 = load <64 x i1>, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %30 = load <64 x i8>, ptr addrspace(5) poison, align 64
-; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
-; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
+; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
+; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
; GFX12-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %33 = load <128 x i1>, ptr addrspace(5) poison, align 16
; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %34 = load <128 x i8>, ptr addrspace(5) poison, align 128
-; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
-; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
+; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
+; GFX12-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <1 x i1>, ptr addrspace(5) poison
@@ -489,13 +531,29 @@ define void @loads_addrspace_5(i32 %arg) {
}
define void @loads_underaligned(i32 %arg) {
-; CHECK-LABEL: 'loads_underaligned'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr addrspace(3) poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <4 x i32>, ptr addrspace(5) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'loads_underaligned'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr addrspace(3) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr addrspace(3) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <4 x i32>, ptr addrspace(5) poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90A-LABEL: 'loads_underaligned'
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr addrspace(3) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr addrspace(3) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <4 x i32>, ptr addrspace(5) poison, align 1
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX12-LABEL: 'loads_underaligned'
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr addrspace(3) poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr addrspace(3) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <4 x i32>, ptr addrspace(5) poison, align 1
+; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <3 x i32>, ptr addrspace(3) poison, align 1
load <3 x i32>, ptr addrspace(3) poison, align 4
@@ -511,8 +569,8 @@ define void @loads_overaligned(i32 %arg) {
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <7 x i16>, ptr addrspace(1) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <5 x i16>, ptr addrspace(3) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load <7 x i8>, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <7 x i16>, ptr addrspace(5) poison, align 16
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i8>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <7 x i16>, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = load <7 x i8>, ptr poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-LABEL: 'loads_overaligned'
@@ -520,7 +578,7 @@ define void @loads_overaligned(i32 %arg) {
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <7 x i16>, ptr addrspace(1) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <5 x i16>, ptr addrspace(3) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load <7 x i8>, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <7 x i16>, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <7 x i16>, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i8>, ptr poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
@@ -544,42 +602,42 @@ define void @loads_overaligned(i32 %arg) {
define void @loads_widened_tail(i32 %arg) {
; GFX8-LABEL: 'loads_widened_tail'
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <6 x i8>, ptr addrspace(1) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <7 x i8>, ptr addrspace(1) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i16>, ptr addrspace(1) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <6 x i8>, ptr addrspace(1) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = load <7 x i8>, ptr addrspace(1) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = load <7 x i16>, ptr addrspace(1) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <7 x i8>, ptr addrspace(3) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <7 x i8>, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <7 x i8>, ptr poison, align 4
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <13 x i8>, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-LABEL: 'loads_widened_tail'
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <6 x i8>, ptr addrspace(1) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <7 x i8>, ptr addrspace(1) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i16>, ptr addrspace(1) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <7 x i8>, ptr addrspace(3) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <7 x i8>, ptr poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <13 x i8>, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX12-LABEL: 'loads_widened_tail'
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <6 x i8>, ptr addrspace(1) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <7 x i8>, ptr addrspace(1) poison, align 4
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i16>, ptr addrspace(1) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <7 x i8>, ptr addrspace(3) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <7 x i8>, ptr poison, align 4
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <13 x i8>, ptr addrspace(5) poison, align 4
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %9 = load <13 x i8>, ptr addrspace(5) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <5 x i8>, ptr addrspace(1) poison, align 4
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/store.ll b/llvm/test/Analysis/CostModel/AMDGPU/store.ll
index e27eba13d5affb..aa9cbd92fad559 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/store.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/store.ll
@@ -1,7 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu8.03-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX8
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90A
-; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX12
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90APLUS,GFX90A
+; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX90APLUS,GFX12
define void @stores_i1(i32 %arg) {
; CHECK-LABEL: 'stores_i1'
@@ -23,15 +23,15 @@ define void @stores_i8(i32 %arg) {
; CHECK-LABEL: 'stores_i8'
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 2
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr poison, align 1
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
@@ -54,24 +54,43 @@ define void @stores_i8(i32 %arg) {
}
define void @stores_i16(i32 %arg) {
-; CHECK-LABEL: 'stores_i16'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 2
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'stores_i16'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90APLUS-LABEL: 'stores_i16'
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 2
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store i16 poison, ptr poison
store <2 x i16> poison, ptr poison
@@ -97,28 +116,51 @@ define void @stores_i16(i32 %arg) {
}
define void @stores_i32(i32 %arg) {
-; CHECK-LABEL: 'stores_i32'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'stores_i32'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90APLUS-LABEL: 'stores_i32'
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 1
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX90APLUS-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store i32 poison, ptr poison
store <2 x i32> poison, ptr poison
@@ -159,8 +201,8 @@ define void @stores_addrspace_1(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(1) poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i1> poison, ptr addrspace(1) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr addrspace(1) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr addrspace(1) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(1) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(1) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i1> poison, ptr addrspace(1) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(1) poison, align 4
@@ -169,23 +211,23 @@ define void @stores_addrspace_1(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i1> poison, ptr addrspace(1) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> poison, ptr addrspace(1) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> poison, ptr addrspace(1) poison, align 32
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i1> poison, ptr addrspace(1) poison, align 2
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> poison, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i16> poison, ptr addrspace(1) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i32> poison, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> poison, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> poison, ptr addrspace(1) poison, align 64
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i1> poison, ptr addrspace(1) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i8> poison, ptr addrspace(1) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i16> poison, ptr addrspace(1) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i32> poison, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <32 x i8> poison, ptr addrspace(1) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <32 x i16> poison, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i32> poison, ptr addrspace(1) poison, align 128
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i1> poison, ptr addrspace(1) poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <64 x i8> poison, ptr addrspace(1) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i16> poison, ptr addrspace(1) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i32> poison, ptr addrspace(1) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <64 x i8> poison, ptr addrspace(1) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <64 x i16> poison, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i32> poison, ptr addrspace(1) poison, align 256
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i1> poison, ptr addrspace(1) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <128 x i8> poison, ptr addrspace(1) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i16> poison, ptr addrspace(1) poison, align 256
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i32> poison, ptr addrspace(1) poison, align 512
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <128 x i8> poison, ptr addrspace(1) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <128 x i16> poison, ptr addrspace(1) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i32> poison, ptr addrspace(1) poison, align 512
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store <1 x i1> poison, ptr addrspace(1) poison
@@ -247,8 +289,8 @@ define void @stores_addrspace_3(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(3) poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i1> poison, ptr addrspace(3) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr addrspace(3) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(3) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i1> poison, ptr addrspace(3) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(3) poison, align 4
@@ -257,23 +299,23 @@ define void @stores_addrspace_3(i32 %arg) {
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i1> poison, ptr addrspace(3) poison, align 1
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> poison, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(3) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(3) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> poison, ptr addrspace(3) poison, align 32
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i1> poison, ptr addrspace(3) poison, align 2
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> poison, ptr addrspace(3) poison, align 16
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i16> poison, ptr addrspace(3) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i32> poison, ptr addrspace(3) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> poison, ptr addrspace(3) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> poison, ptr addrspace(3) poison, align 64
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i1> poison, ptr addrspace(3) poison, align 4
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <32 x i8> poison, ptr addrspace(3) poison, align 32
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i16> poison, ptr addrspace(3) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i32> poison, ptr addrspace(3) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <32 x i16> poison, ptr addrspace(3) poison, align 64
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i32> poison, ptr addrspace(3) poison, align 128
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i1> poison, ptr addrspace(3) poison, align 8
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <64 x i8> poison, ptr addrspace(3) poison, align 64
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i16> poison, ptr addrspace(3) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i32> poison, ptr addrspace(3) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <64 x i16> poison, ptr addrspace(3) poison, align 128
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i32> poison, ptr addrspace(3) poison, align 256
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i1> poison, ptr addrspace(3) poison, align 16
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <128 x i8> poison, ptr addrspace(3) poison, align 128
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i16> poison, ptr addrspace(3) poison, align 256
-; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i32> poison, ptr addrspace(3) poison, align 512
+; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <128 x i16> poison, ptr addrspace(3) poison, align 256
+; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i32> poison, ptr addrspace(3) poison, align 512
; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store <1 x i1> poison, ptr addrspace(3) poison
@@ -333,35 +375,35 @@ define void @stores_addrspace_5(i32 %arg) {
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i1> poison, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr addrspace(5) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i1> poison, ptr addrspace(5) poison, align 1
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i1> poison, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(5) poison, align 4
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i1> poison, ptr addrspace(5) poison, align 1
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i8> poison, ptr addrspace(5) poison, align 8
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i1> poison, ptr addrspace(5) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i8> poison, ptr addrspace(5) poison, align 16
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
+; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i1> poison, ptr addrspace(5) poison, align 4
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i8> poison, ptr addrspace(5) poison, align 32
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
-; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
+; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
+; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i1> poison, ptr addrspace(5) poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i8> poison, ptr addrspace(5) poison, align 64
-; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
-; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
+; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
+; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
; GFX8-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i1> poison, ptr addrspace(5) poison, align 16
; GFX8-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i8> poison, ptr addrspace(5) poison, align 128
-; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
-; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
+; GFX8-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
+; GFX8-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-LABEL: 'stores_addrspace_5'
@@ -372,35 +414,35 @@ define void @stores_addrspace_5(i32 %arg) {
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i1> poison, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr addrspace(5) poison, align 2
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i1> poison, ptr addrspace(5) poison, align 1
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i1> poison, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(5) poison, align 4
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i1> poison, ptr addrspace(5) poison, align 1
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i8> poison, ptr addrspace(5) poison, align 8
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i1> poison, ptr addrspace(5) poison, align 2
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i8> poison, ptr addrspace(5) poison, align 16
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i1> poison, ptr addrspace(5) poison, align 4
; GFX90A-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i8> poison, ptr addrspace(5) poison, align 32
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i1> poison, ptr addrspace(5) poison, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i8> poison, ptr addrspace(5) poison, align 64
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
; GFX90A-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i1> poison, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i8> poison, ptr addrspace(5) poison, align 128
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
-; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX12-LABEL: 'stores_addrspace_5'
@@ -413,8 +455,8 @@ define void @stores_addrspace_5(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(5) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i1> poison, ptr addrspace(5) poison, align 1
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i1> poison, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(5) poison, align 4
@@ -423,23 +465,23 @@ define void @stores_addrspace_5(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i1> poison, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> poison, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i1> poison, ptr addrspace(5) poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> poison, ptr addrspace(5) poison, align 16
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
+; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
+; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
; GFX12-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i1> poison, ptr addrspace(5) poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <32 x i8> poison, ptr addrspace(5) poison, align 32
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
-; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
+; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
+; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
; GFX12-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i1> poison, ptr addrspace(5) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <64 x i8> poison, ptr addrspace(5) poison, align 64
-; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
-; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
+; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
+; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
; GFX12-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i1> poison, ptr addrspace(5) poison, align 16
; GFX12-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <128 x i8> poison, ptr addrspace(5) poison, align 128
-; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
-; GFX12-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
+; GFX12-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
+; GFX12-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store <1 x i1> poison, ptr addrspace(5) poison
@@ -491,13 +533,29 @@ define void @stores_addrspace_5(i32 %arg) {
}
define void @stores_underaligned(i32 %arg) {
-; CHECK-LABEL: 'stores_underaligned'
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 8
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(3) poison, align 4
-; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 1
-; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+; GFX8-LABEL: 'stores_underaligned'
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 1
+; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX90A-LABEL: 'stores_underaligned'
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 8
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 1
+; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+; GFX12-LABEL: 'stores_underaligned'
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 1
+; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
store <3 x i32> poison, ptr addrspace(3) poison, align 1
store <3 x i32> poison, ptr addrspace(3) poison, align 4
diff --git a/llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll b/llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
index 2bc8953dc1c450..76d6ca8ab18cf9 100644
--- a/llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
+++ b/llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
@@ -319,9 +319,10 @@ define void @sincos_v3f32(<3 x float> %x, ptr addrspace(1) nocapture writeonly %
; CHECK-NEXT: entry:
; CHECK-NEXT: [[__SINCOS_:%.*]] = alloca <3 x float>, align 16, addrspace(5)
; CHECK-NEXT: [[TMP0:%.*]] = call contract <3 x float> @_Z6sincosDv3_fPU3AS5S_(<3 x float> [[X]], ptr addrspace(5) [[__SINCOS_]])
-; CHECK-NEXT: [[EXTRACTVEC6:%.*]] = load <4 x float>, ptr addrspace(5) [[__SINCOS_]], align 16
+; CHECK-NEXT: [[TMP1:%.*]] = load <3 x float>, ptr addrspace(5) [[__SINCOS_]], align 16
; CHECK-NEXT: [[EXTRACTVEC2:%.*]] = shufflevector <3 x float> [[TMP0]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
; CHECK-NEXT: store <4 x float> [[EXTRACTVEC2]], ptr addrspace(1) [[SIN_OUT]], align 16
+; CHECK-NEXT: [[EXTRACTVEC6:%.*]] = shufflevector <3 x float> [[TMP1]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
; CHECK-NEXT: store <4 x float> [[EXTRACTVEC6]], ptr addrspace(1) [[COS_OUT]], align 16
; CHECK-NEXT: ret void
;
diff --git a/llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll b/llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
index e779f1f3d6be87..6b2c9eed2c9ae4 100644
--- a/llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
+++ b/llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
@@ -126,11 +126,12 @@ define amdgpu_kernel void @test_sincos_v3(ptr addrspace(1) nocapture %a) {
; GCN-PRELINK-NEXT: [[__SINCOS_:%.*]] = alloca <3 x float>, align 16, addrspace(5)
; GCN-PRELINK-NEXT: [[TMP0:%.*]] = load <3 x float>, ptr addrspace(1) [[A]], align 16
; GCN-PRELINK-NEXT: [[TMP1:%.*]] = call fast <3 x float> @_Z6sincosDv3_fPU3AS5S_(<3 x float> [[TMP0]], ptr addrspace(5) [[__SINCOS_]])
-; GCN-PRELINK-NEXT: [[EXTRACTVEC13:%.*]] = load <4 x float>, ptr addrspace(5) [[__SINCOS_]], align 16
+; GCN-PRELINK-NEXT: [[TMP2:%.*]] = load <3 x float>, ptr addrspace(5) [[__SINCOS_]], align 16
; GCN-PRELINK-NEXT: [[EXTRACTVEC6:%.*]] = shufflevector <3 x float> [[TMP1]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
; GCN-PRELINK-NEXT: store <4 x float> [[EXTRACTVEC6]], ptr addrspace(1) [[A]], align 16
; GCN-PRELINK-NEXT: [[CALL11:%.*]] = call fast <3 x float> @_Z3cosDv3_f(<3 x float> [[TMP0]])
; GCN-PRELINK-NEXT: [[ARRAYIDX12:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[A]], i64 16
+; GCN-PRELINK-NEXT: [[EXTRACTVEC13:%.*]] = shufflevector <3 x float> [[TMP2]], <3 x float> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 poison>
; GCN-PRELINK-NEXT: store <4 x float> [[EXTRACTVEC13]], ptr addrspace(1) [[ARRAYIDX12]], align 16
; GCN-PRELINK-NEXT: ret void
;
diff --git a/llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-coalesced-loads.ll b/llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-coalesced-loads.ll
index 60cf5cbef69fd2..54d257adcb55ae 100644
--- a/llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-coalesced-loads.ll
+++ b/llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-coalesced-loads.ll
@@ -1,60 +1,270 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
-; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.0a-amd-amdhsa < %s | FileCheck %s
-; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.42-amd-amdhsa < %s | FileCheck %s
-; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.50-amd-amdhsa < %s | FileCheck %s
-; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu10.30-amd-amdhsa < %s | FileCheck %s
-; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu12.50-amd-amdhsa < %s | FileCheck %s
+; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.0a-amd-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX9
+; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.42-amd-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX9
+; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu9.50-amd-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX9
+; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu10.30-amd-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX1030
+; RUN: opt -passes=slp-vectorizer -S -mtriple=amdgpu12.50-amd-amdhsa < %s | FileCheck %s --check-prefixes=CHECK,GFX1250
; Ordered contract fadd reduction over consecutive global loads. On AMDGPU
; the scalar loads coalesce into the same wide access a vector load would
; use, so the reduction must stay scalar and fuse into fmas.
define amdgpu_kernel void @dotconv(ptr addrspace(1) noalias readonly align 4 %in, ptr addrspace(1) noalias readonly align 4 %mask, ptr addrspace(1) noalias writeonly align 4 %out) {
-; CHECK-LABEL: define amdgpu_kernel void @dotconv(
-; CHECK-SAME: ptr addrspace(1) noalias readonly align 4 [[IN:%.*]], ptr addrspace(1) noalias readonly align 4 [[MASK:%.*]], ptr addrspace(1) noalias writeonly align 4 [[OUT:%.*]]) {
-; CHECK-NEXT: [[ENTRY:.*:]]
-; CHECK-NEXT: [[CALL_I:%.*]] = tail call i64 @_Z13get_global_idj(i32 noundef 0)
-; CHECK-NEXT: [[SEXT_I:%.*]] = shl i64 [[CALL_I]], 32
-; CHECK-NEXT: [[IDX_EXT_I:%.*]] = ashr exact i64 [[SEXT_I]], 32
-; CHECK-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[IN]], i64 [[IDX_EXT_I]]
-; CHECK-NEXT: [[TMP0:%.*]] = load <16 x float>, ptr addrspace(1) [[ADD_PTR_I]], align 4
-; CHECK-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr addrspace(1) [[MASK]], align 4
-; CHECK-NEXT: [[TMP2:%.*]] = fmul contract <16 x float> [[TMP0]], [[TMP1]]
-; CHECK-NEXT: [[MUL_I:%.*]] = extractelement <16 x float> [[TMP2]], i64 0
-; CHECK-NEXT: [[ADD_I:%.*]] = fadd contract float [[MUL_I]], 0.000000e+00
-; CHECK-NEXT: [[MUL_I_1:%.*]] = extractelement <16 x float> [[TMP2]], i64 1
-; CHECK-NEXT: [[ADD_I_1:%.*]] = fadd contract float [[ADD_I]], [[MUL_I_1]]
-; CHECK-NEXT: [[MUL_I_2:%.*]] = extractelement <16 x float> [[TMP2]], i64 2
-; CHECK-NEXT: [[ADD_I_2:%.*]] = fadd contract float [[ADD_I_1]], [[MUL_I_2]]
-; CHECK-NEXT: [[MUL_I_3:%.*]] = extractelement <16 x float> [[TMP2]], i64 3
-; CHECK-NEXT: [[ADD_I_3:%.*]] = fadd contract float [[ADD_I_2]], [[MUL_I_3]]
-; CHECK-NEXT: [[MUL_I_4:%.*]] = extractelement <16 x float> [[TMP2]], i64 4
-; CHECK-NEXT: [[ADD_I_4:%.*]] = fadd contract float [[ADD_I_3]], [[MUL_I_4]]
-; CHECK-NEXT: [[MUL_I_5:%.*]] = extractelement <16 x float> [[TMP2]], i64 5
-; CHECK-NEXT: [[ADD_I_5:%.*]] = fadd contract float [[ADD_I_4]], [[MUL_I_5]]
-; CHECK-NEXT: [[MUL_I_6:%.*]] = extractelement <16 x float> [[TMP2]], i64 6
-; CHECK-NEXT: [[ADD_I_6:%.*]] = fadd contract float [[ADD_I_5]], [[MUL_I_6]]
-; CHECK-NEXT: [[MUL_I_7:%.*]] = extractelement <16 x float> [[TMP2]], i64 7
-; CHECK-NEXT: [[ADD_I_7:%.*]] = fadd contract float [[ADD_I_6]], [[MUL_I_7]]
-; CHECK-NEXT: [[MUL_I_8:%.*]] = extractelement <16 x float> [[TMP2]], i64 8
-; CHECK-NEXT: [[ADD_I_8:%.*]] = fadd contract float [[ADD_I_7]], [[MUL_I_8]]
-; CHECK-NEXT: [[MUL_I_9:%.*]] = extractelement <16 x float> [[TMP2]], i64 9
-; CHECK-NEXT: [[ADD_I_9:%.*]] = fadd contract float [[ADD_I_8]], [[MUL_I_9]]
-; CHECK-NEXT: [[MUL_I_10:%.*]] = extractelement <16 x float> [[TMP2]], i64 10
-; CHECK-NEXT: [[ADD_I_10:%.*]] = fadd contract float [[ADD_I_9]], [[MUL_I_10]]
-; CHECK-NEXT: [[MUL_I_11:%.*]] = extractelement <16 x float> [[TMP2]], i64 11
-; CHECK-NEXT: [[ADD_I_11:%.*]] = fadd contract float [[ADD_I_10]], [[MUL_I_11]]
-; CHECK-NEXT: [[MUL_I_12:%.*]] = extractelement <16 x float> [[TMP2]], i64 12
-; CHECK-NEXT: [[ADD_I_12:%.*]] = fadd contract float [[ADD_I_11]], [[MUL_I_12]]
-; CHECK-NEXT: [[MUL_I_13:%.*]] = extractelement <16 x float> [[TMP2]], i64 13
-; CHECK-NEXT: [[ADD_I_13:%.*]] = fadd contract float [[ADD_I_12]], [[MUL_I_13]]
-; CHECK-NEXT: [[MUL_I_14:%.*]] = extractelement <16 x float> [[TMP2]], i64 14
-; CHECK-NEXT: [[ADD_I_14:%.*]] = fadd contract float [[ADD_I_13]], [[MUL_I_14]]
-; CHECK-NEXT: [[MUL_I_15:%.*]] = extractelement <16 x float> [[TMP2]], i64 15
-; CHECK-NEXT: [[ADD_I_15:%.*]] = fadd contract float [[ADD_I_14]], [[MUL_I_15]]
-; CHECK-NEXT: [[ARRAYIDX5_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[OUT]], i64 [[IDX_EXT_I]]
-; CHECK-NEXT: store float [[ADD_I_15]], ptr addrspace(1) [[ARRAYIDX5_I]], align 4
-; CHECK-NEXT: ret void
+; GFX9-LABEL: define amdgpu_kernel void @dotconv(
+; GFX9-SAME: ptr addrspace(1) noalias readonly align 4 [[IN:%.*]], ptr addrspace(1) noalias readonly align 4 [[MASK:%.*]], ptr addrspace(1) noalias writeonly align 4 [[OUT:%.*]]) {
+; GFX9-NEXT: [[ENTRY:.*:]]
+; GFX9-NEXT: [[CALL_I:%.*]] = tail call i64 @_Z13get_global_idj(i32 noundef 0)
+; GFX9-NEXT: [[SEXT_I:%.*]] = shl i64 [[CALL_I]], 32
+; GFX9-NEXT: [[IDX_EXT_I:%.*]] = ashr exact i64 [[SEXT_I]], 32
+; GFX9-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[IN]], i64 [[IDX_EXT_I]]
+; GFX9-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(1) [[ADD_PTR_I]], align 4
+; GFX9-NEXT: [[TMP1:%.*]] = load float, ptr addrspace(1) [[MASK]], align 4
+; GFX9-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP1]]
+; GFX9-NEXT: [[ADD_I:%.*]] = fadd contract float [[MUL_I]], 0.000000e+00
+; GFX9-NEXT: [[ARRAYIDX_I_1:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 4
+; GFX9-NEXT: [[TMP2:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_1]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_1:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 4
+; GFX9-NEXT: [[TMP3:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_1]], align 4
+; GFX9-NEXT: [[MUL_I_1:%.*]] = fmul contract float [[TMP2]], [[TMP3]]
+; GFX9-NEXT: [[ADD_I_1:%.*]] = fadd contract float [[ADD_I]], [[MUL_I_1]]
+; GFX9-NEXT: [[ARRAYIDX_I_2:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 8
+; GFX9-NEXT: [[TMP4:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_2]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_2:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 8
+; GFX9-NEXT: [[TMP5:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_2]], align 4
+; GFX9-NEXT: [[MUL_I_2:%.*]] = fmul contract float [[TMP4]], [[TMP5]]
+; GFX9-NEXT: [[ADD_I_2:%.*]] = fadd contract float [[ADD_I_1]], [[MUL_I_2]]
+; GFX9-NEXT: [[ARRAYIDX_I_3:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 12
+; GFX9-NEXT: [[TMP6:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_3]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_3:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 12
+; GFX9-NEXT: [[TMP7:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_3]], align 4
+; GFX9-NEXT: [[MUL_I_3:%.*]] = fmul contract float [[TMP6]], [[TMP7]]
+; GFX9-NEXT: [[ADD_I_3:%.*]] = fadd contract float [[ADD_I_2]], [[MUL_I_3]]
+; GFX9-NEXT: [[ARRAYIDX_I_4:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 16
+; GFX9-NEXT: [[TMP8:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_4]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_4:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 16
+; GFX9-NEXT: [[TMP9:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_4]], align 4
+; GFX9-NEXT: [[MUL_I_4:%.*]] = fmul contract float [[TMP8]], [[TMP9]]
+; GFX9-NEXT: [[ADD_I_4:%.*]] = fadd contract float [[ADD_I_3]], [[MUL_I_4]]
+; GFX9-NEXT: [[ARRAYIDX_I_5:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 20
+; GFX9-NEXT: [[TMP10:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_5]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_5:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 20
+; GFX9-NEXT: [[TMP11:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_5]], align 4
+; GFX9-NEXT: [[MUL_I_5:%.*]] = fmul contract float [[TMP10]], [[TMP11]]
+; GFX9-NEXT: [[ADD_I_5:%.*]] = fadd contract float [[ADD_I_4]], [[MUL_I_5]]
+; GFX9-NEXT: [[ARRAYIDX_I_6:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 24
+; GFX9-NEXT: [[TMP12:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_6]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_6:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 24
+; GFX9-NEXT: [[TMP13:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_6]], align 4
+; GFX9-NEXT: [[MUL_I_6:%.*]] = fmul contract float [[TMP12]], [[TMP13]]
+; GFX9-NEXT: [[ADD_I_6:%.*]] = fadd contract float [[ADD_I_5]], [[MUL_I_6]]
+; GFX9-NEXT: [[ARRAYIDX_I_7:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 28
+; GFX9-NEXT: [[TMP14:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_7]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_7:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 28
+; GFX9-NEXT: [[TMP15:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_7]], align 4
+; GFX9-NEXT: [[MUL_I_7:%.*]] = fmul contract float [[TMP14]], [[TMP15]]
+; GFX9-NEXT: [[ADD_I_7:%.*]] = fadd contract float [[ADD_I_6]], [[MUL_I_7]]
+; GFX9-NEXT: [[ARRAYIDX_I_8:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 32
+; GFX9-NEXT: [[TMP16:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_8]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_8:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 32
+; GFX9-NEXT: [[TMP17:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_8]], align 4
+; GFX9-NEXT: [[MUL_I_8:%.*]] = fmul contract float [[TMP16]], [[TMP17]]
+; GFX9-NEXT: [[ADD_I_8:%.*]] = fadd contract float [[ADD_I_7]], [[MUL_I_8]]
+; GFX9-NEXT: [[ARRAYIDX_I_9:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 36
+; GFX9-NEXT: [[TMP18:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_9]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_9:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 36
+; GFX9-NEXT: [[TMP19:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_9]], align 4
+; GFX9-NEXT: [[MUL_I_9:%.*]] = fmul contract float [[TMP18]], [[TMP19]]
+; GFX9-NEXT: [[ADD_I_9:%.*]] = fadd contract float [[ADD_I_8]], [[MUL_I_9]]
+; GFX9-NEXT: [[ARRAYIDX_I_10:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 40
+; GFX9-NEXT: [[TMP20:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_10]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_10:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 40
+; GFX9-NEXT: [[TMP21:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_10]], align 4
+; GFX9-NEXT: [[MUL_I_10:%.*]] = fmul contract float [[TMP20]], [[TMP21]]
+; GFX9-NEXT: [[ADD_I_10:%.*]] = fadd contract float [[ADD_I_9]], [[MUL_I_10]]
+; GFX9-NEXT: [[ARRAYIDX_I_11:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 44
+; GFX9-NEXT: [[TMP22:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_11]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_11:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 44
+; GFX9-NEXT: [[TMP23:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_11]], align 4
+; GFX9-NEXT: [[MUL_I_11:%.*]] = fmul contract float [[TMP22]], [[TMP23]]
+; GFX9-NEXT: [[ADD_I_11:%.*]] = fadd contract float [[ADD_I_10]], [[MUL_I_11]]
+; GFX9-NEXT: [[ARRAYIDX_I_12:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 48
+; GFX9-NEXT: [[TMP24:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_12]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_12:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 48
+; GFX9-NEXT: [[TMP25:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_12]], align 4
+; GFX9-NEXT: [[MUL_I_12:%.*]] = fmul contract float [[TMP24]], [[TMP25]]
+; GFX9-NEXT: [[ADD_I_12:%.*]] = fadd contract float [[ADD_I_11]], [[MUL_I_12]]
+; GFX9-NEXT: [[ARRAYIDX_I_13:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 52
+; GFX9-NEXT: [[TMP26:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_13]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_13:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 52
+; GFX9-NEXT: [[TMP27:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_13]], align 4
+; GFX9-NEXT: [[MUL_I_13:%.*]] = fmul contract float [[TMP26]], [[TMP27]]
+; GFX9-NEXT: [[ADD_I_13:%.*]] = fadd contract float [[ADD_I_12]], [[MUL_I_13]]
+; GFX9-NEXT: [[ARRAYIDX_I_14:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 56
+; GFX9-NEXT: [[TMP28:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_14]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_14:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 56
+; GFX9-NEXT: [[TMP29:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_14]], align 4
+; GFX9-NEXT: [[MUL_I_14:%.*]] = fmul contract float [[TMP28]], [[TMP29]]
+; GFX9-NEXT: [[ADD_I_14:%.*]] = fadd contract float [[ADD_I_13]], [[MUL_I_14]]
+; GFX9-NEXT: [[ARRAYIDX_I_15:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 60
+; GFX9-NEXT: [[TMP30:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_15]], align 4
+; GFX9-NEXT: [[ARRAYIDX3_I_15:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 60
+; GFX9-NEXT: [[TMP31:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_15]], align 4
+; GFX9-NEXT: [[MUL_I_15:%.*]] = fmul contract float [[TMP30]], [[TMP31]]
+; GFX9-NEXT: [[ADD_I_15:%.*]] = fadd contract float [[ADD_I_14]], [[MUL_I_15]]
+; GFX9-NEXT: [[ARRAYIDX5_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[OUT]], i64 [[IDX_EXT_I]]
+; GFX9-NEXT: store float [[ADD_I_15]], ptr addrspace(1) [[ARRAYIDX5_I]], align 4
+; GFX9-NEXT: ret void
+;
+; GFX1030-LABEL: define amdgpu_kernel void @dotconv(
+; GFX1030-SAME: ptr addrspace(1) noalias readonly align 4 [[IN:%.*]], ptr addrspace(1) noalias readonly align 4 [[MASK:%.*]], ptr addrspace(1) noalias writeonly align 4 [[OUT:%.*]]) {
+; GFX1030-NEXT: [[ENTRY:.*:]]
+; GFX1030-NEXT: [[CALL_I:%.*]] = tail call i64 @_Z13get_global_idj(i32 noundef 0)
+; GFX1030-NEXT: [[SEXT_I:%.*]] = shl i64 [[CALL_I]], 32
+; GFX1030-NEXT: [[IDX_EXT_I:%.*]] = ashr exact i64 [[SEXT_I]], 32
+; GFX1030-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[IN]], i64 [[IDX_EXT_I]]
+; GFX1030-NEXT: [[TMP0:%.*]] = load <16 x float>, ptr addrspace(1) [[ADD_PTR_I]], align 4
+; GFX1030-NEXT: [[TMP1:%.*]] = load <16 x float>, ptr addrspace(1) [[MASK]], align 4
+; GFX1030-NEXT: [[TMP2:%.*]] = fmul contract <16 x float> [[TMP0]], [[TMP1]]
+; GFX1030-NEXT: [[TMP3:%.*]] = extractelement <16 x float> [[TMP2]], i64 0
+; GFX1030-NEXT: [[ADD_I:%.*]] = fadd contract float [[TMP3]], 0.000000e+00
+; GFX1030-NEXT: [[TMP4:%.*]] = extractelement <16 x float> [[TMP2]], i64 1
+; GFX1030-NEXT: [[ADD_I_1:%.*]] = fadd contract float [[ADD_I]], [[TMP4]]
+; GFX1030-NEXT: [[TMP5:%.*]] = extractelement <16 x float> [[TMP2]], i64 2
+; GFX1030-NEXT: [[ADD_I_2:%.*]] = fadd contract float [[ADD_I_1]], [[TMP5]]
+; GFX1030-NEXT: [[TMP6:%.*]] = extractelement <16 x float> [[TMP2]], i64 3
+; GFX1030-NEXT: [[ADD_I_3:%.*]] = fadd contract float [[ADD_I_2]], [[TMP6]]
+; GFX1030-NEXT: [[TMP7:%.*]] = extractelement <16 x float> [[TMP2]], i64 4
+; GFX1030-NEXT: [[ADD_I_4:%.*]] = fadd contract float [[ADD_I_3]], [[TMP7]]
+; GFX1030-NEXT: [[TMP8:%.*]] = extractelement <16 x float> [[TMP2]], i64 5
+; GFX1030-NEXT: [[ADD_I_5:%.*]] = fadd contract float [[ADD_I_4]], [[TMP8]]
+; GFX1030-NEXT: [[TMP9:%.*]] = extractelement <16 x float> [[TMP2]], i64 6
+; GFX1030-NEXT: [[ADD_I_6:%.*]] = fadd contract float [[ADD_I_5]], [[TMP9]]
+; GFX1030-NEXT: [[TMP10:%.*]] = extractelement <16 x float> [[TMP2]], i64 7
+; GFX1030-NEXT: [[ADD_I_7:%.*]] = fadd contract float [[ADD_I_6]], [[TMP10]]
+; GFX1030-NEXT: [[TMP11:%.*]] = extractelement <16 x float> [[TMP2]], i64 8
+; GFX1030-NEXT: [[ADD_I_8:%.*]] = fadd contract float [[ADD_I_7]], [[TMP11]]
+; GFX1030-NEXT: [[TMP12:%.*]] = extractelement <16 x float> [[TMP2]], i64 9
+; GFX1030-NEXT: [[ADD_I_9:%.*]] = fadd contract float [[ADD_I_8]], [[TMP12]]
+; GFX1030-NEXT: [[TMP13:%.*]] = extractelement <16 x float> [[TMP2]], i64 10
+; GFX1030-NEXT: [[ADD_I_10:%.*]] = fadd contract float [[ADD_I_9]], [[TMP13]]
+; GFX1030-NEXT: [[TMP14:%.*]] = extractelement <16 x float> [[TMP2]], i64 11
+; GFX1030-NEXT: [[ADD_I_11:%.*]] = fadd contract float [[ADD_I_10]], [[TMP14]]
+; GFX1030-NEXT: [[TMP15:%.*]] = extractelement <16 x float> [[TMP2]], i64 12
+; GFX1030-NEXT: [[ADD_I_12:%.*]] = fadd contract float [[ADD_I_11]], [[TMP15]]
+; GFX1030-NEXT: [[TMP16:%.*]] = extractelement <16 x float> [[TMP2]], i64 13
+; GFX1030-NEXT: [[ADD_I_13:%.*]] = fadd contract float [[ADD_I_12]], [[TMP16]]
+; GFX1030-NEXT: [[TMP17:%.*]] = extractelement <16 x float> [[TMP2]], i64 14
+; GFX1030-NEXT: [[ADD_I_14:%.*]] = fadd contract float [[ADD_I_13]], [[TMP17]]
+; GFX1030-NEXT: [[TMP18:%.*]] = extractelement <16 x float> [[TMP2]], i64 15
+; GFX1030-NEXT: [[ADD_I_15:%.*]] = fadd contract float [[ADD_I_14]], [[TMP18]]
+; GFX1030-NEXT: [[ARRAYIDX5_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[OUT]], i64 [[IDX_EXT_I]]
+; GFX1030-NEXT: store float [[ADD_I_15]], ptr addrspace(1) [[ARRAYIDX5_I]], align 4
+; GFX1030-NEXT: ret void
+;
+; GFX1250-LABEL: define amdgpu_kernel void @dotconv(
+; GFX1250-SAME: ptr addrspace(1) noalias readonly align 4 [[IN:%.*]], ptr addrspace(1) noalias readonly align 4 [[MASK:%.*]], ptr addrspace(1) noalias writeonly align 4 [[OUT:%.*]]) {
+; GFX1250-NEXT: [[ENTRY:.*:]]
+; GFX1250-NEXT: [[CALL_I:%.*]] = tail call i64 @_Z13get_global_idj(i32 noundef 0)
+; GFX1250-NEXT: [[SEXT_I:%.*]] = shl i64 [[CALL_I]], 32
+; GFX1250-NEXT: [[IDX_EXT_I:%.*]] = ashr exact i64 [[SEXT_I]], 32
+; GFX1250-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[IN]], i64 [[IDX_EXT_I]]
+; GFX1250-NEXT: [[TMP0:%.*]] = load float, ptr addrspace(1) [[ADD_PTR_I]], align 4
+; GFX1250-NEXT: [[TMP1:%.*]] = load float, ptr addrspace(1) [[MASK]], align 4
+; GFX1250-NEXT: [[MUL_I:%.*]] = fmul contract float [[TMP0]], [[TMP1]]
+; GFX1250-NEXT: [[ADD_I:%.*]] = fadd contract float [[MUL_I]], 0.000000e+00
+; GFX1250-NEXT: [[ARRAYIDX_I_1:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 4
+; GFX1250-NEXT: [[TMP2:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_1]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_1:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 4
+; GFX1250-NEXT: [[TMP3:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_1]], align 4
+; GFX1250-NEXT: [[MUL_I_1:%.*]] = fmul contract float [[TMP2]], [[TMP3]]
+; GFX1250-NEXT: [[ADD_I_1:%.*]] = fadd contract float [[ADD_I]], [[MUL_I_1]]
+; GFX1250-NEXT: [[ARRAYIDX_I_2:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 8
+; GFX1250-NEXT: [[TMP4:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_2]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_2:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 8
+; GFX1250-NEXT: [[TMP5:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_2]], align 4
+; GFX1250-NEXT: [[MUL_I_2:%.*]] = fmul contract float [[TMP4]], [[TMP5]]
+; GFX1250-NEXT: [[ADD_I_2:%.*]] = fadd contract float [[ADD_I_1]], [[MUL_I_2]]
+; GFX1250-NEXT: [[ARRAYIDX_I_3:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 12
+; GFX1250-NEXT: [[TMP6:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_3]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_3:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 12
+; GFX1250-NEXT: [[TMP7:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_3]], align 4
+; GFX1250-NEXT: [[MUL_I_3:%.*]] = fmul contract float [[TMP6]], [[TMP7]]
+; GFX1250-NEXT: [[ADD_I_3:%.*]] = fadd contract float [[ADD_I_2]], [[MUL_I_3]]
+; GFX1250-NEXT: [[ARRAYIDX_I_4:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 16
+; GFX1250-NEXT: [[TMP8:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_4]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_4:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 16
+; GFX1250-NEXT: [[TMP9:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_4]], align 4
+; GFX1250-NEXT: [[MUL_I_4:%.*]] = fmul contract float [[TMP8]], [[TMP9]]
+; GFX1250-NEXT: [[ADD_I_4:%.*]] = fadd contract float [[ADD_I_3]], [[MUL_I_4]]
+; GFX1250-NEXT: [[ARRAYIDX_I_5:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 20
+; GFX1250-NEXT: [[TMP10:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_5]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_5:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 20
+; GFX1250-NEXT: [[TMP11:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_5]], align 4
+; GFX1250-NEXT: [[MUL_I_5:%.*]] = fmul contract float [[TMP10]], [[TMP11]]
+; GFX1250-NEXT: [[ADD_I_5:%.*]] = fadd contract float [[ADD_I_4]], [[MUL_I_5]]
+; GFX1250-NEXT: [[ARRAYIDX_I_6:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 24
+; GFX1250-NEXT: [[TMP12:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_6]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_6:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 24
+; GFX1250-NEXT: [[TMP13:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_6]], align 4
+; GFX1250-NEXT: [[MUL_I_6:%.*]] = fmul contract float [[TMP12]], [[TMP13]]
+; GFX1250-NEXT: [[ADD_I_6:%.*]] = fadd contract float [[ADD_I_5]], [[MUL_I_6]]
+; GFX1250-NEXT: [[ARRAYIDX_I_7:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 28
+; GFX1250-NEXT: [[TMP14:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_7]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_7:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 28
+; GFX1250-NEXT: [[TMP15:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_7]], align 4
+; GFX1250-NEXT: [[MUL_I_7:%.*]] = fmul contract float [[TMP14]], [[TMP15]]
+; GFX1250-NEXT: [[ADD_I_7:%.*]] = fadd contract float [[ADD_I_6]], [[MUL_I_7]]
+; GFX1250-NEXT: [[ARRAYIDX_I_8:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 32
+; GFX1250-NEXT: [[TMP16:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_8]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_8:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 32
+; GFX1250-NEXT: [[TMP17:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_8]], align 4
+; GFX1250-NEXT: [[MUL_I_8:%.*]] = fmul contract float [[TMP16]], [[TMP17]]
+; GFX1250-NEXT: [[ADD_I_8:%.*]] = fadd contract float [[ADD_I_7]], [[MUL_I_8]]
+; GFX1250-NEXT: [[ARRAYIDX_I_9:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 36
+; GFX1250-NEXT: [[TMP18:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_9]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_9:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 36
+; GFX1250-NEXT: [[TMP19:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_9]], align 4
+; GFX1250-NEXT: [[MUL_I_9:%.*]] = fmul contract float [[TMP18]], [[TMP19]]
+; GFX1250-NEXT: [[ADD_I_9:%.*]] = fadd contract float [[ADD_I_8]], [[MUL_I_9]]
+; GFX1250-NEXT: [[ARRAYIDX_I_10:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 40
+; GFX1250-NEXT: [[TMP20:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_10]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_10:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 40
+; GFX1250-NEXT: [[TMP21:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_10]], align 4
+; GFX1250-NEXT: [[MUL_I_10:%.*]] = fmul contract float [[TMP20]], [[TMP21]]
+; GFX1250-NEXT: [[ADD_I_10:%.*]] = fadd contract float [[ADD_I_9]], [[MUL_I_10]]
+; GFX1250-NEXT: [[ARRAYIDX_I_11:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 44
+; GFX1250-NEXT: [[TMP22:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_11]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_11:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 44
+; GFX1250-NEXT: [[TMP23:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_11]], align 4
+; GFX1250-NEXT: [[MUL_I_11:%.*]] = fmul contract float [[TMP22]], [[TMP23]]
+; GFX1250-NEXT: [[ADD_I_11:%.*]] = fadd contract float [[ADD_I_10]], [[MUL_I_11]]
+; GFX1250-NEXT: [[ARRAYIDX_I_12:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 48
+; GFX1250-NEXT: [[TMP24:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_12]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_12:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 48
+; GFX1250-NEXT: [[TMP25:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_12]], align 4
+; GFX1250-NEXT: [[MUL_I_12:%.*]] = fmul contract float [[TMP24]], [[TMP25]]
+; GFX1250-NEXT: [[ADD_I_12:%.*]] = fadd contract float [[ADD_I_11]], [[MUL_I_12]]
+; GFX1250-NEXT: [[ARRAYIDX_I_13:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 52
+; GFX1250-NEXT: [[TMP26:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_13]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_13:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 52
+; GFX1250-NEXT: [[TMP27:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_13]], align 4
+; GFX1250-NEXT: [[MUL_I_13:%.*]] = fmul contract float [[TMP26]], [[TMP27]]
+; GFX1250-NEXT: [[ADD_I_13:%.*]] = fadd contract float [[ADD_I_12]], [[MUL_I_13]]
+; GFX1250-NEXT: [[ARRAYIDX_I_14:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 56
+; GFX1250-NEXT: [[TMP28:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_14]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_14:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 56
+; GFX1250-NEXT: [[TMP29:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_14]], align 4
+; GFX1250-NEXT: [[MUL_I_14:%.*]] = fmul contract float [[TMP28]], [[TMP29]]
+; GFX1250-NEXT: [[ADD_I_14:%.*]] = fadd contract float [[ADD_I_13]], [[MUL_I_14]]
+; GFX1250-NEXT: [[ARRAYIDX_I_15:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[ADD_PTR_I]], i64 60
+; GFX1250-NEXT: [[TMP30:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX_I_15]], align 4
+; GFX1250-NEXT: [[ARRAYIDX3_I_15:%.*]] = getelementptr inbounds nuw i8, ptr addrspace(1) [[MASK]], i64 60
+; GFX1250-NEXT: [[TMP31:%.*]] = load float, ptr addrspace(1) [[ARRAYIDX3_I_15]], align 4
+; GFX1250-NEXT: [[MUL_I_15:%.*]] = fmul contract float [[TMP30]], [[TMP31]]
+; GFX1250-NEXT: [[ADD_I_15:%.*]] = fadd contract float [[ADD_I_14]], [[MUL_I_15]]
+; GFX1250-NEXT: [[ARRAYIDX5_I:%.*]] = getelementptr inbounds [4 x i8], ptr addrspace(1) [[OUT]], i64 [[IDX_EXT_I]]
+; GFX1250-NEXT: store float [[ADD_I_15]], ptr addrspace(1) [[ARRAYIDX5_I]], align 4
+; GFX1250-NEXT: ret void
;
entry:
%call.i = tail call i64 @_Z13get_global_idj(i32 noundef 0)
More information about the llvm-branch-commits
mailing list