Skip to content
Commit 835da13a authored by Guozhi Wei's avatar Guozhi Wei
Browse files

[AArch64] Correctly recognize -reserve-regs-for-regalloc=X30,X29

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.

Differential Revision: https://reviews.llvm.org/D137810
parent 6ed6e8e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment