217 lines · plain
1; RUN: llc -mtriple=hexagon -O3 < %s2; REQUIRES: asserts3 4target triple = "hexagon"5 6%s.0 = type { ptr, i32, %s.1 }7%s.1 = type { %s.2, ptr, ptr, i32 }8%s.2 = type { ptr, i32, i8, i8, i16, i32, i32, ptr, ptr, ptr }9%s.3 = type { ptr, i32, i32, ptr }10%s.4 = type { ptr, i32, ptr }11%s.5 = type { ptr, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }12%s.6 = type { ptr, %s.1 }13%s.7 = type { %s.8, i8 }14%s.8 = type { ptr }15 16define ptr @f0(ptr %a0, ptr nocapture %a1, i32 %a2, i32 signext %a3) align 2 personality ptr @f11 {17b0:18 %v0 = alloca %s.7, align 419 %v1 = getelementptr inbounds %s.0, ptr %a0, i32 0, i32 120 store i32 0, ptr %v1, align 4, !tbaa !021 call void @f2(ptr %v0, ptr %a0, i1 zeroext true)22 %v2 = getelementptr inbounds %s.7, ptr %v0, i32 0, i32 123 %v3 = load i8, ptr %v2, align 4, !tbaa !4, !range !624 %v4 = icmp ne i8 %v3, 025 %v5 = icmp sgt i32 %a2, 026 %v6 = and i1 %v4, %v527 br i1 %v6, label %b2, label %b128 29b1: ; preds = %b030 br label %b1631 32b2: ; preds = %b033 %v9 = load ptr, ptr %a0, align 4, !tbaa !734 %v10 = getelementptr i8, ptr %v9, i32 -1235 %v12 = load i32, ptr %v10, align 436 %v14 = add i32 %v12, 3237 %v15 = getelementptr inbounds i8, ptr %a0, i32 %v1438 %v17 = load ptr, ptr %v15, align 4, !tbaa !939 %v18 = invoke signext i32 @f3(ptr %v17)40 to label %b3 unwind label %b741 42b3: ; preds = %b243 br label %b444 45b4: ; preds = %b13, %b346 %v19 = phi i32 [ %v68, %b13 ], [ %v18, %b3 ]47 %v20 = phi i32 [ %v55, %b13 ], [ %a2, %b3 ]48 %v21 = phi ptr [ %v59, %b13 ], [ %a1, %b3 ]49 %v22 = icmp eq i32 %v19, -150 br i1 %v22, label %b15, label %b1051 52b5: ; preds = %b16, %b953 %v23 = landingpad { ptr, i32 }54 cleanup55 %v24 = extractvalue { ptr, i32 } %v23, 056 %v25 = extractvalue { ptr, i32 } %v23, 157 br label %b1858 59b6: ; preds = %b1360 %v26 = landingpad { ptr, i32 }61 catch ptr null62 br label %b863 64b7: ; preds = %b11, %b265 %v27 = phi ptr [ %v21, %b11 ], [ %a1, %b2 ]66 %v28 = landingpad { ptr, i32 }67 catch ptr null68 br label %b869 70b8: ; preds = %b7, %b671 %v29 = phi ptr [ %v59, %b6 ], [ %v27, %b7 ]72 %v30 = phi { ptr, i32 } [ %v26, %b6 ], [ %v28, %b7 ]73 %v31 = extractvalue { ptr, i32 } %v30, 074 %v32 = call ptr @f9(ptr %v31) #075 %v33 = load ptr, ptr %a0, align 4, !tbaa !776 %v34 = getelementptr i8, ptr %v33, i32 -1277 %v36 = load i32, ptr %v34, align 478 %v37 = getelementptr inbounds i8, ptr %a0, i32 %v3679 %v39 = add i32 %v36, 880 %v40 = getelementptr inbounds i8, ptr %a0, i32 %v3981 %v41 = load i8, ptr %v40, align 1, !tbaa !1182 %v42 = or i8 %v41, 483 invoke void @f6(ptr %v37, i8 zeroext %v42, i1 zeroext true)84 to label %b9 unwind label %b1485 86b9: ; preds = %b887 invoke void @f10()88 to label %b16 unwind label %b589 90b10: ; preds = %b491 %v43 = icmp eq i32 %v19, %a392 br i1 %v43, label %b11, label %b1293 94b11: ; preds = %b1095 %v44 = load i32, ptr %v1, align 4, !tbaa !096 %v45 = add nsw i32 %v44, 197 store i32 %v45, ptr %v1, align 4, !tbaa !098 %v46 = load ptr, ptr %a0, align 4, !tbaa !799 %v47 = getelementptr i8, ptr %v46, i32 -12100 %v49 = load i32, ptr %v47, align 4101 %v50 = add i32 %v49, 32102 %v51 = getelementptr inbounds i8, ptr %a0, i32 %v50103 %v53 = load ptr, ptr %v51, align 4, !tbaa !9104 %v54 = invoke signext i32 @f4(ptr %v53)105 to label %b16 unwind label %b7106 107b12: ; preds = %b10108 %v55 = add nsw i32 %v20, -1109 %v56 = icmp slt i32 %v55, 1110 br i1 %v56, label %b15, label %b13111 112b13: ; preds = %b12113 %v57 = load i32, ptr %v1, align 4, !tbaa !0114 %v58 = add nsw i32 %v57, 1115 store i32 %v58, ptr %v1, align 4, !tbaa !0116 %v59 = getelementptr inbounds i32, ptr %v21, i32 1117 store i32 %v19, ptr %v21, align 4, !tbaa !13118 %v60 = load ptr, ptr %a0, align 4, !tbaa !7119 %v61 = getelementptr i8, ptr %v60, i32 -12120 %v63 = load i32, ptr %v61, align 4121 %v64 = add i32 %v63, 32122 %v65 = getelementptr inbounds i8, ptr %a0, i32 %v64123 %v67 = load ptr, ptr %v65, align 4, !tbaa !9124 %v68 = invoke signext i32 @f5(ptr %v67)125 to label %b4 unwind label %b6126 127b14: ; preds = %b8128 %v69 = landingpad { ptr, i32 }129 cleanup130 %v70 = extractvalue { ptr, i32 } %v69, 0131 %v71 = extractvalue { ptr, i32 } %v69, 1132 invoke void @f10()133 to label %b18 unwind label %b20134 135b15: ; preds = %b12, %b4136 %v72 = phi i8 [ 2, %b12 ], [ 1, %b4 ]137 br label %b16138 139b16: ; preds = %b15, %b11, %b9, %b1140 %v73 = phi ptr [ %a0, %b1 ], [ %a0, %b11 ], [ %a0, %b9 ], [ %a0, %b15 ]141 %v74 = phi i8 [ 0, %b1 ], [ 0, %b11 ], [ 0, %b9 ], [ %v72, %b15 ]142 %v75 = phi ptr [ %a1, %b1 ], [ %v21, %b11 ], [ %v29, %b9 ], [ %v21, %b15 ]143 store i32 0, ptr %v75, align 4, !tbaa !13144 %v76 = load ptr, ptr %a0, align 4, !tbaa !7145 %v77 = getelementptr i8, ptr %v76, i32 -12146 %v79 = load i32, ptr %v77, align 4147 %v80 = getelementptr inbounds i8, ptr %v73, i32 %v79148 %v82 = load i32, ptr %v1, align 4, !tbaa !0149 %v83 = icmp eq i32 %v82, 0150 %v84 = or i8 %v74, 2151 %v85 = select i1 %v83, i8 %v84, i8 %v74152 invoke void @f7(ptr %v80, i8 zeroext %v85, i1 zeroext false)153 to label %b17 unwind label %b5154 155b17: ; preds = %b16156 call void @f1(ptr %v0)157 ret ptr %a0158 159b18: ; preds = %b14, %b5160 %v87 = phi ptr [ %v24, %b5 ], [ %v70, %b14 ]161 %v88 = phi i32 [ %v25, %b5 ], [ %v71, %b14 ]162 invoke void @f1(ptr %v0)163 to label %b19 unwind label %b20164 165b19: ; preds = %b18166 %v90 = insertvalue { ptr, i32 } undef, ptr %v87, 0167 %v91 = insertvalue { ptr, i32 } %v90, i32 %v88, 1168 resume { ptr, i32 } %v91169 170b20: ; preds = %b18, %b14171 %v92 = landingpad { ptr, i32 }172 catch ptr null173 call void @f8() #1174 unreachable175}176 177declare void @f1(ptr nocapture) unnamed_addr align 2178 179declare void @f2(ptr nocapture, ptr, i1 zeroext) unnamed_addr align 2180 181declare signext i32 @f3(ptr) align 2182 183declare signext i32 @f4(ptr) align 2184 185declare signext i32 @f5(ptr) align 2186 187declare void @f6(ptr, i8 zeroext, i1 zeroext) align 2188 189declare void @f7(ptr, i8 zeroext, i1 zeroext) align 2190 191declare void @f8()192 193declare ptr @f9(ptr)194 195declare void @f10()196 197declare i32 @f11(...)198 199attributes #0 = { nounwind }200attributes #1 = { noreturn nounwind }201 202!0 = !{!1, !1, i64 0}203!1 = !{!"int", !2}204!2 = !{!"omnipotent char", !3}205!3 = !{!"Simple C/C++ TBAA"}206!4 = !{!5, !5, i64 0}207!5 = !{!"bool", !2}208!6 = !{i8 0, i8 2}209!7 = !{!8, !8, i64 0}210!8 = !{!"vtable pointer", !3}211!9 = !{!10, !10, i64 0}212!10 = !{!"any pointer", !2}213!11 = !{!12, !12, i64 0}214!12 = !{!"_ZTSNSt5_IosbIiE8_IostateE", !2}215!13 = !{!14, !14, i64 0}216!14 = !{!"wchar_t", !2}217