1*9880d681SAndroid Build Coastguard Worker; RUN: opt -S -place-safepoints < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Workerdeclare void @callee() 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine void @test() gc "statepoint-example" { 6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test( 7*9880d681SAndroid Build Coastguard Workerentry: 8*9880d681SAndroid Build Coastguard Worker; CHECK: entry: 9*9880d681SAndroid Build Coastguard Worker; CHECK: call void @do_safepoint() 10*9880d681SAndroid Build Coastguard Worker br label %other 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerother: 13*9880d681SAndroid Build Coastguard Worker; CHECK: other: 14*9880d681SAndroid Build Coastguard Worker call void @callee() "gc-leaf-function" 15*9880d681SAndroid Build Coastguard Worker; CHECK: call void @do_safepoint() 16*9880d681SAndroid Build Coastguard Worker br label %other 17*9880d681SAndroid Build Coastguard Worker} 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdeclare void @do_safepoint() 20*9880d681SAndroid Build Coastguard Workerdefine void @gc.safepoint_poll() { 21*9880d681SAndroid Build Coastguard Worker call void @do_safepoint() 22*9880d681SAndroid Build Coastguard Worker ret void 23*9880d681SAndroid Build Coastguard Worker} 24