Skip to content

Commit c8e6d68

Browse files
committed
[AMDGPU] Use subreg encoding instead of reassign
The HWEncoding for these 64 bit registers should be the same as as the encoding for the previously defined low halves of the registers. So reuse that value instead of repeating the assignment. NFC. Reviewed By: foad Differential Revision: https://reviews.llvm.org/D121391
1 parent 11407c5 commit c8e6d68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Target/AMDGPU/SIRegisterInfo.td

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def PC_REG : SIReg<"pc", 0>, DwarfRegNum<[16, 16]> {
189189
def VCC : RegisterWithSubRegs<"vcc", [VCC_LO, VCC_HI]> {
190190
let Namespace = "AMDGPU";
191191
let SubRegIndices = [sub0, sub1];
192-
let HWEncoding = 106;
192+
let HWEncoding = VCC_LO.HWEncoding;
193193
}
194194

195195
defm EXEC_LO : SIRegLoHi16<"exec_lo", 126>, DwarfRegNum<[1, 1]>;
@@ -198,7 +198,7 @@ defm EXEC_HI : SIRegLoHi16<"exec_hi", 127>;
198198
def EXEC : RegisterWithSubRegs<"exec", [EXEC_LO, EXEC_HI]>, DwarfRegNum<[17, 1]> {
199199
let Namespace = "AMDGPU";
200200
let SubRegIndices = [sub0, sub1];
201-
let HWEncoding = 126;
201+
let HWEncoding = EXEC_LO.HWEncoding;
202202
}
203203

204204
// 32-bit real registers, for MC only.
@@ -237,7 +237,7 @@ def XNACK_MASK :
237237
RegisterWithSubRegs<"xnack_mask", [XNACK_MASK_LO, XNACK_MASK_HI]> {
238238
let Namespace = "AMDGPU";
239239
let SubRegIndices = [sub0, sub1];
240-
let HWEncoding = 104;
240+
let HWEncoding = XNACK_MASK_LO.HWEncoding;
241241
}
242242

243243
// Trap handler registers
@@ -247,7 +247,7 @@ defm TBA_HI : SIRegLoHi16<"tba_hi", 109>;
247247
def TBA : RegisterWithSubRegs<"tba", [TBA_LO, TBA_HI]> {
248248
let Namespace = "AMDGPU";
249249
let SubRegIndices = [sub0, sub1];
250-
let HWEncoding = 108;
250+
let HWEncoding = TBA_LO.HWEncoding;
251251
}
252252

253253
defm TMA_LO : SIRegLoHi16<"tma_lo", 110>;
@@ -256,7 +256,7 @@ defm TMA_HI : SIRegLoHi16<"tma_hi", 111>;
256256
def TMA : RegisterWithSubRegs<"tma", [TMA_LO, TMA_HI]> {
257257
let Namespace = "AMDGPU";
258258
let SubRegIndices = [sub0, sub1];
259-
let HWEncoding = 110;
259+
let HWEncoding = TMA_LO.HWEncoding;
260260
}
261261

262262
foreach Index = 0...15 in {

0 commit comments

Comments
 (0)