Home | History | Annotate | Download | only in Reg2Mem
      1 ; RUN: opt -reg2mem -disable-output < %s
      2 ; PR14782
      3 
      4 declare void @f1()
      5 
      6 declare i32 @__gxx_personality_sj0(...)
      7 
      8 declare void @f2()
      9 
     10 declare void @f3()
     11 
     12 declare void @f4_()
     13 
     14 declare void @_Z12xxxdtsP10xxxpq()
     15 
     16 define hidden void @_ZN12xxxyzIi9xxxwLi29ELi0EE4f3NewES0_i() ssp align 2 {
     17 bb:
     18   invoke void @f4_()
     19           to label %bb1 unwind label %.thread
     20 
     21 .thread:                                          ; preds = %bb
     22   %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     23           cleanup
     24   br label %bb13
     25 
     26 bb1:                                              ; 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 
     34 bb2:                                              ; preds = %.noexc
     35   %tmp3 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     36           cleanup
     37   invoke void @f3()
     38           to label %.body unwind label %bb4
     39 
     40 bb4:                                              ; preds = %bb2
     41   %tmp5 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     42           catch i8* null
     43   unreachable
     44 
     45 bb6:                                              ; 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 
     53 bb7:                                              ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit
     54   ret void
     55 
     56 bb8:                                              ; preds = %_ZN6xxxdIN12xxxyzIi9xxxwLi29ELi0EE4fr1jS3_.exit
     57   %tmp9 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     58           cleanup
     59   br label %_ZN10xxxpqdlev.exit
     60 
     61 bb10:                                             ; preds = %bb6, %bb1
     62   %.1 = phi i1 [ true, %bb1 ], [ false, %bb6 ]
     63   %tmp11 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     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 
     72 bb12:                                             ; preds = %.body
     73   br i1 %.1.lpad-body, label %bb13, label %_ZN10xxxpqdlev.exit
     74 
     75 bb13:                                             ; 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 
     82 bb14:                                             ; preds = %bb13, %.body
     83   %tmp15 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
     84           catch i8* null
     85   unreachable
     86 }
     87 
     88 declare void @xxx_MemFree()
     89