[all-commits] [llvm/llvm-project] 98b694: [AArch64] Fix range check for STGPostIndex (#117146)

Oliver Stannard via All-commits all-commits at lists.llvm.org
Mon Dec 9 01:25:54 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 98b694b66032b8b66b800a9ff44089245b3786dd
      https://github.com/llvm/llvm-project/commit/98b694b66032b8b66b800a9ff44089245b3786dd
  Author: Oliver Stannard <oliver.stannard at arm.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    A llvm/test/CodeGen/AArch64/stack-tagging-epilogue-fold.mir

  Log Message:
  -----------
  [AArch64] Fix range check for STGPostIndex (#117146)

When generating function epilogues using AArch64 stack tagging, we can
fold an SP update into the tag-setting loop. The loop tags 32 bytes at a
time using ST2G, so the final SP update might be done either by a post
indexed STG which tags the final 16 bytes of the tagged region, or by an
ADD/SUB instruction after the loop. However, we were only considering
the range of the ADD/SUB instructions when deciding whether to do this,
and the valid immediate range for STG is slightly lower when the offset
is positive, because it is a signed immediate, and must include the
extra 16 bytes being tagged.



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