[llvm-commits] [llvm] r72830 - in /llvm/trunk: lib/Target/X86/X86RegisterInfo.cpp test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll
Eli Friedman
eli.friedman at gmail.com
Wed Jun 3 19:02:02 PDT 2009
Author: efriedma
Date: Wed Jun 3 21:02:01 2009
New Revision: 72830
URL: http://llvm.org/viewvc/llvm-project?rev=72830&view=rev
Log:
PR3739, part 1: Disable the red zone on Win64.
Added:
llvm/trunk/test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll
Modified:
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=72830&r1=72829&r2=72830&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Wed Jun 3 21:02:01 2009
@@ -754,7 +754,8 @@
if (Is64Bit && !DisableRedZone &&
!needsStackRealignment(MF) &&
!MFI->hasVarSizedObjects() && // No dynamic alloca.
- !MFI->hasCalls()) { // No calls.
+ !MFI->hasCalls() && // No calls.
+ !Subtarget->isTargetWin64()) { // Win64 has no Red Zone
uint64_t MinSize = X86FI->getCalleeSavedFrameSize();
if (hasFP(MF)) MinSize += SlotSize;
StackSize = std::max(MinSize,
Added: llvm/trunk/test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll?rev=72830&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2009-06-03-Win64DisableRedZone.ll Wed Jun 3 21:02:01 2009
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc | grep "subq.*\\\$8, \\\%rsp"
+target triple = "x86_64-mingw64"
+
+define x86_fp80 @a(i64 %x) nounwind readnone {
+entry:
+ %conv = sitofp i64 %x to x86_fp80 ; <x86_fp80> [#uses=1]
+ ret x86_fp80 %conv
+}
+
More information about the llvm-commits
mailing list