[lld] [llvm] [flang] [clang] [AMDGPU] Introduce GFX9/10.1/10.3/11 Generic Targets (PR #76955)

Konstantin Zhuravlyov via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 17 07:03:07 PST 2024


================
@@ -253,6 +274,12 @@ AMDGPU::IsaVersion AMDGPU::getIsaVersion(StringRef GPU) {
   case GK_GFX1151: return {11, 5, 1};
   case GK_GFX1200: return {12, 0, 0};
   case GK_GFX1201: return {12, 0, 1};
+
+  // Generic targets use the earliest ISA version in their group.
----------------
kzhuravl wrote:

Should it use something else instead of the earliest ISA version? I am not sure what it would be, but it feels uneasy for some reason.

If we leave it "as is", can this be misused? E.g. getIsaVersion will return {9,0,0} for gfx9-generic, which got the madmix instructions, which is not in {9,0,4}.

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


More information about the cfe-commits mailing list