[llvm-branch-commits] [llvm] [NFC][AMDGPU] Precommit buffer fat pointer and gfx1010 memory cost tests (PR #238841)
Dmitry Sidorov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Nov 7 02:36:09 PST 2026
https://github.com/MrSidims updated https://github.com/llvm/llvm-project/pull/238841
>From 733a858457b170d646ebe010ea7263f4c8afe3ac Mon Sep 17 00:00:00 2001
From: Dmitry Sidorov <Dmitry.Sidorov at amd.com>
Date: Wed, 4 Nov 2026 14:55:18 +0100
Subject: [PATCH] [NFC][AMDGPU] Precommit buffer fat pointer and gfx1010 memory
cost tests
---
llvm/test/Analysis/CostModel/AMDGPU/load.ll | 294 +++++++++++++++++++
llvm/test/Analysis/CostModel/AMDGPU/store.ll | 235 +++++++++++++++
2 files changed, 529 insertions(+)
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/load.ll b/llvm/test/Analysis/CostModel/AMDGPU/load.ll
index 678b65f0fc3695..12b58176d97c43 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/load.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/load.ll
@@ -2,7 +2,10 @@
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu8.03-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX8
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX90A,GFX90A-UNALIGNED
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa -mattr=-unaligned-access-mode < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX90A,GFX90A-NOUNALIGNED
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu10.10-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX10
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu10.10-unknown-amdhsa -mattr=+cumode < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX10
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX12
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.50-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX12
@g = external addrspace(4) constant [64 x i32], align 64
@@ -69,6 +72,21 @@ define void @loads_i8(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i8>, ptr poison, align 4
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_i8'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i8>, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i8, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i8>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i8>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i8>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i8, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_i8'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, ptr poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i8>, ptr poison, align 2
@@ -160,6 +178,25 @@ define void @loads_i16(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i16>, ptr poison, align 8
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_i16'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i16, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i16>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i16>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i16>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i16, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i16>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i16>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i16>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i16, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i16>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i16>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i16, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i16>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <3 x i16>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i16>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_i16'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i16, ptr poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i16>, ptr poison, align 4
@@ -272,6 +309,29 @@ define void @loads_i32(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, ptr poison, align 16
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_i32'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i32>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <4 x i32>, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i32, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i32>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <3 x i32>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i32>, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load i32, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <3 x i32>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i32, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i32>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <3 x i32>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load i32, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <2 x i32>, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <3 x i32>, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_i32'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i32>, ptr poison, align 8
@@ -576,6 +636,45 @@ define void @loads_addrspace_5(i32 %arg) {
; 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
;
+; GFX10-LABEL: 'loads_addrspace_5'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <1 x i1>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <1 x i8>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <1 x i16>, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <1 x i32>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <2 x i1>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <2 x i8>, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <2 x i16>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i32>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <3 x i1>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <3 x i8>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <3 x i16>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %12 = load <3 x i32>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <4 x i1>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = load <4 x i16>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %16 = load <4 x i32>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <8 x i1>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = load <8 x i8>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <8 x i16>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %20 = load <8 x i32>, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <16 x i1>, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <16 x i8>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = load <16 x i16>, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %24 = load <16 x i32>, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %25 = load <32 x i1>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %26 = load <32 x i8>, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %27 = load <32 x i16>, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %28 = load <32 x i32>, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %29 = load <64 x i1>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %30 = load <64 x i8>, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %31 = load <64 x i16>, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %32 = load <64 x i32>, ptr addrspace(5) poison, align 256
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %33 = load <128 x i1>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %34 = load <128 x i8>, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %35 = load <128 x i16>, ptr addrspace(5) poison, align 256
+; GFX10-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %36 = load <128 x i32>, ptr addrspace(5) poison, align 512
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_addrspace_5'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <1 x i1>, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <1 x i8>, ptr addrspace(5) poison, align 1
@@ -662,6 +761,72 @@ define void @loads_addrspace_5(i32 %arg) {
ret void
}
+define void @loads_addrspace_7(i32 %arg) {
+; CHECK-LABEL: 'loads_addrspace_7'
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i32, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i64, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <2 x i32>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <2 x i32>, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <3 x i32>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <3 x i32>, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <3 x i32>, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i32>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <4 x i32>, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <8 x i32>, ptr addrspace(7) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <4 x i8>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <2 x i16>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <8 x half>, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %16 = load <4 x i24>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %17 = load <3 x i12>, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+ load i32, ptr addrspace(7) poison, align 4
+ load i64, ptr addrspace(7) poison, align 4
+ load <2 x i32>, ptr addrspace(7) poison, align 4
+ load <2 x i32>, ptr addrspace(7) poison, align 8
+ load <3 x i32>, ptr addrspace(7) poison, align 4
+ load <3 x i32>, ptr addrspace(7) poison, align 8
+ load <3 x i32>, ptr addrspace(7) poison, align 16
+ load <4 x i32>, ptr addrspace(7) poison, align 4
+ load <4 x i32>, ptr addrspace(7) poison, align 8
+ load <4 x i32>, ptr addrspace(7) poison, align 16
+ load <2 x i64>, ptr addrspace(7) poison, align 8
+ load <8 x i32>, ptr addrspace(7) poison, align 32
+ load <4 x i8>, ptr addrspace(7) poison, align 4
+ load <2 x i16>, ptr addrspace(7) poison, align 4
+ load <8 x half>, ptr addrspace(7) poison, align 16
+ load <4 x i24>, ptr addrspace(7) poison, align 4
+ load <3 x i12>, ptr addrspace(7) poison, align 4
+ ret void
+}
+
+define void @loads_addrspace_7_unknown_offset(ptr addrspace(7) %p) {
+; CHECK-LABEL: 'loads_addrspace_7_unknown_offset'
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <4 x i32>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <2 x i64>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <2 x i64>, ptr addrspace(7) %p, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <3 x i32>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load <8 x i32>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <3 x double>, ptr addrspace(7) %p, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <8 x i16>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <16 x i8>, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(7) %p, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+ load <4 x i32>, ptr addrspace(7) %p, align 4
+ load <2 x i64>, ptr addrspace(7) %p, align 4
+ load <2 x i64>, ptr addrspace(7) %p, align 8
+ load <3 x i32>, ptr addrspace(7) %p, align 4
+ load <8 x i32>, ptr addrspace(7) %p, align 4
+ load <3 x double>, ptr addrspace(7) %p, align 8
+ load <8 x i16>, ptr addrspace(7) %p, align 4
+ load <16 x i8>, ptr addrspace(7) %p, align 4
+ load <4 x i32>, ptr addrspace(7) %p, align 16
+ ret void
+}
+
define void @loads_underaligned(i32 %arg) {
; GFX8-LABEL: 'loads_underaligned'
; GFX8-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
@@ -675,6 +840,11 @@ define void @loads_underaligned(i32 %arg) {
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(1) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load i32, ptr poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %11 = load <4 x i32>, ptr poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %12 = load <2 x i64>, ptr addrspace(3) poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = load i64, ptr poison, align 4
+; GFX8-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %14 = load <3 x i32>, ptr poison, align 8
+; GFX8-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = load <4 x i32>, ptr poison, align 4
+; 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 10 for instruction: ret void
;
; GFX90A-UNALIGNED-LABEL: 'loads_underaligned'
@@ -689,6 +859,11 @@ define void @loads_underaligned(i32 %arg) {
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(1) poison, align 2
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load i32, ptr poison, align 2
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <4 x i32>, ptr poison, align 2
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <2 x i64>, ptr addrspace(3) poison, align 2
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i64, ptr poison, align 4
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <3 x i32>, ptr poison, align 8
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i32>, ptr poison, align 4
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-NOUNALIGNED-LABEL: 'loads_underaligned'
@@ -703,8 +878,32 @@ define void @loads_underaligned(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %9 = load <4 x i32>, ptr addrspace(1) poison, align 2
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load i32, ptr poison, align 2
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %11 = load <4 x i32>, ptr poison, align 2
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %12 = load <2 x i64>, ptr addrspace(3) poison, align 2
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i64, ptr poison, align 4
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <3 x i32>, ptr poison, align 8
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i32>, ptr poison, align 4
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_underaligned'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i32>, ptr addrspace(3) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = load <3 x i32>, ptr addrspace(3) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load <4 x i32>, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <4 x i32>, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load i32, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load i32, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i32>, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load i32, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <4 x i32>, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <2 x i64>, ptr addrspace(3) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i64, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <3 x i32>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i32>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
+; GFX10-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 2 for instruction: %2 = load <3 x i32>, ptr addrspace(3) poison, align 4
@@ -717,6 +916,11 @@ define void @loads_underaligned(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <4 x i32>, ptr addrspace(1) poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load i32, ptr poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <4 x i32>, ptr poison, align 2
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <2 x i64>, ptr addrspace(3) poison, align 2
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load i64, ptr poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <3 x i32>, ptr poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i32>, ptr poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, ptr poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
load <3 x i32>, ptr addrspace(3) poison, align 1
@@ -730,6 +934,11 @@ define void @loads_underaligned(i32 %arg) {
load <4 x i32>, ptr addrspace(1) poison, align 2
load i32, ptr poison, align 2
load <4 x i32>, ptr poison, align 2
+ load <2 x i64>, ptr addrspace(3) poison, align 2
+ load i64, ptr poison, align 4
+ load <3 x i32>, ptr poison, align 8
+ load <4 x i32>, ptr poison, align 4
+ load <4 x i32>, ptr poison, align 8
ret void
}
@@ -752,6 +961,15 @@ define void @loads_overaligned(i32 %arg) {
; 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
;
+; GFX10-LABEL: 'loads_overaligned'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <7 x i8>, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <7 x i16>, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <5 x i16>, ptr addrspace(3) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load <7 x i8>, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load <7 x i16>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i8>, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_overaligned'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <7 x i8>, ptr addrspace(1) poison, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <7 x i16>, ptr addrspace(1) poison, align 16
@@ -810,6 +1028,19 @@ define void @loads_widened_tail(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_widened_tail'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <5 x i8>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <6 x i8>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <7 x i8>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %4 = load <7 x i8>, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <7 x i16>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load <7 x i16>, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <7 x i8>, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <7 x i8>, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %9 = load <13 x i8>, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %10 = load <7 x i16>, ptr addrspace(5) poison, align 8
+; GFX10-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 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
@@ -882,6 +1113,21 @@ define void @loads_odd_widths(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %12 = load <2 x i96>, ptr addrspace(5) poison, align 16
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_odd_widths'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load i24, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load i48, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = load i24, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i48, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load i80, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = load i112, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <3 x i12>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <4 x i24>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %9 = load <3 x i24>, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i48>, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load <4 x i24>, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %12 = load <2 x i96>, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_odd_widths'
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load i24, ptr addrspace(1) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load i48, ptr addrspace(1) poison, align 2
@@ -967,6 +1213,24 @@ define amdgpu_kernel void @loads_addrspace_4_kernarg(ptr addrspace(4) %p, ptr ad
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <16 x i32>, ptr addrspace(4) %gep.id, align 64
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_addrspace_4_kernarg'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i16>, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <3 x i32>, ptr addrspace(4) %p, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load <3 x i32>, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <16 x i32>, ptr addrspace(4) %p, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <32 x i32>, ptr addrspace(4) %p, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %6 = load <16 x i32>, ptr addrspace(4) %p, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep = getelementptr inbounds i8, ptr addrspace(4) %p, i64 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load <16 x i32>, ptr addrspace(4) %gep, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %gep.raw = getelementptr i8, ptr addrspace(4) %p, i64 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <16 x i32>, ptr addrspace(4) %gep.raw, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <16 x i32>, ptr addrspace(6) %q, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <16 x i32>, ptr addrspace(4) @g, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %id = call i32 @llvm.amdgcn.workitem.id.x()
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %gep.id = getelementptr inbounds <16 x i32>, ptr addrspace(4) %p, i32 %id
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <16 x i32>, ptr addrspace(4) %gep.id, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_addrspace_4_kernarg'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load <3 x i16>, ptr addrspace(4) %p, align 8
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <3 x i32>, ptr addrspace(4) %p, align 4
@@ -1020,6 +1284,14 @@ define amdgpu_kernel void @loads_addrspace_4_widened(ptr addrspace(4) %p) {
; GFX90A-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i96, ptr addrspace(4) %p, align 8
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_addrspace_4_widened'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = load <7 x i32>, ptr addrspace(4) %p, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load <7 x i32>, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %3 = load <7 x i64>, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %4 = load <7 x i64>, ptr addrspace(4) %p, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %5 = load i96, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_addrspace_4_widened'
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %1 = load <7 x i32>, ptr addrspace(4) %p, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <7 x i32>, ptr addrspace(4) %p, align 8
@@ -1109,6 +1381,28 @@ define amdgpu_kernel void @loads_addrspace_4_illegal_types(ptr addrspace(4) %p)
; GFX90A-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = load i416, ptr addrspace(4) %p, align 32
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'loads_addrspace_4_illegal_types'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %1 = load <15 x i32>, ptr addrspace(4) %p, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <15 x i32>, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %3 = load <31 x i32>, ptr addrspace(4) %p, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %4 = load <62 x i32>, ptr addrspace(4) %p, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %5 = load <7 x i64>, ptr addrspace(4) %p, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %6 = load <60 x i8>, ptr addrspace(4) %p, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load <9 x i8>, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <11 x i8>, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <5 x i16>, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <31 x i16>, ptr addrspace(4) %p, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %11 = load i56, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %12 = load i80, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %13 = load i80, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %14 = load i88, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %15 = load i120, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %16 = load i136, ptr addrspace(4) %p, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %17 = load i184, ptr addrspace(4) %p, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %18 = load i248, ptr addrspace(4) %p, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %19 = load i416, ptr addrspace(4) %p, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'loads_addrspace_4_illegal_types'
; GFX12-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %1 = load <15 x i32>, ptr addrspace(4) %p, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %2 = load <15 x i32>, ptr addrspace(4) %p, align 16
diff --git a/llvm/test/Analysis/CostModel/AMDGPU/store.ll b/llvm/test/Analysis/CostModel/AMDGPU/store.ll
index ec936a44d850b6..7465f1bee27ced 100644
--- a/llvm/test/Analysis/CostModel/AMDGPU/store.ll
+++ b/llvm/test/Analysis/CostModel/AMDGPU/store.ll
@@ -2,7 +2,10 @@
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu8.03-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX8
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX90A,GFX90A-UNALIGNED
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.0a-unknown-amdhsa -mattr=-unaligned-access-mode < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX90A,GFX90A-NOUNALIGNED
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu10.10-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX10
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu10.10-unknown-amdhsa -mattr=+cumode < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX10
; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.01-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX12
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.50-unknown-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,GFX12
define void @stores_i1(i32 %arg) {
; CHECK-LABEL: 'stores_i1'
@@ -66,6 +69,21 @@ define void @stores_i8(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 4
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_i8'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_i8'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 poison, ptr poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr poison, align 2
@@ -157,6 +175,25 @@ define void @stores_i16(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_i16'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_i16'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 poison, ptr poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr poison, align 4
@@ -269,6 +306,29 @@ define void @stores_i32(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_i32'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_i32'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 4
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr poison, align 8
@@ -575,6 +635,45 @@ define void @stores_addrspace_5(i32 %arg) {
; 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
;
+; GFX10-LABEL: 'stores_addrspace_5'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i1> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i8> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i16> poison, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i32> poison, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i1> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> poison, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> poison, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i1> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i8> poison, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <3 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i1> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i16> poison, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i1> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i8> poison, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i16> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i32> poison, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i1> poison, ptr addrspace(5) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i8> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <16 x i16> poison, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i32> poison, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <32 x i1> poison, ptr addrspace(5) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <32 x i8> poison, ptr addrspace(5) poison, align 32
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <32 x i16> poison, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <32 x i32> poison, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <64 x i1> poison, ptr addrspace(5) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <64 x i8> poison, ptr addrspace(5) poison, align 64
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <64 x i16> poison, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <64 x i32> poison, ptr addrspace(5) poison, align 256
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <128 x i1> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <128 x i8> poison, ptr addrspace(5) poison, align 128
+; GFX10-NEXT: Cost Model: Found an estimated cost of 64 for instruction: store <128 x i16> poison, ptr addrspace(5) poison, align 256
+; GFX10-NEXT: Cost Model: Found an estimated cost of 128 for instruction: store <128 x i32> poison, ptr addrspace(5) poison, align 512
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_addrspace_5'
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i1> poison, ptr addrspace(5) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <1 x i8> poison, ptr addrspace(5) poison, align 1
@@ -662,6 +761,72 @@ define void @stores_addrspace_5(i32 %arg) {
ret void
}
+define void @stores_addrspace_7(i32 %arg) {
+; CHECK-LABEL: 'stores_addrspace_7'
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> poison, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(7) poison, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(7) poison, align 32
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x half> poison, ptr addrspace(7) poison, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 5 for instruction: store <4 x i24> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <3 x i12> poison, ptr addrspace(7) poison, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+ store i32 poison, ptr addrspace(7) poison, align 4
+ store i64 poison, ptr addrspace(7) poison, align 4
+ store <2 x i32> poison, ptr addrspace(7) poison, align 4
+ store <2 x i32> poison, ptr addrspace(7) poison, align 8
+ store <3 x i32> poison, ptr addrspace(7) poison, align 4
+ store <3 x i32> poison, ptr addrspace(7) poison, align 8
+ store <3 x i32> poison, ptr addrspace(7) poison, align 16
+ store <4 x i32> poison, ptr addrspace(7) poison, align 4
+ store <4 x i32> poison, ptr addrspace(7) poison, align 8
+ store <4 x i32> poison, ptr addrspace(7) poison, align 16
+ store <2 x i64> poison, ptr addrspace(7) poison, align 8
+ store <8 x i32> poison, ptr addrspace(7) poison, align 32
+ store <4 x i8> poison, ptr addrspace(7) poison, align 4
+ store <2 x i16> poison, ptr addrspace(7) poison, align 4
+ store <8 x half> poison, ptr addrspace(7) poison, align 16
+ store <4 x i24> poison, ptr addrspace(7) poison, align 4
+ store <3 x i12> poison, ptr addrspace(7) poison, align 4
+ ret void
+}
+
+define void @stores_addrspace_7_unknown_offset(ptr addrspace(7) %p) {
+; CHECK-LABEL: 'stores_addrspace_7_unknown_offset'
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(7) %p, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i32> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x double> poison, ptr addrspace(7) %p, align 8
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> poison, ptr addrspace(7) %p, align 4
+; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(7) %p, align 16
+; CHECK-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
+ store <4 x i32> poison, ptr addrspace(7) %p, align 4
+ store <2 x i64> poison, ptr addrspace(7) %p, align 4
+ store <2 x i64> poison, ptr addrspace(7) %p, align 8
+ store <3 x i32> poison, ptr addrspace(7) %p, align 4
+ store <8 x i32> poison, ptr addrspace(7) %p, align 4
+ store <3 x double> poison, ptr addrspace(7) %p, align 8
+ store <8 x i16> poison, ptr addrspace(7) %p, align 4
+ store <16 x i8> poison, ptr addrspace(7) %p, align 4
+ store <4 x i32> poison, ptr addrspace(7) %p, align 16
+ ret void
+}
+
define void @stores_underaligned(i32 %arg) {
; GFX8-LABEL: 'stores_underaligned'
; GFX8-NEXT: Cost Model: Found an estimated cost of 12 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
@@ -675,6 +840,11 @@ define void @stores_underaligned(i32 %arg) {
; GFX8-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i32 poison, ptr poison, align 2
; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x i32> poison, ptr poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x i64> poison, ptr addrspace(3) poison, align 2
+; GFX8-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 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 8
+; 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 4 for instruction: store <4 x i32> poison, ptr poison, align 8
; GFX8-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-UNALIGNED-LABEL: 'stores_underaligned'
@@ -689,6 +859,11 @@ define void @stores_underaligned(i32 %arg) {
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 2
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 2
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 2
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(3) poison, align 2
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 poison, ptr poison, align 4
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
; GFX90A-UNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX90A-NOUNALIGNED-LABEL: 'stores_underaligned'
@@ -703,8 +878,32 @@ define void @stores_underaligned(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 2
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i32 poison, ptr poison, align 2
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x i32> poison, ptr poison, align 2
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x i64> poison, ptr addrspace(3) poison, align 2
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 poison, ptr poison, align 4
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_underaligned'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i32> poison, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> poison, ptr addrspace(5) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(3) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
+; GFX10-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 2 for instruction: store <3 x i32> poison, ptr addrspace(3) poison, align 4
@@ -717,6 +916,11 @@ define void @stores_underaligned(i32 %arg) {
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr addrspace(1) poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 poison, ptr poison, align 2
; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 2
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> poison, ptr addrspace(3) poison, align 2
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i64 poison, ptr poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <3 x i32> poison, ptr poison, align 8
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 4
+; GFX12-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> poison, ptr poison, align 8
; 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
@@ -730,6 +934,11 @@ define void @stores_underaligned(i32 %arg) {
store <4 x i32> poison, ptr addrspace(1) poison, align 2
store i32 poison, ptr poison, align 2
store <4 x i32> poison, ptr poison, align 2
+ store <2 x i64> poison, ptr addrspace(3) poison, align 2
+ store i64 poison, ptr poison, align 4
+ store <3 x i32> poison, ptr poison, align 8
+ store <4 x i32> poison, ptr poison, align 4
+ store <4 x i32> poison, ptr poison, align 8
ret void
}
@@ -756,6 +965,17 @@ define void @stores_13_to_15_bytes(i32 %arg) {
; GFX90A-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <7 x i16> poison, ptr addrspace(5) poison, align 16
; GFX90A-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_13_to_15_bytes'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <13 x i8> poison, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <7 x i16> poison, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <15 x i8> poison, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <13 x i8> poison, ptr addrspace(3) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <7 x i16> poison, ptr addrspace(3) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <15 x i8> poison, ptr addrspace(3) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 3 for instruction: store <7 x i16> poison, ptr poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <7 x i16> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_13_to_15_bytes'
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <13 x i8> poison, ptr addrspace(1) poison, align 16
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <7 x i16> poison, ptr addrspace(1) poison, align 16
@@ -824,6 +1044,21 @@ define void @stores_odd_widths(i32 %arg) {
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 6 for instruction: store <2 x i96> poison, ptr addrspace(5) poison, align 16
; GFX90A-NOUNALIGNED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
+; GFX10-LABEL: 'stores_odd_widths'
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i24 poison, ptr addrspace(1) poison, align 1
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i48 poison, ptr addrspace(1) poison, align 2
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i24 poison, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i48 poison, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i80 poison, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i112 poison, ptr addrspace(1) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <3 x i12> poison, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i24> poison, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 6 for instruction: store <3 x i24> poison, ptr addrspace(1) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i48> poison, ptr addrspace(1) poison, align 8
+; GFX10-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i24> poison, ptr addrspace(3) poison, align 4
+; GFX10-NEXT: Cost Model: Found an estimated cost of 6 for instruction: store <2 x i96> poison, ptr addrspace(5) poison, align 16
+; GFX10-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
+;
; GFX12-LABEL: 'stores_odd_widths'
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i24 poison, ptr addrspace(1) poison, align 1
; GFX12-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i48 poison, ptr addrspace(1) poison, align 2
More information about the llvm-branch-commits
mailing list