[llvm] 7c7ce0b - [AMDGPU] Remove useless aliases for FLAT instructions. NFC. (#87462)

via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 02:17:30 PDT 2024


Author: Jay Foad
Date: 2024-04-03T10:17:25+01:00
New Revision: 7c7ce0b9b1cef51e24f2dc7e904a8adf6aaf1abf

URL: https://github.com/llvm/llvm-project/commit/7c7ce0b9b1cef51e24f2dc7e904a8adf6aaf1abf
DIFF: https://github.com/llvm/llvm-project/commit/7c7ce0b9b1cef51e24f2dc7e904a8adf6aaf1abf.diff

LOG: [AMDGPU] Remove useless aliases for FLAT instructions. NFC. (#87462)

We were generating "" (the empty string) as an alias for a bunch of FLAT
instructions, which had no effect except to cause tablegen to generate
some very long if-else chains in the generate AsmMatcher.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/FLATInstructions.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/FLATInstructions.td b/llvm/lib/Target/AMDGPU/FLATInstructions.td
index d017ec4a741510..27d5616565f264 100644
--- a/llvm/lib/Target/AMDGPU/FLATInstructions.td
+++ b/llvm/lib/Target/AMDGPU/FLATInstructions.td
@@ -2558,7 +2558,7 @@ multiclass VFLAT_Real_Base_gfx12<bits<8> op,
 
 multiclass VFLAT_Real_Atomics_gfx12<bits<8> op,
                                     string name = get_FLAT_ps<NAME>.Mnemonic,
-                                    string alias = ""> :
+                                    string alias = name> :
   VFLAT_Real_Base_gfx12<op, name, alias> {
   defm _RTN : VFLAT_Real_gfx12<op, name>;
 }
@@ -2581,7 +2581,7 @@ multiclass VGLOBAL_Real_AllAddr_gfx12_w64<bits<8> op,
 
 multiclass VGLOBAL_Real_Atomics_gfx12<bits<8> op,
                                       string name = get_FLAT_ps<NAME>.Mnemonic,
-                                      string alias = ""> :
+                                      string alias = name> :
   VGLOBAL_Real_AllAddr_gfx12<op, name, alias> {
   defm _RTN : VFLAT_Real_gfx12<op, name>;
   defm _SADDR_RTN : VFLAT_Real_gfx12<op, name>;


        


More information about the llvm-commits mailing list