• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=hexagon -machine-sink-split=0 < %s
2; REQUIRES: asserts
3; Used to fail with: Assertion `ScavengingFrameIndex >= 0 && "Cannot scavenge register without an emergency spill slot!"' failed.
4
5target triple = "hexagon-unknown-linux-gnu"
6
7%s.0 = type { double, double, double, double, double, double, i32, double, double, double, double, i8*, i8, [9 x i8], double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, [200 x i8*], [32 x i8*], [32 x i8], i32 }
8
9; Function Attrs: nounwind
10define void @f0() #0 {
11b0:
12  %v0 = call i8* @f2()
13  br i1 undef, label %b1, label %b2
14
15b1:                                               ; preds = %b0
16  ret void
17
18b2:                                               ; preds = %b0
19  br i1 undef, label %b3, label %b4
20
21b3:                                               ; preds = %b2
22  unreachable
23
24b4:                                               ; preds = %b2
25  br i1 undef, label %b5, label %b6
26
27b5:                                               ; preds = %b4
28  unreachable
29
30b6:                                               ; preds = %b4
31  %v1 = call i32 bitcast (i32 (...)* @f1 to i32 ()*)() #0
32  br i1 undef, label %b7, label %b20
33
34b7:                                               ; preds = %b6
35  switch i32 undef, label %b8 [
36    i32 6, label %b9
37    i32 1, label %b14
38    i32 2, label %b13
39    i32 3, label %b12
40    i32 4, label %b11
41    i32 5, label %b10
42  ]
43
44b8:                                               ; preds = %b7
45  br label %b9
46
47b9:                                               ; preds = %b8, %b7
48  unreachable
49
50b10:                                              ; preds = %b7
51  unreachable
52
53b11:                                              ; preds = %b7
54  unreachable
55
56b12:                                              ; preds = %b7
57  unreachable
58
59b13:                                              ; preds = %b7
60  unreachable
61
62b14:                                              ; preds = %b7
63  %v2 = call %s.0* bitcast (%s.0* (...)* @f3 to %s.0* (i32)*)(i32 0) #0
64  br label %b15
65
66b15:                                              ; preds = %b15, %b14
67  %v3 = bitcast i8* undef to double*
68  %v4 = fadd double undef, undef
69  br i1 undef, label %b16, label %b15
70
71b16:                                              ; preds = %b15
72  switch i32 undef, label %b18 [
73    i32 0, label %b19
74    i32 2, label %b17
75  ]
76
77b17:                                              ; preds = %b16
78  %v5 = getelementptr i8, i8* %v0, i32 0
79  %v6 = bitcast i8* %v5 to double*
80  %v7 = or i32 0, 16
81  %v8 = getelementptr i8, i8* %v0, i32 %v7
82  %v9 = bitcast i8* %v8 to double*
83  %v10 = load double, double* undef, align 8, !tbaa !0
84  %v11 = fcmp olt double -1.000000e+11, %v10
85  %v12 = select i1 %v11, double %v10, double -1.000000e+11
86  %v13 = load double, double* %v6, align 8, !tbaa !0
87  %v14 = fcmp olt double -1.000000e+11, %v13
88  %v15 = select i1 %v14, double %v13, double -1.000000e+11
89  %v16 = load double, double* %v9, align 8, !tbaa !0
90  %v17 = fcmp olt double -1.000000e+11, %v16
91  %v18 = select i1 %v17, double %v16, double -1.000000e+11
92  %v19 = fcmp ogt double 1.000000e+11, %v13
93  %v20 = select i1 %v19, double %v13, double 1.000000e+11
94  %v21 = fcmp ogt double 1.000000e+11, %v16
95  %v22 = select i1 %v21, double %v16, double 1.000000e+11
96  br label %b18
97
98b18:                                              ; preds = %b17, %b16
99  %v23 = phi double [ %v12, %b17 ], [ -1.000000e+11, %b16 ]
100  %v24 = phi double [ %v15, %b17 ], [ -1.000000e+11, %b16 ]
101  %v25 = phi double [ %v20, %b17 ], [ 1.000000e+11, %b16 ]
102  %v26 = phi double [ %v18, %b17 ], [ -1.000000e+11, %b16 ]
103  %v27 = phi double [ %v22, %b17 ], [ 1.000000e+11, %b16 ]
104  %v28 = load double, double* undef, align 8, !tbaa !0
105  %v29 = select i1 undef, double %v28, double %v23
106  %v30 = load double, double* null, align 8, !tbaa !0
107  %v31 = select i1 undef, double %v30, double %v24
108  %v32 = load double, double* undef, align 8, !tbaa !0
109  %v33 = select i1 undef, double %v32, double %v26
110  %v34 = select i1 undef, double %v30, double %v25
111  %v35 = select i1 undef, double %v32, double %v27
112  br i1 false, label %b20, label %b19
113
114b19:                                              ; preds = %b19, %b18, %b16
115  %v36 = phi double [ %v75, %b19 ], [ -1.000000e+11, %b16 ], [ %v29, %b18 ]
116  %v37 = phi double [ %v81, %b19 ], [ 1.000000e+11, %b16 ], [ undef, %b18 ]
117  %v38 = phi double [ %v78, %b19 ], [ -1.000000e+11, %b16 ], [ %v31, %b18 ]
118  %v39 = phi double [ %v82, %b19 ], [ 1.000000e+11, %b16 ], [ %v34, %b18 ]
119  %v40 = phi double [ %v80, %b19 ], [ -1.000000e+11, %b16 ], [ %v33, %b18 ]
120  %v41 = phi double [ %v84, %b19 ], [ 1.000000e+11, %b16 ], [ %v35, %b18 ]
121  %v42 = getelementptr i8, i8* %v0, i32 0
122  %v43 = bitcast i8* %v42 to double*
123  %v44 = load double, double* null, align 8, !tbaa !0
124  %v45 = select i1 undef, double %v44, double %v36
125  %v46 = load double, double* %v43, align 8, !tbaa !0
126  %v47 = select i1 undef, double %v46, double %v38
127  %v48 = load double, double* undef, align 8, !tbaa !0
128  %v49 = select i1 undef, double %v48, double %v40
129  %v50 = select i1 undef, double %v44, double %v37
130  %v51 = fcmp ogt double %v39, %v46
131  %v52 = select i1 %v51, double %v46, double %v39
132  %v53 = select i1 undef, double %v48, double %v41
133  %v54 = load double, double* null, align 8, !tbaa !0
134  %v55 = select i1 undef, double %v54, double %v45
135  %v56 = load double, double* undef, align 8, !tbaa !0
136  %v57 = select i1 undef, double %v56, double %v47
137  %v58 = load double, double* undef, align 8, !tbaa !0
138  %v59 = select i1 undef, double %v58, double %v49
139  %v60 = select i1 undef, double %v54, double %v50
140  %v61 = select i1 undef, double %v56, double %v52
141  %v62 = select i1 false, double %v58, double %v53
142  %v63 = load double, double* undef, align 8, !tbaa !0
143  %v64 = select i1 undef, double %v63, double %v55
144  %v65 = load double, double* undef, align 8, !tbaa !0
145  %v66 = select i1 undef, double %v65, double %v57
146  %v67 = load double, double* null, align 8, !tbaa !0
147  %v68 = select i1 undef, double %v67, double %v59
148  %v69 = fcmp ogt double %v60, %v63
149  %v70 = select i1 %v69, double %v63, double %v60
150  %v71 = select i1 false, double %v65, double %v61
151  %v72 = select i1 false, double %v67, double %v62
152  %v73 = load double, double* null, align 8, !tbaa !0
153  %v74 = fcmp olt double %v64, %v73
154  %v75 = select i1 %v74, double %v73, double %v64
155  %v76 = load double, double* null, align 8, !tbaa !0
156  %v77 = fcmp olt double %v66, %v76
157  %v78 = select i1 %v77, double %v76, double %v66
158  %v79 = fcmp olt double %v68, 0.000000e+00
159  %v80 = select i1 %v79, double 0.000000e+00, double %v68
160  %v81 = select i1 undef, double %v73, double %v70
161  %v82 = select i1 undef, double %v76, double %v71
162  %v83 = fcmp ogt double %v72, 0.000000e+00
163  %v84 = select i1 %v83, double 0.000000e+00, double %v72
164  br i1 false, label %b20, label %b19
165
166b20:                                              ; preds = %b19, %b18, %b6
167  unreachable
168}
169
170declare i32 @f1(...)
171
172; Function Attrs: nounwind
173declare noalias i8* @f2() #0
174
175declare %s.0* @f3(...)
176
177attributes #0 = { nounwind }
178
179!0 = !{!1, !1, i64 0}
180!1 = !{!"double", !2}
181!2 = !{!"omnipotent char", !3}
182!3 = !{!"Simple C/C++ TBAA"}
183