Open
Description
From what I can see, the only way to create a v128 zero vector (for example to do unrolled memsets) is a full v128_const, weighing in at around 18 bytes (painful since my JIT is limited to 4kb). i64_const + splat would be one smaller encoding, but it doesn't look like v8 optimizes that, and it's probably unreasonable to expect it to get optimized. It might be good to try and add a v128_const_zero or v128_const_splat equivalent in any future iteration of SIMD, I can imagine this being even worse when wider vector types are added. Maybe this only needs to happen in the binary format, but it wouldn't be backwards compatible to change the existing opcode.