aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/splitJoin/functions.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libyul/yulOptimizerTests/splitJoin/functions.yul')
-rw-r--r--test/libyul/yulOptimizerTests/splitJoin/functions.yul30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/splitJoin/functions.yul b/test/libyul/yulOptimizerTests/splitJoin/functions.yul
new file mode 100644
index 00000000..549fc550
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/splitJoin/functions.yul
@@ -0,0 +1,30 @@
+{
+ let x := f(0)
+ function f(y) -> r {
+ r := mload(mul(6, add(y, 0x20)))
+ }
+ for { let a := 2 } lt(a, mload(a)) { a := add(a, mul(a, 2)) } {
+ let b := mul(add(a, f(a)), 4)
+ sstore(b, mul(b, 2))
+ }
+}
+// ----
+// splitJoin
+// {
+// let x := f(0)
+// function f(y) -> r
+// {
+// r := mload(mul(6, add(y, 0x20)))
+// }
+// for {
+// let a := 2
+// }
+// lt(a, mload(a))
+// {
+// a := add(a, mul(a, 2))
+// }
+// {
+// let b := mul(add(a, f(a)), 4)
+// sstore(b, mul(b, 2))
+// }
+// }