Merge pull request #31 from davidar/fix-55

Fix Assertion using &if: `pCutSet->nCuts > 0'
This commit is contained in:
N. Engelhardt 2024-04-11 14:41:43 +02:00 committed by GitHub
commit 078afe9faa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -444,7 +444,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->Delay = If_CutDelay( p, pObj, pCut );
if ( pCut->Delay == -1 )
continue;
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon )
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon && pCutSet->nCuts > 0 )
continue;
// compute area of the cut (this area may depend on the application specific cost)
pCut->Area = (Mode == 2)? If_CutAreaDerefed( p, pCut ) : If_CutAreaFlow( p, pCut );
@ -542,7 +542,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
continue;
// check if the cut satisfies the required times
// assert( pCut->Delay == If_CutDelay( p, pTemp, pCut ) );
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon )
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon && pCutSet->nCuts > 0 )
continue;
// set the phase attribute
pCut->fCompl = pObj->fPhase ^ pTemp->fPhase;