summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/if/ifMap.c')
-rw-r--r--src/map/if/ifMap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index bd8ebed7..f234d354 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -225,7 +225,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
if ( p->pPars->fPower )
pCut->Power = (Mode == 2)? If_CutPowerDerefed( p, pCut, pObj ) : If_CutPowerFlow( p, pCut, pObj );
// save the best cut from the previous iteration
- if ( !fPreprocess )
+ if ( !fPreprocess || pCut->nLeaves <= 1 )
If_CutCopy( p, pCutSet->ppCuts[pCutSet->nCuts++], pCut );
}
@@ -516,7 +516,8 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
// remove elementary cuts
for ( pTemp = pObj; pTemp; pTemp = pTemp->pEquiv )
- pTemp->pCutSet->nCuts--;
+ if ( pTemp != pObj || pTemp->pCutSet->nCuts > 1 )
+ pTemp->pCutSet->nCuts--;
// update the cutset of the node
pCutSet = pObj->pCutSet;