mirror of https://github.com/zachjs/sv2v.git
more aggressive expression simplification
This commit is contained in:
parent
9036bbabe4
commit
df4244d8d5
|
|
@ -73,6 +73,8 @@ convertExpr info (Mux cc aa bb) =
|
|||
after = simplify before
|
||||
convertExpr _ (other @ Repeat{}) = traverseNestedExprs simplify other
|
||||
convertExpr _ (other @ Concat{}) = simplify other
|
||||
convertExpr _ (other @ BinOp{}) = simplify other
|
||||
convertExpr _ (other @ UniOp{}) = simplify other
|
||||
convertExpr _ other = other
|
||||
|
||||
substitute :: Info -> Expr -> Expr
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ readNumber n =
|
|||
readMaybe n' :: Maybe Int
|
||||
where
|
||||
n' = case n of
|
||||
'3' : '2' : '\'' : 'd' : rest -> rest
|
||||
'\'' : 'd' : rest -> rest
|
||||
_ -> n
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue