1 ; RUN: opt %s -S -loop-unroll -licm | FileCheck %s
3 ; Check that we can deal with loops where a parent loop gets deleted before it
6 ; CHECK-LABEL: define void @test() {
8 ; CHECK-NEXT: br label %for.body43
10 ; CHECK-LABEL: for.body43: ; preds = %entry
11 ; CHECK-NEXT: br label %if.else75
13 ; CHECK-LABEL: if.else75: ; preds = %for.body43
14 ; CHECK-NEXT: br label %for.body467
16 ; CHECK-LABEL: for.body467: ; preds = %for.body467.for.body467_crit_edge, %if.else75
17 ; CHECK-NEXT: br label %for.body467.for.body467_crit_edge
19 ; CHECK-LABEL: for.body467.for.body467_crit_edge: ; preds = %for.body467
20 ; CHECK-NEXT: br i1 false, label %for.end539, label %for.body467
22 ; CHECK-LABEL: for.end539: ; preds = %for.body467.for.body467_crit_edge
23 ; CHECK-NEXT: ret void
29 for.body43: ; preds = %for.end539, %entry
32 if.else75: ; preds = %for.body43
35 for.body467: ; preds = %for.body467.for.body467_crit_edge, %if.else75
36 br label %for.body467.for.body467_crit_edge
38 for.body467.for.body467_crit_edge: ; preds = %for.body467
39 br i1 false, label %for.end539, label %for.body467
41 for.end539: ; preds = %for.body467
42 br i1 undef, label %for.body43, label %for.end547
44 for.end547: ; preds = %for.body43