• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -loop-deletion -S
2; RUN: opt < %s -loop-deletion -analyze -domtree 2>&1 -enable-new-pm=0 | FileCheck -check-prefix=DT %s
3; RUN: opt < %s -passes='loop(loop-deletion),print<domtree>' 2>&1 | FileCheck -check-prefix=DT %s
4; RUN: opt < %s -loop-deletion -verify-dom-info
5
6; CHECK: for.body
7; CHECK-NOT: for.cond1
8
9; Verify only the important parts of the DomTree.
10; DT: [1] %entry
11; DT:   [2] %for.cond
12; DT:     [3] %lbl63A679E5
13; DT:     [3] %for.cond9
14; DT:     [3] %lbl64774A9B
15; DT:     [3] %for.body
16; DT:       [4] %for.cond3.loopexit
17
18define i32 @fn1() {
19entry:
20  br label %for.cond
21
22for.cond:                                         ; preds = %entry
23  br i1 undef, label %lbl63A679E5, label %for.body
24
25for.body:                                         ; preds = %for.cond
26  br label %for.cond1
27
28for.cond1:                                        ; preds = %for.cond1, %for.body
29  br i1 undef, label %for.cond1, label %for.cond3.loopexit
30
31for.cond3.loopexit:                               ; preds = %for.cond1
32  br label %for.cond3
33
34for.cond3:                                        ; preds = %for.cond9, %for.cond3.loopexit
35  br i1 undef, label %for.body4, label %for.cond17
36
37for.body4:                                        ; preds = %for.cond3
38  br label %for.cond5
39
40for.cond5:                                        ; preds = %lbl63A679E5, %for.body4
41  br label %for.cond9
42
43lbl63A679E5:                                      ; preds = %for.cond
44  br label %for.cond5
45
46for.cond9:                                        ; preds = %for.end14.split, %for.cond5
47  br i1 undef, label %for.cond3, label %lbl64774A9B
48
49lbl64774A9B:                                      ; preds = %for.cond17, %for.cond9
50  br label %for.end14.split
51
52for.end14.split:                                  ; preds = %lbl64774A9B
53  br label %for.cond9
54
55for.cond17:                                       ; preds = %for.cond3
56  br label %lbl64774A9B
57}
58