aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/forLoopInitRewriter/complex_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/complex_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/complex_pre.yul')
-rw-r--r--test/libyul/yulOptimizerTests/forLoopInitRewriter/complex_pre.yul23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/forLoopInitRewriter/complex_pre.yul b/test/libyul/yulOptimizerTests/forLoopInitRewriter/complex_pre.yul
new file mode 100644
index 00000000..3ca00f55
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/forLoopInitRewriter/complex_pre.yul
@@ -0,0 +1,23 @@
+{
+ let random := 42
+ for { let a := 1
+ let b := 1 } iszero(eq(a, 10)) { a := add(a, b) } {
+ a := add(a, 1)
+ }
+}
+// ----
+// forLoopInitRewriter
+// {
+// let random := 42
+// let a := 1
+// let b := 1
+// for {
+// }
+// iszero(eq(a, 10))
+// {
+// a := add(a, b)
+// }
+// {
+// a := add(a, 1)
+// }
+// }