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
Wasm.simd Negation, Splat, ReplaceLane + tests #3237
Conversation
@Cellule @MikeHolman please ignore this PR for now until I fix any possible issues w/ x-plat. fyi @arunetm |
test/wasm.simd/replaceLaneTests.js
Outdated
let typeIndex = Math.log2(len) - 2; | ||
let arr = arrays [typeIndex]; | ||
|
||
if (len == 32) { //special case for floats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could change the indexing to a dict w/ an array view per each type where the type comes from a test name if this version is too ugly :-)
@Cellule could you please take a look when you have a moment? The tests seem to have cleared |
@Cellule hate to bug you that often; could you please take a look when you have a moment? |
Reviewed 15 of 15 files at r1. lib/WasmReader/WasmByteCodeGenerator.cpp, line 1286 at r1 (raw file):
I think I would put the code in lib/WasmReader/WasmByteCodeGenerator.cpp, line 1303 at r1 (raw file):
use test/wasm.simd/replaceLaneTests.js, line 31 at r1 (raw file): Previously, Krovatkin (Nick Korovaiko) wrote…
Yeah this is a little hard to read and it feels hacky. I would just pass the typed array and the length by arguments. test/wasm.simd/rlexe.xml, line 47 at r1 (raw file):
This is not needed, rl will do a second run with prejit test/wasm.simd/rlexe.xml, line 59 at r1 (raw file):
This is not needed, rl will do a second run with prejit Comments from Reviewable |
Review status: 10 of 15 files reviewed at latest revision, 5 unresolved discussions. lib/WasmReader/WasmByteCodeGenerator.cpp, line 1286 at r1 (raw file): Previously, Cellule (Michael Ferris) wrote…
yup, looks much better that way lib/WasmReader/WasmByteCodeGenerator.cpp, line 1303 at r1 (raw file): Previously, Cellule (Michael Ferris) wrote…
fixed test/wasm.simd/replaceLaneTests.js, line 31 at r1 (raw file): Previously, Cellule (Michael Ferris) wrote…
I tried passing both, the array view and length, and it seems like a lot of boilerplate that can be avoided. Also, it makes harder to add new tests since w/ two additional parameters it's easier to pass the wrong thing.
https://github.com/Krovatkin/ChakraCore/blob/b998a530697ff2902e8666c6847f2798148ab8cc/test/wasm.simd/splatNegTests.js#L34 But if you insist on passing those as extra parameters, we could definitely do it. test/wasm.simd/rlexe.xml, line 47 at r1 (raw file): Previously, Cellule (Michael Ferris) wrote…
fixed test/wasm.simd/rlexe.xml, line 59 at r1 (raw file): Previously, Cellule (Michael Ferris) wrote…
fixed Comments from Reviewable |
Reviewed 5 of 5 files at r2. test/wasm.simd/replaceLaneTests.js, line 31 at r1 (raw file): Previously, Krovatkin (Nick Korovaiko) wrote…
This looks pretty good! Comments from Reviewable |
I'll try to merge it this afternoon |
extractlane fix add missing wasm files for negation and splat tests addressing Mike's feedback
@Cellule Thank you very much! |
Merge pull request #3237 from Krovatkin:replacelane This PR includes: * Negation op + tests * Splat op + tests * ReplaceLane op + tests
@Cellule, awesome! Thanks a lot! |
This PR includes:
This change is