SSA destruction
The pass that replaces φ-functions with ordinary copies, since no processor has an instruction for picking a value based on which way you came in.
It looks trivial: for x3 = φ(x1, x2), put x3 = x1 at the end of one predecessor block and x3 = x2 at the end of the other. That is what Cytron and colleagues described in 1991. But once optimizations like copy propagation have shuffled the code around, the naive approach breaks. Briggs, Cooper, Harvey and Simpson pinned down the two classic failures in 1998: the lost copy, where a copy clobbers a value still in use, and the swap, where two φs exchange values and sequential copies destroy one of them.
Doing it right means splitting critical edges and sequencing parallel copies through temporaries. Sreedhar et al. gave a more systematic method in 1999, refined by Boissinot et al. in 2009. Register coalescing then mops up most of the copies — the ones it misses are the pointless movs you sometimes spot in the final output.