brintos

brintos / llvm-project-archived public Read only

0
0
Text · 870 B · c2fa223 Raw
34 lines · plain
1; RUN: opt < %s -S -passes=rewrite-statepoints-for-gc | FileCheck %s2 3declare void @foo() "gc-leaf-function"4declare void @bar()5 6; Calls of functions with the "gc-leaf-function" attribute shouldn't be turned7; into a safepoint.  An entry safepoint should get inserted, though.8define void @test_leaf_function() gc "statepoint-example" {9; CHECK-LABEL: test_leaf_function10; CHECK-NOT: gc.statepoint11; CHECK-NOT: gc.result12entry:13  call void @foo()14  ret void15}16 17define void @test_leaf_function_call() gc "statepoint-example" {18; CHECK-LABEL: test_leaf_function_call19; CHECK-NOT: gc.statepoint20; CHECK-NOT: gc.result21entry:22  call void @bar() "gc-leaf-function"23  ret void24}25 26; This function is inlined when inserting a poll.27declare void @do_safepoint()28define void @gc.safepoint_poll() {29; CHECK-LABEL: gc.safepoint_poll30entry:31  call void @do_safepoint()32  ret void33}34