From 9cf3d7b307d1dc810fa205bcfa8470cee7c7541e Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Fri, 7 Oct 2016 23:50:52 -0600 Subject: fix --- src/transformations/loop.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/transformations/loop.cc b/src/transformations/loop.cc index 0b9603e..026794f 100644 --- a/src/transformations/loop.cc +++ b/src/transformations/loop.cc @@ -1349,10 +1349,8 @@ std::vector > Loop::sort_by_same_loops(std::set active, //while (itn->content->type() != IR_CONTROL_LOOP && itn != NULL) // itn = itn->parent; - while ((itn != NULL) && (itn->payload != level - 1)) { + while ((itn != NULL) && ((itn->payload != level - 1) || itn -> content->type() != IR_CONTROL_LOOP)) { itn = itn->parent; - while (itn != NULL && itn->content->type() != IR_CONTROL_LOOP) - itn = itn->parent; } if (itn == NULL) -- cgit v1.2.3-70-g09d2