llvm-project
138 строк · 5.6 Кб
1; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
2;
3; This caused an lnt crash at some point, just verify it will run through and
4; produce the PHI node in the exit we are looking for.
5;
6; CHECK-LABEL: polly.merge_new_and_old:
7; CHECK-NEXT: %eps1.addr.0.ph.merge = phi double [ %eps1.addr.0.ph.final_reload, %polly.exiting ], [ %eps1.addr.0.ph, %if.end.47.region_exiting ]
8; CHECK-NEXT: br label %if.end.47
9;
10; CHECK-LABEL: if.end.47:
11; CHECK-NEXT: %eps1.addr.0 = phi double [ %eps1.addr.0.ph.merge, %polly.merge_new_and_old ]
12;
13define void @dbisect(ptr %c, ptr %b, double %eps1, ptr %eps2) {
14entry:
15br label %entry.split
16
17entry.split: ; preds = %entry
18store double 0.000000e+00, ptr %b, align 8
19%0 = load double, ptr %c, align 8
20br i1 false, label %for.body.lr.ph, label %for.end
21
22for.body.lr.ph: ; preds = %entry.split
23br label %for.body
24
25for.body: ; preds = %for.inc, %for.body.lr.ph
26br i1 false, label %if.then, label %if.end
27
28if.then: ; preds = %for.body
29br label %if.end
30
31if.end: ; preds = %if.then, %for.body
32br i1 false, label %if.then.36, label %for.inc
33
34if.then.36: ; preds = %if.end
35br label %for.inc
36
37for.inc: ; preds = %if.then.36, %if.end
38br i1 false, label %for.body, label %for.cond.for.end_crit_edge
39
40for.cond.for.end_crit_edge: ; preds = %for.inc
41br label %for.end
42
43for.end: ; preds = %for.cond.for.end_crit_edge, %entry.split
44store double undef, ptr %eps2, align 8
45%cmp45 = fcmp ugt double %eps1, 0.000000e+00
46br i1 %cmp45, label %if.end.47, label %if.then.46
47
48if.then.46: ; preds = %for.end
49br label %if.end.47
50
51if.end.47: ; preds = %if.then.46, %for.end
52%eps1.addr.0 = phi double [ undef, %if.then.46 ], [ %eps1, %for.end ]
53br i1 undef, label %if.then.55, label %for.cond.58.preheader
54
55for.cond.58.preheader: ; preds = %if.end.47
56br i1 undef, label %for.end.68, label %for.body.61.lr.ph
57
58for.body.61.lr.ph: ; preds = %for.cond.58.preheader
59br label %for.body.61
60
61if.then.55: ; preds = %if.end.47
62unreachable
63
64for.body.61: ; preds = %for.body.61, %for.body.61.lr.ph
65br i1 undef, label %for.body.61, label %for.cond.58.for.end.68_crit_edge
66
67for.cond.58.for.end.68_crit_edge: ; preds = %for.body.61
68br label %for.end.68
69
70for.end.68: ; preds = %for.cond.58.for.end.68_crit_edge, %for.cond.58.preheader
71br i1 undef, label %for.end.137, label %for.cond.73.preheader.lr.ph
72
73for.cond.73.preheader.lr.ph: ; preds = %for.end.68
74br label %for.cond.73.preheader
75
76for.cond.73.preheader: ; preds = %while.end, %for.cond.73.preheader.lr.ph
77br i1 undef, label %for.end.87.loopexit, label %for.body.76.lr.ph
78
79for.body.76.lr.ph: ; preds = %for.cond.73.preheader
80br label %for.body.76
81
82for.body.76: ; preds = %for.inc.85, %for.body.76.lr.ph
83br i1 undef, label %if.then.81, label %for.inc.85
84
85if.then.81: ; preds = %for.body.76
86br label %for.end.87
87
88for.inc.85: ; preds = %for.body.76
89br i1 undef, label %for.body.76, label %for.cond.73.for.end.87.loopexit_crit_edge
90
91for.cond.73.for.end.87.loopexit_crit_edge: ; preds = %for.inc.85
92br label %for.end.87.loopexit
93
94for.end.87.loopexit: ; preds = %for.cond.73.for.end.87.loopexit_crit_edge, %for.cond.73.preheader
95br label %for.end.87
96
97for.end.87: ; preds = %for.end.87.loopexit, %if.then.81
98br i1 undef, label %if.then.92, label %if.end.95
99
100if.then.92: ; preds = %for.end.87
101br label %if.end.95
102
103if.end.95: ; preds = %if.then.92, %for.end.87
104br i1 undef, label %while.body.lr.ph, label %while.end
105
106while.body.lr.ph: ; preds = %if.end.95
107br label %while.body
108
109while.body: ; preds = %if.end.128, %while.body.lr.ph
110br i1 undef, label %if.then.109, label %if.end.128
111
112if.then.109: ; preds = %while.body
113br i1 undef, label %if.then.112, label %if.else
114
115if.then.112: ; preds = %if.then.109
116br label %if.end.128
117
118if.else: ; preds = %if.then.109
119br i1 undef, label %if.then.122, label %if.end.128
120
121if.then.122: ; preds = %if.else
122br label %if.end.128
123
124if.end.128: ; preds = %if.then.122, %if.else, %if.then.112, %while.body
125br i1 undef, label %while.body, label %while.cond.while.end_crit_edge
126
127while.cond.while.end_crit_edge: ; preds = %if.end.128
128br label %while.end
129
130while.end: ; preds = %while.cond.while.end_crit_edge, %if.end.95
131br i1 undef, label %for.cond.73.preheader, label %for.cond.69.for.end.137_crit_edge
132
133for.cond.69.for.end.137_crit_edge: ; preds = %while.end
134br label %for.end.137
135
136for.end.137: ; preds = %for.cond.69.for.end.137_crit_edge, %for.end.68
137ret void
138}
139