From 38a1e77921392db550c6830496057de09da6383b Mon Sep 17 00:00:00 2001 From: EPTansuo Date: Fri, 26 Dec 2025 11:41:38 +0800 Subject: [PATCH] Compute levels for dangling choice nodes before asserting --- src/aig/gia/giaIf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index cfbf01a70..01dc26109 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -831,6 +831,10 @@ int Gia_ManChoiceLevel( Gia_Man_t * p ) LevelMax = Gia_ObjLevel(p, pObj); // Abc_Print( 1, "%d ", Gia_ObjLevel(p, pObj) ); } + // compute levels for dangling nodes (can happen after choice-creating flows) + Gia_ManForEachAnd( p, pObj, i ) + if ( !Gia_ObjIsTravIdCurrent( p, pObj ) ) + Gia_ManChoiceLevel_rec( p, pObj ); // Abc_Print( 1, "\n" ); Gia_ManForEachAnd( p, pObj, i ) assert( Gia_ObjLevel(p, pObj) > 0 ); @@ -3257,4 +3261,3 @@ Gia_Man_t * Gia_ManDupHashMapping( Gia_Man_t * p ) ABC_NAMESPACE_IMPL_END -