1 ; RUN: opt %s -S -place-safepoints | FileCheck %s
4 ; Do we insert a simple entry safepoint?
5 define void @test_entry() gc "statepoint-example" {
6 ; CHECK-LABEL: @test_entry
13 ; Do we insert a backedge safepoint in a statically
15 define void @test_backedge() gc "statepoint-example" {
16 ; CHECK-LABEL: test_backedge
19 ; This statepoint is technically not required, but we don't exploit that yet.
30 ; Check that we remove an unreachable block rather than trying
31 ; to insert a backedge safepoint
32 define void @test_unreachable() gc "statepoint-example" {
33 ; CHECK-LABEL: test_unreachable
40 ; CHECK-NOT: statepoint
47 ; Do we turn a call into it's own statepoint
48 define void @test_simple_call() gc "statepoint-example" {
49 ; CHECK-LABEL: test_simple_call
60 ; This function is inlined when inserting a poll. To avoid recursive
61 ; issues, make sure we don't place safepoints in it.
62 declare void @do_safepoint()
63 define void @gc.safepoint_poll() {
64 ; CHECK-LABEL: gc.safepoint_poll
66 ; CHECK-NEXT: do_safepoint
67 ; CHECK-NEXT: ret void
69 call void @do_safepoint()