[Statepoints] FixupStatepoint: Clear isKill flag if COPY is not deleted.
When spilling CSRs, FixupStatepoint pass does simple copy propagation, trying to find COPY instruction which defines register being spilled and spill COPY source instead. I.e., if we have CSR $x and found $x = COPY $y we will spill $y instead. But we may be unable to delete COPY instruction for some reason. Then, spill will be inserted after it, adding another use of $y. If COPY instruction was last use of $y (killed it), after insertion of the spill it is not, so `isKill` flag must be cleared. We failed to do so and this patch fixes this issue. Reviewed By: skatkov Differential Revision: https://reviews.llvm.org/D127308
Loading
Please sign in to comment