We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This:
#include <xmmintrin.h>
void foo(__m128i *A, __m128i *B) { *A = _mm_sll_epi16 (*A, *B); }
generates this code:
_foo: movl 8(%esp), %eax movdqa (%eax), %xmm0 #IMPLICIT_DEF %eax pinsrw $2, %eax, %xmm0 xorl %ecx, %ecx pinsrw $3, %ecx, %xmm0 pinsrw $4, %eax, %xmm0 pinsrw $5, %ecx, %xmm0 pinsrw $6, %eax, %xmm0 pinsrw $7, %ecx, %xmm0 movl 4(%esp), %eax movdqa (%eax), %xmm1 psllw %xmm0, %xmm1 movdqa %xmm1, (%eax) ret
This is obviously bad! We should be as good GCC at least.
The text was updated successfully, but these errors were encountered:
assigned to @lattner
Sorry, something went wrong.
Fixed, patch here: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070402/047039.html
Testcase here: Transforms/InstCombine/vec_insertelt.ll
We now compile this to:
_foo: movl 4(%esp), %eax movdqa (%eax), %xmm0 movl 8(%esp), %ecx psllw (%ecx), %xmm0 movdqa %xmm0, (%eax) ret
GCC manages:
_foo: subl $12, %esp movl 16(%esp), %edx movl 20(%esp), %eax movdqa (%eax), %xmm0 movdqa (%edx), %xmm1 psllw %xmm0, %xmm1 movdqa %xmm1, (%edx) addl $12, %esp ret
-Chris
mentioned in issue llvm/llvm-bugzilla-archive#45481
lattner
No branches or pull requests
Extended Description
This:
#include <xmmintrin.h>
void foo(__m128i *A, __m128i *B) {
*A = _mm_sll_epi16 (*A, *B);
}
generates this code:
_foo:
movl 8(%esp), %eax
movdqa (%eax), %xmm0
#IMPLICIT_DEF %eax
pinsrw $2, %eax, %xmm0
xorl %ecx, %ecx
pinsrw $3, %ecx, %xmm0
pinsrw $4, %eax, %xmm0
pinsrw $5, %ecx, %xmm0
pinsrw $6, %eax, %xmm0
pinsrw $7, %ecx, %xmm0
movl 4(%esp), %eax
movdqa (%eax), %xmm1
psllw %xmm0, %xmm1
movdqa %xmm1, (%eax)
ret
This is obviously bad! We should be as good GCC at least.
The text was updated successfully, but these errors were encountered: