[llvm] [AMDGPU] Merge consecutive wait_alu instruction (PR #128916)

Nicolai Hähnle via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 10 09:24:01 PDT 2025


================
@@ -1780,6 +1800,22 @@ unsigned encodeFieldVaVcc(unsigned VaVcc) {
   return encodeFieldVaVcc(0xffff, VaVcc);
 }
 
+unsigned encodeFieldVaSsrc(unsigned Encoded, unsigned VaSsrc) {
+  return packBits(VaSsrc, Encoded, getVaSsrcBitShift(), getVaSsrcBitWidth());
+}
+
+unsigned encodeFieldVaSsrc(unsigned VaSsrc) {
+  return encodeFieldVaSsrc(0xfff, VaSsrc);
+}
+
+unsigned encodeFieldHoldCnt(unsigned Encoded, unsigned HoldCnt) {
+  return packBits(HoldCnt, Encoded, getHoldCntBitShift(), getHoldCntWidth());
+}
+
+unsigned encodeFieldHoldCnt(unsigned HoldCnt) {
+  return encodeFieldHoldCnt(0xfff, HoldCnt);
----------------
nhaehnle wrote:

Same here: 0xffff?

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


More information about the llvm-commits mailing list