[all-commits] [llvm/llvm-project] 2481e5: [AArch64][SME] Fix accessing the emergency spill s...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Wed Jun 11 15:49:38 PDT 2025


  Branch: refs/heads/release/20.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 2481e590eec725f2ad6b4945eebb978f93578404
      https://github.com/llvm/llvm-project/commit/2481e590eec725f2ad6b4945eebb978f93578404
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2025-06-11 (Wed, 11 Jun 2025)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
    A llvm/test/CodeGen/AArch64/framelayout-scavengingslot-stack-hazard.mir
    M llvm/test/CodeGen/AArch64/stack-hazard.ll

  Log Message:
  -----------
  [AArch64][SME] Fix accessing the emergency spill slot with hazard padding (#142190)

This patch fixes an issue where when hazard padding was enabled locals,
including the emergency spill slot, could not be directly addressed.

Generally, this is fine, we can materialize the constant offset in a
scratch register, but if there's no register free we need to spill, and
if we can't even reach the emergency spill slot then we fail to compile.

This patch fixes this by ensuring that if a function has variable-sized
objects and is likely to have hazard padding we enable the base pointer.
Then if we know a function has hazard padding, place the emergency spill
slot next to the BP/SP, to ensure it can be directly accessed without
stepping over any hazard padding.

(cherry picked from commit b5cf03033251a642b184b2e0ea6bdac171c17702)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list