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

            Bug ID: 39492
           Summary: GCC and LLVM pass i128 incompatibly on
                    x86_64-windows-gnu
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedb...@nondot.org
          Reporter: r...@google.com
                CC: craig.top...@gmail.com, llvm-bugs@lists.llvm.org,
                    llvm-...@redking.me.uk, spatel+l...@rotateright.com

Consider this code:

typedef int my_int128_t __attribute__((mode(TI)));
my_int128_t foo() { return -2; }

GCC:
foo:
        .seh_endprologue
        movdqa  .LC0(%rip), %xmm0
        ret

Clang:
foo:                                    # @foo
# %bb.0:                                # %entry
        movq    $-2, %rax
        movq    $-1, %rdx
        retq

So, XMM0 vs. RAX:RDX.

I noticed this because clang fails to call its own 128-bit compiler rt division
functions correctly. Apparently I committed a patch back in r208029 to add a
special case to make __divti3 match GCC. If we fix this bug, we won't need that
hack anymore.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to