Reassign test for remat.

This commit is contained in:
chriseth 2018-02-02 15:24:38 +01:00
parent 2b6a7665ee
commit 773be40c19

View File

@ -74,6 +74,14 @@ BOOST_AUTO_TEST_CASE(expression)
);
}
BOOST_AUTO_TEST_CASE(reassign)
{
CHECK(
"{ let a := extcodesize(0) let b := a let c := b a := 2 let d := add(b, c) pop(a) pop(b) pop(c) pop(d) }",
"{ let a := extcodesize(0) let b := a let c := a a := 2 let d := add(b, c) pop(2) pop(b) pop(c) pop(add(b, c)) }"
);
}
BOOST_AUTO_TEST_CASE(non_movable_instr)
{
CHECK(