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

31 lines
609 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)
// let a_10 := mload(1)
// let r_11 := 0
// a_10 := mload(a_10)
// r_11 := add(a_10, calldatasize())
// if gt(r_11, _2)
2018-10-11 15:14:59 +00:00
// {
// sstore(0, 2)
// }
// }
// function f(a) -> r
// {
// a := mload(a)
// r := add(a, calldatasize())
// }
// }