solidity/test/libyul/yulOptimizerTests/ssaTransform/for_reassign_init.yul
chriseth 711ed588d7 Require for loop init rewriter for SSA.
Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
2020-07-03 19:24:31 +02:00

21 lines
344 B
Plaintext

{
let a := mload(0)
for { a := add(a, 3) } a { mstore(0, a) }
{
mstore(0, a)
}
mstore(0, a)
}
// ----
// step: ssaTransform
//
// {
// let a_1 := mload(0)
// let a := a_1
// let a_2 := add(a_1, 3)
// a := a_2
// for { } a_2 { mstore(0, a_2) }
// { mstore(0, a_2) }
// mstore(0, a_2)
// }