[llvm] [AArch64] Test all cost kinds in clmul tests. NFC (PR #212246)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 27 06:20:04 PDT 2026
https://github.com/davemgreen created https://github.com/llvm/llvm-project/pull/212246
None
>From 826d2b76d607a15f0f39683bef877201e6067b14 Mon Sep 17 00:00:00 2001
From: David Green <david.green at arm.com>
Date: Mon, 27 Jul 2026 14:19:51 +0100
Subject: [PATCH] [AArch64] Test all cost kinds in clmul tests. NFC
---
.../Analysis/CostModel/AArch64/clmul-fixed.ll | 40 +++++------
.../CostModel/AArch64/clmul-scalable.ll | 72 +++++++++----------
llvm/test/Analysis/CostModel/AArch64/clmul.ll | 28 ++++----
3 files changed, 70 insertions(+), 70 deletions(-)
diff --git a/llvm/test/Analysis/CostModel/AArch64/clmul-fixed.ll b/llvm/test/Analysis/CostModel/AArch64/clmul-fixed.ll
index 706b16bef1628..7bdd4e449c1b4 100644
--- a/llvm/test/Analysis/CostModel/AArch64/clmul-fixed.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/clmul-fixed.ll
@@ -1,29 +1,29 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- | FileCheck %s --check-prefixes=NOAES
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+aes | FileCheck %s --check-prefixes=AES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- | FileCheck %s --check-prefixes=NOAES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+aes | FileCheck %s --check-prefixes=AES
define void @clmul_fixed() {
; NOAES-LABEL: 'clmul_fixed'
-; NOAES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <16 x i8> @llvm.clmul.v16i8(<16 x i8> poison, <16 x i8> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8_64 = call <8 x i8> @llvm.clmul.v8i8(<8 x i8> poison, <8 x i8> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 251 for instruction: %c64 = call <2 x i64> @llvm.clmul.v2i64(<2 x i64> poison, <2 x i64> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %c1 = call <1 x i64> @llvm.clmul.v1i64(<1 x i64> poison, <1 x i64> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %c32 = call <4 x i32> @llvm.clmul.v4i32(<4 x i32> poison, <4 x i32> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %c2 = call <2 x i32> @llvm.clmul.v2i32(<2 x i32> poison, <2 x i32> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c16 = call <4 x i16> @llvm.clmul.v4i16(<4 x i16> poison, <4 x i16> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c16x8 = call <8 x i16> @llvm.clmul.v8i16(<8 x i16> poison, <8 x i16> poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; NOAES-NEXT: Cost Model: Found costs of 1 for: %c8 = call <16 x i8> @llvm.clmul.v16i8(<16 x i8> poison, <16 x i8> poison)
+; NOAES-NEXT: Cost Model: Found costs of 1 for: %c8_64 = call <8 x i8> @llvm.clmul.v8i8(<8 x i8> poison, <8 x i8> poison)
+; NOAES-NEXT: Cost Model: Found costs of RThru:251 CodeSize:43 Lat:43 SizeLat:43 for: %c64 = call <2 x i64> @llvm.clmul.v2i64(<2 x i64> poison, <2 x i64> poison)
+; NOAES-NEXT: Cost Model: Found costs of 43 for: %c1 = call <1 x i64> @llvm.clmul.v1i64(<1 x i64> poison, <1 x i64> poison)
+; NOAES-NEXT: Cost Model: Found costs of 43 for: %c32 = call <4 x i32> @llvm.clmul.v4i32(<4 x i32> poison, <4 x i32> poison)
+; NOAES-NEXT: Cost Model: Found costs of 43 for: %c2 = call <2 x i32> @llvm.clmul.v2i32(<2 x i32> poison, <2 x i32> poison)
+; NOAES-NEXT: Cost Model: Found costs of 48 for: %c16 = call <4 x i16> @llvm.clmul.v4i16(<4 x i16> poison, <4 x i16> poison)
+; NOAES-NEXT: Cost Model: Found costs of 48 for: %c16x8 = call <8 x i16> @llvm.clmul.v8i16(<8 x i16> poison, <8 x i16> poison)
+; NOAES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; AES-LABEL: 'clmul_fixed'
-; AES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <16 x i8> @llvm.clmul.v16i8(<16 x i8> poison, <16 x i8> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8_64 = call <8 x i8> @llvm.clmul.v8i8(<8 x i8> poison, <8 x i8> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c64 = call <2 x i64> @llvm.clmul.v2i64(<2 x i64> poison, <2 x i64> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c1 = call <1 x i64> @llvm.clmul.v1i64(<1 x i64> poison, <1 x i64> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 11 for instruction: %c32 = call <4 x i32> @llvm.clmul.v4i32(<4 x i32> poison, <4 x i32> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c2 = call <2 x i32> @llvm.clmul.v2i32(<2 x i32> poison, <2 x i32> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c16 = call <4 x i16> @llvm.clmul.v4i16(<4 x i16> poison, <4 x i16> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c16x8 = call <8 x i16> @llvm.clmul.v8i16(<8 x i16> poison, <8 x i16> poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; AES-NEXT: Cost Model: Found costs of 1 for: %c8 = call <16 x i8> @llvm.clmul.v16i8(<16 x i8> poison, <16 x i8> poison)
+; AES-NEXT: Cost Model: Found costs of 1 for: %c8_64 = call <8 x i8> @llvm.clmul.v8i8(<8 x i8> poison, <8 x i8> poison)
+; AES-NEXT: Cost Model: Found costs of 3 for: %c64 = call <2 x i64> @llvm.clmul.v2i64(<2 x i64> poison, <2 x i64> poison)
+; AES-NEXT: Cost Model: Found costs of 1 for: %c1 = call <1 x i64> @llvm.clmul.v1i64(<1 x i64> poison, <1 x i64> poison)
+; AES-NEXT: Cost Model: Found costs of 11 for: %c32 = call <4 x i32> @llvm.clmul.v4i32(<4 x i32> poison, <4 x i32> poison)
+; AES-NEXT: Cost Model: Found costs of 6 for: %c2 = call <2 x i32> @llvm.clmul.v2i32(<2 x i32> poison, <2 x i32> poison)
+; AES-NEXT: Cost Model: Found costs of 14 for: %c16 = call <4 x i16> @llvm.clmul.v4i16(<4 x i16> poison, <4 x i16> poison)
+; AES-NEXT: Cost Model: Found costs of 48 for: %c16x8 = call <8 x i16> @llvm.clmul.v8i16(<8 x i16> poison, <8 x i16> poison)
+; AES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%c8 = call <16 x i8> @llvm.clmul.v16i8(<16 x i8> poison, <16 x i8> poison)
%c8_64 = call <8 x i8> @llvm.clmul.v8i8(<8 x i8> poison, <8 x i8> poison)
diff --git a/llvm/test/Analysis/CostModel/AArch64/clmul-scalable.ll b/llvm/test/Analysis/CostModel/AArch64/clmul-scalable.ll
index b8df50e351fa4..feeaae8daa53c 100644
--- a/llvm/test/Analysis/CostModel/AArch64/clmul-scalable.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/clmul-scalable.ll
@@ -1,53 +1,53 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve | FileCheck %s --check-prefix=SVE
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve,+sve-aes | FileCheck %s --check-prefix=SVE-AES
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sme -force-streaming | FileCheck %s --check-prefix=SME-STREAMING
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sme,ssve-aes -force-streaming | FileCheck %s --check-prefix=SME-STREAMING-SSVE-AES
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve2 | FileCheck %s --check-prefix=SVE2
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve2,+sve-aes | FileCheck %s --check-prefix=SVE2AES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve | FileCheck %s --check-prefix=SVE
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve,+sve-aes | FileCheck %s --check-prefix=SVE-AES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sme -force-streaming | FileCheck %s --check-prefix=SME-STREAMING
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sme,ssve-aes -force-streaming | FileCheck %s --check-prefix=SME-STREAMING-SSVE-AES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve2 | FileCheck %s --check-prefix=SVE2
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+sve2,+sve-aes | FileCheck %s --check-prefix=SVE2AES
define void @clmul_scalable() {
; SVE-LABEL: 'clmul_scalable'
-; SVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SVE-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SVE-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SVE-NEXT: Cost Model: Found costs of 24 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SVE-NEXT: Cost Model: Found costs of 48 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SVE-NEXT: Cost Model: Found costs of 43 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SVE-NEXT: Cost Model: Found costs of 192 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SVE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; SVE-AES-LABEL: 'clmul_scalable'
-; SVE-AES-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SVE-AES-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SVE-AES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SVE-AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SVE-AES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SVE-AES-NEXT: Cost Model: Found costs of 24 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SVE-AES-NEXT: Cost Model: Found costs of 48 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SVE-AES-NEXT: Cost Model: Found costs of 43 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SVE-AES-NEXT: Cost Model: Found costs of 3 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SVE-AES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; SME-STREAMING-LABEL: 'clmul_scalable'
-; SME-STREAMING-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SME-STREAMING-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SME-STREAMING-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SME-STREAMING-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SME-STREAMING-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SME-STREAMING-NEXT: Cost Model: Found costs of 1 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SME-STREAMING-NEXT: Cost Model: Found costs of 6 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SME-STREAMING-NEXT: Cost Model: Found costs of 3 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SME-STREAMING-NEXT: Cost Model: Found costs of 8 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SME-STREAMING-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; SME-STREAMING-SSVE-AES-LABEL: 'clmul_scalable'
-; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found costs of 1 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found costs of 6 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found costs of 3 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found costs of 3 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SME-STREAMING-SSVE-AES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; SVE2-LABEL: 'clmul_scalable'
-; SVE2-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SVE2-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SVE2-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SVE2-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SVE2-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SVE2-NEXT: Cost Model: Found costs of 1 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SVE2-NEXT: Cost Model: Found costs of 6 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SVE2-NEXT: Cost Model: Found costs of 3 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SVE2-NEXT: Cost Model: Found costs of 8 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SVE2-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; SVE2AES-LABEL: 'clmul_scalable'
-; SVE2AES-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
-; SVE2AES-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
-; SVE2AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
-; SVE2AES-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
-; SVE2AES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; SVE2AES-NEXT: Cost Model: Found costs of 1 for: %c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
+; SVE2AES-NEXT: Cost Model: Found costs of 6 for: %c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
+; SVE2AES-NEXT: Cost Model: Found costs of 3 for: %c32 = call <vscale x 4 x i32> @llvm.clmul.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> poison)
+; SVE2AES-NEXT: Cost Model: Found costs of 3 for: %c64 = call <vscale x 2 x i64> @llvm.clmul.nxv2i64(<vscale x 2 x i64> poison, <vscale x 2 x i64> poison)
+; SVE2AES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%c8 = call <vscale x 16 x i8> @llvm.clmul.nxv16i8(<vscale x 16 x i8> poison, <vscale x 16 x i8> poison)
%c16 = call <vscale x 8 x i16> @llvm.clmul.nxv8i16(<vscale x 8 x i16> poison, <vscale x 8 x i16> poison)
diff --git a/llvm/test/Analysis/CostModel/AArch64/clmul.ll b/llvm/test/Analysis/CostModel/AArch64/clmul.ll
index 7d76731cd191c..b6b38ccfacf7d 100644
--- a/llvm/test/Analysis/CostModel/AArch64/clmul.ll
+++ b/llvm/test/Analysis/CostModel/AArch64/clmul.ll
@@ -1,24 +1,24 @@
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- | FileCheck %s --check-prefixes=NOAES
-; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=aarch64-- -mattr=+aes | FileCheck %s --check-prefixes=AES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- | FileCheck %s --check-prefixes=NOAES
+; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64-- -mattr=+aes | FileCheck %s --check-prefixes=AES
define void @clmul() {
;
; NOAES-LABEL: 'clmul'
-; NOAES-NEXT: Cost Model: Found an estimated cost of 768 for instruction: %call_i128 = call i128 @llvm.clmul.i128(i128 poison, i128 poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %call_i64 = call i64 @llvm.clmul.i64(i64 poison, i64 poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 43 for instruction: %call_i32 = call i32 @llvm.clmul.i32(i32 poison, i32 poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %call_i16 = call i16 @llvm.clmul.i16(i16 poison, i16 poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %call_i8 = call i8 @llvm.clmul.i8(i8 poison, i8 poison)
-; NOAES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; NOAES-NEXT: Cost Model: Found costs of RThru:768 CodeSize:384 Lat:384 SizeLat:384 for: %call_i128 = call i128 @llvm.clmul.i128(i128 poison, i128 poison)
+; NOAES-NEXT: Cost Model: Found costs of 43 for: %call_i64 = call i64 @llvm.clmul.i64(i64 poison, i64 poison)
+; NOAES-NEXT: Cost Model: Found costs of 43 for: %call_i32 = call i32 @llvm.clmul.i32(i32 poison, i32 poison)
+; NOAES-NEXT: Cost Model: Found costs of 48 for: %call_i16 = call i16 @llvm.clmul.i16(i16 poison, i16 poison)
+; NOAES-NEXT: Cost Model: Found costs of RThru:7 CodeSize:4 Lat:7 SizeLat:7 for: %call_i8 = call i8 @llvm.clmul.i8(i8 poison, i8 poison)
+; NOAES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; AES-LABEL: 'clmul'
-; AES-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %call_i128 = call i128 @llvm.clmul.i128(i128 poison, i128 poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %call_i64 = call i64 @llvm.clmul.i64(i64 poison, i64 poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %call_i32 = call i32 @llvm.clmul.i32(i32 poison, i32 poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %call_i16 = call i16 @llvm.clmul.i16(i16 poison, i16 poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %call_i8 = call i8 @llvm.clmul.i8(i8 poison, i8 poison)
-; AES-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
+; AES-NEXT: Cost Model: Found costs of RThru:14 CodeSize:8 Lat:14 SizeLat:14 for: %call_i128 = call i128 @llvm.clmul.i128(i128 poison, i128 poison)
+; AES-NEXT: Cost Model: Found costs of RThru:7 CodeSize:4 Lat:7 SizeLat:7 for: %call_i64 = call i64 @llvm.clmul.i64(i64 poison, i64 poison)
+; AES-NEXT: Cost Model: Found costs of RThru:7 CodeSize:4 Lat:7 SizeLat:7 for: %call_i32 = call i32 @llvm.clmul.i32(i32 poison, i32 poison)
+; AES-NEXT: Cost Model: Found costs of RThru:7 CodeSize:4 Lat:7 SizeLat:7 for: %call_i16 = call i16 @llvm.clmul.i16(i16 poison, i16 poison)
+; AES-NEXT: Cost Model: Found costs of RThru:7 CodeSize:4 Lat:7 SizeLat:7 for: %call_i8 = call i8 @llvm.clmul.i8(i8 poison, i8 poison)
+; AES-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%call_i128 = call i128 @llvm.clmul.i128(i128 poison, i128 poison)
%call_i64 = call i64 @llvm.clmul.i64(i64 poison, i64 poison)
More information about the llvm-commits
mailing list