diff options
author | Christian Parpart <christian@parpart.family> | 2018-10-15 18:30:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-15 18:30:00 +0800 |
commit | b2b845d6def4d28215c5d591589555bd8f4ea6ab (patch) | |
tree | a8501e929c94a7d36e69a6350e98c68556fe9038 /test/libyul/yulOptimizerTests/expressionSplitter/switch.yul | |
parent | b965fd6e17f77e94afeb070a27182251b85b8ab3 (diff) | |
parent | 1304361b9c48438d5c55903492b5f11c3dac73e5 (diff) | |
download | dexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.tar.gz dexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.tar.zst dexon-solidity-b2b845d6def4d28215c5d591589555bd8f4ea6ab.zip |
Merge pull request #5220 from ethereum/libjulia-to-libyul
Renames `libjulia` directory to `libyul` & namespace `dev::julia` to `dev::yul`
Diffstat (limited to 'test/libyul/yulOptimizerTests/expressionSplitter/switch.yul')
-rw-r--r-- | test/libyul/yulOptimizerTests/expressionSplitter/switch.yul | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/libyul/yulOptimizerTests/expressionSplitter/switch.yul b/test/libyul/yulOptimizerTests/expressionSplitter/switch.yul new file mode 100644 index 00000000..aee7976f --- /dev/null +++ b/test/libyul/yulOptimizerTests/expressionSplitter/switch.yul @@ -0,0 +1,33 @@ +{ + let x := 8 + switch add(2, calldataload(0)) + case 0 { sstore(0, mload(2)) } + default { mstore(0, mload(3)) } + x := add(mload(3), 4) +} +// ---- +// expressionSplitter +// { +// let x := 8 +// let _1 := 0 +// let _2 := calldataload(_1) +// let _3 := 2 +// let _4 := add(_3, _2) +// switch _4 +// case 0 { +// let _5 := 2 +// let _6 := mload(_5) +// let _7 := 0 +// sstore(_7, _6) +// } +// default { +// let _8 := 3 +// let _9 := mload(_8) +// let _10 := 0 +// mstore(_10, _9) +// } +// let _11 := 4 +// let _12 := 3 +// let _13 := mload(_12) +// x := add(_13, _11) +// } |