From 825d18a5cfae93cdbfd52c921d497c21c563e1b9 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 10 Aug 2022 15:37:14 +0300 Subject: [PATCH] Reprder conditions --- ir_ra.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ir_ra.c b/ir_ra.c index 14cd5fb..3c7f224 100644 --- a/ir_ra.c +++ b/ir_ra.c @@ -643,18 +643,18 @@ void ir_free_live_intervals(ir_live_interval **live_intervals, int count) static ir_live_pos ir_ivals_overlap(ir_live_range *lrg1, ir_live_range *lrg2) { while (1) { - if (lrg1->start < lrg2->end) { - if (lrg2->start < lrg1->end) { + if (lrg2->start < lrg1->end) { + if (lrg1->start < lrg2->end) { return IR_MAX(lrg1->start, lrg2->start); } else { - lrg1 = lrg1->next; - if (!lrg1) { + lrg2 = lrg2->next; + if (!lrg2) { return 0; } } } else { - lrg2 = lrg2->next; - if (!lrg2) { + lrg1 = lrg1->next; + if (!lrg1) { return 0; } }