Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

any_true instructions should be untyped #416

Closed
Maratyszcza opened this issue Dec 29, 2020 · 3 comments
Closed

any_true instructions should be untyped #416

Maratyszcza opened this issue Dec 29, 2020 · 3 comments

Comments

@Maratyszcza
Copy link
Contributor

any_true SIMD instruction returns 1 if any lane is non-zero and returns 0 otherwise. Notably, the result does not depend on whether we look at 8-bit, 16-bit, 32-bit, or 64-bit lanes: if the SIMD vector has any bit set, the result is 1; otherwise, the result is 0. Therefore, it would make sense to replace i8x16.any_true, i16x8.any_true, i32x4.any_true, and i64x2.any_true with a single v128.any_true instruction.

@lars-t-hansen
Copy link
Contributor

I more or less agree - in Firefox the any_true implementations boil away and uniformly become v128.any_bit_set. There's no clear reason to have multiple ops.

@dtig
Copy link
Member

dtig commented Jan 5, 2021

No objections to v128.any_true operation, V8 generates the same code for all the variants as well.

@Maratyszcza
Copy link
Contributor Author

Was implemented in #423

ngzhian added a commit to ngzhian/simd that referenced this issue Jan 22, 2021
This was accepted in WebAssembly#416.

The test code is manually modified (this is not generated code), to
always call v128.any_true. The exported function names are unchanged,
and no tests are removed, since it is useful to test v128 of
different constants.
ngzhian added a commit that referenced this issue Jan 26, 2021
This was accepted in #416.

The test code is manually modified (this is not generated code), to
always call v128.any_true. The exported function names are unchanged,
and no tests are removed, since it is useful to test v128 of
different constants.
ngzhian added a commit to ngzhian/simd that referenced this issue Jan 26, 2021
The renaming was accepted in WebAssembly#416. Interpreter was changed in WebAssembly#426. This
makes similar changes to the formal text.
ngzhian added a commit to ngzhian/simd that referenced this issue Jan 26, 2021
The renaming was accepted in WebAssembly#416. Interpreter was changed in WebAssembly#426. This
makes similar changes to the formal text.
ngzhian added a commit that referenced this issue Jan 27, 2021
The renaming was accepted in #416. Interpreter was changed in #426. This
makes similar changes to the formal text.
tlively added a commit to tlively/emscripten that referenced this issue Feb 2, 2021
These instructions were removed from the spec proposal and from V8 because they
were redundant with i8x16.any_true, which has identical semantics. Since they
were removed from V8, these tests started failing. This PR fixes the breakage by
removing the obsolete tests. See WebAssembly/simd#416.
tlively added a commit to emscripten-core/emscripten that referenced this issue Feb 2, 2021
These instructions were removed from the spec proposal and from V8 because they
were redundant with i8x16.any_true, which has identical semantics. Since they
were removed from V8, these tests started failing. This PR fixes the breakage by
removing the obsolete tests. See WebAssembly/simd#416.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants