Skip to content

Commit 562a8c9

Browse files
committed
Add description to ArtificialSubregs.td test file
1 parent 3cfdc3f commit 562a8c9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

llvm/test/TableGen/ArtificialSubregs.td

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
// RUN: llvm-tblgen -gen-register-info -register-info-debug -I %p/../../include %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK
22
include "llvm/Target/Target.td"
33

4+
// This file tests that when using `isArtificial` for subregisters in
5+
// combination with `CoveredBySubRegs`, that TableGen infers the
6+
// correct register classes, subregisters and lane masks, especially
7+
// when the registers (that consist partially from artificial subregs)
8+
// are used in tuples.
9+
//
10+
// The register hierarchy that this test implements is:
11+
//
12+
// ssub_hi ssub
13+
// \ /
14+
// dsub
15+
// dsub_hi /
16+
// \ /
17+
// qsub
18+
//
19+
// Where the _hi parts are artificial and where ubregs ssub, dsub and qsub
20+
// are all addressable as real registers.
21+
//
22+
// These are then used in {S0, S1, S2}, {D0, D1, D2} and {Q0, Q1, Q2},
23+
// from which tuples are created.
24+
425
class MyReg<string n, list<Register> subregs = []>
526
: Register<n> {
627
let Namespace = "Test";

0 commit comments

Comments
 (0)