aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-10-15 21:17:20 +0800
committerChristian Parpart <christian@ethereum.org>2018-10-16 00:21:34 +0800
commit04612936c2ceb41e1c63bfa637eb65f000319c23 (patch)
treebacc0409559b46e2eb00f25f9872280da30a268e /test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul
parent238494752192a2c834eb8913b244671afb48d693 (diff)
downloaddexon-solidity-04612936c2ceb41e1c63bfa637eb65f000319c23.tar.gz
dexon-solidity-04612936c2ceb41e1c63bfa637eb65f000319c23.tar.zst
dexon-solidity-04612936c2ceb41e1c63bfa637eb65f000319c23.zip
Yul: Introduces a block flattening pass + tests
Diffstat (limited to 'test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul')
-rw-r--r--test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul b/test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul
new file mode 100644
index 00000000..4d6ccf0e
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/blockFlattener/if_stmt.yul
@@ -0,0 +1,20 @@
+{
+ if add(mload(7), sload(mload(3)))
+ {
+ let y := add(mload(3), 3)
+ {
+ y := add(y, 7)
+ }
+ }
+ let t := add(3, 9)
+}
+// ----
+// blockFlattener
+// {
+// if add(mload(7), sload(mload(3)))
+// {
+// let y := add(mload(3), 3)
+// y := add(y, 7)
+// }
+// let t := add(3, 9)
+// }