<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 --- - target-features function attribute does not apply in 32-bit x86 target"
   href="http://llvm.org/bugs/show_bug.cgi?id=22081">22081</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>target-features function attribute does not apply in 32-bit x86 target
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sanxiyn@gmail.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>r225079.

Using target-features function attribute +sse2 does not cause 32-bit x86 code
generator to use SSE. Using command line flag -mattr=+sse2 does.

$ cat test.ll
define double @inv(double %x) #0 {
entry:
  %div = fdiv double 1.0, %x
  ret double %div
}
attributes #0 = { "target-features"="+sse2" }

$ llc test.ll -o -
inv:
  fld1
  fdivl 4(%esp)
  retl

$ llc -mattr=+sse2 test.ll -o -
inv:
  subl $12, %esp
  movsd .LCPI0_0, %xmm0
  divsd 16(%esp), %xmm0
  movsd %xmm0, (%esp)
  fldl (%esp)
  addl $12, %esp
  retl</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>