[llvm] 9214e51 - [AMDGPU] Simplify GFX10+ FLAT saddr field definition
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 15 06:11:16 PDT 2024
Author: Jay Foad
Date: 2024-03-15T13:09:16Z
New Revision: 9214e51925d202fd8463535d75f144b81173dd73
URL: https://github.com/llvm/llvm-project/commit/9214e51925d202fd8463535d75f144b81173dd73
DIFF: https://github.com/llvm/llvm-project/commit/9214e51925d202fd8463535d75f144b81173dd73.diff
LOG: [AMDGPU] Simplify GFX10+ FLAT saddr field definition
On GFX10+ has_saddr is effectively always true so there is no need to
test it.
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 3ed74354242664..59475449256455 100644
--- a/llvm/lib/Target/AMDGPU/FLATInstructions.td
+++ b/llvm/lib/Target/AMDGPU/FLATInstructions.td
@@ -174,7 +174,7 @@ class VFLAT_Real <bits<8> op, FLAT_Pseudo ps, string opName = ps.Mnemonic> :
bits<8> vaddr;
bits<24> offset;
- let Inst{6-0} = !if(ps.has_saddr, !if(ps.enabled_saddr, saddr, 0x7f), 0);
+ let Inst{6-0} = !if(ps.enabled_saddr, saddr, 0x7f);
let Inst{21-14} = op;
let Inst{31-26} = 0x3b;
let Inst{39-32} = !if(ps.has_vdst, vdst, ?);
@@ -2115,7 +2115,7 @@ class FLAT_Real_gfx10<bits<7> op, FLAT_Pseudo ps> :
let Inst{11-0} = offset{11-0};
let Inst{12} = !if(ps.has_dlc, cpol{CPolBit.DLC}, ps.dlcValue);
- let Inst{54-48} = !if(ps.has_saddr, !if(ps.enabled_saddr, saddr, 0x7d), 0x7d);
+ let Inst{54-48} = !if(ps.enabled_saddr, saddr, 0x7d);
let Inst{55} = 0;
}
More information about the llvm-commits
mailing list