1 ; RUN: opt < %s -S -rewrite-statepoints-for-gc | FileCheck %s
2 ; RUN: opt < %s -S -passes=rewrite-statepoints-for-gc | FileCheck %s
4 declare void @foo() "gc-leaf-function"
7 ; Calls of functions with the "gc-leaf-function" attribute shouldn't be turned
8 ; into a safepoint. An entry safepoint should get inserted, though.
9 define void @test_leaf_function() gc "statepoint-example" {
10 ; CHECK-LABEL: test_leaf_function
11 ; CHECK-NOT: gc.statepoint
12 ; CHECK-NOT: gc.result
18 define void @test_leaf_function_call() gc "statepoint-example" {
19 ; CHECK-LABEL: test_leaf_function_call
20 ; CHECK-NOT: gc.statepoint
21 ; CHECK-NOT: gc.result
23 call void @bar() "gc-leaf-function"
27 ; This function is inlined when inserting a poll.
28 declare void @do_safepoint()
29 define void @gc.safepoint_poll() {
30 ; CHECK-LABEL: gc.safepoint_poll
32 call void @do_safepoint()