Skip to content
New issue

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

emscripten errors in wasm_simd128.h #10651

Closed
nemequ opened this issue Mar 6, 2020 · 4 comments
Closed

emscripten errors in wasm_simd128.h #10651

nemequ opened this issue Mar 6, 2020 · 4 comments

Comments

@nemequ
Copy link

nemequ commented Mar 6, 2020

I'm getting errors when including wasm_simd128.h:

In file included from ../x86/sse.c:25:
In file included from ../../test/x86/test-sse2.h:1:
In file included from ../x86/../../simde/x86/sse2.h:35:
In file included from ../x86/../../simde/x86/sse.h:57:
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:639:27: error: used type '__attribute__((__vector_size__(16 * sizeof(char)))) char' (vector of 16 'char' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:646:27: error: used type '__attribute__((__vector_size__(16 * sizeof(char)))) char' (vector of 16 'char' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:654:27: error: used type '__attribute__((__vector_size__(16 * sizeof(char)))) char' (vector of 16 'char' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:661:27: error: used type '__attribute__((__vector_size__(16 * sizeof(char)))) char' (vector of 16 'char' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:739:27: error: used type '__attribute__((__vector_size__(8 * sizeof(short)))) short' (vector of 8 'short' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:746:27: error: used type '__attribute__((__vector_size__(8 * sizeof(short)))) short' (vector of 8 'short' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:753:27: error: used type '__attribute__((__vector_size__(8 * sizeof(short)))) short' (vector of 8 'short' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:760:27: error: used type '__attribute__((__vector_size__(8 * sizeof(short)))) short' (vector of 8 'short' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:817:27: error: used type '__attribute__((__vector_size__(4 * sizeof(long)))) long' (vector of 4 'long' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:824:27: error: used type '__attribute__((__vector_size__(4 * sizeof(long)))) long' (vector of 4 'long' values) where arithmetic or pointer type is required
  return (v128_t)(a_ < b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:831:27: error: used type '__attribute__((__vector_size__(4 * sizeof(long)))) long' (vector of 4 'long' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
/home/travis/build/nemequ/simde/emsdk/upstream/emscripten/system/include/wasm_simd128.h:838:27: error: used type '__attribute__((__vector_size__(4 * sizeof(long)))) long' (vector of 4 'long' values) where arithmetic or pointer type is required
  return (v128_t)(a_ > b_ ? a_ : b_);
                  ~~~~~~~ ^
12 errors generated.

I'm guessing this is due to a53e9e7, so maybe @tlively will want to take a look? Here is an example of a failed build on CI, which includes the build commands: https://travis-ci.org/nemequ/simde/jobs/659017514.

nemequ added a commit to simd-everywhere/simde that referenced this issue Mar 6, 2020
@tlively
Copy link
Member

tlively commented Mar 6, 2020

Thanks for the report! This is strange because that change passed our CI just fine. I’ll investigate more today.

@tlively
Copy link
Member

tlively commented Mar 6, 2020

It turns out that these errors are generated when compiling as C, but not C++. A fix will require adding a new builtin function to clang. It shouldn't take too long.

@nemequ
Copy link
Author

nemequ commented Mar 9, 2020

CI isn't failing for me anymore, so I guess the changes made it out to LLVM? I don't want to close this in case something is still pending, but from my perspective it seems resolved. Thanks, @tlively!

@tlively
Copy link
Member

tlively commented Mar 9, 2020

Yes, this has been resolved and is fixed in the emscripten version tagged this morning.

@tlively tlively closed this as completed Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants