2020-03-09 21:14:07 +00:00
|
|
|
contract C {
|
2020-05-11 22:06:25 +00:00
|
|
|
function f(int256 a, uint256 b) public returns (int256) {
|
2020-03-09 21:14:07 +00:00
|
|
|
return a >> b;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-20 21:16:42 +00:00
|
|
|
// ====
|
|
|
|
// compileViaYul: also
|
2020-03-09 21:14:07 +00:00
|
|
|
// ----
|
2020-05-11 22:06:25 +00:00
|
|
|
// f(int256,uint256): -4266, 0 -> -4266
|
|
|
|
// f(int256,uint256): -4266, 1 -> -2133
|
|
|
|
// f(int256,uint256): -4266, 4 -> -267
|
|
|
|
// f(int256,uint256): -4266, 8 -> -17
|
|
|
|
// f(int256,uint256): -4266, 16 -> -1
|
|
|
|
// f(int256,uint256): -4266, 17 -> -1
|
|
|
|
// f(int256,uint256): -4267, 0 -> -4267
|
|
|
|
// f(int256,uint256): -4267, 1 -> -2134
|
|
|
|
// f(int256,uint256): -4267, 4 -> -267
|
|
|
|
// f(int256,uint256): -4267, 8 -> -17
|
|
|
|
// f(int256,uint256): -4267, 16 -> -1
|
|
|
|
// f(int256,uint256): -4267, 17 -> -1
|