mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Optimize iszero(sub(x, y)) to eq(x, y).
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
let a := calldataload(0)
|
||||
let b := calldataload(0x20)
|
||||
let x := sub(a, b)
|
||||
if gt(x, 0) {
|
||||
sstore(0, 1)
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// step: expressionSimplifier
|
||||
//
|
||||
// {
|
||||
// let _1 := 0
|
||||
// let a := calldataload(_1)
|
||||
// if iszero(eq(a, calldataload(0x20))) { sstore(_1, 1) }
|
||||
// }
|
||||
Reference in New Issue
Block a user