solidity/test/libyul/yulOptimizerTests/fullSuite/unusedFunctionParameterPruner_simple.yul
Harikrishnan Mulackal 974e35d09c Tests and changelog
2020-09-03 13:15:38 +02:00

37 lines
659 B
Plaintext

{
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 getting fully inlined
sstore(1, 1)
sstore(2, 2)
sstore(3, 3)
sstore(3, 3)
}
}
// ----
// step: fullSuite
//
// {
// {
// f()
// sstore(0, 1)
// f()
// sstore(0, 1)
// f()
// sstore(0, 1)
// }
// function f()
// {
// mstore(calldataload(0), 0)
// sstore(1, 1)
// sstore(2, 2)
// sstore(3, 3)
// sstore(3, 3)
// }
// }