<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 --- - LLVM no longer honours -stack-alignment=4"
   href="http://llvm.org/bugs/show_bug.cgi?id=21435">21435</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM no longer honours -stack-alignment=4
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>All
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>jfonseca@vmware.com
          </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=13268" name="attach_13268" title="bug1347703.ll">attachment 13268</a> <a href="attachment.cgi?id=13268&action=edit" title="bug1347703.ll">[details]</a></span>
bug1347703.ll

LLVM stoped honouring 

This can easily be reproduced with the attached bug1347703.ll doing

  $ llc -o - -mtriple=i686-pc-mingw32 -mattr=+avx -stack-alignment=4
bug1347703.ll | grep '\<and.*[er]sp'
  $

which produces nothing showing that the stack pointer is never aligned.

However if one disables frame-pointer elimination then it works again:

  $
/home/jfonseca/work/vmware/llvm/llvm/build/linux-x86_64/Debug+Asserts/bin/llc
-disable-fp-elim -o - -mtriple=i686-pc-mingw32 -mattr=+avx -stack-alignment=4
bug1347703.ll | grep '\<and.*[er]sp'
    andl    $-32, %esp
    andl    $-32, %esp

  $

Which doesn't seem the right behavior -- using the frame-pointer to align the
stack seems an implementation detail -- there are probably other ways, and if
frame-pointer is indeed necessary it should be automatically employed as
necessary.


This regression happened between LLVM release 3.2 and release 3.3.  I strongly
suspect r168627 --
<a href="https://github.com/llvm-mirror/llvm/commit/1243922fc1a1e3d2681ed9e78503eeabd875ba93">https://github.com/llvm-mirror/llvm/commit/1243922fc1a1e3d2681ed9e78503eeabd875ba93</a></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>