diff options
author | Alon Zakai <azakai@google.com> | 2022-10-21 14:53:53 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 14:53:53 -0700 |
commit | 3e57307715e7f7c9f2f7cbc38f2bbcbb936af104 (patch) | |
tree | fad81725032391ccf66f13117c06427ff357ca04 /src/passes/CodePushing.cpp | |
parent | 32423c6c83882c04ae37e90a18be78aa9db4a242 (diff) | |
download | binaryen-3e57307715e7f7c9f2f7cbc38f2bbcbb936af104.tar.gz binaryen-3e57307715e7f7c9f2f7cbc38f2bbcbb936af104.tar.bz2 binaryen-3e57307715e7f7c9f2f7cbc38f2bbcbb936af104.zip |
[Wasm GC] Support BrOn* in CodePushing (#5177)
Diffstat (limited to 'src/passes/CodePushing.cpp')
-rw-r--r-- | src/passes/CodePushing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/passes/CodePushing.cpp b/src/passes/CodePushing.cpp index c71078558..1b253c6ea 100644 --- a/src/passes/CodePushing.cpp +++ b/src/passes/CodePushing.cpp @@ -134,14 +134,14 @@ private: return nullptr; } - // Push past conditional control flow. + // Try to push past conditional control flow. // TODO: push into ifs as well bool isPushPoint(Expression* curr) { // look through drops if (auto* drop = curr->dynCast<Drop>()) { curr = drop->value; } - if (curr->is<If>()) { + if (curr->is<If>() || curr->is<BrOn>()) { return true; } if (auto* br = curr->dynCast<Break>()) { |