[LLVMbugs] [Bug 21022] New: MS ABI: intrin_type not handled at all, functions returning vectors miscompiled

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 21 18:04:11 PDT 2014


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: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140922/a1f0b463/attachment.html>


More information about the llvm-bugs mailing list