[llvm] [RISCV] Exclude X1 and X5 from register scavenging for long branch. (PR #80215)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 20:15:16 PST 2024
preames wrote:
> Jumps using X1 and X5 as the source are hints to the hardware to pop the return-address stack. We should avoiding using them for jumps that aren't a return or tail call.
Could we instead prefer non-X1 and non-X5 registers, then fallback to scavenging them if that's all that's available? Confusing the hardware RAS predictor seems arguably better than crashing the compiler with a scavenging failure.
https://github.com/llvm/llvm-project/pull/80215
More information about the llvm-commits
mailing list