This appears to be caused by the ordering of the if statement checking types.
<rdar://problem/100981070>
Juliana, do you have a reproduction test case? Can we also have more context on the claim you made in the description https://bugs.webkit.org/show_bug.cgi?id=245966#c0?
(In reply to Mark Lam from comment #2) > Juliana, do you have a reproduction test case? Can we also have more > context on the claim you made in the description > https://bugs.webkit.org/show_bug.cgi?id=245966#c0? You can step through `createJSToWasmWrapper` in a debugger on RISC-V while running this code: https://github.com/xanlpz/wasm-tests/blob/main/tests/i32stackargs.js
This is RISC-Vās specific bug.