[PATCH] D144033: [AMDGPU][MC][GFX11] Add partial NSA format for image sample instructions

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 04:04:14 PST 2023


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!

Hopefully @critson has taken a look and is happy too :)



================
Comment at: llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp:1947-1952
+  auto Version = getIsaVersion(STI.getCPU());
+  if (Version.Major == 10)
+    return Version.Minor == 3 ? 13 : 5;
+  if (Version.Major == 11)
+    return 5;
+  return 0;
----------------
mbrkusanin wrote:
> or
> 
> ```
>   if (isGFX10(STI))
>     return hasGFX10_3Insts(STI) ? 13 : 5;
>   if (isGFX11(STI))
>     return 5;
>   return 0;
> ```
> 
> 
Either way is fine. But it should probably be `Version.Minor >= 3` just in case someone invents GFX 10.4.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144033/new/

https://reviews.llvm.org/D144033



More information about the llvm-commits mailing list