[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / Transforms / RewriteStatepointsForGC / statepoint-coreclr.ll
blobd4c5b04beddfa067c37f1e1682cbc18e354ec821
1 ; RUN: opt < %s -S -passes=rewrite-statepoints-for-gc | FileCheck %s
3 ; Basic test to make sure that safepoints are placed
4 ; for CoreCLR GC
6 declare void @foo()
8 define void @test_simple_call() gc "coreclr" {
9 ; CHECK-LABEL: test_simple_call
10 entry:
11   br label %other
12 other:
13 ; CHECK-LABEL: other
14 ; CHECK: statepoint
15 ; CHECK-NOT: gc.result
16   call void @foo()
17   ret void
20 ; This function is inlined when inserting a poll.  To avoid recursive
21 ; issues, make sure we don't place safepoints in it.
22 declare void @do_safepoint()
23 define void @gc.safepoint_poll() {
24 ; CHECK-LABEL: gc.safepoint_poll
25 ; CHECK-LABEL: entry
26 ; CHECK-NEXT: do_safepoint
27 ; CHECK-NEXT: ret void
28 entry:
29   call void @do_safepoint()
30   ret void