Skip to content

x86/SSE: incorrect code generated for <8xi8> to <8xfloat> conversion with sitofp #11566

@llvmbot

Description

@llvmbot
Bugzilla Link 11194
Resolution FIXED
Resolved on Oct 21, 2011 12:37
Version trunk
OS All
Attachments bitcode, test driver
Reporter LLVM Bugzilla Contributor

Extended Description

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@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 91177308-0d34-0410-b5e6-96231b3b80d8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions