From f14ee271abe8d38a6dad8789d4b4dbc207fe23c4 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 2 Feb 2017 12:44:54 -0800 Subject: Reordering if-statements in the xsat solver. --- src/sat/xsat/xsatSolver.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sat/xsat/xsatSolver.c b/src/sat/xsat/xsatSolver.c index 9a98eec0..9807e1b7 100644 --- a/src/sat/xsat/xsatSolver.c +++ b/src/sat/xsat/xsatSolver.c @@ -680,12 +680,10 @@ unsigned xSAT_SolverPropagate( xSAT_Solver_t* s ) nProp++; for ( i = begin; i < end; i++ ) { - if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == xSAT_LitSign( xSAT_NegLit( i->Blocker ) ) ) - { - return i->CRef; - } - else if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == VarX ) + if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == VarX ) xSAT_SolverEnqueue( s, i->Blocker, i->CRef ); + else if ( Vec_StrEntry( s->vAssigns, xSAT_Lit2Var( i->Blocker ) ) == xSAT_LitSign( xSAT_NegLit( i->Blocker ) ) ) + return i->CRef; } ws = xSAT_VecWatchListEntry( s->vWatches, p ); -- cgit v1.2.3