summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndreas Fried <andreas.fried@kit.edu>2021-11-19 16:55:07 +0100
committerAndreas Fried <andreas.fried@kit.edu>2021-11-19 16:55:07 +0100
commit9f0e6d3bb0708f4fba8ababc714a241af7f6ac17 (patch)
tree9f1824dbf25ac5348f4c21450d2b2b26c0d22234
parent3be8b1900506805e4c791f2815e810b8f7f8695c (diff)
ilp: Fix some edge cases.
-rw-r--r--ir/be/becopyilp2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/be/becopyilp2.c b/ir/be/becopyilp2.c
index 9c8889d..9e55c38 100644
--- a/ir/be/becopyilp2.c
+++ b/ir/be/becopyilp2.c
@@ -436,13 +436,13 @@ static void extend_path(ilp_env_t *ienv, deq_t *path, const ir_node *irn)
curr_path[i++] = n;
}
- for (int i = 1; i < len; ++i) {
+ for (int i = 1; i < len - 1; ++i) {
if (be_values_interfere(irn, curr_path[i]))
goto end;
}
/* check for terminating interference */
- if (be_values_interfere(irn, curr_path[0])) {
+ if (len > 1 && be_values_interfere(irn, curr_path[0])) {
/* One node is not a path. */
/* And a path of length 2 is covered by a clique star constraint. */
if (len > 2) {