You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This introduces the zero_extend expression, which, given a bit-vector
operand and a type, either
a) pads the given operand with zeros from the left if the given type is
wider than the type of the operand, or
b) truncates the operand to the width of the given type if the given type is
smaller than the operand, or
c) casts the operand to the given type if the width of the type and the
width of the operand match.
This is easier to read and less prone to error than the current pattern, in
which the operand is 1) converted to an unsigned type of the same width, and
then 2) casted to an unsigned type of the wider width, and 3) finally casted
to the target type.
0 commit comments