diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/passes/ConstProp.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/scala/firrtl/passes/ConstProp.scala b/src/main/scala/firrtl/passes/ConstProp.scala index 8736ee31..bb3fb1e8 100644 --- a/src/main/scala/firrtl/passes/ConstProp.scala +++ b/src/main/scala/firrtl/passes/ConstProp.scala @@ -196,8 +196,8 @@ object ConstProp extends Pass { case _ => e } case Pad => e.args.head match { - case UIntLiteral(v, _) => UIntLiteral(v, IntWidth(e.consts.head)) - case SIntLiteral(v, _) => SIntLiteral(v, IntWidth(e.consts.head)) + case UIntLiteral(v, IntWidth(w)) => UIntLiteral(v, IntWidth(e.consts.head max w)) + case SIntLiteral(v, IntWidth(w)) => SIntLiteral(v, IntWidth(e.consts.head max w)) case _ if bitWidth(e.args.head.tpe) == e.consts.head => e.args.head case _ => e } |
