[llvm-bugs] [Bug 39492] New: GCC and LLVM pass i128 incompatibly on x86_64-windows-gnu

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 29 17:20:55 PDT 2018


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: unassignedbugs at nondot.org
          Reporter: rnk at google.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181030/22b2a151/attachment-0001.html>


More information about the llvm-bugs mailing list