<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - x86_64: Result code use stack before %rsp (out of stack frame)"
   href="http://llvm.org/bugs/show_bug.cgi?id=15573">15573</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>x86_64: Result code use stack before %rsp (out of stack frame)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>leo@sai.msu.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10229" name="attach_10229" title="Compile: `clang++ -O3 -m64 -S LayoutGost.cpp'">attachment 10229</a> <a href="attachment.cgi?id=10229&action=edit" title="Compile: `clang++ -O3 -m64 -S LayoutGost.cpp'">[details]</a></span>
Compile: `clang++ -O3 -m64 -S LayoutGost.cpp'

For function with complex vector operation, when need Spill/Reload registers.
Result x86_64 code (Spill/Reload out of frame):
...
        movq    %rsp, %rbp
Ltmp5:
        .cfi_def_cfa_register %rbp
        pushq   %r15
        pushq   %r14
        pushq   %r13
        pushq   %r12
        pushq   %rbx
        subq    $696, %rsp
...
        movq    %rdx, -856(%rbp) 
...
        movdqa  %xmm4, -752(%rbp)
...
        movq    -856(%rbp), %rax
...
        movdqa  -752(%rbp), %xmm3

As result for programs with signals or interrupts, signal/interrupt handler
rewrite stack below %rsp. 

Sorry, I can't reduce code. Compile: `clang++ -O3 -m64 -S LayoutGost.cpp'

Affect clang x86_64: 3.0, 3.1, 3.2, 3.3 (trunk 173279) and Xcode 4.6.1 Apple
LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn)
$ uname -a
Darwin leom-3.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan  6 22:37:10
PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>