summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-11-01 13:11:11 -0400
committerAlan Mishchenko <alanmi@berkeley.edu>2013-11-01 13:11:11 -0400
commitea1a2cfdaba5729eb9624bbc54b869784860f9f0 (patch)
tree90546151ba8abc0d1767ae2c633aa4f005aa5cef /src
parentc8bfb82688dfd97d09a6e6a1184b94db27cb398e (diff)
downloadabc-ea1a2cfdaba5729eb9624bbc54b869784860f9f0.tar.gz
abc-ea1a2cfdaba5729eb9624bbc54b869784860f9f0.tar.bz2
abc-ea1a2cfdaba5729eb9624bbc54b869784860f9f0.zip
Corner-case bug in synthesis commands.
Diffstat (limited to 'src')
-rw-r--r--src/aig/gia/giaBalance.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/aig/gia/giaBalance.c b/src/aig/gia/giaBalance.c
index cae652e9..293449bf 100644
--- a/src/aig/gia/giaBalance.c
+++ b/src/aig/gia/giaBalance.c
@@ -990,6 +990,8 @@ Gia_Man_t * Gia_ManAigSyn2( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Jf_Par_t Pars, * pPars = &Pars;
Jf_ManSetDefaultPars( pPars );
if ( fVerbose ) Gia_ManPrintStats( p, NULL );
+ if ( Gia_ManAndNum(p) == 0 )
+ return Gia_ManDup(p);
// perform balancing
pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
@@ -1009,6 +1011,8 @@ Gia_Man_t * Gia_ManAigSyn3( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Jf_Par_t Pars, * pPars = &Pars;
Jf_ManSetDefaultPars( pPars );
if ( fVerbose ) Gia_ManPrintStats( p, NULL );
+ if ( Gia_ManAndNum(p) == 0 )
+ return Gia_ManDup(p);
// perform balancing
pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );
@@ -1038,6 +1042,8 @@ Gia_Man_t * Gia_ManAigSyn4( Gia_Man_t * p, int fVerbose, int fVeryVerbose )
Jf_Par_t Pars, * pPars = &Pars;
Jf_ManSetDefaultPars( pPars );
if ( fVerbose ) Gia_ManPrintStats( p, NULL );
+ if ( Gia_ManAndNum(p) == 0 )
+ return Gia_ManDup(p);
// perform balancing
pNew = Gia_ManAreaBalance( p, 0, ABC_INFINITY, fVeryVerbose, 0 );
if ( fVerbose ) Gia_ManPrintStats( pNew, NULL );