1; RUN: opt -reg2mem -disable-output < %s 2; PR14782 3 4declare void @f1() 5 6declare i32 @__gxx_personality_sj0(...) 7 8declare void @f2() 9 10declare void @f3() 11 12declare void @f4_() 13 14declare void @_Z12xxxdtsP10xxxpq() 15 16define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*) { 17bb: 18 invoke void @f4_() 19 to label %bb1 unwind label %.thread 20 21.thread: ; preds = %bb 22 %tmp = landingpad { i8*, i32 } 23 cleanup 24 br label %bb13 25 26bb1: ; preds = %bb 27 invoke void @f1() 28 to label %.noexc unwind label %bb10 29 30.noexc: ; preds = %bb1 31 invoke void @f4_() 32 to label %bb6 unwind label %bb2 33 34bb2: ; preds = %.noexc 35 %tmp3 = landingpad { i8*, i32 } 36 cleanup 37 invoke void @f3() 38 to label %.body unwind label %bb4 39 40bb4: ; preds = %bb2 41 %tmp5 = landingpad { i8*, i32 } 42 catch i8* null 43 unreachable 44 45bb6: ; preds = %.noexc 46 invoke void @_Z12xxxdtsP10xxxpq() 47 to label %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit unwind label %bb10 48 49_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit: ; preds = %bb6 50 invoke void @f2() 51 to label %bb7 unwind label %bb8 52 53bb7: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit 54 ret void 55 56bb8: ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit 57 %tmp9 = landingpad { i8*, i32 } 58 cleanup 59 br label %_ZN10xxxpqdlev.exit 60 61bb10: ; preds = %bb6, %bb1 62 %.1 = phi i1 [ true, %bb1 ], [ false, %bb6 ] 63 %tmp11 = landingpad { i8*, i32 } 64 cleanup 65 br label %.body 66 67.body: ; preds = %bb10, %bb2 68 %.1.lpad-body = phi i1 [ %.1, %bb10 ], [ true, %bb2 ] 69 invoke void @f2() 70 to label %bb12 unwind label %bb14 71 72bb12: ; preds = %.body 73 br i1 %.1.lpad-body, label %bb13, label %_ZN10xxxpqdlev.exit 74 75bb13: ; preds = %bb12, %.thread 76 invoke void @xxx_MemFree() 77 to label %_ZN10xxxpqdlev.exit unwind label %bb14 78 79_ZN10xxxpqdlev.exit: ; preds = %bb13, %bb12, %bb8 80 resume { i8*, i32 } undef 81 82bb14: ; preds = %bb13, %.body 83 %tmp15 = landingpad { i8*, i32 } 84 catch i8* null 85 unreachable 86} 87 88declare void @xxx_MemFree() 89