Merge pull request #13040 from ethereum/returndatacopyOptimizer

Do not remove potentially reverting returndatacopy cases.
This commit is contained in:
chriseth
2022-05-23 11:32:26 +02:00
committed by GitHub
6 changed files with 73 additions and 1 deletions
@@ -0,0 +1,9 @@
{
returndatacopy(0,0,32)
}
// ====
// EVMVersion: >homestead
// ----
// step: unusedStoreEliminator
//
// { { returndatacopy(0, 0, 32) } }
@@ -0,0 +1,15 @@
{
returndatacopy(0,0,returndatasize())
}
// ====
// EVMVersion: >homestead
// ----
// step: unusedStoreEliminator
//
// {
// {
// let _1 := returndatasize()
// let _2 := 0
// let _3 := 0
// }
// }
@@ -0,0 +1,13 @@
{
returndatacopy(0,1,returndatasize())
}
// ====
// EVMVersion: >homestead
// ----
// step: unusedStoreEliminator
//
// {
// {
// returndatacopy(0, 1, returndatasize())
// }
// }
@@ -0,0 +1,16 @@
{
let s := returndatasize()
returndatacopy(0,0,s)
}
// ====
// EVMVersion: >homestead
// ----
// step: unusedStoreEliminator
//
// {
// {
// let s := returndatasize()
// let _1 := 0
// let _2 := 0
// }
// }