[PATCH] D32205: X86RegisterInfo: eliminateFrameIndex: Force SP in AfterFPPop case; NFC

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 18:43:25 PDT 2017


MatzeB added inline comments.


================
Comment at: lib/Target/X86/X86RegisterInfo.cpp:679
+  if (AfterFPPop) {
+    assert(!hasBasePointer(MF));
+    assert(!needsStackRealignment(MF));
----------------
rnk wrote:
> Why does this assert hold true? Do we not support tail calls when doing stack realignment?
I hope we do not do create tail calls that load their target address from the stack in the realignment cases. If we do, then there is a high chance the existing code would miscompile as the frame/base pointer are already reset at the pointer of the tailcall I think.

May be worth some experimentation though, so I can answer this with more confidence...


Repository:
  rL LLVM

https://reviews.llvm.org/D32205





More information about the llvm-commits mailing list