aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul14
-rw-r--r--test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul12
2 files changed, 26 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul b/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul
new file mode 100644
index 00000000..51f5df40
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/expressionSimplifier/assigned_vars_multi.yul
@@ -0,0 +1,14 @@
+{
+ function f() -> x, z {}
+ let c, d := f()
+ let y := add(d, add(c, 7))
+}
+// ----
+// expressionSimplifier
+// {
+// function f() -> x, z
+// {
+// }
+// let c, d := f()
+// let y := add(add(d, c), 7)
+// }
diff --git a/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul
new file mode 100644
index 00000000..8c1ad789
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/expressionSimplifier/unassigend_vars_multi.yul
@@ -0,0 +1,12 @@
+// c & d can't be optimized as expression simplifier doesn't handle default
+// values yet
+{
+ let c, d
+ let y := add(d, add(c, 7))
+}
+// ----
+// expressionSimplifier
+// {
+// let c, d
+// let y := add(add(d, c), 7)
+// }