[llvm] [WebAssembly] Implement addrspacecast to funcref (PR #166820)

Demetrius Kanios via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 5 10:19:39 PST 2025


QuantumSegfault wrote:

I see what's happening.

There's a mismatch in Wasm64 between the table types, the type TABLE_GET expects, and what I'm giving it.

TABLE_GET only ever expects i32 as an index. However, in Wasm64, tables can have either i32 or i64 indices. However we aren't consistent about it. It seems that the `__indirect_function_table` is using i64 indices, but other module-defined ones are still i32. I was trying to pass an i64 index in, but TABLE_GET can't support that.

Should we move to i64 across the board (why wasn't this done?)? That way we can make TABLE_GET and TABLE_SET address mode aware.

Either that or we need a different ISD node to be 64-bit aware while the existing one remains not.

https://github.com/llvm/llvm-project/pull/166820


More information about the llvm-commits mailing list