[llvm] [NFC][AMDGPU] Use target features to guard WMMA intrinsics (PR #217681)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 09:53:27 PDT 2026
================
@@ -0,0 +1,57 @@
+; RUN: split-file %s %t
+;
+; RUN: not llc -global-isel=0 -mtriple=amdgpu9.50 -filetype=null < %t/wmma-256b-or-128b.ll 2>&1 | FileCheck --check-prefix=WMMA-256B-OR-128B %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu9.50 -filetype=null < %t/wmma-256b-or-128b.ll 2>&1 | FileCheck --check-prefix=WMMA-256B-OR-128B %s
+; RUN: not llc -global-isel=0 -mtriple=amdgpu11.70 -filetype=null < %t/wmma-256b.ll 2>&1 | FileCheck --check-prefix=WMMA-256B %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu11.70 -filetype=null < %t/wmma-256b.ll 2>&1 | FileCheck --check-prefix=WMMA-256B %s
+; RUN: not llc -global-isel=0 -mtriple=amdgpu11.00 -filetype=null < %t/wmma-128b.ll 2>&1 | FileCheck --check-prefix=WMMA-128B %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu11.00 -filetype=null < %t/wmma-128b.ll 2>&1 | FileCheck --check-prefix=WMMA-128B %s
+; RUN: not llc -global-isel=0 -mtriple=amdgpu12.00 -filetype=null < %t/gfx1250.ll 2>&1 | FileCheck --check-prefix=GFX1250 %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu12.00 -filetype=null < %t/gfx1250.ll 2>&1 | FileCheck --check-prefix=GFX1250 %s
+; RUN: not llc -global-isel=0 -mtriple=amdgpu12.00 -filetype=null < %t/wmma-n16.ll 2>&1 | FileCheck --check-prefix=WMMA-N16 %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu12.00 -filetype=null < %t/wmma-n16.ll 2>&1 | FileCheck --check-prefix=WMMA-N16 %s
+; RUN: not llc -global-isel=0 -mtriple=amdgpu12.50 -filetype=null < %t/gfx1251-gemm.ll 2>&1 | FileCheck --check-prefix=GFX1251-GEMM %s
+; RUN: not llc -global-isel=1 -mtriple=amdgpu12.50 -filetype=null < %t/gfx1251-gemm.ll 2>&1 | FileCheck --check-prefix=GFX1251-GEMM %s
+;
+; WMMA-256B: llvm.amdgcn.wmma.f16.16x16x16.f16.tied requires target feature 'wmma-256b-insts'
+; WMMA-256B-OR-128B: llvm.amdgcn.wmma.f32.16x16x16.f16 requires target feature 'wmma-256b-insts|wmma-128b-insts'
+; WMMA-128B: llvm.amdgcn.wmma.f32.16x16x16.fp8.fp8 requires target feature 'wmma-128b-insts'
+; GFX1250: llvm.amdgcn.wmma.f32.16x16x4.f32 requires target feature 'gfx1250-insts'
+; GFX1251-GEMM: llvm.amdgcn.wmma.f64.16x16x4.f64 requires target feature 'gfx1251-gemm-insts'
+; WMMA-N16: llvm.amdgcn.wmma.f32.16x16x32.bf16 requires target feature 'wmma-n16-insts'
+
+;--- wmma-256b.ll
----------------
arsenm wrote:
that's a bug, it should proceed through on these errors
https://github.com/llvm/llvm-project/pull/217681
More information about the llvm-commits
mailing list