[LLVMbugs] [Bug 7703] New: All shuffle intrinsics use PSHUFD (even when SHUFPS is requested and smaller)
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jul 24 11:04:56 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7703
Summary: All shuffle intrinsics use PSHUFD (even when SHUFPS is
requested and smaller)
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jed at 59a2.org
CC: llvmbugs at cs.uiuc.edu
void f(const float *x,float *y) {
__m128 p = _mm_load_ps(x);
p = _mm_shuffle_ps(p,p,_MM_SHUFFLE(0,2,1,3));
_mm_store_ps(y,p);
}
Compile with -Os -fomit-frame-pointer (clang version 1.1
(branches/release_27)):
00000000004004c4 <f> movaps xmm0,XMMWORD PTR [rdi]
00000000004004c7 <f+0x3> pshufd xmm0,xmm0,0x27
00000000004004cc <f+0x8> movaps XMMWORD PTR [rsi],xmm0
00000000004004cf <f+0xb> ret
Compare to gcc (4.5.0) which is one byte shorter and actually uses the
instruction specified by the intrinsic:
00000000004004c4 <f> movaps xmm0,XMMWORD PTR [rdi]
00000000004004c7 <f+0x3> shufps xmm0,xmm0,0x27
00000000004004cb <f+0x7> movaps XMMWORD PTR [rsi],xmm0
00000000004004ce <f+0xa> ret
--
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