This reverts commit r193263.
It is causing CodeGen/X86/mingw-alloca.ll to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193275
91177308-0d34-0410-b5e6-
96231b3b80d8
// responsible for adjusting the stack pointer. Touching the stack at 4K
// increments is necessary to ensure that the guard pages used by the OS
// virtual memory manager are allocated in correct sequence.
- if (NumBytes >= 4096 && STI.isOSWindows()) {
+ if (NumBytes >= 4096 && STI.isTargetCOFF() && !STI.isTargetEnvMacho()) {
const char *StackProbeSymbol;
bool isSPUpdateNeeded = false;
setOperationAction(ISD::STACKSAVE, MVT::Other, Expand);
setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
- if (Subtarget->isTargetWindows())
+ if (Subtarget->isTargetCOFF() && !Subtarget->isTargetEnvMacho())
setOperationAction(ISD::DYNAMIC_STACKALLOC, Subtarget->is64Bit() ?
MVT::i64 : MVT::i32, Custom);
else if (TM.Options.EnableSegmentedStacks)
}
bool isTargetEnvMacho() const { return TargetTriple.isEnvironmentMachO(); }
- bool isOSWindows() const { return TargetTriple.isOSWindows(); }
-
bool isTargetWin64() const {
return In64BitMode && TargetTriple.isOSWindows();
}