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 6declare void @foo() 7 8define void @test1() gc "statepoint-example" { 9; CHECK-LABEL: test1 10 11entry: 12; CHECK-LABEL: entry 13; CHECK: statepoint 14 br label %loop 15 16loop: 17; CHECK-LABEL: loop 18; CHECK: @llvm.experimental.gc.statepoint.p0f_isVoidf(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. 25declare void @do_safepoint() 26define void @gc.safepoint_poll() { 27; CHECK-LABEL: gc.safepoint_poll 28entry: 29 call void @do_safepoint() 30 ret void 31} 32