X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fjumpthreading.c;h=7561ded9623914b76023a2694517c120d631e3a3;hb=b27ae245166bb695bc4e418ff416d91bc37d0f28;hp=8e6f9fa92c3a484feb3fd82fdd6f941bcc2f3166;hpb=d304e6e0053ecf1de3f541121ee70d7542bf9f84;p=libfirm diff --git a/ir/opt/jumpthreading.c b/ir/opt/jumpthreading.c index 8e6f9fa92..7561ded96 100644 --- a/ir/opt/jumpthreading.c +++ b/ir/opt/jumpthreading.c @@ -716,6 +716,10 @@ static void thread_jumps(ir_node* block, void* data) if (copy_block == NULL) return; + /* We might thread the condition block of an infinite loop, + * such that there is no path to End anymore. */ + keep_alive(block); + /* we have to remove the edge towards the pred as the pred now * jumps into the true_block. We also have to shorten Phis * in our block because of this */