[llvm] [AMDGPU] Introduce custom MIR formatting for s_wait_alu (PR #176316)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 30 08:43:46 PST 2026


================
@@ -177,7 +177,14 @@ inline unsigned getVaSsrcBitWidth() { return 1; }
 inline unsigned getVaSsrcBitShift() { return 8; }
 
 /// \returns HoldCnt bit shift
-inline unsigned getHoldCntWidth() { return 1; }
+inline unsigned getHoldCntWidth(unsigned VersionMajor, unsigned VersionMinor) {
+  static constexpr const unsigned MinMajor = 10;
+  static constexpr const unsigned MinMinor = 3;
+  return (VersionMajor == MinMajor && VersionMinor >= MinMinor) ||
----------------
jayfoad wrote:

Nit: could perhaps do something clever with `std::tie(Major, Minor) >= ...`?

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


More information about the llvm-commits mailing list