junbuml added a comment. Adding isConstantPhysReg() would be good in this pass. As far as I check, however, isConstantPhysReg() returns false for WZR and XZR in AArch64, which I think we need to fix (Bug 25457). Repository: rL LLVM http://reviews.llvm.org/D17475