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
We used mlirIntegerAttrGet to construct constants in MLIR, and the C-API accepts int64_t for a value. The reproducible example has a 65-bit value, therefore overflowed to 0.
There is a negative sign in the literal for UInt. Not sure if this is causing any problems. Could simply get an absolute value to ensure consistent output.
val shift_s_zero = (BigInt(0)).S >> in
val shift_s_neg1 = (BigInt(-1)).S >> in
val shift_s_pos1 = (BigInt(1)).S >> in
# Expected outputs
node shift_zero = dshr(asSInt(UInt<1>(0h0)), in)
node shift_neg1 = dshr(asSInt(UInt<1>(0h1)), in)
node shift_pos1 = dshr(asSInt(UInt<2>(0h1)), in)
# Binder outputs
node shift_zero = dshr(asSInt(UInt<1>(0)), in)
node shift_neg1 = dshr(asSInt(UInt<1>(-1)), in)
node shift_pos1 = dshr(asSInt(UInt<2>(1)), in)
https://github.com/ucb-bar/berkeley-hardfloat/blob/b3c8a38c286101973b3bc071f7918392343faba7/hardfloat/src/main/scala/primitives.scala#L76
Right outputs
Binder generates
The text was updated successfully, but these errors were encountered: