Copy the whole vector and not just VL elements
We were using VADD.VI to do a copy between two physical registers which should be OK. However we didn't make sure we were using VLMAX to copy the whole register. We can't use virtual registers here because Register Allocation has already run. ExpandPostRA does not behave like PrologEpilogInserter which runs the scavenger if needed, so we need to explicitly scavenge a couple of registers. There is a bit of risk we can't actually scavenge them, in such case we might want to revisit this and manually spill two registers of our choice onto the stack.
Loading
Please sign in to comment