[llvm] [NFC][AMDGPU] Add cost tests for narrow integer to fp casts (PR #225341)

Dmitry Sidorov via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 08:53:55 PDT 2026


================
@@ -0,0 +1,241 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "instruction:.*itofp" --version 6
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu6.01-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=NO16BIT
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu8.03-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=NOGFX9
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=SDWA
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.00-amd-amdhsa -mattr=-sdwa < %s 2>&1 | FileCheck %s --check-prefixes=PACKED
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu11.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=PACKED
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=SDWA-BF16
+; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=PACKED-BF16
+; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu6.01-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=NO16BIT
+; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=SDWA
+
+; The RUN lines vary 16 bit instructions, SDWA, gfx9 instructions and the native bf16 conversion.
----------------
MrSidims wrote:

Agree, renamed

https://github.com/llvm/llvm-project/pull/225341


More information about the llvm-commits mailing list