-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Labels
in-overviewInstruction has been added to Overview.mdInstruction has been added to Overview.mdinstruction-proposal
Description
- What are the instructions being proposed?
relaxed i8x16.swizzle
- What are the semantics of these instructions?
relaxed i8x16.swizzle(a, s)
selects lanes from a
using indices in s
, indices in the range [0,15]
will select the i
-th element of a
, the result for any out of range indices is implementation-defined (i.e. if the index is [16-255]
.
- How will these instructions be implemented? Give examples for at least
x86-64 and ARM64. Also provide reference implementation in terms of 128-bit
Wasm SIMD.
x86/64, pshufb
, out of range indices will return different results:
- if top bit of index is set, return 0
- else select the
i % 16
-th element
ARM/ARM64, vtbl
and tbl
, out of range indices return 0.
RISC-V V vrgather.vv a, b
, out of range return 0 (assuming VEW set to 8, LMUL set to 1, VLEN set to 128, so VLMAX = 16).
Simd128, i8x16.swizzle
- How does behavior differ across processors? What new fingerprinting surfaces will be exposed?
Difference between x86/64 and ARM/ARM64
- What use cases are there?
Swizzle is quite a common operation, e.g. used in multiple places in meshoptimizer.
Metadata
Metadata
Assignees
Labels
in-overviewInstruction has been added to Overview.mdInstruction has been added to Overview.mdinstruction-proposal