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

            Bug ID: 21022
           Summary: MS ABI: intrin_type not handled at all, functions
                    returning vectors miscompiled
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

consider:
struct __declspec(intrin_type) __m128i {
  char x;
};

__m128i f(__m128i *x) {
  return *x;
}

we codegen this to:
"?f@@YA?AU__m128i@@PAU1@@Z":
        movl    4(%esp), %eax
        movb    (%eax), %al
        retl

However, MSVC will instead do something like this:

"?f@@YA?AU__m128i@@PAU1@@Z":
        movl    4(%esp), %eax
        movdqa  (%eax), %xmm0
        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