Closed
Description
Bug description
I'm trying to compile some code that uses v128.store8_lane():
v128.store8_lane(i, v, 0, CHANNEL_R);
But I get the following compiler error:
[wasm-validator error in function src/assembly/wasm-util/wBayerToImageData] unexpected false: can only drop a valid value, on
(drop
(v128.store8_lane 0
(local.get $35)
(local.get $38)
)
)
This seems to be because the declaration of the function is:
export function store8_lane(ptr: usize, vec: v128, idx: u8, immOffset?: usize, immAlign?: usize): v128;
implying that it returns a value. However, the specification at https://github.com/WebAssembly/simd/blob/main/proposals/simd/SIMD.md implies there is no result left on the stack after one of these instructions, so the drop()
is unnecessary.
Steps to reproduce
Compile an AssemblyScript function that uses the v128.store8_lane()
function.
AssemblyScript version
0.27.4