It's currently possible for the AArch64 outliner to mark instructions that use w30 as legal.
This wasn't exposed in any tests until I started improving candidate selection recently. Since w30 overlaps with LR, it shouldn't be possible to outline anything that uses it.
I've also attached a MIR test that handles this. Currently, the outliner will incorrectly pull out the STRHHroW %w16, %x9, %w30, 1, 1 instructions despite them using w30.
The existing MachineOutliner IR tests should be ported over to MIR in a separate patch.
modifiesRegister()/readsRegister() can figure this out for you as well if you pass in a TRI argument (without that it has no idea about aliases unfortunately).