You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 22, 2021. It is now read-only.
Allow out-of-range lane indices in swizzle and shuffle instructions #11
As part of #8 I had the opportunity to research the availability and performance of general-purpose shuffle instructions like pshufb. These instructions are widely available and behave like a v8x16.swizzle where the lane indices are provided as an i8x16 vector register instead of as immediate operands. Lanes with an out-of-range selector become 0 in the output vector.
The WebAssembly shuffle and swizzle instructions proposed in #1 can be extended to allow for immediate lane indices that are too large. The corresponding lanes in the output vector would be 0.
Having the possibility of zeroed lanes in the output makes it simpler to combine shuffle results with other vectors using v128.or.
We shouldn't add this feature without examples of code where it is useful.
PR #30 adds shuffleVar/permuteVar which appear to be equivalent to swizzle (but it also implements it for all other vector lane combinations) . Why was swizzle removed ?
Activity
gnzlbg commentedon Aug 8, 2018
PR #30 adds
shuffleVar/permuteVarwhich appear to be equivalent toswizzle(but it also implements it for all other vector lane combinations) . Why wasswizzleremoved ?Add v8x16.shuffle1 instruction (#71)