brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 8261e47 Raw
47 lines · plain
1;; A very basic test to make sure that splitting the backedge keeps working2;; RUN: opt < %s -passes=place-safepoints -spp-split-backedge=1 -S | FileCheck %s3 4define void @test(i32, i1 %cond) gc "statepoint-example" {5; CHECK-LABEL: @test6; CHECK-LABEL: loop.loop_crit_edge7; CHECK: call void @do_safepoint8; CHECK-NEXT: br label %loop9entry:10  br label %loop11 12loop:13  br i1 %cond, label %loop, label %exit14 15exit:16  ret void17}18 19; Test for the case where a single conditional branch jumps to two20; different loop header blocks.  Since we're currently using LoopSimplfy21; this doesn't hit the interesting case, but once we remove that, we need22; to be sure this keeps working.23define void @test2(i32, i1 %cond) gc "statepoint-example" {24; CHECK-LABEL: @test225; CHECK-LABEL: loop2.loop2_crit_edge:26; CHECK: call void @do_safepoint27; CHECK-NEXT: br label %loop228; CHECK-LABEL: loop2.loop_crit_edge:29; CHECK: call void @do_safepoint30; CHECK-NEXT: br label %loop31entry:32  br label %loop33 34loop:35  br label %loop236 37loop2:38  br i1 %cond, label %loop, label %loop239}40 41declare void @do_safepoint()42define void @gc.safepoint_poll() {43entry:44  call void @do_safepoint()45  ret void46}47