1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/PlaceSafepoints/statepoint-coreclr.ll
Arthur Eubanks e86f39b76e [PlaceSafepoints] Pin tests to legacy PM
This pass isn't used in tree and can be ported to the NPM later on if desired.

Differential Revision: https://reviews.llvm.org/D90189
2020-10-26 20:07:37 -07:00

30 lines
678 B
LLVM

; RUN: opt < %s -S -place-safepoints -enable-new-pm=0 | FileCheck %s
; Basic test to make sure that safepoints are placed
; for CoreCLR GC
declare void @foo()
define void @test_simple_call() gc "coreclr" {
; CHECK-LABEL: test_simple_call
entry:
; CHECK: call void @do_safepoint
br label %other
other:
call void @foo()
ret void
}
; This function is inlined when inserting a poll. To avoid recursive
; issues, make sure we don't place safepoints in it.
declare void @do_safepoint()
define void @gc.safepoint_poll() {
; CHECK-LABEL: gc.safepoint_poll
; CHECK-LABEL: entry
; CHECK-NEXT: do_safepoint
; CHECK-NEXT: ret void
entry:
call void @do_safepoint()
ret void
}