[LLVMbugs] [Bug 8370] New: Seemingly incorrect output on Windows for the exact same generated X86 assembly as Linux.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 12 21:45:16 PDT 2010


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

           Summary: Seemingly incorrect output on Windows for the exact
                    same generated X86 assembly as Linux.
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bigcheesegs at gmail.com
                CC: llvmbugs at cs.uiuc.edu


This is from test-suite/SingleSource/UnitTests/Vetor/sumarray-dbl.c.

Attached files:
* test.ll - The LLVM IR generated by clang when targeting both platforms (I ran
clang on Linux and Windows, but they produced the same output).
* test-lin.asm - The X86 assembly generated by clang -S on Linux.
* test-win.asm - The X86 assembly generated by clang -S on Windows.

The command used was:
% clang sumarray-dbl.c -O3 -fomit-frame-pointer -march=i386

I added -march because one cpu is some old crappy one and the other is an i7,
so they were using different methods.

When the resulting program is run on Linux, the output is as expected (or at
least the same as the reference output):

488862 490096 491331 492566 493800 495035 496269 497504

However, on Windows, the output is:

488862 490097 491331 492566 493800 495035 496269 497504

The only difference is that the second number is 1 larger. I get the exact same
result if I use -march=native.

This really just looks like a rounding issue, but I want to make sure there
isn't a larger issue.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list