Having X0 as a source of a CSRRW means don't write the register. To
write a 0, you should use CSRRWI instead. ISel normally takes care of
this. To further guarantee this I've merged the classes so we must
have isel patterns for imm 0 if we have the register operation.
It is possible that a X0 is an operand of a select that feeds the CSR
write pseudo instruction. The select will be expanded to control flow
and phis which later be turned into copies. This can allow register
coalescing to coalesce the X0 into a CSR write pseudo instruction. By
using GPRNoX0 the coalescing should be prevented.
We don't yet have any uses of these pseudo instructions that I know of
so I can't test this. I'm extrapolating from a similar issue we found
on vsetvli for vector instructions. That's a much larger bug to fix.