https://llvm.org/bugs/show_bug.cgi?id=23049

            Bug ID: 23049
           Summary: [X86] 64-bit integer stores are not always illegal on
                    a 32-bit system
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

If you have SSE2, then 64-bit integer stores should be possible from an SSE
register even with i386.

$ cat st64.ll
define void @foo(i64* %p, <2 x i64> %a) {
  %ext = extractelement <2 x i64> %a, i32 0
  store i64 %ext, i64* %p
  ret void
}

$ ./llc -march=x86 -mattr=sse2 st64.ll -o -
...
    movl    4(%esp), %eax
    pshufd    $229, %xmm0, %xmm1      ## xmm1 = xmm0[1,1,2,3]
    movd    %xmm0, (%eax)  <--- store low 32-bits
    movd    %xmm1, 4(%eax) <--- store high 32-bits
    retl


GCC knows better:
_foo:
    movl    4(%esp), %eax
    movq    %xmm0, (%eax)
    ret

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