summaryrefslogtreecommitdiffstats
path: root/src/map/scl/sclUpsize.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/scl/sclUpsize.c')
-rw-r--r--src/map/scl/sclUpsize.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/scl/sclUpsize.c b/src/map/scl/sclUpsize.c
index f1e0fbd9..1bfc1d56 100644
--- a/src/map/scl/sclUpsize.c
+++ b/src/map/scl/sclUpsize.c
@@ -338,7 +338,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
SC_Cell * pCellOld, * pCellNew;
Vec_Ptr_t * vFanouts;
Vec_Int_t * vRecalcs, * vEvals;
- Abc_Obj_t * pBuf, * pFanin, * pFanout, * pExtra = NULL;
+ Abc_Obj_t * pBuf, * pFanin, * pFanout, * pExtra;
int i, j, iNode, gateBest, gateBest2, fanBest, Counter = 0;
float dGainBest, dGainBest2;
@@ -355,6 +355,7 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
pFanin = Abc_ObjFanin0(pBuf);
if ( !Abc_ObjIsNode(pFanin) )
continue;
+ pExtra = NULL;
if ( p->pNtk->vPhases == NULL )
{
if ( Abc_SclIsInv(pBuf) )
@@ -388,6 +389,9 @@ int Abc_SclFindBypasses( SC_Man * p, Vec_Int_t * vPathNodes, int Ratio, int Notc
// skip if fanin already has fanout as a fanout
if ( Abc_NodeFindFanin(pFanout, pFanin) >= 0 )
continue;
+ // skip if fanin already has fanout as a fanout
+ if ( pExtra && Abc_NodeFindFanin(pFanout, pExtra) >= 0 )
+ continue;
// prepare
Abc_SclLoadStore3( p, pBuf );
Abc_SclUpdateLoadSplit( p, pBuf, pFanout );