summaryrefslogtreecommitdiffstats
path: root/src/opt/fxch/FxchDiv.c
diff options
context:
space:
mode:
authorMathias Soeken <mathias.soeken@gmail.com>2016-08-02 11:21:51 +0200
committerMathias Soeken <mathias.soeken@gmail.com>2016-08-02 11:21:51 +0200
commit160c697f32d0722c7b09e74d70df8ebe82475f62 (patch)
treecaa23f569f410a75ca0447ca2cc37592a530eb7f /src/opt/fxch/FxchDiv.c
parent8246af894d77b52829d2470f7f5e726a52588aed (diff)
parent8bc4894ccbf295d1e1863d44880e27f30f29972c (diff)
downloadabc-160c697f32d0722c7b09e74d70df8ebe82475f62.tar.gz
abc-160c697f32d0722c7b09e74d70df8ebe82475f62.tar.bz2
abc-160c697f32d0722c7b09e74d70df8ebe82475f62.zip
Merged alanmi/abc into default
Diffstat (limited to 'src/opt/fxch/FxchDiv.c')
-rw-r--r--src/opt/fxch/FxchDiv.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/opt/fxch/FxchDiv.c b/src/opt/fxch/FxchDiv.c
index 18c8bbfb..99c260c6 100644
--- a/src/opt/fxch/FxchDiv.c
+++ b/src/opt/fxch/FxchDiv.c
@@ -142,10 +142,20 @@ int Fxch_DivCreate( Fxch_Man_t* pFxchMan,
SC0_Lit1 = Fxch_ManGetLit( pFxchMan, pSubCube0->iCube, pSubCube0->iLit1 );
SC1_Lit1 = Fxch_ManGetLit( pFxchMan, pSubCube1->iCube, pSubCube1->iLit1 );
- Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit0, 0 ) );
- Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit0, 1 ) );
- Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit1, 0 ) );
- Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit1, 1 ) );
+ if ( SC0_Lit0 < SC1_Lit0 )
+ {
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit0, 0 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit0, 1 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit1, 0 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit1, 1 ) );
+ }
+ else
+ {
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit0, 0 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit0, 1 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC1_Lit1, 0 ) );
+ Vec_IntPush( pFxchMan->vCubeFree, Abc_Var2Lit( SC0_Lit1, 1 ) );
+ }
RetValue = Fxch_DivNormalize( pFxchMan->vCubeFree );
if ( RetValue == -1 )