[llvm] [AMDGPU] Remove unnecessary predicates from aliases. NFC. (PR #91602)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu May 9 07:49:19 PDT 2024


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

So long as the target of the alias is predicated with HasImageInsts or
similar, the alias itself does not need this predicate.


>From 7be98ae679e368b2a03283c7934cdd7d746ab221 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Thu, 9 May 2024 15:47:24 +0100
Subject: [PATCH] [AMDGPU] Remove unnecessary predicates from aliases. NFC.

So long as the target of the alias is predicated with HasImageInsts or
similar, the alias itself does not need this predicate.
---
 llvm/lib/Target/AMDGPU/EXPInstructions.td  | 2 +-
 llvm/lib/Target/AMDGPU/MIMGInstructions.td | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/lib/Target/AMDGPU/EXPInstructions.td b/llvm/lib/Target/AMDGPU/EXPInstructions.td
index b73b83031af0d..9bfbd1405ba6c 100644
--- a/llvm/lib/Target/AMDGPU/EXPInstructions.td
+++ b/llvm/lib/Target/AMDGPU/EXPInstructions.td
@@ -117,7 +117,7 @@ multiclass EXP_Real_gfx11 {
 multiclass VEXPORT_Real_gfx12 {
   defvar ps = !cast<EXP_Pseudo>(NAME);
   def _gfx12 : EXP_Real_Row<ps, SIEncodingFamily.GFX12, "export">,
-    EXPe_Row, MnemonicAlias<"exp", "export">, Requires<[isGFX12Plus, HasExportInsts]> {
+    EXPe_Row, MnemonicAlias<"exp", "export">, Requires<[isGFX12Plus]> {
     let AssemblerPredicate = isGFX12Only;
     let DecoderNamespace = "GFX12";
     let row = ps.row;
diff --git a/llvm/lib/Target/AMDGPU/MIMGInstructions.td b/llvm/lib/Target/AMDGPU/MIMGInstructions.td
index 23e8be0d5e45e..73a64a8c949e1 100644
--- a/llvm/lib/Target/AMDGPU/MIMGInstructions.td
+++ b/llvm/lib/Target/AMDGPU/MIMGInstructions.td
@@ -967,7 +967,7 @@ class VIMAGE_Atomic_gfx12_Renamed<mimgopc op, string opcode, string renamed,
                                   RegisterClass DataRC, int num_addrs,
                                   bit enableDisasm = 0>
    : VIMAGE_Atomic_gfx12<op, renamed, DataRC, num_addrs, enableDisasm>,
-     MnemonicAlias<opcode, renamed>, Requires<[isGFX12Plus, HasImageInsts]>;
+     MnemonicAlias<opcode, renamed>, Requires<[isGFX12Plus]>;
 
 multiclass MIMG_Atomic_Addr_Helper_m <mimgopc op, string asm,
                                       RegisterClass data_rc,



More information about the llvm-commits mailing list