Home | History | Annotate | Download | only in LoopSimplify
      1 ; RUN: opt < %s -loop-simplify -S | FileCheck %s
      2 ; PR11575
      3 
      4 @catchtypeinfo = external unnamed_addr constant { i8*, i8*, i8* }
      5 
      6 define void @main() uwtable ssp {
      7 entry:
      8   invoke void @f1()
      9           to label %try.cont19 unwind label %catch
     10 
     11 ; CHECK: catch.preheader:
     12 ; CHECK-NEXT: landingpad
     13 ; CHECK: br label %catch
     14 
     15 ; CHECK: catch.split-lp:
     16 ; CHECK-NEXT: landingpad
     17 ; CHECK: br label %catch
     18 
     19 catch:                                            ; preds = %if.else, %entry
     20   %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
     21           catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*)
     22   invoke void @f3()
     23           to label %if.else unwind label %eh.resume
     24 
     25 if.else:                                          ; preds = %catch
     26   invoke void @f2()
     27           to label %try.cont19 unwind label %catch
     28 
     29 try.cont19:                                       ; preds = %if.else, %entry
     30   ret void
     31 
     32 eh.resume:                                        ; preds = %catch
     33   %1 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
     34           cleanup
     35           catch i8* bitcast ({ i8*, i8*, i8* }* @catchtypeinfo to i8*)
     36   resume { i8*, i32 } undef
     37 }
     38 
     39 declare i32 @__gxx_personality_v0(...)
     40 
     41 declare void @f1()
     42 
     43 declare void @f2()
     44 
     45 declare void @f3()
     46