solidity/test/libyul/yulOptimizerTests/fullInliner/inside_condition.yul

31 lines
602 B
Plaintext
Raw Normal View History

2018-10-15 10:51:50 +00:00
// This tests that splitting the expression inside the condition works properly.
2018-10-11 15:14:59 +00:00
{
if gt(f(mload(1)), mload(0)) {
sstore(0, 2)
}
function f(a) -> r {
a := mload(a)
r := add(a, calldatasize())
}
}
// ----
// fullInliner
// {
// {
2018-10-02 08:46:59 +00:00
// let _2 := mload(0)
2018-10-11 15:14:59 +00:00
// let f_a := mload(1)
2018-12-13 14:38:14 +00:00
// let f_r := 0
2018-10-02 08:46:59 +00:00
// f_a := mload(f_a)
// f_r := add(f_a, calldatasize())
// if gt(f_r, _2)
2018-10-11 15:14:59 +00:00
// {
// sstore(0, 2)
// }
// }
// function f(a) -> r
// {
// a := mload(a)
// r := add(a, calldatasize())
// }
// }