Enter code here.LLVM ERROR: Unsupported integer vector type with numElems: 2, primitiveSize: 64!
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
WebAssembly SIMD will of course fix this so that using SIMD can have performance benefits. Emscripten actually does support WebAssembly SIMD when using the LLVM backend, but it is very bleeding edge and there are still a few bugs. And because the WebAssembly SIMD proposal is still in an early stage, the instructions it contains are subject to change.As for the error you are seeing, it is telling you that Fastcomp does not support 2 x i64 vectors. Unfortunately Fastcomp does not know how to lower unsupported vector types into supported vector types, although the LLVM backend does. Until SIMD stabilizes in the LLVM backend and ships on JS engines, the best way around this error is going to be to remove all uses of 2 x i64 vectors (and 2 x f64 vectors) from your code.
As for the error you are seeing, it is telling you that Fastcomp does not support 2 x i64 vectors. Unfortunately Fastcomp does not know how to lower unsupported vector types into supported vector types, although the LLVM backend does.
clang-10: warning: argument unused during compilation: '-msse2' [-Wunused-command-line-argument]
In file included from main_no_ffp_with_shadows.cpp:53:
In file included from /.../emsdk/upstream/lib/clang/10.0.0/include/immintrin.h:14:
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
__builtin_ia32_emms();
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:5: note: '__builtin_isless' declared here
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0
__builtin_ia32_emms();
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:239:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:260:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:287:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:310:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:331:19: error: use of undeclared identifier '__builtin_ia32_punpckldq'
return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:352:19: error: use of undeclared identifier '__builtin_ia32_paddb'
return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:373:19: error: use of undeclared identifier '__builtin_ia32_paddw'
return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:394:19: error: use of undeclared identifier '__builtin_ia32_paddd'
return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:416:19: error: use of undeclared identifier '__builtin_ia32_paddsb'
return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:439:19: error: use of undeclared identifier '__builtin_ia32_paddsw'
return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2);
^
/.../emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:461:19: error: use of undeclared identifier '__builtin_ia32_paddusb'
return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.clang-10 gives me '-msse2' [-Wunused-command-line-argument], but I suppose that the SIMD stuff is still WIP in emscripten (and maybe still unsupported by browsers in general), so I'm just happy with what I got now!Thanks again for your help.I've just added all the related stuff to my nudge fork here https://github.com/Flix01/nudge (in case someone is interested).
--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/53c8f539-217e-44b9-922f-722ad63078a1%40googlegroups.com.
Please also keep in mind that using emulated SIMD is slower than not using SIMD at all.
Hi, unfortunately those headers you are using have nothing to do with WebAssembly and will not enable you to compile code using x86 intrinsics and targeting WebAssembly. I've filed an issue for this here: https://github.com/emscripten-core/emsdk/issues/309. Clang is giving you a warning about `-msse2` because that flag only works for x86 targets; SSE2 is an x86 feature, not a WebAssembly feature. Notice that you are also getting a large number of warnings about unrecognized builtin functions like `__builtin_ia32_emms`. These builtin functions are used by the mmintrin.h header you included but only exist when targeting x86, not WebAssembly.You can read more about using WebAssembly SIMD intrinsics here: https://emscripten.org/docs/porting/simd.html#porting-simd-code-targeting-webassembly.
../nudge.cpp:141:9: error: unknown type name '__m128'
typedef __m128 simd4_float;
^
../nudge.cpp:142:9: error: unknown type name '__m128i'
typedef __m128i simd4_int32;
^
../nudge.cpp:145:20: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpacklo32(__m128 x, __m128 y) {
^
../nudge.cpp:145:38: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpacklo32(__m128 x, __m128 y) {
^
../nudge.cpp:145:48: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpacklo32(__m128 x, __m128 y) {
^
../nudge.cpp:149:20: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpackhi32(__m128 x, __m128 y) {
^
../nudge.cpp:149:38: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpackhi32(__m128 x, __m128 y) {
^
../nudge.cpp:149:48: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 unpackhi32(__m128 x, __m128 y) {
^
../nudge.cpp:153:20: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpacklo32(__m128i x, __m128i y) {
^
../nudge.cpp:153:39: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpacklo32(__m128i x, __m128i y) {
^
../nudge.cpp:153:50: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpacklo32(__m128i x, __m128i y) {
^
../nudge.cpp:157:20: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpackhi32(__m128i x, __m128i y) {
^
../nudge.cpp:157:39: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpackhi32(__m128i x, __m128i y) {
^
../nudge.cpp:157:50: error: unknown type name '__m128i'
NUDGE_FORCEINLINE __m128i unpackhi32(__m128i x, __m128i y) {
^
../nudge.cpp:162:20: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 concat2x32(__m128 x, __m128 y) {
^
../nudge.cpp:162:38: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 concat2x32(__m128 x, __m128 y) {
^
../nudge.cpp:162:48: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 concat2x32(__m128 x, __m128 y) {
^
../nudge.cpp:163:31: error: use of undeclared identifier '_MM_SHUFFLE'
return _mm_shuffle_ps(x, y, _MM_SHUFFLE(y1, y0, x1, x0));
^
../nudge.cpp:167:20: error: unknown type name '__m128'
NUDGE_FORCEINLINE __m128 shuffle32(__m128 x) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.