reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
; RUN: opt < %s -S -place-safepoints | 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
}