Summary
On loom v1.1.3 (550d3c0b, post-#147), inline_functions reverts every i64 function inline — even a trivial one — because the translation validator can't prove i64 inlines sound. The hang from #147 is fixed (it now terminates and reverts cleanly), but the net effect is that the verified inliner is a no-op for any i64-returning function.
This blocks the use case #147 was meant to re-enable: dissolving the gale C↔Rust seam, where gale_k_sem_give_decide(...) -> i64 must inline into z_impl_k_sem_give.
Minimal reproduction
(module
(func $add1 (param i64) (result i64) (i64.add (local.get 0) (i64.const 1)))
(func $c (export "c") (param i64) (result i64) (call $add1 (local.get 0))))
loom optimize i64inline.wat --passes inline --stats -o /dev/null
Instructions: 5 → 5 (0.0% reduction)
(no effect: inline)
🔁 Verification Reverts
inline_functions 1 function(s) reverted
Total: 1 revert(s)
✅ Optimization complete!
$add1 is as simple as an i64 callee gets (one i64.add of a constant), and it is still reverted. Same result on the real gale seam (merged.both.wasm: z_impl inlining gale_k_sem_give_decide -> i64) → 1 revert, no inline.
Ask
#147 added the Z3 per-query timeout so i64 inline verification terminates (thank you — confirmed, 9 ms now). The follow-up is to make it succeed: teach the validator to prove i64 inlines sound (width-correct i64 substitution / equality under the inlined body) so they aren't reverted. Until then the verified inliner can't optimize any i64-bearing module, and the LTO-parity seam-dissolution path stays closed.
If the i64 inline verification is known-incomplete by design for now, a note in --stats (e.g. "reverted: i64 inline unproven") vs a generic revert would make it clear the revert is a verifier-capability gap rather than an unsound-inline rejection.
Environment
- loom v1.1.3 (
550d3c0b), --passes inline
- trivial repro above; real case =
merged.both.wasm (WAT in synth#167 gist)
Summary
On loom v1.1.3 (
550d3c0b, post-#147),inline_functionsreverts every i64 function inline — even a trivial one — because the translation validator can't prove i64 inlines sound. The hang from #147 is fixed (it now terminates and reverts cleanly), but the net effect is that the verified inliner is a no-op for any i64-returning function.This blocks the use case #147 was meant to re-enable: dissolving the gale C↔Rust seam, where
gale_k_sem_give_decide(...) -> i64must inline intoz_impl_k_sem_give.Minimal reproduction
$add1is as simple as an i64 callee gets (onei64.addof a constant), and it is still reverted. Same result on the real gale seam (merged.both.wasm:z_implinlininggale_k_sem_give_decide -> i64) → 1 revert, no inline.Ask
#147 added the Z3 per-query timeout so i64 inline verification terminates (thank you — confirmed, 9 ms now). The follow-up is to make it succeed: teach the validator to prove i64 inlines sound (width-correct i64 substitution / equality under the inlined body) so they aren't reverted. Until then the verified inliner can't optimize any i64-bearing module, and the LTO-parity seam-dissolution path stays closed.
If the i64 inline verification is known-incomplete by design for now, a note in
--stats(e.g. "reverted: i64 inline unproven") vs a generic revert would make it clear the revert is a verifier-capability gap rather than an unsound-inline rejection.Environment
550d3c0b),--passes inlinemerged.both.wasm(WAT in synth#167 gist)