Redundant ISZERO
and PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND
in covertType
#15190
Labels
ISZERO
and PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND
in covertType
#15190
Environment
version: 0.8.25
setting: --optimize-runs: 20000
Description
The above code can generate the following opcodes:
There are four consecutive
ISZERO
operations. The last two are redundant because they do not change the result.Similarly, there are three consecutive
PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND
operations. The last two are also redundant because they do not change the result.solidity/libsolidity/codegen/CompilerUtils.cpp
Lines 1171 to 1197 in 0f98226
solidity/libsolidity/codegen/CompilerUtils.cpp
Lines 231 to 236 in 0f98226
Two
ISZERO
are generated at line 1194 in the functionconvertType
, while the other two are generated at line 233 in the functionstoreInMemoryDynamic
.solidity/libsolidity/codegen/LValue.cpp
Lines 276 to 280 in 0f98226
One
PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND
is generated at line 279 in the functionretrieveValue
, another at line 1194 in the functionconvertType
, and the last one at line 233 in the functionstoreInMemoryDynamic
.Is it possible to remove the two redundant
ISZERO
and the two redundantPUSH AND
?The text was updated successfully, but these errors were encountered: