1 ; RUN: llc -march=hexagon -machine-sink-split=0 < %s
3 ; Used to fail with: Assertion `ScavengingFrameIndex >= 0 && "Cannot scavenge register without an emergency spill slot!"' failed.
5 target triple = "hexagon-unknown-linux-gnu"
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 }
9 ; Function Attrs: nounwind
10 define void @f0() #0 {
13 br i1 undef, label %b1, label %b2
19 br i1 undef, label %b3, label %b4
25 br i1 undef, label %b5, label %b6
31 %v1 = call i32 bitcast (i32 (...)* @f1 to i32 ()*)() #0
32 br i1 undef, label %b7, label %b20
35 switch i32 undef, label %b8 [
47 b9: ; preds = %b8, %b7
63 %v2 = call %s.0* bitcast (%s.0* (...)* @f3 to %s.0* (i32)*)(i32 0) #0
66 b15: ; preds = %b15, %b14
67 %v3 = bitcast i8* undef to double*
68 %v4 = fadd double undef, undef
69 br i1 undef, label %b16, label %b15
72 switch i32 undef, label %b18 [
78 %v5 = getelementptr i8, i8* %v0, i32 0
79 %v6 = bitcast i8* %v5 to double*
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
98 b18: ; 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
114 b19: ; 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
166 b20: ; preds = %b19, %b18, %b6
172 ; Function Attrs: nounwind
173 declare noalias i8* @f2() #0
175 declare %s.0* @f3(...)
177 attributes #0 = { nounwind }
179 !0 = !{!1, !1, i64 0}
180 !1 = !{!"double", !2}
181 !2 = !{!"omnipotent char", !3}
182 !3 = !{!"Simple C/C++ TBAA"}