Files
clang-p2996/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
Oliver Stannard 98b694b660 [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.
2024-12-09 09:25:31 +00:00

205 KiB