blob: 3942abde18398162219888935087a3923b0dd28b [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
5; Calls of functions with the "gc-leaf-function" attribute shouldn't get
6; safepoints. An entry safepoint should get inserted, though.
7define 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}