@@ -20,24 +20,34 @@ class AArch64Reg<bits<16> enc, string n, list<Register> subregs = [],
20
20
21
21
let Namespace = "AArch64" in {
22
22
// SubRegIndexes for GPR registers
23
- def sub_32 : SubRegIndex<32, 0>;
24
- def sub_32_hi: SubRegIndex<32, 32>;
23
+ def sub_32 : SubRegIndex<32>;
25
24
def sube64 : SubRegIndex<64>;
26
25
def subo64 : SubRegIndex<64>;
27
26
def sube32 : SubRegIndex<32>;
28
27
def subo32 : SubRegIndex<32>;
29
28
30
29
// SubRegIndexes for FPR/Vector registers
31
30
def bsub : SubRegIndex<8, 0>;
32
- def bsub_hi : SubRegIndex<8, 8>;
33
31
def hsub : SubRegIndex<16, 0>;
34
- def hsub_hi : SubRegIndex<16, 16>;
35
32
def ssub : SubRegIndex<32, 0>;
36
- def ssub_hi : SubRegIndex<32, 32>;
37
33
def dsub : SubRegIndex<64, 0>;
38
- def dsub_hi : SubRegIndex<64, 64>;
39
34
def zsub : SubRegIndex<128, 0>;
40
- def zsub_hi : SubRegIndex<-1, 128>;
35
+
36
+ // The _hi SubRegIndexes describe the high bits of a register which are not
37
+ // separately addressable. They need to be described so that partially
38
+ // overlapping registers end up with a different lane mask. This is required
39
+ // to enable subreg liveness tracking.
40
+ //
41
+ // For example: 8-bit B0 is a sub-register of 16-bit H0.
42
+ // * B0 is described with 'bsub'.
43
+ // * H0 is described with 'bsub + bsub_hi' == 'hsub'.
44
+ def bsub_hi : SubRegIndex<8, 8>;
45
+ def hsub_hi : SubRegIndex<16, 16>;
46
+ def ssub_hi : SubRegIndex<32, 32>;
47
+ def dsub_hi : SubRegIndex<64, 64>;
48
+ def zsub_hi : SubRegIndex<-1, 128>;
49
+ // sub_32_hi describes the top 32 bits in e.g. X0
50
+ def sub_32_hi : SubRegIndex<32, 32>;
41
51
// Note: Code depends on these having consecutive numbers
42
52
def zsub0 : SubRegIndex<-1>;
43
53
def zsub1 : SubRegIndex<-1>;
0 commit comments