CodeGen: Avoid double cleanup when copying to memory

This commit is contained in:
Mathias Baumann
2020-07-16 13:53:48 +02:00
committed by Mathias Baumann
parent f47981d484
commit d3af598c49
4 changed files with 20 additions and 9 deletions
+2 -1
View File
@@ -718,7 +718,8 @@ BOOST_AUTO_TEST_CASE(avoid_double_cleanup)
}
)";
compileBothVersions(sourceCode, 0, "C", 50);
BOOST_CHECK_EQUAL(numInstructions(m_nonOptimizedBytecode, Instruction::AND), 2);
// Check that there is no double AND instruction in the resulting code
BOOST_CHECK_EQUAL(numInstructions(m_nonOptimizedBytecode, Instruction::AND), 1);
}
BOOST_AUTO_TEST_SUITE_END()