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

            Bug ID: 16886
           Summary: Frame pointer elimination causes misaligned stack
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 11035
  --> http://llvm.org/bugs/attachment.cgi?id=11035&action=edit
Repro IR printout

My JIT-compiled function looks like this when using LLVM 3.3:

 push        ebp  
 push        ebx  
 push        edi  
 push        esi  
 sub         esp,0ACh  
 ...
 movaps      xmmword ptr [esp+80h],xmm1
 ...

It's a leaf function, so frame pointer elimination took place, but in the fifth
instruction of the prologue esp isn't adjusted to a 16-byte aligned value. Thus
the first SSE spill instruction causes an unaligned access violation.

This happens even when I set TargetOptions::StackAlignmentOverride to 16. I
have to set NoFramePointerElim to true to get working code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to