[llvm] [AMDGPU] Select the GFX80 encoding family from the subtarget. NFCI. (PR #219190)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 04:50:47 PDT 2026


================
@@ -10814,6 +10813,12 @@ int SIInstrInfo::pseudoToMCOpcode(int Opcode) const {
 
   int32_t MCOp = AMDGPU::getMCOpcode(Opcode, Gen);
 
+  // Only buffer instructions with unpacked D16 data have a GFX80 encoding.
+  // Anything else on such a subtarget uses the plain VI encoding.
+  // TODO: remove this when we discard GFX80 encoding.
+  if (MCOp == AMDGPU::INSTRUCTION_LIST_END && Gen == SIEncodingFamily::GFX80)
+    MCOp = AMDGPU::getMCOpcode(Opcode, SIEncodingFamily::VI);
+
----------------
jayfoad wrote:

In future I hope to encode this kind of fallback directly into the getMCOpcodeGen table itself, so this code would go away again.

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


More information about the llvm-commits mailing list