Home | History | Annotate | Download | only in PlaceSafepoints
      1 ; If there's a call in the loop which dominates the backedge, we 
      2 ; don't need a safepoint poll (since the callee must contain a 
      3 ; poll test).
      4 ;; RUN: opt %s -place-safepoints -S | FileCheck %s
      5 
      6 declare void @foo()
      7 
      8 define void @test1() gc "statepoint-example" {
      9 ; CHECK-LABEL: test1
     10 
     11 entry:
     12 ; CHECK-LABEL: entry
     13 ; CHECK: statepoint
     14   br label %loop
     15 
     16 loop:
     17 ; CHECK-LABEL: loop
     18 ; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 0, void ()* @foo
     19 ; CHECK-NOT: statepoint
     20   call void @foo()
     21   br label %loop
     22 }
     23 
     24 ; This function is inlined when inserting a poll.
     25 declare void @do_safepoint()
     26 define void @gc.safepoint_poll() {
     27 ; CHECK-LABEL: gc.safepoint_poll
     28 entry:
     29   call void @do_safepoint()
     30   ret void
     31 }
     32