diff options
Diffstat (limited to 'src/aig/gia/giaMuxes.c')
-rw-r--r-- | src/aig/gia/giaMuxes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aig/gia/giaMuxes.c b/src/aig/gia/giaMuxes.c index 085dca77..a4764e65 100644 --- a/src/aig/gia/giaMuxes.c +++ b/src/aig/gia/giaMuxes.c @@ -48,6 +48,7 @@ Gia_Man_t * Gia_ManDupMuxes( Gia_Man_t * p ) Gia_Obj_t * pObj, * pFan0, * pFan1, * pFanC; int i; assert( p->pMuxes == NULL ); + Gia_ManCreateRefs( p ); // start the new manager pNew = Gia_ManStart( 5000 ); pNew->pName = Abc_UtilStrsav( p->pName ); @@ -62,7 +63,7 @@ Gia_Man_t * Gia_ManDupMuxes( Gia_Man_t * p ) Gia_ManHashStart( pNew ); Gia_ManForEachAnd( p, pObj, i ) { - if ( !Gia_ObjIsMuxType(pObj) ) + if ( !Gia_ObjIsMuxType(pObj) || (Gia_ObjRefNum(p, Gia_ObjFanin0(pObj)) > 1 && Gia_ObjRefNum(p, Gia_ObjFanin1(pObj)) > 1) ) pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); else if ( Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) ) pObj->Value = Gia_ManHashXorReal( pNew, Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan0)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan1)) ); |