File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -636,16 +636,15 @@ bool LASolver::wouldDeduce(PtAsgn asgn) const {
636636 LABound const & bound = boundStore[boundRef];
637637
638638 auto searchForUnassignedBound = [this , &bound, &v](BoundT type) {
639- for (int it = bound.getIdx ().x - 1 ; it >= 0 ; -- it) {
640- LABoundRef candidateRef = boundStore.getBoundByIdx (v, it);
639+ int newId = bound.getIdx ().x + (type == bound_l ? -2 : 2 );
640+ if (newId < 0 or newId > boundStore.getBounds (v).size () - 1 ) {
641+ return false ;
642+ } else {
643+ LABoundRef candidateRef = boundStore.getBoundByIdx (v, newId);
641644 LABound const & candidate = boundStore[candidateRef];
642- if (candidate.getType () != type) {
643- continue ;
644- } else if (not hasPolarity (getAsgnByBound (candidateRef).tr )) {
645- return true ;
646- }
645+ assert (candidate.getType () == type);
646+ return (not hasPolarity (getAsgnByBound (candidateRef).tr ));
647647 }
648- return false ;
649648 };
650649
651650 if (bound.getType () == bound_l) {
You can’t perform that action at this time.
0 commit comments