[llvm] [AMDGPU] Remove GFX12 encoding hack (PR #78702)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 03:46:00 PST 2024


https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/78702

This is no longer needed now that we have implemented GFX12 encoding for
all instructions.


>From 5ceeae02132f095418c9cda06ec7a894c217d6b7 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Fri, 19 Jan 2024 11:36:27 +0000
Subject: [PATCH] [AMDGPU] Remove GFX12 encoding hack

This is no longer needed now that we have implemented GFX12 encoding for
all instructions.
---
 llvm/lib/Target/AMDGPU/SIInstrInfo.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index 48fdb803e9d734..5a9401103da822 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -9136,12 +9136,6 @@ int SIInstrInfo::pseudoToMCOpcode(int Opcode) const {
 
   int MCOp = AMDGPU::getMCOpcode(Opcode, Gen);
 
-  // TODO-GFX12: Remove this.
-  // Hack to allow some GFX12 codegen tests to run before all the encodings are
-  // implemented.
-  if (MCOp == (uint16_t)-1 && Gen == SIEncodingFamily::GFX12)
-    MCOp = AMDGPU::getMCOpcode(Opcode, SIEncodingFamily::GFX11);
-
   // -1 means that Opcode is already a native instruction.
   if (MCOp == -1)
     return Opcode;



More information about the llvm-commits mailing list