Merge pull request #11595 from ethereum/issue-11526

Fix yul codegen bug when using binary negation.
This commit is contained in:
chriseth
2021-06-30 11:55:42 +02:00
committed by GitHub
5 changed files with 25 additions and 8 deletions
@@ -236,8 +236,6 @@ object "C_81" {
let expr_25 := checked_exp_t_rational_2_by_1_t_uint256(expr_24)
/// @src 0:187,200
let var_w_22 := expr_25
/// @src 0:214,215
let expr_29 := 0x02
/// @src 0:213,215
let expr_30 := 0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe
/// @src 0:212,216
@@ -285,8 +283,6 @@ object "C_81" {
/// @src 0:303,313
var_w_22 := expr_56
let expr_57 := expr_56
/// @src 0:323,324
let expr_60 := 0x01
/// @src 0:322,324
let expr_61 := 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
/// @src 0:321,325
@@ -0,0 +1,11 @@
contract C {
function f() public returns (bool) {
return
0 <
~~84926290883049832306107864558384249403874903260938453235235091622489261765859;
}
}
// ====
// compileViaYul: also
// ----
// f() -> true