junbuml added a comment. I’d rather not start messing with reserved registers in a generic way. If you want to catch your example, maybe this is something you can teach in the AArch64RedundantCopyElimination pass. Make sense to me. Repository: rL LLVM http://reviews.llvm.org/D17475