From 707442e0915dd7fdbfc5742b04ef16429373075a Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 8 Oct 2024 10:01:29 +0700 Subject: [PATCH] Bug fix in &scorr. --- src/aig/gia/giaEquiv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/aig/gia/giaEquiv.c b/src/aig/gia/giaEquiv.c index 09def827d..e4f5a0d25 100644 --- a/src/aig/gia/giaEquiv.c +++ b/src/aig/gia/giaEquiv.c @@ -2770,7 +2770,10 @@ void Gia_ManTransferEquivs2( Gia_Man_t * p, Gia_Man_t * pOld ) { Vec_IntClear( vClass ); Gia_ClassForEachObj( p, i, k ) - Vec_IntPushUnique( vClass, Abc_Lit2Var(Gia_ManObj(p, k)->Value) ); + if ( (int)Gia_ManObj(p, k)->Value >= 0 ) + Vec_IntPushUnique( vClass, Abc_Lit2Var(Gia_ManObj(p, k)->Value) ); + if ( Vec_IntSize( vClass ) <= 1 ) + continue; assert( Vec_IntSize( vClass ) > 1 ); Vec_IntSort( vClass, 0 ); iRepr = Vec_IntEntry( vClass, 0 );