-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
SIMD code does not validate as asm.js. #2855
Comments
Emscripten is anticipating the spec change to add int32x4 notEqual: Odin does not yet implement this, though there's a preliminary patch on this bug: |
Thanks - so Emscripten is more up to date than current FF Nightly and once 1072368 lands, FF Nightly should start validating what Emscripten is currently spewing out? |
Hmm nm actually, I see that there are other todos as well. If I try to work around this manually by avoiding the use of functions that are not yet implemented, that I need to remove the following lines from the compiled code:
and after that, I get a failure |
Btw, is |
Yes, fromInt32x44Bits was a typo. Fixed now. |
I've updated the pull request branch for the SSE1 tests and benchmarks to latest at #2792 . Testing with Emscripten and Nightly today, there are still validation errors. I ran a new benchmark at http://clb.demon.fi/dump/results_sse1_20141024.html If you want to reproduce locally, you can run
to set up, and
to run the correctness test, and
to run the benchmark suite. When the benchmark suite finishes, it generates a file |
Just rebased the #2792 to latest incoming
@juj and @sunfishcode , how about merge juj/sse1 branch? Then fix the failure cases. |
I've updated the pull request with the rebase and updated the |
@juj , thanks much for your efforts. Your change looks good to me. @sunfishcode , any thoughts? |
ping @sunfishcode |
On the failures: It's not surprising that rcp and rsqrt are failing, as the polyfill probably isn't approximating the approximation closely enough ;-). For and, andnot, etc., is this a NaN canonicalization issue, due to the polyfill being unable to do a bitcast from int32 to float32 without NaN canonicalizing? For _mm_ucomieq_ss, this instruction does not handle NaN the same way '==' does, so we'll need to do something else there. We're unlikely to be able to support _mm_cvtss_si32 or _mm_cvt_ss2si because we're unlikely to support dynamic rounding modes (for the forseeable future). I'll take a look at the pull request soon too see what makes sense there. |
Works in current incoming. |
Marking this down from earlier discussions. If one compiles SIMD-utilizing code with Emscripten, the linker will complain
as a workaround, one must go to the compiled output, and search-replace the string
"almost asm"
to"use asm"
to have the output enable asm.js in the browser. However, doing so and trying to run in current Firefox Nightly (FF 35.0a1 2014-10-02) gives the following asm.js validation errorwhen compiling e.g. https://github.com/juj/emscripten/blob/sse1/tests/benchmark_sse1.cpp
The text was updated successfully, but these errors were encountered: