These are the R-format instructions in RV32I.
If an instruction doesn't have an associated encoding, use the standard TargetIsa hook to encode it. The test still fails if an instruction can't be encoded. There is no legalization step.
This makes it possible to write file tests that verify the binary encoding of machine code.