1 ; RUN: opt < %s -S -place-safepoints | FileCheck %s
3 declare void @llvm.localescape(...)
5 ; Do we insert the entry safepoint after the localescape intrinsic?
6 define void @parent() gc "statepoint-example" {
11 ; CHECK-NEXT: localescape
12 ; CHECK-NEXT: call void @do_safepoint
14 call void (...) @llvm.localescape(i32* %ptr)
18 ; This function is inlined when inserting a poll. To avoid recursive
19 ; issues, make sure we don't place safepoints in it.
20 declare void @do_safepoint()
21 define void @gc.safepoint_poll() {
22 ; CHECK-LABEL: gc.safepoint_poll
24 ; CHECK-NEXT: do_safepoint
25 ; CHECK-NEXT: ret void
27 call void @do_safepoint()