aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul')
-rw-r--r--test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul b/test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul
new file mode 100644
index 00000000..d021129f
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/expressionSplitter/control_flow.yul
@@ -0,0 +1,40 @@
+{
+ let x := calldataload(0)
+ if mul(add(x, 2), 3) {
+ for { let a := 2 } lt(a, mload(a)) { a := add(a, mul(a, 2)) } {
+ let b := mul(add(a, 2), 4)
+ sstore(b, mul(b, 2))
+ }
+ }
+}
+// ----
+// expressionSplitter
+// {
+// let _1 := 0
+// let x := calldataload(_1)
+// let _2 := 3
+// let _3 := 2
+// let _4 := add(x, _3)
+// let _5 := mul(_4, _2)
+// if _5
+// {
+// for {
+// let a := 2
+// }
+// lt(a, mload(a))
+// {
+// let _6 := 2
+// let _7 := mul(a, _6)
+// a := add(a, _7)
+// }
+// {
+// let _8 := 4
+// let _9 := 2
+// let _10 := add(a, _9)
+// let b := mul(_10, _8)
+// let _11 := 2
+// let _12 := mul(b, _11)
+// sstore(b, _12)
+// }
+// }
+// }