We end up creating COPY's that are either truncating/extending and this should be illegal.
Eg %0(s8) = COPY %w0
Instead, we generate TRUNCs/ANY_EXT and let the optimizer deal with it later.
%tmp(s32) = COPY %w0
%0(s8) = G_TRUNC %tmp(s32)
I've updated the AArch64 backend, I'd appreciate it if people more familiar with X86/ARM can update it as well(post feedback).
Looking forward to your comments.