[RS4GC] Fix rematerialization of bitcast of bitcast.
[oota-llvm.git] / test / Transforms / PlaceSafepoints / statepoint-coreclr.ll
1 ; RUN: opt %s -S -place-safepoints | FileCheck %s\r
2 \r
3 ; Basic test to make sure that safepoints are placed\r
4 ; for CoreCLR GC\r
5 \r
6 declare void @foo()\r
7 \r
8 define void @test_simple_call() gc "coreclr" {\r
9 ; CHECK-LABEL: test_simple_call\r
10 entry:\r
11   br label %other\r
12 other:\r
13 ; CHECK-LABEL: other\r
14 ; CHECK: statepoint\r
15 ; CHECK-NOT: gc.result\r
16   call void @foo()\r
17   ret void\r
18 }\r
19 \r
20 ; This function is inlined when inserting a poll.  To avoid recursive\r
21 ; issues, make sure we don't place safepoints in it.\r
22 declare void @do_safepoint()\r
23 define void @gc.safepoint_poll() {\r
24 ; CHECK-LABEL: gc.safepoint_poll\r
25 ; CHECK-LABEL: entry\r
26 ; CHECK-NEXT: do_safepoint\r
27 ; CHECK-NEXT: ret void\r
28 entry:\r
29   call void @do_safepoint()\r
30   ret void\r
31 }\r