diff options
author | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-10 15:43:21 -0700 |
---|---|---|
committer | Alon Zakai (kripken) <alonzakai@gmail.com> | 2017-07-11 11:07:45 -0700 |
commit | 5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c (patch) | |
tree | 1e4a19d462d105d006f2413e10f2b7cd91d42d42 /src/passes/Vacuum.cpp | |
parent | 987003944456c3d04f74c12067ac950feca1a81e (diff) | |
download | binaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.tar.gz binaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.tar.bz2 binaryen-5c4c6ba03e1c42cee86e580c09b8c66a6bb1a71c.zip |
properly handle if arm removal in vacuum
Diffstat (limited to 'src/passes/Vacuum.cpp')
-rw-r--r-- | src/passes/Vacuum.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp index 4adfc1289..b58bea4b3 100644 --- a/src/passes/Vacuum.cpp +++ b/src/passes/Vacuum.cpp @@ -204,9 +204,13 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum>> { Expression* child; if (value->value.getInteger()) { child = curr->ifTrue; + if (curr->ifFalse) { + typeUpdater.noteRecursiveRemoval(curr->ifFalse); + } } else { if (curr->ifFalse) { child = curr->ifFalse; + typeUpdater.noteRecursiveRemoval(curr->ifTrue); } else { ExpressionManipulator::nop(curr); return; |