[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
Tue Jun 2 10:46:18 PDT 2026
================
@@ -5827,9 +5827,11 @@ ARMBaseInstrInfo::getOutliningCandidateInfo(
SetCandidateCallInfo(MachineOutlinerTailCall, Costs.CallTailCall);
} else if (LastInstrOpcode == ARM::BL || LastInstrOpcode == ARM::BLX ||
LastInstrOpcode == ARM::BLX_noip || LastInstrOpcode == ARM::tBL ||
- LastInstrOpcode == ARM::tBLXr ||
- LastInstrOpcode == ARM::tBLXr_noip ||
- LastInstrOpcode == ARM::tBLXi) {
+ LastInstrOpcode == ARM::tBLXi ||
+ ((LastInstrOpcode == ARM::tBLXr ||
+ LastInstrOpcode == ARM::tBLXr_noip) &&
+ ARM::tcGPRRegClass.contains(
+ RepeatedSequenceLocs[0].back().getOperand(2).getReg()))) {
----------------
smithp35 wrote:
Sure a separate PR is fine, that case is much less likely to happen in practice.
https://github.com/llvm/llvm-project/pull/200684
More information about the llvm-commits
mailing list