[X86] Fix stack probe issue on windows32.
authorLuo, Yuanke <yuanke.luo@intel.com>
Sat, 10 Aug 2019 02:49:02 +0000 (02:49 +0000)
committerLuo, Yuanke <yuanke.luo@intel.com>
Sat, 10 Aug 2019 02:49:02 +0000 (02:49 +0000)
commitc6c86f4f81fb9130499f2b75764b8227cddc2375
treeee2bb05b025fe16dfbede5a55d4f5556ee58d6e7
parent92e160ababd1e9e976fa1c573bbe906997bb206d
[X86] Fix stack probe issue on windows32.

Summary:
On windows if the frame size exceed 4096 bytes, compiler need to
generate a call to _alloca_probe. X86CallFrameOptimization pass
changes the reserved stack size and cause of stack probe function
not be inserted. This patch fix the issue by detecting the call
frame size, if the size exceed 4096 bytes, drop X86CallFrameOptimization.

Reviewers: craig.topper, wxiao3, annita.zhang, rnk, RKSimon

Reviewed By: rnk

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 368503
llvm/lib/Target/X86/X86CallFrameOptimization.cpp
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.h
llvm/test/CodeGen/X86/nomovtopush.ll [new file with mode: 0644]