1 ; RUN: opt < %s -S -place-safepoints | FileCheck %s 2 3 ; Basic test to make sure that safepoints are placed 4 ; for CoreCLR GC 5 6 declare void @foo() 7 8 define void @test_simple_call() gc "coreclr" { 9 ; CHECK-LABEL: test_simple_call 10 entry: 11 ; CHECK: call void @do_safepoint 12 br label %other 13 other: 14 call void @foo() 15 ret void 16 } 17 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 23 ; CHECK-LABEL: entry 24 ; CHECK-NEXT: do_safepoint 25 ; CHECK-NEXT: ret void 26 entry: 27 call void @do_safepoint() 28 ret void 29 } 30