solidity/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_simple.yul

30 lines
519 B
Plaintext
Raw Normal View History

2020-08-20 14:56:25 +00:00
{
sstore(f(1), 1)
sstore(f(2), 1)
sstore(f(3), 1)
function f(a) -> x {
// The usage of a is redundant
a := calldataload(0)
mstore(a, x)
// to prevent f from getting inlined
if iszero(a) { leave }
2020-08-20 14:56:25 +00:00
}
}
// ----
// step: fullSuite
//
// {
// {
// f()
// f()
// f()
2021-05-05 16:02:35 +00:00
// sstore(0, 1)
// }
// function f()
// {
// let a := calldataload(0)
// mstore(a, 0)
// if iszero(a) { leave }
2020-08-20 14:56:25 +00:00
// }
// }