[LLVMbugs] [Bug 7674] New: Missing SIMD intrinsics
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 19 23:01:26 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7674
Summary: Missing SIMD intrinsics
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chandlerc at gmail.com
CC: llvmbugs at cs.uiuc.edu, echristo at gmail.com
We seem to be missing quite a few MMX / SSE intrinsics. I know little about
them, bet experimentation with a heavily vectorized bit of code yields this
test case. I hope it's still valid, but GCC at least doesn't complain.
% cat x.c
#include <mmintrin.h>
#include <emmintrin.h>
#include <xmmintrin.h>
#include <pmmintrin.h>
void f(__m64 x, __m64 y) {
(void)_m_punpcklwd(x, y);
(void)_m_punpckhwd(x, y);
(void)_m_punpcklbw(x, y);
(void)_m_punpckhbw(x, y);
(void)_m_punpckldq(x, y);
(void)_m_punpckhdq(x, y);
(void)_mm_cvt_pi2ps(_mm_setzero_ps(), x);
(void)_mm_cvt_ps2pi(_mm_setzero_ps());
int i = 42;
(void)_m_from_int(i);
(void)_m_to_int(x);
(void)_m_pand(x, y);
(void)_m_packuswb(x, y);
(void)_m_pavgb(x, y);
(void)_m_pshufw(x, 0);
(void)_m_psllqi(x, i);
(void)_m_psrlqi(x, i);
(void)_m_psllwi(x, i);
(void)_m_psrlwi(x, i);
(void)_m_por(x, y);
(void)_m_pxor(x, y);
(void)_m_pmullw(x, y);
(void)_m_pmulhw(x, y);
(void)_m_paddw(x, y);
(void)_m_pmaddwd(x, y);
(void)_m_paddusb(x, y);
(void)_m_paddd(x, y);
(void)_m_psubw(x, y);
(void)_m_psubusb(x, y);
(void)_m_pmaxsw(x, y);
(void)_m_pminub(x, y);
(void)_m_pmaxub(x, y);
(void)_m_pcmpeqb(x, y);
(void)_m_pcmpgtb(x, y);
_m_empty();
}
% gcc -Wall -Werror -march=native -fsyntax-only x.c
% ./bin/clang -Werror -march=native -fsyntax-only -ferror-limit=999 x.c
x.c:7:9: error: implicit declaration of function '_m_punpcklwd' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpcklwd(x, y);
^
x.c:8:9: error: implicit declaration of function '_m_punpckhwd' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpckhwd(x, y);
^
x.c:9:9: error: implicit declaration of function '_m_punpcklbw' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpcklbw(x, y);
^
x.c:10:9: error: implicit declaration of function '_m_punpckhbw' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpckhbw(x, y);
^
x.c:11:9: error: implicit declaration of function '_m_punpckldq' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpckldq(x, y);
^
x.c:12:9: error: implicit declaration of function '_m_punpckhdq' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_punpckhdq(x, y);
^
x.c:13:9: error: implicit declaration of function '_mm_cvt_pi2ps' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_mm_cvt_pi2ps(_mm_setzero_ps(), x);
^
x.c:14:9: error: implicit declaration of function '_mm_cvt_ps2pi' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_mm_cvt_ps2pi(_mm_setzero_ps());
^
x.c:16:9: error: implicit declaration of function '_m_from_int' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_from_int(i);
^
x.c:17:9: error: implicit declaration of function '_m_to_int' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_to_int(x);
^
x.c:18:9: error: implicit declaration of function '_m_pand' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pand(x, y);
^
x.c:19:9: error: implicit declaration of function '_m_packuswb' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_packuswb(x, y);
^
x.c:20:9: error: implicit declaration of function '_m_pavgb' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pavgb(x, y);
^
x.c:21:9: error: implicit declaration of function '_m_pshufw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pshufw(x, 0);
^
x.c:22:9: error: implicit declaration of function '_m_psllqi' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_psllqi(x, i);
^
x.c:23:9: error: implicit declaration of function '_m_psrlqi' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_psrlqi(x, i);
^
x.c:24:9: error: implicit declaration of function '_m_psllwi' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_psllwi(x, i);
^
x.c:25:9: error: implicit declaration of function '_m_psrlwi' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_psrlwi(x, i);
^
x.c:26:9: error: implicit declaration of function '_m_por' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_por(x, y);
^
x.c:27:9: error: implicit declaration of function '_m_pxor' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pxor(x, y);
^
x.c:28:9: error: implicit declaration of function '_m_pmullw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pmullw(x, y);
^
x.c:29:9: error: implicit declaration of function '_m_pmulhw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pmulhw(x, y);
^
x.c:30:9: error: implicit declaration of function '_m_paddw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_paddw(x, y);
^
x.c:31:9: error: implicit declaration of function '_m_pmaddwd' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_pmaddwd(x, y);
^
x.c:32:9: error: implicit declaration of function '_m_paddusb' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_paddusb(x, y);
^
x.c:33:9: error: implicit declaration of function '_m_paddd' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_paddd(x, y);
^
x.c:34:9: error: implicit declaration of function '_m_psubw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_psubw(x, y);
^
x.c:35:9: error: implicit declaration of function '_m_psubusb' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_psubusb(x, y);
^
x.c:36:9: error: implicit declaration of function '_m_pmaxsw' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pmaxsw(x, y);
^
x.c:37:9: error: implicit declaration of function '_m_pminub' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pminub(x, y);
^
x.c:38:9: error: implicit declaration of function '_m_pmaxub' is invalid in C99
[-Wimplicit-function-declaration]
(void)_m_pmaxub(x, y);
^
x.c:39:9: error: implicit declaration of function '_m_pcmpeqb' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_pcmpeqb(x, y);
^
x.c:40:9: error: implicit declaration of function '_m_pcmpgtb' is invalid in
C99 [-Wimplicit-function-declaration]
(void)_m_pcmpgtb(x, y);
^
x.c:41:3: error: implicit declaration of function '_m_empty' is invalid in C99
[-Wimplicit-function-declaration]
_m_empty();
^
34 errors generated.
--
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