brintos

brintos / llvm-project-archived public Read only

0
0
Text · 668 B · 74ca559 Raw
30 lines · plain
1; RUN: opt < %s -S -passes=place-safepoints | FileCheck %s2 3; Basic test to make sure that safepoints are placed4; for CoreCLR GC5 6declare void @foo()7 8define void @test_simple_call() gc "coreclr" {9; CHECK-LABEL: test_simple_call10entry:11; CHECK: call void @do_safepoint12  br label %other13other:14  call void @foo()15  ret void16}17 18; This function is inlined when inserting a poll.  To avoid recursive19; issues, make sure we don't place safepoints in it.20declare void @do_safepoint()21define void @gc.safepoint_poll() {22; CHECK-LABEL: gc.safepoint_poll23; CHECK-LABEL: entry24; CHECK-NEXT: do_safepoint25; CHECK-NEXT: ret void26entry:27  call void @do_safepoint()28  ret void29}30