aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
diff options
context:
space:
mode:
Diffstat (limited to 'test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul')
-rw-r--r--test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul b/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
new file mode 100644
index 00000000..8f70a79d
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
@@ -0,0 +1,24 @@
+{
+ let a := 1
+ let b := 2
+ switch number()
+ case 1 { b := a }
+ default { let x := a let y := b b := a }
+ pop(add(a, b))
+}
+// ----
+// rematerialiser
+// {
+// let a := 1
+// let b := 2
+// switch number()
+// case 1 {
+// b := 1
+// }
+// default {
+// let x := 1
+// let y := b
+// b := 1
+// }
+// pop(add(1, b))
+// }