aboutsummaryrefslogtreecommitdiffstats
path: root/test/libyul/yulOptimizerTests/ssaTransform/branches.yul
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-10-17 05:47:02 +0800
committerchriseth <chris@ethereum.org>2018-10-19 00:56:22 +0800
commit465845b7a7e41345c47722bf7f2fcbd8b48248db (patch)
tree10f936061e8033eb9bfd07761b97a97a05d4f14f /test/libyul/yulOptimizerTests/ssaTransform/branches.yul
parent7609e2871e77b623d4c6187b7ebed693ce74cd0e (diff)
downloaddexon-solidity-465845b7a7e41345c47722bf7f2fcbd8b48248db.tar.gz
dexon-solidity-465845b7a7e41345c47722bf7f2fcbd8b48248db.tar.zst
dexon-solidity-465845b7a7e41345c47722bf7f2fcbd8b48248db.zip
SSA transform - first step.
Diffstat (limited to 'test/libyul/yulOptimizerTests/ssaTransform/branches.yul')
-rw-r--r--test/libyul/yulOptimizerTests/ssaTransform/branches.yul25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/ssaTransform/branches.yul b/test/libyul/yulOptimizerTests/ssaTransform/branches.yul
new file mode 100644
index 00000000..c089fe70
--- /dev/null
+++ b/test/libyul/yulOptimizerTests/ssaTransform/branches.yul
@@ -0,0 +1,25 @@
+{
+ let a := 1
+ a := add(a, 1)
+ if a {
+ a := add(a, 1)
+ }
+ a := add(a, 1)
+ mstore(a, 1)
+}
+// ----
+// ssaTransform
+// {
+// let a_1 := 1
+// let a := a_1
+// let a_2 := add(a_1, 1)
+// a := a_2
+// if a_2
+// {
+// let a_3 := add(a_2, 1)
+// a := a_3
+// }
+// let a_4 := add(a, 1)
+// a := a_4
+// mstore(a_4, 1)
+// }