[LLVMbugs] [Bug 8777] New: [Win64] stack probe(alloca, chkstk) is not emitted with variable dynamic stack allocation

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 12 23:33:26 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=8777

           Summary: [Win64] stack probe(alloca, chkstk) is not emitted
                    with variable dynamic stack allocation
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: geek4civic at gmail.com
                CC: llvmbugs at cs.uiuc.edu


define i64 @foo(i64 %n) nounwind {
entry:
  %buf = alloca i8, i64 %n, align 1
  %r = call i64 @bar(i8* %buf, i64 %n) nounwind
  ret i64 %r
}
declare i64 @bar(i8* nocapture, i64) nounwind

$ llc -mtriple=x86_64-{win32|mingw32|mingw64}
foo:
        pushq   %rbp
        movq    %rsp, %rbp
        subq    $32, %rsp
        movq    %rcx, %rdx
        leaq    15(%rdx), %rax
        andq    $-16, %rax
        movq    %rsp, %rcx
        subq    %rax, %rcx
        movq    %rcx, %rsp
        callq   bar
        movq    %rbp, %rsp
        popq    %rbp
        ret

It seems alloca might be expanded w/o DYNAMIC_STACKALLOC after X86 DAG->DAG
Instruction Selection.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list