diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-12-11 14:49:31 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-11 14:49:31 -0800 |
commit | acd786dbd1e59f9d105c4ec8603c2ff46f233649 (patch) | |
tree | ad9bd1806729dfd2c6973929d57d7aa9ee756fc9 /test/passes/souperify.txt | |
parent | 8dd1b2d545ea5ecf6bce90ce726dd95d319b5d63 (diff) | |
download | binaryen-acd786dbd1e59f9d105c4ec8603c2ff46f233649.tar.gz binaryen-acd786dbd1e59f9d105c4ec8603c2ff46f233649.tar.bz2 binaryen-acd786dbd1e59f9d105c4ec8603c2ff46f233649.zip |
Fix loop parent computation in DataFlow.Graph (#2522)
This fixes the parent-child relationship computation in `DataFlow.Graph`
when there is a loop. This wasn't discovered until now because this is
used in Souperify and Souperify only runs after Flatten pass, which
produces redundant blocks between inside and outside of a loop.
Diffstat (limited to 'test/passes/souperify.txt')
-rw-r--r-- | test/passes/souperify.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/passes/souperify.txt b/test/passes/souperify.txt new file mode 100644 index 000000000..657f6e523 --- /dev/null +++ b/test/passes/souperify.txt @@ -0,0 +1,26 @@ + +; function: if-loop-test + +; start LHS (in if-loop-test) +%0 = sub 0:i32, 0:i32 +%1 = ne 0:i32, 0:i32 +pc %1 1:i1 +infer %0 + +(module + (type $FUNCSIG$v (func)) + (func $if-loop-test (; 0 ;) (type $FUNCSIG$v) + (local $0 i32) + (if + (i32.const 0) + (loop $label$0 + (local.set $0 + (i32.sub + (i32.const 0) + (i32.const 0) + ) + ) + ) + ) + ) +) |