aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia/yulOptimizerTests')
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/functions.yul8
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/intermediate_assignment.yul11
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/intermediate_multi_assignment.yul16
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/multi_assign.yul16
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/multi_assignments.yul12
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/multi_declarations.yul7
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/multi_declare.yul12
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/multi_partial_assignments.yul10
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/smoke.yul5
-rw-r--r--test/libjulia/yulOptimizerTests/unusedPruner/trivial.yul10
10 files changed, 107 insertions, 0 deletions
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/functions.yul b/test/libjulia/yulOptimizerTests/unusedPruner/functions.yul
new file mode 100644
index 00000000..ec9cdda8
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/functions.yul
@@ -0,0 +1,8 @@
+{
+ function f() { let a := 1 }
+ function g() { f() }
+}
+// ----
+// unusedPruner
+// {
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_assignment.yul b/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_assignment.yul
new file mode 100644
index 00000000..4ed6dd2c
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_assignment.yul
@@ -0,0 +1,11 @@
+{
+ let a := 1
+ a := 4
+ let b := 1
+}
+// ----
+// unusedPruner
+// {
+// let a := 1
+// a := 4
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_multi_assignment.yul b/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_multi_assignment.yul
new file mode 100644
index 00000000..94d101e9
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/intermediate_multi_assignment.yul
@@ -0,0 +1,16 @@
+{
+ let a, b
+ function f() -> x { }
+ a := f()
+ b := 1
+}
+// ----
+// unusedPruner
+// {
+// let a, b
+// function f() -> x
+// {
+// }
+// a := f()
+// b := 1
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/multi_assign.yul b/test/libjulia/yulOptimizerTests/unusedPruner/multi_assign.yul
new file mode 100644
index 00000000..a14dc28c
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/multi_assign.yul
@@ -0,0 +1,16 @@
+{
+ let a
+ let b
+ function f() -> x, y { }
+ a, b := f()
+}
+// ----
+// unusedPruner
+// {
+// let a
+// let b
+// function f() -> x, y
+// {
+// }
+// a, b := f()
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/multi_assignments.yul b/test/libjulia/yulOptimizerTests/unusedPruner/multi_assignments.yul
new file mode 100644
index 00000000..fe94edb8
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/multi_assignments.yul
@@ -0,0 +1,12 @@
+{
+ let x, y
+ x := 1
+ y := 2
+}
+// ----
+// unusedPruner
+// {
+// let x, y
+// x := 1
+// y := 2
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/multi_declarations.yul b/test/libjulia/yulOptimizerTests/unusedPruner/multi_declarations.yul
new file mode 100644
index 00000000..3cf35007
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/multi_declarations.yul
@@ -0,0 +1,7 @@
+{
+ let x, y
+}
+// ----
+// unusedPruner
+// {
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/multi_declare.yul b/test/libjulia/yulOptimizerTests/unusedPruner/multi_declare.yul
new file mode 100644
index 00000000..adabac87
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/multi_declare.yul
@@ -0,0 +1,12 @@
+{
+ function f() -> x, y { }
+ let a, b := f()
+}
+// ----
+// unusedPruner
+// {
+// function f() -> x, y
+// {
+// }
+// let a, b := f()
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/multi_partial_assignments.yul b/test/libjulia/yulOptimizerTests/unusedPruner/multi_partial_assignments.yul
new file mode 100644
index 00000000..5db0ade9
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/multi_partial_assignments.yul
@@ -0,0 +1,10 @@
+{
+ let x, y
+ x := 1
+}
+// ----
+// unusedPruner
+// {
+// let x, y
+// x := 1
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/smoke.yul b/test/libjulia/yulOptimizerTests/unusedPruner/smoke.yul
new file mode 100644
index 00000000..ca2ed942
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/smoke.yul
@@ -0,0 +1,5 @@
+{ }
+// ----
+// unusedPruner
+// {
+// }
diff --git a/test/libjulia/yulOptimizerTests/unusedPruner/trivial.yul b/test/libjulia/yulOptimizerTests/unusedPruner/trivial.yul
new file mode 100644
index 00000000..9b4cf9fd
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/unusedPruner/trivial.yul
@@ -0,0 +1,10 @@
+{
+ let a := 1
+ let b := 1
+ mstore(0, 1)
+}
+// ----
+// unusedPruner
+// {
+// mstore(0, 1)
+// }