MOV64ri results in a significantly longer encoding, and use of this operator is fairly avoidable as
we can always check the size of the immediate we're using.
You also do
if (isUInt<32>(Imm)) return MOV32ri64;
It's weirdly named but it's load a 32 bit immediate into the lower 32 bits and zero extend. Should avoid a REX prefix I think.
You can drop this else since the if returned.
Can you pretend you pre-commited the test for the purposes of this diff so it's readable?