In AArch64 backend X30 is named as LR, X29 is named as FP. So the code in AArch64Subtarget::AArch64Subtarget can't recognize these 2 registers.
for (unsigned i = 0; i < 31; ++i) { if (ReservedRegNames.count(TRI->getName(AArch64::X0 + i))) ReserveXRegisterForRA.set(i); }
This patch add code to explicitly handle these 2 registers.