Skip to content

Commit ae9fcd6

Browse files
committed
fixup! Add comment
1 parent 451e58a commit ae9fcd6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/RISCV/RISCVRegisterInfo.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ def sub_gpr_odd : SubRegIndex<32, 32> {
8282
// instructions.
8383

8484
let RegAltNameIndices = [ABIRegAltName] in {
85+
// 16-bit sub-registers for use by Zhinx. Having a 16-bit sub-register reduces
86+
// the spill size for these operations.
8587
let isConstant = true in
8688
def X0_H : RISCVReg<0, "x0", ["zero"]>;
8789
let CostPerUse = [0, 1] in {
@@ -605,6 +607,7 @@ def VRM8NoV0 : VReg<VM8VTs, (sub VRM8, V0M8), 8>;
605607

606608
def VMV0 : VReg<VMaskVTs, (add V0), 1>;
607609

610+
// 16-bit GPR sub-register class used by Zhinx instructions.
608611
def GPRF16 : RISCVRegisterClass<[f16], 16, (add (sequence "X%u_H", 10, 17),
609612
(sequence "X%u_H", 5, 7),
610613
(sequence "X%u_H", 28, 31),

0 commit comments

Comments
 (0)