[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:05 PDT 2026
================
@@ -0,0 +1,33 @@
+; RUN: llc -enable-machine-outliner -verify-machineinstrs \
+; RUN: -mtriple=thumbv7m-unknown-none-eabihf < %s | FileCheck %s
+; RUN: llc -enable-machine-outliner -verify-machineinstrs \
+; RUN: -mtriple=thumbv7m-unknown-none-eabihf \
+; RUN: --stop-after=machine-outliner < %s | FileCheck %s
+
+; Verify that the Machine Outliner does not emit tTAILJMPr with a non-tcGPR register on Thumb.
+
+; CHECK-NOT: tTAILJMPr {{.*}}$r4
----------------
smithp35 wrote:
How confident are we that the code-generation will use r4 for the blx? Or in the extreme case use a tail call at all?
I think a lot of machine outliner tests use .mir to more tightly control the inputs. May be better to use mir. For example `test/CodeGen/ARM/machine-outliner-noreturn.mir`
https://github.com/llvm/llvm-project/pull/200684
More information about the llvm-commits
mailing list