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

29 lines
561 B
Plaintext
Raw Normal View History

2018-10-02 08:46:59 +00:00
// An earlier version of the inliner produced
// pop(...) statements and explicitly removed them.
// This used to test that they are removed.
2018-10-11 15:14:59 +00:00
{
function f(a) -> x {
let r := mul(a, a)
x := add(r, r)
}
pop(add(f(7), 2))
}
2019-04-01 14:33:46 +00:00
// ====
// step: fullInliner
2018-10-11 15:14:59 +00:00
// ----
// {
// {
// let _1 := 2
// let a_5 := 7
// let x_6 := 0
// let r_7 := mul(a_5, a_5)
// x_6 := add(r_7, r_7)
// pop(add(x_6, _1))
2018-10-11 15:14:59 +00:00
// }
// function f(a) -> x
// {
// let r := mul(a, a)
// x := add(r, r)
// }
// }