1 ;; A very basic test to make sure that splitting the backedge keeps working
2 ;; RUN: opt < %s -passes=place-safepoints -spp-split-backedge=1 -S | FileCheck %s
4 define void @test(i32, i1 %cond) gc "statepoint-example" {
6 ; CHECK-LABEL: loop.loop_crit_edge
7 ; CHECK: call void @do_safepoint
8 ; CHECK-NEXT: br label %loop
13 br i1 %cond, label %loop, label %exit
19 ; Test for the case where a single conditional branch jumps to two
20 ; different loop header blocks. Since we're currently using LoopSimplfy
21 ; this doesn't hit the interesting case, but once we remove that, we need
22 ; to be sure this keeps working.
23 define void @test2(i32, i1 %cond) gc "statepoint-example" {
25 ; CHECK-LABEL: loop2.loop2_crit_edge:
26 ; CHECK: call void @do_safepoint
27 ; CHECK-NEXT: br label %loop2
28 ; CHECK-LABEL: loop2.loop_crit_edge:
29 ; CHECK: call void @do_safepoint
30 ; CHECK-NEXT: br label %loop
38 br i1 %cond, label %loop, label %loop2
41 declare void @do_safepoint()
42 define void @gc.safepoint_poll() {
44 call void @do_safepoint()