[LLVMbugs] [Bug 9850] New: _mm_cmpgt_epi32() is broken

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 5 08:31:40 PDT 2011


           Summary: _mm_cmpgt_epi32() is broken
           Product: new-bugs
           Version: 2.9
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: yottui at yahoo.co.jp
                CC: llvmbugs at cs.uiuc.edu

_mm_cmpgt_epi32() does not generate PCMPGT.

--- begin test case (cmpgt.cpp) ---
#include <emmintrin.h>

__m128i has_carry(__m128i lhs, __m128i rhs)
    __m128i add   = _mm_add_epi32(lhs, rhs);
    __m128i carry = _mm_cmpgt_epi32(lhs, add);

    return carry;
--- end test case ---

--- begin output ---
$ clang++ -O -S -msse2 -D _mm_malloc cmpgt.cpp

$ cat cmpgt.s

    .def     __Z9has_carryDv2_xS_;
    .scl    2;
    .type    32;
    .globl    __Z9has_carryDv2_xS_
    .align    16, 0x90
    movdqa    %xmm1, %xmm0
    psrad    $31, %xmm0
--- end output ---

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