aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/firrtl/PrimOps.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/firrtl/PrimOps.scala')
-rw-r--r--src/main/scala/firrtl/PrimOps.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/scala/firrtl/PrimOps.scala b/src/main/scala/firrtl/PrimOps.scala
index cf2cb74e..a736dc3d 100644
--- a/src/main/scala/firrtl/PrimOps.scala
+++ b/src/main/scala/firrtl/PrimOps.scala
@@ -132,12 +132,12 @@ object PrimOps extends LazyLogging {
case (IntWidth(i), IntWidth(j)) => IntWidth(min(i,j))
case _ => MinWidth(Seq(w1, w2))
}
- def t1 = e.args(0).tpe
+ def t1 = e.args.head.tpe
def t2 = e.args(1).tpe
def t3 = e.args(2).tpe
- def w1 = passes.getWidth(e.args(0).tpe)
+ def w1 = passes.getWidth(e.args.head.tpe)
def w2 = passes.getWidth(e.args(1).tpe)
- def c1 = IntWidth(e.consts(0))
+ def c1 = IntWidth(e.consts.head)
def c2 = IntWidth(e.consts(1))
e copy (tpe = (e.op match {
case Add => (t1, t2) match {