diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-23 18:12:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-24 09:10:13 -0700 |
commit | c2dfbb512297e0d008de6ffad4a97799e68b3ed1 (patch) | |
tree | eeee4ee7128477c2c7810c8357eb22fd94e72998 /src | |
parent | 759bafb906ba3addc5ab470ca41455ef452f30ab (diff) | |
download | binaryen-c2dfbb512297e0d008de6ffad4a97799e68b3ed1.tar.gz binaryen-c2dfbb512297e0d008de6ffad4a97799e68b3ed1.tar.bz2 binaryen-c2dfbb512297e0d008de6ffad4a97799e68b3ed1.zip |
vacuum dead code after br_table
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/Vacuum.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index ed868f2f9..12565f603 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -43,7 +43,8 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum, Visitor<Vacuum>>> { } // if this is an unconditional br, the rest is dead code Break* br = list[z - skip]->dynCast<Break>(); - if (br && !br->condition) { + Switch* sw = list[z - skip]->dynCast<Switch>(); + if ((br && !br->condition) || sw) { list.resize(z - skip + 1); needResize = false; break; |