aboutsummaryrefslogtreecommitdiffstats
path: root/test/libjulia/yulOptimizerTests/fullInliner/inside_condition.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/fullInliner/inside_condition.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/fullInliner/inside_condition.yul')
-rw-r--r--test/libjulia/yulOptimizerTests/fullInliner/inside_condition.yul32
1 files changed, 32 insertions, 0 deletions
diff --git a/test/libjulia/yulOptimizerTests/fullInliner/inside_condition.yul b/test/libjulia/yulOptimizerTests/fullInliner/inside_condition.yul
new file mode 100644
index 00000000..ae25e9a3
--- /dev/null
+++ b/test/libjulia/yulOptimizerTests/fullInliner/inside_condition.yul
@@ -0,0 +1,32 @@
+// This tests that breaking the expression inside the condition works properly.
+{
+ if gt(f(mload(1)), mload(0)) {
+ sstore(0, 2)
+ }
+ function f(a) -> r {
+ a := mload(a)
+ r := add(a, calldatasize())
+ }
+}
+// ----
+// fullInliner
+// {
+// {
+// let _1 := mload(0)
+// let f_a := mload(1)
+// let f_r
+// {
+// f_a := mload(f_a)
+// f_r := add(f_a, calldatasize())
+// }
+// if gt(f_r, _1)
+// {
+// sstore(0, 2)
+// }
+// }
+// function f(a) -> r
+// {
+// a := mload(a)
+// r := add(a, calldatasize())
+// }
+// }