You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After investigating, it is the Wasm-specific optimization simplify-locals causes the counter-intuitive code. Below is the change made by simplify-locals:
As you can see, the currently wasm-opt cannot optimize the if condition on the right---it can only do that on the left, which I think it is missed optimization (It is not the simplify-locals fault...).
Activity
[optimize-instructions] Fold relational comparisons of tee/get pairs
ConstraintAnalysis: Optimize self-comparisons (x ? x) (WebAssembly#9252)