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

            Bug ID: 22081
           Summary: target-features function attribute does not apply in
                    32-bit x86 target
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

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

-- 
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