Home | History | Annotate | Download | only in RewriteStatepointsForGC
      1 ; RUN: opt < %s -rewrite-statepoints-for-gc -S | FileCheck %s
      2 
      3 declare void @some_call(i64 addrspace(1)*)
      4 
      5 declare i32 @dummy_personality_function()
      6 
      7 define i64 addrspace(1)* @test(i64 addrspace(1)* %obj, i64 addrspace(1)* %obj1)
      8   gc "statepoint-example"
      9   personality i32 ()* @dummy_personality_function {
     10 entry:
     11   invoke void @some_call(i64 addrspace(1)* %obj) [ "deopt"() ]
     12           to label %second_invoke unwind label %exceptional_return
     13 
     14 second_invoke:                                    ; preds = %entry
     15   invoke void @some_call(i64 addrspace(1)* %obj) [ "deopt"() ]
     16           to label %normal_return unwind label %exceptional_return
     17 
     18 normal_return:                                    ; preds = %second_invoke
     19   ret i64 addrspace(1)* %obj
     20 
     21 ; CHECK: exceptional_return1:
     22 ; CHECK-NEXT: %lpad2 = landingpad token
     23 
     24 ; CHECK: exceptional_return.split-lp:
     25 ; CHECK-NEXT: %lpad.split-lp = landingpad token
     26 
     27 ; CHECK: exceptional_return:
     28 ; CHECK-NOT: phi token
     29 
     30 exceptional_return:                               ; preds = %second_invoke, %entry
     31   %lpad = landingpad token cleanup
     32   ret i64 addrspace(1)* %obj1
     33 }
     34