[all-commits] [llvm/llvm-project] 6eb205: Reapply [AArch64] Fix aligning the stack after cal...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Oct 14 14:43:13 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6eb205b25771739f9bd54dd3a55af8dfa0776ef7
      https://github.com/llvm/llvm-project/commit/6eb205b25771739f9bd54dd3a55af8dfa0776ef7
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-10-15 (Sat, 15 Oct 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    A llvm/test/CodeGen/AArch64/win-align-chkstk.ll
    A llvm/test/CodeGen/AArch64/win-realign.ll

  Log Message:
  -----------
  Reapply [AArch64] Fix aligning the stack after calling __chkstk

Whenever a call to __chkstk was made, the frame lowering previously
omitted the aligning (as NumBytes was reset to zero before doing
alignment).

This fixes https://github.com/llvm/llvm-project/issues/56182.

The initial version of this produced invalid code for small
functions with no local stack allocations, if those functions
were marked with the "stackrealign" attribute. If building
with -mstack-alignment=16 (which otherwise mostly would be a
no-op), this attribute is added on the main function.

Differential Revision: https://reviews.llvm.org/D135687




More information about the All-commits mailing list