Home | History | Annotate | Download | only in ARM
      1 ; RUN: opt -S -globaldce -sjljehprepare < %s | FileCheck %s
      2 target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
      3 target triple = "thumbv7--ios5.0.0"
      4 
      5 define void @g() personality i32 (...)* @__gxx_personality_sj0 {
      6 entry:
      7   %exn.slot = alloca i8*
      8   %ehselector.slot = alloca i32
      9   invoke void @f()
     10           to label %try.cont unwind label %lpad
     11 
     12 lpad:                                             ; preds = %entry
     13   %0 = landingpad { i8*, i32 }
     14           cleanup
     15   br label %try.cont
     16 
     17 try.cont:                                         ; preds = %catch, %invoke.cont
     18   ret void
     19 }
     20 
     21 declare void @f()
     22 
     23 declare i32 @__gxx_personality_sj0(...)
     24 
     25 ; CHECK-LABEL: define void @g(
     26 ; CHECK: call void @llvm.eh.sjlj.callsite(
     27 ; CHECK: call void @_Unwind_SjLj_Register(
     28 ; CHECK: invoke void @f(
     29 ; CHECK: landingpad
     30 ; CHECK-NEXT: cleanup
     31 ; CHECK: call void @_Unwind_SjLj_Unregister(
     32