Closed Maratyszcza closed 3 years ago
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.
No objections to v128.any_true operation, V8 generates the same code for all the variants as well.
Was implemented in #423
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 replacei8x16.any_true
,i16x8.any_true
,i32x4.any_true
, andi64x2.any_true
with a singlev128.any_true
instruction.