[llvm] [AMDGPU] Exclude CDNA-3 parts from cube instruction feature (PR #215484)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 11 01:20:08 PDT 2026


================
@@ -0,0 +1,97 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s -check-prefix=GFX900-SDAG
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck %s -check-prefix=GFX900-GISEL
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx908 < %s | FileCheck %s -check-prefix=GFX908-SDAG
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx908 < %s | FileCheck %s -check-prefix=GFX908-GISEL
+; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx90a < %s | FileCheck %s -check-prefix=GFX90A-SDAG
+; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx90a < %s | FileCheck %s -check-prefix=GFX90A-GISEL
+; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx940 < %s 2>&1 | FileCheck %s -check-prefix=NOCUBE
+; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx942 < %s 2>&1 | FileCheck %s -check-prefix=NOCUBE
+; RUN: not llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx950 < %s 2>&1 | FileCheck %s -check-prefix=NOCUBE
+
+; The v_cube* ALU is graphics-pipe hardware, absent on the CDNA-3 compute-only
+; parts (gfx940, gfx942, gfx950). It is present on gfx900 (consumer) and on
+; the earlier CDNA-1/2 parts (gfx908, gfx90a).
+; NOCUBE: error: {{.*}} llvm.amdgcn.cubeid requires target feature
----------------
aobolensk wrote:

Added checks for errors per intrinsic

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


More information about the llvm-commits mailing list