Home | History | Annotate | Download | only in RewriteStatepointsForGC
      1 ; RUN: opt %s -rewrite-statepoints-for-gc -spp-print-base-pointers -S 2>&1 | FileCheck %s
      2 
      3 ; CHECK: derived %merged_value base %merged_value.base
      4 
      5 declare void @site_for_call_safpeoint()
      6 
      7 define i64 addrspace(1)* @test(i64 addrspace(1)* %base_obj_x, i64 addrspace(1)* %base_obj_y, i1 %runtime_condition) gc "statepoint-example" {
      8 entry:
      9   br i1 %runtime_condition, label %here, label %there
     10 
     11 here:
     12   %x = getelementptr i64, i64 addrspace(1)* %base_obj_x, i32 1
     13   br label %merge
     14 
     15 there:
     16   %y = getelementptr i64, i64 addrspace(1)* %base_obj_y, i32 1
     17   br label %merge
     18 
     19 merge:
     20 ; CHECK-LABEL: merge:
     21 ; CHECK:   %merged_value.base = phi i64 addrspace(1)* [ %base_obj_x, %here ], [ %base_obj_y, %there ]
     22   %merged_value = phi i64 addrspace(1)* [ %x, %here ], [ %y, %there ]
     23   %safepoint_token = call i32 (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* @site_for_call_safpeoint, i32 0, i32 0, i32 0, i32 5, i32 0, i32 -1, i32 0, i32 0, i32 0)
     24   ret i64 addrspace(1)* %merged_value
     25 }
     26 
     27 declare void @foo()
     28 declare i32 @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
     29