[PATCH] D106444: X86: fix frame offset calculation with mandatory tail calls

Gerolf Hoflehner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 22:11:53 PDT 2021


Gerolf added inline comments.


================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:2028
     uint64_t FrameSize = StackSize - SlotSize;
-    NumBytes = FrameSize - CSSize;
+    NumBytes = FrameSize - CSSize - TailCallArgReserveSize;
 
----------------
It seems here the  code assume TailCallArgReserveSize is positive? This looks inconsistent to (X86FI->getCalleeSavedFrameSize() + TailCallArgReserveSize) in the NumBytes calculation in the function above. 


================
Comment at: llvm/test/CodeGen/X86/swifttail-realign.ll:1
+; RUN: llc -mtriple=x86_64-linux-gnu %s -o - | FileCheck %s
+
----------------
Does this need more tests for the paths modified? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106444/new/

https://reviews.llvm.org/D106444



More information about the llvm-commits mailing list