1 ; RUN: opt -S -rewrite-statepoints-for-gc < %s | FileCheck %s
2 ; RUN: opt -S -passes=rewrite-statepoints-for-gc < %s | FileCheck %s
5 declare i32 @personality_function()
7 define void @test_id() gc "statepoint-example" personality i32 ()* @personality_function {
8 ; CHECK-LABEL: @test_id(
11 ; CHECK: invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 100, i32 0, void ()* @f
12 invoke void @f() "statepoint-id"="100" to label %normal_return unwind label %exceptional_return
18 %landing_pad4 = landingpad {i8*, i32} cleanup
22 define void @test_num_patch_bytes() gc "statepoint-example" personality i32 ()* @personality_function {
23 ; CHECK-LABEL: @test_num_patch_bytes(
26 ; CHECK: invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 2882400000, i32 99, void ()* @f,
27 invoke void @f() "statepoint-num-patch-bytes"="99" to label %normal_return unwind label %exceptional_return
33 %landing_pad4 = landingpad {i8*, i32} cleanup
37 declare void @do_safepoint()
38 define void @gc.safepoint_poll() {
40 call void @do_safepoint()
44 ; CHECK-NOT: statepoint-id
45 ; CHECK-NOT: statepoint-num-patch_bytes