Ruiyang Xu
Ruiyang Xu
Thanks for sharing, and I'll read it carefully.
A missed optimization opportunity here ``` webassembly (block $block (result i32) .. (drop (br_if $block (value) (condition) ) ) ... (value) ) => (block $block (result i32) .. (drop (condition)...
A DFS traversal could solve? But, is the optimization worth it for this particular pattern? What do you think?
That was a clear explanation; I understand now. The `i32.load` (with side-effect) in the calculation for `$0` prevents the SimplifyLocals from inlining calculation into the `if` condition. Without such inlining,...
Below is the change made by `RemoveUnusedBrs`:  I think it is the `restructureIf` that causes degradation, for it converts the `block with br_if ` structure into `if` statement. What's...
The issue involved (`unsigned(x) >= 0 => i32(1)`) in this PR is a mirror of the previously fixed issue #7455 (for `unsigned(x) < 0 => i32(0)`), so I think it...
Does it cost too much to add a new pass which **basically runs `ChildLocalizer` on all expressions**? For my experience on this family of bugs, `wasm-opt` can handle most cases...
Okay, looking forward to your experiments.
I think it is the `CoalesceLocals` pass that pollutes the unused block removal by introducing the `local.tee` instruction, and the `local.tee` hinders the analysis of the condition of first `br_if`....
Yes, I've seen that it also fixes #7659 --- the family of issues could be fixed. In doing this, we don't bother to add patch one by one which is...