This patch adds minimal support for lowering an read.register intrinsic with vlenb as the argument. Note that vlenb is an implementation constant, so it is never allocatable.
This was split off a patch to eventually replace PseudoReadVLENB with a COPY MI because doing so revealed a couple of optimization opportunities which really seemed to warrant individual patches and tests. To write those patches, I need a way to write the tests involving vlenb, and read.register seemed like the right testing hook.
A couple notes for reviewers on oddities (things we should maybe fix infrastructure in other patches):
- InstrEmitter will crash when lowering a copy from a physical register if that physical register is not a member of some register class. I didn't study the code closely, but on the surface this seems odd. I worked around this by adding a dummy register class, and assuming others agree, will use it's removal as the test for a change to InstrEmitter.
- I couldn't figure out a robust way to translate from CSR register defs to the sysreg number. Oddly, getName() on VLENB returns EH_LABEL? I suspect we have something missing elsewhere.