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

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 10:35:18 PDT 2017


MatzeB added a comment.

As I feared this broke. One of the bots was compiling this pearl (from clang/lib/Lex/Pragma.cpp:992)

  static void DebugOverflowStack() {
    void (*volatile Self)() = DebugOverflowStack;
    Self();
  }

for which amazingly use an x86 memory operand on the tail call instruction. Seems like someone tried to trick the compiler into deliberately producing code that overflows the stack and we managed to optimize it into a sibling call without using extra stack (the red-zone is saving us from stack allocations).


Repository:
  rL LLVM

https://reviews.llvm.org/D32205





More information about the llvm-commits mailing list