This input:
(component
(core module $M
(memory (export "mem") 1)
(func (export "writeit") (param i32 i32)
(i32.store (local.get 0) (local.get 1)))
)
(core instance $m (instantiate $M))
(core module $N
(import "" "mem" (memory 1))
(import "" "writeit" (func $writeit (param i32 i32)))
(func (export "g") (result i32)
(i32.load (i32.const 0))
drop
(call $writeit (i32.const 0) (i32.const 123))
(i32.load (i32.const 0)))
)
(core instance $n (instantiate $N
(with "" (instance
(export "mem" (memory $m "mem"))
(export "writeit" (func $m "writeit"))))))
(func (export "g") (result u32) (canon lift (core func $n "g"))))
changes behavior with inlining:
$ cargo run -- -C inlining=n --invoke 'g()' repro.wat
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.15s
Running `/home/alex/code/wasmtime2/target/debug/wasmtime -C inlining=n --invoke 'g()' repro.wat`
123
$ cargo run -- -C inlining=y --invoke 'g()' repro.wat
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
Running `/home/alex/code/wasmtime2/target/debug/wasmtime -C inlining=y --invoke 'g()' repro.wat`
0
An LLM-produced report is here and this looks like a regression after #13525 and #13354 -- cc @fitzgen
This input:
changes behavior with inlining:
An LLM-produced report is here and this looks like a regression after #13525 and #13354 -- cc @fitzgen