Yul: Fix cleanup for left shift of bytes types.

This commit is contained in:
chriseth 2021-08-04 13:48:39 +02:00
parent 2d5b9036c2
commit 0112fed73b
2 changed files with 3 additions and 3 deletions

View File

@ -445,7 +445,7 @@ string YulUtilFunctions::typedShiftLeftFunction(Type const& _type, Type const& _
Whiskers(R"(
function <functionName>(value, bits) -> result {
bits := <cleanAmount>(bits)
result := <cleanup>(<shift>(bits, value))
result := <cleanup>(<shift>(bits, <cleanup>(value)))
}
)")
("functionName", functionName)

View File

@ -13,8 +13,8 @@ contract C {
}
}
// ====
// compileViaYul: true
// compileToEwasm: also
// compileViaYul: true
// ----
// l(uint8): 64 -> 0x3930313233343536373839306162636465000000000000000000000000000000
// l(uint8): 64 -> 0x3930313233343536373839300000000000000000000000000000000000000000
// r(uint8): 64 -> 0x313233343536373839303132000000000000000000000000