[LLVMbugs] [Bug 7588] New: Wrong code for _mm_shufflehi_epi16
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 7 21:15:56 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7588
Summary: Wrong code for _mm_shufflehi_epi16
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Headers
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: astrange at ithinksw.com
CC: llvmbugs at cs.uiuc.edu
Using checker-243 -O3 -m32 -march=pentium-m.
Source:
#include <xmmintrin.h>
__m128i a(__m128i b)
{
return _mm_shufflehi_epi16(b, 1 | (0 << 2) | (3 << 4) | (2 << 6));
}
gcc:
_a:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
pshufhw $177, %xmm0, %xmm0
leave
ret
clang:
_a: ## @a
## BB#0: ## %entry
pushl %ebp
movl %esp, %ebp
pextrw $5, %xmm0, %eax
movlhps %xmm0, %xmm0
pshufhw $-76, %xmm0, %xmm0
pinsrw $4, %eax, %xmm0
popl %ebp
ret
It looks like the macro definition in xmmintrin is wrong.
--
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