2020-10-27 04:21:39 +08:00
|
|
|
; RUN: opt -S -place-safepoints < %s -enable-new-pm=0 | FileCheck %s
|
2019-04-17 12:52:47 +08:00
|
|
|
|
|
|
|
declare void @callee()
|
|
|
|
|
|
|
|
define void @test() gc "statepoint-example" {
|
|
|
|
; CHECK-LABEL: test(
|
|
|
|
entry:
|
|
|
|
; CHECK: entry:
|
|
|
|
; CHECK: call void @do_safepoint()
|
|
|
|
br label %other
|
|
|
|
|
|
|
|
other:
|
|
|
|
; CHECK: other:
|
|
|
|
call void @callee() "gc-leaf-function"
|
|
|
|
; CHECK: call void @do_safepoint()
|
|
|
|
br label %other
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @do_safepoint()
|
|
|
|
define void @gc.safepoint_poll() {
|
|
|
|
call void @do_safepoint()
|
|
|
|
ret void
|
|
|
|
}
|