aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-12 21:15:41 +0800
committerGitHub <noreply@github.com>2018-10-12 21:15:41 +0800
commit1d312c8e4073e2e7ce9a23a721013942e1e5c727 (patch)
treeaed816fd4530a0dcf2b20ad4ac6b3daad060fae2 /test/libjulia/yulOptimizerTests/rematerialiser/branches_switch.yul
parent5f5dc8956d39ab19c5408aa4c39a3cd10d3a2dec (diff)
parenta937a449df81928437bb6f367289c776fe842dc9 (diff)
downloaddexon-solidity-1d312c8e4073e2e7ce9a23a721013942e1e5c727.tar.gz
dexon-solidity-1d312c8e4073e2e7ce9a23a721013942e1e5c727.tar.zst
dexon-solidity-1d312c8e4073e2e7ce9a23a721013942e1e5c727.zip
Merge pull request #5203 from ethereum/moveMoreYulTests
Move more yul optimizer tests
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))
+// }