[LLVMbugs] [Bug 11194] New: x86/SSE: incorrect code generated for <8xi8> to <8xfloat> conversion with sitofp

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Oct 20 09:58:19 PDT 2011


           Summary: x86/SSE: incorrect code generated for <8xi8> to
                    <8xfloat> conversion with sitofp
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matt at pharr.org
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=7492)
 --> (http://llvm.org/bugs/attachment.cgi?id=7492)

The attached test program generates an <8xi8> vector with values
<1,2,3,4,5,6,7,8>, bitcasts it to an i64, shifts it and then sets the low 8
bits to be 0xff, bitcasts that back to an <8xi8> before doing a sitofp
conversion to an <8xfloat> vector.  The result of all this should be -1.0 1.0
2.0 3.0 4.0 5.0 6.0 7.0.  With top of tree, I'm seeing:

% llc  -filetype=obj bug.ll -o bug.o && clang bug.cpp bug.o && ./a.out
-1.0 257.0 514.0 771.0 1028.0 1285.0 1542.0 1799.0 

This bug was introduced in r142152.  (It may also be related to
http://llvm.org/bugs/show_bug.cgi?id=11193, but I'm filing it as a separate bug
for now.)

Author: Nadav Rotem <nadav.rotem at intel.com>
Date:   Sun Oct 16 20:31:33 2011 +0000

    Enable element promotion type legalization by deafault.
    Changed tests which assumed that vectors are legalized by widening them.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142152

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