[LLVMbugs] [Bug 11494] New: [AVX] incorrect code generated from short program with shuffles/int min/max

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 6 10:59:07 PST 2011


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

             Bug #: 11494
           Summary: [AVX] incorrect code generated from short program with
                    shuffles/int min/max
           Product: new-bugs
           Version: unspecified
          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
    Classification: Unclassified


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

The attached short test case does a series of 4-wide SSE4.1 pminsd/pmaxsd calls
to compute a 16-wide vector.  It should generate a vector where the first four
values are respectively <4,3,2,1> and where the rest of the values are 0s.

With the SSE target, the correct result is computed.  With AVX, the last four
values incorrectly have a value of four.

% llc -mattr=+avx bug.ll -o t.o --filetype=obj && clang t.cpp t.o && ./a.out
0    4.000000
1    3.000000
2    2.000000
3    1.000000
4    0.000000
5    0.000000
6    0.000000
7    0.000000
8    0.000000
9    0.000000
10    0.000000
11    0.000000
12    4.000000
13    4.000000
14    4.000000
15    4.000000
% llc bug.ll -o t.o --filetype=obj && clang t.cpp t.o && ./a.out
0    4.000000
1    3.000000
2    2.000000
3    1.000000
4    0.000000
5    0.000000
6    0.000000
7    0.000000
8    0.000000
9    0.000000
10    0.000000
11    0.000000
12    0.000000
13    0.000000
14    0.000000
15    0.000000
%

This bug is present in both 3.1svn and the 3.0 release.

-- 
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