[llvm] [ARM] Fix Machine Outliner crash when tBLXr uses non-tcGPR register (PR #200684)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 08:50:04 PDT 2026
https://github.com/smithp35 commented:
This looks reasonable to me.
As an aside, I think the comment for tcGPR is a bit confusing in the context of the outliner. The outliner runs after the callee-save would be saved, so the call address isn't clobbered, however if we tail call from this register the caller's value won't be restored so the caller's value would be clobbered.
```
// For tail calls, we can't use callee-saved registers, as they are restored
// to the saved value before the tail call, which would clobber a call address.
// Note, getMinimalPhysRegClass(R0) returns tGPR because of the names of
// this class and the preceding one(!) This is what we want.
```
https://github.com/llvm/llvm-project/pull/200684
More information about the llvm-commits
mailing list