aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-06-30 21:37:46 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-07-01 04:27:39 +0800
commit11dd89c70b07062ddc97e5b82a135f8109836eb6 (patch)
treee9989180b8fa24392e4224de3498ae813fc57030 /test
parent32d6c1c3168dc19ef818e5ff605af3a40f5601e8 (diff)
downloaddexon-solidity-11dd89c70b07062ddc97e5b82a135f8109836eb6.tar.gz
dexon-solidity-11dd89c70b07062ddc97e5b82a135f8109836eb6.tar.zst
dexon-solidity-11dd89c70b07062ddc97e5b82a135f8109836eb6.zip
Removed useless test.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityOptimizer.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/test/libsolidity/SolidityOptimizer.cpp b/test/libsolidity/SolidityOptimizer.cpp
index 7afbe04e..a4d80c99 100644
--- a/test/libsolidity/SolidityOptimizer.cpp
+++ b/test/libsolidity/SolidityOptimizer.cpp
@@ -697,59 +697,6 @@ BOOST_AUTO_TEST_CASE(cse_interleaved_storage_at_known_location_offset)
});
}
-BOOST_AUTO_TEST_CASE(cse_interleaved_memory_at_known_location_offset)
-{
- // stores and reads to/from two locations which are known to be different,
- // should not optimize away the first store, because the location overlaps with the load,
- // but it should optimize away the second, because we know that the location is different by 32
- AssemblyItems input{
- u256(0x50),
- Instruction::DUP2,
- u256(2),
- Instruction::ADD,
- Instruction::MSTORE, // ["DUP1"+2] = 0x50
- u256(0x60),
- Instruction::DUP2,
- u256(32),
- Instruction::ADD,
- Instruction::MSTORE, // ["DUP1"+32] = 0x60
- Instruction::DUP1,
- Instruction::MLOAD, // read from "DUP1"
- u256(0x70),
- Instruction::DUP3,
- u256(32),
- Instruction::ADD,
- Instruction::MSTORE, // ["DUP1"+32] = 0x70
- u256(0x80),
- Instruction::DUP3,
- u256(2),
- Instruction::ADD,
- Instruction::MSTORE, // ["DUP1"+2] = 0x80
- };
- // If the actual code changes too much, we could also simply check that the output contains
- // exactly 3 MSTORE and exactly 1 MLOAD instruction.
- checkCSE(input, {
- u256(0x50),
- u256(2),
- Instruction::DUP3,
- Instruction::ADD,
- Instruction::SWAP1,
- Instruction::DUP2,
- Instruction::MSTORE, // ["DUP1"+2] = 0x50
- Instruction::DUP2,
- Instruction::MLOAD, // read from "DUP1"
- u256(0x70),
- u256(32),
- Instruction::DUP5,
- Instruction::ADD,
- Instruction::MSTORE, // ["DUP1"+32] = 0x70
- u256(0x80),
- Instruction::SWAP1,
- Instruction::SWAP2,
- Instruction::MSTORE // ["DUP1"+2] = 0x80
- });
-}
-
BOOST_AUTO_TEST_CASE(cse_deep_stack)
{
AssemblyItems input{