Bug fix in &fx.

This commit is contained in:
Alan Mishchenko 2024-02-05 19:29:50 -08:00
parent 62a22c7574
commit d7ef3cc030
1 changed files with 7 additions and 0 deletions

View File

@ -150,6 +150,13 @@ Vec_Wrd_t * Gia_ManComputeTruths( Gia_Man_t * p, int nCutSize, int nLutNum, int
// collect and sort fanins
vLeaves.nCap = vLeaves.nSize = Gia_ObjLutSize( p, i );
vLeaves.pArray = Gia_ObjLutFanins( p, i );
if( !Vec_IntCheckUniqueSmall(&vLeaves) )
{
Vec_IntUniqify(&vLeaves);
Vec_IntWriteEntry(p->vMapping, Vec_IntEntry(p->vMapping, i), vLeaves.nSize);
for ( k = 0; k < vLeaves.nSize; k++ )
Vec_IntWriteEntry(p->vMapping, Vec_IntEntry(p->vMapping, i) + 1 + k, vLeaves.pArray[k]);
}
assert( Vec_IntCheckUniqueSmall(&vLeaves) );
Vec_IntSelectSort( Vec_IntArray(&vLeaves), Vec_IntSize(&vLeaves) );
if ( !fReverse )