solidity/test/libyul/yulOptimizerTests/ssaPlusCleanup/control_structures.yul

41 lines
980 B
Plaintext
Raw Normal View History

2018-10-23 13:55:48 +00:00
{
function copy(from, to) -> length {
length := mload(from)
mstore(to, length)
from := add(from, 0x20)
to := add(to, 0x20)
let x := 1
for { } lt(x, length) { x := add(x, 0x20) } {
2018-10-23 13:55:48 +00:00
mstore(add(to, x), mload(add(from, x)))
}
}
}
// ----
// step: ssaPlusCleanup
//
2018-10-23 13:55:48 +00:00
// {
// function copy(from, to) -> length
// {
// let from_6 := from
// let to_7 := to
// let length_1 := mload(from_6)
2018-10-23 13:55:48 +00:00
// length := length_1
// mstore(to_7, length_1)
// let from_2 := add(from_6, 0x20)
// let to_3 := add(to_7, 0x20)
// let x_4 := 1
// let x := x_4
// for { }
2018-10-23 13:55:48 +00:00
// lt(x, length_1)
// {
// let x_9 := x
// let x_5 := add(x_9, 0x20)
// x := x_5
2018-10-23 13:55:48 +00:00
// }
// {
// let x_8 := x
// mstore(add(to_3, x_8), mload(add(from_2, x_8)))
2018-10-23 13:55:48 +00:00
// }
// }
// }