blob: 5054ad8e118b73f2625e91314804e5c96c3d20b9 [file] [log] [blame]
Manuel Jacobb8060cd2016-01-05 19:40:58 +00001; RUN: opt %s -S -place-safepoints | FileCheck %s
2
3declare void @foo() "gc-leaf-function"
4
Manuel Jacob68b753a2016-01-05 19:45:54 +00005; Calls of functions with the "gc-leaf-function" attribute shouldn't be turned
6; into a safepoint. An entry safepoint should get inserted, though.
Manuel Jacobb8060cd2016-01-05 19:40:58 +00007define void @test_leaf_function() gc "statepoint-example" {
8; CHECK-LABEL: test_leaf_function
9; CHECK: gc.statepoint.p0f_isVoidf
10; CHECK-NOT: statepoint
11; CHECK-NOT: gc.result
12entry:
13 call void @foo()
14 ret void
15}
16
17; This function is inlined when inserting a poll.
18declare void @do_safepoint()
19define void @gc.safepoint_poll() {
20; CHECK-LABEL: gc.safepoint_poll
21entry:
22 call void @do_safepoint()
23 ret void
24}