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, ptr, 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 ptr], [32 x ptr], [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 @f1() #0
32 br i1 undef, label %b7, label %b20
35 switch i32 undef, label %b8 [
47 b9: ; preds = %b8, %b7
63 %v2 = call ptr @f3(i32 0) #0
66 b15: ; preds = %b15, %b14
67 %v4 = fadd double undef, undef
68 br i1 undef, label %b16, label %b15
71 switch i32 undef, label %b18 [
78 %v8 = getelementptr i8, ptr %v0, i32 %v7
79 %v10 = load double, ptr undef, align 8, !tbaa !0
80 %v11 = fcmp olt double -1.000000e+11, %v10
81 %v12 = select i1 %v11, double %v10, double -1.000000e+11
82 %v13 = load double, ptr %v0, align 8, !tbaa !0
83 %v14 = fcmp olt double -1.000000e+11, %v13
84 %v15 = select i1 %v14, double %v13, double -1.000000e+11
85 %v16 = load double, ptr %v8, align 8, !tbaa !0
86 %v17 = fcmp olt double -1.000000e+11, %v16
87 %v18 = select i1 %v17, double %v16, double -1.000000e+11
88 %v19 = fcmp ogt double 1.000000e+11, %v13
89 %v20 = select i1 %v19, double %v13, double 1.000000e+11
90 %v21 = fcmp ogt double 1.000000e+11, %v16
91 %v22 = select i1 %v21, double %v16, double 1.000000e+11
94 b18: ; preds = %b17, %b16
95 %v23 = phi double [ %v12, %b17 ], [ -1.000000e+11, %b16 ]
96 %v24 = phi double [ %v15, %b17 ], [ -1.000000e+11, %b16 ]
97 %v25 = phi double [ %v20, %b17 ], [ 1.000000e+11, %b16 ]
98 %v26 = phi double [ %v18, %b17 ], [ -1.000000e+11, %b16 ]
99 %v27 = phi double [ %v22, %b17 ], [ 1.000000e+11, %b16 ]
100 %v28 = load double, ptr undef, align 8, !tbaa !0
101 %v29 = select i1 undef, double %v28, double %v23
102 %v30 = load double, ptr null, align 8, !tbaa !0
103 %v31 = select i1 undef, double %v30, double %v24
104 %v32 = load double, ptr undef, align 8, !tbaa !0
105 %v33 = select i1 undef, double %v32, double %v26
106 %v34 = select i1 undef, double %v30, double %v25
107 %v35 = select i1 undef, double %v32, double %v27
108 br i1 false, label %b20, label %b19
110 b19: ; preds = %b19, %b18, %b16
111 %v36 = phi double [ %v75, %b19 ], [ -1.000000e+11, %b16 ], [ %v29, %b18 ]
112 %v37 = phi double [ %v81, %b19 ], [ 1.000000e+11, %b16 ], [ undef, %b18 ]
113 %v38 = phi double [ %v78, %b19 ], [ -1.000000e+11, %b16 ], [ %v31, %b18 ]
114 %v39 = phi double [ %v82, %b19 ], [ 1.000000e+11, %b16 ], [ %v34, %b18 ]
115 %v40 = phi double [ %v80, %b19 ], [ -1.000000e+11, %b16 ], [ %v33, %b18 ]
116 %v41 = phi double [ %v84, %b19 ], [ 1.000000e+11, %b16 ], [ %v35, %b18 ]
117 %v44 = load double, ptr null, align 8, !tbaa !0
118 %v45 = select i1 undef, double %v44, double %v36
119 %v46 = load double, ptr %v0, align 8, !tbaa !0
120 %v47 = select i1 undef, double %v46, double %v38
121 %v48 = load double, ptr undef, align 8, !tbaa !0
122 %v49 = select i1 undef, double %v48, double %v40
123 %v50 = select i1 undef, double %v44, double %v37
124 %v51 = fcmp ogt double %v39, %v46
125 %v52 = select i1 %v51, double %v46, double %v39
126 %v53 = select i1 undef, double %v48, double %v41
127 %v54 = load double, ptr null, align 8, !tbaa !0
128 %v55 = select i1 undef, double %v54, double %v45
129 %v56 = load double, ptr undef, align 8, !tbaa !0
130 %v57 = select i1 undef, double %v56, double %v47
131 %v58 = load double, ptr undef, align 8, !tbaa !0
132 %v59 = select i1 undef, double %v58, double %v49
133 %v60 = select i1 undef, double %v54, double %v50
134 %v61 = select i1 undef, double %v56, double %v52
135 %v62 = select i1 false, double %v58, double %v53
136 %v63 = load double, ptr undef, align 8, !tbaa !0
137 %v64 = select i1 undef, double %v63, double %v55
138 %v65 = load double, ptr undef, align 8, !tbaa !0
139 %v66 = select i1 undef, double %v65, double %v57
140 %v67 = load double, ptr null, align 8, !tbaa !0
141 %v68 = select i1 undef, double %v67, double %v59
142 %v69 = fcmp ogt double %v60, %v63
143 %v70 = select i1 %v69, double %v63, double %v60
144 %v71 = select i1 false, double %v65, double %v61
145 %v72 = select i1 false, double %v67, double %v62
146 %v73 = load double, ptr null, align 8, !tbaa !0
147 %v74 = fcmp olt double %v64, %v73
148 %v75 = select i1 %v74, double %v73, double %v64
149 %v76 = load double, ptr null, align 8, !tbaa !0
150 %v77 = fcmp olt double %v66, %v76
151 %v78 = select i1 %v77, double %v76, double %v66
152 %v79 = fcmp olt double %v68, 0.000000e+00
153 %v80 = select i1 %v79, double 0.000000e+00, double %v68
154 %v81 = select i1 undef, double %v73, double %v70
155 %v82 = select i1 undef, double %v76, double %v71
156 %v83 = fcmp ogt double %v72, 0.000000e+00
157 %v84 = select i1 %v83, double 0.000000e+00, double %v72
158 br i1 false, label %b20, label %b19
160 b20: ; preds = %b19, %b18, %b6
166 ; Function Attrs: nounwind
167 declare noalias ptr @f2() #0
171 attributes #0 = { nounwind }
173 !0 = !{!1, !1, i64 0}
174 !1 = !{!"double", !2}
175 !2 = !{!"omnipotent char", !3}
176 !3 = !{!"Simple C/C++ TBAA"}