diff options
Diffstat (limited to 'src/transformations/loop.cc')
-rw-r--r-- | src/transformations/loop.cc | 4 |
1 files changed, 1 insertions, 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<std::set<int> > Loop::sort_by_same_loops(std::set<int> 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) |