mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not mask with 160-bits after CREATE/CREATE2
This commit is contained in:
parent
7aa2ee1775
commit
1272951bbb
@ -13,6 +13,7 @@ Compiler Features:
|
||||
* Optimizer: Add new rules with constants including ``LT``, ``GT``, ``AND`` and ``BYTE``.
|
||||
* Optimizer: Add rule for shifts with constants for Constantinople.
|
||||
* Optimizer: Combine multiple shifts with constant shift-by values into one.
|
||||
* Optimizer: Do not mask with 160-bits after ``CREATE`` and ``CREATE2`` as they are guaranteed to return an address or 0.
|
||||
* Optimizer: Support shifts in the constant optimiser for Constantinople.
|
||||
* Yul Optimizer: Add rule to replace switch statements with const expr. with matching case body
|
||||
|
||||
|
@ -237,7 +237,9 @@ std::vector<SimplificationRule<Pattern>> simplificationRuleListPart5(
|
||||
Instruction::ADDRESS,
|
||||
Instruction::CALLER,
|
||||
Instruction::ORIGIN,
|
||||
Instruction::COINBASE
|
||||
Instruction::COINBASE,
|
||||
Instruction::CREATE,
|
||||
Instruction::CREATE2
|
||||
})
|
||||
{
|
||||
u256 const mask = (u256(1) << 160) - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user