Skip to content

Commit 9214e51

Browse files
committed
[AMDGPU] Simplify GFX10+ FLAT saddr field definition
On GFX10+ has_saddr is effectively always true so there is no need to test it.
1 parent 0bcec96 commit 9214e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AMDGPU/FLATInstructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class VFLAT_Real <bits<8> op, FLAT_Pseudo ps, string opName = ps.Mnemonic> :
174174
bits<8> vaddr;
175175
bits<24> offset;
176176

177-
let Inst{6-0} = !if(ps.has_saddr, !if(ps.enabled_saddr, saddr, 0x7f), 0);
177+
let Inst{6-0} = !if(ps.enabled_saddr, saddr, 0x7f);
178178
let Inst{21-14} = op;
179179
let Inst{31-26} = 0x3b;
180180
let Inst{39-32} = !if(ps.has_vdst, vdst, ?);
@@ -2115,7 +2115,7 @@ class FLAT_Real_gfx10<bits<7> op, FLAT_Pseudo ps> :
21152115

21162116
let Inst{11-0} = offset{11-0};
21172117
let Inst{12} = !if(ps.has_dlc, cpol{CPolBit.DLC}, ps.dlcValue);
2118-
let Inst{54-48} = !if(ps.has_saddr, !if(ps.enabled_saddr, saddr, 0x7d), 0x7d);
2118+
let Inst{54-48} = !if(ps.enabled_saddr, saddr, 0x7d);
21192119
let Inst{55} = 0;
21202120
}
21212121

0 commit comments

Comments
 (0)