[llvm-commits] [llvm] r131709 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/vararg_tailcall.ll
Chad Rosier
mcrosier at apple.com
Fri May 20 10:55:49 PDT 2011
On May 20, 2011, at 8:23 AM, Eli Friedman wrote:
> On Thu, May 19, 2011 at 5:59 PM, Chad Rosier <mcrosier at apple.com> wrote:
>> Author: mcrosier
>> Date: Thu May 19 19:59:28 2011
>> New Revision: 131709
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=131709&view=rev
>> Log:
>> Don't attempt to tail call optimize for Win64.
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>> llvm/trunk/test/CodeGen/X86/vararg_tailcall.ll
>
> This is causing a test failure on Windows in bool-zext.ll
> (http://google1.osuosl.org:8011/builders/llvm-gcc-native-mingw32);
> please fix.
>
> -Eli
Sorry, fixed. See commit 131740.
Chad
>> Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=131709&r1=131708&r2=131709&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu May 19 19:59:28 2011
>> @@ -2531,17 +2531,18 @@
>> return false;
>>
>> // Do not sibcall optimize vararg calls unless all arguments are passed via
>> - // registers
>> + // registers.
>> if (isVarArg && !Outs.empty()) {
>> +
>> + // Optimizing for varargs on Win64 is unlikely to be safe without
>> + // additional testing.
>> + if (Subtarget->isTargetWin64())
>> + return false;
>> +
>> SmallVector<CCValAssign, 16> ArgLocs;
>> CCState CCInfo(CalleeCC, isVarArg, getTargetMachine(),
>> ArgLocs, *DAG.getContext());
>>
>> - // Allocate shadow area for Win64
>> - if (Subtarget->isTargetWin64()) {
>> - CCInfo.AllocateStack(32, 8);
>> - }
>> -
>> CCInfo.AnalyzeCallOperands(Outs, CC_X86);
>> for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i)
>> if (!ArgLocs[i].isRegLoc())
>>
>> Modified: llvm/trunk/test/CodeGen/X86/vararg_tailcall.ll
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vararg_tailcall.ll?rev=131709&r1=131708&r2=131709&view=diff
>> ==============================================================================
>> --- llvm/trunk/test/CodeGen/X86/vararg_tailcall.ll (original)
>> +++ llvm/trunk/test/CodeGen/X86/vararg_tailcall.ll Thu May 19 19:59:28 2011
>> @@ -12,7 +12,7 @@
>> ; X64: @foo
>> ; X64: jmp
>> ; WIN64: @foo
>> -; WIN64: jmp
>> +; WIN64: callq
>> define void @foo(i64 %arg) nounwind optsize ssp noredzone {
>> entry:
>> %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([5 x i8]* @.str, i64 0, i64 0), i64 %arg) nounwind optsize noredzone
>> @@ -36,7 +36,7 @@
>> ; X64: @foo2
>> ; X64: jmp
>> ; WIN64: @foo2
>> -; WIN64: jmp
>> +; WIN64: callq
>> define i8* @foo2(i8* %arg) nounwind optsize ssp noredzone {
>> entry:
>> %tmp1 = load i8** @sel, align 8, !tbaa !0
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
More information about the llvm-commits
mailing list