aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul
diff options
context:
space:
mode:
authorChristian Parpart <christian@parpart.family>2018-11-07 18:18:02 +0800
committerChristian Parpart <christian@ethereum.org>2018-11-16 20:15:41 +0800
commitf705a45d43d69ca4f29bd496d091f7237bdc31ff (patch)
treee176c4b1d512bc9f2b0e0353a125a535ccf69691 /test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul
parent460c58fbd194fef5add699405238d3ed302a003f (diff)
downloaddexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.tar.gz
dexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.tar.zst
dexon-solidity-f705a45d43d69ca4f29bd496d091f7237bdc31ff.zip
[Yul] Implements a pass to rewrite for-loop's pre block into the parent's Block.
Diffstat (limited to 'test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul')
-rw-r--r--test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul b/test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul
new file mode 100644
index 00000000..05aceb52
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/forLoopInitRewriter/empty_pre.yul
@@ -0,0 +1,20 @@
+{
+ let a := 1
+ for {} iszero(eq(a, 10)) { a := add(a, 1) } {
+ a := add(a, 1)
+ }
+}
+// ----
+// forLoopInitRewriter
+// {
+// let a := 1
+// for {
+// }
+// iszero(eq(a, 10))
+// {
+// a := add(a, 1)
+// }
+// {
+// a := add(a, 1)
+// }
+// }