[llvm] [CodeGen] Mark LIFETIME_START and LIFETIME_END as not safe to move (PR #211179)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 02:10:45 PDT 2026


================
@@ -1360,7 +1360,7 @@ bool MachineInstr::isSafeToMove(bool &SawStore) const {
   // Don't touch instructions that have non-trivial invariants.  For example,
   // terminators have to be at the end of a basic block.
   if (isPosition() || isDebugInstr() || isTerminator() ||
-      isJumpTableDebugInfo())
+      isJumpTableDebugInfo() || isLifetimeMarker())
----------------
arsenm wrote:

Can this now remove the lifetime special case in wouldBeTriviallyDead

https://github.com/llvm/llvm-project/pull/211179


More information about the llvm-commits mailing list