Extend AArch64 foldMemoryOperandImpl() to handle folding spills of
subreg COPYs with read-undef defs like:
%vreg0:sub_32<def,read-undef> = COPY %WZR; GPR64:%vreg0
by widening the spilled physical source reg and generating:
STRXui %XZR <fi#0>
as well as folding refills of similar COPYs like:
%vreg0:sub_32<def,read-undef> = COPY %vreg1; GPR64:%vreg0, GPR32:%vreg1
by generating:
%vreg0:sub_32<def,read-undef> = LDRWui <fi#0>
Either use the term fill or reload (I personally prefer the latter) but not refill. Should probably change that in the comment as well.
I wonder if the code would become slightly cleaner if you put the spill/refill check into a single outer if and move the other ifs inside of that accordingly (you have to split up/duplicate the DstMO.getSubReg() == 0 && SrcMO.getSubReg() == 0 check but that should be fine).