[LLVMbugs] [Bug 11750] New: [AVX2] incorrect code generated

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 12 12:10:12 CST 2012


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

             Bug #: 11750
           Summary: [AVX2] incorrect code generated
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matt at pharr.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7865
  --> http://llvm.org/bugs/attachment.cgi?id=7865
test case

The attached test case gives a different result when run with avx2 than with
avx1. (As per the AVX2 simulator from
http://software.intel.com/en-us/articles/intel-software-development-emulator/).

Some initial digging and instrumentation of the original test case with print
statements suggest that all is well up through the indirect function call
"callq    *%rax" (including the value returned from that).  In the relatively
small bit of code after that, something seems to get clobbered.

I apologize for not having a more precise bug report with a specific pointer to
incorrect instructions but at least it's only 100 lines of bitcode. 
Unfortunately I don't have any cycles to dig into this more deeply into next
week, so figured I should file a bug with what I have.

% llc -mattr=+avx2 t.ll -o t.s && clang t.cpp t.s && ~/sde/sde -- a.out
result[0] = 1.000000 (expected 1.000000)
result[1] = -1.000000 (expected -1.000000)
result[2] = 3.000000 (expected 3.000000)
result[3] = 4.000000 (expected 4.000000)
result[4] = -1.000000 (expected 5.000000)
result[5] = -1.000000 (expected 6.000000)
result[6] = -1.000000 (expected 7.000000)
result[7] = 8.000000 (expected 8.000000)
err 3 %

% llc -mattr=+avx t.ll -o t.s && clang t.cpp t.s && ~/sde/sde -- a.out
result[0] = 1.000000 (expected 1.000000)
result[1] = -1.000000 (expected -1.000000)
result[2] = 3.000000 (expected 3.000000)
result[3] = 4.000000 (expected 4.000000)
result[4] = 5.000000 (expected 5.000000)
result[5] = 6.000000 (expected 6.000000)
result[6] = 7.000000 (expected 7.000000)
%

-- 
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 LLVMbugs mailing list