aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul')
-rw-r--r--test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul b/test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul
new file mode 100644
index 00000000..0e4e540e
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/expressionJoiner/switch_expression.yul
@@ -0,0 +1,28 @@
+{
+ let a := mload(3)
+ let b := sload(a)
+ let c := mload(7)
+ let d := add(c, b)
+ switch d
+ case 3 {
+ let x := mload(3)
+ let y := add(x, 3)
+ }
+ default {
+ sstore(1, 0)
+ }
+ let z := 3
+ let t := add(z, 9)
+}
+// ----
+// expressionJoiner
+// {
+// switch add(mload(7), sload(mload(3)))
+// case 3 {
+// let y := add(mload(3), 3)
+// }
+// default {
+// sstore(1, 0)
+// }
+// let t := add(3, 9)
+// }