Skip to content

Conversation

@dcodeIO
Copy link
Contributor

@dcodeIO dcodeIO commented Sep 10, 2019

In #2328 the SIMDBitselect API has been replaced with SIMDTernary that now has Bitselect as one of multiple operations, which is currently not exposed, unlike the new QFMA/QFMS operations which are exposed. This PR adds it.

Makes me wonder how the binaryen/kitchen-sink.js test passed, though, because it should be missing the operation id. Isn't binaryen.js being built and tested anymore? Or did I miss something? Edit: Ah, I think it worked because Bitselect = 0, respectively undefined = 0.

@kripken kripken requested a review from tlively September 10, 2019 21:20
@kripken
Copy link
Member

kripken commented Sep 10, 2019

Thanks @dcodeIO! I think this is good but let's verify with @tlively

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops! Thanks for the catch. My guess is that the JS magically worked because undefined was coerced to zero which happened to be the correct value.

I think it would be good to put the bitselect functions up above the qfma functions though, just so they are all grouped together.

@dcodeIO
Copy link
Contributor Author

dcodeIO commented Sep 11, 2019

Just figured that there's actually a BinaryenBitselectVec128 in binaryen-c.cpp already, and it only was missing in the other files. The ordering of the existing function appears to adhere to Vec128 before F32x4 before F64x2 - that ok?

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@tlively tlively merged commit bcd80a9 into WebAssembly:master Sep 11, 2019
dcodeIO added a commit to AssemblyScript/assemblyscript that referenced this pull request Sep 14, 2019
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

Successfully merging this pull request may close these issues.

3 participants